/* =========================================================
   GHANA FUGU — Product Page Styles
   Loaded alongside css/style.css (shared vars, navbar, cart,
   toast, buttons, patterns, wishlist hearts)
   ========================================================= */

/* ======================== BREADCRUMB ======================== */
.breadcrumb-bar {
    padding-top: calc(var(--nav-height) + 24px);
    padding-bottom: 12px;
    background: var(--bg);
    border-bottom: 1px solid var(--border);
}

.breadcrumb {
    display: flex;
    align-items: center;
    gap: 10px;
    font-family: var(--font-body);
    font-size: 0.82rem;
    letter-spacing: 0.02em;
}

.breadcrumb a {
    color: var(--text-muted);
    text-decoration: none;
    transition: color 0.25s ease;
}

.breadcrumb a:hover {
    color: var(--gold);
}

.breadcrumb-sep {
    color: var(--text-dim);
    font-size: 0.75rem;
}

.breadcrumb-current {
    color: var(--text);
    font-weight: 500;
}

/* ======================== PRODUCT HERO ======================== */
.product-hero {
    padding: 48px 0 64px;
    background: var(--bg);
}

.product-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 56px;
    align-items: start;
}

/* ======================== GALLERY ======================== */
.product-gallery {
    position: relative;
}

.gallery-main {
    position: relative;
    width: 100%;
    aspect-ratio: 4 / 5;
    border-radius: 12px;
    overflow: hidden;
    background: var(--surface);
}

.gallery-main img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.gallery-main .card-pattern {
    opacity: 0.4;
}

.gallery-badge {
    position: absolute;
    top: 16px;
    left: 16px;
    padding: 6px 16px;
    font-family: var(--font-body);
    font-size: 0.7rem;
    font-weight: 600;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--white);
    background: var(--gold);
    border-radius: 4px;
    z-index: 2;
}

.gallery-badge.badge-new {
    background: #2D6A4F;
}

.gallery-badge.badge-limited {
    background: #B33A3A;
}

.gallery-badge.badge-premium {
    background: linear-gradient(135deg, #1A1611 0%, #3D3225 100%);
    color: var(--gold);
    border: 1px solid rgba(196, 154, 42, 0.3);
}

.gallery-badge.badge-bestseller {
    background: var(--gold);
}

.gallery-thumbs {
    display: flex;
    gap: 12px;
    margin-top: 16px;
}

.gallery-thumb {
    width: 80px;
    height: 80px;
    border-radius: 8px;
    overflow: hidden;
    cursor: pointer;
    border: 2px solid transparent;
    transition: border-color 0.25s ease, opacity 0.25s ease;
    opacity: 0.6;
    flex-shrink: 0;
}

.gallery-thumb:hover {
    opacity: 0.85;
}

.gallery-thumb.active {
    border-color: var(--gold);
    opacity: 1;
}

.gallery-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.gallery-thumb .card-pattern {
    opacity: 0.35;
}

/* ======================== PRODUCT INFO (sticky) ======================== */
.product-info {
    position: sticky;
    top: calc(var(--nav-height) + 32px);
}

.product-category {
    display: inline-block;
    font-family: var(--font-body);
    font-size: 0.72rem;
    font-weight: 600;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--gold);
    margin-bottom: 8px;
}

.product-name {
    font-family: var(--font-display);
    font-size: 2.2rem;
    font-weight: 600;
    color: var(--text);
    line-height: 1.2;
    margin: 0 0 12px;
}

.product-price {
    font-family: var(--font-accent);
    font-size: 1.6rem;
    font-weight: 500;
    color: var(--text);
    margin: 0 0 16px;
    letter-spacing: 0.01em;
}

/* Rating */
.product-rating {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 20px;
}

.product-rating .stars {
    display: flex;
    gap: 2px;
}

.product-rating .stars svg {
    color: var(--gold);
}

.product-rating .stars svg.star-empty {
    color: var(--border);
}

.product-rating .review-count {
    font-family: var(--font-body);
    font-size: 0.82rem;
    color: var(--text-muted);
}

/* Description */
.product-desc {
    font-family: var(--font-body);
    font-size: 0.92rem;
    line-height: 1.7;
    color: var(--text-muted);
    margin: 0 0 28px;
}

/* Size selector */
.product-sizes {
    margin-bottom: 24px;
}

.product-label {
    display: block;
    font-family: var(--font-body);
    font-size: 0.78rem;
    font-weight: 600;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--text);
    margin-bottom: 10px;
}

.product-sizes .size-options {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

/* Reuses .size-btn from style.css */

/* Quantity */
.product-quantity {
    margin-bottom: 28px;
}

/* Reuses .qty-control, .qty-btn, .qty-value from style.css */

/* Actions */
.product-actions {
    display: flex;
    gap: 12px;
    margin-bottom: 32px;
}

.product-add-cart {
    flex: 1;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.btn-wishlist-page {
    width: 52px;
    height: 52px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1px solid var(--border);
    border-radius: 8px;
    background: transparent;
    cursor: pointer;
    transition: border-color 0.25s ease, background 0.25s ease;
    padding: 0;
}

.btn-wishlist-page:hover {
    border-color: var(--gold);
    background: var(--gold-muted);
}

.btn-wishlist-page .heart-outline {
    color: var(--text-muted);
    display: block;
}

.btn-wishlist-page .heart-filled {
    color: var(--danger);
    display: none;
}

.btn-wishlist-page.active .heart-outline {
    display: none;
}

.btn-wishlist-page.active .heart-filled {
    display: block;
}

/* ======================== ACCORDIONS ======================== */
.product-accordions {
    border-top: 1px solid var(--border);
}

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

.accordion-toggle {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 18px 0;
    background: none;
    border: none;
    cursor: pointer;
    font-family: var(--font-body);
    font-size: 0.88rem;
    font-weight: 500;
    color: var(--text);
    letter-spacing: 0.02em;
    transition: color 0.25s ease;
}

.accordion-toggle:hover {
    color: var(--gold);
}

.accordion-arrow {
    transition: transform 0.3s var(--ease-out);
    color: var(--text-muted);
    flex-shrink: 0;
}

.accordion.open .accordion-arrow {
    transform: rotate(180deg);
}

.accordion-content {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.35s var(--ease-out), padding 0.35s var(--ease-out);
    padding: 0 0;
}

.accordion.open .accordion-content {
    max-height: 300px;
    padding: 0 0 18px;
}

.accordion-content p {
    font-family: var(--font-body);
    font-size: 0.84rem;
    line-height: 1.7;
    color: var(--text-muted);
    margin: 0 0 8px;
}

.accordion-content p:last-child {
    margin-bottom: 0;
}

/* ======================== RELATED PRODUCTS ======================== */
.related-section {
    padding: 64px 0 80px;
    background: var(--bg-elevated);
}

.related-section .section-header {
    text-align: center;
    margin-bottom: 40px;
}

.related-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 24px;
}

/* Related cards reuse .featured-card + .card-* from style.css */
.related-grid .featured-card .card-image {
    aspect-ratio: 3 / 4;
}

/* ======================== NOT FOUND ======================== */
.not-found {
    min-height: 60vh;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding-top: var(--nav-height);
}

.not-found .container {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 16px;
}

.not-found h2 {
    font-family: var(--font-display);
    font-size: 1.8rem;
    color: var(--text);
    margin: 0;
}

.not-found p {
    font-family: var(--font-body);
    font-size: 0.92rem;
    color: var(--text-muted);
    margin: 0 0 8px;
}

/* ======================== RESPONSIVE ======================== */
@media (max-width: 1024px) {
    .product-grid {
        gap: 36px;
    }

    .product-name {
        font-size: 1.8rem;
    }

    .related-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    .product-grid {
        grid-template-columns: 1fr;
        gap: 32px;
    }

    .product-info {
        position: static;
    }

    .product-hero {
        padding: 32px 0 48px;
    }

    .product-name {
        font-size: 1.6rem;
    }

    .product-price {
        font-size: 1.35rem;
    }

    .gallery-main {
        aspect-ratio: 1 / 1;
    }

    .gallery-thumb {
        width: 64px;
        height: 64px;
    }

    .related-section {
        padding: 48px 0 56px;
    }
}

@media (max-width: 480px) {
    .breadcrumb-bar {
        padding-top: calc(var(--nav-height) + 16px);
        padding-bottom: 8px;
    }

    .breadcrumb {
        font-size: 0.75rem;
        gap: 6px;
    }

    .related-grid {
        grid-template-columns: 1fr 1fr;
        gap: 16px;
    }

    .gallery-thumb {
        width: 56px;
        height: 56px;
    }
}
