/* First Density Material — Dark Alchemist Theme */
@import url('https://fonts.googleapis.com/css2?family=Cinzel:wght@400;600;700&family=Raleway:wght@300;400;500;600&display=swap');

:root {
    --bg-dark: #0a0a0f;
    --bg-card: #12121a;
    --bg-input: #1a1a26;
    --bg-hover: #1e1e2e;
    --border: #2a2a3d;
    --border-glow: #c9953c;
    --gold: #c9953c;
    --gold-light: #e6b85c;
    --gold-dim: #8b6914;
    --copper: #b87333;
    --copper-light: #da8a47;
    --text: #e0ddd5;
    --text-dim: #8a8790;
    --text-bright: #f5f3ee;
    --danger: #9e3030;
    --danger-light: #c44040;
    --success: #2e6b3a;
    --success-light: #3d8c4e;
    --info: #2a5a8a;
}

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

body {
    background: var(--bg-dark) url('/static/img/bg-ghosted.jpg') center top / cover no-repeat fixed;
    color: var(--text);
    font-family: 'Raleway', sans-serif;
    font-weight: 400;
    line-height: 1.6;
    min-height: 100vh;
}

h1, h2, h3, h4, h5 {
    font-family: 'Cinzel', serif;
    color: var(--gold);
    font-weight: 600;
    letter-spacing: 0.04em;
}

a { color: var(--gold); text-decoration: none; transition: color 0.2s; }
a:hover { color: var(--gold-light); }

/* Layout */
.container { max-width: 1200px; margin: 0 auto; padding: 0 20px; }
.container-narrow { max-width: 800px; margin: 0 auto; padding: 0 20px; }

/* Navbar */
.navbar {
    background: linear-gradient(180deg, #0f0f18, #0a0a0f);
    border-bottom: 1px solid var(--border);
    padding: 15px 0;
    position: sticky;
    top: 0;
    z-index: 100;
}
.navbar .container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 10px;
}
.navbar-brand {
    font-family: 'Cinzel', serif;
    font-size: 1.3rem;
    font-weight: 700;
    color: var(--gold) !important;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}
.navbar-brand:hover { color: var(--gold-light) !important; }
.navbar-logo { height: 50px; width: auto; display: block; }
.nav-links { display: flex; gap: 24px; align-items: center; }
.nav-links a {
    color: var(--text-dim);
    font-size: 0.9rem;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    transition: color 0.2s;
}
.nav-links a:hover, .nav-links a.active { color: var(--gold); }

/* Nav dropdown */
.nav-dropdown { position: relative; }
.nav-dropdown-trigger { cursor: pointer; }
.nav-dropdown-trigger::after {
    content: '';
    display: inline-block;
    width: 0; height: 0;
    border-left: 4px solid transparent;
    border-right: 4px solid transparent;
    border-top: 4px solid currentColor;
    margin-left: 5px;
    vertical-align: middle;
}
.nav-dropdown-menu {
    display: none;
    position: absolute;
    top: 100%;
    left: 50%;
    transform: translateX(-50%);
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 8px 0;
    min-width: 200px;
    z-index: 1000;
    box-shadow: 0 8px 24px rgba(0,0,0,0.5);
    margin-top: 8px;
}
.nav-dropdown:hover .nav-dropdown-menu { display: block; }
.nav-dropdown-menu a {
    display: block;
    padding: 8px 20px;
    color: var(--text-dim) !important;
    font-size: 0.85rem !important;
    text-transform: none !important;
    letter-spacing: 0 !important;
    white-space: nowrap;
}
.nav-dropdown-menu a:hover {
    background: var(--bg-hover);
    color: var(--gold) !important;
}

.social-page-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 20px;
}
.social-page-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 32px 20px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 10px;
    text-decoration: none;
    transition: all 0.25s ease;
}
.social-page-card:hover {
    border-color: var(--gold);
    transform: translateY(-4px);
    box-shadow: 0 8px 24px rgba(201, 149, 60, 0.15);
}
.social-page-icon {
    width: 56px;
    height: 56px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: var(--bg-input);
    border: 1px solid var(--border);
    color: var(--gold);
    margin-bottom: 16px;
}
.social-page-icon svg { width: 28px; height: 28px; }
.social-page-card:hover .social-page-icon {
    background: var(--gold);
    color: var(--bg-dark);
    border-color: var(--gold);
}
.social-page-name {
    font-family: 'Cinzel', Georgia, serif;
    font-size: 1rem;
    color: var(--text-bright);
    margin-bottom: 6px;
}
.social-page-url {
    font-size: 0.75rem;
    color: var(--text-dim);
}
.social-qr-section {
    margin-top: 48px;
    padding-top: 24px;
}
.social-qr-wrap {
    display: flex;
    justify-content: center;
}
.social-qr-img {
    width: 220px;
    height: 220px;
    border-radius: 12px;
    border: 2px solid var(--border);
    padding: 12px;
    background: #fff;
    filter: drop-shadow(0 4px 16px rgba(201, 149, 60, 0.15));
}
.retail-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 24px;
}
.retail-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 10px;
    padding: 24px;
    transition: border-color 0.2s;
}
.retail-card:hover { border-color: var(--gold-dim); }
.retail-card-header {
    display: flex;
    align-items: center;
    gap: 14px;
    margin-bottom: 14px;
}
.retail-logo {
    width: 56px;
    height: 56px;
    object-fit: cover;
    border-radius: 8px;
    border: 1px solid var(--border);
}
.retail-name {
    font-family: 'Cinzel', Georgia, serif;
    font-size: 1.1rem;
    color: var(--gold);
}
.retail-location-text {
    font-size: 0.85rem;
    color: var(--text-dim);
    margin-top: 2px;
}
.retail-desc {
    color: var(--text-dim);
    font-size: 0.9rem;
    line-height: 1.6;
    margin-bottom: 14px;
}
.retail-detail {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    font-size: 0.85rem;
    color: var(--text-dim);
    margin-bottom: 8px;
}
.retail-socials {
    display: flex;
    gap: 10px;
    margin-top: 16px;
    padding-top: 14px;
    border-top: 1px solid var(--border);
}
.retail-social-link {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 34px;
    height: 34px;
    border-radius: 50%;
    background: var(--bg-input);
    border: 1px solid var(--border);
    color: var(--text-dim);
    transition: all 0.2s;
}
.retail-social-link:hover {
    color: var(--gold);
    border-color: var(--gold);
}
.retail-social-link svg { width: 16px; height: 16px; }
.cart-icon { position: relative; }
.cart-count {
    position: absolute;
    top: -8px; right: -12px;
    background: var(--gold);
    color: var(--bg-dark);
    font-size: 0.65rem;
    font-weight: 700;
    width: 18px; height: 18px;
    border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
}

/* Hero */
.hero {
    text-align: center;
    padding: 80px 20px;
    background: url('../img/goddess-hero.jpg') center center / cover no-repeat;
    border-bottom: 1px solid var(--border);
}
.hero-logo { width: 200px; height: auto; margin-bottom: 24px; opacity: 0.9; }
.hero h1 {
    font-size: 2.8rem;
    margin-bottom: 16px;
    text-shadow: 0 0 40px rgba(201, 149, 60, 0.15);
}
.hero p {
    font-size: 1.15rem;
    color: var(--text-dim);
    font-style: italic;
    letter-spacing: 0.06em;
}

/* Section */
/* Page hero banner — ghosted background on all public pages */
.page-hero {
    background: url('../img/goddess-hero.jpg') center center / cover no-repeat;
    padding: 44px 20px;
    text-align: center;
    border-bottom: 1px solid var(--border);
    margin-bottom: 32px;
}
.page-hero .section-title {
    margin-bottom: 0;
}
.page-hero .section-title::after {
    margin-top: 16px;
}
.page-hero-subtitle {
    color: var(--text-dim);
    font-size: 0.95rem;
    margin-top: 12px;
}

.section { padding: 50px 0; background: rgba(10,10,15,0.85); }
.section-title {
    text-align: center;
    margin-bottom: 40px;
    font-size: 1.6rem;
}
.section-title::after {
    content: '';
    display: block;
    width: 60px;
    height: 2px;
    background: var(--gold-dim);
    margin: 12px auto 0;
}

/* Product Grid */
/* Storefront hero */
.storefront-hero {
    text-align: center;
    padding: 48px 20px 40px;
    margin-bottom: 32px;
    margin-left: -20px;
    margin-right: -20px;
    background: url('../img/goddess-hero.jpg') center center / cover no-repeat;
    border-bottom: 1px solid var(--border);
}
.storefront-title {
    font-family: 'Cinzel', serif;
    font-size: 2.2rem;
    color: var(--gold);
    margin-bottom: 8px;
}
.storefront-tagline {
    font-size: 1.1rem;
    color: var(--gold-dim);
    font-style: italic;
    margin-bottom: 12px;
}
.storefront-desc {
    color: var(--text-dim);
    max-width: 600px;
    margin: 0 auto;
    font-size: 0.95rem;
    line-height: 1.7;
}
.storefront-scans .storefront-title { color: #5ca3e6; }
.storefront-scans .storefront-tagline { color: #3d7ab8; }
.storefront-copper .storefront-title { color: var(--copper-light); }
.storefront-copper .storefront-tagline { color: var(--copper); }
.storefront-recipes .storefront-title { color: var(--gold-light); }
.storefront-recipes .storefront-tagline { color: var(--gold-dim); }

.shop-section {
    margin-bottom: 48px;
}
.shop-section-header {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    border-bottom: 1px solid var(--border);
    padding-bottom: 12px;
    margin-bottom: 24px;
}
.shop-section-title {
    font-family: 'Cinzel', Georgia, serif;
    font-size: 1.3rem;
    color: var(--gold);
}
.shop-section-link {
    font-size: 0.85rem;
    color: var(--text-dim);
    text-decoration: none;
    transition: color 0.2s;
}
.shop-section-link:hover {
    color: var(--gold);
}
.product-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 24px;
}
.product-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 8px;
    overflow: hidden;
    transition: border-color 0.3s, transform 0.2s;
    cursor: pointer;
}
.product-card:hover {
    border-color: var(--gold-dim);
    transform: translateY(-3px);
}
.product-card-img {
    width: 100%;
    aspect-ratio: 1;
    object-fit: cover;
    background: var(--bg-input);
    display: block;
}
.product-card-body { padding: 16px; }
.product-card-name {
    font-family: 'Cinzel', serif;
    font-size: 1rem;
    color: var(--text-bright);
    margin-bottom: 6px;
}
.product-card-price {
    font-size: 1.1rem;
    color: var(--gold);
    font-weight: 600;
}
.product-card-price .compare {
    text-decoration: line-through;
    color: var(--text-dim);
    font-size: 0.85rem;
    margin-left: 8px;
    font-weight: 400;
}
.product-card-badge {
    display: inline-block;
    font-size: 0.7rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    padding: 2px 8px;
    border-radius: 3px;
    margin-top: 6px;
}
.badge-digital { background: var(--info); color: #fff; }
.badge-physical { background: var(--copper); color: #fff; }
.badge-oos { background: var(--danger); color: #fff; }

/* Product Detail */
.product-detail {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 40px;
    padding: 40px 0;
}
.product-gallery { position: relative; }
.product-gallery-main {
    width: 100%;
    border-radius: 8px;
    border: 1px solid var(--border);
    background: var(--bg-card);
    object-fit: contain;
    aspect-ratio: 1;
}
.product-gallery-thumbs {
    display: flex;
    gap: 8px;
    margin-top: 12px;
    flex-wrap: wrap;
}
.product-gallery-thumbs img {
    width: 64px; height: 64px;
    object-fit: cover;
    border-radius: 4px;
    border: 2px solid transparent;
    cursor: pointer;
    opacity: 0.6;
    transition: all 0.2s;
}
.product-gallery-thumbs img:hover,
.product-gallery-thumbs img.active {
    border-color: var(--gold);
    opacity: 1;
}
.product-info h1 {
    font-size: 2rem;
    margin-bottom: 10px;
}
.product-price {
    font-size: 1.6rem;
    color: var(--gold);
    font-weight: 700;
    margin-bottom: 20px;
}
.product-price .compare {
    text-decoration: line-through;
    color: var(--text-dim);
    font-size: 1rem;
    margin-left: 10px;
    font-weight: 400;
}
.product-description {
    color: var(--text);
    line-height: 1.8;
    margin-bottom: 24px;
    white-space: pre-wrap;
}
.product-meta {
    font-size: 0.85rem;
    color: var(--text-dim);
    margin-bottom: 20px;
}
.product-meta span { margin-right: 16px; }

/* Buttons */
.btn {
    display: inline-block;
    padding: 12px 28px;
    font-family: 'Raleway', sans-serif;
    font-size: 0.9rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.2s;
    text-align: center;
}
.btn-gold {
    background: linear-gradient(135deg, var(--gold), var(--copper));
    color: var(--bg-dark);
}
.btn-gold:hover {
    background: linear-gradient(135deg, var(--gold-light), var(--copper-light));
    color: var(--bg-dark);
}
.btn-outline {
    background: transparent;
    border: 1px solid var(--gold-dim);
    color: var(--gold);
}
.btn-outline:hover {
    background: var(--gold-dim);
    color: var(--bg-dark);
}
.btn-danger {
    background: var(--danger);
    color: #fff;
}
.btn-danger:hover { background: var(--danger-light); color: #fff; }
.btn-sm { padding: 6px 14px; font-size: 0.8rem; }
.btn-block { display: block; width: 100%; }
.btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* Quantity */
.qty-control {
    display: flex;
    align-items: center;
    gap: 0;
    margin-bottom: 20px;
}
.qty-control button {
    width: 36px; height: 36px;
    background: var(--bg-input);
    border: 1px solid var(--border);
    color: var(--text);
    font-size: 1.1rem;
    cursor: pointer;
    transition: background 0.2s;
}
.qty-control button:hover { background: var(--bg-hover); }
.qty-control input {
    width: 50px; height: 36px;
    text-align: center;
    background: var(--bg-input);
    border: 1px solid var(--border);
    border-left: none; border-right: none;
    color: var(--text);
    font-size: 1rem;
}

/* Cart */
.cart-table { width: 100%; border-collapse: collapse; margin-bottom: 24px; }
.cart-table th {
    text-align: left;
    padding: 12px;
    border-bottom: 2px solid var(--border);
    color: var(--text-dim);
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 0.06em;
}
.cart-table td {
    padding: 12px;
    border-bottom: 1px solid var(--border);
    vertical-align: middle;
}
.cart-table .cart-img {
    width: 60px; height: 60px;
    object-fit: cover;
    border-radius: 4px;
}
.cart-summary {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 24px;
    max-width: 400px;
    margin-left: auto;
}
.cart-summary-row {
    display: flex;
    justify-content: space-between;
    padding: 8px 0;
    color: var(--text-dim);
}
.cart-summary-row.total {
    border-top: 1px solid var(--border);
    margin-top: 8px;
    padding-top: 16px;
    color: var(--gold);
    font-size: 1.2rem;
    font-weight: 700;
}
.cart-empty {
    text-align: center;
    padding: 60px 0;
    color: var(--text-dim);
}

/* Forms */
.form-group { margin-bottom: 18px; }
.form-group label {
    display: block;
    margin-bottom: 6px;
    color: var(--text-dim);
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}
.form-control {
    width: 100%;
    padding: 10px 14px;
    background: var(--bg-input);
    border: 1px solid var(--border);
    border-radius: 4px;
    color: var(--text);
    font-family: 'Raleway', sans-serif;
    font-size: 0.95rem;
    transition: border-color 0.2s;
}
.form-control:focus {
    outline: none;
    border-color: var(--gold-dim);
}
textarea.form-control { min-height: 100px; resize: vertical; }
select.form-control {
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%238a8790' d='M6 8L1 3h10z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 12px center;
    padding-right: 32px;
}
.form-check {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 10px;
}
.form-check input[type="checkbox"] {
    accent-color: var(--gold);
    width: 16px; height: 16px;
}
.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
}
.form-inline { display: flex; gap: 10px; align-items: end; }
.form-inline .form-group { flex: 1; margin-bottom: 0; }

/* Flash Messages */
.flash {
    padding: 12px 20px;
    border-radius: 4px;
    margin-bottom: 20px;
    font-size: 0.9rem;
}
.flash-success { background: var(--success); color: #c8f0ce; border: 1px solid var(--success-light); }
.flash-error { background: var(--danger); color: #f0c8c8; border: 1px solid var(--danger-light); }

/* Tables */
.table {
    width: 100%;
    border-collapse: collapse;
}
.table th {
    text-align: left;
    padding: 10px 12px;
    background: var(--bg-input);
    color: var(--text-dim);
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    border-bottom: 2px solid var(--border);
}
.table td {
    padding: 10px 12px;
    border-bottom: 1px solid var(--border);
    vertical-align: middle;
}
.table tr:hover td { background: var(--bg-hover); }
.status-badge {
    display: inline-block;
    padding: 3px 10px;
    border-radius: 12px;
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    font-weight: 600;
}
.status-pending { background: #3d3520; color: var(--gold-light); }
.status-paid { background: #1d3d26; color: #6ddf80; }
.status-shipped { background: #1d2d4d; color: #6db8df; }
.status-delivered { background: #1d3d26; color: #6ddf80; }
.status-cancelled { background: #3d2020; color: #df6d6d; }
.status-refunded { background: #3d2020; color: #df6d6d; }

/* Admin Layout */
.admin-wrap {
    display: grid;
    grid-template-columns: 220px 1fr;
    min-height: calc(100vh - 60px);
}
.admin-sidebar {
    background: var(--bg-card);
    border-right: 1px solid var(--border);
    padding: 24px 0;
}
.admin-sidebar a {
    display: block;
    padding: 10px 24px;
    color: var(--text-dim);
    font-size: 0.9rem;
    transition: all 0.2s;
    border-left: 3px solid transparent;
}
.admin-sidebar a:hover {
    background: var(--bg-hover);
    color: var(--text);
}
.admin-sidebar a.active {
    color: var(--gold);
    border-left-color: var(--gold);
    background: var(--bg-hover);
}
.admin-sidebar .sidebar-section {
    font-size: 0.7rem;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--text-dim);
    padding: 20px 24px 6px;
    opacity: 0.6;
}
.admin-content { padding: 30px; }
.admin-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 24px;
    flex-wrap: wrap;
    gap: 12px;
}
.admin-header h1 { font-size: 1.5rem; margin: 0; }

/* Stats Cards */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 16px;
    margin-bottom: 30px;
}
.stat-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 20px;
}
.stat-card .stat-value {
    font-size: 2rem;
    font-weight: 700;
    color: var(--gold);
    font-family: 'Cinzel', serif;
}
.stat-card .stat-label {
    font-size: 0.8rem;
    color: var(--text-dim);
    text-transform: uppercase;
    letter-spacing: 0.06em;
    margin-top: 4px;
}

/* Image management */
.image-list { display: flex; gap: 12px; flex-wrap: wrap; margin-bottom: 16px; }
.image-item {
    position: relative;
    width: 100px; height: 100px;
    border-radius: 6px;
    overflow: hidden;
    border: 1px solid var(--border);
}
.image-item img { width: 100%; height: 100%; object-fit: cover; }
.image-item .img-delete {
    position: absolute;
    top: 4px; right: 4px;
    background: var(--danger);
    color: #fff;
    border: none;
    width: 22px; height: 22px;
    border-radius: 50%;
    cursor: pointer;
    font-size: 0.7rem;
    display: flex; align-items: center; justify-content: center;
}
.img-move {
    display: inline-flex; align-items: center; justify-content: center;
    width: 18px; height: 18px;
    background: rgba(0,0,0,0.7);
    color: var(--gold) !important;
    border-radius: 3px;
    font-size: 0.55rem;
    cursor: pointer;
    text-decoration: none;
    transition: background 0.2s;
}
.img-move:hover { background: var(--gold); color: var(--bg-dark) !important; }

/* Footer */
.footer {
    border-top: 1px solid var(--border);
    padding: 30px 0;
    text-align: center;
    color: var(--text-dim);
    font-size: 0.85rem;
    margin-top: 60px;
}
.social-links {
    display: flex;
    justify-content: center;
    gap: 16px;
    margin-bottom: 16px;
}
.social-link {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: var(--bg-card);
    border: 1px solid var(--border);
    color: var(--text-dim);
    transition: all 0.2s ease;
}
.social-link:hover {
    color: var(--gold);
    border-color: var(--gold);
    transform: translateY(-2px);
}

/* Order success */
.order-box {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 30px;
    margin: 30px auto;
    max-width: 600px;
    text-align: center;
}
.order-box h1 { font-size: 1.8rem; margin-bottom: 16px; }
.order-number {
    font-size: 1.4rem;
    color: var(--copper-light);
    font-family: 'Cinzel', serif;
    margin-bottom: 20px;
}

/* Category filter */
.category-filter {
    display: flex;
    gap: 12px;
    margin-bottom: 30px;
    flex-wrap: wrap;
    justify-content: center;
}
.category-filter a {
    padding: 6px 18px;
    border: 1px solid var(--border);
    border-radius: 20px;
    color: var(--text-dim);
    font-size: 0.85rem;
    transition: all 0.2s;
}
.category-filter a:hover,
.category-filter a.active {
    border-color: var(--gold);
    color: var(--gold);
    background: rgba(201, 149, 60, 0.08);
}

/* Login Page */
.login-box {
    max-width: 380px;
    margin: 80px auto;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 40px;
}
.login-box h1 { text-align: center; font-size: 1.4rem; margin-bottom: 24px; }

/* Mobile hamburger button */
.nav-toggle {
    display: none;
    background: none;
    border: none;
    color: var(--text);
    font-size: 1.5rem;
    cursor: pointer;
    padding: 4px 8px;
    line-height: 1;
}

/* Responsive — Tablet */
@media (max-width: 768px) {
    .product-detail { grid-template-columns: 1fr; gap: 24px; }
    .hero h1 { font-size: 1.8rem; }
    .hero { padding: 50px 20px; }
    .hero-logo { width: 140px; }
    .admin-wrap { grid-template-columns: 1fr; }
    .admin-sidebar {
        display: flex;
        overflow-x: auto;
        padding: 8px;
        gap: 4px;
    }
    .admin-sidebar a {
        white-space: nowrap;
        padding: 8px 14px;
        border-left: none;
        border-bottom: 2px solid transparent;
        font-size: 0.8rem;
    }
    .admin-sidebar a.active { border-bottom-color: var(--gold); border-left: none; }
    .admin-sidebar .sidebar-section { display: none; }
    .form-row { grid-template-columns: 1fr; }
    .cart-table { font-size: 0.85rem; }
    .cart-table .cart-img { width: 40px; height: 40px; }
    .container { padding: 0 12px; }
    .storefront-title { font-size: 1.6rem; }
    .storefront-hero { padding: 32px 16px 28px; }
    .page-hero { padding: 32px 16px; }
    .retail-grid { grid-template-columns: 1fr; }
    .login-box { max-width: 100%; margin: 40px 16px; padding: 24px; }
    .cart-summary { max-width: 100%; }
    .course-detail-hero { grid-template-columns: 1fr; gap: 20px; }
    .course-player { grid-template-columns: 1fr; }
    .course-player-sidebar {
        display: none;
        position: fixed;
        top: 0; left: 0; bottom: 0;
        width: 300px;
        z-index: 200;
        max-height: 100vh;
        top: 0;
    }
    .course-player-sidebar.open { display: block; }
    .course-sidebar-toggle { display: block; }
    .course-player-main { padding: 16px; }
    .course-grid { grid-template-columns: 1fr; }
    .product-grid { grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 16px; }
    .gallery-image-grid { grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 12px; }

    /* Hamburger nav */
    .nav-toggle { display: block; }
    .nav-links {
        display: none;
        flex-direction: column;
        width: 100%;
        gap: 0;
        background: var(--bg-card);
        border-top: 1px solid var(--border);
        margin-top: 10px;
        border-radius: 8px;
        overflow: hidden;
    }
    .nav-links.open { display: flex; }
    .nav-links a,
    .nav-links .nav-dropdown-trigger {
        padding: 14px 20px;
        border-bottom: 1px solid var(--border);
        font-size: 0.9rem !important;
        text-align: left;
        width: 100%;
        display: block;
    }
    .nav-links a:last-child { border-bottom: none; }

    /* Dropdown becomes inline on mobile */
    .nav-dropdown { width: 100%; }
    .nav-dropdown-trigger::after { display: none; }
    .nav-dropdown-menu {
        display: none;
        position: static;
        transform: none;
        background: var(--bg-input);
        border: none;
        border-radius: 0;
        box-shadow: none;
        margin-top: 0;
        padding: 0;
        min-width: auto;
    }
    .nav-dropdown.open .nav-dropdown-menu { display: block; }
    .nav-dropdown-menu a {
        padding: 12px 20px 12px 36px !important;
        border-bottom: 1px solid var(--border) !important;
    }
}

/* Responsive — Small phones */
@media (max-width: 480px) {
    .hero h1 { font-size: 1.4rem; }
    .hero p { font-size: 0.95rem; }
    .hero { padding: 36px 16px; }
    .hero-logo { width: 120px; }
    .section-title { font-size: 1.3rem; }
    .storefront-title { font-size: 1.3rem; }
    .storefront-tagline { font-size: 0.9rem; }
    .storefront-desc { font-size: 0.85rem; }
    .storefront-hero { padding: 24px 12px 20px; margin-left: -12px; margin-right: -12px; }
    .page-hero { padding: 24px 12px; }
    .page-hero-subtitle { font-size: 0.85rem; }
    .product-grid { grid-template-columns: repeat(2, 1fr); gap: 10px; }
    .product-card-name { font-size: 0.85rem; }
    .product-card-price { font-size: 0.9rem; }
    .product-card-badge { font-size: 0.65rem; padding: 2px 6px; }
    .social-page-grid { grid-template-columns: repeat(2, 1fr); gap: 12px; }
    .social-page-card { padding: 20px 12px; }
    .social-page-icon svg { width: 28px; height: 28px; }
    .category-filter { gap: 6px; }
    .category-filter a { padding: 5px 12px; font-size: 0.75rem; }
    .shop-section-header { flex-wrap: wrap; gap: 4px; }
    .shop-section-title { font-size: 1.1rem; }
    .gallery-image-grid { grid-template-columns: repeat(2, 1fr); gap: 8px; }
    .container { padding: 0 10px; }
    .navbar-logo { height: 36px; }
    .order-box { padding: 20px 16px; }
    .order-box h1 { font-size: 1.3rem; }
    .order-number { font-size: 1.1rem; }
    .lightbox-prev, .lightbox-next { font-size: 2.5rem; padding: 12px; }
}

/* Course cards */
.course-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 24px;
}
.course-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 8px;
    overflow: hidden;
    transition: border-color 0.3s, transform 0.2s;
    text-decoration: none;
    color: inherit;
    display: block;
}
.course-card:hover {
    border-color: var(--gold-dim);
    transform: translateY(-3px);
    color: inherit;
}
.course-card-img {
    width: 100%;
    aspect-ratio: 16/9;
    object-fit: cover;
    display: block;
}
.course-card-body { padding: 16px; }
.course-card-title {
    font-family: 'Cinzel', serif;
    font-size: 1rem;
    color: var(--gold);
    margin-bottom: 6px;
}
.course-card-desc {
    color: var(--text-dim);
    font-size: 0.85rem;
    margin-bottom: 12px;
    line-height: 1.5;
}
.course-card-meta {
    display: flex;
    gap: 12px;
    font-size: 0.8rem;
    color: var(--text-dim);
}
.course-card-price {
    color: var(--gold);
    font-weight: 600;
    margin-left: auto;
}

/* Course detail hero */
.course-detail-hero {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 32px;
    padding: 32px 0;
}
.course-detail-img {
    width: 100%;
    border-radius: 8px;
    aspect-ratio: 16/9;
    object-fit: cover;
}

/* Course player */
.course-player {
    display: grid;
    grid-template-columns: 300px 1fr;
    min-height: calc(100vh - 80px);
}
.course-player-sidebar {
    background: var(--bg-card);
    border-right: 1px solid var(--border);
    overflow-y: auto;
    max-height: calc(100vh - 80px);
    position: sticky;
    top: 80px;
}
.course-player-sidebar-header {
    padding: 16px;
    border-bottom: 1px solid var(--border);
}
.course-player-chapters { padding: 8px 0; }
.course-player-chapter-title {
    padding: 10px 16px;
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text-bright);
    cursor: pointer;
    display: flex;
    gap: 8px;
    align-items: center;
}
.course-player-chapter-title:hover { background: var(--bg-hover); }
.course-player-chapter.collapsed .course-player-lessons { display: none; }
.course-player-lesson {
    display: flex;
    gap: 8px;
    padding: 8px 16px 8px 32px;
    font-size: 0.82rem;
    color: var(--text-dim);
    text-decoration: none;
    align-items: center;
    transition: background 0.2s;
}
.course-player-lesson:hover { background: var(--bg-hover); color: var(--text); }
.course-player-lesson.active {
    background: rgba(201, 149, 60, 0.1);
    color: var(--gold);
    border-left: 2px solid var(--gold);
}
.course-player-lesson.locked { opacity: 0.5; cursor: default; }
.course-player-lesson-dur {
    margin-left: auto;
    font-size: 0.7rem;
    white-space: nowrap;
}
.course-player-main { padding: 24px 32px; }
.video-wrapper {
    position: relative;
    padding-bottom: 56.25%;
    height: 0;
    overflow: hidden;
    border-radius: 8px;
    background: #000;
}
.video-wrapper iframe {
    position: absolute;
    top: 0; left: 0;
    width: 100%;
    height: 100%;
}
.course-player-lesson-info { padding: 16px 0; }
.course-sidebar-toggle {
    display: none;
    position: fixed;
    bottom: 16px;
    left: 16px;
    background: var(--gold);
    color: var(--bg-dark);
    border: none;
    padding: 10px 16px;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    z-index: 50;
    font-size: 0.9rem;
}

/* No-image placeholder */
.no-image {
    width: 100%;
    aspect-ratio: 1;
    background: var(--bg-input);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-dim);
    font-size: 2rem;
}

/* Remove link */
.remove-link {
    color: var(--danger-light);
    font-size: 0.85rem;
    cursor: pointer;
    background: none;
    border: none;
    font-family: inherit;
}
.remove-link:hover { color: #e05050; }

/* Alchemist divider */
.alch-divider {
    text-align: center;
    margin: 40px 0;
    color: var(--gold-dim);
    font-size: 1.2rem;
    letter-spacing: 0.5em;
}

/* Gallery */
.gallery-breadcrumb {
    display: flex;
    gap: 8px;
    align-items: center;
    margin-bottom: 20px;
    font-size: 0.85rem;
    flex-wrap: wrap;
}
.gallery-breadcrumb a { color: var(--text-dim); }
.gallery-breadcrumb a:hover { color: var(--gold); }
.gallery-breadcrumb span { color: var(--text-dim); }
.gallery-breadcrumb .current { color: var(--gold); }

.gallery-image-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 16px;
}
.gallery-image-item {
    position: relative;
    border-radius: 6px;
    overflow: hidden;
    border: 1px solid var(--border);
    cursor: pointer;
    transition: border-color 0.3s, transform 0.2s;
}
.gallery-image-item:hover {
    border-color: var(--gold-dim);
    transform: translateY(-2px);
}
.gallery-image-item img {
    width: 100%;
    aspect-ratio: 1;
    object-fit: cover;
    display: block;
    background: var(--bg-input);
}
.gallery-image-caption {
    padding: 8px 10px;
    font-size: 0.8rem;
    color: var(--text-dim);
    background: var(--bg-card);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* Lightbox */
.lightbox-overlay {
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(0, 0, 0, 0.92);
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-direction: column;
}
.lightbox-content {
    max-width: 90vw;
    max-height: 90vh;
    display: flex;
    flex-direction: column;
    align-items: center;
}
.lightbox-content img {
    max-width: 90vw;
    max-height: 75vh;
    object-fit: contain;
    border-radius: 4px;
}
.lightbox-info {
    text-align: center;
    padding: 12px 0;
    max-width: 600px;
}
.lightbox-close {
    position: absolute;
    top: 16px; right: 24px;
    background: none;
    border: none;
    color: var(--gold);
    font-size: 2rem;
    cursor: pointer;
    z-index: 1001;
    line-height: 1;
}
.lightbox-close:hover { color: var(--gold-light); }
.lightbox-prev, .lightbox-next {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    color: var(--text-dim);
    font-size: 2rem;
    cursor: pointer;
    padding: 20px;
    z-index: 1001;
}
.lightbox-prev { left: 8px; }
.lightbox-next { right: 8px; }
.lightbox-prev:hover, .lightbox-next:hover { color: var(--gold); }

/* Admin Gallery Grid */
.gallery-admin-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
    gap: 12px;
}
.gallery-admin-item {
    position: relative;
    border-radius: 6px;
    overflow: hidden;
    border: 1px solid var(--border);
    background: var(--bg-card);
}
.gallery-admin-item img {
    width: 100%;
    aspect-ratio: 1;
    object-fit: cover;
    display: block;
}
.gallery-admin-item input[type="checkbox"] {
    position: absolute;
    top: 6px; left: 6px;
    z-index: 2;
    accent-color: var(--gold);
    width: 18px; height: 18px;
}
.gallery-admin-overlay {
    padding: 6px 8px;
    background: var(--bg-card);
}
.gallery-admin-title {
    font-size: 0.78rem;
    color: var(--text-dim);
    display: block;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    margin-bottom: 4px;
}
.gallery-admin-actions {
    display: flex;
    gap: 4px;
    flex-wrap: wrap;
}
.gallery-admin-actions .img-move {
    width: 20px; height: 20px;
    font-size: 0.6rem;
}
