/* ==========================================================================
   Thriftique — design tokens
   Palette: warm ivory canvas, dusty plum header, terracotta accent, soft
   gold highlight. Signature: price shown as a rotated, stamped thrift tag.
   ========================================================================== */
:root {
    --canvas:      #FBF3EA;
    --kraft:       #F3E1CE;
    --forest:      #7B4B54;
    --forest-dark: #5C3740;
    --ink:         #4A3B34;
    --rust:        #E2481F;
    --mustard:     #EAB550;
    --line:        #E8D2BE;
    --white:       #FFFDF9;

    --font-display: 'Oswald', sans-serif;
    --font-body:    'Work Sans', sans-serif;
    --font-mono:    'JetBrains Mono', monospace;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
    margin: 0;
    background: var(--canvas);
    color: var(--ink);
    font-family: var(--font-body);
    font-size: 16.5px;
    line-height: 1.55;
}

a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }

.wrap {
    max-width: 1120px;
    margin: 0 auto;
    padding: 0 24px;
}

/* Focus visibility (accessibility) */
a:focus-visible, button:focus-visible, input:focus-visible,
select:focus-visible, textarea:focus-visible {
    outline: 3px solid var(--mustard);
    outline-offset: 2px;
}

@media (prefers-reduced-motion: reduce) {
    * { animation: none !important; transition: none !important; }
    html { scroll-behavior: auto; }
}

/* ---------- Header ---------- */
.site-header {
    background: var(--forest);
    color: var(--canvas);
    border-bottom: 3px solid var(--rust);
    position: sticky;
    top: 0;
    z-index: 500;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.header-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 22px 24px 14px;
    flex-wrap: wrap;
    gap: 16px;
}

.header-right {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 6px;
}

.header-links {
    display: flex;
    gap: 18px;
    align-items: center;
}

.header-links a {
    font-family: var(--font-mono);
    font-size: 0.92rem;
    font-weight: 600;
    color: var(--kraft);
}

.header-links a:hover { color: var(--white); }

.header-greeting {
    font-family: var(--font-mono);
    font-size: 0.92rem;
    font-weight: 700;
    color: var(--mustard);
    white-space: nowrap;
}

.cart-link { position: relative; }

.cart-badge {
    position: absolute;
    top: -10px;
    right: -16px;
    background: var(--rust);
    color: var(--white);
    font-size: 0.68rem;
    font-weight: 700;
    font-family: var(--font-mono);
    border-radius: 999px;
    padding: 2px 6px;
    min-width: 17px;
    text-align: center;
    box-shadow: 0 2px 4px rgba(0,0,0,0.25);
}

.logo {
    font-family: var(--font-display);
    font-weight: 700;
    font-size: 2.1rem;
    letter-spacing: 0.04em;
    color: var(--canvas);
    display: inline-flex;
    align-items: center;
}

/* Classic layered-shadow 3D text effect: each shadow layer is offset by
   one more pixel, building a solid "extruded" edge, finished with a soft
   drop shadow underneath for grounding. */
.logo-3d {
    color: var(--canvas);
    text-shadow:
        1px 1px 0 var(--forest-dark),
        2px 2px 0 var(--forest-dark),
        3px 3px 0 var(--forest-dark),
        4px 4px 0 var(--forest-dark),
        5px 6px 8px rgba(0, 0, 0, 0.45);
    transition: transform 0.2s ease, text-shadow 0.2s ease;
    display: inline-block;
}

.logo:hover .logo-3d {
    transform: translate(-1px, -1px);
    text-shadow:
        1px 1px 0 var(--forest-dark),
        2px 2px 0 var(--forest-dark),
        3px 3px 0 var(--forest-dark),
        4px 4px 0 var(--forest-dark),
        5px 5px 0 var(--forest-dark),
        6px 8px 10px rgba(0, 0, 0, 0.5);
}

.logo-mark {
    display: inline-block;
    background: var(--rust);
    color: var(--white);
    padding: 2px 10px;
    transform: rotate(-2deg);
    border-radius: 4px;
    margin-right: 2px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.2);
}

.logo-by {
    font-family: var(--font-mono);
    font-size: 0.85rem;
    font-weight: 500;
    color: var(--mustard);
    letter-spacing: 0.04em;
}

.tagline {
    margin: 0;
    font-family: 'Dancing Script', cursive;
    font-weight: 700;
    font-size: 1.7rem;
    line-height: 1;
    color: var(--mustard);
    letter-spacing: 0.02em;
}

.cat-nav {
    background: var(--forest-dark);
    overflow-x: auto;
}

.cat-nav-inner {
    display: flex;
    gap: 6px;
    padding: 0 24px;
}

.cat-tab {
    font-family: var(--font-display);
    font-size: 1.05rem;
    font-weight: 500;
    letter-spacing: 0.03em;
    color: var(--kraft);
    padding: 17px 20px;
    border-bottom: 2px solid transparent;
    white-space: nowrap;
    transition: color 0.15s ease, border-color 0.15s ease;
}

.cat-tab:hover {
    color: var(--white);
}

.cat-tab.active {
    color: var(--white);
    border-bottom-color: var(--rust);
    font-weight: 600;
}

/* ---------- Main content ---------- */
.main-content { padding: 32px 24px 64px; min-height: 50vh; }

.page-heading {
    font-family: var(--font-display);
    font-size: 2.1rem;
    letter-spacing: 0.01em;
    margin: 0 0 4px;
    color: var(--forest);
}

.page-subheading {
    font-family: var(--font-mono);
    color: #6b654f;
    margin: 0 0 28px;
    font-size: 0.98rem;
}

/* ---------- Product grid & cards ---------- */
.product-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 22px;
}

.product-card {
    background: var(--white);
    border: 1px solid var(--line);
    border-radius: 6px;
    overflow: hidden;
    position: relative;
    transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}

.product-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 12px 24px -14px rgba(74, 59, 52, 0.35);
    border-color: #d8c3b0;
}

.product-thumb {
    aspect-ratio: 1 / 1;
    background: var(--kraft);
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

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

.no-photo {
    font-family: var(--font-mono);
    font-size: 0.75rem;
    color: #8a8264;
}

.product-info { padding: 14px 14px 18px; }

.product-cat {
    font-family: var(--font-mono);
    font-size: 0.7rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--rust);
    margin: 0 0 4px;
}

.product-name {
    font-family: var(--font-display);
    font-size: 1.12rem;
    font-weight: 600;
    margin: 0 0 10px;
    color: var(--ink);
}

/* Signature element: stamped thrift-tag price */
.price-tag {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-family: var(--font-mono);
    font-weight: 700;
    color: var(--rust);
    border: 1.5px dashed var(--rust);
    border-radius: 999px;
    padding: 5px 14px;
    transform: rotate(-1.5deg);
    font-size: 1rem;
    background: rgba(226, 72, 31, 0.06);
}

.price-tag::before {
    content: '';
    width: 5px;
    height: 5px;
    border-radius: 50%;
    background: var(--rust);
}

.stock-note {
    display: block;
    margin-top: 8px;
    font-family: var(--font-mono);
    font-size: 0.72rem;
    color: #6b654f;
}

.stock-note.out { color: var(--rust); font-weight: 600; }

.empty-state {
    font-family: var(--font-mono);
    color: #6b654f;
    padding: 40px 0;
    text-align: center;
}

/* ---------- Product detail page ---------- */
.product-detail {
    display: grid;
    grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr);
    gap: 40px;
}

@media (max-width: 760px) {
    .product-detail { grid-template-columns: 1fr; }
}

.gallery-main {
    aspect-ratio: 1 / 1;
    background: var(--white);
    border: 1px solid var(--line);
    border-radius: 8px;
    overflow: hidden;
    margin-bottom: 10px;
}

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

.gallery-thumbs {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.gallery-thumbs img {
    width: 68px;
    height: 68px;
    object-fit: cover;
    border-radius: 4px;
    border: 2px solid transparent;
    cursor: pointer;
}

.gallery-thumbs img.active { border-color: var(--rust); }

.detail-cat {
    font-family: var(--font-mono);
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--rust);
}

.detail-name {
    font-family: var(--font-display);
    font-size: 2rem;
    margin: 4px 0 16px;
    color: var(--ink);
}

.detail-price {
    font-size: 1.3rem;
    padding: 8px 18px;
    margin-bottom: 18px;
}

.detail-meta {
    display: flex;
    gap: 18px;
    flex-wrap: wrap;
    font-family: var(--font-mono);
    font-size: 0.85rem;
    color: #524d3c;
    margin-bottom: 20px;
}

.detail-meta strong { color: var(--ink); }

.detail-description {
    border-top: 1px solid var(--line);
    padding-top: 18px;
    color: #454133;
}

.back-link {
    display: inline-block;
    margin-bottom: 20px;
    font-family: var(--font-mono);
    font-size: 0.85rem;
    color: var(--forest);
    border-bottom: 1px solid var(--forest);
}

/* ---------- Trust strip ---------- */
.trust-strip {
    background: var(--kraft);
    border-top: 1px solid var(--line);
    border-bottom: 1px solid var(--line);
}

.trust-strip-inner {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 32px;
    padding: 16px 24px;
}

.trust-item {
    display: flex;
    align-items: center;
    gap: 8px;
    font-family: var(--font-mono);
    font-size: 0.82rem;
    color: var(--ink);
    font-weight: 600;
    white-space: nowrap;
}

.trust-icon { font-size: 1.1rem; }

/* ---------- Footer ---------- */
.site-footer {
    background: var(--forest);
    color: var(--kraft);
}

.footer-columns {
    display: grid;
    grid-template-columns: 1.4fr 1fr 1fr 1fr;
    gap: 32px;
    padding: 40px 24px 28px;
}

.footer-col-brand .footer-brand-name {
    font-family: var(--font-display);
    font-size: 1.3rem;
    font-weight: 700;
    color: var(--white);
    margin: 0 0 10px;
}

.footer-brand-name span {
    font-size: 0.85rem;
    font-weight: 500;
    color: var(--mustard);
}

.footer-blurb {
    font-family: var(--font-body);
    font-size: 0.85rem;
    line-height: 1.6;
    color: var(--kraft);
    opacity: 0.85;
    margin: 0;
    max-width: 320px;
}

.footer-col-heading {
    font-family: var(--font-mono);
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--mustard);
    margin: 0 0 14px;
}

.footer-col a {
    display: block;
    font-family: var(--font-body);
    font-size: 0.88rem;
    color: var(--kraft);
    margin-bottom: 10px;
}

.footer-col a:hover { color: var(--white); text-decoration: underline; }

.footer-bottom-bar {
    padding: 16px 24px;
    border-top: 1px solid rgba(255,255,255,0.12);
    font-family: var(--font-mono);
    font-size: 0.78rem;
    text-align: center;
    color: var(--kraft);
    opacity: 0.75;
}

@media (max-width: 760px) {
    .footer-columns {
        grid-template-columns: 1fr 1fr;
    }
    .footer-col-brand { grid-column: 1 / -1; }
    .trust-strip-inner { gap: 18px; }
}

@media (max-width: 480px) {
    .footer-columns { grid-template-columns: 1fr; }
    .trust-item { font-size: 0.78rem; }
}

/* ---------- Forms (shared with admin) ---------- */
.form-card {
    background: var(--white);
    border: 1px solid var(--line);
    border-radius: 8px;
    padding: 28px;
    max-width: 620px;
}

.form-card.wide { max-width: 820px; }

.field { margin-bottom: 18px; }

.field label {
    display: block;
    font-family: var(--font-mono);
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: var(--forest);
    margin-bottom: 6px;
}

.field-hint {
    display: block;
    font-family: var(--font-mono);
    font-size: 0.72rem;
    color: #837b5e;
    margin-top: 4px;
}

input[type=text], input[type=number], input[type=password],
input[type=file], select, textarea {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid var(--line);
    border-radius: 5px;
    font-family: var(--font-body);
    font-size: 0.95rem;
    background: var(--canvas);
    color: var(--ink);
}

textarea { resize: vertical; min-height: 100px; }

.row-2 {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
}

@media (max-width: 520px) { .row-2 { grid-template-columns: 1fr; } }

.btn {
    display: inline-block;
    font-family: var(--font-display);
    letter-spacing: 0.04em;
    text-transform: uppercase;
    font-size: 0.88rem;
    font-weight: 600;
    padding: 13px 30px;
    border-radius: 4px;
    border: none;
    cursor: pointer;
    background: var(--rust);
    color: var(--white);
    box-shadow: 0 1px 2px rgba(0,0,0,0.08);
    transition: background 0.15s ease, box-shadow 0.15s ease;
}

.btn:hover {
    background: #c53d18;
    box-shadow: 0 4px 12px rgba(226,72,31,0.28);
}

.btn:active {
    background: #ad3616;
    box-shadow: 0 1px 2px rgba(0,0,0,0.1);
}

.btn.secondary {
    background: transparent;
    color: var(--forest);
    border: 1.5px solid var(--forest);
    box-shadow: none;
}

.btn.secondary:hover {
    background: var(--forest);
    color: var(--white);
    box-shadow: none;
}

.btn.danger { background: #8a2a12; }
.btn.danger:hover { background: #6e2009; box-shadow: 0 4px 12px rgba(138,42,18,0.28); }

.alert {
    padding: 12px 16px;
    border-radius: 5px;
    font-family: var(--font-mono);
    font-size: 0.85rem;
    margin-bottom: 18px;
}

.alert.error { background: #fbe3db; color: #8a2a12; border: 1px solid #e2a892; }
.alert.success { background: #e6ecdd; color: #2a5c3a; border: 1px solid #b7c7a3; }

/* ---------- Admin shell ---------- */
.admin-shell { background: var(--canvas); min-height: 100vh; }

.admin-topbar-slim {
    background: var(--forest);
    color: var(--white);
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 14px 24px;
    position: sticky;
    top: 0;
    z-index: 300;
}

.admin-topbar-left {
    display: flex;
    align-items: center;
    gap: 14px;
}

.admin-topbar-right {
    display: flex;
    align-items: center;
    gap: 18px;
}

.admin-topbar-right a {
    font-family: var(--font-mono);
    font-size: 0.88rem;
    font-weight: 600;
    color: var(--mustard);
}

.admin-topbar-right a:hover { text-decoration: underline; }

.brand {
    font-family: var(--font-display);
    font-weight: 700;
    font-size: 1.15rem;
    letter-spacing: 0.03em;
    text-shadow:
        1px 1px 0 var(--forest-dark),
        2px 2px 0 var(--forest-dark),
        3px 4px 5px rgba(0, 0, 0, 0.35);
}

.admin-sidebar-toggle {
    display: none;
    flex-direction: column;
    justify-content: center;
    gap: 4px;
    width: 34px;
    height: 34px;
    background: rgba(255,255,255,0.1);
    border: none;
    border-radius: 6px;
    cursor: pointer;
    padding: 0;
}

.admin-sidebar-toggle span {
    display: block;
    width: 18px;
    height: 2px;
    background: var(--white);
    margin: 0 auto;
    border-radius: 2px;
}

.admin-layout {
    display: flex;
    align-items: flex-start;
    min-height: calc(100vh - 62px);
}

.admin-sidebar {
    width: 220px;
    flex-shrink: 0;
    background: var(--forest-dark);
    min-height: calc(100vh - 62px);
    padding: 20px 0;
    position: sticky;
    top: 62px;
}

.admin-sidebar nav {
    display: flex;
    flex-direction: column;
}

.sidebar-group-label {
    font-family: var(--font-mono);
    font-size: 0.68rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--mustard);
    opacity: 0.85;
    margin: 18px 20px 6px;
}

.sidebar-group-label:first-child { margin-top: 0; }

.admin-sidebar nav a {
    font-family: var(--font-body);
    font-size: 0.9rem;
    font-weight: 500;
    color: var(--kraft);
    padding: 9px 20px;
    border-left: 3px solid transparent;
}

.admin-sidebar nav a:hover {
    background: rgba(255,255,255,0.05);
    color: var(--white);
}

.admin-sidebar nav a.active {
    background: rgba(234,181,80,0.12);
    border-left-color: var(--mustard);
    color: var(--white);
    font-weight: 700;
}

.admin-content {
    flex: 1;
    min-width: 0;
    padding: 30px 24px 60px;
}

.admin-content > * {
    max-width: 1120px;
    margin-left: 0;
    margin-right: auto;
}

@media (max-width: 900px) {
    .admin-sidebar-toggle { display: flex; }

    .admin-sidebar {
        position: fixed;
        top: 0;
        left: 0;
        height: 100vh;
        z-index: 400;
        transform: translateX(-100%);
        transition: transform 0.2s ease;
        box-shadow: 4px 0 20px rgba(0,0,0,0.3);
        overflow-y: auto;
        padding-top: 70px;
    }

    .admin-sidebar.open { transform: translateX(0); }

    .admin-topbar-right .header-greeting { display: none; }
}

.admin-heading-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 12px;
    margin-bottom: 22px;
}

table.admin-table {
    width: 100%;
    border-collapse: collapse;
    background: var(--white);
    border: 1px solid var(--line);
    border-radius: 6px;
    overflow: hidden;
}

table.admin-table th, table.admin-table td {
    text-align: left;
    padding: 12px 14px;
    border-bottom: 1px solid var(--line);
    font-size: 0.9rem;
}

table.admin-table th {
    font-family: var(--font-mono);
    text-transform: uppercase;
    font-size: 0.72rem;
    letter-spacing: 0.05em;
    color: var(--forest);
    background: var(--kraft);
}

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

.thumb-cell img {
    width: 46px;
    height: 46px;
    object-fit: cover;
    border-radius: 4px;
}

.action-links a {
    font-family: var(--font-mono);
    font-size: 0.8rem;
    margin-right: 12px;
    color: var(--forest);
    border-bottom: 1px solid var(--forest);
}

.action-links a.danger { color: #8a2a12; border-bottom-color: #8a2a12; }

.payment-options {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.payment-option {
    display: flex;
    align-items: center;
    gap: 8px;
    font-family: var(--font-body);
    font-size: 0.95rem;
    padding: 10px 12px;
    border: 1px solid var(--line);
    border-radius: 5px;
    cursor: pointer;
}

.payment-option input { width: auto; }

.payment-info {
    background: var(--canvas);
    border: 1px dashed var(--line);
    border-radius: 5px;
    padding: 12px 14px;
    margin-top: 10px;
    font-size: 0.9rem;
}

.status-badge {
    display: inline-block;
    font-family: var(--font-mono);
    font-size: 0.72rem;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    padding: 3px 10px;
    border-radius: 999px;
}

.status-pending   { background: #f0e2c4; color: #7a5b16; }
.status-confirmed { background: #d7e3f0; color: #24507a; }
.status-paid       { background: #dcead0; color: #2f5e1f; }
.status-shipped   { background: #e0d9f0; color: #4a2f7a; }
.status-completed { background: #cfe8d8; color: #2a5c3a; }
.status-cancelled { background: #f5d9d2; color: #8a2a12; }

/* ---------- Shop toolbar (search + sort) ---------- */
.shop-toolbar {
    display: flex;
    gap: 12px;
    margin-bottom: 8px;
    flex-wrap: wrap;
}

.shop-search {
    flex: 1;
    min-width: 200px;
    padding: 10px 14px;
    border: 1px solid var(--line);
    border-radius: 5px;
    background: var(--white);
    font-family: var(--font-body);
    font-size: 0.9rem;
}

.shop-sort {
    padding: 10px 14px;
    border: 1px solid var(--line);
    border-radius: 5px;
    background: var(--white);
    font-family: var(--font-mono);
    font-size: 0.82rem;
}

/* ---------- Gallery zoom hint + lightbox ---------- */
.gallery-main { position: relative; }

.gallery-main img { cursor: zoom-in; }

.zoom-hint {
    position: absolute;
    bottom: 10px;
    right: 10px;
    background: rgba(47, 62, 46, 0.75);
    color: var(--white);
    font-family: var(--font-mono);
    font-size: 0.7rem;
    padding: 4px 10px;
    border-radius: 999px;
    pointer-events: none;
}

.gallery-thumbs img { transition: border-color 0.15s ease, transform 0.15s ease; }
.gallery-thumbs img:hover { transform: scale(1.05); }

.lightbox {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(33, 30, 24, 0.92);
    z-index: 999;
    align-items: center;
    justify-content: center;
}

.lightbox.open { display: flex; }

.lightbox img {
    max-width: min(90vw, 900px);
    max-height: 85vh;
    object-fit: contain;
    border-radius: 4px;
}

.lightbox-close, .lightbox-nav {
    position: absolute;
    background: rgba(255, 253, 248, 0.12);
    color: var(--white);
    border: none;
    cursor: pointer;
    font-size: 1.8rem;
    line-height: 1;
    padding: 10px 16px;
    border-radius: 6px;
    transition: background 0.15s ease;
}

.lightbox-close:hover, .lightbox-nav:hover { background: rgba(255, 253, 248, 0.25); }

.lightbox-close { top: 20px; right: 20px; }
.lightbox-prev { left: 20px; top: 50%; transform: translateY(-50%); }
.lightbox-next { right: 20px; top: 50%; transform: translateY(-50%); }

@media (max-width: 600px) {
    .lightbox-prev, .lightbox-next { padding: 8px 12px; font-size: 1.4rem; }
}

/* ---------- Quantity stepper ---------- */
.qty-stepper {
    display: flex;
    align-items: stretch;
    max-width: 160px;
}

.qty-stepper input {
    text-align: center;
    border-radius: 0;
    border-left: none;
    border-right: none;
}

.qty-btn {
    width: 42px;
    flex-shrink: 0;
    background: var(--kraft);
    border: 1px solid var(--line);
    font-family: var(--font-display);
    font-size: 1.1rem;
    color: var(--forest);
    cursor: pointer;
}

.qty-btn:first-child { border-radius: 5px 0 0 5px; }
.qty-btn:last-child { border-radius: 0 5px 5px 0; }
.qty-btn:hover { background: var(--mustard); }

.order-total {
    font-family: var(--font-mono);
    font-size: 0.9rem;
    color: var(--forest);
    margin: 4px 0 18px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.btn:disabled { opacity: 0.6; cursor: not-allowed; }

/* ---------- Alerts (fade in) ---------- */
.alert { animation: alertIn 0.2s ease; }
@keyframes alertIn {
    from { opacity: 0; transform: translateY(-4px); }
    to { opacity: 1; transform: translateY(0); }
}

.existing-images {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    margin-bottom: 10px;
}

.existing-images figure {
    margin: 0;
    text-align: center;
}

.existing-images img {
    width: 78px;
    height: 78px;
    object-fit: cover;
    border-radius: 4px;
    border: 1px solid var(--line);
}

.existing-images figcaption { margin-top: 4px; }

.existing-images figcaption a {
    font-family: var(--font-mono);
    font-size: 0.7rem;
    color: #8a2a12;
}

/* ==========================================================================
   Shopee-style features: wishlist, sale pricing, ratings, cart, checkout,
   order timeline, flash sale banner, reviews
   ========================================================================== */

/* ---------- Wishlist heart ---------- */
.wishlist-heart {
    position: absolute;
    top: 10px;
    right: 10px;
    z-index: 2;
    width: 34px;
    height: 34px;
    border-radius: 50%;
    border: none;
    background: rgba(255, 253, 249, 0.9);
    color: var(--line);
    font-size: 1.2rem;
    line-height: 1;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: color 0.15s ease, transform 0.15s ease;
}

.wishlist-heart:hover { transform: scale(1.1); }
.wishlist-heart.active { color: var(--rust); }

.detail-heart {
    position: static;
    flex-shrink: 0;
}

/* ---------- Sale flag + strike price ---------- */
.sale-flag {
    position: absolute;
    top: 10px;
    left: 10px;
    z-index: 2;
    background: var(--rust);
    color: var(--white);
    font-family: var(--font-mono);
    font-size: 0.68rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    padding: 3px 10px;
    border-radius: 999px;
}

.detail-sale-flag { position: absolute; top: 10px; left: 10px; }

.price-strike {
    color: #8a8264;
    text-decoration: line-through;
    font-family: var(--font-mono);
    font-size: 0.8rem;
    margin-left: 6px;
}

/* ---------- Star ratings ---------- */
.stars { color: var(--mustard); letter-spacing: 1px; }

.mini-rating {
    font-size: 0.78rem;
    color: #6b654f;
    margin: 0 0 8px;
    display: flex;
    align-items: center;
    gap: 6px;
}

.star-input { display: flex; gap: 4px; align-items: center; }

.star-choice {
    background: none;
    border: none;
    font-size: 1.6rem;
    color: var(--line);
    cursor: pointer;
    padding: 0;
    line-height: 1;
}

.star-choice.filled { color: var(--mustard); }

.review-item {
    border-top: 1px solid var(--line);
    padding: 16px 0;
}

.review-item:first-of-type { border-top: none; }

.reviews-section { margin-top: 40px; }

/* ---------- Urgency badge ---------- */
.stock-note.urgent {
    color: var(--rust);
    font-weight: 600;
}

/* ---------- Flash sale banner ---------- */
.flash-sale-banner {
    background: linear-gradient(135deg, var(--forest) 0%, var(--forest-dark) 100%);
    border-radius: 10px;
    padding: 24px;
    margin-bottom: 36px;
}

.flash-sale-heading {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 16px;
}

.flash-sale-heading h2 {
    font-family: var(--font-display);
    color: var(--white);
    font-size: 1.4rem;
    margin: 0;
}

.flash-sale-heading .field-hint { color: var(--kraft); }

.flash-sale-grid { gap: 16px; }
.flash-sale-grid .product-card { background: var(--white); }

/* ---------- Cart page ---------- */
.cart-list {
    display: flex;
    flex-direction: column;
    gap: 14px;
    margin-bottom: 24px;
}

.cart-row {
    display: grid;
    grid-template-columns: 70px 1fr 90px 90px 32px;
    gap: 14px;
    align-items: center;
    background: var(--white);
    border: 1px solid var(--line);
    border-radius: 6px;
    padding: 12px;
}

@media (max-width: 640px) {
    .cart-row {
        grid-template-columns: 60px 1fr;
        grid-template-areas:
            "thumb info"
            "thumb qty"
            "thumb total";
    }
    .cart-row-qty, .cart-row-total { justify-self: start; }
}

.cart-row-thumb {
    width: 70px;
    height: 70px;
    border-radius: 4px;
    overflow: hidden;
    background: var(--kraft);
    display: flex;
    align-items: center;
    justify-content: center;
}

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

.cart-row-info { display: flex; flex-direction: column; gap: 2px; }

.cart-row-qty input {
    width: 70px;
    text-align: center;
    padding: 6px;
}

.cart-row-total {
    font-family: var(--font-mono);
    font-weight: 600;
    color: var(--forest);
}

.cart-row-remove {
    background: none;
    border: none;
    font-size: 1.3rem;
    color: #8a2a12;
    cursor: pointer;
    line-height: 1;
}

.cart-summary {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: var(--white);
    border: 1px solid var(--line);
    border-radius: 6px;
    padding: 16px 20px;
    font-family: var(--font-mono);
}

/* ---------- Checkout summary lines ---------- */
.checkout-line {
    display: flex;
    justify-content: space-between;
    padding: 4px 0;
    font-size: 0.92rem;
}

/* ---------- Order status timeline ---------- */
.order-timeline {
    display: flex;
    justify-content: space-between;
    position: relative;
    margin: 10px 0;
}

.order-timeline::before {
    content: '';
    position: absolute;
    top: 8px;
    left: 20px;
    right: 20px;
    height: 2px;
    background: var(--line);
    z-index: 0;
}

.timeline-step {
    position: relative;
    z-index: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    flex: 1;
}

.timeline-dot {
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: var(--white);
    border: 2px solid var(--line);
}

.timeline-step.done .timeline-dot {
    background: var(--rust);
    border-color: var(--rust);
}

.timeline-label {
    font-family: var(--font-mono);
    font-size: 0.68rem;
    text-transform: uppercase;
    letter-spacing: 0.03em;
    color: #8a8264;
    text-align: center;
}

.timeline-step.done .timeline-label { color: var(--forest); font-weight: 600; }

/* ---------- Notification bell + list ---------- */
.bell-link {
    position: relative;
    font-size: 1.15rem;
}

.notification-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.notification-item {
    display: block;
    background: var(--white);
    border: 1px solid var(--line);
    border-radius: 6px;
    padding: 14px 16px;
    transition: border-color 0.15s ease;
}

.notification-item:hover { border-color: var(--rust); }

.notification-item p { margin: 0 0 4px; }

/* ---------- Google sign-in button ---------- */
.google-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    max-width: 620px;
    padding: 12px 20px;
    background: var(--white);
    border: 1px solid var(--line);
    border-radius: 8px;
    font-family: var(--font-body);
    font-weight: 600;
    font-size: 0.95rem;
    color: var(--ink);
    box-shadow: 0 2px 4px rgba(0,0,0,0.06);
    transition: box-shadow 0.15s ease, transform 0.1s ease;
}

.google-btn:hover {
    box-shadow: 0 4px 10px rgba(0,0,0,0.12);
    transform: translateY(-1px);
}

.or-divider {
    max-width: 620px;
    display: flex;
    align-items: center;
    gap: 12px;
    margin: 18px 0;
    font-family: var(--font-mono);
    font-size: 0.78rem;
    color: #8a8264;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.or-divider::before, .or-divider::after {
    content: '';
    flex: 1;
    height: 1px;
    background: var(--line);
}

/* ---------- Coming Soon / upcoming items ---------- */
.upcoming-banner {
    background: linear-gradient(135deg, #6b4a52 0%, #4a3239 100%);
    border-radius: 10px;
    padding: 24px;
    margin-bottom: 28px;
}

.upcoming-banner .flash-sale-heading h2 { color: var(--white); }
.upcoming-banner .flash-sale-heading .field-hint { color: var(--kraft); }
.upcoming-banner .product-card { background: var(--white); }

.upcoming-flag {
    background: var(--forest);
}

/* ---------- New Arrivals ---------- */
.new-arrivals-banner {
    background: linear-gradient(135deg, var(--mustard) 0%, #c98a2e 100%);
    border-radius: 10px;
    padding: 24px;
    margin-bottom: 28px;
}

.new-arrivals-banner .flash-sale-heading h2 { color: var(--forest-dark); }
.new-arrivals-banner .flash-sale-heading .field-hint { color: #6b4a1a; }
.new-arrivals-banner .product-card { background: var(--white); }

.new-flag {
    background: var(--forest);
}

.product-card.is-upcoming .product-thumb img {
    opacity: 0.85;
    filter: grayscale(15%);
}

.coming-soon-notice {
    background: var(--kraft);
    border: 1px dashed var(--forest);
    border-radius: 6px;
    padding: 12px 16px;
    margin-bottom: 16px;
    font-size: 0.92rem;
}

.coming-soon-notice p { margin: 0; }

/* Overrides so the wishlist-heart button can also render as a normal
   text button (used for "Notify Me When Available" on upcoming items) */
.notify-btn {
    position: static;
    width: auto;
    height: auto;
    border-radius: 4px;
    font-size: 0.88rem;
    display: inline-flex;
}

.notify-btn.active {
    background: var(--forest);
    color: var(--white);
    border: 1.5px solid var(--forest);
}

/* ---------- Static content pages (About/Shipping/Terms) ---------- */
.static-page-content {
    max-width: 720px;
    font-size: 1rem;
    line-height: 1.7;
    color: var(--ink);
}

/* ---------- FAQ ---------- */
.faq-list { max-width: 720px; }

.faq-item {
    border-bottom: 1px solid var(--line);
    padding: 16px 0;
}

.faq-item:first-child { padding-top: 0; }

.faq-question {
    font-family: var(--font-display);
    font-weight: 600;
    color: var(--forest);
    margin: 0 0 6px;
}

.faq-answer {
    margin: 0;
    color: #4a3b34;
}

.recently-viewed-section { margin-bottom: 36px; }

/* ---------- Advanced filter bar ---------- */
.filter-bar {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-end;
    gap: 14px;
    margin-bottom: 16px;
    padding: 14px 16px;
    background: var(--white);
    border: 1px solid var(--line);
    border-radius: 6px;
}

.filter-group {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.filter-group label {
    font-family: var(--font-mono);
    font-size: 0.7rem;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: var(--forest);
}

.filter-group input, .filter-group select {
    padding: 7px 10px;
    border: 1px solid var(--line);
    border-radius: 4px;
    font-family: var(--font-body);
    font-size: 0.88rem;
    width: 110px;
}

/* ---------- Sales dashboard stat cards ---------- */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
    gap: 16px;
}

.stat-card {
    background: var(--white);
    border: 1px solid var(--line);
    border-radius: 8px;
    padding: 18px 20px;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.stat-label {
    font-family: var(--font-mono);
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: var(--forest);
}

.stat-value {
    font-family: var(--font-display);
    font-size: 1.8rem;
    font-weight: 700;
    color: var(--ink);
}

/* ---------- Bulk actions bar ---------- */
.bulk-actions-bar {
    display: flex;
    align-items: center;
    gap: 12px;
    background: var(--kraft);
    border: 1px solid var(--line);
    border-radius: 6px;
    padding: 10px 14px;
    margin-bottom: 12px;
    flex-wrap: wrap;
}

.bulk-actions-bar select {
    padding: 7px 10px;
    border: 1px solid var(--line);
    border-radius: 4px;
    font-family: var(--font-body);
    font-size: 0.85rem;
}

/* ---------- Live chat widget (customer-facing floating bubble) ---------- */
.chat-widget {
    position: fixed;
    bottom: 20px;
    right: 20px;
    z-index: 999;
}

.chat-bubble {
    position: relative;
    width: 58px;
    height: 58px;
    border-radius: 50%;
    background: var(--rust);
    color: var(--white);
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    box-shadow: 0 6px 16px rgba(0,0,0,0.25);
    transition: transform 0.15s ease;
}

.chat-bubble:hover { transform: scale(1.06); }

/* Full-screen backdrop, matching the photo lightbox's modal treatment */
.chat-backdrop {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(33, 30, 24, 0.55);
    z-index: 1000;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.chat-backdrop.open { display: flex; }

.chat-panel {
    width: 480px;
    max-width: 100%;
    height: 700px;
    max-height: 90vh;
    background: var(--white);
    border-radius: 14px;
    box-shadow: 0 24px 60px rgba(0,0,0,0.35);
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.chat-panel-header {
    background: var(--forest);
    color: var(--white);
    padding: 18px 22px;
    font-family: var(--font-display);
    font-size: 1.15rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.chat-panel-header button {
    background: none;
    border: none;
    color: var(--white);
    font-size: 1.6rem;
    cursor: pointer;
    line-height: 1;
}

.chat-preform {
    padding: 16px;
}

.chat-input-field {
    width: 100%;
    padding: 9px 12px;
    border: 1px solid var(--line);
    border-radius: 5px;
    font-family: var(--font-body);
    font-size: 0.9rem;
}

.chat-thread {
    flex: 1;
    overflow-y: auto;
    padding: 14px;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.admin-chat-thread {
    height: 340px;
    border: 1px solid var(--line);
    border-radius: 6px;
    background: var(--canvas);
}

.chat-message {
    max-width: 80%;
    padding: 8px 12px;
    border-radius: 12px;
    font-size: 0.88rem;
    line-height: 1.4;
    word-wrap: break-word;
}

.chat-message-customer {
    align-self: flex-end;
    background: var(--rust);
    color: var(--white);
    border-bottom-right-radius: 3px;
}

.chat-message-admin {
    align-self: flex-start;
    background: var(--kraft);
    color: var(--ink);
    border-bottom-left-radius: 3px;
}

.chat-send-form {
    display: flex;
    gap: 8px;
    padding: 12px;
    border-top: 1px solid var(--line);
}

.chat-send-form input[type="text"] {
    flex: 1;
    padding: 9px 12px;
    border: 1px solid var(--line);
    border-radius: 5px;
    font-family: var(--font-body);
    font-size: 0.9rem;
}

.chat-send-form button {
    background: var(--rust);
    color: var(--white);
    border: none;
    border-radius: 5px;
    width: 40px;
    cursor: pointer;
    font-size: 1rem;
}

@media (max-width: 480px) {
    .chat-panel { height: 92vh; max-height: 92vh; border-radius: 10px; }
    .chat-backdrop { padding: 10px; }
}

/* ---------- Toast notifications ---------- */
.toast-container {
    position: fixed;
    bottom: 90px;
    right: 20px;
    z-index: 1100;
    display: flex;
    flex-direction: column;
    gap: 10px;
    align-items: flex-end;
}

.toast {
    background: var(--forest);
    color: var(--white);
    font-family: var(--font-body);
    font-size: 0.9rem;
    padding: 12px 20px;
    border-radius: 8px;
    box-shadow: 0 8px 20px rgba(0,0,0,0.25);
    opacity: 0;
    transform: translateY(10px);
    transition: opacity 0.25s ease, transform 0.25s ease;
    max-width: 300px;
}

.toast-visible {
    opacity: 1;
    transform: translateY(0);
}

.toast-success { background: var(--forest); }
.toast-error { background: #8a2a12; }

@media (max-width: 480px) {
    .toast-container { right: 12px; bottom: 84px; left: 12px; align-items: stretch; }
    .toast { max-width: none; }
}

/* ---------- Breadcrumbs ---------- */
.breadcrumbs {
    font-family: var(--font-mono);
    font-size: 0.82rem;
    color: #8a8264;
    margin-bottom: 18px;
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    align-items: center;
}

.breadcrumbs a { color: var(--forest); }
.breadcrumbs a:hover { text-decoration: underline; }
.breadcrumb-sep { color: #c9bb94; }
.breadcrumb-current { color: #6b654f; }

/* ---------- Mobile-friendly admin tables ---------- */
@media (max-width: 700px) {
    table.admin-table {
        display: block;
        overflow-x: auto;
        white-space: nowrap;
        -webkit-overflow-scrolling: touch;
    }
    table.admin-table thead, table.admin-table tbody, table.admin-table tr {
        display: table;
        width: 100%;
        table-layout: fixed;
    }
}

.mobile-buy-bar-spacer {
    display: none;
}

@media (max-width: 760px) {
    .mobile-buy-bar-spacer {
        display: block;
        height: 76px;
    }
}

@media (max-width: 760px) {
    .mobile-buy-bar {
        display: flex;
        align-items: center;
        gap: 14px;
        position: fixed;
        bottom: 0;
        left: 0;
        right: 0;
        background: var(--white);
        border-top: 1px solid var(--line);
        padding: 12px 16px;
        box-shadow: 0 -4px 12px rgba(0,0,0,0.1);
        z-index: 400;
    }

    .mobile-buy-bar-price {
        font-family: var(--font-mono);
        font-weight: 700;
        color: var(--rust);
        font-size: 1.1rem;
        white-space: nowrap;
    }

    .mobile-buy-bar form { flex: 1; }
}

/* ---------- Image fade-in on load ---------- */
.product-thumb img, .gallery-main img, .cart-row-thumb img, .thumb-cell img {
    transition: opacity 0.3s ease;
}

.img-fade-loading { opacity: 0; }

/* ---------- Universal button loading state ---------- */
.btn-loading {
    opacity: 0.65;
    cursor: not-allowed;
    position: relative;
}

.btn-loading::after {
    content: '';
    display: inline-block;
    width: 12px;
    height: 12px;
    margin-left: 8px;
    border: 2px solid rgba(255,255,255,0.5);
    border-top-color: #fff;
    border-radius: 50%;
    vertical-align: middle;
    animation: btnSpin 0.6s linear infinite;
}

.btn-loading.secondary::after {
    border-color: rgba(123, 75, 84, 0.3);
    border-top-color: var(--forest);
}

@keyframes btnSpin {
    to { transform: rotate(360deg); }
}

/* ---------- Bigger touch targets on mobile checkout/cart ---------- */
@media (max-width: 600px) {
    .payment-option {
        padding: 13px 14px;
    }
    .qty-btn {
        width: 46px;
        font-size: 1.3rem;
    }
    .qty-stepper input {
        width: 60px;
    }
    .cart-row-remove {
        font-size: 1.6rem;
        padding: 6px 10px;
    }
    select, input[type=text], input[type=number], input[type=email], input[type=password], textarea {
        font-size: 1rem;
        padding: 12px 14px;
    }
}

/* ---------- Mobile/tablet header & nav ---------- */
.mobile-nav-toggle {
    display: none;
    flex-direction: column;
    justify-content: center;
    gap: 5px;
    width: 40px;
    height: 40px;
    background: rgba(255,255,255,0.1);
    border: none;
    border-radius: 6px;
    cursor: pointer;
    padding: 0;
    flex-shrink: 0;
}

.mobile-nav-toggle span {
    display: block;
    width: 22px;
    height: 2px;
    background: var(--canvas);
    margin: 0 auto;
    border-radius: 2px;
    transition: transform 0.2s ease, opacity 0.2s ease;
}

.mobile-nav-toggle[aria-expanded="true"] span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.mobile-nav-toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.mobile-nav-toggle[aria-expanded="true"] span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

@media (max-width: 860px) {
    .header-inner {
        flex-wrap: nowrap;
        align-items: center;
        padding: 14px 20px;
    }

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

    .header-right {
        display: none;
        width: 100%;
        order: 3;
        flex-basis: 100%;
        align-items: flex-start;
        margin-top: 14px;
        padding-top: 14px;
        border-top: 1px solid rgba(255,255,255,0.15);
    }

    .header-right.open { display: flex; }

    .tagline {
        font-size: 1.3rem;
        margin-bottom: 10px;
    }

    .header-links {
        flex-direction: column;
        align-items: flex-start;
        gap: 14px;
        width: 100%;
    }

    .header-links a, .header-greeting {
        font-size: 1rem;
        width: 100%;
    }

    .cart-badge { position: static; display: inline-block; margin-left: 6px; }

    .logo { font-size: 1.6rem; }
    .logo-mark { padding: 1px 8px; }
    .logo-by { font-size: 0.7rem; }

    .cat-tab {
        font-size: 0.92rem;
        padding: 13px 15px;
    }
}

@media (max-width: 480px) {
    .header-inner { padding: 12px 16px; }
    .logo { font-size: 1.35rem; }
    .logo-by { display: none; }
    .tagline { font-size: 1.1rem; }
    .cat-tab { font-size: 0.85rem; padding: 12px 12px; }
}

/* ---------- Shop by Category circles (homepage) ---------- */
.category-circles-section {
    margin-bottom: 32px;
}

.category-circles-row {
    display: flex;
    gap: 24px;
    overflow-x: auto;
    padding: 4px 2px 12px;
    scrollbar-width: thin;
}

.category-circle-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    flex-shrink: 0;
    width: 92px;
    text-align: center;
}

.category-circle-photo {
    width: 84px;
    height: 84px;
    border-radius: 50%;
    overflow: hidden;
    background: var(--kraft);
    display: flex;
    align-items: center;
    justify-content: center;
    border: 2px solid var(--line);
    transition: border-color 0.15s ease, transform 0.15s ease;
}

.category-circle-item:hover .category-circle-photo {
    border-color: var(--rust);
    transform: translateY(-3px);
}

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

.category-circle-placeholder {
    font-family: var(--font-display);
    font-size: 1.8rem;
    font-weight: 700;
    color: var(--forest);
}

.category-circle-label {
    font-family: var(--font-display);
    font-size: 0.88rem;
    font-weight: 600;
    color: var(--ink);
}

.category-circle-count {
    font-family: var(--font-mono);
    font-size: 0.7rem;
    color: #8a8264;
}

@media (max-width: 600px) {
    .category-circle-item { width: 76px; }
    .category-circle-photo { width: 68px; height: 68px; }
}

/* ---------- Promo tiles (homepage) ---------- */
.promo-tiles-section {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 16px;
    margin-bottom: 32px;
}

.promo-tile {
    position: relative;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    gap: 6px;
    min-height: 130px;
    padding: 20px;
    border-radius: 10px;
    overflow: hidden;
    color: var(--white);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.promo-tile:hover {
    transform: translateY(-3px);
    box-shadow: 0 14px 28px -12px rgba(0,0,0,0.4);
}

.promo-tile-new { background: linear-gradient(135deg, var(--mustard) 0%, #c98a2e 100%); }
.promo-tile-sale { background: linear-gradient(135deg, var(--rust) 0%, #a2380c 100%); }
.promo-tile-budget { background: linear-gradient(135deg, var(--forest) 0%, var(--forest-dark) 100%); }

.promo-tile-label {
    font-family: var(--font-display);
    font-size: 1.3rem;
    font-weight: 700;
    letter-spacing: 0.01em;
}

.promo-tile-cta {
    font-family: var(--font-mono);
    font-size: 0.8rem;
    opacity: 0.9;
}

@media (max-width: 700px) {
    .promo-tiles-section {
        grid-template-columns: 1fr;
    }
}

/* ---------- Product promo video ---------- */
.product-video-section {
    margin-top: 14px;
}

.product-video-label {
    font-family: var(--font-mono);
    font-size: 0.78rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--rust);
    margin: 0 0 8px;
}

.product-video-player {
    width: 100%;
    border-radius: 8px;
    border: 1px solid var(--line);
    background: #000;
    max-height: 400px;
}

/* ---------- Header search bar ---------- */
.header-search {
    display: flex;
    flex: 1 1 320px;
    max-width: 420px;
    order: 1;
}

.header-search input[type="text"] {
    flex: 1;
    padding: 10px 14px;
    border: none;
    border-radius: 6px 0 0 6px;
    font-family: var(--font-body);
    font-size: 0.9rem;
    background: var(--white);
    color: var(--ink);
}

.header-search button {
    background: var(--rust);
    color: var(--white);
    border: none;
    border-radius: 0 6px 6px 0;
    padding: 0 16px;
    font-size: 1rem;
    cursor: pointer;
}

.header-right { order: 2; }

@media (max-width: 860px) {
    .header-search {
        order: 3;
        flex-basis: 100%;
        max-width: none;
    }
    .header-right {
        order: 4;
    }
}

/* ---------- Homepage layout with ad panel ---------- */
.homepage-layout {
    display: grid;
    grid-template-columns: 1fr 280px;
    gap: 28px;
    align-items: start;
}

.homepage-main { min-width: 0; }

.ad-panel {
    position: sticky;
    top: 90px;
    background: var(--white);
    border: 1px solid var(--line);
    border-radius: 10px;
    padding: 14px;
}

.ad-panel-heading {
    font-family: var(--font-mono);
    font-size: 0.72rem;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--forest);
    margin: 0 0 10px;
}

.ad-slider {
    position: relative;
    aspect-ratio: 3 / 4;
    border-radius: 8px;
    overflow: hidden;
    background: var(--kraft);
}

.ad-slide {
    position: absolute;
    inset: 0;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.5s ease;
}

.ad-slide.active {
    opacity: 1;
    visibility: visible;
}

.ad-slide img, .ad-slide video {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.ad-slide a { display: block; width: 100%; height: 100%; }

.ad-slide-caption {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    margin: 0;
    padding: 10px 12px;
    background: linear-gradient(to top, rgba(0,0,0,0.65), transparent);
    color: var(--white);
    font-family: var(--font-body);
    font-size: 0.82rem;
    font-weight: 600;
}

.ad-slider-dots {
    display: flex;
    justify-content: center;
    gap: 6px;
    margin-top: 10px;
}

.ad-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--line);
    border: none;
    cursor: pointer;
    padding: 0;
    transition: background 0.2s ease, transform 0.2s ease;
}

.ad-dot.active {
    background: var(--rust);
    transform: scale(1.3);
}

@media (max-width: 900px) {
    .homepage-layout {
        grid-template-columns: 1fr;
    }
    .ad-panel {
        position: static;
    }
    .ad-slider {
        aspect-ratio: 16 / 9;
    }
}

/* ---------- Chat online/offline status indicator ---------- */
.chat-panel-header > span {
    display: flex;
    flex-direction: column;
    gap: 3px;
}

.chat-online-status {
    display: flex;
    align-items: center;
    gap: 5px;
    font-family: var(--font-mono);
    font-size: 0.7rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.03em;
    opacity: 0.9;
}

.chat-online-dot {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    display: inline-block;
}

.chat-online-status.is-online .chat-online-dot {
    background: #4caf50;
    box-shadow: 0 0 0 2px rgba(76,175,80,0.25);
}

.chat-online-status.is-offline .chat-online-dot {
    background: #b0a99a;
}

/* ---------- Admin: consistent action button styles ---------- */
.btn-text {
    background: none;
    border: none;
    padding: 0;
    font-family: var(--font-mono);
    font-size: 0.8rem;
    color: var(--forest);
    border-bottom: 1px solid var(--forest);
    cursor: pointer;
    text-decoration: none;
    display: inline-block;
    line-height: 1.4;
}

.btn-text:hover { opacity: 0.75; }

.btn-text.danger {
    color: #8a2a12;
    border-bottom-color: #8a2a12;
}

.btn-sm {
    padding: 8px 16px;
    font-size: 0.8rem;
}

.btn-xs {
    padding: 6px 12px;
    font-size: 0.75rem;
}

.btn-icon {
    background: none;
    border: none;
    padding: 0;
    cursor: pointer;
    font-size: 1rem;
    line-height: 1;
    color: var(--forest);
}

.btn-icon:hover { opacity: 0.7; }

/* ---------- Admin settings: clean section cards ---------- */
.settings-section {
    background: var(--white);
    border: 1px solid var(--line);
    border-radius: 10px;
    padding: 24px 26px;
    margin-bottom: 20px;
}

.settings-section-heading {
    font-family: var(--font-display);
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--forest);
    margin: 0 0 6px;
}

.settings-section-intro {
    margin-bottom: 18px;
}

.settings-checkbox-label {
    max-width: 420px;
}

.input-narrow {
    max-width: 140px;
}
