﻿/* ===================================================================
   EMUA STORE — Product detail
   Same token system as product-index.css: cobalt accent, hairline
   borders, mint/coral reserved for status only.
=================================================================== */

@import url('https://fonts.googleapis.com/css2?family=Space+Grotesk:wght@500;600;700&family=Inter:wght@400;500;600;700&display=swap');

.customer-page {
    --ink: #12141c;
    --ink-soft: #5b6070;
    --line: #e4e7ee;
    --surface: #ffffff;
    --bg: #f7f8fb;
    --accent: #5b4fe0;
    --accent-ink: #453bc2;
    --accent-soft: #efedff;
    --mint: #1d9a6c;
    --mint-soft: #e7f6ef;
    --coral: #e5484d;
    --coral-soft: #fdeeee;
    --radius-lg: 18px;
    --radius-md: 12px;
    --radius-sm: 8px;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    color: var(--ink);
    max-width: 1180px;
}

.back-link {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: var(--ink-soft);
    text-decoration: none;
    font-size: 14px;
    font-weight: 500;
    margin-bottom: 24px;
    transition: color 0.15s ease;
}

    .back-link:hover {
        color: var(--accent);
    }

.customer-alert {
    border-radius: var(--radius-sm);
    padding: 12px 16px;
    font-size: 14px;
    font-weight: 500;
    margin-bottom: 20px;
}

    .customer-alert.error {
        background: var(--coral-soft);
        color: var(--coral);
        border: 1px solid #f3c9cb;
    }

    .customer-alert.success {
        background: var(--mint-soft);
        color: var(--mint);
        border: 1px solid #bfe6d4;
    }

/* ---------- Layout ---------- */
.product-detail {
    display: grid;
    grid-template-columns: minmax(0, 460px) 1fr;
    gap: 48px;
    margin-bottom: 56px;
}

/* ---------- Gallery ---------- */
.detail-gallery {
    display: flex;
    flex-direction: column;
}

.detail-main-image {
    aspect-ratio: 1 / 1;
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--radius-lg);
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    padding: 28px;
}

    .detail-main-image img {
        max-width: 100%;
        max-height: 100%;
        object-fit: contain;
    }

.detail-thumbnails {
    scrollbar-width: thin;
}

    .detail-thumbnails .thumb-item {
        border: 1px solid var(--line) !important;
        border-radius: var(--radius-sm) !important;
        background: var(--surface);
        transition: border-color 0.15s ease;
    }

        .detail-thumbnails .thumb-item:hover {
            border-color: #c3c9dc !important;
        }

        .detail-thumbnails .thumb-item.border-primary {
            border-color: var(--accent) !important;
            box-shadow: 0 0 0 1px var(--accent);
        }

/* ---------- Copy / buy box ---------- */
.detail-copy {
    display: flex;
    flex-direction: column;
}

.eyebrow {
    font-size: 12px;
    font-weight: 600;
    letter-spacing: 0.04em;
    color: var(--accent);
}

.detail-copy h1 {
    font-family: 'Space Grotesk', sans-serif;
    font-size: 30px;
    font-weight: 700;
    line-height: 1.2;
    margin: 8px 0 12px;
    color: var(--ink);
}

.rating {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
    font-weight: 600;
    color: var(--ink);
    margin-bottom: 16px;
}

    .rating span {
        color: #f5a623;
        letter-spacing: 1px;
    }

    .rating small {
        color: var(--ink-soft);
        font-weight: 400;
    }

.detail-price {
    font-family: 'Space Grotesk', sans-serif;
    font-size: 30px;
    font-weight: 700;
    color: var(--accent);
    margin-bottom: 16px;
}

.detail-copy > p {
    color: var(--ink-soft);
    font-size: 15px;
    line-height: 1.6;
    margin-bottom: 24px;
}

.buy-box {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-end;
    gap: 14px;
    background: var(--bg);
    border: 1px solid var(--line);
    border-radius: var(--radius-lg);
    padding: 20px;
    margin-bottom: 14px;
}

    .buy-box label {
        display: flex;
        flex-direction: column;
        gap: 6px;
        font-size: 12px;
        font-weight: 600;
        color: var(--ink-soft);
        flex: 1 1 180px;
    }

    .buy-box select,
    .buy-box input[type="number"] {
        font-family: inherit;
        font-size: 14px;
        font-weight: 500;
        color: var(--ink);
        background: var(--surface);
        border: 1px solid var(--line);
        border-radius: var(--radius-sm);
        padding: 10px 12px;
        outline: none;
    }

        .buy-box select:focus,
        .buy-box input[type="number"]:focus {
            border-color: var(--accent);
        }

    .buy-box input[type="number"] {
        width: 100%;
    }

.customer-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    font-size: 14px;
    font-weight: 600;
    border-radius: var(--radius-sm);
    padding: 12px 22px;
    border: 1px solid var(--line);
    background: var(--surface);
    color: var(--ink);
    cursor: pointer;
    white-space: nowrap;
    transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease, opacity 0.15s ease;
}

    .customer-button:hover {
        border-color: var(--accent);
        color: var(--accent);
    }

    .customer-button:disabled {
        opacity: 0.5;
        cursor: not-allowed;
    }

.customer-button-buy {
    background: var(--accent);
    border-color: var(--accent);
    color: #fff;
}

    .customer-button-buy:hover {
        background: var(--accent-ink);
        border-color: var(--accent-ink);
        color: #fff;
    }

.customer-button-light {
    background: transparent;
    border-color: var(--line);
    color: var(--ink-soft);
}

.detail-favorite {
    margin-bottom: 28px;
}

.detail-specs {
    display: grid;
    grid-template-columns: 140px 1fr;
    gap: 10px 16px;
    font-size: 14px;
    border-top: 1px solid var(--line);
    padding-top: 20px;
}

    .detail-specs dt {
        font-weight: 600;
        color: var(--ink);
    }

    .detail-specs dd {
        margin: 0;
        color: var(--ink-soft);
        line-height: 1.6;
    }

/* ---------- Reviews ---------- */
.reviews-section {
    border-top: 1px solid var(--line);
    padding-top: 32px;
}

.section-heading {
    margin-bottom: 20px;
}

    .section-heading h2 {
        font-family: 'Space Grotesk', sans-serif;
        font-size: 22px;
        font-weight: 700;
        margin: 4px 0 0;
        color: var(--ink);
    }

.muted {
    color: var(--ink-soft);
    font-size: 14px;
}

.review-item {
    border: 1px solid var(--line);
    border-radius: var(--radius-md);
    padding: 16px 18px;
    margin-bottom: 12px;
    background: var(--surface);
}

    .review-item strong {
        font-size: 14px;
        color: var(--ink);
        margin-right: 8px;
    }

.review-stars {
    color: #f5a623;
    font-size: 13px;
    letter-spacing: 1px;
}

.review-item p {
    margin: 8px 0 6px;
    font-size: 14px;
    color: var(--ink-soft);
    line-height: 1.6;
}

.review-item small {
    color: #9aa0b0;
    font-size: 12px;
}

/* ---------- Responsive ---------- */
@media (max-width: 860px) {
    .product-detail {
        grid-template-columns: 1fr;
        gap: 32px;
    }

    .detail-copy h1, .detail-price {
        font-size: 24px;
    }

    .buy-box {
        flex-direction: column;
        align-items: stretch;
    }

    .detail-specs {
        grid-template-columns: 1fr;
    }
}
