/* ==========================================================================
   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: baseline;
    justify-content: space-between;
    padding: 22px 24px 14px;
    flex-wrap: wrap;
    gap: 6px;
}

.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); }

.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);
}

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

.footer-inner-stack {
    padding: 18px 24px;
}

.footer-links {
    display: flex;
    flex-wrap: wrap;
    gap: 16px;
    justify-content: center;
    margin-bottom: 14px;
    padding-bottom: 14px;
    border-bottom: 1px solid rgba(255,255,255,0.12);
}

.footer-links a {
    font-family: var(--font-mono);
    font-size: 0.78rem;
    color: var(--kraft);
}

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

.footer-inner {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-family: var(--font-mono);
    font-size: 0.78rem;
    flex-wrap: wrap;
    gap: 8px;
}

.admin-link { color: var(--mustard); }
.admin-link:hover { text-decoration: underline; }

/* ---------- 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 {
    background: var(--forest);
    color: var(--white);
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px 24px;
}

.admin-topbar a.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-topbar nav a {
    font-family: var(--font-mono);
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--mustard);
    margin-left: 20px;
}

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

.admin-body { padding: 30px 24px 60px; max-width: 1120px; margin: 0 auto; }

.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; }
}
