/* ============================================================
   product.css — Styles specific to the product detail page
   ============================================================ */

.product-detail {
    padding: 40px 0 60px;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 40px;
    align-items: start;
}

/* ---------- Image Column ---------- */
.product-image {
    display: flex;
    flex-direction: column;
    gap: 15px;
    position: relative;
}

.main-image-container {
    width: 100%;
    aspect-ratio: 4 / 3;
    border-radius: 12px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    border: 1px solid #eee;
    overflow: hidden;
    background: #f8f8f8;
    position: relative;
    cursor: zoom-in;
    display: flex;
    align-items: center;
    justify-content: center;
}

.main-image-container img {
    width: 100%;
    height: 100%;
    display: block;
    object-fit: contain;
    transition: opacity 0.3s ease;
}

/* ---------- Thumbnails ---------- */
.thumbnail-carousel-wrapper {
    position: relative;
    display: flex;
    align-items: center;
}

.thumbnail-carousel {
    display: flex;
    gap: 12px;
    overflow-x: auto;
    scroll-behavior: smooth;
    scrollbar-width: none;
    margin-top: 10px;
    padding-bottom: 5px;
    flex: 1;
}

.thumbnail-carousel::-webkit-scrollbar {
    display: none;
}

.thumbnail {
    width: 80px;
    height: 80px;
    border-radius: 8px;
    object-fit: cover;
    cursor: pointer;
    border: 2px solid transparent;
    transition: 0.3s border, 0.3s opacity;
    opacity: 0.7;
    flex-shrink: 0;
}

.thumbnail:hover,
.thumbnail.active {
    border-color: #17adce;
    opacity: 1;
}

.thumb-btn {
    background: #fff;
    color: #17adce;
    border: 1px solid #99dff0;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    font-size: 16px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
    z-index: 5;
    position: absolute;
    flex-shrink: 0;
}

.thumb-prev {
    left: -15px;
}

.thumb-next {
    right: -15px;
}

/* ---------- Info Column ---------- */
.product-info h1 {
    font-size: 40px;
    color: #17adce;
    margin-bottom: 20px;
}

.product-info p {
    font-size: 18px;
    color: #555;
    margin-bottom: 25px;
}

.product-info h3 {
    font-size: 20px;
    color: #333;
}

.product-info ul {
    margin: 15px 0 30px 0;
    padding-left: 20px;
}

.product-info li {
    margin-bottom: 10px;
    font-size: 16px;
    color: #2b2b2b;
}

/* ---------- Lightbox Modal ---------- */
.lightbox-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.92);
    z-index: 9999;
    align-items: center;
    justify-content: center;
    cursor: grab;
}

.lightbox-overlay.open {
    display: flex;
}

.lightbox-overlay.dragging {
    cursor: grabbing;
}

.lightbox-close {
    position: absolute;
    top: 18px;
    right: 24px;
    background: none;
    border: none;
    color: #fff;
    font-size: 36px;
    cursor: pointer;
    z-index: 10001;
    line-height: 1;
    opacity: 0.8;
    transition: opacity 0.2s;
}

.lightbox-close:hover {
    opacity: 1;
}

.lightbox-img-wrapper {
    position: relative;
    max-width: 90vw;
    max-height: 90vh;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
}

.lightbox-img-wrapper img {
    max-width: 90vw;
    max-height: 85vh;
    object-fit: contain;
    transition: transform 0.15s ease-out;
    transform-origin: center center;
    user-select: none;
    -webkit-user-drag: none;
}

.lightbox-controls {
    position: absolute;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 12px;
    z-index: 10001;
}

.lightbox-controls button {
    background: rgba(255, 255, 255, 0.15);
    border: 1px solid rgba(255, 255, 255, 0.3);
    color: #fff;
    width: 42px;
    height: 42px;
    border-radius: 50%;
    font-size: 20px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s;
    backdrop-filter: blur(8px);
}

.lightbox-controls button:hover {
    background: rgba(255, 255, 255, 0.3);
}

.lightbox-hint {
    position: absolute;
    bottom: 72px;
    left: 50%;
    transform: translateX(-50%);
    color: rgba(255, 255, 255, 0.5);
    font-size: 13px;
    z-index: 10001;
    pointer-events: none;
}

/* ---------- Responsive ---------- */
@media (max-width: 768px) {
    .product-detail {
        grid-template-columns: 1fr;
    }

    .main-image-container {
        aspect-ratio: 1 / 1;
    }

    .product-info h1 {
        font-size: 32px;
    }

    .btn-outline {
        margin-left: 0;
        margin-top: 10px;
        display: block;
        text-align: center;
    }

    .btn-whatsapp {
        display: block;
        text-align: center;
    }
}