/* ═══ PRODUCT DETAIL PAGE STYLES ═══ */

:root {
    --primary: #D4773A;
    --primary-light: rgba(212, 119, 58, 0.15);
    --primary-glow: rgba(212, 119, 58, 0.28);
    --bg: #0A0908;
    --surface: #0F0D0B;
    --card: #171410;
    --card-hover: #1E1A14;
    --border: #262018;
    --border-light: #302820;
    --text: #F5F0E8;
    --muted: #7A7060;
    --radius: 14px;
    --radius-sm: 8px;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

html, body {
    background: var(--bg);
    color: var(--text);
    font-family: 'DM Sans', sans-serif;
    line-height: 1.6;
}

.product-detail-page {
    padding: 20px 0 40px;
    overflow-x: hidden;
}

/* ═══ CONTAINER ═══ */
.container {
    max-width: 900px;
    margin: 0 auto;
    padding: 0 20px;
}

/* ═══ MAIN GRID ═══
   Gallery is capped at 320px; info fills the rest.
   This prevents the image from dominating on wide viewports.
═══════════════════ */
.main-grid {
    display: grid;
    grid-template-columns: minmax(0, 320px) 1fr;
    gap: 28px;
    margin-bottom: 48px;
    align-items: start;
}

@media (max-width: 700px) {
    .main-grid {
        grid-template-columns: 1fr;
        gap: 20px;
        margin-bottom: 32px;
    }
}

/* ═══ GALLERY ═══ */
.gallery-wrapper,
.gallery-section {
    display: flex;
    flex-direction: column;
    gap: 10px;
    min-width: 0;
    width: 100%;
}

.gallery-main {
    position: relative;
    aspect-ratio: 1;
    background: var(--card);
    border: 1.5px solid var(--border-light);
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: 0 20px 48px rgba(0,0,0,0.55);
    width: 100%;
    min-width: 0;
    cursor: pointer;
}

/* Image inside gallery — absolute so Vue <transition> can fade */
.gallery-main img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: contain;
    object-position: center;
    background: var(--card);
    display: block;
}

/* ═══ FADE TRANSITION ═══ */
.gallery-fade-enter-active,
.gallery-fade-leave-active {
    transition: opacity 0.38s ease;
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
}
.gallery-fade-enter-from,
.gallery-fade-leave-to { opacity: 0; }

/* ═══ COUNTER ═══ */
.gallery-counter {
    position: absolute;
    bottom: 12px;
    right: 12px;
    background: rgba(0,0,0,0.72);
    color: var(--text);
    padding: 5px 11px;
    border-radius: 20px;
    font-size: 0.78rem;
    font-weight: 700;
    backdrop-filter: blur(6px);
    z-index: 10;
    pointer-events: none;
}

/* ═══ NAV ARROWS ═══ */
.gallery-nav-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(0,0,0,0.52);
    color: #fff;
    border: 1.5px solid rgba(255,255,255,0.14);
    width: 42px;
    height: 42px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: background 0.22s, transform 0.22s;
    z-index: 10;
    font-size: 0.95rem;
    backdrop-filter: blur(5px);
}
.gallery-nav-btn:hover {
    background: var(--primary);
    border-color: var(--primary);
    transform: translateY(-50%) scale(1.1);
}
.gallery-nav-btn:active { transform: translateY(-50%) scale(0.95); }
.gallery-nav-prev { left: 12px; }
.gallery-nav-next { right: 12px; }

/* ═══ CAROUSEL DOTS ═══ */
.gallery-dots {
    display: flex;
    gap: 7px;
    justify-content: center;
    padding: 4px 0 2px;
}

.gallery-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--border-light);
    border: none;
    cursor: pointer;
    transition: background 0.3s, transform 0.3s, box-shadow 0.3s;
    padding: 0;
    flex-shrink: 0;
}
.gallery-dot:hover { background: rgba(212,119,58,0.5); transform: scale(1.2); }
.gallery-dot.active {
    background: var(--primary);
    transform: scale(1.4);
    box-shadow: 0 0 0 3px rgba(212,119,58,0.22);
}

/* ═══ THUMBNAILS ═══ */
.gallery-thumbnails-wrapper {
    background: rgba(23,20,16,0.45);
    padding: 10px;
    border-radius: var(--radius);
    border: 1px solid var(--border-light);
}

.gallery-thumbnails {
    display: flex;
    gap: 8px;
    overflow-x: auto;
    padding: 3px 0;
    scroll-behavior: smooth;
    min-height: 72px;
}

.gallery-thumbnails::-webkit-scrollbar { height: 3px; }
.gallery-thumbnails::-webkit-scrollbar-track { background: transparent; }
.gallery-thumbnails::-webkit-scrollbar-thumb { background: var(--primary); border-radius: 3px; }

.thumb {
    flex-shrink: 0;
    width: 62px;
    height: 62px;
    border: 2.5px solid transparent;
    border-radius: 10px;
    overflow: hidden;
    cursor: pointer;
    background: var(--card);
    transition: border-color 0.25s, transform 0.25s, box-shadow 0.25s;
}
.thumb:hover { border-color: rgba(212,119,58,0.45); transform: translateY(-4px); }
.thumb.active {
    border-color: var(--primary);
    transform: translateY(-3px) scale(1.05);
    box-shadow: 0 0 0 3px rgba(212,119,58,0.2), 0 6px 16px rgba(212,119,58,0.25);
}
.thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }

/* ═══ PRODUCT INFO ═══ */
.product-info-wrapper {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.product-meta { display: flex; gap: 9px; flex-wrap: wrap; }

.meta-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 7px 12px;
    background: var(--primary-light);
    border: 1px solid var(--border-light);
    border-radius: 24px;
    font-size: 0.75rem;
    color: var(--text);
    font-weight: 600;
    transition: background 0.2s, border-color 0.2s;
}
.meta-badge:hover { background: var(--primary-glow); border-color: var(--primary); }
.meta-badge i { color: var(--primary); font-size: 0.85rem; }

.product-title {
    font-size: 2rem;
    font-weight: 700;
    font-family: 'Cormorant Garamond', serif;
    line-height: 1.15;
    background: linear-gradient(135deg, var(--text) 0%, var(--primary) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.rating-section {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 13px 15px;
    background: linear-gradient(135deg, rgba(212,119,58,0.1), rgba(23,20,16,0.4));
    border: 1px solid var(--primary-glow);
    border-radius: var(--radius);
}

.stars { display: flex; gap: 5px; }
.stars i { font-size: 1rem; color: rgba(212,119,58,0.25); }
.stars i.active { color: var(--primary); }
.rating-text { color: var(--text); font-size: 0.8rem; font-weight: 600; }

.price-section { display: flex; flex-direction: column; gap: 5px; }

.price-label {
    font-size: 0.65rem;
    text-transform: uppercase;
    letter-spacing: 0.15em;
    color: var(--muted);
    font-weight: 800;
}

.price {
    font-size: 2.1rem;
    font-weight: 700;
    color: var(--primary);
    font-family: 'Cormorant Garamond', serif;
    line-height: 1;
    text-shadow: 0 4px 12px rgba(212,119,58,0.28);
}
.price sup { font-size: 1.1rem; margin-right: 4px; opacity: 0.85; }

.description-section {
    background: linear-gradient(135deg, var(--card), rgba(23,20,16,0.5));
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 15px;
}

.section-title {
    font-size: 0.68rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    color: var(--primary);
    margin-bottom: 9px;
    display: block;
}

.description-text { color: var(--text); line-height: 1.7; font-size: 0.85rem; white-space: pre-line; }

/* ═══ LOCAL SECTION – banner + info ═══ */
.local-section {
    overflow: hidden;
    border-radius: var(--radius);
    border: 1.5px solid var(--border-light);
    background: var(--card);
    transition: border-color 0.3s, box-shadow 0.3s;
}
.local-section:hover {
    border-color: var(--primary);
    box-shadow: 0 10px 28px rgba(212,119,58,0.16);
}


/* Body below banner */
.local-card-body {
    padding: 14px 16px;
    display: flex;
    gap: 12px;
    align-items: flex-start;
}

.local-logo-small {
    width: 44px;
    height: 44px;
    min-width: 44px;
    border-radius: 50%;
    border: 2px solid var(--primary-glow);
    overflow: hidden;
    background: rgba(212,119,58,0.08);
    margin-top: 2px;
}
.local-logo-small img { width: 100%; height: 100%; object-fit: cover; display: block; }

.local-info { flex: 1; min-width: 0; }
.local-info h3 {
    font-size: 1.05rem;
    margin-bottom: 5px;
    color: var(--text);
    font-weight: 700;
    font-family: 'Cormorant Garamond', serif;
}
.local-info p { color: rgba(245,240,232,0.72); font-size: 0.82rem; line-height: 1.55; margin-bottom: 5px; }
.local-info p i { color: var(--primary); margin-right: 6px; }

/* ═══ ADD TO CART BUTTON ═══ */
.btn-add-to-cart {
    width: 100%;
    padding: 16px 24px;
    background: linear-gradient(135deg, #D4773A, #B8601F);
    color: #fff;
    border: none;
    border-radius: var(--radius);
    font-size: 1rem;
    font-weight: 700;
    font-family: 'DM Sans', sans-serif;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    transition: background 0.25s, transform 0.18s, box-shadow 0.25s;
    box-shadow: 0 8px 24px rgba(212, 119, 58, 0.35);
    letter-spacing: 0.03em;
}
.btn-add-to-cart:hover {
    background: linear-gradient(135deg, #E0883F, #C4681F);
    transform: translateY(-2px);
    box-shadow: 0 12px 30px rgba(212, 119, 58, 0.5);
}
.btn-add-to-cart:active {
    transform: translateY(0);
    box-shadow: 0 6px 16px rgba(212, 119, 58, 0.3);
}
.btn-add-to-cart i { font-size: 1.1rem; }

/* ═══ REVIEWS ═══ */
.reviews-section {
    margin-top: 48px;
    margin-bottom: 100px;
    padding: 28px;
    background: linear-gradient(135deg, rgba(23,20,16,0.8), rgba(15,13,11,0.6));
    border: 1px solid var(--border);
    border-radius: var(--radius);
}

.reviews-empty {
    text-align: center;
    padding: 48px 20px;
    background: var(--card);
    border: 2px dashed var(--border-light);
    border-radius: var(--radius);
    color: var(--muted);
}

/* ═══ RESPONSIVE – TABLET (grid colapsa a 1 col en ≤700px) ═══ */
@media (max-width: 768px) {
    .product-detail-page { padding: 14px 0 28px; }
    .container { padding: 0 14px; }

    .gallery-main {
        aspect-ratio: unset;
        height: clamp(260px, 48vh, 420px);
    }

    .gallery-nav-btn { width: 38px; height: 38px; font-size: 0.88rem; }
    .gallery-nav-prev { left: 9px; }
    .gallery-nav-next { right: 9px; }

    .gallery-thumbnails-wrapper { overflow: hidden; }
    .gallery-thumbnails { min-height: 60px; }
    .thumb { width: 56px; height: 56px; }

    .product-title { font-size: 1.75rem; }
    .price { font-size: 1.9rem; }
}

/* ═══ RESPONSIVE – MOBILE ═══ */
@media (max-width: 480px) {
    .product-detail-page { padding: 10px 0 20px; }
    .container { padding: 0 12px; }

    .gallery-main {
        aspect-ratio: unset;
        height: clamp(240px, 48vh, 320px);
    }

    .gallery-nav-btn { width: 34px; height: 34px; font-size: 0.82rem; }
    .gallery-nav-prev { left: 7px; }
    .gallery-nav-next { right: 7px; }

    .gallery-thumbnails-wrapper { padding: 7px; overflow: hidden; }
    .gallery-thumbnails { min-height: 54px; gap: 6px; }
    .thumb { width: 46px; height: 46px; }

    .product-title { font-size: 1.5rem; }
    .price { font-size: 1.75rem; }

    .local-card-body { padding: 12px; }

    .reviews-section { padding: 16px; margin-top: 32px; }
}
