/* ── Reset ────────────────────────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
    --purple:      #6a0dad;
    --purple-dark: #520a8a;
    --purple-light: #f3e8ff;
    --text:        #1a1a1a;
    --muted:       #666;
    --border:      #e0e0e0;
    --bg:          #f7f7f7;
    --white:       #ffffff;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    background: var(--bg);
    color: var(--text);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* ── Header ──────────────────────────────────────────────────────────────── */
header {
    background: var(--white);
    border-bottom: 1px solid var(--border);
}

.site-banner {
    display: block;
    width: 100%;
    height: auto;
}

.header-inner {
    max-width: 1100px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 72px;
}

.brand h1 {
    font-size: 22px;
    font-weight: 800;
    color: var(--purple);
    letter-spacing: -0.5px;
}

.tagline {
    font-size: 12px;
    color: var(--muted);
    letter-spacing: 0.5px;
    margin-top: 2px;
}

.nav-links {
    display: flex;
    gap: 28px;
}

.nav-links a {
    text-decoration: none;
    color: var(--muted);
    font-size: 14px;
    font-weight: 500;
    transition: color 0.15s;
}
.nav-links a:hover { color: var(--purple); }

/* ── Main ────────────────────────────────────────────────────────────────── */
main {
    flex: 1;
    max-width: 1100px;
    margin: 48px auto;
    padding: 0 24px;
    width: 100%;
}

/* ── Product layout ──────────────────────────────────────────────────────── */
.product {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 64px;
    align-items: start;
    background: var(--white);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 48px;
}

/* ── Product image ───────────────────────────────────────────────────────── */
.product-image-wrap {
    position: relative;
    background: #f0ede8;
    border-radius: 8px;
    overflow: hidden;
    aspect-ratio: 4/3;
    display: flex;
    align-items: center;
    justify-content: center;
}

#productImage {
    width: 100%;
    height: 100%;
    object-fit: contain;
    padding: 24px;
    cursor: zoom-in;
}

/* ── Lightbox ────────────────────────────────────────────────────────────── */
.lightbox-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.85);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 200;
    padding: 24px;
}

.lightbox-overlay.hidden { display: none; }

#lightboxImg {
    max-width: 90vw;
    max-height: 90vh;
    object-fit: contain;
    border-radius: 8px;
    box-shadow: 0 8px 48px rgba(0,0,0,0.6);
}

.lightbox-close {
    position: fixed;
    top: 20px;
    right: 28px;
    background: none;
    border: none;
    color: #fff;
    font-size: 42px;
    cursor: pointer;
    line-height: 1;
    opacity: 0.8;
}
.lightbox-close:hover { opacity: 1; }

.image-placeholder {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
    color: var(--muted);
}
.image-placeholder span { font-size: 64px; }
.image-placeholder p { font-size: 14px; }

/* ── Product details ─────────────────────────────────────────────────────── */
.product-details {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.product-category {
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 2px;
    text-transform: uppercase;
    color: var(--purple);
}

.product-details h2 {
    font-size: 32px;
    font-weight: 800;
    line-height: 1.15;
    color: var(--text);
}

.product-desc {
    font-size: 16px;
    color: var(--muted);
    line-height: 1.6;
}

.product-price-row {
    margin-top: 4px;
}

.product-price {
    font-size: 28px;
    font-weight: 700;
    color: var(--text);
}

.product-note {
    font-size: 13px;
    color: var(--muted);
    padding: 12px 16px;
    background: var(--purple-light);
    border-radius: 6px;
    line-height: 1.5;
}

/* ── Order button ────────────────────────────────────────────────────────── */
.btn-order {
    margin-top: 8px;
    background: var(--purple);
    color: #fff;
    border: none;
    border-radius: 8px;
    padding: 16px 32px;
    font-size: 17px;
    font-weight: 700;
    cursor: pointer;
    width: 100%;
    transition: background 0.15s, transform 0.1s;
    letter-spacing: 0.3px;
}
.btn-order:hover  { background: var(--purple-dark); }
.btn-order:active { transform: scale(0.98); }

/* ── Not found ───────────────────────────────────────────────────────────── */
.not-found {
    text-align: center;
    padding: 80px 24px;
    color: var(--muted);
}
.not-found h2 { font-size: 28px; margin-bottom: 12px; color: var(--text); }

/* ── Modal ───────────────────────────────────────────────────────────────── */
.modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 100;
    padding: 24px;
}

.modal {
    background: var(--white);
    border-radius: 16px;
    padding: 48px 40px 40px;
    max-width: 420px;
    width: 100%;
    text-align: center;
    position: relative;
    box-shadow: 0 20px 60px rgba(0,0,0,0.25);
}

.modal-close {
    position: absolute;
    top: 16px;
    right: 20px;
    background: none;
    border: none;
    font-size: 24px;
    cursor: pointer;
    color: var(--muted);
    line-height: 1;
}
.modal-close:hover { color: var(--text); }

.modal-icon { font-size: 56px; margin-bottom: 16px; }

.modal h3 {
    font-size: 24px;
    font-weight: 800;
    margin-bottom: 12px;
    color: var(--text);
}

.modal p {
    font-size: 16px;
    color: var(--muted);
    line-height: 1.6;
    margin-bottom: 28px;
}

.btn-modal-ok {
    background: var(--purple);
    color: #fff;
    border: none;
    border-radius: 8px;
    padding: 14px 40px;
    font-size: 16px;
    font-weight: 700;
    cursor: pointer;
    transition: background 0.15s;
}
.btn-modal-ok:hover { background: var(--purple-dark); }

/* ── Footer ──────────────────────────────────────────────────────────────── */
footer {
    text-align: center;
    padding: 24px;
    font-size: 12px;
    color: var(--muted);
    border-top: 1px solid var(--border);
    background: var(--white);
    margin-top: 48px;
}

/* ── Utility ─────────────────────────────────────────────────────────────── */
.hidden { display: none !important; }

/* ── Responsive ──────────────────────────────────────────────────────────── */
@media (max-width: 700px) {
    .product {
        grid-template-columns: 1fr;
        gap: 32px;
        padding: 28px;
    }
    .header-inner { height: 60px; }
    .brand h1 { font-size: 18px; }
    .nav-links { display: none; }
    .product-details h2 { font-size: 26px; }
    main { margin: 24px auto; }
}
