@import url('https://fonts.googleapis.com/css2?family=Playfair+Display:ital,wght@0,400..900;1,400..900&family=Plus+Jakarta+Sans:ital,wght@0,200..800;1,200..800&display=swap');

:root {
    /* Color Palette */
    --bg-primary: #fcfaf7;
    --bg-secondary: #f4f1ec;
    --text-main: #2d241e;
    --text-muted: #6b5e54;
    --accent-brown: #5d4037;
    --accent-light: #d7ccc8;
    --accent-gold: #a68b6d;
    --white: #ffffff;
    
    /* Typography */
    --font-heading: 'Playfair Display', serif;
    --font-body: 'Plus Jakarta Sans', sans-serif;
    
    /* Spacing & Borders */
    --section-padding: 100px 5%;
    --border-radius: 12px;
    --transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

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

body {
    background-color: var(--bg-primary);
    color: var(--text-main);
    font-family: var(--font-body);
    line-height: 1.6;
    overflow-x: hidden;
}

body.admin-firebase-page {
    background-color: var(--bg-secondary);
    min-height: 100vh;
}

h1, h2, h3, h4 {
    font-family: var(--font-heading);
    font-weight: 700;
}

a {
    text-decoration: none;
    color: inherit;
    transition: var(--transition);
}

ul {
    list-style: none;
}

img {
    max-width: 100%;
    display: block;
}

.container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 20px;
}

/* --- Navigation --- */
nav {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 1000;
    padding: max(16px, env(safe-area-inset-top, 0px)) max(5%, env(safe-area-inset-right, 0px))
        max(12px, env(safe-area-inset-bottom, 0px)) max(5%, env(safe-area-inset-left, 0px));
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: rgba(252, 250, 247, 0.8);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid rgba(93, 64, 55, 0.1);
    transition: padding 0.25s ease, box-shadow 0.25s ease;
}

nav.nav--scrolled {
    padding-top: max(12px, env(safe-area-inset-top, 0px));
    padding-bottom: max(8px, env(safe-area-inset-bottom, 0px));
    padding-left: max(5%, env(safe-area-inset-left, 0px));
    padding-right: max(5%, env(safe-area-inset-right, 0px));
    box-shadow: 0 10px 30px rgba(93, 64, 55, 0.08);
}

.logo {
    display: inline-flex;
    align-items: center;
    gap: 0.65rem;
    flex-shrink: 1;
    min-width: 0;
    line-height: 0;
    transition: opacity 0.25s ease;
}

.logo:hover {
    opacity: 0.9;
}

.logo-img {
    height: clamp(36px, 5.2vw, 50px);
    width: auto;
    display: block;
    object-fit: contain;
}

.logo-admin-label {
    font-family: var(--font-heading);
    font-size: clamp(0.75rem, 1.6vw, 0.95rem);
    font-weight: 700;
    color: var(--accent-gold);
    letter-spacing: 0.12em;
    text-transform: uppercase;
    white-space: nowrap;
    line-height: 1;
}

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

.nav-links a {
    font-size: 0.9rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: var(--text-muted);
}

.nav-links a:hover {
    color: var(--accent-brown);
}

.nav-actions {
    display: flex;
    gap: 20px;
    align-items: center;
}

.btn-icon {
    background: none;
    border: none;
    cursor: pointer;
    font-size: 1.2rem;
    color: var(--accent-brown);
    min-width: 44px;
    min-height: 44px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 12px;
    -webkit-tap-highlight-color: transparent;
    touch-action: manipulation;
}

.btn-icon:focus-visible {
    outline: 2px solid var(--accent-brown);
    outline-offset: 2px;
}

.btn-primary {
    background: var(--accent-brown);
    color: var(--white);
    padding: 12px 30px;
    border-radius: 50px;
    font-weight: 600;
    border: 1px solid var(--accent-brown);
    transition: var(--transition);
}

.btn-primary:hover {
    background: transparent;
    color: var(--accent-brown);
}

html {
    scroll-padding-top: calc(env(safe-area-inset-top, 0px) + 72px);
}

/* Dimmed layer when mobile nav drawer is open */
.nav-backdrop {
    position: fixed;
    inset: 0;
    z-index: 998;
    background: rgba(45, 36, 30, 0.45);
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.28s ease;
    -webkit-tap-highlight-color: transparent;
}

.nav-backdrop.nav-backdrop--visible {
    opacity: 1;
    pointer-events: auto;
}

body.nav-drawer-open {
    overflow: hidden;
    touch-action: none;
}

/* --- Hero Section --- */
.hero {
    height: 100vh;
    display: flex;
    align-items: center;
    padding: 0 5%;
    padding-top: 80px;
    gap: 40px;
}

.hero-content {
    flex: 1;
}

.hero-content h1 {
    font-size: clamp(3rem, 6vw, 5rem);
    line-height: 1.1;
    margin-bottom: 25px;
    color: var(--accent-brown);
}

.hero-content p {
    font-size: 1.2rem;
    color: var(--text-muted);
    max-width: 500px;
    margin-bottom: 40px;
}

.hero-image-container {
    flex: 1;
    position: relative;
    height: 80vh;
}

.hero-image-main {
    width: 100%;
    height: 100%;
    object-fit: contain;
    border-radius: 40px;
}

.hero-floating-card {
    position: absolute;
    bottom: 40px;
    left: -40px;
    background: var(--white);
    padding: 25px;
    border-radius: var(--border-radius);
    box-shadow: 0 20px 40px rgba(0,0,0,0.05);
    display: flex;
    align-items: center;
    gap: 15px;
    animation: float 4s ease-in-out infinite;
}

@keyframes float {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-15px); }
}

@media (max-width: 1200px) {
    .hero-floating-card {
        left: max(16px, env(safe-area-inset-left, 0px));
        right: auto;
        max-width: min(320px, calc(100vw - 32px));
    }
}

/* --- Sections General --- */
section {
    padding: var(--section-padding);
}

.section-title {
    text-align: center;
    margin-bottom: 60px;
}

.section-title h2 {
    font-size: 3rem;
    margin-bottom: 10px;
}

.section-title p {
    color: var(--text-muted);
}

/* --- Products --- */
.product-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(min(100%, 260px), 1fr));
    gap: clamp(20px, 4vw, 40px);
}

.product-card {
    background: var(--white);
    border-radius: var(--border-radius);
    overflow: hidden;
    transition: transform 0.35s ease, box-shadow 0.35s ease;
    border: 1px solid rgba(0, 0, 0, 0.02);
}

.product-image {
    width: 100%;
    height: clamp(240px, 52vw, 400px);
    object-fit: cover;
    background: var(--bg-secondary);
}

.product-info {
    padding: 25px;
    text-align: center;
}

.product-category {
    font-size: 0.8rem;
    text-transform: uppercase;
    color: var(--accent-gold);
    letter-spacing: 2px;
    margin-bottom: 5px;
}

.product-name {
    font-size: 1.4rem;
    margin-bottom: 10px;
}

.product-price {
    font-weight: 700;
    color: var(--accent-brown);
}

/* --- About Vintage --- */
.vintage-about {
    background: var(--bg-secondary);
    display: flex;
    align-items: center;
    gap: 60px;
}

.vintage-text {
    flex: 1;
    min-width: 0;
}

.vintage-eyebrow {
    color: var(--accent-gold);
    text-transform: uppercase;
    letter-spacing: 0.18em;
    font-weight: 700;
    font-size: clamp(0.72rem, 2vw, 0.85rem);
}

.vintage-heading {
    font-size: clamp(1.75rem, 6vw, 3rem);
    margin: clamp(12px, 3vw, 20px) 0;
    line-height: 1.15;
}

.vintage-lede {
    margin-bottom: clamp(20px, 4vw, 30px);
    font-size: clamp(1rem, 2.8vw, 1.1rem);
    color: var(--text-muted);
    max-width: 38rem;
}

.vintage-cta {
    background: transparent;
    color: var(--accent-brown);
    display: inline-flex;
    justify-content: center;
    min-height: 48px;
    align-items: center;
}

.vintage-image {
    flex: 1;
    border-radius: var(--border-radius);
    height: 500px;
    object-fit: cover;
    min-width: 0;
}

/* --- Home map embed --- */
.map-section--embed {
    padding: 0;
    position: relative;
    height: min(500px, 70vh);
    min-height: 280px;
    overflow: hidden;
    background: var(--bg-secondary);
}

.map-section__iframe {
    border: 0;
    display: block;
    width: 100%;
    height: 100%;
    filter: grayscale(0.5) sepia(0.2) contrast(0.8);
}

.map-overlay--card {
    position: absolute;
    top: clamp(16px, 4vw, 50px);
    left: clamp(16px, 4vw, 50px);
    right: auto;
    max-width: min(300px, calc(100vw - 32px));
    z-index: 10;
    background: var(--white);
    padding: clamp(18px, 4vw, 30px);
    border-radius: var(--border-radius);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
}

.map-overlay__title {
    margin-bottom: 10px;
    color: var(--accent-brown);
    font-size: clamp(1.05rem, 3vw, 1.25rem);
}

.map-overlay__text {
    color: var(--text-muted);
    font-size: 0.9rem;
    line-height: 1.6;
}

.map-overlay__address {
    margin-top: 15px;
    font-weight: 700;
    font-size: 0.9rem;
}

.map-overlay__icon {
    color: var(--accent-brown);
    margin-right: 8px;
}

.map-overlay__link-wrap {
    margin-top: 14px;
}

.map-overlay__link {
    font-weight: 700;
    color: var(--accent-brown);
    font-size: 0.9rem;
    min-height: 44px;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

/* --- Contact WhatsApp card --- */
.contact-action-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    background: var(--white);
    padding: clamp(28px, 6vw, 60px);
    border-radius: var(--border-radius);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.03);
    min-width: 0;
}

.contact-action-card__icon {
    color: #25d366;
    margin-bottom: clamp(18px, 4vw, 30px);
}

.contact-action-card__title {
    margin-bottom: 15px;
    color: var(--accent-brown);
    font-size: clamp(1.35rem, 4.5vw, 1.75rem);
}

.contact-action-card__lede {
    color: var(--text-muted);
    margin-bottom: clamp(24px, 5vw, 40px);
    max-width: 450px;
    font-size: clamp(0.95rem, 2.5vw, 1rem);
    line-height: 1.65;
}

.contact-action-card__cta {
    padding: clamp(16px, 4vw, 20px) clamp(28px, 8vw, 60px);
    font-size: clamp(1rem, 2.8vw, 1.1rem);
    width: auto;
    max-width: 100%;
    min-height: 52px;
    box-sizing: border-box;
}

.contact-action-card__hours {
    margin-top: clamp(20px, 4vw, 30px);
    font-size: 0.85rem;
    color: var(--text-muted);
}

/* --- Footer --- */
footer {
    background: var(--accent-brown);
    color: var(--white);
    padding: 80px 5% 40px;
}

.footer-content {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1fr;
    gap: 60px;
    margin-bottom: 60px;
}

.footer-logo {
    margin-bottom: 18px;
    line-height: 0;
}

.footer-logo-img {
    max-width: min(260px, 70vw);
    height: auto;
    display: block;
    filter: brightness(1.05);
}

.footer-links h4 {
    margin-bottom: 25px;
    font-size: 1.2rem;
}

.footer-links ul li {
    margin-bottom: 15px;
}

.footer-links ul li a {
    color: rgba(255,255,255,0.7);
}

.footer-links ul li a:hover {
    color: var(--white);
    padding-left: 5px;
}

.copyright {
    text-align: center;
    padding-top: 40px;
    border-top: 1px solid rgba(255,255,255,0.1);
    color: rgba(255,255,255,0.5);
    font-size: 0.9rem;
}

/* --- Mobile Responsive --- */
@media (max-width: 968px) {
    .hero {
        flex-direction: column;
        text-align: center;
        height: auto;
        padding-top: 120px;
    }
    
    .hero-content p {
        margin: 0 auto 40px;
    }
    
    .hero-image-container {
        width: 100%;
        height: 500px;
    }
    
    .footer-content {
        grid-template-columns: 1fr 1fr;
    }
}

/* --- Page Headers --- */
.page-header {
    background: var(--bg-secondary);
    padding: 140px 5% 80px;
    text-align: center;
}

.page-header h1 {
    font-size: 3.5rem;
    margin-bottom: 15px;
}

/* --- Policy pages (shipping, etc.) --- */
.policy-page {
    max-width: 720px;
    margin: 0 auto;
    padding: 48px 5% 100px;
    color: var(--text-main);
    line-height: 1.65;
}

.policy-page__meta {
    font-size: 0.9rem;
    color: var(--text-muted);
    margin-bottom: 2rem;
}

.policy-page h2 {
    font-family: var(--font-heading);
    font-size: 1.35rem;
    font-weight: 700;
    margin: 2rem 0 0.65rem;
    color: var(--text-main);
}

.policy-page h2:first-of-type {
    margin-top: 0;
}

.policy-page p {
    margin: 0 0 1rem;
}

.policy-page ul {
    margin: 0 0 1rem;
    padding-left: 1.25rem;
}

.policy-page li {
    margin-bottom: 0.4rem;
}

.policy-page a {
    color: var(--accent-brown);
    font-weight: 600;
    text-decoration: underline;
    text-underline-offset: 3px;
}

.policy-page a:hover {
    color: var(--accent-gold);
}

/* --- Shop Page Specifics --- */
.shop-container {
    display: flex;
    gap: 40px;
    padding: 60px 5%;
    max-width: 1400px;
    margin: 0 auto;
}

.shop-sidebar {
    width: 250px;
    flex-shrink: 0;
}

.filter-group {
    margin-bottom: 30px;
}

.filter-group h4 {
    margin-bottom: 15px;
    font-size: 1.1rem;
    border-bottom: 1px solid var(--accent-light);
    padding-bottom: 10px;
    font-family: var(--font-heading);
}

.filter-group ul li {
    margin-bottom: 10px;
    cursor: pointer;
    transition: var(--transition);
    color: var(--text-muted);
}

.filter-group ul li:hover, .filter-group ul li.active {
    color: var(--accent-brown);
    font-weight: 700;
}

/* --- Contact Page Specifics --- */
.contact-grid {
    display: grid;
    grid-template-columns: 1fr 1.5fr;
    gap: 60px;
    padding: 60px 5%;
    max-width: 1400px;
    margin: 0 auto;
}

.contact-info-card {
    background: var(--bg-secondary);
    padding: 40px;
    border-radius: var(--border-radius);
}

.info-item {
    display: flex;
    gap: 15px;
    margin-bottom: 30px;
}

.info-item i {
    color: var(--accent-brown);
    font-size: 1.2rem;
}

.contact-form {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.form-group label {
    font-weight: 600;
    font-size: 0.9rem;
    color: var(--text-muted);
}

.form-group input, .form-group textarea {
    padding: 15px;
    border: 1px solid var(--accent-light);
    border-radius: 8px;
    outline: none;
    font-family: inherit;
    transition: var(--transition);
}

.form-group input:focus, .form-group textarea:focus {
    border-color: var(--accent-brown);
    box-shadow: 0 0 0 4px rgba(93, 64, 55, 0.05);
}

/* --- Admin Panel Specifics --- */
.admin-container {
    padding: 140px 5% 60px;
    max-width: 1200px;
    margin: 0 auto;
}

.admin-wider {
    max-width: 1280px;
}

.admin-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 40px;
}

.admin-table-container {
    background: var(--white);
    border-radius: var(--border-radius);
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(0,0,0,0.05);
}

.admin-table {
    width: 100%;
    border-collapse: collapse;
}

.admin-table th, .admin-table td {
    padding: 20px;
    text-align: left;
    border-bottom: 1px solid var(--bg-secondary);
}

.admin-table th {
    background: var(--accent-brown);
    color: var(--white);
    font-family: var(--font-heading);
}

.admin-actions {
    display: flex;
    gap: 10px;
}

.btn-sm {
    padding: 8px 15px;
    font-size: 0.8rem;
    border-radius: 5px;
}

.btn-edit {
    background: #e3f2fd;
    color: #1976d2;
    border: none;
}

.btn-delete {
    background: #ffebee;
    color: #d32f2f;
    border: none;
}

.modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.5);
    display: none;
    justify-content: center;
    align-items: center;
    z-index: 2000;
    backdrop-filter: blur(5px);
}

.modal-content {
    background: var(--white);
    padding: 40px;
    border-radius: var(--border-radius);
    width: 500px;
    max-width: 95%;
}

.modal-header {
    margin-bottom: 25px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

@media (max-width: 968px) {
    .contact-grid {
        grid-template-columns: 1fr;
    }
    
    .shop-container {
        flex-direction: column;
    }
    
    .shop-sidebar {
        width: 100%;
        margin-bottom: 40px;
    }
}

/* --- Product Detail Modal --- */
.product-detail-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    min-height: 100vh;
    min-height: 100dvh;
    background: rgba(0,0,0,0.8);
    z-index: 3000;
    justify-content: center;
    align-items: flex-start;
    backdrop-filter: blur(10px);
    padding: env(safe-area-inset-top, 0px) env(safe-area-inset-right, 0px) env(safe-area-inset-bottom, 0px)
        env(safe-area-inset-left, 0px);
    box-sizing: border-box;
    overscroll-behavior: contain;
    overflow-y: auto;
    overflow-x: hidden;
    -webkit-overflow-scrolling: touch;
}

.detail-content {
    background: var(--white);
    width: 1100px;
    max-width: 95%;
    max-height: min(90vh, calc(100dvh - 24px));
    align-self: center;
    border-radius: 30px;
    display: flex;
    flex-direction: column;
    position: relative;
    overflow-x: hidden;
    overflow-y: auto;
    box-shadow: 0 50px 100px rgba(0,0,0,0.4);
    min-height: 0;
    -webkit-overflow-scrolling: touch;
}

.detail-body {
    display: grid;
    grid-template-columns: 1.2fr 1fr;
    min-height: 0;
    flex: 1;
    overflow: hidden;
}

.detail-mobile-tabs {
    display: none;
    flex-shrink: 0;
    gap: 8px;
    padding: 10px 56px 12px 14px;
    border-bottom: 1px solid rgba(93, 64, 55, 0.1);
    background: linear-gradient(180deg, #fffdfb 0%, #faf7f4 100%);
}

.detail-tab {
    flex: 1;
    border: 1px solid rgba(93, 64, 55, 0.2);
    background: rgba(255, 255, 255, 0.7);
    color: var(--text-muted);
    font-family: var(--font-body);
    font-size: 0.88rem;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    padding: 12px 10px;
    border-radius: 12px;
    cursor: pointer;
    transition: background 0.2s ease, color 0.2s ease, border-color 0.2s ease;
    -webkit-tap-highlight-color: transparent;
    touch-action: manipulation;
}

.detail-tab--active {
    background: var(--accent-brown);
    color: var(--white);
    border-color: var(--accent-brown);
}

.detail-tab:focus-visible {
    outline: 2px solid var(--accent-gold);
    outline-offset: 2px;
}

.detail-gallery {
    display: flex;
    flex-direction: column;
    min-height: min(500px, 70vh);
    background: linear-gradient(180deg, #f4f0ec 0%, var(--bg-secondary) 38%, #ebe6e1 100%);
}

.gallery-stage {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px 20px 12px;
    min-height: 0;
}

.gallery-main {
    width: 100%;
    max-width: 100%;
    height: min(420px, 52vh);
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    border-radius: 18px;
    background: linear-gradient(145deg, #fff 0%, #faf7f4 100%);
    box-shadow:
        0 4px 24px rgba(62, 39, 35, 0.08),
        inset 0 1px 0 rgba(255, 255, 255, 0.85);
}

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

.gallery-main video.detail-image--video {
    object-fit: contain;
    background: #0c0a09;
}

.gallery-main:has(img.detail-image) {
    cursor: zoom-in;
}

/* Full-screen image preview (product detail) */
.image-lightbox {
    display: none;
    position: fixed;
    inset: 0;
    min-height: 100vh;
    min-height: 100dvh;
    z-index: 4000;
    align-items: center;
    justify-content: center;
    flex-wrap: wrap;
    align-content: center;
    padding: max(20px, 3vh) max(16px, 3vw);
    padding-top: max(20px, 3vh, env(safe-area-inset-top, 0px));
    padding-bottom: max(20px, 3vh, env(safe-area-inset-bottom, 0px));
    padding-left: max(16px, 3vw, env(safe-area-inset-left, 0px));
    padding-right: max(16px, 3vw, env(safe-area-inset-right, 0px));
    box-sizing: border-box;
    overscroll-behavior: contain;
    -webkit-overflow-scrolling: touch;
}

.image-lightbox.image-lightbox--open {
    display: flex;
}

.image-lightbox-backdrop {
    position: absolute;
    inset: 0;
    background: radial-gradient(ellipse 120% 80% at 50% 40%, rgba(15, 22, 38, 0.92), rgba(4, 6, 10, 0.97));
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    cursor: zoom-out;
}

.image-lightbox-close,
.image-lightbox-nav {
    position: absolute;
    z-index: 2;
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    transition: transform 0.2s ease, background 0.2s ease, opacity 0.2s ease;
    -webkit-tap-highlight-color: transparent;
    touch-action: manipulation;
}

.image-lightbox-close {
    top: max(16px, 2.5vh, calc(env(safe-area-inset-top, 0px) + 8px));
    right: max(16px, 2.5vw, calc(env(safe-area-inset-right, 0px) + 8px));
    width: 48px;
    height: 48px;
    min-width: 48px;
    min-height: 48px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.1);
    font-size: 1.35rem;
}

.image-lightbox-close:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: scale(1.06);
}

.image-lightbox-nav {
    top: 50%;
    transform: translateY(-50%);
    width: 48px;
    height: 48px;
    min-width: 48px;
    min-height: 48px;
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.08);
    font-size: 1.1rem;
}

.image-lightbox-nav:hover {
    background: rgba(90, 160, 255, 0.35);
}

.image-lightbox-prev {
    left: max(12px, 2vw);
}

.image-lightbox-next {
    right: max(12px, 2vw);
}

.image-lightbox-frame {
    position: relative;
    z-index: 1;
    margin: 0;
    max-width: min(1100px, 94vw);
    max-height: min(86vh, 900px);
    display: flex;
    align-items: center;
    justify-content: center;
    pointer-events: none;
}

.image-lightbox-img {
    max-width: min(1100px, 94vw);
    max-height: min(86vh, 900px);
    width: auto;
    height: auto;
    object-fit: contain;
    border-radius: 12px;
    box-shadow:
        0 8px 40px rgba(0, 0, 0, 0.45),
        0 0 0 1px rgba(255, 255, 255, 0.06);
    pointer-events: auto;
    -webkit-user-select: none;
    user-select: none;
}

@supports (height: 100dvh) {
    .image-lightbox-frame,
    .image-lightbox-img {
        max-height: min(86dvh, 900px);
    }
}

@media (max-width: 640px) {
    .image-lightbox {
        /* Reserve space for bottom nav + home indicator */
        padding-bottom: calc(88px + env(safe-area-inset-bottom, 0px));
    }

    .image-lightbox-close {
        width: 44px;
        height: 44px;
        min-width: 44px;
        min-height: 44px;
        top: max(10px, calc(env(safe-area-inset-top, 0px) + 6px));
        right: max(10px, calc(env(safe-area-inset-right, 0px) + 6px));
    }

    /* Controls at bottom — thumb reach, clear of notches */
    .image-lightbox-nav {
        top: auto;
        bottom: max(18px, calc(env(safe-area-inset-bottom, 0px) + 12px));
        transform: none;
        width: 52px;
        height: 52px;
        min-width: 52px;
        min-height: 52px;
        font-size: 1.15rem;
        border-radius: 14px;
        background: rgba(20, 24, 32, 0.72);
        backdrop-filter: blur(10px);
        -webkit-backdrop-filter: blur(10px);
        box-shadow: 0 4px 20px rgba(0, 0, 0, 0.35);
    }

    .image-lightbox-prev {
        left: max(14px, env(safe-area-inset-left, 0px));
    }

    .image-lightbox-next {
        right: max(14px, env(safe-area-inset-right, 0px));
    }

    .image-lightbox-frame {
        max-width: calc(100% - 8px);
        padding: 0 4px;
    }

    .image-lightbox-img {
        max-width: 100%;
        max-height: calc(100vh - 168px - env(safe-area-inset-top, 0px) - env(safe-area-inset-bottom, 0px));
    }
}

@supports (height: 100dvh) {
    @media (max-width: 640px) {
        .image-lightbox-img {
            max-height: calc(100dvh - 168px - env(safe-area-inset-top, 0px) - env(safe-area-inset-bottom, 0px));
        }
    }
}

@supports (height: 100svh) {
    @media (max-width: 640px) {
        .image-lightbox-img {
            max-height: calc(100svh - 168px - env(safe-area-inset-top, 0px) - env(safe-area-inset-bottom, 0px));
        }
    }
}

.detail-gallery-tray {
    flex-shrink: 0;
    padding: 0 16px 18px;
    display: flex;
    flex-direction: column;
    gap: 0;
}

.gallery-section {
    padding: 14px 8px 4px;
}

.gallery-section--photos:not([hidden]) + .gallery-section--videos {
    border-top: 1px solid rgba(93, 64, 55, 0.12);
    margin-top: 4px;
    padding-top: 18px;
}

.gallery-section--photos[hidden] + .gallery-section--videos {
    border-top: none;
    margin-top: 0;
    padding-top: 14px;
}

.gallery-section-head {
    display: flex;
    align-items: center;
    gap: 10px;
    margin: 0 4px 12px;
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: var(--accent-brown);
    opacity: 0.92;
}

.gallery-section-head i {
    font-size: 0.95rem;
    opacity: 0.88;
}

.gallery-scroll {
    display: flex;
    flex-direction: row;
    flex-wrap: nowrap;
    gap: 12px;
    overflow-x: auto;
    overflow-y: visible;
    padding: 8px 4px 22px;
    scroll-snap-type: x mandatory;
    scroll-padding: 4px;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: thin;
    scrollbar-color: rgba(93, 64, 55, 0.35) transparent;
}

.gallery-scroll::-webkit-scrollbar {
    height: 6px;
}

.gallery-scroll::-webkit-scrollbar-thumb {
    background: rgba(93, 64, 55, 0.28);
    border-radius: 99px;
}

.gallery-scroll--photos {
    mask-image: linear-gradient(90deg, #000 96%, transparent 100%);
}

.thumb {
    cursor: pointer;
    border: 2px solid transparent;
    transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--white);
    flex-shrink: 0;
    padding: 0;
    font: inherit;
    outline: none;
    scroll-snap-align: start;
}

.thumb:focus-visible {
    border-color: var(--accent-gold);
    box-shadow: 0 0 0 3px rgba(201, 169, 98, 0.35);
}

.thumb-photo {
    width: 86px;
    height: 86px;
    border-radius: 14px;
    overflow: hidden;
    box-shadow: 0 6px 18px rgba(40, 28, 22, 0.08);
}

.thumb-photo img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.thumb-photo:hover {
    transform: translateY(-3px);
}

.thumb.active {
    border-color: var(--accent-brown);
    box-shadow: 0 0 0 2px rgba(93, 64, 55, 0.12);
}

.thumb-video {
    position: relative;
    box-sizing: border-box;
    width: 156px;
    height: 124px;
    min-height: 124px;
    border-radius: 14px;
    overflow: hidden;
    flex-direction: column;
    align-items: stretch;
    align-self: flex-start;
    background: linear-gradient(155deg, #2a2422 0%, #12100f 55%, #1a1513 100%);
    border: 2px solid rgba(255, 255, 255, 0.08);
    box-shadow: 0 10px 28px rgba(0, 0, 0, 0.22);
}

.thumb-video:hover {
    transform: translateY(-3px);
    border-color: rgba(255, 255, 255, 0.18);
}

.thumb-video-badge {
    position: absolute;
    top: 8px;
    left: 8px;
    z-index: 2;
    font-size: 0.58rem;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    padding: 4px 7px;
    border-radius: 6px;
    background: rgba(0, 0, 0, 0.55);
    color: rgba(255, 255, 255, 0.88);
}

.thumb-video .thumb-video-inner {
    display: flex;
    flex: 1 1 auto;
    min-height: 0;
    width: 100%;
    align-items: center;
    justify-content: center;
    color: rgba(255, 255, 255, 0.95);
    font-size: 1.85rem;
    line-height: 1;
}

.thumb-video .thumb-video-inner i {
    filter: drop-shadow(0 2px 6px rgba(0, 0, 0, 0.45));
}

.thumb-video-label {
    display: block;
    flex: 0 0 auto;
    width: 100%;
    padding: 6px 10px 9px;
    font-size: 0.65rem;
    font-weight: 600;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: rgba(255, 255, 255, 0.78);
    text-align: center;
    background: linear-gradient(0deg, rgba(0, 0, 0, 0.5), transparent);
}

.gallery-empty-msg {
    padding: 40px;
    text-align: center;
    color: var(--text-muted);
    font-size: 0.98rem;
    line-height: 1.6;
}

.detail-info {
    position: relative;
    padding: 36px 60px 60px;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    overflow-y: auto;
    max-height: 90vh;
    min-height: 0;
}

.detail-spec {
    margin-bottom: 20px;
}

.detail-spec strong {
    display: block;
    font-size: 0.9rem;
    color: var(--text-muted);
    margin-bottom: 5px;
}

.detail-category {
    color: var(--accent-gold);
    text-transform: uppercase;
    letter-spacing: 2px;
    font-weight: 700;
    font-size: 0.9rem;
    margin-bottom: 10px;
}

.detail-name {
    font-size: 3rem;
    margin-bottom: 15px;
    color: var(--accent-brown);
    line-height: 1.1;
}

.detail-price-lede {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 12px;
    margin-bottom: 26px;
}

.detail-price {
    font-size: 2rem;
    font-weight: 700;
    margin: 0;
    color: var(--text-main);
    line-height: 1.2;
}

.detail-description {
    color: var(--text-muted);
    margin: 0;
    line-height: 1.85;
    font-size: 0.98rem;
}

.detail-highlights-section {
    margin-bottom: 24px;
}

.detail-highlights-section strong {
    display: block;
    font-size: 0.95rem;
    color: var(--text-muted);
    margin-bottom: 10px;
    text-transform: uppercase;
    letter-spacing: 1.5px;
}

.detail-highlights-list {
    margin: 0;
    padding-left: 1.35rem;
    color: var(--text-main);
    line-height: 1.65;
    list-style: disc outside;
    list-style-type: disc;
}

.detail-highlights-list li {
    margin-bottom: 10px;
    padding-left: 0.35rem;
    display: list-item;
}

.detail-highlights-list li::marker {
    color: var(--accent-brown);
    font-size: 0.95em;
}

.btn-whatsapp {
    background: #25d366;
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    padding: 20px;
    border-radius: 50px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    transition: var(--transition);
    border: none;
    cursor: pointer;
    margin-top: auto;
    flex-shrink: 0;
}

.btn-whatsapp:hover {
    background: #128c7e;
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(37, 211, 102, 0.2);
}

.close-detail {
    position: absolute;
    top: 14px;
    right: 14px;
    background: var(--white);
    width: 46px;
    height: 46px;
    min-width: 46px;
    min-height: 46px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-shadow: 0 10px 20px rgba(0,0,0,0.1);
    z-index: 120;
    transition: var(--transition);
    border: 1px solid rgba(93, 64, 55, 0.08);
}

.close-detail:hover {
    transform: rotate(90deg);
}

@media (max-width: 900px) {
    .product-detail-modal {
        align-items: stretch;
        justify-content: flex-start;
        padding-top: max(8px, env(safe-area-inset-top, 0px));
        padding-bottom: max(8px, env(safe-area-inset-bottom, 0px));
    }

    .detail-content {
        align-self: stretch;
        width: 100%;
        max-width: 100%;
        max-height: none;
        min-height: min(100dvh, 100%);
        margin: 0;
        border-radius: 20px 20px 0 0;
        overflow-x: hidden;
        overflow-y: auto;
    }

    .detail-mobile-tabs {
        display: flex;
    }

    .detail-body {
        display: block;
        flex: 1;
        min-height: 0;
        overflow: hidden;
    }

    .detail-content[data-detail-mobile-tab="photos"] .detail-info {
        display: none;
    }

    .detail-content[data-detail-mobile-tab="details"] .detail-gallery {
        display: none;
    }

    .detail-content[data-detail-mobile-tab="details"] .detail-body {
        display: flex;
        flex-direction: column;
        flex: 1;
        min-height: 0;
        max-height: calc(100dvh - env(safe-area-inset-top, 0px) - env(safe-area-inset-bottom, 0px) - 72px);
    }

    .detail-content[data-detail-mobile-tab="details"] .detail-info {
        display: flex;
        flex: 1;
        min-height: 0;
        max-height: none;
        overflow-y: auto;
        -webkit-overflow-scrolling: touch;
        padding: 20px 22px calc(28px + env(safe-area-inset-bottom, 0px));
    }

    .detail-content[data-detail-mobile-tab="photos"] .detail-gallery {
        display: flex;
        flex-direction: column;
        min-height: 0;
        max-height: calc(100dvh - env(safe-area-inset-top, 0px) - env(safe-area-inset-bottom, 0px) - 72px);
        overflow-y: auto;
        -webkit-overflow-scrolling: touch;
    }

    .detail-gallery {
        min-height: 280px;
    }

    .gallery-main {
        height: min(300px, 48vh);
        flex: none;
    }

    .gallery-main img.detail-image {
        object-fit: contain;
    }

    .detail-name {
        font-size: clamp(1.85rem, 6vw, 2.55rem);
    }

    .close-detail {
        top: max(12px, calc(env(safe-area-inset-top, 0px) + 6px));
        right: max(12px, calc(env(safe-area-inset-right, 0px) + 6px));
        -webkit-tap-highlight-color: transparent;
        touch-action: manipulation;
    }

    .btn-whatsapp {
        margin-top: 12px;
    }
}

@media (min-width: 901px) {
    .product-detail-modal {
        align-items: center;
    }

    .detail-content .detail-gallery {
        display: flex !important;
        flex-direction: column;
    }

    .detail-content .detail-info {
        display: flex !important;
        flex-direction: column;
    }
}

.modal-wide .modal-content-wide {
    width: min(920px, 96vw);
    max-width: 96vw;
    max-height: 92vh;
    overflow-y: auto;
}

.admin-product-form-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 16px 20px;
    margin-top: 8px;
}

.admin-form-span-2 {
    grid-column: span 2;
}

.form-group-admin label {
    display: block;
    font-weight: 600;
    font-size: 0.88rem;
    margin-bottom: 8px;
    color: var(--text-main);
}

.admin-highlights-toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    flex-wrap: wrap;
}

.admin-highlights-label {
    font-weight: 600;
    font-size: 0.88rem;
    color: var(--text-main);
    margin: 0;
}

.admin-highlights-hint {
    margin-top: 6px;
    margin-bottom: 0;
}

.admin-highlights-rows {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-top: 12px;
}

.admin-highlight-row {
    display: flex;
    align-items: center;
    gap: 10px;
}

.admin-highlight-bullet {
    flex-shrink: 0;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--accent-brown);
    opacity: 0.85;
}

.admin-highlight-row .admin-highlight-input {
    flex: 1;
    min-width: 0;
    width: auto;
    margin: 0;
}

.admin-highlight-remove {
    flex-shrink: 0;
}

.form-group-admin textarea,
.form-group-admin input,
.form-group-admin select {
    width: 100%;
    padding: 14px 16px;
    border-radius: 10px;
    border: 1px solid rgba(93, 64, 55, 0.15);
    font: inherit;
    background: var(--white);
}

.form-group-admin textarea {
    resize: vertical;
    min-height: 92px;
}

.admin-subheading {
    font-family: var(--font-heading);
    font-size: 1.35rem;
    margin: 14px 0 6px;
    color: var(--accent-brown);
}

.admin-field-help {
    font-size: 0.86rem;
    color: var(--text-muted);
    margin: 6px 0 12px;
    line-height: 1.5;
}

.admin-field-help code {
    font-size: 0.82em;
    padding: 2px 6px;
    background: rgba(93, 64, 55, 0.08);
    border-radius: 4px;
}

.admin-media-rows {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-bottom: 12px;
}

.admin-media-row {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    align-items: center;
}

.admin-media-row .media-type-select {
    flex: 0 0 auto;
    min-width: 120px;
}

.admin-media-row .media-url-input {
    flex: 1 1 220px;
    min-width: 0;
}

.btn-remove-row {
    background: transparent;
    color: var(--accent-brown);
    border: none;
    font-size: 1.75rem;
    line-height: 1;
    cursor: pointer;
    padding: 0 6px;
}

.btn-mini {
    padding: 10px 16px !important;
    font-size: 0.82rem !important;
}

.upload-drop-zone input[type="file"] {
    width: 100%;
    margin-top: 8px;
    padding: 12px;
    border: 2px dashed rgba(93, 64, 55, 0.2);
    border-radius: 12px;
    background: rgba(253, 250, 247, 0.6);
    cursor: pointer;
}

/* Admin modal: preview + gallery uploads */
.admin-gallery-block-title {
    display: block;
    font-weight: 600;
    font-size: 0.88rem;
    margin-bottom: 4px;
    color: var(--text-main);
}

.admin-upload-block {
    padding-bottom: 4px;
}

.admin-upload-hint {
    margin-top: 0;
    margin-bottom: 12px;
}

.admin-upload-toolbar {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 12px 18px;
    margin-top: 4px;
}

@media (max-width: 560px) {
    .admin-upload-toolbar .admin-upload-meta {
        flex: 1 1 100%;
    }
}

.admin-file-invoker {
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin: 0;
}

.admin-upload-meta {
    font-size: 0.86rem;
    color: var(--text-muted);
    line-height: 1.4;
}

.admin-preview-thumb {
    margin-top: 10px;
    max-width: 220px;
    border-radius: 12px;
    overflow: hidden;
    border: 1px solid rgba(93, 64, 55, 0.18);
    background: rgba(253, 250, 247, 0.95);
    box-shadow: 0 4px 18px rgba(93, 64, 55, 0.08);
}

.admin-preview-thumb img {
    display: block;
    width: 100%;
    height: auto;
    vertical-align: middle;
}

.admin-gallery-subtitle {
    font-size: 0.72rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.07em;
    color: var(--accent-brown);
    margin: 14px 0 10px;
    opacity: 0.9;
}

.admin-gallery-saved {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
}

.admin-gallery-queue {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    padding: 14px 14px 16px;
    min-height: 72px;
    border-radius: 14px;
    border: 2px dashed rgba(93, 64, 55, 0.22);
    background: linear-gradient(165deg, rgba(255, 255, 255, 0.95), rgba(253, 250, 247, 0.75));
    align-items: flex-start;
    align-content: flex-start;
}

.admin-gallery-queue-empty {
    margin: 0;
    font-size: 0.88rem;
    color: var(--text-muted);
    align-self: center;
    width: 100%;
    text-align: center;
    padding: 12px 8px;
}

.admin-saved-card,
.admin-queue-card {
    position: relative;
    width: 104px;
    height: 104px;
    border-radius: 12px;
    overflow: hidden;
    border: 1px solid rgba(93, 64, 55, 0.14);
    background: var(--white);
    flex-shrink: 0;
    box-shadow: 0 4px 14px rgba(40, 30, 25, 0.06);
}

.admin-saved-card img,
.admin-queue-card img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.admin-queue-card--video,
.admin-saved-card--video {
    background: linear-gradient(145deg, #3a3532, #1f1c1a);
    border-color: rgba(255, 255, 255, 0.12);
}

.admin-queue-video-placeholder,
.admin-saved-video {
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 8px;
    color: rgba(255, 255, 255, 0.92);
    text-align: center;
    padding: 8px;
    box-sizing: border-box;
}

.admin-queue-video-placeholder i,
.admin-saved-video i {
    font-size: 1.5rem;
    opacity: 0.95;
}

.admin-queue-filename,
.admin-saved-video span {
    font-size: 0.65rem;
    line-height: 1.25;
    max-width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    color: rgba(255, 255, 255, 0.85);
}

.admin-queue-remove {
    position: absolute;
    top: 4px;
    right: 4px;
    z-index: 2;
    width: 26px;
    height: 26px;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-size: 1.1rem;
    line-height: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(0, 0, 0, 0.55);
    color: #fff;
    transition: background 0.15s ease;
}

.admin-queue-remove:hover {
    background: rgba(140, 40, 40, 0.9);
}

.admin-header-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 14px;
    align-items: center;
}

.btn-secondary {
    background: transparent;
    color: var(--accent-brown);
    border: 2px solid var(--accent-brown);
    padding: 12px 22px;
    border-radius: 40px;
    font-weight: 700;
    font-size: 0.85rem;
    cursor: pointer;
    transition: var(--transition);
}

.btn-secondary:hover {
    background: var(--accent-brown);
    color: var(--white);
}

.btn-logout-outline {
    background: transparent;
    border: 2px solid var(--accent-brown);
    color: var(--accent-brown) !important;
    padding: 10px 20px !important;
    border-radius: 999px !important;
    cursor: pointer;
    font-weight: 700 !important;
    font-family: inherit;
}

.btn-logout-outline:hover {
    background: var(--accent-brown);
    color: var(--white) !important;
}

/* --- Admin login (split layout, high contrast CTA) --- */
.admin-login-wall {
    position: fixed;
    inset: 0;
    z-index: 4500;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: clamp(16px, 4vw, 32px);
    overflow: auto;
    background: #0d0b09;
    background-image:
        radial-gradient(ellipse 120% 80% at 0% 0%, rgba(166, 139, 109, 0.22), transparent 55%),
        radial-gradient(ellipse 90% 70% at 100% 100%, rgba(93, 64, 55, 0.35), transparent 50%),
        linear-gradient(168deg, #1a1612 0%, #0d0b09 45%, #080706 100%);
}

.admin-login-wall[hidden],
#admin-app-shell[hidden],
.admin-shell-v2[hidden] {
    display: none !important;
}

.admin-login-shell {
    width: min(1040px, 100%);
    margin: 0 auto;
    border-radius: 20px;
    overflow: hidden;
    display: grid;
    grid-template-columns: 1fr min(420px, 100%);
    box-shadow:
        0 0 0 1px rgba(255, 255, 255, 0.04),
        0 48px 120px rgba(0, 0, 0, 0.55);
}

.admin-login-brand {
    position: relative;
    padding: clamp(28px, 5vw, 48px);
    color: rgba(252, 250, 247, 0.92);
    display: flex;
    align-items: center;
    justify-content: center;
    pointer-events: auto;
}

.admin-login-brand::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, rgba(93, 64, 55, 0.12) 0%, transparent 48%);
    pointer-events: none;
}

.admin-login-brand-inner {
    position: relative;
    z-index: 1;
    max-width: 400px;
}

.admin-login-eyebrow {
    font-size: 0.72rem;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    color: rgba(214, 196, 176, 0.75);
    margin-bottom: 1.25rem;
    font-weight: 600;
}

.admin-login-brand-mark {
    margin-bottom: 1.5rem;
}

.admin-login-brand .admin-login-logo {
    width: clamp(100px, 22vw, 140px);
    height: auto;
    border-radius: 16px;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.45);
    border: 1px solid rgba(255, 255, 255, 0.08);
}

.admin-login-brand-title {
    font-family: var(--font-heading);
    font-size: clamp(1.65rem, 3.5vw, 2.1rem);
    font-weight: 700;
    line-height: 1.2;
    color: var(--white);
    margin-bottom: 0.75rem;
}

.admin-login-brand-lede {
    font-size: 0.95rem;
    line-height: 1.65;
    color: rgba(236, 230, 222, 0.78);
    margin-bottom: 1.75rem;
}

.admin-login-checklist {
    list-style: none;
    padding: 0;
    margin: 0;
    font-size: 0.84rem;
    line-height: 1.55;
    color: rgba(236, 230, 222, 0.82);
}

.admin-login-checklist li {
    display: flex;
    gap: 12px;
    align-items: flex-start;
    margin-bottom: 12px;
    padding: 12px 14px;
    border-radius: 12px;
    background: rgba(0, 0, 0, 0.2);
    border: 1px solid rgba(255, 255, 255, 0.06);
}

.admin-login-checklist i {
    color: rgba(214, 196, 176, 0.85);
    margin-top: 2px;
    flex-shrink: 0;
    width: 1.1em;
}

.admin-login-brand-foot {
    margin-top: 1.75rem;
    font-size: 0.88rem;
}

.admin-login-brand-foot a {
    color: rgba(214, 196, 176, 0.95);
    text-decoration: underline;
    text-underline-offset: 3px;
}

.admin-login-brand-foot a:hover {
    color: var(--white);
}

.admin-login-panel {
    background: linear-gradient(180deg, #fdfbf8 0%, #f8f4ef 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: clamp(28px, 5vw, 44px);
    pointer-events: auto;
}

.admin-login-panel-inner {
    width: min(360px, 100%);
}

#admin-login-form {
    text-align: left;
}

.admin-login-heading {
    font-family: var(--font-heading);
    font-size: 1.55rem;
    color: var(--accent-brown);
    margin-bottom: 0.35rem;
    line-height: 1.2;
}

.admin-login-sub {
    font-size: 0.9rem;
    color: var(--text-muted);
    margin-bottom: 1.5rem;
    line-height: 1.5;
}

.admin-field-label {
    display: block;
    font-size: 0.78rem;
    font-weight: 700;
    letter-spacing: 0.03em;
    text-transform: uppercase;
    margin-bottom: 8px;
    color: var(--text-main);
}

.admin-input {
    width: 100%;
    padding: 14px 16px;
    margin-bottom: 16px;
    border-radius: 12px;
    border: 1px solid rgba(93, 64, 55, 0.18);
    font: inherit;
    background: var(--white);
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.admin-input:focus {
    outline: none;
    border-color: var(--accent-brown);
    box-shadow: 0 0 0 3px rgba(93, 64, 55, 0.12);
}

.admin-login-field {
    margin-bottom: 18px;
}

.admin-login-cta {
    width: 100%;
    margin-top: 8px;
    padding: 16px 20px !important;
    border-radius: 14px !important;
    border: none;
    cursor: pointer;
    font: inherit;
    font-weight: 700;
    font-size: 1rem;
    letter-spacing: 0.02em;
    color: var(--white) !important;
    background: linear-gradient(165deg, #6d4c42 0%, #5d4037 48%, #4a342c 100%) !important;
    box-shadow:
        0 1px 0 rgba(255, 255, 255, 0.12) inset,
        0 14px 32px rgba(93, 64, 55, 0.35);
    transition: transform 0.18s ease, box-shadow 0.18s ease, filter 0.18s ease;
}

.admin-login-cta:hover:not(:disabled) {
    filter: brightness(1.05);
    transform: translateY(-1px);
    box-shadow:
        0 1px 0 rgba(255, 255, 255, 0.14) inset,
        0 18px 40px rgba(93, 64, 55, 0.42);
}

.admin-login-cta:active:not(:disabled) {
    transform: translateY(0);
}

.admin-login-cta:disabled {
    opacity: 0.65;
    cursor: not-allowed;
    transform: none;
}

.admin-login-cta-text {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
}

.admin-login-cta-busy {
    display: none;
    align-items: center;
    justify-content: center;
    gap: 10px;
}

.admin-login-cta[data-busy="yes"] .admin-login-cta-text { display: none; }
.admin-login-cta[data-busy="yes"] .admin-login-cta-busy { display: inline-flex; }

.admin-login-submit {
    display: block;
}

.admin-password-wrap {
    position: relative;
    margin-bottom: 18px;
}

.admin-password-wrap .admin-password-input {
    margin-bottom: 0;
    padding-right: 48px;
}

.admin-password-toggle {
    position: absolute;
    top: 50%;
    right: 8px;
    transform: translateY(-50%);
    width: 36px;
    height: 36px;
    border-radius: 8px;
    border: none;
    background: transparent;
    color: var(--text-muted);
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: background 0.15s ease, color 0.15s ease;
}

.admin-password-toggle:hover {
    background: rgba(93, 64, 55, 0.08);
    color: var(--accent-brown);
}

.admin-password-toggle[aria-pressed="true"] {
    color: var(--accent-brown);
}

.admin-microcopy {
    margin-top: 1.25rem;
    font-size: 0.78rem;
    color: rgba(45, 36, 30, 0.5);
    line-height: 1.55;
}

.admin-microcopy kbd {
    font-family: inherit;
    font-size: 0.72em;
    padding: 2px 6px;
    border-radius: 4px;
    border: 1px solid rgba(93, 64, 55, 0.2);
    background: rgba(93, 64, 55, 0.06);
}

.login-error-msg {
    color: #b71c1c;
    font-size: 0.9rem;
    line-height: 1.55;
    margin-top: 14px;
    min-height: 1px;
    text-align: left;
    display: none;
}

.login-error-msg[data-has-error="yes"] {
    display: flex;
    gap: 10px;
    align-items: flex-start;
    font-weight: 500;
    padding: 14px 16px;
    background: rgba(183, 28, 28, 0.08);
    border-radius: 12px;
    border: 1px solid rgba(183, 28, 28, 0.28);
    box-shadow: 0 6px 18px rgba(183, 28, 28, 0.08);
    animation: admin-login-shake 0.45s cubic-bezier(0.36, 0.07, 0.19, 0.97);
}

.login-error-msg[data-has-error="yes"] .login-error-icon {
    flex-shrink: 0;
    width: 22px;
    height: 22px;
    border-radius: 50%;
    background: #c62828;
    color: #fff;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 0.7rem;
    margin-top: 1px;
}

.login-error-msg[data-has-error="yes"] .login-error-text {
    flex: 1;
    min-width: 0;
}

.login-error-msg[data-has-error="yes"] .login-error-title {
    display: block;
    color: #b71c1c;
    font-weight: 700;
    margin-bottom: 2px;
    font-size: 0.92rem;
}

.login-error-msg[data-has-error="yes"] .login-error-body {
    color: #5b1414;
    font-weight: 500;
}

.login-error-msg[data-has-error="yes"] .login-error-code {
    display: inline-block;
    margin-top: 6px;
    font-size: 0.74rem;
    color: rgba(91, 20, 20, 0.7);
    background: rgba(183, 28, 28, 0.1);
    padding: 2px 8px;
    border-radius: 999px;
    font-family: monospace;
}

@keyframes admin-login-shake {
    10%, 90%   { transform: translateX(-2px); }
    20%, 80%   { transform: translateX(3px); }
    30%, 50%, 70% { transform: translateX(-5px); }
    40%, 60%   { transform: translateX(5px); }
}

@media (max-width: 860px) {
    .admin-login-shell {
        grid-template-columns: 1fr;
        border-radius: 16px;
        box-shadow:
            0 0 0 1px rgba(255, 255, 255, 0.04),
            0 32px 80px rgba(0, 0, 0, 0.45);
    }

    .admin-login-brand {
        padding-bottom: 20px;
    }

    .admin-login-panel {
        border-top: 1px solid rgba(93, 64, 55, 0.1);
    }
}

/* ===========================================
   Admin shell v2 (post-login dashboard)
   =========================================== */
.admin-shell-v2 {
    --admin-bg: #f5f1ea;
    --admin-card: #ffffff;
    --admin-border: rgba(93, 64, 55, 0.12);
    --admin-border-strong: rgba(93, 64, 55, 0.2);
    --admin-row-hover: rgba(93, 64, 55, 0.04);
    --admin-shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.04), 0 1px 3px rgba(0, 0, 0, 0.06);
    --admin-shadow-md: 0 4px 12px rgba(0, 0, 0, 0.05), 0 12px 28px rgba(0, 0, 0, 0.08);
    --admin-shadow-lg: 0 24px 60px rgba(0, 0, 0, 0.18);
    --admin-radius: 16px;
    --admin-radius-sm: 10px;

    background: var(--admin-bg);
    min-height: 100vh;
}

.admin-shell-v2 nav,
.admin-shell-v2 .admin-container,
.admin-shell-v2 footer {
    display: none;
}

/* --- Topbar --- */
.admin-topbar {
    position: sticky;
    top: 0;
    z-index: 30;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 14px clamp(16px, 4vw, 32px);
    background: rgba(255, 255, 255, 0.92);
    backdrop-filter: saturate(140%) blur(10px);
    -webkit-backdrop-filter: saturate(140%) blur(10px);
    border-bottom: 1px solid var(--admin-border);
}

.admin-brand {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    color: var(--accent-brown);
    text-decoration: none;
    min-width: 0;
}

.admin-brand-mark {
    width: 42px;
    height: 42px;
    border-radius: 10px;
    object-fit: contain;
    background: linear-gradient(160deg, #2d241e 0%, #0f0f0f 100%);
    padding: 4px;
    flex-shrink: 0;
}

.admin-brand-text {
    display: flex;
    flex-direction: column;
    line-height: 1.15;
    min-width: 0;
}

.admin-brand-title {
    font-family: var(--font-heading);
    font-weight: 700;
    font-size: 1.05rem;
    color: var(--text-main);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.admin-brand-sub {
    font-size: 0.7rem;
    text-transform: uppercase;
    letter-spacing: 0.14em;
    font-weight: 700;
    color: var(--accent-gold);
    display: inline-flex;
    gap: 6px;
    align-items: center;
}

.admin-topbar-right {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
    justify-content: flex-end;
}

.admin-topbar-link {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 12px;
    color: var(--accent-brown);
    border-radius: 999px;
    font-weight: 600;
    font-size: 0.88rem;
    text-decoration: none;
    transition: background 0.18s ease;
}

.admin-topbar-link:hover {
    background: rgba(93, 64, 55, 0.08);
}

.admin-user-chip {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 14px;
    background: linear-gradient(165deg, #fdfbf8 0%, #f0e9df 100%);
    border: 1px solid var(--admin-border);
    border-radius: 999px;
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text-main);
    max-width: 240px;
}

.admin-user-chip i {
    color: var(--accent-brown);
    flex-shrink: 0;
}

.admin-user-chip span {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* --- Buttons (admin) --- */
.admin-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    border: 1px solid transparent;
    padding: 11px 18px;
    border-radius: 12px;
    font: inherit;
    font-weight: 600;
    font-size: 0.9rem;
    line-height: 1.1;
    cursor: pointer;
    transition: transform 0.15s ease, box-shadow 0.15s ease, background 0.18s ease, color 0.18s ease, filter 0.18s ease;
    white-space: nowrap;
}

.admin-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none !important;
}

.admin-btn-sm {
    padding: 8px 14px;
    font-size: 0.85rem;
    border-radius: 10px;
}

.admin-btn-primary {
    color: #fff;
    background: linear-gradient(165deg, #6d4c42 0%, #5d4037 48%, #4a342c 100%);
    box-shadow:
        0 1px 0 rgba(255, 255, 255, 0.12) inset,
        0 8px 20px rgba(93, 64, 55, 0.28);
}

.admin-btn-primary:hover:not(:disabled) {
    filter: brightness(1.06);
    transform: translateY(-1px);
    box-shadow:
        0 1px 0 rgba(255, 255, 255, 0.14) inset,
        0 12px 28px rgba(93, 64, 55, 0.34);
}

.admin-btn-ghost {
    color: var(--accent-brown);
    background: rgba(255, 255, 255, 0.6);
    border-color: var(--admin-border);
}

.admin-btn-ghost:hover:not(:disabled) {
    background: #fff;
    border-color: var(--admin-border-strong);
}

.admin-btn-danger {
    color: #b71c1c;
    background: rgba(183, 28, 28, 0.07);
    border-color: rgba(183, 28, 28, 0.2);
}

.admin-btn-danger:hover:not(:disabled) {
    background: rgba(183, 28, 28, 0.12);
    border-color: rgba(183, 28, 28, 0.32);
}

/* --- Main + section head --- */
.admin-main {
    max-width: 1280px;
    margin: 0 auto;
    padding: clamp(20px, 4vw, 36px) clamp(16px, 4vw, 32px) 60px;
}

.admin-section-head {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 18px;
    margin-bottom: 22px;
}

.admin-section-head-text {
    max-width: 560px;
}

.admin-eyebrow {
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    color: var(--accent-gold);
    margin-bottom: 6px;
}

.admin-page-title {
    font-family: var(--font-heading);
    font-size: clamp(1.65rem, 3.3vw, 2.1rem);
    color: var(--text-main);
    line-height: 1.15;
    margin-bottom: 6px;
}

.admin-page-sub {
    color: var(--text-muted);
    font-size: 0.94rem;
    line-height: 1.6;
    margin: 0;
}

.admin-toolbar {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

/* --- Stats row --- */
.admin-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
    gap: 14px;
    margin-bottom: 24px;
}

.admin-stat {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 16px 18px;
    background: var(--admin-card);
    border: 1px solid var(--admin-border);
    border-radius: var(--admin-radius);
    box-shadow: var(--admin-shadow-sm);
}

.admin-stat-icon {
    width: 44px;
    height: 44px;
    border-radius: 12px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    background: linear-gradient(165deg, #6d4c42, #4a342c);
    flex-shrink: 0;
}

.admin-stat-icon[data-tone="amber"] { background: linear-gradient(165deg, #c89469, #a16d44); }
.admin-stat-icon[data-tone="slate"] { background: linear-gradient(165deg, #5b6b78, #3a4750); }
.admin-stat-icon[data-tone="blue"]  { background: linear-gradient(165deg, #4a7ab0, #2d5a87); }
.admin-stat-icon[data-tone="rose"]  { background: linear-gradient(165deg, #b65f6b, #8c4051); }
.admin-stat-icon[data-tone="teal"] { background: linear-gradient(165deg, #2d8a7a, #1a5c52); }

.admin-stat-info {
    display: flex;
    flex-direction: column;
    line-height: 1.15;
    min-width: 0;
}

.admin-stat-label {
    font-size: 0.78rem;
    color: var(--text-muted);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    margin-bottom: 4px;
}

.admin-stat-value {
    font-family: var(--font-heading);
    font-size: 1.6rem;
    font-weight: 700;
    color: var(--text-main);
}

/* --- Card + table --- */
.admin-card {
    background: var(--admin-card);
    border: 1px solid var(--admin-border);
    border-radius: var(--admin-radius);
    box-shadow: var(--admin-shadow-sm);
    overflow: hidden;
}

.admin-card-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 12px;
    padding: 18px 20px;
    border-bottom: 1px solid var(--admin-border);
    background: linear-gradient(180deg, #fff 0%, #fbf8f3 100%);
}

.admin-card-title {
    font-family: var(--font-heading);
    font-size: 1.1rem;
    color: var(--text-main);
    margin: 0;
}

.admin-search {
    position: relative;
    flex: 0 1 320px;
    min-width: 200px;
}

.admin-search i {
    position: absolute;
    top: 50%;
    left: 14px;
    transform: translateY(-50%);
    color: var(--text-muted);
    pointer-events: none;
    font-size: 0.85rem;
}

.admin-search input {
    width: 100%;
    padding: 10px 14px 10px 38px;
    border-radius: 999px;
    border: 1px solid var(--admin-border);
    background: #fff;
    font: inherit;
    font-size: 0.9rem;
    color: var(--text-main);
    transition: border-color 0.18s ease, box-shadow 0.18s ease;
}

.admin-search input:focus {
    outline: none;
    border-color: var(--accent-brown);
    box-shadow: 0 0 0 3px rgba(93, 64, 55, 0.1);
}

.admin-card-body {
    position: relative;
}

.admin-table-wrap {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    overscroll-behavior-x: contain;
}

.admin-table-v2 {
    width: 100%;
    border-collapse: collapse;
    table-layout: auto;
}

.admin-table-v2 thead th {
    background: #fbf8f3;
    color: var(--text-muted);
    font-weight: 700;
    font-size: 0.74rem;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    padding: 14px 18px;
    border-bottom: 1px solid var(--admin-border);
    text-align: left;
    position: sticky;
    top: 0;
}

.admin-table-v2 tbody td {
    padding: 14px 18px;
    border-bottom: 1px solid var(--admin-border);
    font-size: 0.92rem;
    vertical-align: middle;
    color: var(--text-main);
}

.admin-table-v2 tbody tr:last-child td {
    border-bottom: none;
}

.admin-table-v2 tbody tr {
    transition: background 0.15s ease;
}

.admin-table-v2 tbody tr:hover {
    background: var(--admin-row-hover);
}

.admin-cell-product {
    display: flex;
    align-items: center;
    gap: 14px;
    min-width: 220px;
}

.admin-cell-thumb {
    width: 56px;
    height: 56px;
    border-radius: 12px;
    object-fit: cover;
    background: var(--bg-secondary);
    border: 1px solid var(--admin-border);
    flex-shrink: 0;
}

.admin-cell-name {
    display: flex;
    flex-direction: column;
    min-width: 0;
    line-height: 1.25;
}

.admin-cell-name strong {
    font-weight: 700;
    color: var(--text-main);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    max-width: 280px;
}

.admin-cell-name small {
    font-size: 0.76rem;
    color: var(--text-muted);
    margin-top: 2px;
}

.admin-pill {
    display: inline-flex;
    align-items: center;
    padding: 4px 12px;
    border-radius: 999px;
    font-size: 0.74rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    background: rgba(93, 64, 55, 0.08);
    color: var(--accent-brown);
    border: 1px solid rgba(93, 64, 55, 0.12);
    white-space: nowrap;
}

.admin-pill[data-cat="Outerwear"] {
    background: rgba(91, 107, 120, 0.1);
    color: #3a4750;
    border-color: rgba(91, 107, 120, 0.2);
}

.admin-pill[data-cat="Accessories"] {
    background: rgba(182, 95, 107, 0.1);
    color: #8c4051;
    border-color: rgba(182, 95, 107, 0.22);
}

.admin-cell-price {
    font-weight: 700;
    color: var(--text-main);
    white-space: nowrap;
}

.admin-col-actions {
    width: 1%;
    white-space: nowrap;
}

.admin-row-actions {
    display: inline-flex;
    gap: 6px;
}

.admin-icon-btn {
    width: 36px;
    height: 36px;
    border-radius: 10px;
    border: 1px solid var(--admin-border);
    background: #fff;
    color: var(--text-main);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: background 0.15s ease, color 0.15s ease, border-color 0.15s ease, transform 0.15s ease;
}

.admin-icon-btn:hover {
    background: rgba(93, 64, 55, 0.06);
    border-color: var(--admin-border-strong);
}

.admin-icon-btn[data-action="edit"]:hover {
    color: #1565c0;
    border-color: rgba(21, 101, 192, 0.3);
    background: rgba(21, 101, 192, 0.06);
}

.admin-icon-btn[data-action="del"]:hover {
    color: #c62828;
    border-color: rgba(198, 40, 40, 0.3);
    background: rgba(198, 40, 40, 0.06);
}

.admin-icon-btn--star {
    color: #9e9e9e;
}

.admin-icon-btn--star:hover {
    color: #f9a825;
    border-color: rgba(249, 168, 37, 0.45);
    background: rgba(249, 168, 37, 0.08);
}

.admin-icon-btn--star-on,
.admin-icon-btn--star-on:hover {
    color: #f9a825;
    border-color: rgba(249, 168, 37, 0.55);
    background: rgba(249, 168, 37, 0.12);
}

.admin-checkbox-row {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    margin-top: 6px;
    font-size: 0.95rem;
    line-height: 1.45;
    color: var(--text-main);
    cursor: pointer;
}

.admin-checkbox-row input {
    margin-top: 3px;
    flex-shrink: 0;
}

.admin-form-best-selling .admin-best-selling-hint {
    margin-top: 8px;
    margin-bottom: 0;
}

.home-featured-root {
    max-width: 1400px;
    margin: 0 auto;
}

.home-featured-category {
    margin-bottom: clamp(40px, 6vw, 64px);
}

.home-featured-category:last-child {
    margin-bottom: 0;
}

.home-featured-category-title {
    font-family: var(--font-heading);
    font-size: clamp(1.35rem, 2.5vw, 1.75rem);
    font-weight: 700;
    color: var(--accent-brown);
    margin: 0 0 20px;
    text-align: left;
    padding-bottom: 10px;
    border-bottom: 1px solid var(--accent-light);
}

.home-featured-grid {
    margin-top: 0;
}

.home-best-empty {
    grid-column: 1 / -1;
    text-align: center;
    padding: 48px 24px;
    background: var(--bg-secondary, #faf8f6);
    border-radius: var(--border-radius, 12px);
    border: 1px dashed rgba(93, 64, 55, 0.2);
    max-width: 520px;
    margin: 0 auto;
}

.home-best-empty-title {
    font-family: var(--font-heading);
    font-size: 1.15rem;
    color: var(--accent-brown);
    margin: 0 0 10px;
}

.home-best-empty-text {
    margin: 0;
    font-size: 0.95rem;
    color: var(--text-muted);
    line-height: 1.6;
}

.home-best-empty-text a {
    color: var(--accent-brown);
    font-weight: 600;
}

.home-featured-root > .home-best-empty {
    grid-column: unset;
}

/* --- Empty / loading / error states --- */
.admin-state {
    padding: 56px 28px;
    text-align: center;
    color: var(--text-muted);
}

.admin-state-icon {
    font-size: 2.4rem;
    margin-bottom: 14px;
    color: var(--accent-gold);
}

.admin-state h3 {
    font-family: var(--font-heading);
    color: var(--text-main);
    margin-bottom: 8px;
    font-size: 1.2rem;
}

.admin-state p {
    line-height: 1.55;
    max-width: 480px;
    margin: 0 auto 16px;
    font-size: 0.92rem;
}

.admin-state-error {
    background: rgba(183, 28, 28, 0.04);
    border-top: 1px solid rgba(183, 28, 28, 0.15);
}

.admin-state-error .admin-state-icon { color: #c62828; }
.admin-state-error h3 { color: #b71c1c; }

.admin-spinner {
    width: 28px;
    height: 28px;
    margin: 0 auto 14px;
    border-radius: 50%;
    border: 3px solid rgba(93, 64, 55, 0.18);
    border-top-color: var(--accent-brown);
    animation: admin-spin 0.85s linear infinite;
}

@keyframes admin-spin {
    to { transform: rotate(360deg); }
}

.visually-hidden {
    position: absolute !important;
    width: 1px; height: 1px;
    padding: 0; margin: -1px;
    overflow: hidden; clip: rect(0,0,0,0);
    white-space: nowrap; border: 0;
}

/* --- Modal v2 --- */
.admin-modal {
    position: fixed;
    inset: 0;
    background: rgba(20, 14, 10, 0.55);
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 4000;
    padding: clamp(12px, 3vw, 28px);
}

.admin-modal[data-open="yes"] {
    display: flex;
}

.admin-modal-content {
    width: min(960px, 100%);
    max-height: 92vh;
    overflow-y: auto;
    background: #fff;
    border-radius: var(--admin-radius);
    box-shadow: var(--admin-shadow-lg);
    padding: clamp(20px, 4vw, 32px);
}

.admin-modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 16px;
    padding-bottom: 14px;
    border-bottom: 1px solid var(--admin-border);
}

.admin-modal-header h2 {
    font-family: var(--font-heading);
    font-size: 1.4rem;
    margin: 0;
    color: var(--text-main);
}

.admin-modal-status {
    margin: 0 0 16px;
    padding: 12px 14px;
    border-radius: var(--admin-radius-sm);
    font-size: 0.92rem;
    line-height: 1.5;
    background: rgba(183, 28, 28, 0.06);
    color: #b71c1c;
    border: 1px solid rgba(183, 28, 28, 0.2);
}

.admin-modal-status[data-tone="success"] {
    background: rgba(46, 125, 50, 0.07);
    color: #2e7d32;
    border-color: rgba(46, 125, 50, 0.22);
}

.admin-modal-status[data-tone="info"] {
    background: rgba(21, 101, 192, 0.06);
    color: #0d47a1;
    border-color: rgba(21, 101, 192, 0.22);
}

.admin-modal-footer {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    padding-top: 8px;
    border-top: 1px solid var(--admin-border);
    margin-top: 8px;
}

/* Close button uses admin-icon-btn class already */
.admin-modal-header .admin-icon-btn {
    width: 40px;
    height: 40px;
}

/* --- Toast stack --- */
.admin-toast-stack {
    position: fixed;
    top: 16px;
    right: 16px;
    z-index: 9999;
    display: flex;
    flex-direction: column;
    gap: 10px;
    width: min(380px, calc(100vw - 32px));
    pointer-events: none;
}

.admin-toast {
    pointer-events: auto;
    background: #fff;
    border: 1px solid var(--admin-border);
    border-left: 4px solid var(--accent-brown);
    border-radius: 12px;
    padding: 12px 14px;
    display: flex;
    gap: 12px;
    align-items: flex-start;
    box-shadow: var(--admin-shadow-md);
    animation: admin-toast-in 0.22s cubic-bezier(0.2, 0.8, 0.25, 1);
    transform-origin: top right;
}

.admin-toast[data-leaving="yes"] {
    animation: admin-toast-out 0.18s ease forwards;
}

.admin-toast[data-tone="success"] { border-left-color: #2e7d32; }
.admin-toast[data-tone="error"]   { border-left-color: #c62828; }
.admin-toast[data-tone="warn"]    { border-left-color: #ef6c00; }
.admin-toast[data-tone="info"]    { border-left-color: #1565c0; }

.admin-toast-icon {
    flex-shrink: 0;
    margin-top: 2px;
    font-size: 1.05rem;
    color: var(--accent-brown);
}

.admin-toast[data-tone="success"] .admin-toast-icon { color: #2e7d32; }
.admin-toast[data-tone="error"] .admin-toast-icon   { color: #c62828; }
.admin-toast[data-tone="warn"] .admin-toast-icon    { color: #ef6c00; }
.admin-toast[data-tone="info"] .admin-toast-icon    { color: #1565c0; }

.admin-toast-body {
    flex: 1;
    min-width: 0;
    line-height: 1.45;
    font-size: 0.9rem;
    color: var(--text-main);
}

.admin-toast-title {
    display: block;
    font-weight: 700;
    margin-bottom: 2px;
    font-family: var(--font-heading);
    font-size: 1rem;
}

.admin-toast-msg {
    word-wrap: break-word;
    color: var(--text-main);
}

.admin-toast-close {
    background: transparent;
    border: none;
    cursor: pointer;
    color: var(--text-muted);
    font-size: 1rem;
    padding: 2px 4px;
    border-radius: 6px;
    line-height: 1;
    flex-shrink: 0;
}

.admin-toast-close:hover {
    color: var(--text-main);
    background: rgba(0, 0, 0, 0.05);
}

@keyframes admin-toast-in {
    from { opacity: 0; transform: translateX(20px) scale(0.96); }
    to   { opacity: 1; transform: translateX(0) scale(1); }
}

@keyframes admin-toast-out {
    to { opacity: 0; transform: translateX(20px) scale(0.96); }
}

/* --- Responsive admin shell --- */
@media (max-width: 720px) {
    .admin-topbar {
        flex-wrap: wrap;
    }
    .admin-topbar-link span,
    .admin-user-chip span {
        display: none;
    }
    .admin-section-head { align-items: flex-start; }
    .admin-toolbar { width: 100%; }
    .admin-toolbar .admin-btn { flex: 1; }
    .admin-cell-name strong { max-width: 180px; }
}

@media (max-width: 640px) {
    .admin-product-form-grid {
        grid-template-columns: 1fr;
    }

    .admin-form-span-2 {
        grid-column: span 1;
    }

    .admin-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 20px;
    }
}

/* --- Mobile Navigation Drawer --- */
.mobile-nav-toggle {
    display: none;
}

@media (max-width: 1024px) {
    :root {
        --section-padding: 60px clamp(16px, 5vw, 5%);
    }

    .mobile-nav-toggle {
        display: inline-flex;
    }

    .nav-links {
        position: fixed;
        top: 0;
        right: -100%;
        width: min(320px, 86vw);
        height: 100vh;
        height: 100dvh;
        max-height: 100dvh;
        padding: max(100px, calc(env(safe-area-inset-top, 0px) + 72px)) 24px
            max(32px, env(safe-area-inset-bottom, 0px)) max(20px, env(safe-area-inset-left, 0px));
        background: var(--white);
        flex-direction: column;
        justify-content: flex-start;
        align-items: stretch;
        gap: 8px;
        transition: right 0.38s cubic-bezier(0.16, 1, 0.3, 1);
        box-shadow: -20px 0 60px rgba(0, 0, 0, 0.12);
        z-index: 1001;
        display: flex;
        overflow-y: auto;
        -webkit-overflow-scrolling: touch;
        box-sizing: border-box;
    }

    .nav-links li {
        width: 100%;
        text-align: center;
    }

    .nav-links a {
        display: block;
        padding: 14px 16px;
        font-size: 1rem;
        border-radius: 12px;
    }

    .nav-links a:active {
        background: rgba(93, 64, 55, 0.08);
    }

    .nav-links.active {
        right: 0;
    }

    .nav-actions .btn-primary {
        display: none;
    }

    /* Hero Refinement */
    .hero {
        padding-top: 120px;
        flex-direction: column;
        text-align: center;
        height: auto;
    }

    .hero-content h1 {
        font-size: 2.8rem;
    }

    .hero-image-container {
        width: 100%;
        height: 450px;
        margin-top: 40px;
    }

    .hero-floating-card {
        left: 20px;
        bottom: -20px;
        padding: 15px;
    }

    /* Product Grid */
    .product-grid {
        grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
        gap: 20px;
    }

    .product-image {
        height: 300px;
    }

    /* Admin Table */
    .admin-table-container {
        overflow-x: auto;
    }

    .admin-table {
        min-width: 600px;
    }

    /* Footer */
    .footer-content {
        grid-template-columns: 1fr;
        gap: 40px;
    }
}

@media (max-width: 768px) {
    .section-title h2 {
        font-size: 2.2rem;
    }

    .vintage-about {
        flex-direction: column;
        gap: 40px;
    }

    .vintage-image {
        height: 350px;
        order: 2;
    }

    .vintage-text {
        order: 1;
        text-align: center;
    }

    /* Map Overlay */
    .map-overlay {
        position: static !important;
        max-width: 100% !important;
        margin: 20px;
        border-radius: 15px;
    }

    /* Modal Gallery */
    .detail-gallery {
        min-height: 300px;
    }

    .gallery-stage {
        padding: 14px 12px 8px;
    }

    .detail-gallery-tray {
        padding: 0 10px 14px;
    }

    .thumb-photo {
        width: 72px;
        height: 72px;
    }

    .thumb-video {
        width: 140px;
        height: 116px;
        min-height: 116px;
    }

    .thumb-video .thumb-video-inner {
        font-size: 1.65rem;
    }

    .thumb-photo,
    .thumb-video {
        -webkit-tap-highlight-color: transparent;
        touch-action: manipulation;
    }

    .shop-sidebar .filter-group ul {
        display: flex;
        flex-wrap: wrap;
        gap: 8px;
        align-items: center;
    }

    .shop-sidebar .filter-group ul li {
        margin-bottom: 0;
        padding: 10px 16px;
        border-radius: 999px;
        background: var(--bg-secondary);
        border: 1px solid rgba(93, 64, 55, 0.1);
        font-size: 0.88rem;
        line-height: 1.3;
        min-height: 44px;
        display: inline-flex;
        align-items: center;
        justify-content: center;
    }

    .shop-sidebar .filter-group ul li.active {
        background: rgba(93, 64, 55, 0.12);
        border-color: rgba(93, 64, 55, 0.25);
    }
}

@media (max-width: 480px) {
    :root {
        --section-padding: 48px clamp(14px, 4vw, 20px);
    }

    .hero-content h1 {
        font-size: clamp(1.85rem, 9vw, 2.2rem);
    }

    .hero-image-main {
        border-radius: 20px;
    }

    .hero-floating-card {
        left: 16px;
        right: 16px;
        bottom: 12px;
        max-width: none;
        width: auto;
    }

    .btn-primary {
        width: 100%;
        max-width: 100%;
        box-sizing: border-box;
        justify-content: center;
        display: inline-flex;
        align-items: center;
        min-height: 48px;
    }

    .product-grid {
        grid-template-columns: 1fr;
    }

    .page-header {
        padding: 100px clamp(14px, 4vw, 5%) 44px;
    }

    .page-header h1 {
        font-size: clamp(1.65rem, 8vw, 2.4rem);
    }

    .shop-container {
        padding: 40px clamp(14px, 4vw, 5%);
    }

    .contact-grid {
        padding: 40px clamp(14px, 4vw, 5%);
        gap: 36px;
    }

    .admin-cell-product {
        min-width: 0;
        gap: 10px;
    }

    .admin-cell-thumb {
        width: 48px;
        height: 48px;
    }
}

@media (hover: hover) and (pointer: fine) {
    .product-card:hover {
        transform: translateY(-10px);
        box-shadow: 0 30px 60px rgba(93, 64, 55, 0.1);
    }
}

@media (hover: none), (pointer: coarse) {
    .product-card:hover {
        transform: none;
        box-shadow: none;
    }

    .product-card:active {
        transform: scale(0.99);
    }
}

@media (prefers-reduced-motion: reduce) {
    html {
        scroll-behavior: auto;
    }

    .hero-floating-card {
        animation: none;
    }

    .nav-links {
        transition: none;
    }

    .nav-backdrop {
        transition: none;
    }
}

/* --- FAQ Accordion --- */
.faq-section-eyebrow {
    font-size: 0.82rem;
    font-weight: 700;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    color: var(--accent-gold);
    margin: 0 0 10px;
}

.faq-page-eyebrow {
    font-size: 0.85rem;
    font-weight: 700;
    letter-spacing: 0.22em;
    text-transform: uppercase;
    color: var(--accent-gold);
    margin: 0 0 12px;
}

.faq-section {
    padding: var(--section-padding);
    background: var(--bg-primary);
}

.faq-container {
    max-width: 800px;
    margin: 40px auto 0;
}

.faq-item {
    border-bottom: 1px solid var(--accent-light);
    padding: 20px 0;
}

.faq-question {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 20px;
    cursor: pointer;
    font-family: var(--font-heading);
    font-size: 1.2rem;
    font-weight: 700;
    color: var(--accent-brown);
    padding: 10px 0;
}

.faq-question i {
    margin-top: 5px;
    font-size: 0.9rem;
    transition: var(--transition);
    color: var(--accent-gold);
    flex-shrink: 0;
}

.faq-answer {
    max-height: 0;
    overflow: hidden;
    transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
    color: var(--text-muted);
    line-height: 1.7;
    font-size: 0.95rem;
}

.faq-item.active .faq-answer {
    max-height: 500px;
    margin-top: 15px;
    padding-bottom: 10px;
}

.faq-item.active .faq-question i {
    transform: rotate(180deg);
}

@media (max-width: 768px) {
    .faq-question {
        font-size: 1.1rem;
    }
}
