/* ---------------------------
   MODERN PRODUCT PAGE STYLES
----------------------------*/
.modern-product {
    display: block;
    visibility: visible;
    opacity: 1;
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 24px;
}

.modern-product .product-header {
    margin-bottom: 40px;
    display: block;
    visibility: visible;
}

.modern-product .product-title {
    font-size: 48px;
    font-weight: 700;
    line-height: 1.1;
    margin: 0 0 16px 0;
    color: #111;
}

.modern-product .product-green-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 16px;
    background: #ecf7f1;
    border-radius: 24px;
    color: #2f6e4f;
    font-size: 14px;
}

.modern-product .product-green-badge .badge-dot {
    width: 8px;
    height: 8px;
    background: #2f6e4f;
    border-radius: 50%;
}

/* 2-Column Layout */
.modern-product .product-two-columns {
    display: flex;
    gap: 60px;
    align-items: flex-start;
    margin-bottom: 60px;
    width: 100%;
}

.modern-product .product-column-slider {
    flex: 1.2;
    min-width: 0; /* Added to prevent flex item from overflowing */
}

.modern-product .product-column-info {
    flex: 0.8;
    min-width: 0; /* Added to prevent flex item from overflowing */
}

@media (max-width: 992px) {
    .modern-product .product-two-columns {
        display: block; /* Changed from flex to block for mobile */
        gap: 40px;
    }
    
    .modern-product .product-column-slider,
    .modern-product .product-column-info {
        flex: none; /* Remove flex properties on mobile */
        min-width: 0;
        width: 100%;
        margin-bottom: 40px;
    }
    
    .modern-product .product-column-info {
        margin-bottom: 0; /* Remove bottom margin from last column */
    }
}

/* Column 1: Slider */
.modern-product .product-column-slider .product-slider-container .product-main-slider {
    margin-bottom: 16px;
    border-radius: 16px;
    overflow: hidden;
    background: #f8f9fa;
}

.modern-product .slide-image-container {
    aspect-ratio: 4/3;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.modern-product .slide-image {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    border-radius: 8px;
}

.modern-product .slider-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 44px;
    height: 44px;
    background: rgba(255, 255, 255, 0.9);
    border: none;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 10;
    transition: all 0.3s ease;
    color: #111;
}

.modern-product .slider-nav:hover {
    background: #fff;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.modern-product .slider-nav.slider-prev {
    left: 16px;
}

.modern-product .slider-nav.slider-next {
    right: 16px;
}

.modern-product .swiper-pagination {
    bottom: 16px;
}

.modern-product .swiper-pagination .swiper-pagination-bullet {
    background: rgba(255, 255, 255, 0.7);
    opacity: 1;
}

.modern-product .swiper-pagination .swiper-pagination-bullet.swiper-pagination-bullet-active {
    background: #397052;
}

.modern-product .thumb-container {
    aspect-ratio: 1;
    border-radius: 8px;
    overflow: hidden;
    background: #f8f9fa;
    cursor: pointer;
    transition: all 0.3s ease;
    border: 2px solid transparent;
}

.modern-product .thumb-container:hover {
    border-color: #397052;
}

.modern-product .thumb-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.modern-product .swiper-slide-thumb-active .thumb-container {
    border-color: #397052;
    box-shadow: 0 0 0 1px #397052;
}

/* Column 2: Information */
.modern-product .product-column-info {
    display: flex;
    flex-direction: column;
    gap: 24px;
}

.modern-product .product-meta-info {
    display: flex;
    flex-wrap: wrap;
    gap: 16px;
    margin-bottom: 16px;
    font-size: 14px;
    color: #6b7280;
}

.modern-product .product-category {
    font-size: 14px;
    color: #397052;
    font-weight: 500;
}

.modern-product .product-category a {
    color: inherit;
    text-decoration: none;
}

.modern-product .product-producer,
.modern-product .product-time {
    display: flex;
    gap: 4px;
}

.modern-product .product-producer .label,
.modern-product .product-time .label {
    color: #6b7280;
}

.modern-product .product-producer .value,
.modern-product .product-time .value {
    color: #111;
    font-weight: 500;
}

.modern-product .product-description {
    font-size: 16px;
    line-height: 1.6;
    color: #374151;
}

.modern-product .product-delivery-card,
.modern-product .product-features-card {
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    padding: 20px;
}

.modern-product .product-delivery-card .card-title,
.modern-product .product-features-card .card-title {
    font-size: 18px;
    font-weight: 600;
    margin: 0 0 12px 0;
    color: #111;
}

.modern-product .product-delivery-card .card-content {
    color: #374151;
    line-height: 1.6;
}

.modern-product .features-list {
    margin: 0;
}

.modern-product .feature-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 0;
    border-bottom: 1px solid #f3f4f6;
}

.modern-product .feature-item:last-child {
    border-bottom: none;
}

.modern-product .feature-item .feature-label {
    font-weight: 500;
    color: #6b7280;
    margin: 0;
}

.modern-product .feature-item .feature-value {
    color: #111;
    margin: 0;
    text-align: right;
}

.modern-product .quote-button {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    padding: 16px 32px;
    background: #397052;
    color: #fff;
    text-decoration: none;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 600;
    transition: all 0.3s ease;
}

.modern-product .quote-button:hover {
    background: #2d5a42;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(57, 112, 82, 0.3);
}

.modern-product .quote-button .button-text {
    margin: 0;
}

.modern-product .quote-button .button-icon {
    display: flex;
    align-items: center;
}

.modern-product .cta-help {
    margin: 8px 0 0 0;
    font-size: 14px;
    color: #6b7280;
}

.modern-product .woocommerce-tabs {
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    padding: 24px;
}

@media (max-width: 992px) {
    .modern-product .product-title {
        font-size: 32px;
    }
}

@media (max-width: 767px) {
    .modern-product {
        padding: 0 15px; /* Adjust main padding for smaller screens */
    }

    .modern-product .product-title {
        font-size: 28px; /* Further reduce title font size for mobile */
        margin-bottom: 12px;
    }

    .modern-product .product-two-columns {
        gap: 30px; /* Reduce gap between stacked columns */
        margin-bottom: 40px;
    }

    .modern-product .product-column-info {
        gap: 20px; /* Adjust gap within info column */
    }

    .modern-product .product-features-card,
    .modern-product .product-delivery-card {
        padding: 15px; /* Reduce card padding */
    }

    .modern-product .quote-button {
        padding: 14px 24px; /* Adjust button padding */
        font-size: 15px;
    }
}

/* ---------------------------
   SWIPER FIXES & OVERRIDES
----------------------------*/
/* Ensure Swiper containers work properly with our layout */
.modern-product .product-slider-container {
    position: relative;
    width: 100%;
    max-width: 100%;
    overflow: hidden;
}

.modern-product .product-main-slider.swiper {
    position: relative;
    width: 100% !important; /* Force 100% width */
    max-width: 100% !important; /* Prevent overflow */
    height: auto;
    margin: 0;
    padding: 0;
    overflow: hidden;
    /* Mobile specific fixes */
    box-sizing: border-box;
    /* Critical: ensure container has proper dimensions */
    min-height: 200px;
}

/* Mobile specific container fixes */
@media (max-width: 992px) {
    .modern-product .product-slider-container {
        width: 100%;
        max-width: 100%;
        overflow: hidden;
        position: relative;
    }
    
    .modern-product .product-main-slider.swiper {
        width: 100%;
        max-width: 100%;
        min-width: 0;
        position: relative;
        overflow: hidden;
    }
    
    /* Mobile image container adjustments */
    .modern-product .slide-image-container {
        aspect-ratio: 4/3;
        display: flex;
        align-items: center;
        justify-content: center;
        padding: 15px;
        width: 100%;
        height: auto;
        box-sizing: border-box;
        overflow: hidden;
    }
    
    /* Mobile image sizing */
    .modern-product .slide-image {
        max-width: 100%;
        max-height: 100%;
        width: auto;
        height: auto;
        object-fit: contain;
        border-radius: 8px;
    }
    
    /* Ensure navigation is visible on mobile */
    .modern-product .slider-nav {
        display: flex;
        position: absolute;
        top: 50%;
        transform: translateY(-50%);
        width: 44px;
        height: 44px;
        background: rgba(255, 255, 255, 0.9);
        border: none;
        border-radius: 50%;
        align-items: center;
        justify-content: center;
        cursor: pointer;
        z-index: 10;
        transition: all 0.3s ease;
        color: #111;
        touch-action: manipulation;
    }
    
    .modern-product .slider-nav:hover,
    .modern-product .slider-nav:active {
        background: #fff;
        box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    }
    
    .modern-product .slider-nav.slider-prev {
        left: 16px;
    }
    
    .modern-product .slider-nav.slider-next {
        right: 16px;
    }
    
    /* CSS-only fallback for mobile when Swiper fails */
    .modern-product .product-main-slider.css-fallback {
        overflow: hidden;
        position: relative;
    }
    
    .modern-product .product-main-slider.css-fallback .swiper-wrapper {
        display: flex;
        transition: transform 0.3s ease;
        transform: translateX(0);
    }
    
    .modern-product .product-main-slider.css-fallback .swiper-slide {
        flex: 0 0 100%;
        width: 100%;
        min-width: 100%;
    }
    
    /* Touch-friendly mobile adjustments */
    .modern-product .product-main-slider {
        touch-action: pan-x;
        -webkit-overflow-scrolling: touch;
    }
    
    .modern-product .swiper-wrapper {
        touch-action: pan-x;
    }
    
    .modern-product .swiper-slide {
        touch-action: pan-x;
    }
}

.modern-product .product-main-slider .swiper-wrapper {
    position: relative;
    width: 100%;
    height: auto;
    z-index: 1;
    display: flex !important;
    transition-property: transform;
    box-sizing: border-box;
    /* Ensure slides are side by side */
    flex-wrap: nowrap !important;
}

.modern-product .product-main-slider .swiper-slide {
    flex-shrink: 0 !important;
    width: 100% !important;
    max-width: 100% !important;
    height: auto !important;
    position: relative !important;
    transition-property: transform !important;
    box-sizing: border-box !important;
    /* Critical: slides should be positioned side by side for swiping */
    flex-basis: 100% !important;
    flex-grow: 0 !important;
    /* Ensure slides are displayed properly */
    display: block !important;
    float: none !important;
    margin: 0 !important;
    /* Each slide should take full visible width but allow horizontal scrolling */
    min-width: 100% !important;
}

/* Mobile-specific Swiper wrapper fixes */
@media (max-width: 992px) {
    .modern-product .product-main-slider .swiper-slide {
        width: 100% !important;
        max-width: 100% !important;
        min-width: 100% !important;
        flex-basis: 100% !important;
        flex-grow: 0 !important;
        flex-shrink: 0 !important;
    }
    
    .modern-product .product-main-slider .swiper-wrapper {
        /* Critical: wrapper should be wide enough to contain all slides side by side */
        width: auto !important;
        max-width: none !important;
        /* Let Swiper handle the transform for slide positioning */
        transform: translate3d(0px, 0, 0);
        /* Ensure slides are laid out horizontally */
        display: flex !important;
        flex-direction: row !important;
        flex-wrap: nowrap !important;
    }
    
    /* Ensure container allows horizontal overflow for swiping */
    .modern-product .product-main-slider.swiper {
        overflow: hidden !important;
        width: 100% !important;
        max-width: 100% !important;
    }
}

.modern-product .product-main-slider .swiper-pagination {
    bottom: 16px;
}

.modern-product .product-main-slider .swiper-pagination .swiper-pagination-bullet {
    background: rgba(255, 255, 255, 0.7);
    opacity: 1;
}

.modern-product .product-main-slider .swiper-pagination .swiper-pagination-bullet.swiper-pagination-bullet-active {
    background: #397052;
}

.modern-product .product-thumb-slider.swiper {
    position: relative;
    width: 100%;
    height: auto;
    margin: 16px 0 0 0;
    padding: 0;
    overflow: hidden;
    display: block; /* Ensure it's visible */
}

.modern-product .product-thumb-slider .swiper-wrapper {
    position: relative;
    width: 100%;
    height: auto;
    z-index: 1;
    display: flex;
    transition-property: transform;
    box-sizing: content-box;
}

.modern-product .product-thumb-slider .swiper-slide {
    flex-shrink: 0;
    width: auto;
    height: auto;
    position: relative;
    transition-property: transform;
    margin-right: 10px;
    cursor: pointer; /* Make it clear they're clickable */
}

.modern-product .product-thumb-slider .swiper-slide:last-child {
    margin-right: 0;
}

/* Ensure thumbnails are visible on desktop */
@media (min-width: 993px) {
    .modern-product .product-thumb-slider {
        display: block !important;
        visibility: visible !important;
        opacity: 1 !important;
    }
    
    .modern-product .product-thumb-slider .swiper-slide {
        width: calc(25% - 7.5px) !important; /* 4 thumbnails per row with gaps */
        flex: 0 0 calc(25% - 7.5px) !important;
    }
}

/* Hide thumbnails on mobile */
@media (max-width: 992px) {
    .modern-product .product-thumb-slider {
        display: none !important;
    }
}

/* Fix for navigation buttons */
.modern-product .slider-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 44px;
    height: 44px;
    background: rgba(255, 255, 255, 0.9);
    border: none;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 10;
    transition: all 0.3s ease;
    color: #111;
}

.modern-product .slider-nav:hover {
    background: #fff;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.modern-product .slider-nav.slider-prev {
    left: 16px;
}

.modern-product .slider-nav.slider-next {
    right: 16px;
}

/* Fix for pagination */
.modern-product .swiper-pagination {
    position: absolute;
    bottom: 16px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 10;
}

.modern-product .swiper-pagination .swiper-pagination-bullet {
    background: rgba(255, 255, 255, 0.7);
    opacity: 1;
    margin: 0 4px;
}

.modern-product .swiper-pagination .swiper-pagination-bullet.swiper-pagination-bullet-active {
    background: #397052;
}

/* Ensure proper display for all Swiper elements */
.modern-product .swiper,
.modern-product .swiper-wrapper,
.modern-product .swiper-slide {
    display: block;
    visibility: visible;
    opacity: 1;
}

/* Override any conflicting flex styles specifically for Swiper */
.modern-product .swiper {
    display: block;
}

.modern-product .swiper-wrapper {
    display: flex;
}

.modern-product .swiper-slide {
    display: block;
}

/* ---------------------------
   POPUP FORM STYLES (.popup-form)
----------------------------*/
/* Popup overlay - hidden by default, shown with .open class */
.popup-form {
    position: fixed !important;
    top: 0 !important;
    left: 0 !important;
    right: 0 !important;
    bottom: 0 !important;
    width: 100vw !important;
    height: 100vh !important;
    z-index: 99999 !important;
    background: rgba(0, 0, 0, 0.7) !important;
    backdrop-filter: blur(3px);
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    padding: 20px !important;
    box-sizing: border-box !important;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    /* Force viewport centering */
    margin: 0 !important;
    /* Override any parent constraints */
    transform: none !important;
    /* Ensure it covers the entire viewport */
    min-height: 100vh !important;
    min-width: 100vw !important;
}

.popup-form.open {
    opacity: 1 !important;
    visibility: visible !important;
}

/* Popup inner container */
.popup-form__inner {
    position: relative !important;
    background: #fff !important;
    border-radius: 16px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    max-width: 600px;
    width: 100%;
    max-height: 90vh;
    overflow-y: auto;
    padding: 32px;
    box-sizing: border-box;
    transform: scale(0.9);
    transition: transform 0.3s ease;
    /* Perfect centering */
    margin: 0 auto !important;
    display: block !important;
    /* Ensure it's centered in the viewport */
    position: relative !important;
    top: auto !important;
    left: auto !important;
    right: auto !important;
    bottom: auto !important;
}

.popup-form.open .popup-form__inner {
    transform: scale(1) !important;
}

/* Close button */
.popup-form .hide-popup {
    position: absolute;
    top: 16px;
    right: 16px;
    background: #f8f9fa;
    border: 1px solid #e5e7eb;
    font-size: 18px;
    color: #6b7280;
    cursor: pointer;
    padding: 8px;
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
    transition: all 0.2s ease;
    text-decoration: none;
    z-index: 10;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.popup-form .hide-popup:hover {
    background: #e5e7eb;
    color: #374151;
    border-color: #d1d5db;
    transform: scale(1.05);
}

.popup-form .hide-popup::before {
    content: "×";
    font-size: 20px;
    line-height: 1;
    font-weight: 400;
}

/* Form header */
.popup-form h3 {
    margin: 0 0 24px 0;
    font-size: 28px;
    font-weight: 600;
    color: #111;
    padding-right: 50px;
}

/* Product info display */
.quote-product-info {
    background: #f8f9fa;
    padding: 16px 20px;
    border-radius: 12px;
    margin-bottom: 24px;
    font-size: 16px;
    color: #374151;
    border-left: 4px solid #397052;
}

.quote-product-info strong {
    color: #111;
    font-weight: 600;
}

/* Custom Quote Form Styles */
.popup-form .custom-quote-form {
    margin: 0;
}

.popup-form .custom-quote-form p {
    margin-bottom: 24px;
}

.popup-form .custom-quote-form label {
    display: block;
    margin-bottom: 10px;
    font-weight: 600;
    color: #374151;
    font-size: 15px;
    letter-spacing: 0.3px;
}

.popup-form .custom-quote-form input[type="email"],
.popup-form .custom-quote-form input[type="tel"],
.popup-form .custom-quote-form input[type="text"],
.popup-form .custom-quote-form input[type="number"],
.popup-form .custom-quote-form textarea {
    width: 100%;
    padding: 16px 20px;
    border: 2px solid #e5e7eb;
    border-radius: 12px;
    font-size: 16px;
    transition: all 0.3s ease;
    box-sizing: border-box;
    background: #fafbfc;
    font-family: inherit;
    color: #111;
}

.popup-form .custom-quote-form input[type="email"]:focus,
.popup-form .custom-quote-form input[type="tel"]:focus,
.popup-form .custom-quote-form input[type="text"]:focus,
.popup-form .custom-quote-form input[type="number"]:focus,
.popup-form .custom-quote-form textarea:focus {
    outline: none;
    border-color: #397052;
    background: #fff;
    box-shadow: 0 0 0 4px rgba(57, 112, 82, 0.1);
    transform: translateY(-1px);
}

.popup-form .custom-quote-form input::placeholder,
.popup-form .custom-quote-form textarea::placeholder {
    color: #9ca3af;
    opacity: 1;
    font-style: italic;
}

.popup-form .custom-quote-form textarea {
    min-height: 120px;
    resize: vertical;
    font-family: inherit;
    line-height: 1.6;
}

/* Two column layout for width/length fields */
.popup-form .form-row {
    display: flex;
    gap: 20px;
    margin-bottom: 24px;
}

.popup-form .form-row p {
    flex: 1;
    margin-bottom: 0;
}

/* Submit button with modern styling */
.popup-form .custom-quote-form button[type="submit"] {
    background: linear-gradient(135deg, #397052 0%, #2d5a42 100%);
    color: #fff;
    border: none;
    padding: 18px 32px;
    border-radius: 12px;
    font-size: 16px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s ease;
    width: 100%;
    margin-top: 12px;
    position: relative;
    overflow: hidden;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.popup-form .custom-quote-form button[type="submit"]:hover {
    background: linear-gradient(135deg, #2d5a42 0%, #1f3d2f 100%);
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(57, 112, 82, 0.4);
}

.popup-form .custom-quote-form button[type="submit"]:active {
    transform: translateY(0);
    box-shadow: 0 4px 15px rgba(57, 112, 82, 0.3);
}

.popup-form .custom-quote-form button[type="submit"]:disabled {
    opacity: 0.7;
    cursor: not-allowed;
    transform: none !important;
    box-shadow: none !important;
}

/* Form response messages */
.popup-form .form-message {
    margin-bottom: 24px;
    padding: 18px 24px;
    border-radius: 12px;
    font-size: 15px;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 12px;
    animation: slideIn 0.3s ease;
}

.popup-form .form-message.success {
    background: linear-gradient(135deg, #f0fdf4 0%, #dcfce7 100%);
    border: 2px solid #bbf7d0;
    color: #166534;
}

.popup-form .form-message.error {
    background: linear-gradient(135deg, #fef2f2 0%, #fee2e2 100%);
    border: 2px solid #fecaca;
    color: #dc2626;
}

@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Enhanced input styling */
.popup-form .custom-quote-form input[type="email"],
.popup-form .custom-quote-form input[type="tel"],
.popup-form .custom-quote-form input[type="text"],
.popup-form .custom-quote-form input[type="number"] {
    position: relative;
}

.popup-form .custom-quote-form input[type="email"]:hover,
.popup-form .custom-quote-form input[type="tel"]:hover,
.popup-form .custom-quote-form input[type="text"]:hover,
.popup-form .custom-quote-form input[type="number"]:hover,
.popup-form .custom-quote-form textarea:hover {
    border-color: #d1d5db;
    background: #fff;
}

/* Required field indicator */
.popup-form .custom-quote-form label[for="quote-email"]::after {
    content: " *";
    color: #dc2626;
    font-weight: 700;
}

/* Form sections styling */
.popup-form .quote-product-info {
    background: linear-gradient(135deg, #f8f9fa 0%, #ecf7f1 100%);
    padding: 20px 24px;
    border-radius: 12px;
    margin-bottom: 28px;
    font-size: 16px;
    color: #374151;
    border-left: 5px solid #397052;
    box-shadow: 0 2px 8px rgba(57, 112, 82, 0.1);
}

.popup-form .quote-product-info strong {
    color: #397052;
    font-weight: 700;
}

/* Enhanced popup styling */
.popup-form__inner {
    position: relative !important;
    background: linear-gradient(135deg, #fff 0%, #fafbfc 100%);
    border-radius: 20px;
    box-shadow: 0 25px 80px rgba(0, 0, 0, 0.3);
    max-width: 650px;
    width: 100%;
    max-height: 90vh;
    overflow-y: auto;
    padding: 40px;
    box-sizing: border-box;
    transform: scale(0.9);
    transition: transform 0.3s ease;
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.popup-form.open .popup-form__inner {
    transform: scale(1) !important;
}


/* Enhanced form title */
.popup-form h3 {
    margin: 0 0 32px 0;
    font-size: 32px;
    font-weight: 700;
    color: #111;
    padding-right: 60px;
    background: linear-gradient(135deg, #397052 0%, #2d5a42 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    letter-spacing: -0.5px;
}

/* ---------------------------
   STICKY FLOATING QUOTE BUTTON
----------------------------*/
.sticky-quote-button {
    position: fixed;
    bottom: 30px;
    right: 30px;
    z-index: 1000;
    background: linear-gradient(135deg, #397052 0%, #2d5a42 100%);
    color: #fff;
    border: none;
    border-radius: 50px;
    padding: 16px 24px;
    font-size: 16px;
    font-weight: 700;
    cursor: pointer;
    box-shadow: 0 8px 32px rgba(57, 112, 82, 0.4);
    transition: all 0.3s ease;
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 12px;
    animation: pulse 2s infinite;
    min-width: 200px;
    justify-content: center;
}

.sticky-quote-button:hover {
    background: linear-gradient(135deg, #2d5a42 0%, #1f3d2f 100%);
    transform: translateY(-3px) scale(1.05);
    box-shadow: 0 12px 40px rgba(57, 112, 82, 0.5);
    animation: none;
}

.sticky-quote-button:active {
    transform: translateY(-1px) scale(1.02);
}

.sticky-quote-button .button-icon {
    display: flex;
    align-items: center;
    transition: transform 0.3s ease;
}

.sticky-quote-button:hover .button-icon {
    transform: translateX(4px);
}

@keyframes pulse {
    0% {
        box-shadow: 0 8px 32px rgba(57, 112, 82, 0.4);
    }
    50% {
        box-shadow: 0 8px 32px rgba(57, 112, 82, 0.6);
    }
    100% {
        box-shadow: 0 8px 32px rgba(57, 112, 82, 0.4);
    }
}

/* Hide sticky button when popup is open */
.popup-form.open ~ .sticky-quote-button {
    opacity: 0;
    visibility: hidden;
    transform: translateY(20px) scale(0.8);
}

/* Mobile sticky button */
@media (max-width: 768px) {
    .sticky-quote-button {
        bottom: 20px;
        right: 20px;
        left: 20px;
        border-radius: 16px;
        padding: 18px 24px;
        font-size: 15px;
        min-width: auto;
        width: auto;
    }
}

@media (max-width: 480px) {
    .sticky-quote-button {
        bottom: 15px;
        right: 15px;
        left: 15px;
        padding: 16px 20px;
        font-size: 14px;
    }
}

/* Alternative: Sticky CTA bar at bottom */
.sticky-cta-bar {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(135deg, #fff 0%, #f8f9fa 100%);
    border-top: 2px solid #e5e7eb;
    padding: 16px 20px;
    z-index: 1000;
    box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.1);
    backdrop-filter: blur(10px);
    display: none; /* Hidden by default, can be enabled */
}

.sticky-cta-bar .cta-content {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
}

.sticky-cta-bar .cta-info {
    flex: 1;
}

.sticky-cta-bar .cta-info .product-name {
    font-size: 18px;
    font-weight: 600;
    color: #111;
    margin: 0 0 4px 0;
}

.sticky-cta-bar .cta-info .cta-text {
    font-size: 14px;
    color: #6b7280;
    margin: 0;
}

.sticky-cta-bar .cta-button {
    background: linear-gradient(135deg, #397052 0%, #2d5a42 100%);
    color: #fff;
    border: none;
    padding: 14px 28px;
    border-radius: 12px;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 8px;
    white-space: nowrap;
}

.sticky-cta-bar .cta-button:hover {
    background: linear-gradient(135deg, #2d5a42 0%, #1f3d2f 100%);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(57, 112, 82, 0.4);
}

@media (max-width: 768px) {
    .sticky-cta-bar .cta-content {
        flex-direction: column;
        gap: 12px;
        text-align: center;
    }
    
    .sticky-cta-bar .cta-button {
        width: 100%;
        justify-content: center;
    }
}

/* Mobile responsiveness */
@media (max-width: 768px) {
    .popup-form {
        padding: 15px;
        /* Enhanced mobile centering */
        align-items: center;
        justify-content: center;
        display: flex !important;
    }
    
    .popup-form__inner {
        max-height: 95vh;
        padding: 24px 20px;
        /* Ensure proper centering on mobile */
        margin: auto;
        align-self: center;
    }
    
    .popup-form h3 {
        font-size: 24px;
        margin-bottom: 20px;
    }
    
    .popup-form .form-row {
        flex-direction: column;
        gap: 0;
    }
    
    .popup-form .form-row p {
        margin-bottom: 20px;
    }
    
    .popup-form .wpcf7-text,
    .popup-form .wpcf7-email,
    .popup-form .wpcf7-tel,
    .popup-form .wpcf7-number,
    .popup-form .wpcf7-textarea,
    .popup-form .wpcf7-select {
        padding: 12px 14px;
        font-size: 16px; /* Prevent zoom on iOS */
    }
}

@media (max-width: 480px) {
    .popup-form {
        padding: 10px;
        /* Enhanced small screen centering */
        min-height: 100vh;
        min-height: 100dvh; /* Dynamic viewport height for mobile browsers */
        align-items: center;
        justify-content: center;
    }
    
    .popup-form__inner {
        padding: 20px 16px;
        border-radius: 12px;
        /* Perfect centering for small screens */
        margin: auto;
        align-self: center;
        justify-self: center;
    }
    
    .popup-form h3 {
        font-size: 22px;
    }
    
    .popup-form .hide-popup {
        top: 12px;
        right: 12px;
        width: 36px;
        height: 36px;
    }
}

/* Ensure form fits on smaller screens */
@media (max-height: 600px) {
    .popup-form {
        /* Enhanced centering for short screens */
        align-items: flex-start;
        padding-top: 20px;
        padding-bottom: 20px;
    }
    
    .popup-form__inner {
        max-height: 95vh;
        padding: 20px;
        /* Maintain centering even on short screens */
        margin: auto;
    }
    
    .popup-form h3 {
        font-size: 22px;
        margin-bottom: 16px;
    }
    
    .popup-form .wpcf7-form p {
        margin-bottom: 16px;
    }
    
    .quote-product-info {
        padding: 12px 16px;
        margin-bottom: 16px;
    }
}

/* Additional centering fixes for edge cases */
@media (max-width: 320px) {
    .popup-form {
        padding: 8px;
    }
    
    .popup-form__inner {
        padding: 16px 12px;
        /* Ultra-small screen centering */
        margin: auto;
        width: calc(100% - 16px);
        max-width: none;
    }
}

/* Landscape mobile orientation */
@media (max-width: 768px) and (orientation: landscape) {
    .popup-form {
        align-items: flex-start;
        padding-top: 10px;
        padding-bottom: 10px;
    }
    
    .popup-form__inner {
        max-height: 90vh;
        /* Landscape centering */
        margin: auto;
    }
}

/* High DPI screens centering enhancement */
@media (-webkit-min-device-pixel-ratio: 2), (min-resolution: 192dpi) {
    .popup-form {
        /* Enhanced centering for retina displays */
        display: flex !important;
        align-items: center !important;
        justify-content: center !important;
    }
    
    .popup-form__inner {
        /* Pixel-perfect centering on high DPI */
        margin: auto !important;
    }
}

/* ---------------------------
   ABSOLUTE VIEWPORT CENTERING
----------------------------*/
/* Force absolute centering regardless of page layout */
.popup-form {
    /* Override any possible parent positioning */
    position: fixed !important;
    top: 0 !important;
    left: 0 !important;
    right: 0 !important;
    bottom: 0 !important;
    width: 100vw !important;
    height: 100vh !important;
    /* Force flexbox centering */
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    /* Reset any transforms that might affect positioning */
    transform: none !important;
    /* Ensure it's above everything including headers */
    z-index: 999999 !important;
    /* Remove any margins that could offset centering */
    margin: 0 !important;
    padding: 20px !important;
    box-sizing: border-box !important;
    /* Force full viewport coverage */
    min-height: 100vh !important;
    min-width: 100vw !important;
    /* Override any parent constraints */
    position: fixed !important;
}

/* Ensure the inner container is properly centered */
.popup-form__inner {
    /* Reset positioning to allow flexbox to center it */
    position: relative !important;
    /* Center within the flex container */
    margin: 0 !important;
    /* Ensure it doesn't exceed viewport */
    max-width: min(600px, calc(100vw - 40px)) !important;
    max-height: min(90vh, calc(100vh - 40px)) !important;
    /* Ensure proper display */
    display: block !important;
    /* Remove any transforms that might affect centering */
    transform: scale(0.9) !important;
    transition: transform 0.3s ease !important;
    /* Force centering */
    flex-shrink: 0 !important;
}

.popup-form.open .popup-form__inner {
    transform: scale(1) !important;
}

/* Override any theme or plugin styles that might interfere */
body.popup-open {
    overflow: hidden !important;
    position: relative !important;
}

.popup-form * {
    box-sizing: border-box !important;
}

/* Ensure centering works even with CSS Grid or Flexbox parents */
.popup-form {
    grid-column: 1 / -1 !important;
    grid-row: 1 / -1 !important;
    flex: none !important;
    align-self: stretch !important;
    justify-self: stretch !important;
}

/* Force popup to be above all WordPress elements */
.popup-form {
    z-index: 999999 !important;
}

/* Override WordPress admin bar if present */
html.wp-toolbar .popup-form {
    top: 0 !important;
}

/* Override any sticky headers or navigation */
.popup-form {
    position: fixed !important;
    top: 0 !important;
    left: 0 !important;
    width: 100vw !important;
    height: 100vh !important;
}

/* Ensure perfect centering on all devices */
@media screen {
    .popup-form {
        position: fixed !important;
        top: 0 !important;
        left: 0 !important;
        right: 0 !important;
        bottom: 0 !important;
        width: 100vw !important;
        height: 100vh !important;
        display: flex !important;
        align-items: center !important;
        justify-content: center !important;
        z-index: 999999 !important;
    }
}

/* ---------------------------
   ULTIMATE CENTERING OVERRIDE
----------------------------*/
/* Nuclear option - force absolute centering */
.popup-form.open {
    position: fixed !important;
    top: 0 !important;
    left: 0 !important;
    right: 0 !important;
    bottom: 0 !important;
    width: 100vw !important;
    height: 100vh !important;
    margin: 0 !important;
    padding: 0 !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    z-index: 2147483647 !important; /* Maximum z-index value */
    background: rgba(0, 0, 0, 0.7) !important;
    backdrop-filter: blur(3px) !important;
    opacity: 1 !important;
    visibility: visible !important;
    /* Override any possible interference */
    transform: none !important;
    clip: auto !important;
    clip-path: none !important;
    overflow: visible !important;
    /* Force viewport units */
    min-height: 100vh !important;
    max-height: 100vh !important;
    min-width: 100vw !important;
    max-width: 100vw !important;
    /* Force above all headers and navigation */
    isolation: isolate !important;
    contain: none !important;
}

/* Override any header z-index */
.site-header,
#masthead,
header,
nav,
.navbar,
.navigation,
.site-navigation,
.main-navigation {
    z-index: 999 !important;
}

/* Ensure popup is above header */
.popup-form.open {
    z-index: 999999 !important;
}

/* Force inner container to be properly centered */
.popup-form.open .popup-form__inner {
    position: relative !important;
    margin: 0 auto !important;
    padding: 40px !important;
    max-width: 600px !important;
    width: calc(100% - 40px) !important;
    max-height: calc(100vh - 40px) !important;
    background: #fff !important;
    border-radius: 20px !important;
    box-shadow: 0 25px 80px rgba(0, 0, 0, 0.3) !important;
    transform: scale(1) !important;
    transition: transform 0.3s ease !important;
    overflow-y: auto !important;
    box-sizing: border-box !important;
    /* Center within flex container */
    flex-shrink: 0 !important;
    align-self: center !important;
    justify-self: center !important;
}

/* Override any body/html constraints */
body.popup-open,
html.popup-open {
    overflow: hidden !important;
    height: 100% !important;
    width: 100% !important;
    margin: 0 !important;
    padding: 0 !important;
}

/* Force popup above everything */
.popup-form.open {
    z-index: 2147483647 !important;
}

/* Override WordPress admin bar */
.admin-bar .popup-form.open {
    top: 0 !important;
}

/* Override any theme containers */
.popup-form.open {
    position: fixed !important;
    inset: 0 !important;
}

/* Ensure no parent can constrain the popup */
* .popup-form.open {
    position: fixed !important;
    top: 0 !important;
    left: 0 !important;
    right: 0 !important;
    bottom: 0 !important;
}

/* Mobile specific overrides */
@media (max-width: 768px) {
    .popup-form.open {
        position: fixed !important;
        top: 0 !important;
        left: 0 !important;
        right: 0 !important;
        bottom: 0 !important;
        width: 100vw !important;
        height: 100vh !important;
        padding: 15px !important;
        display: flex !important;
        align-items: center !important;
        justify-content: center !important;
    }
    
    .popup-form.open .popup-form__inner {
        width: calc(100% - 30px) !important;
        max-height: calc(100vh - 30px) !important;
        padding: 24px 20px !important;
        margin: 0 auto !important;
    }
}

/* Small mobile screens */
@media (max-width: 480px) {
    .popup-form.open {
        padding: 10px !important;
    }
    
    .popup-form.open .popup-form__inner {
        width: calc(100% - 20px) !important;
        max-height: calc(100vh - 20px) !important;
        padding: 20px 16px !important;
        border-radius: 12px !important;
    }
}

/* Landscape orientation */
@media (orientation: landscape) and (max-height: 600px) {
    .popup-form.open .popup-form__inner {
        max-height: calc(100vh - 20px) !important;
        padding: 15px !important;
    }
}