/* Luna et Sol – LetsShopMX Theme */
:root {
    --color-gold: #bfa181;
    --color-burgundy: #5b0b0d;
    --color-accent: #cc2b5e;
    --color-text: #444444;
    --color-muted: #888888;
    --color-bg: #faf8f5;
    --color-white: #ffffff;
    --font-serif: Georgia, 'Times New Roman', serif;
    --font-sans: 'Segoe UI', system-ui, sans-serif;
    --radius: 10px;
    --shadow: 0 2px 12px rgba(91, 11, 13, 0.08);
}

*, *::before, *::after { box-sizing: border-box; }

body {
    margin: 0;
    font-family: var(--font-serif);
    color: var(--color-text);
    background: var(--color-bg);
    line-height: 1.6;
}

a { color: var(--color-accent); text-decoration: none; transition: color .2s; }
a:hover { color: var(--color-burgundy); }

.container { max-width: 1200px; margin: 0 auto; padding: 0 1.25rem; }

/* Header */
.site-header {
    background: var(--color-white);
    border-bottom: 1px solid var(--color-gold);
    position: sticky;
    top: 0;
    z-index: 100;
}

.header-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1rem 0;
    gap: 1rem;
    flex-wrap: wrap;
}

.logo {
    font-size: 1.5rem;
    color: var(--color-burgundy);
    letter-spacing: 1px;
    font-weight: normal;
}

.logo span { color: var(--color-gold); }

.main-nav { display: flex; gap: 1.5rem; flex-wrap: wrap; }
.main-nav a { color: var(--color-text); font-size: .95rem; }
.main-nav a:hover, .main-nav a.active { color: var(--color-accent); }

.header-actions { display: flex; align-items: center; gap: 1rem; }
.cart-link {
    position: relative;
    color: var(--color-burgundy);
    font-size: 1.25rem;
}
.cart-badge {
    position: absolute;
    top: -8px; right: -10px;
    background: var(--color-accent);
    color: #fff;
    font-size: .7rem;
    width: 18px; height: 18px;
    border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    font-family: var(--font-sans);
}

/* Hero */
.hero {
    text-align: center;
    padding: 3rem 1rem 2rem;
    background: linear-gradient(180deg, #fff 0%, var(--color-bg) 100%);
}

.hero h1 {
    font-size: clamp(1.5rem, 4vw, 2.25rem);
    color: var(--color-burgundy);
    font-weight: normal;
    margin: 0 0 .5rem;
}

.hero p { color: var(--color-muted); font-size: 1.1rem; margin: 0; }

/* Category grid */
.section-title {
    text-align: center;
    font-size: 1.6rem;
    color: var(--color-burgundy);
    font-weight: normal;
    margin: 2.5rem 0 1.5rem;
}

.category-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 1rem;
    margin-bottom: 2rem;
}

.category-card {
    border: 1px solid var(--color-gold);
    border-radius: var(--radius);
    overflow: hidden;
    transition: border-color .3s, transform .3s;
    background: var(--color-white);
}

.category-card:hover {
    border-color: var(--color-burgundy);
    transform: translateY(-2px);
}

.category-card img {
    width: 100%;
    aspect-ratio: 1;
    object-fit: cover;
    transition: transform .4s, filter .4s;
}

.category-card:hover img {
    transform: scale(1.1);
    filter: grayscale(100%);
}

.category-card h3 {
    text-align: center;
    font-size: 1rem;
    font-weight: normal;
    padding: .75rem;
    margin: 0;
}

/* Product grid */
.product-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
    gap: 1.5rem;
    margin: 2rem 0;
}

.product-card {
    background: var(--color-white);
    border: 1px solid var(--color-gold);
    border-radius: var(--radius);
    overflow: hidden;
    transition: border-color .3s;
}

.product-card:hover { border-color: var(--color-burgundy); }

.product-card-image {
    display: block;
    overflow: hidden;
    aspect-ratio: 1;
}

.product-card-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform .4s, filter .4s;
}

.product-card:hover .product-card-image img {
    transform: scale(1.12);
    filter: grayscale(100%);
}

.product-card-body { padding: 1rem; text-align: center; }
.product-card-body h3 { font-size: 1rem; font-weight: normal; margin: 0 0 .5rem; }
.product-card-body h3 a { color: var(--color-text); }
.product-price { font-size: 1.1rem; color: var(--color-burgundy); }
.product-price .old { text-decoration: line-through; color: var(--color-muted); font-size: .9rem; margin-right: .5rem; }

/* Product detail & gallery */
.product-detail {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2.5rem;
    margin: 2rem 0 3rem;
}

@media (max-width: 768px) {
    .product-detail { grid-template-columns: 1fr; }
}

.product-gallery { position: relative; }

.gallery-main {
    border: 1px solid var(--color-gold);
    border-radius: var(--radius);
    overflow: hidden;
    aspect-ratio: 1;
    position: relative;
    background: var(--color-white);
}

.gallery-main img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: opacity .3s;
}

.gallery-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: transparent;
    border: 1px solid #aaa;
    border-radius: 50%;
    width: 36px; height: 36px;
    cursor: pointer;
    display: flex; align-items: center; justify-content: center;
    color: var(--color-text);
    transition: all .2s;
    z-index: 2;
}

.gallery-nav:hover { background: var(--color-accent); border-color: var(--color-accent); color: #fff; }
.gallery-prev { left: 12px; }
.gallery-next { right: 12px; }

.gallery-grid-toggle {
    position: absolute;
    bottom: 12px; right: 12px;
    background: rgba(255,255,255,.9);
    border: 1px solid var(--color-gold);
    border-radius: 8px;
    padding: 6px 10px;
    cursor: pointer;
    font-size: .85rem;
    display: flex; align-items: center; gap: 6px;
    z-index: 2;
}

.gallery-thumbs {
    display: flex;
    gap: .5rem;
    margin-top: .75rem;
    flex-wrap: wrap;
}

.gallery-thumb {
    width: 64px; height: 64px;
    border: 2px solid transparent;
    border-radius: 6px;
    overflow: hidden;
    cursor: pointer;
    opacity: .7;
    transition: all .2s;
}

.gallery-thumb.active, .gallery-thumb:hover {
    border-color: var(--color-accent);
    opacity: 1;
}

.gallery-thumb img { width: 100%; height: 100%; object-fit: cover; }

.gallery-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(250,248,245,.95);
    z-index: 1000;
    padding: 2rem;
    overflow-y: auto;
}

.gallery-overlay.open { display: block; }

.gallery-overlay-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 1rem;
    max-width: 900px;
    margin: 2rem auto;
}

.gallery-overlay-grid img {
    width: 100%;
    border-radius: var(--radius);
    border: 1px solid var(--color-gold);
    cursor: pointer;
}

.gallery-overlay-close {
    position: fixed;
    top: 1rem; right: 1rem;
    background: var(--color-burgundy);
    color: #fff;
    border: none;
    width: 40px; height: 40px;
    border-radius: 50%;
    cursor: pointer;
    font-size: 1.25rem;
}

.product-info h1 {
    font-size: 1.75rem;
    color: var(--color-burgundy);
    font-weight: normal;
    margin: 0 0 1rem;
}

.product-rating { color: var(--color-gold); margin-bottom: 1rem; }
.product-rating-link { color: inherit; text-decoration: none; }
.product-rating-link:hover { text-decoration: underline; }

.product-tabs-wrap { margin: 2.5rem 0; }
.product-tabs {
    display: flex;
    flex-wrap: wrap;
    list-style: none;
    margin: 0;
    padding: 0;
    border-bottom: 2px solid var(--color-gold);
}
.product-tabs li { margin: 0; }
.product-tabs a {
    display: block;
    padding: .85rem 1.25rem;
    color: var(--color-burgundy);
    text-decoration: none;
    border: 1px solid transparent;
    border-bottom: none;
    margin-bottom: -2px;
}
.product-tabs a:hover { color: var(--color-pink); }
.product-tab-panel { display: none; }
.product-tab-panel:target { display: block; }
.product-tabs-wrap:not(:has(.product-tab-panel:target)) .product-tab-panel:first-of-type { display: block; }
.product-tabs-wrap:has(#tab-description:target) .product-tabs a[href="#tab-description"],
.product-tabs-wrap:has(#tab-reviews:target) .product-tabs a[href="#tab-reviews"],
.product-tabs-wrap:not(:has(.product-tab-panel:target)) .product-tabs a:first-child {
    background: #fff;
    border-color: var(--color-gold);
    border-bottom-color: #fff;
}
.product-tab-content {
    background: #fff;
    border: 1px solid var(--color-gold);
    border-top: none;
    border-radius: 0 0 var(--radius) var(--radius);
    padding: 1.5rem;
}
.review-form { max-width: 480px; }

.btn {
    display: inline-block;
    background: var(--color-accent);
    color: #fff !important;
    border: none;
    padding: .75rem 1.75rem;
    border-radius: 25px;
    font-family: var(--font-serif);
    font-size: 1rem;
    cursor: pointer;
    transition: background .2s;
}

.btn:hover { background: var(--color-burgundy); color: #fff !important; }
.btn-outline {
    background: transparent;
    border: 1px solid var(--color-gold);
    color: var(--color-text) !important;
}
.btn-outline:hover { border-color: var(--color-accent); color: var(--color-accent) !important; background: transparent; }

.form-group { margin-bottom: 1rem; }
.form-group label { display: block; margin-bottom: .35rem; font-size: .9rem; }
.form-group input, .form-group select, .form-group textarea {
    width: 100%;
    padding: .6rem .75rem;
    border: 1px solid var(--color-gold);
    border-radius: 6px;
    font-family: inherit;
    font-size: 1rem;
    background: var(--color-white);
}

.flash {
    padding: .75rem 1rem;
    border-radius: 6px;
    margin: 1rem 0;
    border-left: 4px solid;
}
.flash-success { background: #edf7f0; border-color: #2d6a4f; }
.flash-error { background: #fdf0f0; border-color: #cf2e2e; }

/* Footer */
.site-footer {
    background: var(--color-burgundy);
    color: var(--color-gold);
    text-align: center;
    padding: 2rem 1rem;
    margin-top: 3rem;
}

.site-footer a { color: var(--color-gold); }
.site-footer p { margin: .25rem 0; font-size: .9rem; }

/* Tables */
.data-table { width: 100%; border-collapse: collapse; background: #fff; border-radius: var(--radius); overflow: hidden; }
.data-table th, .data-table td { padding: .75rem 1rem; text-align: left; border-bottom: 1px solid #eee; }
.data-table th { background: #f5f0ea; font-weight: normal; color: var(--color-burgundy); }

/* Reviews */
.reviews-section { margin-top: 0; padding-top: 0; border-top: none; }
.review-item { background: #fff; border: 1px solid #eee; border-radius: var(--radius); padding: 1rem; margin-bottom: 1rem; }
.stars { color: var(--color-gold); letter-spacing: 2px; }
