/* --- General Styling --- */
@import url('https://fonts.googleapis.com/css2?family=Roboto:wght@400;500;700&display=swap');

body {
    font-family: 'Roboto', sans-serif;
    background-color: #f4f5f7;
}
.input-container{
    position: relative;
}
/* --- Product Page Layout --- */
.product-section-container {
    width: 80%;
    max-width: 1600px; /* Add a max-width for very large screens */
    margin: 40px auto;
}

.product-section-container .row {
    --bs-gutter-x: 3rem; /* Increase space between gallery and form */
}

@media (max-width: 1400px) {
    .product-section-container {
        width: 90%;
    }
}

@media (max-width: 991.98px) {
    .product-section-container {
        width: 95%;
        margin: 20px auto;
    }
    .product-section-container .row {
        --bs-gutter-x: 1.5rem;
    }
    .nexeo-order-form {
        margin-top: 30px;
    }
}

/* --- Gallery Styling --- */
.nexeo-gallery {
    background-color: white;
    border-radius: 12px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.05);
}

.main-image-container {
    position: relative;
    border-radius: 8px;
    overflow: hidden;
    margin-bottom: 15px;
    background-color: #f8f9fa;
}

#main-gallery-image {
    width: 100%;
    height: auto;
    display: block;
    aspect-ratio: 1/1;
    object-fit: cover;
    transition: opacity 0.3s ease;
}

#main-gallery-image.loading {
    opacity: 0.7;
}

#main-gallery-video {
    width: 100%;
    height: auto;
    display: block;
    aspect-ratio: 1/1;
    object-fit: cover;
    transition: opacity 0.3s ease;
}

/* Glassmorphism Video Play Overlay */
.main-video-play-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    background: rgba(0, 0, 0, 0.1);
    backdrop-filter: blur(5px);
    -webkit-backdrop-filter: blur(5px);
    opacity: 1;
    transition: all 0.3s ease;
    cursor: pointer;
    z-index: 5;
}

.main-video-play-overlay:hover {
    background: rgba(0, 0, 0, 0.05);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
}

.main-video-play-overlay.playing {
    opacity: 0;
    pointer-events: none;
}

.glass-play-button {
    background: rgba(255, 255, 255, 0.25);
    backdrop-filter: blur(15px);
    -webkit-backdrop-filter: blur(15px);
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    width: 80px;
    height: 80px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 16px;
    transition: all 0.3s ease;
    box-shadow: 
        0 8px 32px rgba(0, 0, 0, 0.1),
        inset 0 1px 0 rgba(255, 255, 255, 0.5),
        inset 0 -1px 0 rgba(0, 0, 0, 0.1);
}

.glass-play-button:hover {
    background: rgba(255, 255, 255, 0.35);
    transform: scale(1.1);
    box-shadow: 
        0 12px 48px rgba(0, 0, 0, 0.15),
        inset 0 1px 0 rgba(255, 255, 255, 0.6),
        inset 0 -1px 0 rgba(0, 0, 0, 0.1);
}

.glass-play-button:active {
    transform: scale(1.05);
}

.glass-play-button i {
    font-size: 28px;
    color: #ffffff;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
    margin-left: 3px; /* Adjust play icon position */
}

.glass-play-button #main-pause-icon {
    margin-left: 0; /* No adjustment needed for pause icon */
}

.video-info {
    text-align: center;
}

.video-label {
    background: rgba(255, 255, 255, 0.2);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 20px;
    padding: 8px 16px;
    color: #ffffff;
    font-size: 14px;
    font-weight: 500;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
    box-shadow: 
        0 4px 16px rgba(0, 0, 0, 0.1),
        inset 0 1px 0 rgba(255, 255, 255, 0.3);
    transition: all 0.3s ease;
}

.main-video-play-overlay:hover .video-label {
    background: rgba(255, 255, 255, 0.25);
    transform: translateY(-2px);
}

/* Hide overlay when video is playing */
.main-video-play-overlay.video-playing {
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.5s ease;
}

/* Animation for play button appearance */
@keyframes playButtonAppear {
    0% {
        opacity: 0;
        transform: scale(0.8);
    }
    100% {
        opacity: 1;
        transform: scale(1);
    }
}

.main-video-play-overlay.show {
    animation: playButtonAppear 0.3s ease forwards;
}

/* Responsive design for video overlay */
@media (max-width: 768px) {
    .glass-play-button {
        width: 60px;
        height: 60px;
        margin-bottom: 12px;
    }
    
    .glass-play-button i {
        font-size: 20px;
    }
    
    .video-label {
        font-size: 12px;
        padding: 6px 12px;
    }
}

@media (max-width: 480px) {
    .glass-play-button {
        width: 50px;
        height: 50px;
        margin-bottom: 10px;
    }
    
    .glass-play-button i {
        font-size: 16px;
    }
    
    .video-label {
        font-size: 11px;
        padding: 5px 10px;
    }
}

/* Accessibility improvements */
@media (prefers-reduced-motion: reduce) {
    .glass-play-button,
    .main-video-play-overlay,
    .video-label {
        transition: none;
        animation: none;
    }
}

/* High contrast mode support */
@media (prefers-contrast: high) {
    .glass-play-button {
        background: rgba(255, 255, 255, 0.9);
        border: 2px solid #000;
    }
    
    .glass-play-button i {
        color: #000;
        text-shadow: none;
    }
    
    .video-label {
        background: rgba(255, 255, 255, 0.9);
        color: #000;
        border: 1px solid #000;
        text-shadow: none;
    }
}

.nav-arrow {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background-color: rgba(255, 255, 255, 0.9);
    border: none;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    font-size: 18px;
    cursor: pointer;
    transition: all 0.3s ease;
    z-index: 10;
    box-shadow: 0 2px 8px rgba(0,0,0,0.15);
}

.nav-arrow:hover {
    background-color: white;
    transform: translateY(-50%) scale(1.1);
}

.nav-arrow:active {
    transform: translateY(-50%) scale(0.95);
}

.nav-arrow.prev { left: 10px; }
.nav-arrow.next { right: 10px; }

.thumbnail-scroller {
    overflow-x: auto;
    padding-bottom: 10px;
}

.thumbnail-list {
    display: flex;
    gap: 10px;
    min-height: 80px;
}

.thumbnail-item {
    flex: 0 0 80px;
    width: 80px;
    height: 80px;
    cursor: pointer;
    border: 2px solid transparent;
    border-radius: 8px;
    overflow: hidden;
    transition: all 0.3s ease;
    background-color: #f8f9fa;
}

.thumbnail-item:hover {
    border-color: #007bff;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0,123,255,0.2);
}

.thumbnail-item.active {
    border-color: #007bff;
    box-shadow: 0 0 0 2px rgba(0,123,255,0.2);
}

.thumbnail-item img,
.thumbnail-item video {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: opacity 0.3s ease;
}

.thumbnail-item:hover img,
.thumbnail-item:hover video {
    opacity: 0.8;
}

/* Video overlay for thumbnails */
.thumbnail-item {
    position: relative;
}

.thumbnail-item .video-overlay {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: rgba(0, 0, 0, 0.7);
    color: white;
    border-radius: 50%;
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    pointer-events: none;
    z-index: 1;
}

/* Main container loading state */
.main-image-container.loading::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 40px;
    height: 40px;
    border: 3px solid #f3f3f3;
    border-top: 3px solid #007bff;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    z-index: 2;
}

@keyframes spin {
    0% { transform: translate(-50%, -50%) rotate(0deg); }
    100% { transform: translate(-50%, -50%) rotate(360deg); }
}

.no-images-message {
    padding: 40px 20px;
    text-align: center;
    color: #6c757d;
    font-style: italic;
}

.no-images-message i {
    font-size: 48px;
    margin-bottom: 16px;
    opacity: 0.5;
}

/* Single image styling */
.nexeo-gallery:not(.multi-image) .thumbnail-scroller {
    display: none;
}

.nexeo-gallery:not(.multi-image) .main-image-container {
    margin-bottom: 0;
}

/* Loading states */
.gallery-loading {
    position: relative;
}

.gallery-loading::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 40px;
    height: 40px;
    border: 4px solid #f3f3f3;
    border-top: 4px solid #007bff;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    z-index: 100;
}

@keyframes spin {
    0% { transform: translate(-50%, -50%) rotate(0deg); }
    100% { transform: translate(-50%, -50%) rotate(360deg); }
}

/* Responsive design */
@media (max-width: 768px) {
    .nexeo-gallery {
        padding: 15px;
    }
    
    .nav-arrow {
        width: 35px;
        height: 35px;
        font-size: 16px;
    }
    
    .thumbnail-item {
        flex: 0 0 70px;
        width: 70px;
        height: 70px;
    }
}

/* --- Order Form Styling --- */
.nexeo-order-form {
    padding: 24px;
    background-color: white;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -2px rgba(0, 0, 0, 0.1);
}

.form-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 8px;
}

.product-title {
    font-size: 1.5rem; /* 24px */
    font-weight: 700;
    margin: 0;
}

.discount-badge {
    background-color: #fef2f2;
    color: #ef4444;
    padding: 4px 10px;
    border-radius: 9999px;
    font-size: 0.875rem; /* 14px */
    font-weight: 500;
}

.price-section {
    margin-bottom: 8px;
    display: flex;
    align-items: baseline;
    gap: 8px;
}

.current-price {
    font-size: 2.25rem; /* 36px */
    font-weight: 700;
    color: #111827;
}

.original-price {
    font-size: 1rem; /* 16px */
    text-decoration: line-through;
    color: #ef4444;
}

.product-short-description {
    color: #4b5563;
    margin-bottom: 16px;
    font-size: 1rem;
}

.variant-options .options-label {
    margin-bottom: 8px;
    font-weight: 500;
    color: #374151;
    font-size: 0.875rem;
}

.variant-options .btn-group-toggle {
    display: flex;
    gap: 10px;
    margin-bottom: 16px;
        flex-wrap: wrap;
}

.variant-options .btn-group-toggle .btn-variant {
    background-color: #f9fafb;
    border: 1px solid #d1d5db;
    border-radius: 8px;
    color: #374151;
    font-weight: 500;
    padding: 10px 16px;
    flex-grow: 1;
    text-align: center;
    cursor: pointer;
    transition: all 0.2s ease-in-out;
}

.variant-options .btn-group-toggle .btn-variant:hover {
    background-color: #f3f4f6;
    border-color: #9ca3af;
}

.variant-options .btn-group-toggle .btn-variant.active {
    background-color: #111827;
    color: #ffffff;
    border-color: #111827;
    box-shadow: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
}

.variant-options .btn-group-toggle .btn-variant input {
    display: none;
}

.cart-controls {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 24px;
}

/* Hidden quantity selector styling */
.nexeo-order-form:has(.cart-controls:not(:empty)) {
    /* Normal spacing when cart-controls is visible */
}

.nexeo-order-form:not(:has(.cart-controls)) .variant-options,
.nexeo-order-form .variant-options:last-child {
    /* Add extra margin when cart-controls is hidden */
    margin-bottom: 24px;
}

.quantity-selector {
    display: flex;
    align-items: center;
    border: 1px solid #d1d5db;
    border-radius: 8px;
}

.btn-quantity {
    background-color: transparent;
    border: none;
    font-size: 1.25rem;
    font-weight: 400;
    padding: 4px 12px;
    cursor: pointer;
    color: #6b7280;
}

.btn-quantity:hover {
    color: #111827;
}

.quantity-input {
    border: none;
    text-align: center;
    width: 40px;
    font-weight: 500;
    font-size: 1rem;
}

.quantity-input:focus {
    outline: none;
}

.add-another-item-link {
    font-size: 0.875rem;
    font-weight: 500;
    color: #374151;
    text-decoration: none;
}

.add-another-item-link:hover {
    text-decoration: underline;
}

.contact-info-form .form-row {
    display: flex;
    flex-wrap: wrap;
    margin-right: -8px;
    margin-left: -8px;
    margin-bottom: 16px;
}

.contact-info-form .form-group {
    flex: 1 1 0%;
    position: relative;
    padding-right: 8px;
    padding-left: 8px;
}

/* Ensure two columns on medium screens and up */
@media (min-width: 768px) {
    .contact-info-form .form-group {
        flex-basis: 50%;
        max-width: 50%;
    }
}

.contact-info-form .form-control {
    width: 100%;
    padding: 12px;
    border: 1px solid #d1d5db;
    border-radius: 8px;
    font-size: 1rem;
}

.contact-info-form .form-control:focus {
    border-color: #3b82f6;
    box-shadow: 0 0 0 1px #3b82f6;
    outline: none;
}

.contact-info-form .input-group-icon {
    position: relative;
    margin-bottom: 16px;
}

.contact-info-form .input-group-icon .form-control {
    padding-left: 40px;
}

.contact-info-form .input-group-icon i {
    position: absolute;
    left: 12px;
    top: 50%;
    transform: translateY(-50%);
    color: #9ca3af;
}

.btn-buy {
    width: 100%;
    padding: 14px;
    background-color: #111827;
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 700;
    cursor: pointer;
    transition: background-color 0.2s ease-in-out;
}

.btn-buy:hover {
    background-color: #374151;
}

/* --- Sticky Buy Bar --- */
.sticky-buy-bar {
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    background-color: rgba(255, 255, 255, 0.95);
    padding: 1rem;
    box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.1);
    z-index: 1000;
    transform: translateY(110%);
    transition: transform 0.3s ease-in-out;
    -webkit-backdrop-filter: blur(5px);
    backdrop-filter: blur(5px);
}

.sticky-buy-bar.visible {
    transform: translateY(0);
}

.sticky-buy-bar .btn-buy {
    max-width: 480px;
    margin: 0 auto;
    display: block;
}

/* --- Order Summary --- */
.order-summary-container {
    margin-top: 24px;
    padding-top: 24px;
    border-top: 1px solid #e5e7eb;
}

.summary-title {
    font-size: 1.125rem; /* 18px */
    font-weight: 600;
    margin-bottom: 16px;
    color: #374151;
}

.summary-box {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.summary-item {
    display: flex;
    justify-content: space-between;
    font-size: 1rem;
    color: #4b5563;
}

.summary-item span:last-child {
    font-weight: 500;
    color: #111827;
}

.summary-item.summary-total {
    font-size: 1.25rem; /* 20px */
    font-weight: 700;
    padding-top: 16px;
    margin-top: 4px;
    border-top: 1px dashed #d1d5db;
}

.summary-item.summary-total span {
    color: #111827;
}

/* Make labels visible */
.form-label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 500;
    color: #374151;
}

@media (max-width: 480px) {
    .contact-info-form .form-row {
        flex-direction: column;
        gap: 0;
        margin-right: 0;
        margin-left: 0;
    }
    .contact-info-form .form-row .form-group {
        margin-bottom: 16px;
        padding-right: 0;
        padding-left: 0;
        width: 100%;
    }
    .contact-info-form .form-row .form-group:last-child {
        margin-bottom: 0;
    }
}

/* 
  ICONS: Custom icon fonts have been disabled in this file.
  To use custom icons, use Font Awesome or other CDN-based icon libraries instead.
*/ 

/* Bilingual validation messages */
.invalid-feedback {
    display: none;
    width: 100%;
    margin-top: 0.25rem;
    font-size: 0.875em;
    color: #dc3545;
}

.invalid-feedback.d-block {
    display: block !important;
}

.invalid-feedback .lang-fr {
    margin-right: 10px;
}

.invalid-feedback .lang-ar {
    direction: rtl;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif, Arial;
}

.is-invalid {
    border-color: #dc3545 !important;
}

.is-valid {
    border-color: #28a745 !important;
}

/* Sticky button tooltip for validation */
.validation-tooltip {
    position: absolute;
    bottom: 100%;
    left: 50%;
    transform: translateX(-50%) translateY(-10px);
    background: #212529;
    color: white;
    padding: 0.75rem 1rem;
    border-radius: 0.5rem;
    font-size: 0.875rem;
    white-space: nowrap;
    opacity: 0;
    transition: opacity 0.3s ease;
    z-index: 1000;
    max-width: 90vw;
    text-align: center;
}

.validation-tooltip.visible {
    opacity: 1;
}

.validation-tooltip::after {
    content: '';
    position: absolute;
    top: 100%;
    left: 50%;
    transform: translateX(-50%);
    width: 0;
    height: 0;
    border-left: 8px solid transparent;
    border-right: 8px solid transparent;
    border-top: 8px solid #212529;
}

.validation-tooltip .lang-ar {
    display: block;
    margin-top: 0.5rem;
    direction: rtl;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif, Arial;
}

/* Mobile CTA bar positioning fix */
.mobile-cta-bar {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(to bottom, rgba(255,255,255,0) 0%, rgba(255,255,255,0.9) 20%, white 30%);
    padding: 1rem;
    box-shadow: 0 -2px 10px rgba(0,0,0,0.1);
    z-index: 1000;
    transform: translateY(100%);
    transition: transform 0.3s ease;
}

.mobile-cta-bar .cta-button {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    padding: 1rem 1.5rem;
    background: linear-gradient(135deg, #56AB2F 0%, #A8E063 100%);
    color: white;
    text-decoration: none;
    border-radius: 0.5rem;
    font-weight: 600;
    box-shadow: 0 4px 15px rgba(86, 171, 47, 0.3);
    transition: all 0.3s ease;
}

.mobile-cta-bar .cta-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(86, 171, 47, 0.4);
}

.mobile-cta-bar .cta-button svg {
    margin-left: 0.5rem;
}

.mobile-cta-bar .arabic-label-btn {
    font-size: 0.875rem;
    opacity: 0.9;
}

@media (min-width: 768px) {
    .mobile-cta-bar {
        display: none;
    }
}

/* Sticky buy bar for landing pages - already exists in the file above */
.sticky-buy-bar.visible {
    transform: translateY(0);
} 

/* Validation messages for landing pages with input-container */
.input-container {
    position: relative;
}

.input-container .invalid-feedback {
    display: none;
    width: 100%;
    margin-top: 0.25rem;
    font-size: 0.875em;
    color: #dc3545;
}

.input-container .form-control.is-invalid ~ .invalid-feedback {
    display: block !important;
}

/* Ensure error messages show below the input container */
.form-group .invalid-feedback {
    position: relative;
    margin-top: 0.25rem;
}

/* Style for select2 dropdowns */
.select2-container--default .select2-selection--single.is-invalid {
    border-color: #dc3545 !important;
}

.form-control.is-invalid + .select2-container .select2-selection--single {
    border-color: #dc3545 !important;
}

/* Ensure proper spacing for error messages in form groups */
.form-group {
    margin-bottom: 1.5rem;
} 

/* Variant Color Swatches */
.variant-color-swatches {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
    margin-top: 10px;
}

.variant-color-swatch {
    position: relative;
    cursor: pointer;
}

.variant-color-swatch input[type="radio"] {
    position: absolute;
    opacity: 0;
    width: 0;
    height: 0;
}

.variant-color-swatch .color-swatch {
    display: block;
    width: 48px;
    height: 48px;
    border-radius: 50%;
    border: 3px solid transparent;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    transition: all 0.3s ease;
}

.variant-color-swatch:hover .color-swatch {
    transform: scale(1.1);
    box-shadow: 0 4px 8px rgba(0,0,0,0.2);
}

.variant-color-swatch.active .color-swatch {
    border-color: #333;
    box-shadow: 0 0 0 2px #fff, 0 0 0 4px #333;
}

/* Mobile responsiveness */
@media (max-width: 480px) {
    .variant-color-swatch .color-swatch {
        width: 40px;
        height: 40px;
    }
} 
