/* Fullscreen Product Lightbox & Image Micro-Interactions */
/* Hotel Casa Garay / Chocolate La Soledad Design System */

.product-image-container {
    position: relative !important;
    overflow: hidden !important;
    cursor: zoom-in !important;
    transition: all 0.3s ease;
    background-color: #ffffff;
}

.product-image-container img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1);
    display: block;
}

.product-card:hover .product-image-container img {
    transform: scale(1.06);
}

/* Zoom badge micro-indicator */
.image-zoom-badge {
    position: absolute;
    top: 10px;
    right: 10px;
    width: 34px;
    height: 34px;
    border-radius: 50%;
    background: rgba(18, 14, 11, 0.85);
    border: 1px solid rgba(184, 134, 11, 0.6);
    color: #B8860B;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transform: scale(0.75);
    transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.35);
    z-index: 5;
    pointer-events: none;
}

.image-zoom-badge svg {
    width: 16px;
    height: 16px;
    stroke: currentColor;
    fill: none;
    stroke-width: 2;
}

.product-card:hover .image-zoom-badge,
.product-image-container:hover .image-zoom-badge {
    opacity: 1;
    transform: scale(1);
}

/* Lightbox Modal Overlay */
#product-fullscreen-lightbox {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(12, 10, 8, 0.95);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    z-index: 10000;
    display: none;
    opacity: 0;
    transition: opacity 0.3s cubic-bezier(0.16, 1, 0.3, 1);
    flex-direction: column;
    justify-content: space-between;
    align-items: center;
    box-sizing: border-box;
    user-select: none;
    -webkit-user-select: none;
}

#product-fullscreen-lightbox.active {
    display: flex;
    opacity: 1;
}

/* Lightbox Top Header */
.lightbox-header {
    width: 100%;
    padding: 1.5rem 2.5rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-sizing: border-box;
    z-index: 10002;
    background: linear-gradient(to bottom, rgba(0,0,0,0.7) 0%, transparent 100%);
}

.lightbox-title-area {
    display: flex;
    flex-direction: column;
    gap: 0.3rem;
    max-width: 80%;
}

.lightbox-category-tag {
    font-size: 0.7rem;
    letter-spacing: 3px;
    color: #B8860B;
    text-transform: uppercase;
    font-weight: 600;
    font-family: 'Outfit', sans-serif;
}

.lightbox-product-title {
    font-family: 'Playfair Display', serif;
    font-size: 1.5rem;
    color: #F8F4F0;
    margin: 0;
    text-transform: uppercase;
    letter-spacing: 1px;
    text-shadow: 0 2px 10px rgba(0,0,0,0.6);
}

.lightbox-meta-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.8rem;
    margin-top: 0.2rem;
}

.lightbox-gramaje {
    font-size: 0.8rem;
    color: #e0d5c1;
    background: rgba(184, 134, 11, 0.18);
    border: 1px solid rgba(184, 134, 11, 0.4);
    padding: 0.2rem 0.6rem;
    border-radius: 4px;
    font-family: 'Outfit', sans-serif;
    font-weight: 500;
}

.lightbox-price {
    font-size: 0.85rem;
    color: #B8860B;
    background: rgba(184, 134, 11, 0.22);
    border: 1px solid rgba(184, 134, 11, 0.5);
    padding: 0.2rem 0.65rem;
    border-radius: 4px;
    font-family: 'Outfit', sans-serif;
    font-weight: 700;
    letter-spacing: 0.5px;
}

.lightbox-counter {
    font-size: 0.85rem;
    color: #B8860B;
    font-family: 'Outfit', sans-serif;
    font-weight: 600;
    letter-spacing: 1px;
}

/* Close Button (Botón de Cerrado) */
.lightbox-close-btn {
    background: rgba(255, 255, 255, 0.08);
    border: 1.5px solid rgba(184, 134, 11, 0.4);
    color: #F8F4F0;
    width: 48px;
    height: 48px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
    box-shadow: 0 4px 15px rgba(0,0,0,0.4);
    flex-shrink: 0;
}

.lightbox-close-btn:hover {
    background: #B8860B;
    color: #120e0b;
    border-color: #B8860B;
    transform: rotate(90deg) scale(1.08);
    box-shadow: 0 0 20px rgba(184, 134, 11, 0.5);
}

.lightbox-close-btn svg {
    width: 22px;
    height: 22px;
    stroke: currentColor;
    fill: none;
    stroke-width: 2;
    stroke-linecap: round;
}

/* Lightbox Center Image Viewport */
.lightbox-body {
    flex: 1;
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    padding: 1rem 6rem;
    box-sizing: border-box;
    overflow: hidden;
}

.lightbox-img-wrapper {
    position: relative;
    max-width: 90vw;
    max-height: 72vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #ffffff;
    border-radius: 12px;
    box-shadow: 0 25px 60px rgba(0, 0, 0, 0.85), 0 0 40px rgba(184, 134, 11, 0.12);
    border: 1px solid rgba(184, 134, 11, 0.35);
    overflow: hidden;
    padding: 1.5rem;
}

.lightbox-img {
    max-width: 82vw;
    max-height: 66vh;
    width: auto;
    height: auto;
    object-fit: contain;
    border-radius: 6px;
    display: block;
    transition: transform 0.35s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.2s ease;
    animation: lightboxZoomIn 0.35s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes lightboxZoomIn {
    0% {
        opacity: 0;
        transform: scale(0.9);
    }
    100% {
        opacity: 1;
        transform: scale(1);
    }
}

/* Navigation Buttons (Botones de derecha e izquierda) */
.lightbox-nav-btn {
    position: fixed;
    top: 50%;
    transform: translateY(-50%);
    width: 58px;
    height: 58px;
    border-radius: 50%;
    background: rgba(22, 17, 13, 0.85);
    border: 1.5px solid rgba(184, 134, 11, 0.5);
    color: #F8F4F0;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.5);
    z-index: 10003;
}

.lightbox-prev-btn {
    left: 2rem;
}

.lightbox-next-btn {
    right: 2rem;
}

.lightbox-nav-btn:hover {
    background: #B8860B;
    color: #120e0b;
    border-color: #B8860B;
    transform: translateY(-50%) scale(1.12);
    box-shadow: 0 0 25px rgba(184, 134, 11, 0.6);
}

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

.lightbox-nav-btn svg {
    width: 26px;
    height: 26px;
    stroke: currentColor;
    fill: none;
    stroke-width: 2.4;
    stroke-linecap: round;
    stroke-linejoin: round;
}

/* Bottom Footer Bar with Thumbnails & Quick Order */
.lightbox-footer {
    width: 100%;
    padding: 1.2rem 2.5rem 1.8rem 2.5rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.8rem;
    box-sizing: border-box;
    z-index: 10002;
    background: linear-gradient(to top, rgba(0,0,0,0.85) 0%, transparent 100%);
}

.lightbox-thumbnails {
    display: flex;
    gap: 0.8rem;
    align-items: center;
    justify-content: center;
    overflow-x: auto;
    max-width: 90%;
    padding: 0.3rem 0;
    scrollbar-width: thin;
    scrollbar-color: #B8860B transparent;
}

.lightbox-thumb {
    width: 52px;
    height: 52px;
    border-radius: 6px;
    object-fit: cover;
    background: #ffffff;
    border: 2px solid rgba(255, 255, 255, 0.2);
    cursor: pointer;
    transition: all 0.25s ease;
    opacity: 0.6;
    flex-shrink: 0;
}

.lightbox-thumb:hover {
    opacity: 0.9;
    transform: translateY(-2px);
    border-color: #B8860B;
}

.lightbox-thumb.active {
    opacity: 1;
    border-color: #B8860B;
    box-shadow: 0 0 12px rgba(184, 134, 11, 0.6);
    transform: scale(1.08);
}

.lightbox-actions {
    display: flex;
    align-items: center;
    gap: 1.5rem;
}

.lightbox-btn-order {
    background: transparent;
    color: #B8860B;
    border: 1px solid #B8860B;
    padding: 0.6rem 1.5rem;
    font-family: 'Outfit', sans-serif;
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 2px;
    cursor: pointer;
    border-radius: 4px;
    transition: all 0.3s ease;
    font-weight: 600;
}

.lightbox-btn-order:hover {
    background: #B8860B;
    color: #120e0b;
    box-shadow: 0 0 15px rgba(184, 134, 11, 0.4);
}

.lightbox-hint {
    color: rgba(255, 255, 255, 0.45);
    font-size: 0.75rem;
    letter-spacing: 1px;
    font-family: 'Outfit', sans-serif;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .lightbox-header {
        padding: 1rem 1.2rem;
    }
    .lightbox-product-title {
        font-size: 1.1rem;
    }
    .lightbox-body {
        padding: 0.5rem 1rem;
    }
    .lightbox-img-wrapper {
        padding: 0.8rem;
        max-height: 60vh;
    }
    .lightbox-nav-btn {
        width: 44px;
        height: 44px;
    }
    .lightbox-prev-btn {
        left: 0.8rem;
    }
    .lightbox-next-btn {
        right: 0.8rem;
    }
    .lightbox-footer {
        padding: 0.8rem 1rem 1.2rem 1rem;
    }
    .lightbox-thumb {
        width: 42px;
        height: 42px;
    }
    .lightbox-hint {
        display: none;
    }
}

