/*
 * HZ VENDAS — Design System v4
 * Filosofia: loja pessoal premium, não marketplace genérico
 * Composição via tipografia + espaçamento + divisores — não via cards
 */

@import url('https://fonts.googleapis.com/css2?family=Inter:ital,opsz,wght@0,14..32,300..900;1,14..32,300..900&display=swap');

/* ============================================================
   TOKENS — DARK (padrão)
   ============================================================ */
:root,
[data-theme="dark"] {
    --bg-base:      #0c0c0e;
    --bg-surface:   #131315;
    --bg-card:      #19191d;
    --bg-input:     #0f0f12;
    --bg-raised:    #222227;
    --bg-overlay:   rgba(12, 12, 14, 0.9);

    --border-dim:    rgba(255, 255, 255, 0.05);
    --border:        rgba(255, 255, 255, 0.09);
    --border-strong: rgba(255, 255, 255, 0.17);

    --brand:        #e11d48;
    --brand-hover:  #c31940;
    --brand-soft:   rgba(225, 29, 72, 0.08);
    --brand-glow:   rgba(225, 29, 72, 0.18);

    --green:        #16a34a;
    --green-soft:   rgba(22, 163, 74, 0.1);

    --text-primary:   #eeeef1;
    --text-secondary: #888891;
    --text-muted:     #4e4e57;
    --text-inverse:   #0c0c0e;

    --font:      'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    --font-mono: ui-monospace, 'SF Mono', 'Fira Code', monospace;

    --radius-xs: 4px;
    --radius-sm: 7px;
    --radius-md: 11px;
    --radius-lg: 16px;

    --shadow-xs: 0 1px 2px rgba(0,0,0,0.3);
    --shadow-sm: 0 2px 8px rgba(0,0,0,0.45);
    --shadow-md: 0 8px 28px rgba(0,0,0,0.55), 0 2px 8px rgba(0,0,0,0.3);
    --shadow-lg: 0 24px 56px rgba(0,0,0,0.65), 0 6px 16px rgba(0,0,0,0.4);

    --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
    --ease:     cubic-bezier(0.4, 0, 0.2, 1);
    --t-fast:   110ms;
    --t-base:   180ms;
    --t-slow:   300ms;
}

/* ============================================================
   TOKENS — LIGHT
   ============================================================ */
[data-theme="light"] {
    --bg-base:      #f3f3f6;
    --bg-surface:   #ffffff;
    --bg-card:      #ffffff;
    --bg-input:     #ededf0;
    --bg-raised:    #e6e6ea;
    --bg-overlay:   rgba(243, 243, 246, 0.92);

    --border-dim:    rgba(0, 0, 0, 0.06);
    --border:        rgba(0, 0, 0, 0.09);
    --border-strong: rgba(0, 0, 0, 0.18);

    --brand:        #d11a42;
    --brand-hover:  #b31538;
    --brand-soft:   rgba(209, 26, 66, 0.07);
    --brand-glow:   rgba(209, 26, 66, 0.15);

    --green:        #15803d;
    --green-soft:   rgba(21, 128, 61, 0.08);

    --text-primary:   #0f0f12;
    --text-secondary: #55555e;
    --text-muted:     #98989f;

    --shadow-xs: 0 1px 2px rgba(0,0,0,0.05);
    --shadow-sm: 0 2px 8px rgba(0,0,0,0.07);
    --shadow-md: 0 8px 28px rgba(0,0,0,0.09);
    --shadow-lg: 0 24px 56px rgba(0,0,0,0.11);
}

/* ============================================================
   RESET & BASE
   ============================================================ */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html { font-size: 16px; scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }

body {
    font-family: var(--font);
    font-size: 0.9375rem;
    font-weight: 400;
    line-height: 1.6;
    color: var(--text-primary);
    background: var(--bg-base);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    overflow-x: hidden;
    transition: background-color var(--t-slow) var(--ease), color var(--t-slow) var(--ease);
}

/* Profundidade sutil — radial brand muito baixo, apenas no dark */
[data-theme="dark"] body::before {
    content: '';
    position: fixed;
    top: 0; left: 0; right: 0;
    height: 500px;
    background: radial-gradient(ellipse 70% 35% at 50% -5%, rgba(225,29,72,0.045) 0%, transparent 70%);
    pointer-events: none;
    z-index: 0;
}

a { color: inherit; text-decoration: none; }
img { display: block; max-width: 100%; }
ul, ol { list-style: none; }
button { font-family: inherit; cursor: pointer; }
input, select, textarea { font-family: inherit; }

.container {
    width: 100%;
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 1.5rem;
    position: relative;
    z-index: 1;
}

main { flex: 1; }

/* ============================================================
   HEADER — Frosted glass, identidade real
   ============================================================ */
.site-header {
    position: sticky;
    top: 0;
    z-index: 300;
    background: color-mix(in srgb, var(--bg-surface) 85%, transparent);
    backdrop-filter: blur(20px) saturate(180%);
    -webkit-backdrop-filter: blur(20px) saturate(180%);
    border-bottom: 1px solid var(--border-dim);
    height: 60px;
    display: flex;
    align-items: center;
}

.header-inner {
    display: flex;
    align-items: center;
    gap: 1rem;
    height: 100%;
    width: 100%;
}

.brand-logo {
    display: flex;
    align-items: center;
    flex-shrink: 0;
    transition: opacity var(--t-fast);
}
.brand-logo:hover { opacity: 0.75; }
.brand-logo img { height: 36px; object-fit: contain; }

/* Search */
.header-search {
    flex: 1;
    max-width: 420px;
}

.search-wrap {
    display: flex;
    align-items: center;
    background: var(--bg-input);
    border: 1px solid var(--border-dim);
    border-radius: var(--radius-md);
    transition: border-color var(--t-base), box-shadow var(--t-base);
    overflow: hidden;
}

.search-wrap:focus-within {
    border-color: var(--border);
    box-shadow: 0 0 0 3px var(--brand-glow);
}

.search-icon {
    padding: 0 0.75rem;
    color: var(--text-muted);
    font-size: 0.78rem;
    flex-shrink: 0;
}

#searchQuery {
    flex: 1;
    border: none;
    background: transparent;
    padding: 0.575rem 0.5rem 0.575rem 0;
    font-size: 0.875rem;
    color: var(--text-primary);
    outline: none;
    min-width: 0;
}
#searchQuery::placeholder { color: var(--text-muted); }

.header-actions {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-left: auto;
    flex-shrink: 0;
}

/* ============================================================
   BOTÕES
   ============================================================ */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.4rem;
    padding: 0.55rem 1rem;
    font-size: 0.875rem;
    font-weight: 500;
    font-family: inherit;
    border-radius: var(--radius-sm);
    border: 1px solid transparent;
    line-height: 1;
    white-space: nowrap;
    cursor: pointer;
    transition:
        background var(--t-fast) var(--ease),
        border-color var(--t-fast) var(--ease),
        color var(--t-fast) var(--ease),
        box-shadow var(--t-fast) var(--ease),
        transform var(--t-fast) var(--ease);
    user-select: none;
}

.btn:active { transform: scale(0.97) !important; }
.btn:focus-visible { outline: 2px solid var(--brand); outline-offset: 2px; }

.btn-primary {
    background: var(--brand);
    color: #fff;
    border-color: var(--brand);
    box-shadow: 0 1px 2px rgba(0,0,0,0.2), inset 0 1px 0 rgba(255,255,255,0.08);
}
.btn-primary:hover {
    background: var(--brand-hover);
    border-color: var(--brand-hover);
    color: #fff;
    box-shadow: 0 2px 12px var(--brand-glow);
    transform: translateY(-1px);
}

.btn-wpp {
    background: var(--green);
    color: #fff;
    border-color: var(--green);
}
.btn-wpp:hover {
    filter: brightness(1.1);
    color: #fff;
    box-shadow: 0 2px 10px rgba(22,163,74,0.3);
    transform: translateY(-1px);
}

.btn-ghost {
    background: transparent;
    color: var(--text-secondary);
    border-color: var(--border-dim);
}
.btn-ghost:hover {
    background: var(--bg-raised);
    border-color: var(--border);
    color: var(--text-primary);
}

.btn-icon {
    width: 36px;
    height: 36px;
    padding: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1px solid var(--border-dim);
    background: transparent;
    border-radius: var(--radius-sm);
    color: var(--text-muted);
    font-size: 0.85rem;
    transition: color var(--t-fast), border-color var(--t-fast), background var(--t-fast);
}
.btn-icon:hover {
    color: var(--text-secondary);
    border-color: var(--border);
    background: var(--bg-raised);
}

.btn-sm  { padding: 0.42rem 0.75rem; font-size: 0.8125rem; }
.btn-lg  { padding: 0.75rem 1.4rem; font-size: 0.9375rem; font-weight: 600; }
.btn-block { width: 100%; }
.btn:disabled { opacity: 0.35; cursor: not-allowed; pointer-events: none; }

/* ============================================================
   STORE STRIP — Identidade da loja (dados reais de settings)
   ============================================================ */
.store-strip {
    padding: 2.5rem 0 2rem;
    border-bottom: 1px solid var(--border-dim);
}

.store-strip-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 2rem;
    flex-wrap: wrap;
}

.store-identity { display: flex; flex-direction: column; gap: 0.375rem; }

.store-name {
    font-size: 2rem;
    font-weight: 800;
    letter-spacing: -0.04em;
    color: var(--text-primary);
    line-height: 1;
}

.store-tagline {
    font-size: 0.9375rem;
    color: var(--text-secondary);
    font-weight: 400;
    max-width: 520px;
    line-height: 1.45;
}

.store-actions {
    display: flex;
    align-items: center;
    gap: 0.625rem;
    flex-shrink: 0;
}

/* ============================================================
   CATALOG — Layout full-width (sem sidebar)
   ============================================================ */
.catalog-section { padding-bottom: 5rem; }

/* Barra de filtros horizontal */
.filter-bar {
    padding: 1.25rem 0 0;
    margin-bottom: 1.25rem;
}

.filter-bar-row {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    flex-wrap: wrap;
}

/* Linha de resultados + sort */
.catalog-meta {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    margin-bottom: 0.875rem;
    flex-wrap: wrap;
}

.results-count {
    font-size: 0.8125rem;
    color: var(--text-muted);
}
.results-count strong {
    color: var(--text-secondary);
    font-weight: 600;
    font-variant-numeric: tabular-nums;
}

.sort-row { display: flex; align-items: center; gap: 0.5rem; }
.sort-label { font-size: 0.8rem; color: var(--text-muted); }
.sort-select {
    padding: 0.42rem 1.75rem 0.42rem 0.625rem;
    background: var(--bg-card);
    border: 1px solid var(--border-dim);
    border-radius: var(--radius-sm);
    color: var(--text-primary);
    font-size: 0.8rem;
    cursor: pointer;
    outline: none;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6'%3E%3Cpath d='M0 0l5 6 5-6z' fill='%234e4e57'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 0.55rem center;
    transition: border-color var(--t-fast);
}
.sort-select:focus { border-color: var(--border-strong); }

/* Chips de filtros ativos */
.active-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 0.3rem;
    margin-bottom: 0.875rem;
}

.chip {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    padding: 0.22rem 0.6rem;
    border: 1px solid var(--border-dim);
    border-radius: 99px;
    font-size: 0.75rem;
    color: var(--text-secondary);
    background: var(--bg-card);
}
.chip-remove {
    color: var(--text-muted);
    cursor: pointer;
    font-size: 0.65rem;
    display: flex;
    align-items: center;
    transition: color var(--t-fast);
}
.chip-remove:hover { color: var(--brand); }

/* Componentes da filter bar */
.filter-pill {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    padding: 0.38rem 0.75rem;
    border: 1px solid var(--border-dim);
    border-radius: 99px;
    font-size: 0.8125rem;
    font-weight: 500;
    color: var(--text-secondary);
    background: var(--bg-card);
    cursor: pointer;
    white-space: nowrap;
    transition:
        border-color var(--t-fast),
        color var(--t-fast),
        background var(--t-fast);
}
.filter-pill:hover { border-color: var(--border); color: var(--text-primary); }
.filter-pill.active {
    border-color: var(--brand);
    color: var(--brand);
    background: var(--brand-soft);
}

/* Dropdown de grupo de filtros */
.filter-dropdown-wrap {
    position: relative;
}

.filter-dropdown-panel {
    position: absolute;
    top: calc(100% + 0.5rem);
    left: 0;
    z-index: 200;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-md);
    padding: 0.75rem;
    min-width: 200px;
    max-width: 280px;
    display: none;
    flex-direction: column;
    gap: 0.15rem;
}

.filter-dropdown-panel.open { display: flex; }

.filter-dropdown-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.35rem 0.5rem;
    border-radius: var(--radius-sm);
    cursor: pointer;
    transition: background var(--t-fast);
}
.filter-dropdown-item:hover { background: var(--bg-raised); }

.filter-dropdown-item-left {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.8125rem;
    color: var(--text-secondary);
}

.filter-dropdown-item-left input[type="checkbox"] {
    accent-color: var(--brand);
    cursor: pointer;
    width: 14px;
    height: 14px;
    flex-shrink: 0;
}

.filter-dropdown-count {
    font-size: 0.7rem;
    color: var(--text-muted);
    font-variant-numeric: tabular-nums;
}

/* Price range inline */
.filter-price-wrap {
    position: relative;
}

.filter-price-panel {
    position: absolute;
    top: calc(100% + 0.5rem);
    left: 0;
    z-index: 200;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-md);
    padding: 1rem;
    min-width: 240px;
    display: none;
    flex-direction: column;
    gap: 0.75rem;
}

.filter-price-panel.open { display: flex; }

.filter-price-label-sm {
    font-size: 0.7rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--text-muted);
}

.price-range-row {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.price-field-wrap {
    flex: 1;
    position: relative;
}
.price-field-prefix {
    position: absolute;
    left: 0.55rem;
    top: 50%;
    transform: translateY(-50%);
    font-size: 0.7rem;
    font-weight: 600;
    color: var(--text-muted);
    pointer-events: none;
}
.price-field-input {
    width: 100%;
    padding: 0.45rem 0.45rem 0.45rem 1.7rem;
    background: var(--bg-input);
    border: 1px solid var(--border-dim);
    border-radius: var(--radius-sm);
    color: var(--text-primary);
    font-size: 0.8125rem;
    outline: none;
    transition: border-color var(--t-fast);
}
.price-field-input:focus { border-color: var(--border-strong); }

.price-range-sep { color: var(--text-muted); font-size: 0.75rem; flex-shrink: 0; }

.price-apply-btn {
    width: 100%;
    padding: 0.5rem;
    background: var(--brand);
    border: none;
    border-radius: var(--radius-sm);
    color: #fff;
    font-size: 0.8125rem;
    font-weight: 600;
    cursor: pointer;
    transition: background var(--t-fast);
}
.price-apply-btn:hover { background: var(--brand-hover); }

.price-presets {
    display: flex;
    flex-wrap: wrap;
    gap: 0.3rem;
}
.price-preset {
    font-size: 0.7rem;
    font-weight: 500;
    padding: 0.22rem 0.5rem;
    border: 1px solid var(--border-dim);
    border-radius: 99px;
    background: transparent;
    color: var(--text-muted);
    cursor: pointer;
    transition: all var(--t-fast);
}
.price-preset:hover { border-color: var(--border); color: var(--text-secondary); }
.price-preset.active { border-color: var(--brand); color: var(--brand); background: var(--brand-soft); }

/* Divider na filter bar */
.filter-bar-sep {
    width: 1px;
    height: 20px;
    background: var(--border-dim);
    flex-shrink: 0;
}

/* Mobile filter btn */
.mobile-filter-btn {
    display: none;
    align-items: center;
    gap: 0.5rem;
    padding: 0.575rem 0.875rem;
    background: var(--bg-card);
    border: 1px solid var(--border-dim);
    border-radius: var(--radius-md);
    color: var(--text-secondary);
    font-size: 0.875rem;
    font-weight: 500;
    cursor: pointer;
    margin-bottom: 0.875rem;
    width: 100%;
    transition: border-color var(--t-fast), color var(--t-fast), background var(--t-fast);
}
.mobile-filter-btn:hover { border-color: var(--border); color: var(--text-primary); }

/* Mobile sidebar drawer (backup para mobile) */
.mobile-filter-drawer {
    position: fixed;
    inset: 0;
    top: 0; left: 0;
    width: min(88vw, 320px);
    height: 100dvh;
    background: var(--bg-card);
    border-right: 1px solid var(--border);
    z-index: 500;
    overflow-y: auto;
    transform: translateX(-110%);
    transition: transform var(--t-base) var(--ease-out), box-shadow var(--t-base);
    padding: 1.25rem;
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
}
.mobile-filter-drawer.open {
    transform: translateX(0);
    box-shadow: 8px 0 48px rgba(0,0,0,0.7);
}
.drawer-heading {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding-bottom: 0.875rem;
    border-bottom: 1px solid var(--border-dim);
}
.drawer-title {
    font-size: 0.9375rem;
    font-weight: 600;
    color: var(--text-primary);
}
.drawer-close {
    background: none;
    border: 1px solid var(--border-dim);
    border-radius: var(--radius-sm);
    color: var(--text-muted);
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.85rem;
    cursor: pointer;
    transition: border-color var(--t-fast), color var(--t-fast);
}
.drawer-close:hover { border-color: var(--border); color: var(--text-primary); }

.drawer-section { display: flex; flex-direction: column; gap: 0.625rem; }
.drawer-section-label {
    font-size: 0.7rem;
    font-weight: 600;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: var(--text-muted);
}
.drawer-check-list {
    display: flex;
    flex-direction: column;
    gap: 0.1rem;
}
.drawer-check-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.35rem 0.375rem;
    border-radius: var(--radius-sm);
    cursor: pointer;
    transition: background var(--t-fast);
}
.drawer-check-item:hover { background: var(--bg-raised); }
.drawer-check-left {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.8125rem;
    color: var(--text-secondary);
}
.drawer-check-left input[type="checkbox"] {
    accent-color: var(--brand);
    cursor: pointer;
    width: 14px;
    height: 14px;
    flex-shrink: 0;
}
.drawer-check-count {
    font-size: 0.7rem;
    color: var(--text-muted);
}
.btn-drawer-reset {
    background: none;
    border: 1px solid var(--border-dim);
    border-radius: var(--radius-sm);
    color: var(--text-muted);
    padding: 0.5rem 0.875rem;
    font-size: 0.8rem;
    cursor: pointer;
    transition: color var(--t-fast), border-color var(--t-fast);
    width: 100%;
}
.btn-drawer-reset:hover { color: var(--brand); border-color: var(--brand); }

/* ============================================================
   PRODUCT GRID — Full width, sem sidebar
   ============================================================ */
.product-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 1rem;
}

/* Produto em destaque ocupa 2 colunas */
.product-card.featured {
    grid-column: span 2;
}

.product-card {
    display: flex;
    flex-direction: column;
    background: var(--bg-card);
    border: 1px solid var(--border-dim);
    border-radius: var(--radius-lg);
    overflow: hidden;
    position: relative;
    transition:
        border-color var(--t-base) var(--ease),
        box-shadow var(--t-base) var(--ease),
        transform var(--t-base) var(--ease-out);
    will-change: transform;
}

.product-card:hover {
    border-color: var(--border);
    box-shadow: var(--shadow-md);
    transform: translateY(-2px);
}

/* Shimmer diagonal discreto no hover */
.product-card::after {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: inherit;
    background: linear-gradient(135deg, rgba(255,255,255,0.018) 0%, transparent 50%);
    opacity: 0;
    pointer-events: none;
    transition: opacity var(--t-base);
}
.product-card:hover::after { opacity: 1; }

/* Thumb */
.card-thumb {
    position: relative;
    aspect-ratio: 16 / 10;
    background: var(--bg-base);
    overflow: hidden;
    flex-shrink: 0;
}

/* Featured thumb: proporção um pouco maior */
.product-card.featured .card-thumb { aspect-ratio: 21 / 9; }

.card-thumb img {
    width: 100%; height: 100%;
    object-fit: cover;
    transition: transform var(--t-slow) var(--ease-out);
}
.product-card:hover .card-thumb img { transform: scale(1.035); }

/* Gradiente inferior para legibilidade do status badge */
.card-thumb::after {
    content: '';
    position: absolute;
    bottom: 0; left: 0; right: 0;
    height: 45%;
    background: linear-gradient(to top, rgba(0,0,0,0.52) 0%, transparent 100%);
    pointer-events: none;
}

.status-badge {
    position: absolute;
    top: 0.625rem;
    left: 0.625rem;
    padding: 0.22rem 0.55rem;
    border-radius: 99px;
    font-size: 0.6875rem;
    font-weight: 600;
    letter-spacing: 0.03em;
    z-index: 1;
}
.status-available { background: rgba(22,163,74,0.9);  color: #fff; }
.status-reserved  { background: rgba(202,138,4,0.9);  color: #fff; }
.status-sold      { background: rgba(75,75,85,0.82);  color: rgba(255,255,255,0.65); }

.photo-count {
    position: absolute;
    bottom: 0.625rem;
    right: 0.625rem;
    padding: 0.18rem 0.45rem;
    background: rgba(0,0,0,0.6);
    border-radius: 99px;
    font-size: 0.6875rem;
    color: rgba(255,255,255,0.75);
    display: flex;
    align-items: center;
    gap: 0.3rem;
    z-index: 1;
    backdrop-filter: blur(4px);
}

.card-body {
    padding: 1rem 1.125rem 1.125rem;
    display: flex;
    flex-direction: column;
    flex: 1;
}

.card-meta {
    font-size: 0.75rem;
    color: var(--text-muted);
    font-weight: 500;
    margin-bottom: 0.3rem;
}

.card-title {
    font-size: 0.9375rem;
    font-weight: 600;
    letter-spacing: -0.01em;
    color: var(--text-primary);
    line-height: 1.35;
    margin-bottom: 0.75rem;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    min-height: 2.55em;
}

.card-title a { color: inherit; }
.card-title a:hover { color: var(--text-primary); }

.card-attrs {
    display: flex;
    flex-wrap: wrap;
    gap: 0.3rem;
    margin-bottom: auto;
    padding-bottom: 0.875rem;
}

.attr-tag {
    font-size: 0.7rem;
    font-weight: 500;
    padding: 0.22rem 0.55rem;
    border: 1px solid var(--border-dim);
    border-radius: var(--radius-xs);
    color: var(--text-muted);
    background: var(--bg-input);
}

/* FC — único dado numérico com identidade diferenciada */
.attr-tag-fc {
    font-weight: 700;
    font-family: var(--font-mono);
    font-size: 0.6875rem;
    font-variant-numeric: tabular-nums;
    color: var(--text-primary);
    border-color: var(--border);
    background: var(--bg-raised);
    letter-spacing: 0.01em;
}

.card-price-row {
    padding-top: 0.875rem;
    border-top: 1px solid var(--border-dim);
}

.old-price {
    font-size: 0.75rem;
    color: var(--text-muted);
    text-decoration: line-through;
    display: block;
    margin-bottom: 0.1rem;
    font-variant-numeric: tabular-nums;
}

.price-main {
    font-size: 1.3125rem;
    font-weight: 700;
    letter-spacing: -0.03em;
    color: var(--text-primary);
    font-family: var(--font-mono);
    font-variant-numeric: tabular-nums;
    line-height: 1.1;
}

.price-note {
    font-size: 0.7rem;
    color: var(--text-muted);
    margin-top: 0.2rem;
}

.card-actions {
    display: flex;
    gap: 0.5rem;
    margin-top: 0.75rem;
}

/* ============================================================
   EMPTY STATE — Premium, sem conteúdo inventado
   ============================================================ */
.empty-state {
    grid-column: 1 / -1;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    padding: 5rem 2rem;
    gap: 1rem;
}

.empty-state-icon {
    width: 54px;
    height: 54px;
    border: 1px solid var(--border-dim);
    border-radius: var(--radius-lg);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.25rem;
    color: var(--text-muted);
    background: var(--bg-card);
    margin-bottom: 0.25rem;
}

.empty-state h3 {
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-secondary);
}

.empty-state p {
    font-size: 0.875rem;
    color: var(--text-muted);
    max-width: 300px;
    line-height: 1.5;
}

/* ============================================================
   PÁGINA DE PRODUTO — Composição aberta (não card)
   ============================================================ */
.product-page {
    padding: 1.5rem 0 5rem;
}

/* Breadcrumb */
.breadcrumb {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    font-size: 0.8rem;
    color: var(--text-muted);
    margin-bottom: 2rem;
    flex-wrap: wrap;
}
.breadcrumb a { color: var(--text-muted); transition: color var(--t-fast); }
.breadcrumb a:hover { color: var(--text-secondary); }
.breadcrumb-sep { color: var(--text-muted); opacity: 0.35; }
.breadcrumb-current {
    color: var(--text-secondary);
    font-weight: 500;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    max-width: min(360px, 50vw);
}

/* Layout 2 colunas — totalmente fluido, sem larguras fixas */
.product-layout {
    display: grid;
    grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr);
    gap: clamp(1.5rem, 3.5vw, 3.25rem);
    align-items: start;
    width: 100%;
    max-width: 100%;
    min-width: 0;
}

.product-media-col {
    min-width: 0;
    max-width: 100%;
    width: 100%;
}

/* ============================================================
   GALERIA — Acabamento premium
   ============================================================ */
.gallery-block {
    background: var(--bg-card);
    border: 1px solid var(--border-dim);
    border-radius: var(--radius-lg);
    overflow: hidden;
    width: 100%;
    max-width: 100%;
    min-width: 0;
}

.main-photo {
    width: 100%;
    aspect-ratio: 16 / 10;
    background: #050507;
    overflow: hidden;
    position: relative;
    cursor: zoom-in;
}

.main-photo img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    transition: transform var(--t-slow) var(--ease-out);
    display: block;
}
.main-photo:hover img { transform: scale(1.015); }

.gallery-zoom-hint {
    position: absolute;
    bottom: 0.875rem;
    right: 0.875rem;
    font-size: 0.6875rem;
    color: rgba(255,255,255,0.45);
    background: rgba(0,0,0,0.5);
    padding: 0.2rem 0.5rem;
    border-radius: 99px;
    backdrop-filter: blur(4px);
    pointer-events: none;
    letter-spacing: 0.01em;
}

/* Thumbnails */
.thumbs-row {
    display: flex;
    gap: 0.5rem;
    padding: 0.75rem;
    overflow-x: auto;
    scrollbar-width: thin;
    scrollbar-color: var(--border-dim) transparent;
}

.thumb {
    width: 76px;
    height: 54px;
    flex-shrink: 0;
    border-radius: var(--radius-sm);
    overflow: hidden;
    border: 2px solid transparent;
    cursor: pointer;
    opacity: 0.45;
    transition:
        opacity var(--t-fast) var(--ease),
        border-color var(--t-fast) var(--ease),
        transform var(--t-fast) var(--ease);
}
.thumb:hover { opacity: 0.75; transform: translateY(-1px); }
.thumb.active { opacity: 1; border-color: var(--brand); }
.thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }

/* ============================================================
   COLUNA DE INFORMAÇÕES — ABERTA, SEM CARD WRAPPER
   Tipografia + divisores constroem a hierarquia
   ============================================================ */
.product-info-col {
    display: flex;
    flex-direction: column;
    gap: 0;
    position: sticky;
    top: 76px;
    align-self: start;
    min-width: 0;
    max-width: 100%;
    width: 100%;
    box-sizing: border-box;
}

/* ID da conta + servidor */
.product-meta-line {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    flex-wrap: wrap;
    margin-bottom: 0.75rem;
    min-width: 0;
}

.product-id-chip {
    font-family: var(--font-mono);
    font-size: 0.6875rem;
    font-weight: 600;
    color: var(--text-muted);
    background: var(--bg-card);
    border: 1px solid var(--border-dim);
    padding: 0.1rem 0.45rem;
    border-radius: var(--radius-xs);
    flex-shrink: 0;
}

.product-meta-tag {
    font-size: 0.8125rem;
    color: var(--text-muted);
    min-width: 0;
}

/* Título do produto — responsivo e sem corte */
.product-title {
    font-size: clamp(1.25rem, 2.2vw, 1.625rem);
    font-weight: 800;
    letter-spacing: -0.03em;
    color: var(--text-primary);
    line-height: 1.3;
    margin-bottom: 1.25rem;
    overflow-wrap: anywhere;
    word-break: break-word;
    hyphens: auto;
    min-width: 0;
    max-width: 100%;
}

/* Divisor */
.info-divider {
    border: none;
    border-top: 1px solid var(--border-dim);
    margin: 1.25rem 0;
    width: 100%;
}

/* Atributos como lista key : value — sem caixas */
.product-attrs {
    display: flex;
    flex-direction: column;
    gap: 0.625rem;
    margin-bottom: 1.25rem;
    min-width: 0;
    width: 100%;
}

.product-attr-row {
    display: flex;
    align-items: baseline;
    gap: 0.75rem;
    flex-wrap: wrap;
    min-width: 0;
}

.product-attr-key {
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--text-muted);
    min-width: 80px;
    flex-shrink: 0;
}

.product-attr-val {
    font-size: 0.9375rem;
    font-weight: 500;
    color: var(--text-primary);
    line-height: 1.3;
    min-width: 0;
    overflow-wrap: anywhere;
    word-break: break-word;
}

.product-attr-val.mono {
    font-family: var(--font-mono);
    font-weight: 700;
    font-size: 1rem;
    font-variant-numeric: tabular-nums;
}

/* Tags de filtros — pills compactas */
.product-filter-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.35rem;
    margin-bottom: 1.25rem;
    min-width: 0;
}

.product-filter-tag {
    font-size: 0.75rem;
    padding: 0.22rem 0.6rem;
    border: 1px solid var(--border-dim);
    border-radius: var(--radius-xs);
    color: var(--text-muted);
    background: var(--bg-input);
    max-width: 100%;
    overflow-wrap: anywhere;
}

/* Bloco de preço — ponto focal visual */
.product-price-block {
    margin-bottom: 1.25rem;
    min-width: 0;
    width: 100%;
}

.product-price-label {
    font-size: 0.7rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--text-muted);
    margin-bottom: 0.35rem;
}

.product-price-old {
    font-size: 0.875rem;
    color: var(--text-muted);
    text-decoration: line-through;
    font-variant-numeric: tabular-nums;
    display: block;
    margin-bottom: 0.15rem;
}

.product-price-value {
    font-size: clamp(2rem, 3.5vw, 2.75rem);
    font-weight: 800;
    letter-spacing: -0.05em;
    color: var(--text-primary);
    font-family: var(--font-mono);
    font-variant-numeric: tabular-nums;
    line-height: 1;
    display: block;
    min-width: 0;
}

.product-price-method {
    font-size: 0.8rem;
    color: var(--text-muted);
    margin-top: 0.35rem;
    display: block;
}

/* CTA de compra — botão principal 100% responsivo */
.btn-purchase {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.6rem;
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
    padding: 0.95rem 1.25rem;
    background: var(--green);
    color: #fff;
    font-size: 1rem;
    font-weight: 700;
    border: none;
    border-radius: var(--radius-md);
    cursor: pointer;
    text-decoration: none;
    letter-spacing: -0.01em;
    white-space: normal;
    word-break: break-word;
    text-align: center;
    transition:
        filter var(--t-fast),
        transform var(--t-fast),
        box-shadow var(--t-fast);
    box-shadow: 0 2px 8px rgba(22,163,74,0.25);
}
.btn-purchase:hover {
    filter: brightness(1.08);
    color: #fff;
    box-shadow: 0 4px 20px rgba(22,163,74,0.4);
    transform: translateY(-1px);
}
.btn-purchase:active { transform: scale(0.98); }

/* Status: indisponível */
.btn-unavailable {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
    padding: 0.95rem 1.25rem;
    background: var(--bg-raised);
    color: var(--text-muted);
    font-size: 0.9375rem;
    font-weight: 500;
    border: 1px solid var(--border-dim);
    border-radius: var(--radius-md);
    user-select: none;
    text-align: center;
}

/* Processo de compra — texto aberto, sem boxes */
.product-process {
    display: flex;
    flex-direction: column;
    gap: 0.625rem;
    min-width: 0;
}

.process-line {
    display: flex;
    align-items: flex-start;
    gap: 0.625rem;
    font-size: 0.8rem;
    color: var(--text-muted);
    line-height: 1.45;
    min-width: 0;
}
.process-line i {
    margin-top: 0.175rem;
    font-size: 0.8rem;
    flex-shrink: 0;
    opacity: 0.55;
}

/* Descrição completa — seção abaixo do fold (fora do grid) */
.product-description {
    padding-top: 2.5rem;
    margin-top: 2.5rem;
    border-top: 1px solid var(--border-dim);
    width: 100%;
    min-width: 0;
}

.product-description-label {
    font-size: 0.7rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--text-muted);
    margin-bottom: 1rem;
    display: block;
}

.product-description-text {
    font-size: 0.9375rem;
    color: var(--text-secondary);
    line-height: 1.75;
    white-space: pre-wrap;
    max-width: 800px;
    overflow-wrap: anywhere;
    word-break: break-word;
}

/* ============================================================
   OUTRAS CONTAS / PRODUTOS RELACIONADOS
   ============================================================ */
.product-related-section {
    padding-top: 3rem;
    margin-top: 3rem;
    border-top: 1px solid var(--border-dim);
    width: 100%;
}

.product-related-title {
    font-size: 1.125rem;
    font-weight: 700;
    letter-spacing: -0.02em;
    color: var(--text-primary);
    margin-bottom: 1.25rem;
}

/* ============================================================
   LIGHTBOX
   ============================================================ */
.lightbox {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.97);
    z-index: 9000;
    display: none;
    align-items: center;
    justify-content: center;
}
.lightbox.open { display: flex; }

.lightbox-inner {
    position: relative;
    max-width: 92vw;
    max-height: 90vh;
}
.lightbox-inner img {
    max-width: 90vw;
    max-height: 88vh;
    object-fit: contain;
    border-radius: var(--radius-sm);
}

.lightbox-close-btn {
    position: absolute;
    top: -48px; right: 0;
    background: none;
    border: none;
    color: rgba(255,255,255,0.4);
    font-size: 1.375rem;
    cursor: pointer;
    padding: 0.25rem 0.5rem;
    transition: color var(--t-fast);
}
.lightbox-close-btn:hover { color: rgba(255,255,255,0.85); }

.lightbox-arrow {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(255,255,255,0.06);
    border: 1px solid rgba(255,255,255,0.1);
    color: rgba(255,255,255,0.5);
    width: 42px; height: 42px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 0.9rem;
    transition: background var(--t-fast), color var(--t-fast);
}
.lightbox-arrow:hover { background: rgba(255,255,255,0.12); color: #fff; }
.lightbox-prev { left: -60px; }
.lightbox-next { right: -60px; }

/* ============================================================
   FILTRO DE PREÇO INLINE — sempre visível na filter bar
   ============================================================ */
.filter-price-inline {
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
    background: var(--bg-card);
    border: 1px solid var(--border-dim);
    border-radius: 99px;
    padding: 0.32rem 0.75rem;
    transition: border-color var(--t-fast);
    white-space: nowrap;
}

.filter-price-inline:focus-within {
    border-color: var(--border);
    box-shadow: 0 0 0 2px var(--brand-glow);
}

.filter-price-inline-label {
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--text-muted);
    flex-shrink: 0;
}

.filter-price-inline-input {
    width: 52px;
    border: none;
    background: transparent;
    font-size: 0.8125rem;
    font-family: var(--font-mono);
    color: var(--text-primary);
    outline: none;
    text-align: center;
    font-variant-numeric: tabular-nums;
    min-width: 0;
}

.filter-price-inline-input::placeholder { color: var(--text-muted); font-family: var(--font); font-variant-numeric: normal; }

.filter-price-inline-sep {
    color: var(--text-muted);
    font-size: 0.75rem;
    flex-shrink: 0;
}

.filter-price-inline-apply {
    background: var(--brand);
    border: none;
    border-radius: 99px;
    color: #fff;
    font-size: 0.6875rem;
    font-weight: 700;
    padding: 0.18rem 0.55rem;
    cursor: pointer;
    transition: background var(--t-fast);
    flex-shrink: 0;
    font-family: inherit;
}

.filter-price-inline-apply:hover { background: var(--brand-hover); }

/* ============================================================
   BANNER CAROUSEL — Seção de destaque do topo
   ============================================================ */
.banner-section {
    padding: 1.5rem 0 0;
}

.banner-carousel {
    position: relative;
    border-radius: var(--radius-lg);
    overflow: hidden;
    background: var(--bg-card);
    border: 1px solid var(--border-dim);
    aspect-ratio: 21 / 7;
    max-height: 380px;
}

.banner-slide {
    position: absolute;
    inset: 0;
    opacity: 0;
    transition: opacity 0.5s var(--ease);
    pointer-events: none;
}

.banner-slide.active {
    opacity: 1;
    pointer-events: auto;
}

.banner-slide-link {
    display: block;
    width: 100%;
    height: 100%;
}

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

/* Overlay de texto sobre o banner */
.banner-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(to right, rgba(0,0,0,0.55) 0%, transparent 65%);
    display: flex;
    align-items: center;
    padding: 2rem 2.5rem;
    pointer-events: none;
}

.banner-overlay-text { max-width: 480px; }

.banner-overlay-title {
    font-size: clamp(1.125rem, 2.5vw, 1.75rem);
    font-weight: 800;
    letter-spacing: -0.03em;
    color: #fff;
    line-height: 1.2;
    margin-bottom: 0.5rem;
    overflow-wrap: anywhere;
}

.banner-overlay-desc {
    font-size: clamp(0.8125rem, 1.5vw, 0.9375rem);
    color: rgba(255,255,255,0.75);
    line-height: 1.5;
    overflow-wrap: anywhere;
}

/* Dots de navegação */
.banner-dots {
    position: absolute;
    bottom: 0.875rem;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 0.375rem;
    z-index: 10;
}

.banner-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: rgba(255,255,255,0.35);
    cursor: pointer;
    transition: background var(--t-fast), transform var(--t-fast);
    border: none;
    padding: 0;
}

.banner-dot.active {
    background: #fff;
    transform: scale(1.3);
}

/* Setas de navegação */
.banner-arrow {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: rgba(0,0,0,0.4);
    border: 1px solid rgba(255,255,255,0.15);
    color: rgba(255,255,255,0.75);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 0.8rem;
    z-index: 10;
    transition: background var(--t-fast), color var(--t-fast);
    opacity: 0;
}

.banner-carousel:hover .banner-arrow { opacity: 1; }
.banner-arrow:hover { background: rgba(0,0,0,0.65); color: #fff; }
.banner-arrow-prev { left: 0.875rem; }
.banner-arrow-next { right: 0.875rem; }

/* ============================================================
   CONTAS FIXADAS / EM DESTAQUE — Seção editorial
   ============================================================ */
.featured-section {
    padding: 1.5rem 0 0;
    margin-bottom: 0.5rem;
}

.featured-section-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    margin-bottom: 1rem;
    flex-wrap: wrap;
}

.featured-section-title {
    font-size: 1.0625rem;
    font-weight: 700;
    letter-spacing: -0.02em;
    color: var(--text-primary);
    display: flex;
    align-items: center;
}

.featured-badge-icon {
    color: #eab308;
    margin-right: 0.45rem;
    font-size: 0.9rem;
}

.featured-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 1rem;
}

/* ============================================================
   AD SLOTS — Banners publicitários (100% condicionais)
   ============================================================ */
.ad-slot {
    border-radius: var(--radius-lg);
    overflow: hidden;
    border: 1px solid var(--border-dim);
}

.ad-slot a { display: block; }

.ad-slot img {
    width: 100%;
    height: auto;
    display: block;
    object-fit: cover;
}

.ad-slot-top { margin: 1.5rem 0 0; }
.ad-slot-mid { margin: 1.5rem 0 0; }

/* ============================================================
   FOOTER
   ============================================================ */
.site-footer {
    background: var(--bg-surface);
    border-top: 1px solid var(--border-dim);
    padding: 1.5rem 0;
    margin-top: auto;
}

.footer-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    flex-wrap: wrap;
}

.footer-brand img {
    height: 28px;
    opacity: 0.5;
    transition: opacity var(--t-fast);
}
.footer-copy {
    font-size: 0.775rem;
    color: var(--text-muted);
    display: flex;
    align-items: center;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.footer-dev-credit {
    font-size: 0.75rem;
    color: var(--text-muted);
}

.footer-dev-credit a.dev-link {
    color: var(--brand);
    font-weight: 700;
    text-decoration: none;
    transition: opacity 0.15s ease, text-decoration 0.15s ease;
}

.footer-dev-credit a.dev-link:hover {
    text-decoration: underline;
    opacity: 0.85;
}

/* ============================================================
   SCROLLBAR & ACESSIBILIDADE
   ============================================================ */
::-webkit-scrollbar       { width: 5px; height: 5px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--border-strong); border-radius: 99px; }

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

:focus-visible {
    outline: 2px solid var(--brand);
    outline-offset: 2px;
    border-radius: var(--radius-xs);
}

/* ============================================================
   RESPONSIVIDADE REAL — Multi-breakpoint, anti-overflow
   ============================================================ */

@media (max-width: 960px) {
    .product-layout {
        grid-template-columns: 1fr;
        gap: 2rem;
    }
    .product-info-col {
        position: static;
        order: -1;
        margin-bottom: 0;
    }
    .gallery-block { position: static; }
    .product-description { margin-top: 2rem; }
    .product-price-value { font-size: 2.25rem; }
    .product-title { font-size: 1.375rem; }
}

@media (max-width: 768px) {
    /* Header */
    .header-search { display: none; }
    .header-actions { margin-left: auto; }

    /* Filter bar -> drawer mobile */
    .filter-bar { display: none; }
    .mobile-filter-btn { display: flex; }

    /* Carrossel e Banners */
    .banner-carousel { aspect-ratio: 16 / 7; max-height: 240px; }

    /* Store strip */
    .store-strip { padding: 1.5rem 0 1.25rem; }
    .store-name { font-size: 1.5rem; }
    .store-actions { width: 100%; }

    /* Lightbox */
    .lightbox-prev { left: 8px; }
    .lightbox-next { right: 8px; }

    /* Footer */
    .footer-inner { flex-direction: column; align-items: flex-start; }
}

@media (max-width: 540px) {
    .container { padding: 0 0.875rem; }
    .store-name { font-size: 1.25rem; }
    .product-price-value { font-size: 1.875rem; }
    .product-title { font-size: 1.1875rem; }
    .product-attr-key { min-width: 75px; }
    .card-body { padding: 0.875rem; }
    .price-main { font-size: 1.125rem; }
    .empty-state { padding: 3rem 1.25rem; }
    .store-strip-inner { flex-direction: column; gap: 1rem; }
    .banner-carousel { aspect-ratio: 4 / 3; max-height: 220px; }
    .info-divider { margin: 1rem 0; }
    .product-attrs { gap: 0.5rem; }
    .product-meta-line { margin-bottom: 0.5rem; }
    .btn-purchase { padding: 0.875rem; font-size: 0.9375rem; }
    .breadcrumb { margin-bottom: 1.25rem; }
}

@media (max-width: 360px) {
    .container { padding: 0 0.75rem; }
    .price-main { font-size: 1rem; }
    .product-price-value { font-size: 1.625rem; }
    .product-title { font-size: 1.0625rem; }
    .btn-purchase { font-size: 0.875rem; padding: 0.75rem; }
}

/* ============================================================
   ADMIN DESIGN SYSTEM & THEME SUPPORT (DARK & LIGHT)
   ============================================================ */

body.admin-body {
    background-color: var(--admin-bg, #0c0c0e);
    color: var(--admin-text-primary, #f0f0f5);
    min-height: 100vh;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    transition: background-color 0.2s ease, color 0.2s ease;
}

[data-theme="dark"] body.admin-body {
    --admin-bg: #0c0c0e;
    --admin-surface: #141417;
    --admin-surface-2: #1b1b20;
    --admin-surface-3: #22222a;
    --admin-border: rgba(255, 255, 255, 0.08);
    --admin-border-subtle: rgba(255, 255, 255, 0.04);
    --admin-text-primary: #f1f1f6;
    --admin-text-secondary: #9595ab;
    --admin-text-muted: #656578;
    --admin-input-bg: #0e0e11;
    --admin-header-bg: #111114;
    --admin-shadow: 0 4px 20px rgba(0,0,0,0.35);
}

[data-theme="light"] body.admin-body {
    --admin-bg: #f4f6fa;
    --admin-surface: #ffffff;
    --admin-surface-2: #f8fafc;
    --admin-surface-3: #eef2f6;
    --admin-border: rgba(0, 0, 0, 0.09);
    --admin-border-subtle: rgba(0, 0, 0, 0.04);
    --admin-text-primary: #0f172a;
    --admin-text-secondary: #475569;
    --admin-text-muted: #8896a6;
    --admin-input-bg: #ffffff;
    --admin-header-bg: #ffffff;
    --admin-shadow: 0 4px 20px rgba(0,0,0,0.06);
}

/* Admin Header Navigation */
.admin-navbar {
    background: var(--admin-header-bg);
    border-bottom: 1px solid var(--admin-border);
    padding: 0.75rem 0;
    margin-bottom: 2rem;
    position: sticky;
    top: 0;
    z-index: 50;
    backdrop-filter: blur(10px);
}

.admin-nav-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 1rem;
}

.admin-brand-wrap {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    text-decoration: none;
}

.admin-brand-title {
    font-size: 1rem;
    font-weight: 800;
    letter-spacing: -0.02em;
    color: var(--brand);
}

.admin-menu-list {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.admin-menu-link {
    color: var(--admin-text-secondary);
    text-decoration: none;
    font-size: 0.825rem;
    font-weight: 600;
    padding: 0.45rem 0.75rem;
    border-radius: var(--radius-sm);
    border: 1px solid transparent;
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    transition: all 0.15s ease;
}

.admin-menu-link:hover {
    color: var(--admin-text-primary);
    background: var(--admin-surface-2);
    border-color: var(--admin-border);
}

.admin-menu-link.active {
    color: #fff;
    background: var(--brand);
    border-color: var(--brand);
}

/* Admin Cards & Layouts */
.admin-card {
    background: var(--admin-surface);
    border: 1px solid var(--admin-border);
    border-radius: var(--radius-md);
    box-shadow: var(--admin-shadow);
    padding: 1.5rem;
    margin-bottom: 1.5rem;
}

.admin-table-wrap {
    width: 100%;
    overflow-x: auto;
    background: var(--admin-surface);
    border: 1px solid var(--admin-border);
    border-radius: var(--radius-md);
    box-shadow: var(--admin-shadow);
}

.admin-table {
    width: 100%;
    border-collapse: collapse;
    text-align: left;
    font-size: 0.875rem;
}

.admin-table th {
    background: var(--admin-surface-2);
    color: var(--admin-text-secondary);
    font-size: 0.725rem;
    text-transform: uppercase;
    font-weight: 700;
    letter-spacing: 0.05em;
    padding: 0.875rem 1rem;
    border-bottom: 1px solid var(--admin-border);
}

.admin-table td {
    padding: 0.875rem 1rem;
    border-bottom: 1px solid var(--admin-border-subtle);
    color: var(--admin-text-primary);
    vertical-align: middle;
}

.admin-table tr:hover td {
    background: var(--admin-surface-2);
}

.admin-input, .admin-select, .admin-textarea {
    width: 100%;
    background: var(--admin-input-bg);
    border: 1px solid var(--admin-border);
    border-radius: var(--radius-sm);
    color: var(--admin-text-primary);
    font-size: 0.875rem;
    padding: 0.625rem 0.875rem;
    outline: none;
    transition: border-color 0.15s ease, box-shadow 0.15s ease;
    font-family: inherit;
}

.admin-input:focus, .admin-select:focus, .admin-textarea:focus {
    border-color: var(--brand);
    box-shadow: 0 0 0 3px rgba(225, 29, 72, 0.15);
}

.admin-label {
    display: block;
    font-size: 0.75rem;
    font-weight: 700;
    color: var(--admin-text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 0.4rem;
}

/* ============================================================
   HIERARCHICAL CATEGORIES & SUBCATEGORIES UI
   ============================================================ */

.cat-hierarchy-card {
    background: var(--admin-surface);
    border: 1px solid var(--admin-border);
    border-radius: var(--radius-md);
    margin-bottom: 1.25rem;
    overflow: hidden;
    box-shadow: var(--admin-shadow);
    transition: border-color 0.15s ease;
}

.cat-hierarchy-card:hover {
    border-color: rgba(225, 29, 72, 0.3);
}

.cat-header-bar {
    background: var(--admin-surface-2);
    padding: 0.875rem 1.25rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 0.75rem;
    border-bottom: 1px solid var(--admin-border);
}

.cat-title-group {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.cat-name-badge {
    font-size: 1rem;
    font-weight: 800;
    color: var(--admin-text-primary);
}

.subcat-container {
    padding: 1.25rem;
    background: var(--admin-surface);
}

.subcat-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 0.625rem;
    margin-bottom: 1rem;
}

.subcat-pill {
    background: var(--admin-surface-2);
    border: 1px solid var(--admin-border);
    border-radius: var(--radius-sm);
    padding: 0.5rem 0.75rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.5rem;
    font-size: 0.825rem;
    color: var(--admin-text-primary);
}

.subcat-pill-count {
    background: rgba(225, 29, 72, 0.12);
    color: var(--brand);
    font-size: 0.7rem;
    font-weight: 700;
    padding: 0.15rem 0.4rem;
    border-radius: 99px;
}

.subcat-pill-del {
    background: transparent;
    border: none;
    color: var(--admin-text-muted);
    cursor: pointer;
    font-size: 0.75rem;
    padding: 0.2rem;
    transition: color 0.15s ease;
}

.subcat-pill-del:hover {
    color: #ef4444;
}

.subcat-add-inline {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding-top: 0.75rem;
    border-top: 1px dashed var(--admin-border);
}

/* Universal Number Input & Spinner Styling (Dark & Light Mode) */
input[type="number"]::-webkit-inner-spin-button,
input[type="number"]::-webkit-outer-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

input[type="number"] {
    -moz-appearance: textfield;
    appearance: textfield;
    color-scheme: dark light;
}

[data-theme="dark"] input[type="number"] {
    color-scheme: dark;
}

[data-theme="light"] input[type="number"] {
    color-scheme: light;
}

.pinned-order-input {
    width: 54px;
    padding: 0.35rem 0.4rem;
    text-align: center;
    font-weight: 700;
    border-radius: var(--radius-sm);
    border: 1px solid var(--admin-border);
    background: var(--admin-input-bg);
    color: var(--admin-text-primary);
    outline: none;
    font-size: 0.825rem;
    transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.pinned-order-input:focus {
    border-color: var(--brand);
    box-shadow: 0 0 0 2px rgba(225, 29, 72, 0.2);
}

/* ============================================================
   MODERN ADMIN LOGIN SCREEN - MATHEMATICALLY CENTERED
   ============================================================ */

.admin-login-page {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    padding: 1.5rem;
    background: radial-gradient(circle at 50% 15%, rgba(225, 29, 72, 0.08) 0%, transparent 65%), var(--admin-bg, #0c0c0e);
    box-sizing: border-box;
}

.admin-login-card {
    width: 100%;
    max-width: 400px;
    background: var(--admin-surface, #141417);
    border: 1px solid var(--admin-border, rgba(255,255,255,0.08));
    border-radius: var(--radius-lg, 16px);
    box-shadow: 0 12px 40px rgba(0,0,0,0.4);
    padding: 2.5rem 2rem;
    text-align: center;
    position: relative;
    box-sizing: border-box;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.admin-login-logo-wrap {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    margin-bottom: 1.25rem;
}

.admin-login-logo-wrap a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.admin-login-logo {
    height: 48px;
    max-width: 100%;
    object-fit: contain;
    display: block;
    margin: 0 auto;
}

.admin-login-title {
    font-size: 1.35rem;
    font-weight: 800;
    color: var(--admin-text-primary, #fff);
    margin-bottom: 0.35rem;
    letter-spacing: -0.02em;
    width: 100%;
    text-align: center;
}

.admin-login-subtitle {
    font-size: 0.85rem;
    color: var(--admin-text-secondary, #9090a8);
    margin-bottom: 1.75rem;
    width: 100%;
    text-align: center;
}

.admin-login-form {
    width: 100%;
    text-align: left;
}

.admin-login-field {
    text-align: left;
    margin-bottom: 1.15rem;
    position: relative;
    width: 100%;
}

.admin-login-input-wrap {
    position: relative;
    display: flex;
    align-items: center;
    width: 100%;
}

.admin-login-input-icon {
    position: absolute;
    left: 1rem;
    color: var(--admin-text-muted, #606075);
    font-size: 0.875rem;
    pointer-events: none;
}

.admin-login-input {
    width: 100%;
    padding: 0.75rem 1rem 0.75rem 2.6rem;
    background: var(--admin-input-bg, #0d0d10);
    border: 1px solid var(--admin-border, rgba(255,255,255,0.08));
    border-radius: var(--radius-sm, 8px);
    color: var(--admin-text-primary, #fff);
    font-size: 0.9rem;
    outline: none;
    transition: all 0.15s ease;
    box-sizing: border-box;
}

.admin-login-input:focus {
    border-color: var(--brand, #e11d48);
    box-shadow: 0 0 0 3px rgba(225, 29, 72, 0.2);
}

.admin-login-btn {
    width: 100%;
    padding: 0.85rem;
    background: var(--brand, #e11d48);
    border: none;
    border-radius: var(--radius-sm, 8px);
    color: #fff;
    font-size: 0.95rem;
    font-weight: 700;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    margin-top: 1.5rem;
    transition: background 0.15s ease, transform 0.1s ease;
}

.admin-login-btn:hover {
    background: var(--brand-hover, #c31940);
}

.admin-login-btn:active {
    transform: scale(0.99);
}

/* ============================================================
   HORIZONTAL IN-FLOW AD BANNERS (STREAMLINE & DISCREET)
   ============================================================ */

.ad-inflow-wrap {
    width: 100%;
    margin: 1.5rem 0;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.ad-inflow-tag {
    font-size: 0.625rem;
    font-weight: 700;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--text-muted);
    margin-bottom: 0.35rem;
    user-select: none;
    align-self: flex-start;
}

.ad-inflow-frame {
    display: block;
    width: 100%;
    max-width: 100%;
    max-height: 160px;
    aspect-ratio: 16 / 3;
    border-radius: var(--radius-sm);
    overflow: hidden;
    border: 1px solid var(--border-color);
    background: var(--bg-surface);
    box-shadow: 0 2px 8px rgba(0,0,0,0.06);
    transition: border-color 0.15s ease, transform 0.15s ease, box-shadow 0.15s ease;
}

.ad-inflow-frame:hover {
    border-color: rgba(225, 29, 72, 0.4);
    transform: translateY(-1px);
    box-shadow: 0 4px 16px rgba(0,0,0,0.12);
}

.ad-inflow-frame img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

@media (max-width: 768px) {
    .ad-inflow-wrap {
        margin: 1rem 0;
    }
    .ad-inflow-frame {
        aspect-ratio: 16 / 5;
        max-height: 110px;
    }
}

/* ============================================================
   IMAGE FALLBACK & SKELETON PLACEHOLDER
   ============================================================ */
.has-error {
    position: relative;
    background: var(--bg-surface) !important;
}

.has-error img {
    visibility: hidden !important;
}

.has-error::before {
    content: '\f03e';
    font-family: 'Font Awesome 6 Free', 'Font Awesome 6 Pro', sans-serif;
    font-weight: 900;
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.75rem;
    color: var(--text-muted);
    opacity: 0.35;
    z-index: 2;
}

.has-error::after {
    content: 'Imagem indisponível';
    position: absolute;
    bottom: 12%;
    left: 0;
    right: 0;
    text-align: center;
    font-size: 0.72rem;
    font-weight: 500;
    color: var(--text-muted);
    opacity: 0.55;
    z-index: 2;
}



