:root {
    --bg-body: #0D0D0D;
    --bg-card: #1A1A1A;
    --bg-card-border: #2E2E2E;
    --text-main: #FFFFFF;
    --text-muted: #B3B3B3;
    --orange: #FBC701;
    --sky-blue: #EAEDEF;
    --purple: #FBC701;
    --input-bg: #141414;
    --input-border: #2E2E2E;
    --on-accent: #0A0A0A;
}

.light-theme {
    --bg-body: #FFFFFF;
    --bg-card: #FFFFFF;
    --bg-card-border: #E5E5E5;
    --text-main: #0A0A0A;
    --text-muted: #525252;
    --orange: #A66F00;
    --sky-blue: #1A1A1A;
    --purple: #A66F00;
    --input-bg: #FFFFFF;
    --input-border: #D4D4D4;
    --on-accent: #0A0A0A;
}

/* Theme-aware brand logo: white on dark theme, black on light theme. */
.logo-light { display: none !important; }
.logo-dark { display: inline-block !important; }
.light-theme .logo-dark { display: none !important; }
.light-theme .logo-light { display: inline-block !important; }

/* Homepage Shop | MotoMarket showcase toggle */
.home-showcase-toggle { display: inline-flex; gap: 4px; margin-top: 1.2rem; background: var(--input-bg); border: 1px solid var(--bg-card-border); border-radius: 999px; padding: 4px; }
.home-showcase-tab { background: transparent; border: none; color: var(--text-muted); font-weight: 700; font-size: 0.9rem; padding: 8px 22px; border-radius: 999px; cursor: pointer; transition: background 0.15s, color 0.15s; }
.home-showcase-tab:hover { color: var(--text-main); }
.home-showcase-tab.active { background: var(--orange); color: var(--on-accent); }

body {
    background-color: var(--bg-body);
    color: var(--text-main);
    font-family: system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

.light-theme select,
.light-theme input,
.light-theme textarea,
.light-theme select option {
    background-color: #FFFFFF !important;
    color: #0F172A !important;
    border-color: #CBD5E1 !important;
}

.navbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 5%;
    background: var(--bg-card);
    border-bottom: 1px solid var(--bg-card-border);
    flex-wrap: wrap;
    gap: 1rem;
    position: sticky;
    top: 0;
    z-index: 1200;
}

.brand-logo-img {
    height: 56px;
    width: auto;
    display: block;
}

.nav-links {
    display: flex;
    gap: 1.8rem;
    align-items: center;
}

.nav-links a {
    color: var(--text-main);
    text-decoration: none;
    font-weight: 600;
    font-size: 0.95rem;
    transition: color 0.2s ease;
}

.nav-links a:hover,
.nav-links a.active {
    color: var(--orange);
}

.header-actions {
    display: flex;
    align-items: center;
    gap: 1rem;
}

/* ===== Mobile header alignment ===== */
@media (max-width: 860px) {
    .navbar {
        padding: 0.7rem 4%;
        row-gap: 0.6rem;
        justify-content: center;
    }
    .logo-container { flex: 1 1 auto; }
    .header-actions {
        flex: 0 0 auto;
        gap: 0.55rem;
        flex-wrap: wrap;
        justify-content: flex-end;
    }
    .nav-links {
        order: 3;
        flex-basis: 100%;
        justify-content: center;
        flex-wrap: wrap;
        gap: 1rem;
        row-gap: 0.5rem;
        padding-top: 0.5rem;
        border-top: 1px solid var(--bg-card-border);
    }
    .lang-btn { padding: 4px 8px; font-size: 0.72rem; }
    .theme-toggle-btn { padding: 5px 9px; }
    .auth-link { padding: 6px 10px; font-size: 0.82rem; }
    .brand-logo-img { height: 44px; }
}
@media (max-width: 420px) {
    .header-actions { gap: 0.4rem; }
    .nav-links { gap: 0.7rem; font-size: 0.9rem; }
    .nav-links a { font-size: 0.9rem; }
}

.lang-selector {
    display: flex;
    gap: 3px;
    background: var(--input-bg);
    padding: 3px;
    border-radius: 20px;
    border: 1px solid var(--bg-card-border);
}

.lang-btn {
    background: transparent;
    border: none;
    color: var(--text-muted);
    padding: 5px 11px;
    border-radius: 16px;
    cursor: pointer;
    font-size: 0.8rem;
    font-weight: 700;
}

.lang-btn.active {
    background: var(--orange);
    color: #FFFFFF;
}

.theme-toggle-btn {
    background: var(--input-bg);
    border: 1px solid var(--bg-card-border);
    color: var(--text-main);
    padding: 6px 12px;
    border-radius: 20px;
    cursor: pointer;
}

.auth-link {
    color: var(--text-main);
    text-decoration: none;
    font-weight: 600;
    padding: 6px 14px;
    border-radius: 8px;
    font-size: 0.9rem;
}

.grid-3 {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 360px));
    gap: 1.5rem;
    justify-content: center;
}

/* Gallery category tree */
.gallery-layout { display: flex; gap: 1.75rem; align-items: flex-start; }
.gallery-tree { flex: 0 0 240px; background: var(--bg-card); border: 1px solid var(--bg-card-border); border-radius: 12px; padding: 0.75rem; position: sticky; top: 90px; }
.gallery-tree-node, .gallery-tree-cat, .gallery-tree-sub { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 8px 10px; border-radius: 8px; cursor: pointer; color: var(--text-main); font-size: 0.92rem; }
.gallery-tree-node { font-weight: 700; margin-bottom: 4px; }
.gallery-tree-cat { font-weight: 600; margin-top: 4px; }
.gallery-tree-subs { margin: 2px 0 4px 10px; border-left: 2px solid var(--bg-card-border); padding-left: 6px; }
.gallery-tree-sub { font-size: 0.86rem; color: var(--text-muted); }
.gallery-tree-node:hover, .gallery-tree-cat:hover, .gallery-tree-sub:hover { background: var(--bg-body); }
.gallery-tree-node.active, .gallery-tree-cat.active, .gallery-tree-sub.active { background: var(--orange); color: var(--on-accent); }
.gallery-tree-count { font-size: 0.72rem; background: var(--bg-body); color: var(--text-muted); border-radius: 999px; padding: 1px 8px; min-width: 20px; text-align: center; }
.gallery-tree-node.active .gallery-tree-count, .gallery-tree-cat.active .gallery-tree-count, .gallery-tree-sub.active .gallery-tree-count { background: rgba(255,255,255,0.25); color: #fff; }
@media (max-width: 820px) {
    .gallery-layout { flex-direction: column; }
    .gallery-tree { flex: 1 1 auto; width: 100%; position: static; }
}

.grid-2 {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 1rem;
}

.product-card {
    background: var(--bg-card);
    border: 1px solid var(--bg-card-border);
    border-radius: 14px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

.product-img-wrapper {
    width: 100%;
    height: 260px;
    overflow: hidden;
    position: relative;
    background: #141414;
    display: flex;
    align-items: center;
    justify-content: center;
    border-bottom: 1px solid var(--bg-card-border);
}

.product-img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    padding: 12px;
    box-sizing: border-box;
}

.product-info {
    padding: 1.25rem;
    display: flex;
    flex-direction: column;
    flex: 1;
}

.product-title {
    font-size: 1.15rem;
    font-weight: 700;
    margin: 0 0 0.5rem 0;
}

.product-desc {
    color: var(--text-muted);
    font-size: 0.88rem;
    line-height: 1.5;
    margin: 0 0 1.2rem 0;
    flex: 1;
}

.product-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: auto;
    gap: 10px;
}

.product-price {
    font-size: 1.2rem;
    font-weight: bold;
    color: var(--sky-blue);
}

.btn-basket {
    background: var(--orange);
    color: #FFFFFF;
    border: none;
    padding: 7px 14px;
    border-radius: 6px;
    font-weight: bold;
    font-size: 0.85rem;
    cursor: pointer;
}

.btn-amazon {
    background: transparent;
    color: var(--text-main);
    border: 1px solid var(--bg-card-border);
    padding: 6px 12px;
    border-radius: 6px;
    text-decoration: none;
    font-size: 0.85rem;
}

.footer {
    background: #141414;
    border-top: 1px solid var(--bg-card-border);
    padding: 2.5rem 5% 1.8rem 5%;
    margin-top: auto;
    width: 100%;
    position: relative;
}

.footer-top-border {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 2px;
    background: linear-gradient(90deg, var(--orange) 0%, var(--sky-blue) 50%, var(--purple) 100%);
}

.footer-content-clean {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
}

.footer-brand-centered .footer-logo {
    height: 60px;
    width: auto;
    margin-bottom: 0.8rem;
}

.footer-nav-horizontal {
    display: flex;
    gap: 2rem;
    padding: 1.2rem 0;
    margin: 1.2rem 0;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.footer-nav-horizontal a {
    color: var(--text-main);
    text-decoration: none;
    font-weight: 700;
}

.form-group {
    margin-bottom: 1.2rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.4rem;
    font-size: 0.88rem;
    color: var(--text-muted);
}

.form-group input, .form-group textarea, .form-group select {
    width: 100%;
    padding: 0.75rem;
    border-radius: 8px;
    border: 1px solid var(--input-border);
    background: var(--input-bg);
    color: var(--text-main);
    box-sizing: border-box;
}

.btn-hero {
    background: var(--orange);
    color: var(--on-accent);
    border: none;
    padding: 0.8rem 1.5rem;
    font-weight: bold;
    border-radius: 8px;
    cursor: pointer;
}

.admin-card { background: var(--bg-card); border: 1px solid var(--bg-card-border); padding: 1.5rem; border-radius: 12px; margin-bottom: 1.5rem; }
.admin-tab-bar { display: flex; gap: 8px; margin-bottom: 1.5rem; flex-wrap: wrap; }
/* Admin sticky header holding the tab navigation */
.admin-header { position: sticky; top: 0; z-index: 1200; background: var(--bg-card); border-bottom: 1px solid var(--bg-card-border); }
.admin-header-top { display: flex; justify-content: space-between; align-items: center; padding: 0.9rem 5%; gap: 1rem; flex-wrap: wrap; }
.admin-header .admin-tab-bar { padding: 0 5% 0.8rem; margin-bottom: 0; }
.admin-header .admin-tab-btn { padding: 8px 14px; font-size: 0.88rem; }
.admin-tab-btn { background: var(--bg-card); border: 1px solid var(--bg-card-border); color: var(--text-main); padding: 10px 18px; border-radius: 8px; cursor: pointer; font-weight: bold; }
.admin-tab-btn.active { background: var(--orange); border-color: var(--orange); color: var(--on-accent); }
/* Newsletter composer */
.nl-toolbar { display:flex; flex-wrap:wrap; align-items:center; gap:6px; padding:8px; margin-top:12px; background:var(--bg-body); border:1px solid var(--bg-card-border); border-radius:8px 8px 0 0; }
.nl-tool { background:var(--bg-card); border:1px solid var(--bg-card-border); color:var(--text-main); border-radius:6px; padding:5px 9px; cursor:pointer; font-size:0.9rem; line-height:1; }
.nl-tool:hover { border-color:var(--orange); }
.nl-select { background:var(--bg-card); border:1px solid var(--bg-card-border); color:var(--text-main); border-radius:6px; padding:5px 6px; cursor:pointer; }
.nl-sep { width:1px; height:20px; background:var(--bg-card-border); margin:0 4px; }
.nl-editor { min-height:240px; padding:14px; border:1px solid var(--bg-card-border); border-top:none; border-radius:0 0 8px 8px; background:#ffffff; color:#0F172A; overflow:auto; }
.nl-editor:empty:before { content:attr(data-placeholder); color:#94A3B8; }
.nl-actions { display:flex; flex-wrap:wrap; gap:10px; margin-top:1rem; }
.nl-pick:hover { border-color:var(--orange) !important; }
.table { width: 100%; border-collapse: collapse; text-align: left; }
.table th, .table td { padding: 10px; border-bottom: 1px solid var(--bg-card-border); }

/* ===== Admin CRM hub (Customers & Orders) ===== */
.admin-refresh-btn { background: var(--input-bg); color: var(--text-main); border: 1px solid var(--bg-card-border); padding: 7px 13px; border-radius: 7px; font-weight: 600; font-size: 0.82rem; cursor: pointer; }
.admin-refresh-btn:hover { border-color: var(--orange); }
.admin-refresh-btn.danger { color: #EF4444; }
.admin-refresh-btn.danger:hover { border-color: #EF4444; }
.admin-refresh-btn:disabled { opacity: 0.45; cursor: not-allowed; }
.crm-subtab-bar { display: flex; gap: 8px; margin-bottom: 1.2rem; }
.crm-subtab-btn { background: var(--bg-card); border: 1px solid var(--bg-card-border); color: var(--text-main); padding: 9px 20px; border-radius: 9px 9px 0 0; cursor: pointer; font-weight: bold; }
.crm-subtab-btn.active { background: var(--sky-blue); border-color: var(--sky-blue); color: #111111; }
.crm-toolbar { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; margin-bottom: 1rem; }
.admin-search { flex: 1; min-width: 220px; padding: 0.7rem 0.9rem; border-radius: 9px; border: 1px solid var(--input-border); background: var(--input-bg); color: var(--text-main); }
.admin-inline-select, .admin-inline-input { padding: 5px 8px; border-radius: 6px; background: var(--input-bg); color: var(--text-main); border: 1px solid var(--input-border); font-size: 0.82rem; }
.admin-inline-input { width: 120px; }

/* Customer rows + 360 */
.customer-row { border: 1px solid var(--bg-card-border); border-radius: 10px; margin-bottom: 10px; overflow: hidden; background: var(--bg-body); }
.customer-head { display: flex; justify-content: space-between; align-items: center; gap: 10px; padding: 12px 14px; cursor: pointer; flex-wrap: wrap; }
.customer-head:hover { background: rgba(255,255,255,0.02); }
.cust-email { color: var(--text-muted); font-size: 0.82rem; margin-left: 8px; }
.cust-meta { display: flex; align-items: center; gap: 12px; font-size: 0.82rem; color: var(--text-muted); flex-wrap: wrap; }
.cust-caret { color: var(--orange); font-weight: bold; }
.role-badge { font-size: 0.68rem; font-weight: bold; padding: 2px 9px; border-radius: 12px; text-transform: uppercase; letter-spacing: 0.4px; }
.role-badge.role-admin { background: var(--purple); color: #fff; }
.role-badge.role-customer { background: var(--input-bg); color: var(--text-muted); border: 1px solid var(--bg-card-border); }
.customer-360 { padding: 14px; border-top: 1px solid var(--bg-card-border); background: var(--bg-card); }
.c360-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 12px; }
.c360-box { background: var(--bg-body); border: 1px solid var(--bg-card-border); border-radius: 10px; padding: 12px; }
.c360-box h4 { margin: 0 0 10px; color: var(--sky-blue); font-size: 0.9rem; }
.c360-actions { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 10px; }
.c360-addr-list { display: flex; flex-direction: column; gap: 8px; font-size: 0.84rem; color: var(--text-muted); }
.c360-addr { position: relative; border: 1px solid var(--bg-card-border); border-radius: 8px; padding: 8px 10px; }
.c360-addr.is-default { border-color: var(--orange); }
.c360-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.c360-chip { background: var(--input-bg); border: 1px solid var(--bg-card-border); border-radius: 12px; padding: 3px 10px; font-size: 0.78rem; }
.c360-line, .c360-basket .c360-line { display: flex; justify-content: space-between; gap: 8px; font-size: 0.83rem; color: var(--text-muted); padding: 3px 0; }
.c360-order { display: flex; justify-content: space-between; align-items: center; gap: 10px; padding: 8px 0; border-bottom: 1px solid var(--bg-card-border); flex-wrap: wrap; }
.c360-order:last-child { border-bottom: none; }
.c360-track { font-size: 0.76rem; color: var(--text-muted); margin-left: 8px; }

/* Order status chips + badges */
.chip-row { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 1rem; }
.status-chip { background: var(--input-bg); border: 1px solid var(--bg-card-border); color: var(--text-main); padding: 5px 12px; border-radius: 16px; cursor: pointer; font-size: 0.8rem; font-weight: 600; }
.status-chip.active { background: var(--orange); border-color: var(--orange); color: var(--on-accent); }
.chip-count { opacity: 0.7; font-size: 0.72rem; }
.order-badge { display: inline-block; font-size: 0.68rem; font-weight: bold; padding: 2px 9px; border-radius: 10px; text-transform: uppercase; letter-spacing: 0.3px; margin-top: 4px; }
.order-badge.b-pending { background: #F59E0B; color: #1a1206; }
.order-badge.b-paid { background: var(--sky-blue); color: #06263a; }
.order-badge.b-processing { background: var(--purple); color: #fff; }
.order-badge.b-shipped { background: #6366F1; color: #fff; }
.order-badge.b-delivered { background: #10B981; color: #04261a; }
.order-badge.b-cancelled { background: #EF4444; color: #fff; }

/* Toasts + confirm */
.admin-toast { position: fixed; bottom: 20px; right: 20px; z-index: 4000; display: flex; flex-direction: column; gap: 10px; }
.toast-item { background: var(--bg-card); color: var(--text-main); border: 1px solid var(--bg-card-border); border-left: 4px solid var(--sky-blue); padding: 12px 18px; border-radius: 8px; box-shadow: 0 8px 24px rgba(0,0,0,0.4); font-size: 0.88rem; max-width: 340px; opacity: 0; transform: translateX(20px); transition: opacity 0.25s ease, transform 0.25s ease; }
.toast-item.show { opacity: 1; transform: translateX(0); }
.toast-item.success { border-left-color: #10B981; }
.toast-item.error { border-left-color: #EF4444; }
.admin-confirm-overlay { position: fixed; inset: 0; z-index: 4100; background: rgba(3,8,20,0.7); backdrop-filter: blur(4px); display: flex; align-items: center; justify-content: center; padding: 20px; }
.admin-confirm-box { background: var(--bg-card); border: 1px solid var(--bg-card-border); border-radius: 14px; padding: 1.6rem; max-width: 380px; width: 100%; box-shadow: 0 20px 50px rgba(0,0,0,0.5); }
.admin-confirm-box p { margin: 0 0 1.2rem; color: var(--text-main); }
.admin-confirm-actions { display: flex; justify-content: flex-end; gap: 10px; }
.admin-confirm-actions .btn-cancel { background: var(--input-bg); color: var(--text-main); border: 1px solid var(--bg-card-border); padding: 8px 16px; border-radius: 8px; cursor: pointer; }
.admin-confirm-actions .btn-danger { background: #EF4444; color: #fff; border: none; padding: 8px 16px; border-radius: 8px; cursor: pointer; font-weight: bold; }

/* Admin homepage image pickers */
.home-img-picker { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; }
.home-img-preview { width: 160px; height: 90px; object-fit: cover; border-radius: 8px; border: 1px solid var(--bg-card-border); background: #141414; }
.home-img-actions { display: flex; gap: 8px; flex-wrap: wrap; }

/* Admin homepage parallel multi-language editor */
.hp-field { margin-bottom: 1.3rem; }
.hp-field-label { display: flex; align-items: center; gap: 10px; font-size: 0.9rem; font-weight: 700; color: var(--text-main); margin-bottom: 8px; }
.hp-copy-btn { background: var(--input-bg); color: var(--sky-blue); border: 1px solid var(--bg-card-border); border-radius: 6px; padding: 2px 8px; font-size: 0.72rem; font-weight: 600; cursor: pointer; }
.hp-copy-btn:hover { border-color: var(--sky-blue); }
.hp-lang-row { display: flex; align-items: flex-start; gap: 8px; margin-bottom: 6px; }
.hp-lang-chip { flex: 0 0 auto; width: 56px; text-align: center; font-size: 0.72rem; font-weight: 700; color: var(--text-muted); background: var(--bg-body); border: 1px solid var(--bg-card-border); border-radius: 6px; padding: 8px 4px; }
.hp-input { flex: 1; min-width: 0; padding: 0.6rem 0.7rem; border-radius: 7px; border: 1px solid var(--input-border); background: var(--input-bg); color: var(--text-main); font-family: inherit; }
.hp-input:focus { border-color: var(--orange); outline: none; }
textarea.hp-input { resize: vertical; line-height: 1.5; }

/* ===== Homepage: promo bar ===== */
.promo-bar { position: relative; background: linear-gradient(90deg, var(--orange) 0%, #ff8c3a 100%); color: #fff; text-align: center; padding: 9px 40px; font-size: 0.88rem; font-weight: 600; }
.promo-bar-close { position: absolute; top: 50%; right: 12px; transform: translateY(-50%); background: transparent; border: none; color: #fff; font-size: 1.3rem; line-height: 1; cursor: pointer; opacity: 0.85; }
.promo-bar-close:hover { opacity: 1; }

/* ===== Homepage: hero with background image ===== */
.home-hero {
    position: relative;
    min-height: 460px;
    display: flex;
    align-items: center;
    padding: 3rem 8%;
    background: radial-gradient(circle at top, rgba(251, 199, 1,0.15) 0%, transparent 70%);
    background-size: cover;
    background-position: center;
    overflow: hidden;
}
.home-hero-overlay { position: absolute; inset: 0; background: transparent; pointer-events: none; }
.home-hero.has-image { min-height: 560px; }
.home-hero.has-image .home-hero-overlay { background: linear-gradient(90deg, rgba(13,13,13,0.78) 0%, rgba(13,13,13,0.45) 55%, rgba(13,13,13,0.15) 100%); }
.home-hero-content { position: relative; z-index: 2; max-width: 560px; }
.home-hero-eyebrow { color: var(--orange); font-weight: bold; letter-spacing: 1px; font-size: 0.9rem; }
.home-hero.has-image .home-hero-eyebrow { color: #ffd7b0; }
.home-hero-title { font-size: 3rem; margin: 1rem 0; line-height: 1.1; color: var(--text-main); }
.home-hero.has-image .home-hero-title { color: #fff; text-shadow: 0 2px 12px rgba(0,0,0,0.35); }
.home-hero-sub { color: var(--text-muted); max-width: 520px; margin: 0 0 2rem; line-height: 1.6; }
.home-hero.has-image .home-hero-sub { color: #e7edf6; }

/* ===== Homepage: story band ===== */
.home-story { display: grid; grid-template-columns: 1fr 1fr; gap: 0; align-items: stretch; max-width: 1200px; margin: 1rem auto 3rem; border: 1px solid var(--bg-card-border); border-radius: 18px; overflow: hidden; background: var(--bg-card); }
.home-story-media { min-height: 340px; position: relative; background: #141414; }
.home-story-img { width: 100%; height: 100%; object-fit: cover; display: block; }
.home-story-fallback { position: absolute; inset: 0; background: linear-gradient(135deg, rgba(251, 199, 1,0.25), rgba(234, 237, 239,0.25), rgba(251, 199, 1,0.25)); }
.home-story-text { padding: 2.6rem; display: flex; flex-direction: column; justify-content: center; }
.home-story-eyebrow { color: var(--sky-blue); font-weight: bold; letter-spacing: 1.5px; font-size: 0.78rem; text-transform: uppercase; }
.home-story-title { font-size: 2rem; margin: 0.6rem 0 1rem; color: var(--text-main); }
.home-story-body { color: var(--text-muted); line-height: 1.75; margin: 0 0 1.8rem; white-space: pre-line; }

/* ===== Homepage: newsletter ===== */
.home-newsletter { background: #141414; border-top: 1px solid var(--bg-card-border); padding: 3rem 5%; text-align: center; }
.home-newsletter-inner { max-width: 560px; margin: 0 auto; }
.home-newsletter-title { color: var(--text-main); margin: 0 0 0.5rem; }
.home-newsletter-sub { color: var(--text-muted); margin: 0 0 1.5rem; }
.home-newsletter-form { display: flex; gap: 10px; justify-content: center; flex-wrap: wrap; }
.home-newsletter-form input { flex: 1; min-width: 220px; max-width: 340px; padding: 0.8rem 1rem; border-radius: 8px; border: 1px solid var(--input-border); background: var(--input-bg); color: var(--text-main); }

@media (max-width: 780px) {
    .home-hero { padding: 2.5rem 6%; min-height: 380px; }
    .home-hero.has-image { min-height: 440px; }
    .home-hero-title { font-size: 2.1rem; }
    .home-story { grid-template-columns: 1fr; margin: 1rem 4% 2.5rem; }
    .home-story-media { min-height: 220px; }
    .home-story-text { padding: 1.8rem; }
    .home-story-title { font-size: 1.5rem; }
}

/* Drag and Drop Visual Feedback */
.gallery-product-card-admin {
    transition: transform 0.15s ease, opacity 0.15s ease;
}
.gallery-product-card-admin.dragging {
    opacity: 0.4;
    transform: scale(0.98);
}

/* Expandable Input & Textarea fields on click / focus */
.expandable-field {
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}
.expandable-field:focus-within {
    grid-column: 1 / -1 !important;
}
.expandable-field input[type="text"]:focus,
.expandable-field input[type="number"]:focus {
    min-height: 48px;
    font-size: 0.98rem;
    border-color: var(--orange) !important;
    box-shadow: 0 0 12px rgba(251, 199, 1, 0.35);
    background-color: var(--bg-card) !important;
}
.expandable-field textarea:focus {
    min-height: 150px;
    font-size: 0.95rem;
    line-height: 1.6;
    border-color: var(--orange) !important;
    box-shadow: 0 0 12px rgba(251, 199, 1, 0.35);
    background-color: var(--bg-card) !important;
}

/* ===== Product editor: sticky bars ===== */
.gallery-editor-topbar, .gallery-editor-actionbar {
    position: sticky;
    z-index: 30;
    background: var(--bg-card);
    border: 1px solid var(--bg-card-border);
    padding: 12px 16px;
    display: flex;
    gap: 10px;
    align-items: center;
    flex-wrap: wrap;
}
.gallery-editor-topbar { top: 0; border-radius: 12px 12px 0 0; justify-content: space-between; margin-bottom: 1rem; }
.gallery-editor-actionbar { bottom: 0; border-radius: 0 0 12px 12px; justify-content: flex-end; box-shadow: 0 -6px 18px rgba(0,0,0,0.35); margin-top: 1rem; }
.gallery-editor-actionbar .btn-draft { background: var(--input-bg); color: var(--text-main); border: 1px solid var(--bg-card-border); padding: 10px 18px; border-radius: 8px; font-weight: bold; cursor: pointer; }
.gallery-editor-actionbar .btn-publish { background: var(--orange); color: var(--on-accent); border: none; padding: 10px 22px; border-radius: 8px; font-weight: bold; cursor: pointer; }

/* ===== Collapsible sections ===== */
.gp-section { border: 1px solid var(--bg-card-border); border-radius: 10px; margin-bottom: 12px; background: rgba(255,255,255,0.02); }
.gp-section > summary { cursor: pointer; padding: 10px 14px; font-weight: bold; color: var(--sky-blue); list-style: none; }
.gp-section > summary::-webkit-details-marker { display: none; }
.gp-section > summary::before { content: "▸ "; color: var(--orange); }
.gp-section[open] > summary::before { content: "▾ "; }
.gp-section[open] > summary { border-bottom: 1px solid var(--bg-card-border); }
.gp-section-body { padding: 14px; }
.gp-two-col { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 14px; }

/* ===== Media zone ===== */
.gp-media-row { display: flex; gap: 12px; flex-wrap: wrap; }
.gp-media-item { width: 128px; border: 1px solid var(--bg-card-border); border-radius: 8px; padding: 6px; background: #141414; position: relative; }
.gp-media-item img { width: 100%; height: 92px; object-fit: contain; border-radius: 4px; }
.gp-media-item input { width: 100%; font-size: 0.72rem; margin-top: 4px; }
.gp-media-primary-badge { position: absolute; top: 4px; left: 4px; background: var(--orange); color: var(--on-accent); font-size: 0.6rem; padding: 1px 6px; border-radius: 4px; font-weight: bold; }
.gp-media-btns { display: flex; gap: 4px; margin-top: 4px; }
.gp-media-btns button { flex: 1; font-size: 0.7rem; padding: 2px 0; border-radius: 4px; border: 1px solid var(--bg-card-border); background: var(--input-bg); color: var(--text-main); cursor: pointer; }

/* ===== Variant matrix ===== */
.gp-chip { display: inline-flex; align-items: center; gap: 5px; background: var(--input-bg); border: 1px solid var(--bg-card-border); border-radius: 14px; padding: 2px 10px; font-size: 0.8rem; margin: 3px; }
.gp-chip button { background: none; border: none; color: #EF4444; cursor: pointer; font-weight: bold; }
.gp-variant-table { width: 100%; border-collapse: collapse; font-size: 0.85rem; }
.gp-variant-table th, .gp-variant-table td { border-bottom: 1px solid var(--bg-card-border); padding: 6px; text-align: left; }
.gp-variant-table input { width: 100%; box-sizing: border-box; }

/* ===== Crop modal ===== */
.crop-overlay { position: fixed; inset: 0; background: rgba(3,8,20,0.88); z-index: 2100; display: flex; align-items: center; justify-content: center; padding: 20px; }
.crop-box { background: var(--bg-card); border: 1px solid var(--bg-card-border); border-radius: 14px; padding: 18px; max-width: 460px; width: 100%; }
#crop-canvas { background: #000; border-radius: 8px; touch-action: none; cursor: grab; width: 100%; max-width: 400px; height: 400px; display: block; margin: 0 auto; }

/* ===== Storefront out-of-stock ===== */
.btn-basket-disabled { opacity: 0.5; cursor: not-allowed; pointer-events: none; }
.oos-badge { display: inline-block; background: #EF4444; color: #fff; font-size: 0.7rem; padding: 2px 8px; border-radius: 6px; }
.stock-note { font-size: 0.78rem; color: var(--text-muted); margin: 4px 0 10px; min-height: 1em; }
.stock-note.in { color: #10B981; }
.stock-note.low { color: #F59E0B; }
.stock-note.out { color: #EF4444; }

/* ===== Storefront: image thumbnails ===== */
.product-thumbs { display: flex; gap: 8px; padding: 10px 1.25rem 0; flex-wrap: wrap; }
.product-thumb { width: 46px; height: 46px; border-radius: 8px; object-fit: cover; background: #141414; border: 2px solid var(--bg-card-border); cursor: pointer; transition: border-color 0.15s; }
.product-thumb:hover, .product-thumb.active { border-color: var(--orange); }

/* ===== Storefront: variant selectors ===== */
.variant-row { display: flex; gap: 10px; flex-wrap: wrap; margin: 4px 0 6px; }
.variant-row label { flex: 1; min-width: 120px; display: flex; flex-direction: column; gap: 3px; }
.variant-label { font-size: 0.72rem; color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.4px; }
.variant-select { padding: 8px 10px; border-radius: 8px; border: 1px solid var(--input-border); background: var(--input-bg); color: var(--text-main); font-weight: 600; }

/* ===== Product detail modal (quick-view / PDP) ===== */
body.pdp-open { overflow: hidden; }
.product-img-wrapper { cursor: zoom-in; }
.product-title { cursor: pointer; transition: color 0.15s ease; }
.product-title:hover { color: var(--orange); }
.pdp-zoom-hint {
    position: absolute; top: 10px; left: 10px;
    width: 30px; height: 30px; border-radius: 50%;
    background: rgba(13,13,13,0.72); color: #fff; font-size: 0.85rem;
    display: flex; align-items: center; justify-content: center;
    opacity: 0; transition: opacity 0.2s ease; pointer-events: none;
}
.product-img-wrapper:hover .pdp-zoom-hint { opacity: 1; }

.pdp-overlay {
    position: fixed; inset: 0; z-index: 3000;
    background: rgba(3,8,20,0.82); backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px);
    display: none; align-items: center; justify-content: center;
    padding: 24px; animation: pdpFade 0.18s ease;
}
@keyframes pdpFade { from { opacity: 0; } to { opacity: 1; } }
.pdp-modal {
    background: var(--bg-card); border: 1px solid var(--bg-card-border);
    border-radius: 18px; width: 100%; max-width: 1120px; max-height: 92vh;
    overflow: auto; position: relative;
    display: grid; grid-template-columns: 1.15fr 1fr;
    box-shadow: 0 30px 80px rgba(0,0,0,0.6);
    animation: pdpRise 0.2s cubic-bezier(0.4,0,0.2,1);
}
@keyframes pdpRise { from { transform: translateY(14px); opacity: 0; } to { transform: translateY(0); opacity: 1; } }
.pdp-close {
    position: absolute; top: 12px; right: 12px; z-index: 5;
    width: 38px; height: 38px; border-radius: 50%;
    background: rgba(13,13,13,0.6); color: #fff; border: 1px solid var(--bg-card-border);
    font-size: 1.5rem; line-height: 1; cursor: pointer; transition: background 0.15s ease;
}
.pdp-close:hover { background: var(--orange); border-color: var(--orange); }
.pdp-gallery { padding: 26px; border-right: 1px solid var(--bg-card-border); background: #141414; }
.pdp-main-img-wrap {
    width: 100%; height: 460px; border-radius: 12px; overflow: hidden;
    background: #0D0D0D; display: flex; align-items: center; justify-content: center;
    cursor: zoom-in; border: 1px solid var(--bg-card-border);
    transition: height 0.3s ease;
}
.pdp-main-img { width: 100%; height: 100%; object-fit: contain; padding: 14px; box-sizing: border-box; }
/* Zoom = show the whole image larger (never crop): grow the box, keep object-fit contain. */
.pdp-main-img-wrap.zoomed { cursor: zoom-out; height: 78vh; }
.pdp-thumbs { display: flex; gap: 8px; margin-top: 12px; flex-wrap: wrap; }
.pdp-thumb { width: 56px; height: 56px; border-radius: 8px; object-fit: cover; background: #0D0D0D; border: 2px solid var(--bg-card-border); cursor: pointer; transition: border-color 0.15s ease; }
.pdp-thumb:hover, .pdp-thumb.active { border-color: var(--orange); }
.pdp-details { padding: 30px 28px; display: flex; flex-direction: column; }
.pdp-title { font-size: 1.6rem; font-weight: 800; margin: 0 0 10px; color: var(--text-main); line-height: 1.25; }
.pdp-price { font-size: 1.6rem; font-weight: 800; color: var(--sky-blue); margin-bottom: 8px; }
.pdp-stock { margin-bottom: 14px; min-height: 1em; }
.pdp-variant-row { display: flex; gap: 12px; flex-wrap: wrap; margin-bottom: 16px; }
.pdp-variant-row label { flex: 1; min-width: 130px; display: flex; flex-direction: column; gap: 4px; }
.pdp-desc { color: var(--text-muted); font-size: 0.96rem; line-height: 1.7; margin-bottom: 22px; flex: 1; white-space: pre-line; }
.pdp-actions { display: flex; gap: 12px; align-items: center; margin-top: auto; flex-wrap: wrap; }
.pdp-actions .btn-basket { padding: 12px 26px; font-size: 0.95rem; }
.pdp-actions .btn-amazon { padding: 12px 20px; font-size: 0.9rem; }
@media (max-width: 720px) {
    .pdp-modal { grid-template-columns: 1fr; max-height: 92vh; }
    .pdp-gallery { border-right: none; border-bottom: 1px solid var(--bg-card-border); padding: 18px; }
    .pdp-main-img-wrap { height: 260px; }
    .pdp-details { padding: 22px 20px; }
    .pdp-title { font-size: 1.3rem; }
    .pdp-price { font-size: 1.4rem; }
}

/* ===== Content protection (casual deterrent — applied to storefront via .no-select) ===== */
.no-select {
    -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none;
    -webkit-touch-callout: none;
}
.no-select input, .no-select textarea, .no-select select, .no-select [contenteditable="true"] {
    -webkit-user-select: text; -moz-user-select: text; -ms-user-select: text; user-select: text;
}
.no-select img {
    -webkit-user-drag: none; -khtml-user-drag: none; -moz-user-drag: none; -o-user-drag: none; user-drag: none;
}

/* ===== Wishlist heart (on product cards + PDP) ===== */
.dropdown-item {
    display: block; text-decoration: none; color: var(--text-main);
    background: var(--bg-body); border: 1px solid var(--bg-card-border);
    padding: 7px 10px; border-radius: 6px; font-size: 0.82rem; margin-bottom: 6px;
    transition: border-color 0.15s ease, color 0.15s ease;
}
.dropdown-item:hover { border-color: var(--orange); color: var(--orange); }
.wish-btn {
    position: absolute; top: 10px; right: 10px; z-index: 4;
    width: 36px; height: 36px; border-radius: 50%;
    background: rgba(13,13,13,0.62); border: 1px solid var(--bg-card-border);
    color: #fff; font-size: 1.15rem; line-height: 1; cursor: pointer;
    display: flex; align-items: center; justify-content: center;
    transition: transform 0.12s ease, background 0.15s ease, color 0.15s ease;
}
.wish-btn:hover { transform: scale(1.12); background: rgba(13,13,13,0.85); }
.wish-btn.active { color: #FF4D6D; border-color: #FF4D6D; }
.pdp-wish .wish-btn { position: static; width: 42px; height: 42px; font-size: 1.3rem; }

/* ===== My Account page ===== */
.account-guard { text-align: center; padding: 3rem 1rem; background: var(--bg-card); border: 1px solid var(--bg-card-border); border-radius: 14px; }
.account-shell { display: grid; grid-template-columns: 230px 1fr; gap: 1.5rem; align-items: start; }
.account-nav { display: flex; flex-direction: column; gap: 6px; background: var(--bg-card); border: 1px solid var(--bg-card-border); border-radius: 14px; padding: 1rem; position: sticky; top: 90px; }
.account-hi { font-weight: 800; color: var(--text-main); margin-bottom: 10px; line-height: 1.3; }
.account-hi span { display: block; font-weight: 400; font-size: 0.75rem; color: var(--text-muted); word-break: break-all; margin-top: 2px; }
.account-tab-btn { background: transparent; border: 1px solid transparent; color: var(--text-main); text-align: left; padding: 10px 12px; border-radius: 8px; cursor: pointer; font-weight: 600; font-size: 0.9rem; }
.account-tab-btn:hover { background: var(--input-bg); }
.account-tab-btn.active { background: var(--orange); color: var(--on-accent); }
.account-logout { margin-top: 8px; color: #EF4444; border-top: 1px solid var(--bg-card-border); border-radius: 0; }
.account-logout:hover { background: rgba(239,68,68,0.1); }
.account-body { min-width: 0; }
.account-section { display: none; }
.account-h { color: var(--sky-blue); margin: 0 0 1.2rem 0; }
.account-card { background: var(--bg-card); border: 1px solid var(--bg-card-border); border-radius: 14px; padding: 1.5rem; margin-bottom: 1.5rem; }

/* Address cards */
.address-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 14px; }
.address-card { position: relative; background: var(--bg-card); border: 1px solid var(--bg-card-border); border-radius: 12px; padding: 1.1rem; }
.address-card.is-default { border-color: var(--orange); box-shadow: 0 0 0 1px var(--orange) inset; }
.addr-default-badge { position: absolute; top: 10px; right: 10px; background: var(--orange); color: var(--on-accent); font-size: 0.62rem; font-weight: bold; padding: 2px 8px; border-radius: 6px; text-transform: uppercase; letter-spacing: 0.4px; }
.addr-label { font-weight: 800; color: var(--text-main); margin-bottom: 6px; }
.addr-lines { color: var(--text-muted); font-size: 0.88rem; line-height: 1.6; }
.addr-actions { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 12px; }
.addr-actions button { background: var(--input-bg); color: var(--text-main); border: 1px solid var(--bg-card-border); padding: 5px 12px; border-radius: 6px; cursor: pointer; font-size: 0.8rem; font-weight: 600; }
.addr-actions button:hover { border-color: var(--orange); }
.addr-actions .addr-del { color: #EF4444; }

/* Order cards */
.order-list { display: flex; flex-direction: column; gap: 14px; }
.order-card { background: var(--bg-card); border: 1px solid var(--bg-card-border); border-radius: 14px; padding: 1.2rem 1.3rem; }
.order-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; margin-bottom: 10px; }
.order-id { font-weight: 800; color: var(--text-main); }
.order-date { font-size: 0.78rem; color: var(--text-muted); margin-top: 2px; }
.order-items { border-top: 1px solid var(--bg-card-border); padding-top: 10px; }
.order-line { display: flex; justify-content: space-between; gap: 10px; font-size: 0.88rem; color: var(--text-muted); padding: 3px 0; }
.order-track { font-size: 0.82rem; color: var(--text-muted); margin-top: 8px; }
.order-foot { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-top: 12px; border-top: 1px solid var(--bg-card-border); padding-top: 12px; flex-wrap: wrap; }
.order-total { font-weight: 800; color: var(--text-main); }

@media (max-width: 760px) {
    .account-shell { grid-template-columns: 1fr; }
    .account-nav { position: static; flex-direction: row; flex-wrap: wrap; }
    .account-tab-btn { flex: 1 1 auto; text-align: center; }
    .account-logout { border-top: none; border-radius: 8px; }
}