/**
 * Green Select - Second Hand Machines Styling
 * Based on slices design
 */

/* ==========================================
   Variables & Base Styles
   ========================================== */
:root {
    --avr-green: #006c3f;
    --avr-green-light: #50b848;
    --avr-gray: #f5f5f5;
    --avr-dark: #333;
}

/* ==========================================
   Section Styles
   ========================================== */
.green-select-overview.white-section,
.green-select-detail.white-section {
    background: #fff;
    padding: 60px 0;
}

.green-select-detail.white-section-first {
    padding-top: 40px;
}

.gray-section {
    background: var(--avr-gray);
    padding: 60px 0;
}

/* ==========================================
   Headline Styles (Title)
   ========================================== */
.green-select-overview .headline,
.green-select-detail .headline {
    font-size: 3rem;
    font-weight: 400;
    text-transform: uppercase;
    color: #006c3f;
    margin-bottom: 0.5rem;
}

.green-select-overview .large {
    font-size: 1.125rem;
    color: #666;
}

/* ==========================================
   Form Controls (Filters)
   ========================================== */
.green-select-overview .form-group.form-group-icon .form-select {
    padding-right: 60px;
    height: 50px;
}

.green-select-overview .form-group .form-select.form-select-rounded {
    border-radius: 25px;
    padding-left: 25px;
    padding-right: 25px;
    color: #006c3f;
    border: 2px solid #50b848;
    box-shadow: none;
    height: 50px;
}

.green-select-overview .form-group .form-select.form-select-rounded:focus {
    outline: 0;
    box-shadow: none;
}

.green-select-overview .form-group-floating-label {
    position: relative;
}

.green-select-overview .form-group-floating-label .floating-label {
    position: absolute;
    top: -8px;
    left: 20px;
    background: #fff;
    padding: 0 6px;
    font-size: 0.75rem;
    color: var(--avr-green-light);
    z-index: 1;
}

/* ==========================================
   Button Styles
   ========================================== */
.green-select-overview .btn.btn-success,
.green-select-detail .btn.btn-success {
    color: #fff !important;
    background: #50b848 !important;
    border-color: #50b848 !important;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 10px 30px;
    font-weight: 700;
    text-transform: uppercase;
    border-radius: 30px;
    text-decoration: none;
    transition: all 0.3s ease;
    height: auto;
    min-height: 50px;
}

.green-select-overview .btn.btn-success:hover,
.green-select-detail .btn.btn-success:hover {
    background: #3d8c38 !important;
    border-color: #3d8c38 !important;
    color: #fff !important;
    text-decoration: none;
}

/* WhatsApp Button */
.green-select-detail .btn-whatsapp {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 10px 30px;
    font-weight: 700;
    text-transform: uppercase;
    border-radius: 30px;
    text-decoration: none;
    transition: all 0.3s ease;
    height: auto;
    min-height: 50px;
    background: #50b848 !important;
    border: 2px solid #50b848 !important;
    color: #fff !important;
}

.green-select-detail .btn-whatsapp:hover {
    background: #3d8c38 !important;
    border-color: #3d8c38 !important;
    color: #fff !important;
    text-decoration: none;
}

.green-select-detail .btn-whatsapp svg {
    flex-shrink: 0;
}

/* Contact buttons container */
.green-select-detail .contact-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
    justify-content: center;
    align-items: center;
}

/* ==========================================
   Slider Styles (noUiSlider)
   ========================================== */
.green-select-overview .slider-label {
    display: block;
    font-size: 1rem;
    color: #50b848;
    font-weight: 700;
    margin-bottom: 10px;
}

.green-select-overview .slider-values {
    font-size: 1rem;
    color: #006c3f;
    font-weight: 700;
    margin-bottom: 10px;
}

.green-select-overview .noUi-target {
    border: 0 !important;
    background: #006c3f !important;
    height: 4px;
    border-radius: 0 !important;
    box-shadow: none !important;
}

.green-select-overview .noUi-target.noUi-horizontal {
    height: 4px;
}

.green-select-overview .noUi-target .noUi-base .noUi-connects .noUi-connect,
.green-select-overview .noUi-connect {
    background: #50b848;
}

.green-select-overview .noUi-target .noUi-base .noUi-origin .noUi-handle,
.green-select-overview .noUi-handle {
    width: 16px !important;
    height: 16px !important;
    border: 0 !important;
    border-radius: 50% !important;
    background: #50b848 !important;
    box-shadow: none !important;
    top: -6px !important;
    right: -8px !important;
    cursor: pointer;
}

.green-select-overview .noUi-handle:before,
.green-select-overview .noUi-handle:after {
    display: none !important;
}

/* ==========================================
   Cards Grid (Overview Page)
   ========================================== */
.green-select-overview .cards-list {
    display: flex;
    flex-wrap: wrap;
    align-items: stretch;
    margin: 0 -15px;
}

.green-select-overview .cards-list.cards-list-4 {
    margin: 0 -15px !important;
}

.green-select-overview .cards-list.cards-list-4 .card {
    width: calc(25% - 30px);
    margin: 0 15px 30px 15px;
}

@media (max-width: 1024px) {
    .green-select-overview .cards-list.cards-list-4 .card {
        width: calc(50% - 30px);
    }
}

@media (max-width: 640px) {
    .green-select-overview .cards-list.cards-list-4 .card {
        width: calc(100% - 30px);
    }
}

/* Card Styles */
.green-select-overview .card,
.green-select-detail .card,
.similar-machines-section .card {
    display: flex;
    flex-direction: column;
    background: #f4f3f3;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    text-decoration: none;
    color: inherit;
    border: none;
}

.green-select-overview .card:hover,
.similar-machines-section .card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
    text-decoration: none;
    color: inherit;
}

html body .green-select-overview .card .image-container,
html body .similar-machines-section .card .image-container {
    position: relative;
    overflow: visible;
    background: #f4f3f3;
}

html body .green-select-overview .card .card-image,
html body .similar-machines-section .card .card-image {
    position: relative;
    overflow: hidden;
    background: #f4f3f3;
}

html body .green-select-overview .card .card-image img,
html body .similar-machines-section .card .card-image img {
    width: 100%;
    height: auto;
    aspect-ratio: 4/3;
    object-fit: cover;
    transition: transform 0.4s ease;
}

html body .green-select-overview .card:hover .card-image img,
html body .similar-machines-section .card:hover .card-image img {
    transform: scale(1.1);
}

html body .green-select-overview .card .image-container .image-label,
html body .similar-machines-section .card .image-container .image-label {
    position: absolute;
    bottom: -20px;
    left: 20px;
    right: 20px;
    background: #f4f3f3;
    padding: 10px 30px;
    border-radius: 20px;
    z-index: 2;
    display: inline-block;
    color: #006c3f;
}

html body .green-select-overview .card .image-container .image-label h2,
html body .green-select-overview .card .image-container .image-label .card-title,
html body .similar-machines-section .card .image-container .image-label h2,
html body .similar-machines-section .card .image-container .image-label .card-title {
    color: #006c3f;
    font-size: 1.1rem;
    font-weight: 900;
    margin: 0;
}

html body .green-select-overview .card .card-body {
    padding: 30px 20px 20px 20px;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    background: #f4f3f3;
    position: relative;
    z-index: 1;
}

html body .green-select-overview .card .card-text,
html body .similar-machines-section .card .card-text {
    color: #006c3f;
    font-size: 0.9375rem;
    margin-bottom: 10px;
}

html body .green-select-overview .card .badge,
html body .similar-machines-section .card .badge {
    display: inline-block;
    padding: 6px 16px;
    font-size: 0.8125rem;
    font-weight: 500;
    border-radius: 50px;
}

html body .green-select-overview .card .badge.text-bg-success,
html body .similar-machines-section .card .badge.text-bg-success {
    background-color: var(--avr-green) !important;
    color: #fff;
}

.green-select-overview .card .btn-link {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    color: var(--avr-dark);
    font-weight: 500;
    padding: 0;
    margin-top: auto;
    padding-top: 15px;
    text-decoration: none;
    background: none;
    border: none;
}

.green-select-overview .card .btn-link:hover {
    color: var(--avr-green);
}

.green-select-overview .card .btn-link-arrow {
    display: inline-flex;
    width: 20px;
    height: 20px;
}

.green-select-overview .card .btn-link-arrow svg {
    width: 20px;
    height: 20px;
    transition: transform 0.2s ease;
}

.green-select-overview .card:hover .btn-link-arrow svg {
    transform: translateX(4px);
}

/* ==========================================
   Pagination
   ========================================== */
.green-select-overview .pagination {
    border: 0 !important;
    display: flex;
    justify-content: center;
    list-style: none;
    padding: 0;
    margin: 30px 0;
}

.green-select-overview .pagination .page-item {
    border: 0;
    margin: 0 2px;
}

.green-select-overview .pagination .page-item .page-link {
    border: 0;
    color: #006c3f;
    border-radius: 3px;
    min-width: 38px;
    text-align: center;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 8px 12px;
    text-decoration: none;
}

.green-select-overview .pagination .page-item .page-link:focus {
    box-shadow: none !important;
}

.green-select-overview .pagination .page-item .page-link:hover {
    background: transparent;
}

.green-select-overview .pagination .page-item.active .page-link {
    color: #fff;
    background: #50b848;
}

.green-select-overview .pagination .page-item.active .page-link:hover {
    color: #fff;
    background: #50b848;
}

/* ==========================================
   Machine Details (Detail Page - Icons Bar)
   ========================================== */
.green-select-detail .machine-details {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    margin: 20px 0 40px 0;
    padding: 0;
    border-bottom: none;
}

.green-select-detail .machine-detail-item {
    display: flex;
    align-items: flex-start;
}

.green-select-detail .machine-detail-item-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 64px;
    height: 64px;
    margin-right: 10px;
    border: 1px solid #006c3f;
    border-radius: 4px;
}

.green-select-detail .machine-detail-item-icon svg {
    stroke: #006c3f;
}

.green-select-detail .machine-detail-content {
    text-align: left;
}

.green-select-detail .machine-detail-content > div:first-child {
    font-size: 0.875rem;
    color: #006c3f;
    margin-bottom: 2px;
}

.green-select-detail .machine-detail-content .bold.lead {
    font-size: 1rem;
    font-weight: 600;
    color: #006c3f;
}

/* Icon sizes */
.icon-size {
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.icon-size-24 {
    width: 24px;
    height: 24px;
}

.icon-size-24 svg {
    width: 24px;
    height: 24px;
}

.icon-size-32 {
    width: 32px;
    height: 32px;
}

.icon-size-32 svg {
    width: 32px;
    height: 32px;
}

/* ==========================================
   Sold Banner
   ========================================== */
.green-select-detail .sold-banner {
    background: #50b848;
    color: #fff;
    padding: 20px;
    margin: 20px 0;
    border-radius: 4px;
}

.green-select-detail .sold-banner h2 {
    margin: 0;
    text-transform: uppercase;
    font-weight: 700;
}

/* ==========================================
   Photo Gallery (Detail Page)
   ========================================== */
.green-select-detail .gallery-list {
    display: flex;
    align-items: stretch;
    flex-wrap: wrap;
    margin: 0 -8px 30px -8px;
}

.green-select-detail .gallery-image-link {
    display: block;
    overflow: hidden;
    border-radius: 8px;
    width: calc(16.666% - 16px);
    margin: 0 8px 16px 8px;
    aspect-ratio: 1;
}

@media (max-width: 1199px) {
    .green-select-detail .gallery-image-link {
        width: calc(25% - 16px);
    }
}

@media (max-width: 767px) {
    .green-select-detail .gallery-image-link {
        width: calc(33.333% - 16px);
    }
}

@media (max-width: 575px) {
    .green-select-detail .gallery-image-link {
        width: calc(50% - 16px);
    }
}

.green-select-detail .gallery-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.green-select-detail .gallery-image-link:hover .gallery-image {
    transform: scale(1.05);
}

/* ==========================================
   Star Rating - Matching slicing exactly
   ========================================== */
.green-select-detail .gray-rating {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    color: #666;
    font-size: 1rem;
    padding: 15px 25px;
    background: #f4f3f3;
    border-radius: 0;
    margin: 20px 0;
}

.green-select-detail .rating-list {
    display: inline-flex;
    gap: 4px;
}

.green-select-detail .start-icon {
    display: inline-flex;
    color: #666;
}

.green-select-detail .start-icon.star-filled {
    color: #ffc107;
}

.green-select-detail .start-icon.star-empty {
    color: #ddd;
}

/* ==========================================
   Description Text (replaces Extra Info)
   ========================================== */
.green-select-detail .description-text {
    font-size: 1.2rem;
    line-height: 1.6;
    color: #006c3f;
    margin-bottom: 1.5rem;
}

/* ==========================================
   Similar Machines Section
   ========================================== */
.similar-machines-section {
    padding: 60px 0;
}

.similar-machines-section h2 {
    font-size: 2rem;
    font-weight: 900;
    margin-bottom: 30px;
    text-transform: uppercase;
    color: #006c3f;
}

html body .similar-machines-section .card .card-body {
    padding: 30px 25px 60px 25px !important;
    position: relative;
    background: #fff !important;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
}

.similar-machines-section .card .card-body .btn-link {
    position: absolute;
    left: 25px;
    right: 25px;
    bottom: 15px;
    display: inline-flex;
    align-items: center;
    padding: 10px 0;
    text-transform: none !important;
    font-weight: 700;
    color: #006c3f;
    text-decoration: none;
}

.similar-machines-section .card .card-body .btn-link:hover {
    color: #006c3f;
}

.similar-machines-section .card .card-body .btn-link .btn-link-arrow {
    display: flex;
    width: 20px;
    height: 20px;
    align-items: center;
    justify-content: center;
    margin-left: 5px;
}

.similar-machines-section .card .card-body .btn-link .btn-link-arrow svg {
    width: 100%;
    height: 100%;
    stroke: #006c3f;
}

/* Similar Machines Swiper Carousel */
.similar-machines-section .highlights.swiper {
    position: relative;
    overflow: hidden;
    padding-bottom: 50px;
}

.similar-machines-section .swiper-slide {
    height: auto;
}

html body .similar-machines-section .swiper-slide .card {
    height: 100%;
    margin-bottom: 0;
    background: #fff;
}

html body .similar-machines-section .card .image-label {
    background: #fff !important;
}

/* Swiper pagination styling - matching slicing */
.similar-machines-section .swiper-pagination {
    position: relative !important;
    padding-top: 30px;
    text-align: center !important;
    bottom: 0 !important;
}

.similar-machines-section .swiper-pagination .swiper-pagination-bullet {
    width: 14px;
    height: 14px;
    border: 1px solid #006c3f !important;
    opacity: 1 !important;
    background: transparent;
    margin: 0 4px;
}

.similar-machines-section .swiper-pagination .swiper-pagination-bullet-active {
    background: #006c3f !important;
}

/* ==========================================
   Modal Styles
   ========================================== */
#modal-shm-contact .modal-dialog {
    max-width: 500px;
}

#modal-shm-contact .modal-header {
    border-bottom: 1px solid #eee;
    padding: 20px;
}

#modal-shm-contact .modal-title {
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--avr-dark);
}

#modal-shm-contact .modal-body {
    padding: 20px;
}

#modal-shm-contact .close {
    background: none;
    border: none;
    font-size: 1.5rem;
    color: #666;
    cursor: pointer;
}

/* ==========================================
   No Results State
   ========================================== */
.green-select-overview .no-results {
    width: 100%;
    text-align: center;
    padding: 40px 20px;
}

.green-select-overview .no-results h4 {
    color: var(--avr-green);
    margin-bottom: 10px;
}

.green-select-overview .no-results p {
    color: #666;
}

/* ==========================================
   Loading Spinner
   ========================================== */
.green-select-overview .loading-spinner {
    width: 100%;
    text-align: center;
    padding: 40px 20px;
}

.spinner-border {
    width: 3rem;
    height: 3rem;
}

.text-success {
    color: #50b848 !important;
}

/* ==========================================
   Responsive Adjustments
   ========================================== */
@media (max-width: 991px) {
    .green-select-detail .machine-details {
        justify-content: center;
        gap: 20px;
    }

    .green-select-detail .machine-detail-item {
        flex-basis: calc(50% - 20px);
    }

    .green-select-overview .headline,
    .green-select-detail .headline {
        font-size: 2.5rem;
    }
}

@media (max-width: 767px) {
    .green-select-detail .machine-details {
        flex-direction: column;
        align-items: flex-start;
    }

    .green-select-detail .machine-detail-item {
        flex-basis: 100%;
    }

    .green-select-overview.white-section,
    .green-select-detail.white-section,
    .gray-section {
        padding: 40px 0;
    }

    .green-select-overview .headline,
    .green-select-detail .headline {
        font-size: 2rem;
    }
}
