/* Elegant Product Modal - High-End Boutique Look with Depth */
:root {
    --brand-cream: #fcfaf5;
    --brand-gold: #c5a880;
    --brand-gold-hover: #b4976f;
    --brand-dark: #1a1a1a;
    --brand-border: #e8e4db;
    --brand-gray: #767676;
    --box-shadow-premium: 0 50px 120px rgba(0,0,0,0.45);
    --button-shadow: 0 4px 15px rgba(0,0,0,0.06);
}

body {
    background-color: #f0ede6;
    font-family: 'Poppins', sans-serif;
}

/* Modal Behavior */
.product-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(8px); /* Increased blur for more depth */
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    padding: 20px;
}

.product-modal-card {
    background: var(--brand-cream);
    width: 100%;
    max-width: 1100px;
    height: 85vh;
    border-radius: 8px; /* Slightly more rounded */
    overflow: hidden;
    position: relative;
    display: flex;
    box-shadow: var(--box-shadow-premium);
    animation: modalPopIn 0.6s cubic-bezier(0.165, 0.84, 0.44, 1);
}

@keyframes modalPopIn {
    from { opacity: 0; transform: scale(0.95) translateY(20px); }
    to { opacity: 1; transform: scale(1) translateY(0); }
}

.modal-close-btn {
    position: absolute;
    top: 20px;
    right: 25px;
    font-size: 32px;
    color: var(--brand-dark);
    text-decoration: none;
    z-index: 100;
    opacity: 0.5;
    transition: all 0.3s ease;
}

.modal-close-btn:hover {
    opacity: 1;
    transform: rotate(90deg);
}

.modal-content-wrapper {
    display: flex;
    width: 100%;
    height: 100%;
}

/* Left: Media Side */
.modal-media-side {
    flex: 1.1;
    height: 100%;
    position: relative;
    border-right: 1px solid rgba(0,0,0,0.03);
}

.media-slider {
    display: flex;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    height: 100%;
    scrollbar-width: none; /* Hide for Firefox */
}

.media-slider::-webkit-scrollbar { display: none; }

.media-slide {
    flex: 0 0 100%;
    width: 100%;
    height: 100%;
    scroll-snap-align: start;
}

.media-item-fit {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.slider-dots {
    position: absolute;
    bottom: 25px;
    left: 0;
    right: 0;
    z-index: 120;
    display: flex;
    justify-content: center;
    gap: 8px;
    pointer-events: none;
}

.dot { pointer-events: auto; }

/* Navigation Arrows */
.slider-arrow {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 44px;
    height: 44px;
    background: rgba(255, 255, 255, 0.8);
    backdrop-filter: blur(8px);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--brand-dark);
    cursor: pointer;
    z-index: 115;
    transition: all 0.3s ease;
    border: none;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
    opacity: 0;
    visibility: hidden;
}

.modal-media-side:hover .slider-arrow {
    opacity: 1;
    visibility: visible;
}

.slider-arrow:hover {
    background: #fff;
    transform: translateY(-50%) scale(1.1);
}

.prev-btn { left: 20px; }
.next-btn { right: 20px; }

.slider-arrow i { font-size: 14px; }

.dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: rgba(0,0,0,0.1);
    cursor: pointer;
    transition: all 0.3s ease;
}

.dot.active { 
    background: var(--brand-dark);
    transform: scale(1.2);
}

/* Gallery Category Tabs */
.gallery-category-tabs {
    position: absolute;
    top: 25px;
    left: 25px;
    z-index: 110;
    display: flex;
    gap: 8px;
}

.gallery-tab {
    padding: 8px 20px;
    background: rgba(255, 255, 255, 0.7);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: 30px;
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    color: var(--brand-dark);
    cursor: pointer;
    box-shadow: 0 8px 32px 0 rgba(0,0,0,0.06);
    transition: all 0.4s cubic-bezier(0.19, 1, 0.22, 1);
    opacity: 0.9;
}

.gallery-tab:hover {
    transform: translateY(-3px);
    opacity: 1;
    background: #fff;
    box-shadow: 0 12px 40px rgba(0,0,0,0.12);
}

.gallery-tab.active {
    background: var(--brand-gold);
    color: #fff;
    opacity: 1;
    border-color: var(--brand-gold);
    box-shadow: 0 8px 25px rgba(197, 168, 128, 0.3);
}

/* Hide slides not in category */
.media-slide { 
    display: none; 
    opacity: 0;
    transition: opacity 0.5s ease;
}
.media-slide.show { 
    display: block; 
    opacity: 1;
    animation: fadeInSlide 0.6s ease forwards;
}

@keyframes fadeInSlide {
    from { opacity: 0; transform: scale(0.98); }
    to { opacity: 1; transform: scale(1); }
}

/* Right: Info Side */
.modal-info-side {
    flex: 0.9;
    height: 100%;
    background: var(--brand-cream);
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

.info-content-scroll {
    padding: 25px 20px;
    overflow-y: auto;
    height: 100%;
    scrollbar-width: thin; /* Firefox: makes it thin */
    scrollbar-color: #e0ddd5 transparent; /* Firefox: handle and track color */
}

.info-content-scroll::-webkit-scrollbar {
    width: 6px;
}

.info-content-scroll::-webkit-scrollbar-thumb {
    background: #e0ddd5;
    border-radius: 10px;
}

.product-title-serif {
    font-family: 'Bodoni Moda', serif;
    font-size: 30px;
    font-weight: 600;
    color: var(--brand-dark);
    line-height: 1.1;
    margin-bottom: 8px;
}

.product-price-minimal {
    font-size: 22px;
    font-weight: 500;
    margin-bottom: 20px;
    color: #333;
}

/* Selections */
.modal-selection-group {
    margin-bottom: 30px;
}

.modal-sel-label {
    display: block;
    font-size: 13px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1.2px;
    margin-bottom: 15px;
    color: #444;
}

.modal-sel-btns {
    display: flex;
    gap: 12px;
}

.modal-btn {
    padding: 8px 25px;
    border: 1px solid var(--brand-border);
    background: #fff;
    border-radius: 30px;
    font-size: 13px;
    cursor: pointer;
    box-shadow: var(--button-shadow);
    transition: all 0.3s ease;
}

.modal-btn:hover:not(.active) {
    border-color: var(--brand-gold);
    transform: translateY(-2px);
}

.modal-btn.active {
    background: var(--brand-gold);
    color: #fff;
    border-color: var(--brand-gold);
    box-shadow: 0 4px 15px rgba(197, 168, 128, 0.3);
}

.modal-swatch-row {
    display: flex;
    gap: 25px;
}

.modal-swatch-item {
    display: flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
    transition: transform 0.2s ease;
}

.modal-swatch-item:hover { transform: translateX(3px); }
.modal-swatch-item.active { transform: translateX(5px); }
.modal-swatch-item.active .modal-swatch { border: 2px solid var(--brand-gold); box-shadow: 0 0 0 4px rgba(197, 168, 128, 0.15); transform: scale(1.15); }
.modal-swatch-item.active .modal-swatch-name { color: var(--brand-dark); font-weight: 700; }

.modal-swatch {
    width: 22px;
    height: 22px;
    border-radius: 50%;
    border: 1px solid rgba(0,0,0,0.1);
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}

.modal-swatch-name { font-size: 14px; font-weight: 500; }

/* Primary Button */
.modal-primary-btn {
    width: 100%;
    padding: 18px;
    background: var(--brand-gold);
    color: #fff;
    border: none;
    border-radius: 4px;
    font-weight: 600;
    font-size: 14px;
    text-transform: uppercase;
    letter-spacing: 2px;
    cursor: pointer;
    margin-bottom: 20px;
    box-shadow: 0 6px 20px rgba(197, 168, 128, 0.3);
    transition: all 0.3s ease;
}

.modal-primary-btn:hover { 
    background: var(--brand-gold-hover);
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(197, 168, 128, 0.4);
}

/* Actions */
.modal-actions-row {
    display: flex;
    gap: 12px;
    margin-bottom: 20px;
}

.modal-square-btn {
    width: 55px;
    height: 55px;
    border: 1px solid var(--brand-border);
    background: #fff;
    border-radius: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 18px;
    transition: all 0.3s ease;
    box-shadow: var(--button-shadow);
}

.modal-square-btn:hover {
    border-color: var(--brand-gold);
    color: var(--brand-gold);
    transform: translateY(-2px);
}

.modal-rect-btn {
    flex: 1;
    height: 55px;
    border: 1px solid var(--brand-border);
    background: #fff;
    border-radius: 4px;
    font-weight: 600;
    font-size: 13px;
    letter-spacing: 1.5px;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: var(--button-shadow);
    display: flex;
    align-items: center;
    justify-content: center;
}

.modal-rect-btn:hover {
    border-color: var(--brand-gold);
    background: #fafafa;
    transform: translateY(-2px);
}

.modal-description {
    font-size: 15px;
    line-height: 1.5;
    color: var(--brand-gray);
    margin-bottom: 20px;
    border-top: 1px solid var(--brand-border);
    padding-top: 15px;
}

/* Accordions */
.modal-accordions {
    border-top: 1px solid var(--brand-border);
}

.aurlet-accordion-item {
    border-bottom: 1px solid var(--brand-border);
}

.aurlet-accordion-header {
    display: flex;
    justify-content: space-between;
    padding: 10px 0;
    cursor: pointer;
    font-weight: 600;
    font-size: 15px;
    transition: color 0.3s ease;
}

.aurlet-accordion-header:hover { color: var(--brand-gold); }

.aurlet-accordion-content {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.4s ease;
}

.aurlet-accordion-item.active .aurlet-accordion-content {
    max-height: 1000px;
}

.specs-grid { padding-bottom: 30px; }

.spec-category {
    font-size: 15px;
    font-weight: 600;
    margin: 10px 0 10px;
    color: var(--brand-dark);
    border-bottom: 1px solid var(--brand-border);
    padding-bottom: 10px;
    letter-spacing: normal;
}

.spec-line {
    display: flex;
    justify-content: space-between;
    font-size: 13px;
    padding: 6px 0;
    color: var(--brand-gray);
}

/* Responsive */
@media (max-width: 991px) {
    .product-modal-overlay { padding: 10px; }
    .product-modal-card {
        flex-direction: column;
        height: auto;
        max-height: 95vh;
    }
    .modal-content-wrapper { flex-direction: column; height: auto; }
    .modal-media-side { height: 450px; flex: none; width: 100%; }
    .modal-info-side { height: auto; flex: none; width: 100%; }
    .info-content-scroll { padding: 35px 25px; }
}

/* Sidebar Related Products Section */
.sidebar-related-section {
    margin-top: 50px;
    padding-top: 40px;
    border-top: 1px solid var(--brand-border);
}

.sidebar-section-title {
    font-family: 'Bodoni Moda', serif;
    font-size: 22px;
    font-weight: 500;
    margin-bottom: 25px;
    color: var(--brand-dark);
    letter-spacing: normal;
    text-transform: none;
}

.sidebar-related-grid {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.sidebar-related-item {
    display: flex;
    gap: 15px;
    text-decoration: none !important;
    padding: 10px;
    border-radius: 8px;
    transition: all 0.3s cubic-bezier(0.165, 0.84, 0.44, 1);
    background: transparent;
    border: 1px solid transparent;
}

.sidebar-related-item:hover {
    background: #fff;
    border-color: rgba(197, 168, 128, 0.2);
    transform: translateX(5px);
    box-shadow: 0 4px 15px rgba(0,0,0,0.03);
}

.sidebar-related-img {
    width: 80px;
    height: 80px;
    flex-shrink: 0;
    border-radius: 4px;
    overflow: hidden;
    background: #fff;
    border: 1px solid #f0f0f0;
}

.sidebar-related-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.sidebar-related-item:hover .sidebar-related-img img {
    transform: scale(1.1);
}

.sidebar-related-details {
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 4px;
}

.sidebar-related-details .p-name {
    font-size: 13px;
    font-weight: 500;
    color: var(--brand-dark);
    line-height: 1.3;
}

.sidebar-related-details .p-price {
    font-size: 12px;
    color: var(--brand-gold);
    font-weight: 600;
}