/* KAERU Design System — source of truth: kaeru-catalog/design.md */

:root {
  --c-bg:             #EAF5EE;
  --c-accent:         #27C571;

  /* Margem — sinais semânticos */
  --c-profit:     #1A9058;
  --c-profit-bg:  rgba(26, 144, 88, 0.12);
  --c-thin:       #B45309;
  --c-thin-bg:    rgba(180, 83, 9, 0.12);
  --c-loss:       #B91C1C;
  --c-loss-bg:    rgba(185, 28, 28, 0.12);
  --c-nodata:     #6B7280;
  --c-nodata-bg:  rgba(107, 114, 128, 0.10);

  --c-mint:           #7DD99D;
  --c-white:          #15201C;
  --c-card:           #FFFFFF;
  --c-shadow:         rgba(21, 32, 28, 0.04);
  --c-sold-bg:        #FFEAEA;
  --c-sold-fg:        #E55B5B;
  --c-surface:        #FFFFFF;
  --c-border:         #D2E7DB;
  --c-price:          #1A7A46;  /* verde acessível para texto sobre branco/mint (≥4.5:1) */

  /* Text tokens semânticos (usar em vez de rgba solto) */
  --text-primary:     #15201C;
  --text-secondary:   #24362E;
  --text-tertiary:    #344A40;
  --text-quiet:       #5A7566;
  --text-disabled:    #768C81;

  --font-brand:       'Fredoka', sans-serif;
  --font-heading:     'Fredoka', sans-serif;
  --font-body:        'Nunito', 'Manrope', sans-serif;

  --sp-page:          20px;
  --sp-card-pad:      12px;

  /* Spacing scale (4-base). Never use raw 6/10/14/18 — snap to nearest. */
  --s-1:   4px;
  --s-2:   8px;
  --s-3:  12px;
  --s-4:  16px;
  --s-5:  20px;
  --s-6:  24px;
  --s-8:  32px;
  --s-10: 40px;
  --s-12: 48px;

  /* Border-radius scale. */
  --r-sm:   16px;
  --r-md:   24px;
  --r-lg:   32px;
  --r-pill: 999px;

  --glow-accent:      rgba(39, 197, 113, 0.25);
  --glow-accent-sm:   rgba(39, 197, 113, 0.15);

  /* Font-size scale. Never use raw font-size in px — snap to token. */
  --fs-xxs:  11px;
  --fs-xs:   12px;
  --fs-sm:   13px;
  --fs-md:   14px;
  --fs-body: 15px;
  --fs-lg:   17px;
  --fs-xl:   20px;
  --fs-h3:   22px;
  --fs-h2:   26px;
  --fs-h1:   30px;
  --fs-h0:   40px;
}

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

body {
  background-color: var(--c-bg);
  color: var(--text-primary);
  font-family: var(--font-body);
  font-size: var(--fs-body);
  line-height: 1.5;
  min-height: 100vh;
}

/* ── Typography ── */
.brand-title {
  font-family: var(--font-brand);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.product-name {
  font-family: var(--font-heading);
  font-weight: 800;
}

.price {
  font-family: var(--font-body);
  font-weight: 700;
  color: var(--c-price);
  font-variant-numeric: tabular-nums;
}

/* ── Buttons ── */
.btn-primary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--s-2);
  width: 100%;
  padding: 11px 20px;
  background: var(--c-accent);
  color: #15201C;
  font-family: var(--font-brand);
  font-weight: 600;
  font-size: var(--fs-md);
  border: none;
  border-radius: var(--r-pill);
  cursor: pointer;
  text-align: center;
  text-decoration: none;
  transition: transform 0.2s cubic-bezier(0.34, 1.56, 0.64, 1), opacity 0.15s, box-shadow 0.15s;
}
.btn-primary:hover {
  opacity: 0.95;
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(21, 32, 28, 0.15);
}

.btn-secondary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 8px 16px;
  background: transparent;
  color: var(--c-price);
  font-family: var(--font-body);
  font-weight: 600;
  font-size: var(--fs-md);
  border: 1px solid rgba(150, 230, 179,0.4);
  border-radius: var(--r-sm);
  cursor: pointer;
  text-decoration: none;
  transition: background 0.15s, border-color 0.15s;
}
.btn-secondary:hover {
  background: var(--glow-accent-sm);
  border-color: var(--c-accent);
}

.btn-ghost {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 9px 16px;
  background: transparent;
  color: var(--text-tertiary);
  font-family: var(--font-body);
  font-weight: 600;
  font-size: var(--fs-md);
  border: 1px solid rgba(150, 230, 179,0.22);
  border-radius: var(--r-sm);
  cursor: pointer;
  text-decoration: none;
  transition: background 0.15s, color 0.15s;
}
.btn-ghost:hover { background: var(--glow-accent-sm); color: var(--text-primary); }

/* ── Forms ── */
.form-group { display: flex; flex-direction: column; gap: 6px; margin-bottom: var(--s-4); min-width: 0; }

.form-label {
  font-size: var(--fs-sm);
  font-weight: 700;
  color: var(--text-tertiary);
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.form-input {
  width: 100%;
  min-width: 0;
  padding: 10px 12px;
  background: rgba(244, 249, 246, 0.6);
  color: var(--text-primary);
  border: 1px solid rgba(150, 230, 179,0.25);
  border-radius: var(--r-sm);
  font-family: var(--font-body);
  font-size: var(--fs-body);
  outline: none;
  transition: border-color 0.2s, box-shadow 0.2s;
}
.form-input:focus {
  border-color: var(--c-accent);
  box-shadow: 0 0 0 3px var(--glow-accent-sm);
}
.form-input::placeholder { color: var(--text-tertiary); }

.form-select {
  width: 100%;
  min-width: 0;
  appearance: none;
  padding: 10px 36px 10px 12px;
  background: rgba(244, 249, 246,0.6) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1l5 5 5-5' stroke='%23A4F9C8' stroke-width='1.5' fill='none' stroke-linecap='round'/%3E%3C/svg%3E") no-repeat right 12px center;
  color: var(--text-primary);
  border: 1px solid rgba(150, 230, 179,0.25);
  border-radius: var(--r-sm);
  font-family: var(--font-body);
  font-size: var(--fs-body);
  outline: none;
  cursor: pointer;
  transition: border-color 0.2s;
}
.form-select:focus { border-color: var(--c-accent); }

/* ── Set Combobox ── */
.set-combobox {
  position: relative;
}

.set-combobox-search {
  width: 100%;
  min-width: 0;
  padding: 10px 36px 10px 12px;
  background: rgba(244, 249, 246, 0.6) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1l5 5 5-5' stroke='%23A4F9C8' stroke-width='1.5' fill='none' stroke-linecap='round'/%3E%3C/svg%3E") no-repeat right 12px center;
  color: var(--text-primary);
  border: 1px solid rgba(150, 230, 179, 0.25);
  border-radius: var(--r-sm);
  font-family: var(--font-body);
  font-size: var(--fs-body);
  outline: none;
  cursor: pointer;
  transition: border-color 0.2s, box-shadow 0.2s;
  box-sizing: border-box;
}

.set-combobox-search:focus {
  border-color: var(--c-accent);
  box-shadow: 0 0 0 3px var(--glow-accent-sm);
  cursor: text;
}

.set-combobox-search::placeholder { color: var(--text-tertiary); }

.set-combobox-list {
  position: absolute;
  top: calc(100% + 4px);
  left: 0;
  right: 0;
  background: var(--c-card);
  border: 1px solid rgba(150, 230, 179, 0.25);
  border-radius: var(--r-sm);
  max-height: 220px;
  overflow-y: auto;
  z-index: 200;
  list-style: none;
  padding: 4px 0;
  margin: 0;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.15);
}

.set-combobox-item {
  padding: 8px 12px;
  cursor: pointer;
  font-family: var(--font-body);
  font-size: var(--fs-sm);
  color: var(--text-secondary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.set-combobox-item:hover {
  background: rgba(39, 197, 113, 0.08);
  color: var(--text-primary);
}

.set-combobox-item[data-value=""] {
  color: var(--text-tertiary);
  font-style: italic;
}

/* ── Panels ── */
.panel {
  background: var(--c-card);
  border: 1px solid rgba(150, 230, 179,0.15);
  border-radius: var(--r-md);
  padding: var(--s-5);
}

/* ── Badges ── */
.badge {
  display: inline-block;
  padding: 3px 8px;
  border-radius: var(--r-sm);
  font-family: var(--font-body);
  font-size: var(--fs-xxs);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}
.badge-available { background: var(--c-border); color: var(--c-price); }
.badge-sold      { background: var(--c-sold-bg); color: var(--c-sold-fg); }
.badge-condition { background: rgba(90, 117, 102,0.1); color: var(--text-tertiary); }
.badge-language  { background: rgba(21, 32, 28,0.07); color: var(--text-tertiary); }
.badge-type      { background: rgba(150, 230, 179,0.08); color: var(--text-tertiary); border: 1px solid rgba(150, 230, 179,0.18); }
.badge-liga      { background: rgba(39, 197, 113, 0.12); color: var(--c-accent); font-weight: 600; text-transform: none; }
.badge-lg        { padding: var(--s-2) 14px; font-size: var(--fs-sm); }

/* ── Picked card chip (inline selected in forms) ── */
.picked-card {
  display: flex;
  align-items: center;
  gap: var(--s-2);
  padding: 8px 10px;
  background: rgba(150, 230, 179,0.08);
  border: 1px solid rgba(150, 230, 179,0.28);
  border-radius: var(--r-sm);
  font-size: var(--fs-md);
}

/* ── Logo ── */
.logo {
  display: block;
  object-fit: contain;
}
.logo-sm  { width: 36px;  height: 36px; }
.logo-md  { width: 48px;  height: 48px; }
.logo-lg  { width: 80px;  height: 80px; }
.logo-xl  { width: 120px; height: 120px; }

/* ── Login page ── */
.login-page {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
  padding: var(--s-6);
  background:
    radial-gradient(ellipse 60% 50% at 50% 40%, rgba(150, 230, 179,0.07) 0%, transparent 70%),
    var(--c-bg);
}

.login-card {
  width: 100%;
  max-width: 360px;
  background: var(--c-card);
  border: 1px solid rgba(150, 230, 179,0.25);
  border-radius: var(--r-lg);
  padding: 40px 32px 36px;
  box-shadow: 0 24px 48px rgba(21, 32, 28,0.4), 0 0 0 1px rgba(150, 230, 179,0.06);
}

.login-logo-wrap {
  display: flex;
  justify-content: center;
  margin-bottom: var(--s-5);
}

.login-heading {
  font-family: var(--font-brand);
  font-weight: 600;
  font-size: var(--fs-md);
  color: var(--text-tertiary);
  text-align: center;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  margin-bottom: 28px;
}

.login-error {
  display: flex;
  align-items: center;
  gap: var(--s-2);
  background: var(--c-sold-bg);
  color: var(--c-sold-fg);
  border-radius: var(--r-sm);
  padding: 10px 12px;
  font-size: var(--fs-md);
  margin-bottom: var(--s-5);
}

/* ── Admin layout ── */
.admin-layout { display: flex; min-height: 100vh; }

.admin-sidebar {
  width: 228px;
  flex-shrink: 0;
  background: rgba(255, 255, 255, 0.4);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-right: 1px solid var(--c-border);
  display: flex;
  flex-direction: column;
}

.sidebar-header {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 20px 16px;
  border-bottom: 1px solid rgba(150, 230, 179,0.1);
}

.sidebar-brand-name {
  font-family: var(--font-brand);
  font-weight: 600;
  font-size: 20px;
  color: var(--c-accent);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  line-height: 1;
}

.sidebar-brand-sub {
  font-size: var(--fs-xxs);
  color: var(--text-quiet);
  text-transform: uppercase;
  letter-spacing: 0.1em;
}

.sidebar-section-label {
  padding: 16px 16px 6px;
  font-size: var(--fs-sm);
  font-weight: 700;
  color: var(--text-quiet);
  text-transform: uppercase;
  letter-spacing: 0.12em;
}

.sidebar-nav { display: flex; flex-direction: column; gap: 2px; padding: 0 8px; }

.sidebar-link {
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 9px 10px;
  color: var(--text-quiet);
  text-decoration: none;
  font-size: var(--fs-md);
  font-weight: 500;
  border-radius: var(--r-sm);
  transition: background 0.12s, color 0.12s;
}
.sidebar-link:hover { background: var(--glow-accent-sm); color: var(--text-primary); }
.sidebar-link.active { background: rgba(150, 230, 179,0.14); color: var(--c-accent); font-weight: 600; }

.sidebar-link-icon {
  width: 16px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  opacity: 0.7;
  flex-shrink: 0;
}
.sidebar-link.active .sidebar-link-icon { opacity: 1; }

.sidebar-footer {
  margin-top: auto;
  padding: 12px 8px 16px;
  border-top: 1px solid rgba(150, 230, 179,0.1);
}

.admin-main {
  flex: 1;
  padding: 32px 36px;
  overflow-y: auto;
  background: radial-gradient(circle at 10% 0%, rgba(150, 230, 179,0.06) 0%, var(--c-bg) 50%);
}

/* ── Admin bottom nav (mobile ≤900px) ── */
.admin-bottom-nav { display: none; }

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

  .admin-bottom-nav {
    display: flex;
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 200;
    background: rgba(255, 255, 255, 0.92);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border-top: 1px solid var(--c-border);
    padding-bottom: env(safe-area-inset-bottom, 0px);
  }

  .admin-tab {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 3px;
    padding: 10px 4px;
    color: var(--text-quiet);
    text-decoration: none;
    font-size: var(--fs-xxs);
    font-weight: 500;
    letter-spacing: 0.04em;
    cursor: pointer;
    list-style: none;
    background: none;
    border: none;
    transition: color 0.12s;
    -webkit-tap-highlight-color: transparent;
  }

  .admin-tab.active { color: var(--c-accent); }

  .admin-tab-icon {
    font-size: 18px;
    line-height: 1;
  }

  .admin-tab-label {
    font-size: var(--fs-xxs);
    white-space: nowrap;
  }

  .admin-tab-more { flex: 1; position: relative; }
  .admin-tab-more summary { list-style: none; }
  .admin-tab-more summary::-webkit-details-marker { display: none; }

  .admin-tab-more-panel {
    position: absolute;
    bottom: calc(100% + 8px);
    right: 0;
    width: 200px;
    background: var(--c-card);
    border: 1px solid var(--c-border);
    border-radius: var(--r-md);
    padding: var(--s-2);
    box-shadow: 0 8px 32px rgba(21, 32, 28, 0.12);
    display: flex;
    flex-direction: column;
    gap: 2px;
  }

  .admin-main {
    padding: var(--s-5) var(--s-4);
    padding-bottom: calc(72px + env(safe-area-inset-bottom, 0px));
  }
}

.admin-page-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  margin-bottom: 28px;
  gap: var(--s-4);
}

.admin-page-title {
  font-family: var(--font-brand);
  font-weight: 600;
  font-size: var(--fs-h1);
  color: var(--text-primary);
  line-height: 1.2;
}

.admin-page-subtitle {
  font-size: var(--fs-md);
  color: var(--text-tertiary);
  margin-top: var(--s-1);
  opacity: 0.7;
}

/* ── Admin KPI cards ── */
.kpi-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: var(--s-4);
  margin-bottom: var(--s-8);
}

.kpi-card {
  background: rgba(255, 255, 255, 0.6);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid var(--c-border);
  border-radius: var(--r-md);
  padding: var(--s-5);
  transition: transform 0.2s, box-shadow 0.2s;
}
.kpi-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(21, 32, 28,0.4);
  border-color: var(--text-secondary);
}

.kpi-label {
  font-size: var(--fs-xs);
  font-weight: 700;
  color: var(--text-quiet);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  margin-bottom: var(--s-2);
}

.kpi-value {
  font-family: var(--font-heading);
  font-weight: 800;
  font-size: 28px;
  color: var(--text-primary);
  line-height: 1;
}

.kpi-value.accent { color: var(--c-accent); }

/* ── Data table ── */
.data-table {
  width: 100%;
  border-collapse: collapse;
}

.data-table th {
  padding: 10px 14px;
  text-align: left;
  font-size: var(--fs-xs);
  font-weight: 700;
  color: var(--text-quiet);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  border-bottom: 1px solid rgba(150, 230, 179,0.1);
}

.data-table td {
  padding: 13px 14px;
  font-size: var(--fs-md);
  color: var(--text-primary);
  border-bottom: 1px solid rgba(150, 230, 179,0.06);
}

.data-table tbody tr:hover td { background: var(--glow-accent-sm); }

/* ── Admin Table (Dense) ── */
.admin-table th {
  padding: 8px 12px;
  font-size: var(--fs-xxs);
}
.admin-table td {
  padding: 8px 12px;
  font-size: var(--fs-sm);
}
.admin-table .thumbnail {
  height: 36px;
  border-radius: 4px;
  background: var(--c-shadow);
  object-fit: contain;
}
.admin-table .col-checkbox {
  width: 40px;
  text-align: center;
}

/* ── Card table layout (mobile ≤640px) ── */
@media (max-width: 640px) {
  .data-table,
  .data-table thead,
  .data-table tbody,
  .data-table tr,
  .data-table th,
  .data-table td { display: block; width: 100%; }

  .data-table thead { display: none; }

  .data-table tbody tr {
    margin-bottom: var(--s-3);
    border: 1px solid var(--c-border);
    border-radius: var(--r-sm);
    padding: var(--s-3);
    background: var(--c-card);
  }

  .data-table tbody tr:hover td { background: transparent; }

  .data-table td {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: var(--s-1) 0;
    border-bottom: none;
    font-size: var(--fs-sm);
    gap: var(--s-2);
  }

  .data-table td::before {
    content: attr(data-label);
    font-size: var(--fs-xs);
    font-weight: 700;
    color: var(--text-quiet);
    text-transform: uppercase;
    letter-spacing: 0.06em;
    flex-shrink: 0;
    white-space: nowrap;
  }

  /* Action cell — right-align, no prefix */
  .data-table td[data-label=""] {
    justify-content: flex-end;
    padding-top: var(--s-2);
    margin-top: var(--s-1);
    border-top: 1px solid rgba(150, 230, 179, 0.08);
  }
  .data-table td[data-label=""]::before { display: none; }

  /* Thumbnail cell on mobile */
  .data-table td.col-thumb {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    padding: 4px 0 8px 0;
    margin-bottom: 6px;
    border-bottom: 1px solid rgba(150, 230, 179, 0.1);
  }
  .data-table td.col-thumb::before { display: none; }
  .data-table td.col-thumb img,
  .data-table td.col-thumb .thumbnail {
    width: 44px !important;
    height: 44px !important;
    object-fit: contain;
    border-radius: var(--r-sm);
    background: var(--c-shadow);
  }

  /* Hide checkbox column on mobile */
  .data-table .col-checkbox { display: none; }

  /* Admin toolbar mobile layout */
  .admin-toolbar-group {
    width: 100%;
    flex-direction: column;
    align-items: stretch;
  }
  .admin-toolbar-group .form-input,
  .admin-toolbar-group .form-select,
  .admin-toolbar-group .set-combobox,
  .admin-toolbar-group .set-combobox-search,
  .admin-toolbar-group .btn-secondary,
  .admin-toolbar-group .btn-ghost {
    width: 100% !important;
    min-width: 100% !important;
  }
}

.stock-cell {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

@media (max-width: 640px) {
  .stock-cell {
    flex-direction: row;
    align-items: center;
    justify-content: flex-end;
    gap: var(--s-2);
  }
}

/* ── Admin Toolbar ── */
.admin-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--s-4);
  margin-bottom: var(--s-4);
  padding: 12px 16px;
  background: rgba(255, 255, 255,0.4);
  border-radius: var(--r-sm);
  border: 1px solid rgba(150, 230, 179,0.15);
  flex-wrap: wrap;
}
.admin-toolbar-group {
  display: flex;
  align-items: center;
  gap: var(--s-2);
  flex-wrap: wrap;
}

.admin-toolbar-group .form-input,
.admin-toolbar-group .form-select,
.admin-toolbar-group .btn-secondary,
.admin-toolbar-group .btn-ghost,
.listing-filters .form-input,
.listing-filters .form-select,
.listing-filters .btn-secondary,
.listing-filters .btn-ghost {
  height: 34px !important;
  min-height: 34px !important;
  max-height: 34px !important;
  box-sizing: border-box !important;
  font-size: 13px;
  line-height: 1;
  padding: 0 10px;
  margin: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

input[type="date"] {
  font-family: inherit;
  font-size: var(--fs-sm);
  color: var(--text-primary);
  min-height: 36px;
  line-height: normal;
}

.admin-toolbar-group input[type="date"],
.listing-filters input[type="date"] {
  height: 36px !important;
  min-height: 36px !important;
  padding: 0 8px;
}

/* ── Store layout ── */
.store-header {
  position: sticky;
  top: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 28px;
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--c-border);
}

.store-header-brand {
  display: flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
}

.store-header-wordmark {
  font-family: var(--font-brand);
  font-size: 28px;
  font-weight: 600;
  color: var(--text-primary);
  letter-spacing: 0.06em;
  line-height: 1;
}

.store-header-nav {
  display: flex;
  align-items: center;
  gap: var(--s-2);
}

.store-header-search {
  flex: 1;
  max-width: 480px;
  margin: 0 24px;
}

.header-search-input {
  width: 100%;
  border-radius: var(--r-pill);
  padding: 8px 16px 8px 36px;
  background: rgba(244, 249, 246, 0.6) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%23344A40' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='11' cy='11' r='8'/%3E%3Cline x1='21' y1='21' x2='16.65' y2='16.65'/%3E%3C/svg%3E") no-repeat 12px center;
  color: var(--text-primary);
  border: 1px solid var(--c-border);
  font-family: var(--font-body);
  font-size: var(--fs-body);
  outline: none;
  transition: border-color 0.2s, box-shadow 0.2s, background 0.2s;
}
.header-search-input:focus {
  border-color: var(--c-accent);
  background: rgba(244, 249, 246, 0.8);
  box-shadow: 0 0 0 3px var(--glow-accent-sm);
}

@media (max-width: 768px) {
  .store-header { padding: 10px 14px; gap: var(--s-2); }
  .store-header-search { margin: 0 8px; }
  .header-search-input { font-size: 16px; padding: 8px 12px 8px 32px; background-position: 10px center; background-size: 14px; }
  .store-header-wordmark { font-size: 22px; }
  .store-header-brand .logo-md { width: 52px; height: 52px; }
}
@media (max-width: 480px) {
  .store-header-wordmark { display: none; }
  .store-header-brand .logo-md { width: 56px; height: 56px; }
  .store-header { padding: 10px 12px; }
  .store-header-search { margin: 0 6px; }
}

/* iOS Safari: any input with font-size < 16px triggers auto-zoom on focus
   (and can leave the page zoomed after reload). Force 16px on mobile. */
@media (max-width: 900px) {
  input, select, textarea { font-size: 16px; }
}

.cart-icon-btn {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: var(--r-pill);
  background: rgba(150, 230, 179, 0.08);
  color: var(--text-primary);
  text-decoration: none;
  border: 1px solid rgba(150, 230, 179, 0.2);
  transition: background 0.15s ease, color 0.15s ease, border-color 0.15s ease, transform 0.12s ease;
}
.cart-icon-btn svg { width: 20px; height: 20px; display: block; }
.cart-icon-btn:hover {
  background: var(--c-accent);
  color: var(--c-bg);
  border-color: var(--c-accent);
  transform: translateY(-1px);
}
.cart-icon-btn:active { transform: scale(0.96); }

.cart-count {
  position: absolute;
  top: -4px;
  right: -4px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 18px;
  height: 18px;
  padding: 0 5px;
  background: var(--c-accent);
  color: #15201C;
  font-size: var(--fs-xxs);
  font-weight: 800;
  border-radius: var(--r-pill);
  line-height: 1;
  border: 2px solid var(--c-bg);
  box-shadow: 0 0 0 1px var(--c-border);
}

@media (max-width: 768px) {
  /* Bottom nav mobile already covers the cart — hide the header duplicate. */
  .store-header-nav { display: none; }
}

.store-main {
  padding: 36px 28px;
  max-width: 1280px;
  margin: 0 auto;
}

@media (max-width: 640px) {
  .store-main { padding: 20px 20px; }
}

.store-footer {
  padding: 32px 28px;
  border-top: 1px solid rgba(150, 230, 179,0.1);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--s-5);
}

.store-footer-brand {
  display: flex;
  align-items: center;
  gap: 10px;
}

.store-footer-tagline {
  font-family: var(--font-brand);
  font-size: var(--fs-body);
  color: var(--c-accent);
  letter-spacing: 0.06em;
}

.store-footer-copy {
  font-size: var(--fs-sm);
  color: var(--text-quiet);
}

/* ── Store hero ── */
.store-hero-new {
  position: relative;
  background: linear-gradient(135deg, #EAF5EE 0%, #DCEFE3 100%);
  border: 1px solid var(--c-border);
  border-radius: var(--r-md);
  padding: 48px;
  margin-bottom: var(--s-10);
  overflow: hidden;
  box-shadow: inset 0 0 40px rgba(39, 197, 113, 0.04);
}

.store-hero-content {
  position: relative;
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--s-8);
}

.store-hero-text {
  flex: 1.2;
  max-width: 520px;
}

.store-hero-title {
  font-family: var(--font-brand);
  font-size: 44px;
  font-weight: 600;
  line-height: 1.15;
  color: var(--text-primary);
  margin-bottom: var(--s-3);
  opacity: 0;
  transform: translateY(15px);
  animation: slideUp 0.8s cubic-bezier(0.25, 1, 0.5, 1) forwards;
}

.store-hero-sub {
  font-family: var(--font-body);
  font-size: var(--fs-body);
  color: var(--text-secondary);
  line-height: 1.6;
  margin-bottom: var(--s-6);
  opacity: 0;
  transform: translateY(15px);
  animation: slideUp 0.8s cubic-bezier(0.25, 1, 0.5, 1) forwards 0.15s;
}

/* Botão de Ação Cozy */
.btn-hero-primary {
  display: inline-flex;
  align-items: center;
  gap: var(--s-2);
  padding: 14px 28px;
  background: var(--c-accent);
  color: #15201C;
  font-family: var(--font-brand);
  font-weight: 600;
  font-size: var(--fs-body);
  text-decoration: none;
  border-radius: var(--r-pill);
  box-shadow: 0 10px 20px rgba(39, 197, 113, 0.15);
  transition: transform 0.25s cubic-bezier(0.34, 1.56, 0.64, 1), background-color 0.2s, box-shadow 0.2s;
}

.btn-hero-primary:hover {
  background: #1eb761;
  transform: translateY(-3px) scale(1.02);
  box-shadow: 0 12px 24px rgba(39, 197, 113, 0.25);
}

.btn-hero-primary svg {
  transition: transform 0.2s ease;
}

.btn-hero-primary:hover svg {
  transform: translateX(4px);
}

.store-hero-actions {
  opacity: 0;
  transform: translateY(10px);
  animation: slideUp 0.8s cubic-bezier(0.25, 1, 0.5, 1) forwards 0.3s;
}

/* Área Visual (Direita) */
.store-hero-visual {
  position: relative;
  flex: 0.8;
  display: flex;
  justify-content: center;
  align-items: center;
  min-height: 280px;
}

/* Grupo de Blobs e Nuvenzinhas */
.hero-blob-group {
  position: relative;
  display: flex;
  justify-content: center;
  align-items: center;
  width: 320px;
  height: 320px;
}

/* Blob Amarelo Pastel Orgânico de Fundo */
.hero-pastel-blob {
  position: absolute;
  width: 280px;
  height: 270px;
  background: #FFF7D6;
  border-radius: 60% 40% 50% 50% / 40% 50% 50% 60%;
  z-index: 1;
  opacity: 0;
  box-shadow: 0 10px 30px rgba(255, 240, 180, 0.3);
  animation: popBlobIn 1s cubic-bezier(0.34, 1.56, 0.64, 1) forwards 0.4s, 
             floatBlob 10s ease-in-out infinite 1.4s;
}

/* Wrapper do Logo */
.hero-logo-wrapper {
  position: relative;
  z-index: 3;
  opacity: 0;
  animation: popLogoIn 0.9s cubic-bezier(0.34, 1.56, 0.64, 1) forwards 0.5s, 
             floatLogo 7s ease-in-out infinite 1.4s;
}

.store-hero-logo-img {
  width: 190px;
  height: 190px;
  border-radius: 50%;
  box-shadow: 0 15px 35px rgba(21, 32, 28, 0.12);
  background: #FFFFFF;
  display: block;
}

/* Nuvenzinhas SVG decorativas */
.hero-cloud {
  position: absolute;
  z-index: 4;
  pointer-events: none;
  filter: drop-shadow(0 8px 12px rgba(21, 32, 28, 0.05));
}

.cloud-top-left {
  top: 10%;
  left: 0%;
  width: 90px;
  opacity: 0;
  animation: popCloudLeftIn 0.8s cubic-bezier(0.34, 1.56, 0.64, 1) forwards 0.6s, 
             floatCloud1 6s ease-in-out infinite 1.4s;
}

.cloud-bottom-right {
  bottom: 12%;
  right: -5%;
  width: 110px;
  opacity: 0;
  animation: popCloudRightIn 0.8s cubic-bezier(0.34, 1.56, 0.64, 1) forwards 0.7s, 
             floatCloud2 8s ease-in-out infinite 1.5s;
}

.cloud-mini {
  top: 25%;
  right: 5%;
  width: 60px;
  opacity: 0;
  animation: popCloudMiniIn 0.8s cubic-bezier(0.34, 1.56, 0.64, 1) forwards 0.8s, 
             floatCloud3 9s ease-in-out infinite 1.6s;
}

/* ==========================================================================
   KEYFRAMES DE ANIMAÇÃO
   ========================================================================== */

/* Entrada Staggered (Fade & Pop) */
@keyframes slideUp {
  from { opacity: 0; transform: translateY(15px); }
  to { opacity: 1; transform: translateY(0); }
}
@keyframes popBlobIn {
  from { opacity: 0; transform: scale(0.8) rotate(-10deg); }
  to { opacity: 0.85; transform: scale(1) rotate(0deg); }
}
@keyframes popLogoIn {
  from { opacity: 0; transform: scale(0.85); }
  to { opacity: 1; transform: scale(1); }
}
@keyframes popCloudLeftIn {
  from { opacity: 0; transform: translate(-20px, 10px); }
  to { opacity: 1; transform: translate(0, 0); }
}
@keyframes popCloudRightIn {
  from { opacity: 0; transform: translate(20px, -10px); }
  to { opacity: 1; transform: translate(0, 0); }
}
@keyframes popCloudMiniIn {
  from { opacity: 0; transform: scale(0.7) translate(10px, -10px); }
  to { opacity: 0.8; transform: scale(1) translate(0, 0); }
}

/* Flutuação Contínua (Loop) */
@keyframes floatLogo {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-8px); }
}
@keyframes floatBlob {
  0%, 100% { transform: scale(1) rotate(0deg); border-radius: 60% 40% 50% 50% / 40% 50% 50% 60%; }
  50% { transform: scale(1.04) rotate(4deg); border-radius: 50% 50% 40% 60% / 50% 40% 60% 50%; }
}
@keyframes floatCloud1 {
  0%, 100% { transform: translate(0, 0); }
  50% { transform: translate(5px, -6px); }
}
@keyframes floatCloud2 {
  0%, 100% { transform: translate(0, 0); }
  50% { transform: translate(-6px, 5px); }
}
@keyframes floatCloud3 {
  0%, 100% { transform: translate(0, 0) scale(1); }
  50% { transform: translate(4px, -4px) scale(0.95); }
}

/* ==========================================================================
   RESPONSIVIDADE MOBILE (Stacked Cozy)
   ========================================================================== */
@media (max-width: 820px) {
  .store-hero-new {
    padding: 36px 24px;
    margin-bottom: var(--s-8);
  }
  .store-hero-content {
    flex-direction: column;
    text-align: center;
    gap: 24px;
  }
  .store-hero-text {
    max-width: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
  }
  .store-hero-title {
    font-size: 32px;
  }
  .store-hero-sub {
    max-width: 100%;
    margin-bottom: var(--s-5);
  }
  .store-hero-visual {
    min-height: 220px;
    width: 100%;
    margin-top: 10px;
  }
  .hero-blob-group {
    width: 260px;
    height: 260px;
  }
  .hero-pastel-blob {
    width: 220px;
    height: 210px;
  }
  .store-hero-logo-img {
    width: 150px;
    height: 150px;
  }
  .cloud-top-left { 
    width: 70px; 
    top: 5%;
  }
  .cloud-bottom-right { 
    width: 85px; 
    bottom: 5%;
    right: -2%;
  }
  .cloud-mini { 
    width: 50px; 
    top: 20%;
  }
}

/* ── Sidebar Layout ── */
.layout-sidebar {
  display: grid;
  grid-template-columns: 240px minmax(0, 1fr);
  gap: var(--s-8);
  align-items: start;
}
.layout-sidebar > * { min-width: 0; }
.quick-filter-chips { min-width: 0; }

.store-sidebar {
  display: flex;
  flex-direction: column;
  gap: var(--s-6);
}

.sidebar-section {
  display: flex;
  flex-direction: column;
  gap: var(--s-3);
}

.sidebar-title {
  font-size: var(--fs-sm);
  font-weight: 700;
  color: var(--text-secondary);
  border-bottom: 1px solid rgba(150, 230, 179,0.1);
  padding-bottom: var(--s-2);
  margin-bottom: var(--s-1);
}

.filters-toggle { display: none; }

@media (max-width: 900px) {
  .layout-sidebar { grid-template-columns: minmax(0, 1fr); }
  .store-sidebar {
    position: fixed;
    top: 0;
    right: 0;
    bottom: 0;
    width: 320px;
    max-width: 90vw;
    z-index: 310;
    background: var(--c-card);
    border-left: 1px solid var(--c-border);
    padding: 20px 20px calc(20px + env(safe-area-inset-bottom));
    overflow-y: auto;
    box-shadow: -12px 0 32px rgba(21, 32, 28,0.35);
    transform: translateX(100%);
    transition: transform 0.25s ease;
    gap: var(--s-5);
  }
  .store-sidebar.open { transform: translateX(0); }
  .store-sidebar-close {
    align-self: flex-end;
    background: transparent;
    border: none;
    color: var(--text-tertiary);
    cursor: pointer;
    padding: var(--s-1);
    display: flex;
    border-radius: var(--r-sm);
  }
  .store-sidebar-close:hover { background: var(--glow-accent-sm); }
  .filters-toggle {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 14px;
    background: rgba(150, 230, 179,0.08);
    border: 1px solid rgba(150, 230, 179,0.28);
    border-radius: var(--r-pill);
    color: var(--c-accent);
    font-family: var(--font-body);
    font-size: var(--fs-sm);
    font-weight: 700;
    cursor: pointer;
  }
  .filters-toggle svg { width: 14px; height: 14px; }
  .filters-toggle-count {
    background: var(--c-accent);
    color: var(--c-bg);
    border-radius: var(--r-pill);
    padding: 1px 6px;
    font-size: var(--fs-xxs);
    line-height: 1.4;
  }
  .filter-popover-body[hidden] { display: block; }
  /* The generic `.filter-toolbar` utility below (see "Compact filter
     toolbar" section) hides plain `.filter-toolbar` elements on mobile —
     but `#filters-form` carries both `.store-sidebar` and `.filter-toolbar`
     so it must still render as the off-canvas drawer here. The two-class
     selector outranks the single-class hide rule regardless of source
     order. */
  .store-sidebar.filter-toolbar { display: flex; }
  /* The pill trigger is a desktop-only affordance (it opens a floating
     popover) — on mobile the popover body renders inline via the rule
     above, so the pill would just be a redundant, inert-looking button
     stacked on top of the section's own title. Hide it to keep the
     mobile drawer identical to what it looked like before this change. */
  .filter-pill[data-filter-popover-trigger] { display: none; }
  /* Home has no "Filtros" button to open an off-canvas drawer, so its
     toolbar can't use the same fixed/translateX drawer as the catalog's
     #filters-form. Override back to an inline, wrapping row instead. */
  #home-filters-form.store-sidebar.filter-toolbar {
    position: static;
    width: auto;
    max-width: none;
    z-index: auto;
    background: transparent;
    border-left: none;
    box-shadow: none;
    transform: none;
    padding: 0;
    overflow: visible;
    flex-direction: row;
    flex-wrap: wrap;
    align-items: center;
    gap: 10px;
    margin-bottom: var(--s-4);
  }
  #home-filters-form .sidebar-section { flex-direction: row; gap: 0; }
}
@media (min-width: 901px) {
  .store-sidebar.filter-toolbar {
    flex-direction: row;
    align-items: center;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: var(--s-4);
  }
  /* flex-direction only affects direct children — #filters-fields sits
     between the form and the .sidebar-section elements, so it must be
     made a flex container itself or the sections just stack inside it. */
  .store-sidebar.filter-toolbar #filters-fields {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 10px;
  }
  .store-sidebar.filter-toolbar .sidebar-section {
    flex-direction: row;
    gap: 0;
  }
  .store-sidebar.filter-toolbar .sidebar-title { display: none; }
  .store-sidebar-close { display: none; }
}

/* ── Listing grid ── */
.listing-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--s-3);
  margin-bottom: var(--s-5);
  flex-wrap: wrap;
}

.listing-filters {
  display: flex;
  align-items: center;
  gap: var(--s-2);
  flex-wrap: wrap;
}

.listing-count {
  font-size: var(--fs-sm);
  color: var(--text-quiet);
  white-space: nowrap;
}

@media (max-width: 640px) {
  .admin-page-header {
    flex-direction: column;
    align-items: stretch;
    gap: var(--s-3);
  }

  .admin-page-header .btn-primary,
  .admin-page-header .btn-secondary,
  .admin-page-header .btn-ghost {
    width: 100%;
    justify-content: center;
  }

  .kpi-grid { grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); }

  .listing-filters { flex-direction: column; align-items: stretch; }
  .listing-filters .form-input,
  .listing-filters .form-select,
  .listing-filters .btn-secondary,
  .listing-filters .btn-ghost { width: 100%; }
  .listing-filters .listing-count { margin-left: 0; }

  .admin-toolbar { padding: var(--s-2) var(--s-3); }
}

.listing-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: var(--s-4);
  min-width: 0;
  align-items: stretch;
}

@media (max-width: 768px) { .listing-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 380px) { .listing-grid { grid-template-columns: minmax(0, 1fr); } }

/* ── Listing card — signature tilt effect ── */
.listing-card {
  background: var(--c-card);
  border: 1px solid rgba(150, 230, 179,0.15);
  border-radius: var(--r-md);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: border-color 0.2s, box-shadow 0.2s;
  transform-style: preserve-3d;
}

.listing-card-link {
  display: flex;
  flex-direction: column;
  color: inherit;
  text-decoration: none;
  flex: 1;
}

.listing-card:hover {
  border-color: var(--text-secondary);
  box-shadow: 0 8px 32px rgba(21, 32, 28,0.4), 0 0 0 1px rgba(150, 230, 179,0.1);
}

.listing-card-image {
  position: relative;
  aspect-ratio: 4 / 5;
  background: var(--c-shadow);
  overflow: hidden;
}

.listing-card-image img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
  transition: transform 0.3s ease;
}

.listing-card:hover .listing-card-image img {
  transform: scale(1.03);
}

.listing-card-image--sealed {
  padding: 12px;
}

.listing-card-image-placeholder {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-secondary);
  font-size: 32px;
}

.listing-card-badges {
  position: absolute;
  top: 8px;
  left: 8px;
  display: flex;
  flex-direction: column;
  gap: var(--s-1);
}

.listing-card-body {
  padding: var(--s-3);
  display: flex;
  flex-direction: column;
  gap: 8px;
  flex: 1;
}
.listing-card-stock-row {
  display: flex;
  align-items: center;
  margin-top: auto;
  padding-top: 4px;
}

.listing-card-name {
  font-family: var(--font-body);
  font-weight: 600;
  font-size: var(--fs-md);
  color: var(--text-primary);
  line-height: 1.3;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.listing-card-meta {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}

.listing-card-footer {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border-top: 1px solid rgba(150, 230, 179,0.08);
  background: rgba(244, 249, 246,0.3);
}
.listing-card-footer > .listing-card-price { margin-right: auto; }
.listing-card-footer > .listing-card-stock { flex-shrink: 0; }

.listing-card-price {
  font-family: var(--font-body);
  font-weight: 800;
  font-size: var(--fs-lg);
  color: var(--c-accent);
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.listing-card-price-discount { display: flex; flex-direction: column; gap: 1px; margin-right: auto; }
.listing-card-price-strike { text-decoration: line-through; font-size: var(--fs-xxs); color: var(--text-quiet); line-height: 1.2; }
.listing-card-price--sale { color: var(--c-accent); }
.listing-card-stock-count { font-size: var(--fs-xxs); color: var(--text-quiet); }

.listing-card-add {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  padding: 0;
  border-radius: var(--r-pill);
  background: var(--c-accent);
  color: var(--c-bg);
  border: none;
  cursor: pointer;
  line-height: 1;
  flex-shrink: 0;
  text-decoration: none;
  transition: transform 0.15s ease, box-shadow 0.15s ease, background 0.15s ease;
}
.listing-card-add svg { display: block; }
.listing-card-add:hover {
  transform: translateY(-1px) scale(1.06);
  box-shadow: 0 4px 14px var(--glow-accent);
}
.listing-card-add:active { transform: scale(0.96); }

/* ── Stock chip on grid card footer ── */
.listing-card-stock {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 3px 8px;
  border-radius: var(--r-pill);
  font-size: var(--fs-xxs);
  font-weight: 700;
  letter-spacing: 0.03em;
  background: rgba(90, 117, 102, 0.08);
  color: var(--text-tertiary);
  border: 1px solid rgba(90, 117, 102, 0.15);
  white-space: nowrap;
  line-height: 1;
  flex-shrink: 0;
  font-variant-numeric: tabular-nums;
}
.listing-card-stock.last {
  background: rgba(255, 112, 112, 0.1);
  color: var(--c-sold-fg);
  border-color: rgba(255, 112, 112, 0.25);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  padding: 4px 10px;
  font-size: 9px;
}
/* ── Video link — now in footer, next to add button ── */
.listing-card-video {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border-radius: var(--r-pill);
  background: transparent;
  color: var(--text-secondary);
  text-decoration: none;
  border: 1px solid rgba(90, 117, 102, 0.22);
  flex-shrink: 0;
  transition: color 0.15s, border-color 0.15s, background 0.15s;
}
.listing-card-video svg { display: block; margin-left: 1px; }
.listing-card-video:hover {
  background: var(--c-accent);
  color: var(--c-bg);
  border-color: var(--c-accent);
  transform: scale(1.08);
}

@media (hover: none) {
  .listing-grid { gap: var(--s-3); }
}

/* ── Product detail ── */
.product-detail {
  display: grid;
  grid-template-columns: minmax(340px, 400px) 1fr;
  gap: var(--s-8);
  align-items: start;
  max-width: 1100px;
  margin: 0 auto;
}

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

.product-card-image {
  aspect-ratio: 5 / 7;
  border-radius: var(--r-md);
  overflow: hidden;
  background: var(--c-shadow);
  box-shadow: 0 16px 48px rgba(21, 32, 28,0.5), 0 0 0 1px rgba(150, 230, 179,0.1);
}

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

.product-info { display: flex; flex-direction: column; gap: var(--s-5); }

.product-price-block {
  display: flex;
  align-items: baseline;
  gap: var(--s-2);
}

.product-price-main {
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: var(--fs-h2);
  color: var(--c-accent);
  font-variant-numeric: tabular-nums;
  line-height: 1.1;
}

.product-price-label {
  font-size: var(--fs-sm);
  color: var(--text-quiet);
}

.cart-layout {
  display: grid;
  grid-template-columns: 1fr 320px;
  gap: var(--s-6);
  align-items: start;
}

@media (max-width: 900px) {
  .cart-layout { grid-template-columns: 1fr; }
}

/* ── Qty Stepper ── */
.qty-stepper {
  display: inline-flex;
  align-items: center;
  background: rgba(244, 249, 246,0.6);
  border: 1px solid rgba(150, 230, 179,0.25);
  border-radius: var(--r-sm);
  overflow: hidden;
}
.qty-stepper-btn {
  background: transparent;
  border: none;
  color: var(--c-accent);
  padding: 8px 12px;
  font-size: var(--fs-lg);
  cursor: pointer;
  transition: background 0.15s;
}
.qty-stepper-btn:hover { background: rgba(150, 230, 179,0.1); }
.qty-stepper-input {
  width: 48px;
  text-align: center;
  background: transparent;
  color: var(--text-primary);
  border: none;
  font-family: var(--font-body);
  font-size: var(--fs-body);
  outline: none;
}
/* Hide arrows in input[type=number] */
.qty-stepper-input::-webkit-outer-spin-button,
.qty-stepper-input::-webkit-inner-spin-button {
  -webkit-appearance: none; margin: 0;
}
.qty-stepper-input[type=number] { -moz-appearance: textfield; }

/* ── Cart ── */
.cart-item {
  display: grid;
  grid-template-columns: 88px 1fr auto;
  gap: 16px;
  align-items: start;
  padding: 20px 0;
  border-bottom: 1px solid rgba(150, 230, 179,0.08);
}

@media (max-width: 640px) {
  .cart-item {
    grid-template-columns: 72px 1fr;
    grid-template-areas:
      "img   body"
      "img   actions";
    gap: 12px 14px;
    padding: 16px 0;
  }
  .cart-item > .cart-item-image { grid-area: img; }
  .cart-item > .cart-item-body   { grid-area: body; }
  .cart-item > .cart-item-actions{ grid-area: actions; align-self: end; }
}

.cart-item-image {
  aspect-ratio: 5 / 7;
  border-radius: var(--r-sm);
  overflow: hidden;
  background: var(--c-shadow);
}

.cart-item-image img { width: 100%; height: 100%; object-fit: cover; }

.cart-item-actions {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 10px;
}
.cart-item-price {
  font-family: var(--font-body);
  font-weight: 800;
  font-size: var(--fs-lg);
  color: var(--c-accent);
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
  line-height: 1.1;
}
.cart-item-remove {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  background: transparent;
  color: var(--text-tertiary);
  border: 1px solid rgba(255,112,112,0.18);
  border-radius: var(--r-sm);
  cursor: pointer;
  transition: color 0.15s, border-color 0.15s;
}
.cart-item-remove:hover { color: var(--c-sold-fg); border-color: var(--c-sold-fg); }
.cart-item-remove svg { display: block; width: 16px; height: 16px; }

.cart-summary {
  background: var(--c-card);
  border: 1px solid rgba(150, 230, 179,0.15);
  border-radius: var(--r-md);
  padding: var(--s-5);
}

.cart-summary-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 8px 0;
  font-size: var(--fs-md);
}

.cart-summary-row.total {
  border-top: 1px solid rgba(150, 230, 179,0.15);
  margin-top: var(--s-2);
  padding-top: var(--s-4);
  font-weight: 700;
  font-size: var(--fs-lg);
}
.cart-summary-row.total .price {
  font-family: var(--font-heading);
  font-size: var(--fs-h3);
  color: var(--c-accent);
  font-variant-numeric: tabular-nums;
  line-height: 1.1;
}

/* ── Utility ── */
.text-accent  { color: var(--c-accent); }
.text-mint    { color: var(--text-tertiary); }
.text-muted   { color: var(--text-secondary); }
.text-danger  { color: var(--c-sold-fg); }

.divider { border: none; border-top: 1px solid rgba(150, 230, 179,0.1); margin: 20px 0; }

.empty-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: var(--s-3);
  padding: 48px 20px;
  color: var(--text-tertiary);
  text-align: center;
}

.empty-state--compact { padding: 24px 20px; }

.empty-state-icon { font-size: 40px; opacity: 0.4; display: flex; align-items: center; justify-content: center; }

.empty-state-title {
  font-family: var(--font-heading);
  font-weight: 800;
  font-size: var(--fs-xl);
  color: var(--text-secondary);
}

.empty-state-text { font-size: var(--fs-md); max-width: 280px; }

/* ── Card search results ── */
.search-results {
  display: flex;
  flex-direction: column;
  gap: 2px;
  max-height: 240px;
  overflow-y: auto;
  border: 1px solid rgba(150, 230, 179,0.2);
  border-radius: var(--r-sm);
  background: var(--c-shadow);
}

.search-result-item {
  padding: 8px 12px;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: var(--s-2);
  transition: background 0.1s;
  font-size: var(--fs-md);
  border-bottom: 1px solid rgba(150, 230, 179,0.06);
}
.search-result-item:last-child { border-bottom: none; }
.search-result-item:hover { background: rgba(150, 230, 179,0.1); }
.search-result-item.selected { background: rgba(150, 230, 179,0.15); }
.search-result-thumb {
  width: 30px;
  height: 42px;
  object-fit: cover;
  border-radius: 3px;
  border: 1px solid var(--c-border);
  flex-shrink: 0;
  background: var(--c-bg);
}

.tag-row {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: var(--s-5);
  padding-bottom: var(--s-1);
}

/* ── Pagination / tags filter ── */
.tag-filter {
  display: inline-flex;
  align-items: center;
  padding: 5px 12px;
  background: rgba(90, 117, 102,0.07);
  color: var(--text-tertiary);
  border: 1px solid rgba(90, 117, 102,0.15);
  border-radius: var(--r-pill);
  font-size: var(--fs-sm);
  font-weight: 600;
  cursor: pointer;
  text-decoration: none;
  transition: background 0.12s, border-color 0.12s, color 0.12s;
  white-space: nowrap;
}
.tag-filter:hover,
.tag-filter.active {
  background: rgba(150, 230, 179,0.15);
  border-color: var(--c-accent);
  color: var(--c-accent);
}

/* ── Notification / toast ── */
.toast {
  position: fixed;
  bottom: 24px;
  right: 24px;
  background: var(--c-card);
  border: 1px solid rgba(150, 230, 179,0.3);
  border-radius: var(--r-md);
  padding: 14px 18px;
  font-size: var(--fs-md);
  color: var(--text-primary);
  box-shadow: 0 8px 24px rgba(21, 32, 28,0.4);
  z-index: 1000;
  display: flex;
  align-items: center;
  gap: 10px;
}

.toast-accent { border-color: var(--c-accent); }
.toast-accent::before {
  content: '';
  width: 4px;
  height: 100%;
  position: absolute;
  left: 0;
  top: 0;
  background: var(--c-accent);
  border-radius: var(--r-sm) 0 0 4px;
}

/* ── Holographic hover effect on card image ── */
.listing-card-image::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(
    135deg,
    rgba(255,255,255,0) 0%,
    rgba(90, 117, 102,0.08) 20%,
    rgba(150, 230, 179,0.12) 30%,
    rgba(100,200,255,0.08) 45%,
    rgba(200,100,255,0.06) 60%,
    rgba(255,200,50,0.07) 75%,
    rgba(255,255,255,0) 100%
  );
  opacity: 0;
  transition: opacity 0.25s;
  pointer-events: none;
  mix-blend-mode: screen;
}
.listing-card:hover .listing-card-image::after {
  opacity: 1;
}

/* ── WhatsApp callout (checkout) ── */
.callout-whatsapp {
  display: flex;
  align-items: flex-start;
  gap: var(--s-3);
  padding: 14px 16px;
  background: rgba(150, 230, 179, 0.05);
  border-left: 3px solid var(--c-accent);
  border-radius: 0 var(--r-sm) var(--r-sm) 0;
  margin-top: var(--s-4);
  color: var(--c-accent);
}
.callout-whatsapp svg { flex-shrink: 0; margin-top: 2px; }
.callout-whatsapp strong {
  font-size: var(--fs-md);
  color: var(--c-accent);
  display: block;
  margin-bottom: var(--s-1);
}
.callout-whatsapp p {
  font-size: var(--fs-sm);
  color: var(--text-quiet);
  line-height: 1.5;
}

/* ── Card placeholder SVG ── */
.card-placeholder {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 12%;
}
.card-placeholder svg { width: 100%; height: auto; max-height: 100%; }

/* ── Image loading fade ── */
.listing-card-img,
.product-img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
  opacity: 0;
  transition: opacity 0.25s, transform 0.3s ease;
}
.listing-card-img.loaded,
.product-img.loaded { opacity: 1; }
.listing-card:hover .listing-card-img.loaded { transform: scale(1.03); }

/* ── Skeleton loader ── */
.skeleton-grid {
  display: none;
  grid-template-columns: repeat(4, 1fr);
  gap: var(--s-4);
  margin-top: var(--s-4);
}
.htmx-request .skeleton-grid,
.htmx-request.skeleton-grid { display: grid; }
.htmx-request #listing-grid { opacity: 0.4; transition: opacity 0.15s; }

.skeleton-card {
  background: var(--c-card);
  border: 1px solid var(--c-border);
  border-radius: var(--r-md);
  overflow: hidden;
}
.skeleton-image {
  aspect-ratio: 5 / 7;
  background: linear-gradient(90deg,
    rgba(150, 230, 179,0.05) 0%,
    rgba(150, 230, 179,0.10) 50%,
    rgba(150, 230, 179,0.05) 100%);
  background-size: 200% 100%;
  animation: shimmer 1.4s infinite;
}
.skeleton-line {
  height: 10px;
  border-radius: var(--r-sm);
  margin: 10px 12px;
  background: linear-gradient(90deg,
    rgba(150, 230, 179,0.05) 0%,
    rgba(150, 230, 179,0.10) 50%,
    rgba(150, 230, 179,0.05) 100%);
  background-size: 200% 100%;
  animation: shimmer 1.4s infinite;
}
.skeleton-line.short { width: 40%; }
@keyframes shimmer {
  0%   { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}
@media (max-width: 1100px) { .skeleton-grid { grid-template-columns: repeat(3, 1fr); } }
@media (max-width: 768px)  { .skeleton-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 480px)  { .skeleton-grid { grid-template-columns: 1fr; } }

/* ── Filter chips ── */
.filter-chip-group {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}
.filter-chip-group .filter-chip-label {
  font-size: var(--fs-xs);
  color: var(--text-quiet);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-right: var(--s-1);
  font-weight: 700;
}
.filter-chip {
  display: inline-flex;
  align-items: center;
  padding: 6px 14px;
  background: rgba(244, 249, 246, 0.6);
  border: 1px solid var(--c-border);
  border-radius: var(--r-pill);
  font-size: var(--fs-sm);
  font-weight: 600;
  color: var(--text-tertiary);
  cursor: pointer;
  transition: background 0.15s, border-color 0.15s, color 0.15s;
  white-space: nowrap;
  user-select: none;
}
.filter-chip:hover { border-color: var(--c-accent); color: var(--text-primary); }
.filter-chip input {
  position: absolute;
  opacity: 0;
  width: 0;
  height: 0;
  pointer-events: none;
}
.filter-chip:has(input:checked) {
  background: var(--glow-accent);
  border-color: var(--c-accent);
  color: var(--text-primary);
}

/* ── Mobile bottom nav ── */
.mobile-nav { display: none; }
@media (max-width: 640px) {
  .mobile-nav {
    display: flex;
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 200;
    background: rgba(255, 255, 255,0.96);
    backdrop-filter: blur(12px);
    border-top: 1px solid var(--c-border);
    padding: 8px 0 env(safe-area-inset-bottom);
  }
  .mobile-nav-item {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: var(--s-1);
    padding: 6px;
    color: var(--text-quiet);
    text-decoration: none;
    font-size: var(--fs-xxs);
    font-weight: 700;
    font-family: inherit;
    position: relative;
    min-height: 44px;
    justify-content: center;
    /* Button reset (Filtros trigger is a <button>) */
    background: transparent;
    border: none;
    cursor: pointer;
    -webkit-appearance: none;
    appearance: none;
  }
  .mobile-nav-item:focus-visible {
    outline: 2px solid var(--c-accent);
    outline-offset: -4px;
    border-radius: var(--r-sm);
  }
  .mobile-nav-item svg { width: 20px; height: 20px; }
  .mobile-nav-item.active { color: var(--c-accent); }
  .mobile-nav-count {
    position: absolute;
    top: 2px;
    right: calc(50% - 22px);
    min-width: 16px;
    height: 16px;
    padding: 0 4px;
    background: var(--c-accent);
    color: var(--c-bg);
    font-size: var(--fs-xxs);
    font-weight: 800;
    border-radius: var(--r-pill);
    display: none;
    align-items: center;
    justify-content: center;
    line-height: 1;
  }
  .store-main { padding-bottom: calc(80px + env(safe-area-inset-bottom)); }
  .store-footer { padding-bottom: calc(80px + env(safe-area-inset-bottom)); }
}

/* ── Mini-cart drawer ── */
.drawer-overlay {
  position: fixed;
  inset: 0;
  background: rgba(21, 32, 28,0.5);
  z-index: 300;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s;
}
.drawer-overlay.open { opacity: 1; pointer-events: auto; }

.mini-cart {
  position: fixed;
  top: 0;
  right: 0;
  bottom: 0;
  width: 360px;
  max-width: 100vw;
  background: var(--c-card);
  border-left: 1px solid var(--c-border);
  z-index: 310;
  transform: translateX(100%);
  transition: transform 0.25s ease;
  display: flex;
  flex-direction: column;
  box-shadow: -12px 0 32px rgba(21, 32, 28,0.35);
}
.mini-cart.open { transform: translateX(0); }
.mini-cart-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 20px;
  border-bottom: 1px solid var(--c-border);
}
.mini-cart-title {
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: var(--fs-lg);
  color: var(--text-primary);
}
.mini-cart-close {
  background: transparent;
  border: none;
  color: var(--text-tertiary);
  cursor: pointer;
  padding: var(--s-1);
  border-radius: var(--r-sm);
  display: flex;
}
.mini-cart-close:hover { background: var(--glow-accent-sm); }
.mini-cart-body {
  flex: 1;
  overflow-y: auto;
  padding: 16px 20px;
  display: flex;
  flex-direction: column;
  gap: var(--s-3);
}
.mini-cart-item {
  display: flex;
  gap: 10px;
  align-items: center;
  font-size: var(--fs-md);
}
.mini-cart-item-thumb {
  width: 40px;
  height: 56px;
  border-radius: var(--r-sm);
  background: var(--c-shadow);
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}
.mini-cart-item-thumb img { width: 100%; height: 100%; object-fit: cover; }
.mini-cart-item-name { flex: 1; color: var(--text-primary); }
.mini-cart-item-qty { color: var(--text-quiet); font-size: var(--fs-sm); }
.mini-cart-item-price { color: var(--c-accent); font-variant-numeric: tabular-nums; }
.mini-cart-footer {
  border-top: 1px solid var(--c-border);
  padding: 16px 20px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.mini-cart-total {
  display: flex;
  justify-content: space-between;
  font-size: var(--fs-body);
  color: var(--text-primary);
  font-weight: 700;
}
.mini-cart-total span:last-child { color: var(--c-accent); font-variant-numeric: tabular-nums; }
.mini-cart-empty {
  text-align: center;
  padding: 40px 20px;
  color: var(--text-quiet);
  font-size: var(--fs-md);
}

/* ── Success state ── */
.success-icon {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  background: rgba(150, 230, 179,0.12);
  border: 2px solid var(--c-accent);
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 20px;
  animation: pop-in 0.3s cubic-bezier(0.34,1.56,0.64,1);
}
.success-icon svg { width: 32px; height: 32px; }
.check-stroke {
  stroke-dasharray: 24;
  stroke-dashoffset: 24;
  animation: draw-check 0.4s ease forwards 0.2s;
}
@keyframes pop-in {
  from { transform: scale(0.6); opacity: 0; }
  to   { transform: scale(1);   opacity: 1; }
}
@keyframes draw-check { to { stroke-dashoffset: 0; } }

/* ── Two-column footer ── */
.store-footer {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--s-6);
  align-items: start;
  padding: 32px 28px 40px;
  border-top: 1px solid rgba(150, 230, 179,0.1);
}
.store-footer-brand-block { display: flex; flex-direction: column; gap: 6px; }
.store-footer-tag {
  color: var(--text-quiet);
  font-size: var(--fs-sm);
  max-width: 220px;
  line-height: 1.5;
}
.store-footer-copy {
  color: var(--text-quiet);
  font-size: var(--fs-xs);
  margin-top: var(--s-3);
}
.store-footer-nav {
  display: flex;
  flex-direction: column;
  gap: var(--s-2);
  justify-self: end;
  text-align: right;
}
.store-footer-nav-label {
  font-size: var(--fs-xs);
  font-weight: 700;
  color: var(--text-tertiary);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-bottom: var(--s-1);
}
.store-footer-nav a {
  color: var(--text-tertiary);
  text-decoration: none;
  font-size: var(--fs-md);
  transition: color 0.15s;
}
.store-footer-nav a:hover { color: var(--c-accent); }
@media (max-width: 640px) {
  .store-footer { grid-template-columns: 1fr; padding-bottom: calc(80px + env(safe-area-inset-bottom)); }
  .store-footer-nav { justify-self: start; text-align: left; }
}

/* ── Accessibility ── */
:focus-visible {
  outline: 2px solid var(--c-accent);
  outline-offset: 2px;
  border-radius: var(--r-sm);
}
.visually-hidden {
  position: absolute !important;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0,0,0,0);
  white-space: nowrap; border: 0;
}
.skip-link {
  position: absolute;
  left: 12px;
  top: 12px;
  padding: 8px 12px;
  background: var(--c-accent);
  color: var(--c-bg);
  font-weight: 700;
  font-size: var(--fs-md);
  border-radius: var(--r-sm);
  text-decoration: none;
  z-index: 1000;
  transform: translateY(-200%);
  transition: transform 0.15s;
}
.skip-link:focus { transform: translateY(0); }

/* ── Utilities (extraídas dos inline styles) ── */
.page-back { display: inline-flex; margin-bottom: var(--s-4); font-size: var(--fs-md); padding: 4px 0; border: none; }
.page-title { font-size: var(--fs-h2); margin-bottom: var(--s-6); }

/* Stacked children (adjacent sibling gap) */
.stack-sm > * + * { margin-top: var(--s-2); }
.stack-md > * + * { margin-top: var(--s-3); }
.stack-lg > * + * { margin-top: var(--s-5); }

/* Margin-top (values suffix in px) */
.mt-4   { margin-top: var(--s-1); }
.mt-8   { margin-top: var(--s-2); }
.mt-12  { margin-top: var(--s-3); }
.mt-16  { margin-top: var(--s-4); }
.mt-20  { margin-top: var(--s-5); }
.mt-24  { margin-top: var(--s-6); }
.mt-32  { margin-top: var(--s-8); }

/* Margin-bottom */
.mb-4   { margin-bottom: var(--s-1); }
.mb-6   { margin-bottom: 6px; } /* legacy — use mb-4 or mb-8 */
.mb-8   { margin-bottom: var(--s-2); }
.mb-12  { margin-bottom: var(--s-3); }
.mb-16  { margin-bottom: var(--s-4); }
.mb-20  { margin-bottom: var(--s-5); }
.mb-24  { margin-bottom: var(--s-6); }
.mb-32  { margin-bottom: var(--s-8); }

/* Padding */
.p-8    { padding: var(--s-2); }
.p-12   { padding: var(--s-3); }
.p-16   { padding: var(--s-4); }
.p-20   { padding: var(--s-5); }
.p-24   { padding: var(--s-6); }
.py-8   { padding-top: var(--s-2); padding-bottom: var(--s-2); }
.py-12  { padding-top: var(--s-3); padding-bottom: var(--s-3); }
.py-16  { padding-top: var(--s-4); padding-bottom: var(--s-4); }
.px-8   { padding-left: var(--s-2); padding-right: var(--s-2); }
.px-12  { padding-left: var(--s-3); padding-right: var(--s-3); }
.px-16  { padding-left: var(--s-4); padding-right: var(--s-4); }

/* Width */
.w-full { width: 100%; }
.w-auto { width: auto; }

/* Text */
.text-11 { font-size: var(--fs-xs); }
.text-12 { font-size: var(--fs-sm); }
.text-13 { font-size: var(--fs-md); }
.text-14 { font-size: var(--fs-body); }
.text-16 { font-size: var(--fs-lg); }
.text-center { text-align: center; }
.text-right { text-align: right; }
.fw-bold { font-weight: 700; }
.text-ellipsis { max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* Flex/grid */
.row { display: flex; align-items: center; gap: var(--s-2); }
.row-wrap { display: flex; align-items: center; gap: var(--s-2); flex-wrap: wrap; }
.row-between { display: flex; align-items: center; justify-content: space-between; gap: var(--s-3); }
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: var(--s-3); }
.grid-2-lg { display: grid; grid-template-columns: 1fr 1fr; gap: var(--s-5); }
.grid-checkout { display: grid; grid-template-columns: 1fr 140px; gap: var(--s-3); }
.admin-detail-grid { display: grid; grid-template-columns: 1fr minmax(0, 320px); gap: var(--s-5); align-items: start; }
@media (max-width: 900px) { .admin-detail-grid { grid-template-columns: 1fr; } }

.admin-edit-grid {
  display: grid;
  grid-template-columns: minmax(0, 480px) minmax(0, 480px);
  gap: 20px;
  align-items: start;
}
@media (max-width: 900px) {
  .admin-edit-grid { grid-template-columns: 1fr; }
}

.admin-form-actions {
  display: flex;
  gap: var(--s-2);
  justify-content: flex-end;
  margin-top: var(--s-2);
}
@media (max-width: 640px) {
  .admin-form-actions {
    flex-direction: column-reverse;
  }
  .admin-form-actions .btn-primary,
  .admin-form-actions .btn-ghost {
    width: 100%;
    justify-content: center;
    padding: 10px;
  }
}

.admin-photo-upload-form {
  display: flex;
  gap: var(--s-2);
  align-items: center;
}
@media (max-width: 640px) {
  .admin-photo-upload-form {
    flex-direction: column;
    align-items: stretch;
  }
  .admin-photo-upload-form .btn-secondary {
    width: 100%;
    justify-content: center;
  }
}
.col-span-2 { grid-column: 1 / -1; }
.qty-input { width: 80px; text-align: center; }
.qty-input-sm { width: 72px; padding: 6px 8px; text-align: center; }
.uppercase-label {
  font-size: var(--fs-sm);
  color: var(--text-quiet);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin-bottom: var(--s-1);
}
.eyebrow { font-size: var(--fs-sm); color: var(--text-quiet); }
.section-title { font-size: var(--fs-h1); line-height: 1.2; margin-bottom: var(--s-3); }
.confirm-container { max-width: 560px; margin: 40px auto; }
.confirm-header { text-align: center; margin-bottom: var(--s-8); }
.confirm-title { font-size: var(--fs-h2); margin-bottom: 6px; }
.order-id { font-family: monospace; font-size: var(--fs-sm); }
.divider-row { border-bottom: 1px solid rgba(150, 230, 179,0.08); padding-bottom: var(--s-3); margin-bottom: var(--s-2); }
.form-hint { font-size: var(--fs-xs); margin-top: var(--s-3); line-height: 1.5; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition: none !important; animation: none !important; }
}

.border-accent { border-color: var(--text-secondary); }
.font-heading { font-family: var(--font-heading); }


/* ─── Admin order/detail ─── */
.col-thumb { width: 44px; }
.order-item-thumb {
  height: 44px;
  border-radius: var(--r-sm);
  background: var(--c-shadow);
}
.order-total-row {
  display: flex;
  justify-content: flex-end;
  padding-top: var(--s-4);
  margin-top: var(--s-2);
  border-top: 1px solid rgba(150, 230, 179,0.08);
}
.order-total-value { font-size: var(--fs-h3); }
.address-block { font-size: var(--fs-md); line-height: 1.6; }
.lh-relaxed { line-height: 1.6; }

/* ─── Admin manual sale ─── */
.form-group-tight { margin: 0; }
.sticky-sidebar { position: sticky; top: var(--s-5); }
.manual-item-row {
  display: grid;
  grid-template-columns: 1fr 80px 120px 32px;
  gap: var(--s-2);
  margin-bottom: var(--s-2);
  align-items: end;
}
.manual-item-row .form-input.tight { padding: var(--s-2); }
.manual-item-row-wrap { margin-bottom: var(--s-3); }
.manual-item-row-wrap .manual-item-row { margin-bottom: 0; }
.manual-item-pricing {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--s-2);
  padding: var(--s-1) 0 0 var(--s-2);
  font-size: var(--fs-sm);
  color: var(--c-nodata);
}
.manual-pricing-facts { white-space: normal; }
.manual-target-margin {
  display: flex;
  align-items: center;
  gap: var(--s-1);
}
.manual-target-margin .form-input { width: 64px; }
.manual-item-row .form-input.is-ok           { border-color: var(--c-profit); }
.manual-item-row .form-input.is-below_target { border-color: var(--c-thin); }
.manual-item-row .form-input.is-loss         { border-color: var(--c-loss); }
.manual-item-row .form-input.is-nocost       { border-color: var(--c-nodata); }
.summary-line-name {
  font-size: var(--fs-sm);
  max-width: 180px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.summary-line-value { font-size: var(--fs-md); }
.summary-empty { font-size: var(--fs-sm); }
.btn-remove-row { color: var(--c-sold-fg); }

.manual-warn-thin { color: var(--c-thin); }
.manual-warn-loss { color: var(--c-loss); }
.manual-profit-negative { color: var(--c-loss); }
.manual-mobile-bar { display: none; }

/* A barra inferior do admin (.admin-bottom-nav, kaeru.css:475-492) aparece a
   900px, é `position: fixed; bottom: 0; z-index: 200` e tem altura definida
   pelo conteúdo mais `env(safe-area-inset-bottom)` — não existe token de
   altura. Por isso o offset vem de --manual-bar-offset, medido em JS no
   Step 4b. O fallback de 56px só vale até a primeira medição. */
@media (max-width: 900px) {
  .manual-mobile-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: fixed;
    left: 0;
    right: 0;
    bottom: var(--manual-bar-offset, 56px);
    padding: var(--s-2) var(--s-4);
    background: var(--c-surface);
    border-top: 1px solid var(--c-border);
    z-index: 190;  /* abaixo da .admin-bottom-nav (200), acima do conteúdo */
  }
  .manual-item-row {
    grid-template-columns: 1fr 64px 100px 32px;
  }
  #order-summary { padding-bottom: var(--s-6); }
}

/* ─── Admin purchase form ─── */
.purchase-header-grid {
  display: flex;
  flex-wrap: wrap;
  gap: var(--s-3);
}
.purchase-header-grid > * {
  min-width: 160px;
  flex: 1;
}
.purchase-items-table {
  width: 100%;
  border-collapse: collapse;
  min-width: 620px;
}

.purchase-items-table th {
  padding: 10px 12px;
  text-align: left;
  font-size: 11px;
  font-weight: 700;
  color: var(--text-quiet);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  border-bottom: 1px solid var(--c-border);
}

.purchase-items-table td {
  padding: 10px 12px;
  vertical-align: middle;
  border-bottom: 1px solid rgba(150, 230, 179, 0.08);
}

.purchase-items-table tbody tr:hover td {
  background: rgba(39, 197, 113, 0.03);
}

.listing-mode-toggle { display: inline-flex; border: 1px solid var(--c-border, #444); border-radius: 6px; overflow: hidden; }
.listing-mode-toggle .mode-btn { padding: 4px 10px; font-size: 12px; background: transparent; border: none; cursor: pointer; color: var(--text-quiet, #999); }
.listing-mode-toggle .mode-btn.active { background: var(--c-accent, #27C571); color: #052e16; font-weight: 600; }

/* ─── Responsive item-row grids (box openings, trades) ─── */
.card-row, .box-row, .trade-row-out, .trade-row-in {
  display: grid;
  gap: 8px;
  align-items: center;
}
.card-row { grid-template-columns: minmax(0,1fr) 80px 80px 80px 32px; min-width: 545px; }
.box-row { grid-template-columns: minmax(0,1fr) 90px 32px; min-width: 400px; }
.trade-row-out { grid-template-columns: minmax(0,1fr) 90px 70px 110px 180px 32px; min-width: 620px; }
.trade-row-in { grid-template-columns: minmax(0,1fr) 90px 70px 110px 32px; min-width: 540px; }
.row-header { margin-bottom: 4px; padding-bottom: 6px; border-bottom: 1px solid var(--c-border); }
.row-item { margin-bottom: 8px; }

@media (max-width: 640px) {
  .purchase-items-table { min-width: 0; }
  .purchase-items-table td { padding: var(--s-1) 0; border-bottom: none; }

  .card-row, .box-row, .trade-row-out, .trade-row-in { min-width: 0; }
  .row-header { display: none; }
  .row-item.card-row, .row-item.box-row, .row-item.trade-row-out, .row-item.trade-row-in {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: var(--s-2);
    margin-bottom: var(--s-3);
    border: 1px solid var(--c-border);
    border-radius: var(--r-sm);
    padding: var(--s-3);
    background: var(--c-card);
  }
  .row-item [data-label]::before {
    content: attr(data-label);
    display: block;
    font-size: var(--fs-xs);
    font-weight: 700;
    color: var(--text-quiet);
    text-transform: uppercase;
    letter-spacing: 0.06em;
    margin-bottom: 2px;
  }
  .row-item .row-remove-btn { align-self: flex-end; }
}

.purchase-totals-row {
  display: flex;
  align-items: flex-end;
  flex-wrap: wrap;
  gap: var(--s-3);
  margin-top: var(--s-3);
  padding-top: var(--s-3);
  border-top: 1px solid var(--c-border);
}
.purchase-totals-row > .form-group {
  flex: 1;
  min-width: 140px;
}
.purchase-totals-row > button {
  flex-shrink: 0;
}

.row-end {
  display: flex;
  justify-content: flex-end;
  align-items: center;
  flex-wrap: wrap;
  gap: var(--s-2);
}
@media (max-width: 600px) {
  .row-end {
    flex-direction: column-reverse;
    align-items: stretch;
    gap: var(--s-2);
  }
  .row-end > * {
    width: 100% !important;
    text-align: center;
  }
}
.picked-card-name {
  font-weight: 600;
  max-width: 220px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  display: inline-block;
  vertical-align: middle;
}
.card-name-truncate {
  display: inline-block;
  max-width: 180px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  vertical-align: middle;
}
.picked-card-actions { margin-left: auto; padding: 2px 6px; font-size: var(--fs-xs); }
.card-result-anchor { position: relative; }
.btn-primary-inline { width: auto; padding: 10px 28px; }
.btn-remove-inline { padding: var(--s-2); }

/* ─── Admin simulations form ─── */
.sim-item-table-wrap { overflow-x: auto; }
.sim-item-header-row {
  display: flex;
  flex-wrap: nowrap;
  align-items: center;
  gap: var(--s-2);
  padding-bottom: 6px;
  margin-bottom: 4px;
  border-bottom: 1px solid var(--c-border);
  min-width: max-content;
}
.sim-item-row {
  display: flex;
  align-items: center;
  flex-wrap: nowrap;
  gap: var(--s-2);
  padding: var(--s-2) 0;
  border-bottom: 1px solid var(--c-border);
  min-width: max-content;
}
.sim-item-card { flex: 1; min-width: 220px; }
.sim-item-condition { width: 80px; flex-shrink: 0; }
.sim-liga-cell, .sim-store-cell { width: 100px; flex-shrink: 0; min-width: 0; }
.sim-store-cells, .sim-store-header-cells { display: flex; flex-wrap: nowrap; gap: var(--s-2); min-width: 0; }
.sim-store-label {
  display: block;
  width: 100%;
  font-size: var(--fs-xs);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

@media (max-width: 640px) {
  .sim-item-table-wrap { overflow-x: visible; }
  .sim-item-header-row { display: none; }
  .sim-item-row {
    flex-direction: column;
    align-items: stretch;
    flex-wrap: wrap;
    min-width: 0;
    gap: var(--s-2);
    border: 1px solid var(--c-border);
    border-radius: var(--r-sm);
    padding: var(--s-3);
    margin-bottom: var(--s-3);
    background: var(--c-card);
  }
  .sim-item-card, .sim-item-condition, .sim-liga-cell, .sim-store-cells, .sim-store-cell {
    width: 100%;
    min-width: 0;
    flex: none;
  }
  .sim-store-cells { display: flex; flex-direction: column; gap: var(--s-2); }
  .sim-item-row [data-label]::before {
    content: attr(data-label);
    display: block;
    font-size: var(--fs-xs);
    font-weight: 700;
    color: var(--text-quiet);
    text-transform: uppercase;
    letter-spacing: 0.06em;
    margin-bottom: 2px;
  }
  .sim-item-row .btn-remove-inline { align-self: flex-end; }
}

.store-picker {
  position: relative;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
  padding: 8px 10px;
  border: 1px solid var(--c-border);
  border-radius: var(--r-sm);
  background: var(--c-bg-subtle, transparent);
}
.store-picker:focus-within { border-color: var(--c-accent); }
.store-picker-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.store-chip {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  background: rgba(39,197,113,0.12);
  color: var(--c-accent);
  padding: 4px 8px 4px 10px;
  border-radius: 999px;
  font-size: var(--fs-sm);
  font-weight: 600;
  white-space: nowrap;
}
.store-chip-remove {
  background: none;
  border: none;
  cursor: pointer;
  color: inherit;
  padding: 0 0 0 2px;
  line-height: 1;
  font-size: 14px;
}
.store-picker-search {
  flex: 1;
  min-width: 140px;
  border: none;
  background: transparent;
  padding: 4px 2px;
  font-size: var(--fs-md);
  color: var(--text-primary);
  outline: none;
}
.store-picker-list {
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  z-index: 50;
  margin-top: 4px;
  background: var(--c-surface);
  border: 1px solid rgba(150, 230, 179,0.2);
  border-radius: var(--r-sm);
  box-shadow: 0 12px 32px -12px rgba(21,32,28,0.25);
  overflow: hidden;
}
.store-picker-list .search-results {
  border: none;
  border-radius: 0;
  background: transparent;
}
.store-picker-empty { padding: 8px 12px; background: var(--c-surface); }

/* ─── PDP Redesign ─── */
.pdp-layout {
  display: grid;
  grid-template-columns: 1fr minmax(320px, 420px);
  gap: 60px;
  align-items: start;
}
@media (max-width: 900px) {
  .pdp-layout { grid-template-columns: 1fr; gap: var(--s-5); }
}

.pdp-media { min-width: 0; width: 100%; }
@media (max-width: 900px) {
  .pdp-media { max-width: 400px; margin: 0 auto; }
}
.pdp-info {
  display: flex;
  flex-direction: column;
  gap: var(--s-6);
}
@media (max-width: 900px) {
  .pdp-info { gap: var(--s-5); }
}

.pdp-gallery {
  display: flex;
  flex-direction: row-reverse;
  align-items: flex-start;
  justify-content: flex-end;
  gap: var(--s-6);
}
@media (max-width: 900px) {
  .pdp-gallery { flex-direction: column; }
}

.pdp-gallery-main {
  flex: 1;
  max-height: 520px;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
}
@media (max-width: 900px) {
  .pdp-gallery-main {
    height: auto;
    aspect-ratio: 5 / 7;
    width: 100%;
  }
}
.pdp-gallery-img {
  max-width: 100%;
  max-height: 100%;
  width: auto;
  height: auto;
  object-fit: contain;
  cursor: zoom-in;
  transition: transform 0.3s cubic-bezier(0.2, 0.8, 0.2, 1);
  filter: drop-shadow(0 16px 48px rgba(21, 32, 28,0.5));
}
.pdp-gallery-main:hover .pdp-gallery-img {
  transform: scale(1.03) rotate(0.5deg) translateY(-4px);
}

.pdp-gallery-thumbs {
  display: flex;
  flex-direction: column;
  gap: var(--s-3);
  margin-top: 0;
  overflow-y: auto;
  max-height: 480px;
  padding-right: var(--s-1);
}
@media (max-width: 900px) {
  .pdp-gallery-thumbs {
    flex-direction: row;
    overflow-x: auto;
    max-height: none;
    padding-bottom: var(--s-2);
    padding-right: 0;
  }
}
.pdp-gallery-thumb {
  flex: 0 0 auto;
  width: 64px;
  height: 90px;
  padding: 0;
  border: 1px solid rgba(150, 230, 179,0.15);
  border-radius: var(--r-sm);
  background: var(--c-shadow);
  cursor: pointer;
  scroll-snap-align: start;
  overflow: hidden;
  transition: border-color 0.15s;
}
.pdp-gallery-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.pdp-gallery-thumb:hover { border-color: var(--c-accent); }

.pdp-lightbox {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(21, 32, 28,0.92);
  z-index: 1000;
  align-items: center;
  justify-content: center;
  padding: var(--s-6);
  cursor: zoom-out;
}
.pdp-lightbox.open { display: flex; }
.pdp-lightbox img { max-width: 100%; max-height: 100%; object-fit: contain; border-radius: var(--r-sm); }

.pdp-price-panel {
  position: sticky;
  top: 20px;
  display: flex;
  flex-direction: column;
  gap: var(--s-3);
  padding: var(--s-5);
  background: var(--c-card);
  border: 1px solid rgba(150, 230, 179,0.15);
  border-radius: var(--r-md);
  width: 100%;
}
@media (max-width: 900px) {
  .pdp-price-panel { position: static; }
}

.pdp-price-header {
  display: flex;
  flex-direction: column;
  gap: var(--s-2);
  padding-bottom: var(--s-3);
  border-bottom: 1px solid rgba(150, 230, 179,0.08);
}
.pdp-price-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--s-2);
}
.pdp-stock-text {
  font-size: var(--fs-md);
  color: var(--text-secondary);
  font-weight: 600;
}
.pdp-illustrator {
  font-size: var(--fs-sm);
  color: var(--text-quiet);
  font-style: italic;
}

.pdp-view-cart-link {
  display: block; text-align: center;
  font-size: var(--fs-sm); color: var(--text-secondary);
  text-decoration: none; padding: 4px 0;
}
.pdp-view-cart-link:hover { color: var(--c-accent); }
.pdp-meta-row {
  display: flex;
  gap: var(--s-2);
  align-items: flex-start;
  padding-top: var(--s-3);
  border-top: 1px solid rgba(150, 230, 179,0.08);
  font-size: var(--fs-sm);
  color: var(--text-quiet);
}
.pdp-meta-icon { flex: 0 0 auto; color: var(--c-accent); }
.pdp-video-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  color: var(--c-accent);
  text-decoration: none;
  font-size: var(--fs-md);
  font-weight: 600;
  padding: 10px 16px;
  border: 1px solid rgba(150, 230, 179,0.35);
  border-radius: var(--r-sm);
  background: rgba(150, 230, 179,0.06);
  transition: background 0.15s, border-color 0.15s, transform 0.12s;
}
.pdp-video-link:hover {
  background: rgba(150, 230, 179,0.12);
  border-color: var(--c-accent);
  transform: translateY(-1px);
}
.pdp-video-link .pdp-video-link-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 22px;
  height: 22px;
  border-radius: var(--r-pill);
  background: var(--c-accent);
  color: var(--c-bg);
  flex-shrink: 0;
}

.pdp-condition-tooltip { position: relative; cursor: help; }
.pdp-condition-tooltip .pdp-tooltip-text {
  position: absolute;
  bottom: calc(100% + 6px);
  left: 50%;
  transform: translateX(-50%);
  padding: 4px 8px;
  background: var(--c-shadow);
  color: var(--text-primary);
  font-size: var(--fs-xs);
  border-radius: var(--r-sm);
  white-space: nowrap;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.15s;
  border: 1px solid rgba(150, 230, 179,0.2);
}
.pdp-condition-tooltip:hover .pdp-tooltip-text,
.pdp-condition-tooltip:focus .pdp-tooltip-text { opacity: 1; }

.pdp-section {
  margin-top: var(--s-10);
  padding-top: var(--s-6);
  border-top: 1px solid rgba(150, 230, 179,0.08);
}
.pdp-section-title {
  font-family: var(--font-heading);
  font-size: var(--fs-xl);
  font-weight: 700;
  margin: 0 0 16px;
  color: var(--text-primary);
}
.pdp-description {
  font-size: var(--fs-body);
  line-height: 1.7;
  color: var(--text-primary);
  max-width: 65ch;
}
.pdp-seller-notes {
  margin-top: var(--s-4);
  padding: 12px 16px;
  background: rgba(150, 230, 179,0.04);
  border-left: 3px solid var(--c-accent);
  border-radius: var(--r-sm);
}
.pdp-seller-notes-label {
  font-size: var(--fs-xs);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--c-accent);
  margin-bottom: 6px;
}
.pdp-seller-notes-body summary {
  font-size: var(--fs-md);
  line-height: 1.6;
  cursor: pointer;
  display: -webkit-box;
  -webkit-line-clamp: 6;
  -webkit-box-orient: vertical;
  overflow: hidden;
  color: var(--text-primary);
  list-style: none;
}
.pdp-seller-notes-body summary::-webkit-details-marker { display: none; }
.pdp-seller-notes-body[open] summary {
  -webkit-line-clamp: unset;
  overflow: visible;
}

.pdp-related-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
  gap: var(--s-4);
}
@media (max-width: 600px) {
  .pdp-related-grid {
    grid-auto-flow: column;
    grid-auto-columns: 60%;
    grid-template-columns: none;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    padding-bottom: var(--s-2);
  }
  .pdp-related-card { scroll-snap-align: start; }
}
.pdp-related-card {
  display: block;
  text-decoration: none;
  color: inherit;
  padding: var(--s-2);
  border: 1px solid rgba(150, 230, 179,0.1);
  border-radius: var(--r-sm);
  transition: transform 0.15s, border-color 0.15s;
}
.pdp-related-card:hover {
  transform: translateY(-2px);
  border-color: var(--c-accent);
}
.pdp-related-image {
  aspect-ratio: 5/7;
  background: var(--c-shadow);
  border-radius: var(--r-sm);
  overflow: hidden;
  margin-bottom: var(--s-2);
}
.pdp-related-image img { width: 100%; height: 100%; object-fit: cover; display: block; }
.pdp-related-name {
  font-size: var(--fs-sm);
  font-weight: 600;
  color: var(--text-primary);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.pdp-related-price {
  font-family: var(--font-heading);
  color: var(--c-accent);
  font-weight: 700;
  font-size: var(--fs-body);
  margin-top: var(--s-1);
}

.pdp-sticky-cta { display: none; }
@media (max-width: 900px) {
  .pdp-sticky-cta {
    display: flex;
    position: fixed;
    left: 0; right: 0; bottom: 0;
    padding: 12px 16px calc(12px + env(safe-area-inset-bottom));
    background: var(--c-bg);
    border-top: 1px solid rgba(150, 230, 179,0.2);
    justify-content: space-between;
    align-items: center;
    gap: var(--s-3);
    z-index: 900;
  }
  .pdp-sticky-price {
    font-family: var(--font-heading);
    font-weight: 700;
    font-size: var(--fs-xl);
    color: var(--c-accent);
  }
  .pdp-sticky-cta .btn-primary { width: auto; padding: 10px 20px; }
  .pdp-sticky-spacer { height: 80px; }
}

/* ── Plan 8 T3: Quick-filter chips ── */
.quick-filter-chips {
  display: flex;
  gap: var(--s-2);
  overflow-x: auto;
  padding: var(--s-2) 0 var(--s-3);
  margin-bottom: var(--s-3);
  scrollbar-width: none;
}
.quick-filter-chips::-webkit-scrollbar { display: none; }

.quick-chip {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  padding: 6px 14px;
  border-radius: var(--r-pill);
  background: rgba(244, 249, 246, 0.6);
  color: var(--text-tertiary);
  border: 1px solid var(--c-border);
  font-size: var(--fs-sm);
  font-weight: 600;
  text-decoration: none;
  white-space: nowrap;
  transition: background 0.15s, border-color 0.15s, color 0.15s;
}
.quick-chip:hover {
  background: var(--c-border);
  color: var(--text-primary);
}
.quick-chip.active {
  background: var(--c-accent);
  color: var(--c-bg);
  border-color: var(--c-accent);
  font-weight: 700;
}

/* ── Plan 9: View mode toggle ── */
.view-mode-toolbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: var(--s-3);
  gap: var(--s-3);
}
.view-mode-buttons {
  display: inline-flex;
  gap: 2px;
  padding: 2px;
  border-radius: var(--r-sm);
  background: rgba(150, 230, 179,0.06);
  border: 1px solid rgba(150, 230, 179,0.15);
}
.view-mode-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  background: transparent;
  border: none;
  color: var(--text-tertiary);
  cursor: pointer;
  border-radius: var(--r-sm);
  transition: background 0.15s, color 0.15s;
}
.view-mode-btn:hover { color: var(--text-primary); }
.view-mode-btn.active {
  background: var(--c-accent);
  color: var(--c-bg);
}

.sort-select {
  appearance: none;
  padding: 6px 28px 6px 10px;
  background: transparent url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6' viewBox='0 0 10 6'%3E%3Cpath d='M1 1l4 4 4-4' stroke='%23A4F9C8' stroke-width='1.5' fill='none' stroke-linecap='round'/%3E%3C/svg%3E") no-repeat right 8px center;
  color: var(--text-secondary);
  border: 1px solid rgba(150, 230, 179,0.2);
  border-radius: var(--r-sm);
  font-family: var(--font-body);
  font-size: var(--fs-sm);
  cursor: pointer;
  outline: none;
  transition: border-color 0.2s, color 0.2s;
}
.sort-select:hover { border-color: rgba(150, 230, 179,0.4); color: var(--text-primary); }
.sort-select:focus { border-color: var(--c-accent); color: var(--text-primary); }
/* Sort reorders what's already on screen — it isn't a filter, so it must not
   share the pill look of .filter-select/.filter-pill or read as one more
   option in that group. Push it to the far edge of the toolbar row. */
.filter-toolbar .sidebar-section[data-filter-section="sort"] { margin-left: auto; }

.price-range-row { display: flex; align-items: center; gap: 8px; }
.price-input {
  width: 80px; padding: 6px 8px;
  background: transparent; border: 1px solid rgba(150,230,179,0.2); border-radius: var(--r-sm);
  color: var(--text-primary); font-family: var(--font-body); font-size: var(--fs-sm);
  outline: none;
}
.price-input:focus { border-color: var(--c-accent); }
.price-input::placeholder { color: var(--text-secondary); opacity: 0.6; }
.price-range-sep { color: var(--text-secondary); font-size: var(--fs-sm); }

.grid-view-1 {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--s-4);
}
@media (min-width: 640px)  { .grid-view-1 { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1024px) { .grid-view-1 { grid-template-columns: repeat(3, 1fr); } }

.grid-view-2 {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: var(--s-3);
  align-items: stretch;
}
@media (min-width: 640px) {
  .grid-view-2 { grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); }
}

/* Each .listing-card used to be its own independent grid, so the "price
   column" was sized per-row from that row's own content — prices and cart
   buttons never lined up between rows. Declaring the columns once here and
   having every row subgrid into them is what makes a list actually read
   as a table: one shared image/name/price/cart column for every row. */
.grid-view-list {
  display: grid;
  grid-template-columns: 44px 1fr auto auto;
  background: var(--c-card);
  border: 1px solid rgba(150, 230, 179,0.15);
  border-radius: var(--r-md);
  overflow: hidden;
}
.grid-view-list .listing-card {
  display: grid;
  grid-column: 1 / -1;
  grid-template-columns: subgrid;
  align-items: center;
  column-gap: var(--s-3);
  padding: var(--s-2) var(--s-3);
  background: transparent;
  border: none;
  border-radius: 0;
  border-bottom: 1px solid rgba(150, 230, 179,0.1);
}
.grid-view-list .listing-card:last-child { border-bottom: none; }
.grid-view-list .listing-card:hover {
  border-color: transparent;
  border-bottom-color: rgba(150, 230, 179,0.1);
  background: rgba(150, 230, 179,0.05);
  box-shadow: none;
}
.grid-view-list .listing-card:last-child:hover { border-bottom-color: transparent; }
.grid-view-list .listing-card-link { display: contents; }
.grid-view-list .listing-card-image {
  width: 44px;
  height: 60px;
  aspect-ratio: unset;
  border-radius: var(--r-sm);
}
/* Name always gets its own full-width line; meta badges and the stock
   chip share the line below instead of stacking into a 3rd line — that's
   what kept row heights uneven (a lone "Última"/discount item taller than
   its neighbors). flex-basis:100% on the name forces the wrap. */
.grid-view-list .listing-card-body {
  display: flex;
  flex-direction: row;
  flex-wrap: wrap;
  align-items: center;
  column-gap: 8px;
  row-gap: 2px;
  padding: 0;
  min-width: 0;
}
.grid-view-list .listing-card-name { flex: 1 0 100%; font-size: var(--fs-sm); }
.grid-view-list .listing-card-stock-row { margin: 0; padding: 0; }
/* footer dissolves so price + cart button become their own subgrid
   columns (3 and 4) instead of one auto-sized blob per row */
.grid-view-list .listing-card-footer { display: contents; }
.grid-view-list .listing-card-price,
.grid-view-list .listing-card-price-discount {
  grid-column: 3;
  justify-self: end;
  margin-right: 0;
}
.grid-view-list .listing-card-add { grid-column: 4; }
.grid-view-list .listing-card-video { display: none; }
.grid-view-list .listing-card-badges {
  position: static;
  flex-direction: row;
  margin-top: 2px;
}
.grid-view-list .listing-card-price-discount { flex-direction: row; align-items: baseline; gap: 6px; }
.grid-view-list .listing-card-price-strike { font-size: var(--fs-xxs); }

/* ── Plan 10: PDP gallery scroller (scroll-snap swipe) ── */
.pdp-gallery-scroller {
  flex: 1;
  min-width: 0;
  height: 480px;
  background: var(--c-shadow);
  border-radius: var(--r-md);
  overflow-x: auto;
  overflow-y: hidden;
  display: flex;
  scroll-snap-type: x mandatory;
  scrollbar-width: none;
  -webkit-overflow-scrolling: touch;
  box-shadow: 0 8px 32px rgba(21, 32, 28,0.4), 0 0 0 1px rgba(150, 230, 179,0.1);
}
.pdp-gallery-scroller::-webkit-scrollbar { display: none; }
@media (max-width: 900px) {
  .pdp-gallery-scroller {
    height: auto;
    aspect-ratio: 5 / 7;
    width: 100%;
    flex: none;
  }
}

.pdp-gallery-slide {
  flex: 0 0 100%;
  scroll-snap-align: start;
  display: flex;
  align-items: center;
  justify-content: center;
}
.pdp-gallery-slide .pdp-gallery-img {
  max-width: 100%;
  max-height: 100%;
  width: auto;
  height: auto;
  object-fit: contain;
  cursor: zoom-in;
  transition: transform 0.2s ease;
  user-select: none;
  -webkit-user-drag: none;
}
.pdp-gallery-slide .pdp-gallery-img:hover { transform: scale(1.02); }

.pdp-gallery-thumb.active {
  border-color: var(--c-accent);
  box-shadow: 0 0 0 2px var(--glow-accent);
}

/* ── Plan 11: Sticky CTA redesign ── */
@media (max-width: 900px) {
  .pdp-sticky-add {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 12px 18px;
    min-height: 48px;
    background: var(--c-accent);
    color: var(--c-bg);
    font-weight: 800;
    font-size: var(--fs-body);
    border: none;
    border-radius: var(--r-pill);
    cursor: pointer;
    line-height: 1;
    transition: transform 0.12s, box-shadow 0.15s;
  }
  .pdp-sticky-add:hover { box-shadow: 0 0 14px var(--glow-accent); }
  .pdp-sticky-add:active { transform: scale(0.96); }
  .pdp-sticky-add-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 2px 6px;
    background: rgba(255, 255, 255,0.25);
    color: var(--c-bg);
    border-radius: var(--r-pill);
    font-size: var(--fs-sm);
    font-weight: 800;
    min-width: 22px;
    line-height: 1;
  }
}

/* ── Plan 12: WhatsApp CTA ── */
.wa-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 14px;
  background: #25D366;
  color: #fff;
  border-radius: var(--r-sm);
  text-decoration: none;
  font-weight: 700;
  font-size: var(--fs-md);
  transition: opacity 0.15s, transform 0.12s;
}
.wa-btn:hover { opacity: 0.9; }
.wa-btn:active { transform: scale(0.98); }

.pdp-sticky-actions { display: flex; gap: var(--s-2); align-items: center; }
.pdp-sticky-wa {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  border-radius: var(--r-pill);
  background: #25D366;
  color: #fff;
  text-decoration: none;
  transition: transform 0.12s;
}
.pdp-sticky-wa:active { transform: scale(0.94); }

.pdp-sticky-video {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  border-radius: var(--r-pill);
  background: transparent;
  color: var(--c-accent);
  border: 1px solid rgba(150, 230, 179,0.35);
  text-decoration: none;
  transition: background 0.15s, transform 0.12s;
}
.pdp-sticky-video:hover { background: rgba(150, 230, 179,0.12); }
.pdp-sticky-video:active { transform: scale(0.94); }

/* On mobile, WA button and video link in the price panel are redundant with sticky */
@media (max-width: 900px) {
  .pdp-price-panel .wa-btn,
  .pdp-price-panel .pdp-video-link { display: none; }
}

/* ── Checkout sticky CTA (mobile) ── */
.checkout-sticky-cta { display: none; }
.checkout-submit-inline { font-size: var(--fs-body); padding: 14px; width: 100%; justify-content: center; }

@media (max-width: 640px) {
  .checkout-submit-inline { display: none; }
  .checkout-sticky-cta {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: var(--s-3);
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 210;
    padding: 12px 16px calc(12px + env(safe-area-inset-bottom));
    background: rgba(255, 255, 255,0.98);
    backdrop-filter: blur(12px);
    border-top: 1px solid var(--c-border);
  }
  .checkout-sticky-total {
    display: flex;
    flex-direction: column;
    gap: 2px;
    min-width: 0;
  }
  .checkout-sticky-total-label {
    font-size: var(--fs-xs);
    color: var(--text-tertiary);
    text-transform: uppercase;
    letter-spacing: 0.06em;
  }
  .checkout-sticky-total-value {
    font-family: var(--font-heading);
    font-size: var(--fs-xl);
    font-weight: 700;
    color: var(--c-accent);
    font-variant-numeric: tabular-nums;
    line-height: 1.1;
  }
  .checkout-sticky-submit {
    flex: 0 0 auto;
    width: auto;
    padding: 12px 20px;
    font-size: var(--fs-md);
  }
  /* Hide bottom mobile nav on checkout to remove competing UI */
  body[data-route="checkout"] .mobile-nav { display: none; }
  /* And give the main enough bottom room for the sticky CTA */
  body[data-route="checkout"] .store-main {
    padding-bottom: calc(96px + env(safe-area-inset-bottom));
  }
}

/* ── Plan 13: Font-size tokens ── */

/* ── Shipping Options Global Styles ── */
.shipping-options {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-top: 10px;
}
.shipping-option {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  background: var(--c-bg);
  border: 1px solid var(--c-border);
  border-radius: var(--r-sm);
  cursor: pointer;
  transition: background 0.15s ease, border-color 0.15s ease;
}
.shipping-option:hover {
  background: var(--c-border);
}
.shipping-option:has(input:checked) {
  background: var(--glow-accent);
  border-color: var(--c-accent);
}
.shipping-option input[type=radio] {
  accent-color: var(--c-accent);
}
.shipping-option-body {
  flex: 1;
}
.shipping-option-name {
  font-weight: 600;
  font-size: var(--fs-sm);
  color: var(--text-primary);
}
.htmx-indicator {
  display: none;
}
.htmx-request .htmx-indicator {
  display: block;
}
.htmx-request.htmx-indicator {
  display: block;
}

/* ── Admin card detail two-column layout ── */
.admin-card-detail {
  display: grid;
  grid-template-columns: minmax(240px, 300px) 1fr;
  gap: 24px;
  align-items: start;
  margin-bottom: 16px;
}
@media (max-width: 768px) {
  .admin-card-detail { grid-template-columns: 1fr; }
}

/* ── Card detail hero (foto + tags + ações + gráfico) ── */
.card-hero-image {
  width: 100%;
  border-radius: var(--r-md);
  object-fit: contain;
  aspect-ratio: 5 / 7;
  background: var(--c-shadow);
  box-shadow: 0 8px 24px rgba(21, 32, 28, 0.10);
}

.tag-field-wrap {
  position: relative;
  max-width: 360px;
  margin: var(--s-3) 0;
}

.vc-field {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
  min-height: 38px;
  padding: 5px 8px;
  border: 1.5px solid var(--c-border);
  border-radius: var(--r-sm);
  background: var(--c-surface);
  cursor: text;
}
.vc-field:focus-within {
  border-color: var(--c-accent);
  box-shadow: 0 0 0 3px var(--glow-accent-sm);
}

.tag-chips-row {
  display: contents;
}

.tag-field-input {
  flex: 1 1 80px;
  min-width: 80px;
  border: none;
  outline: none;
  background: none;
  font-family: inherit;
  font-size: var(--fs-xs);
  color: var(--text-primary);
  padding: 4px 2px;
}

.tag-chip {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  background: rgba(39, 197, 113, 0.12);
  color: var(--c-price);
  padding: 4px 10px;
  border-radius: var(--r-pill);
  font-size: var(--fs-xs);
  font-weight: 600;
  white-space: nowrap;
}
.tag-chip button {
  background: none;
  border: none;
  cursor: pointer;
  color: inherit;
  padding: 0 0 0 4px;
  line-height: 1;
  font-size: 14px;
}

.tag-suggestions {
  position: fixed;
  z-index: 1100;
  max-height: 220px;
  overflow-y: auto;
  background: var(--c-card);
  border: 1px solid var(--c-border);
  border-radius: var(--r-sm);
  box-shadow: 0 8px 24px rgba(21, 32, 28, 0.15);
}
.tag-suggestions:empty { display: none; }

.tag-suggest-item {
  padding: 8px 12px;
  font-size: var(--fs-xs);
  color: var(--text-secondary);
  cursor: pointer;
}
.tag-suggest-item:hover,
.tag-suggest-item.hl {
  background: rgba(39, 197, 113, 0.1);
  color: var(--text-primary);
}
.tag-suggest-item.tag-create-item {
  color: var(--c-price);
  font-weight: 700;
}
.tag-suggest-empty {
  padding: 8px 12px;
  font-size: var(--fs-xs);
  color: var(--text-disabled);
}

.card-hero-actions {
  display: flex;
  gap: var(--s-2);
  flex-wrap: wrap;
  margin: var(--s-3) 0;
}

/* ── Price chart hero ── */
.chart-hero {
  background: var(--c-card);
  border: 1px solid rgba(150, 230, 179, 0.15);
  border-radius: var(--r-lg);
  padding: var(--s-5);
  box-shadow: 0 8px 24px rgba(21, 32, 28, 0.08);
  margin-top: var(--s-4);
}

.chart-hero-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  flex-wrap: wrap;
  gap: var(--s-3);
  margin-bottom: var(--s-3);
}

.chart-price-label {
  font-size: var(--fs-xs);
  font-weight: 700;
  letter-spacing: .06em;
  text-transform: uppercase;
  color: var(--text-quiet);
  margin-bottom: 2px;
}

.chart-price-value {
  font-family: var(--font-heading);
  font-weight: 800;
  font-size: var(--fs-h2);
  color: var(--text-primary);
}

.chart-delta-badge {
  display: inline-block;
  margin-left: var(--s-2);
  padding: 3px 9px;
  border-radius: var(--r-pill);
  font-size: var(--fs-xs);
  font-weight: 700;
  vertical-align: middle;
}
.chart-delta-badge.is-up   { color: var(--c-profit); background: var(--c-profit-bg); }
.chart-delta-badge.is-down { color: var(--c-loss);   background: var(--c-loss-bg); }
.chart-delta-badge.is-flat { color: var(--c-nodata); background: var(--c-nodata-bg); }

.chart-legend {
  display: flex;
  flex-wrap: wrap;
  gap: var(--s-2);
  justify-content: flex-end;
}

.chart-legend-item {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  background: rgba(21, 32, 28, 0.05);
  border-radius: var(--r-pill);
  padding: 3px 10px 3px 6px;
  font-size: var(--fs-xxs);
  font-weight: 700;
  color: var(--text-tertiary);
  cursor: pointer;
  border: none;
  transition: opacity 0.15s;
}
.chart-legend-item.is-hidden { opacity: 0.4; }

.chart-legend-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  display: inline-block;
}

/* ── Faixa de ação (separa form de ação da tabela de dados) ── */
.action-band {
  background: var(--glow-accent-sm);
  border-radius: var(--r-sm);
  padding: var(--s-4);
  margin-bottom: var(--s-4);
  display: flex;
  gap: var(--s-2);
  flex-wrap: wrap;
  align-items: center;
}

/* ── Abas (detalhe da carta) — nome distinto de .admin-tab (nav inferior mobile) ── */
.card-detail-tabs {
  display: flex;
  gap: var(--s-1);
  border-bottom: 1px solid rgba(150, 230, 179, 0.2);
  margin-bottom: var(--s-4);
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

.card-detail-tab {
  flex-shrink: 0;
  background: transparent;
  border: none;
  border-bottom: 2px solid transparent;
  padding: var(--s-3) var(--s-4);
  font-family: var(--font-body);
  font-weight: 700;
  font-size: var(--fs-md);
  color: var(--text-quiet);
  cursor: pointer;
  text-decoration: none;
  display: inline-block;
  transition: color 0.15s, border-color 0.15s;
}
.card-detail-tab:hover { color: var(--text-primary); }
.card-detail-tab.is-active { color: var(--c-price); border-bottom-color: var(--c-accent); }

@media (max-width: 768px) {
  .chart-hero-head { flex-direction: column; }
  .chart-legend { justify-content: flex-start; }
}

/* ── Category cards (home vitrine) ── */
.category-cards {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--s-6);
  padding: var(--s-8) 0 var(--s-12);
}

.category-card {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: var(--s-4);
  padding: 36px 32px;
  background: var(--c-card);
  border: 1px solid var(--c-border);
  border-radius: var(--r-md);
  text-decoration: none;
  color: inherit;
  transition: transform 0.2s cubic-bezier(0.34, 1.56, 0.64, 1), box-shadow 0.2s, border-color 0.2s;
  min-height: 280px;
}

.category-card:hover {
  transform: translateY(-4px);
  border-color: var(--c-accent);
  box-shadow: 0 0 0 1px var(--c-accent), 0 16px 40px rgba(21, 32, 28, 0.10);
}

.category-card-icon {
  font-size: 56px;
  line-height: 1;
}

.category-card-title {
  font-family: var(--font-brand);
  font-size: 26px;
  font-weight: 600;
  color: var(--text-primary);
  margin: 0;
}

.category-card-desc {
  font-family: var(--font-body);
  font-size: var(--fs-sm);
  color: var(--text-secondary);
  margin: 0;
  flex: 1;
  line-height: 1.55;
}

.category-card-cta {
  font-size: var(--fs-sm);
  font-weight: 600;
  color: var(--c-accent);
  letter-spacing: 0.01em;
}

@media (max-width: 640px) {
  .category-cards {
    grid-template-columns: 1fr;
  }
}

/* ── Store header category nav (desktop) ── */
.store-header-categories {
  display: flex;
  align-items: center;
  gap: var(--s-2);
}

.store-header-cat-link {
  font-family: var(--font-body);
  font-size: var(--fs-sm);
  color: var(--text-secondary);
  text-decoration: none;
  padding: 5px 10px;
  border-radius: var(--r-sm);
  transition: color 0.15s, background 0.15s;
  white-space: nowrap;
}

.store-header-cat-link:hover,
.store-header-cat-link.active {
  color: var(--c-accent);
  background: var(--glow-accent-sm);
}

@media (max-width: 640px) {
  .store-header-categories { display: none; }
}

/* ── Categories drawer (mobile) ── */
.categories-drawer {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  background: var(--c-surface);
  border-top: 1px solid var(--c-border);
  border-radius: 16px 16px 0 0;
  padding: 24px 20px 32px;
  z-index: 310;
  transform: translateY(100%);
  transition: transform 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

.categories-drawer.open {
  transform: translateY(0);
}

.categories-drawer-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 20px;
}

.categories-drawer-title {
  font-family: var(--font-brand);
  font-size: 18px;
  color: var(--text-primary);
}

.categories-drawer-close {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  border: none;
  background: transparent;
  color: var(--text-secondary);
  cursor: pointer;
}

.categories-drawer-list {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.categories-drawer-item {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 14px 12px;
  border-radius: var(--r-sm);
  text-decoration: none;
  color: var(--text-primary);
  font-size: var(--fs-body);
  font-family: var(--font-body);
  transition: background 0.15s, color 0.15s;
}

.categories-drawer-item:hover,
.categories-drawer-item.active {
  background: var(--glow-accent-sm);
  color: var(--c-accent);
}

.categories-drawer-item-icon {
  font-size: 22px;
  line-height: 1;
}

.catalog-card, .product-card {
  display: flex;
  flex-direction: column;
  background: var(--c-card);
  border: 1px solid var(--c-border);
  border-radius: var(--r-sm, 8px);
  overflow: hidden;
  text-decoration: none;
  color: var(--text-primary);
  transition: border-color 0.15s;
}
.catalog-card:hover, .product-card:hover { border-color: var(--c-accent); }
.catalog-card-image {
  aspect-ratio: 5/7;
  background: var(--c-bg);
  display: flex;
  align-items: center;
  justify-content: center;
}
.product-card-image {
  aspect-ratio: 1/1;
  background: var(--c-bg);
  display: flex;
  align-items: center;
  justify-content: center;
}
.product-card-image--card { aspect-ratio: 5/7; }
.catalog-card-image img, .product-card-image img { width: 100%; height: 100%; object-fit: cover; }
.catalog-card-body, .product-card-body { padding: var(--s-2, 8px); display: flex; flex-direction: column; gap: 4px; background: var(--c-card); position: relative; z-index: 1; }
.catalog-card-name, .product-card-name {
  font-size: 13px;
  font-weight: 600;
  line-height: 1.3;
  min-height: calc(13px * 1.3 * 2);
  color: var(--text-primary);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.product-card-subtitle {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.catalog-card-posse { align-self: flex-start; }
.catalog-card-posse--tenho { background: var(--c-border); color: var(--c-price); }
.catalog-card-posse--tive  { background: rgba(21,32,28,0.07); color: var(--text-tertiary); }
.catalog-card-posse--nunca { background: rgba(21,32,28,0.04); color: var(--text-quiet); }
.catalog-card-footer, .product-card-footer { display: flex; justify-content: space-between; align-items: center; color: var(--text-primary); }

/* ── Card do catálogo: pílula de estoque + rodapé de preço ── */
.product-card-stock-pill {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  align-self: flex-start;
  background: var(--c-border);
  color: var(--c-price);
  font-family: var(--font-body);
  font-weight: 700;
  font-size: var(--fs-xxs);
  letter-spacing: 0.02em;
  padding: 4px 10px 4px 8px;
  border-radius: var(--r-pill);
}
.product-card-stock-pill.is-quiet { background: rgba(21,32,28,0.05); color: var(--text-quiet); }
.product-card-stock-dot { width: 6px; height: 6px; border-radius: 50%; background: var(--c-accent); flex-shrink: 0; }
.product-card-stock-pill.is-quiet .product-card-stock-dot { background: var(--text-disabled); }

.product-card-stat-footer {
  margin-top: auto;
  padding-top: var(--s-2);
  border-top: 1px solid var(--c-border);
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: var(--s-2);
}
.product-card-cost { font-size: var(--fs-xxs); color: var(--text-quiet); line-height: 1.3; }
.product-card-cost strong { color: var(--text-tertiary); font-weight: 700; }
.product-card-price-block { text-align: right; }
.product-card-price-label {
  display: block;
  font-family: var(--font-body);
  font-weight: 700;
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-quiet);
  margin-bottom: 1px;
}
.product-card-price {
  font-family: var(--font-heading);
  font-weight: 600;
  font-size: var(--fs-lg);
  color: var(--c-price);
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}
.product-card-price-empty { color: var(--text-disabled); font-family: var(--font-body); font-weight: 600; font-size: var(--fs-sm); }

.global-search-wrap {
  position: sticky;
  top: 0;
  z-index: 1000;
  margin-bottom: var(--s-4);
}
.global-search-input {
  width: 100%;
  padding: 10px 14px;
  border-radius: var(--r-sm);
  border: 1px solid var(--c-border);
  background: var(--c-card);
  color: var(--text-primary);
  font-size: 13px;
  font-family: var(--font-body);
}
.global-search-input:focus { outline: none; border-color: var(--c-accent); }
.global-search-dropdown:empty { display: none; }
.global-search-dropdown {
  position: absolute;
  left: 0;
  right: 0;
  z-index: 30;
  margin-top: 4px;
  background: var(--c-card);
  border: 1px solid var(--c-border);
  border-radius: var(--r-sm);
  box-shadow: 0 8px 24px var(--c-shadow);
  max-height: 60vh;
  overflow-y: auto;
}
.global-search-item {
  display: block;
  padding: 10px 14px;
  border-bottom: 1px solid var(--c-border);
  text-decoration: none;
  color: var(--text-primary);
}
.global-search-item:last-child { border-bottom: none; }
.global-search-item:hover { background: rgba(39,197,113,0.06); }
.global-search-item-header { font-weight: 600; font-size: 13px; margin-bottom: 4px; display: flex; gap: 6px; align-items: center; color: var(--text-primary); }
.global-search-variant { font-size: 12px; display: flex; gap: 6px; align-items: center; padding: 2px 0; color: var(--text-primary); }
.global-search-item-content { display: flex; gap: 12px; align-items: flex-start; }
.global-search-thumb { width: 36px; height: 50px; object-fit: cover; border-radius: 4px; border: 1px solid var(--c-border); flex-shrink: 0; background: var(--c-bg); }
.global-search-item-body { flex: 1; min-width: 0; }

.catalog-filters-wrap { position: relative; }
.catalog-filters-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: var(--c-card);
  border: 1px solid var(--c-border);
  border-radius: var(--r-sm);
  padding: 9px 16px;
  font-size: 13px;
  font-weight: 600;
  color: var(--text-primary);
  font-family: var(--font-body);
  cursor: pointer;
  height: 100%;
}
.catalog-filters-btn:hover { border-color: var(--c-accent); }
.catalog-filters-btn[aria-expanded="true"] {
  border-color: var(--c-accent);
  background: rgba(39,197,113,0.06);
}
.catalog-filters-count {
  background: var(--c-accent);
  color: #fff;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 700;
  padding: 1px 7px;
  line-height: 1.4;
}
.catalog-filters-panel {
  position: absolute;
  top: calc(100% + 6px);
  left: 0;
  z-index: 30;
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  background: var(--c-card);
  border: 1px solid var(--c-border);
  border-radius: var(--r-md);
  box-shadow: 0 8px 24px var(--c-shadow);
  padding: 12px;
  min-width: 320px;
}
.catalog-filters-panel[hidden] { display: none; }
.catalog-sort-group { display: flex; align-items: center; gap: 8px; }
.catalog-sort-label { font-size: 12px; color: var(--text-quiet); white-space: nowrap; }
.catalog-chips-row { display: flex; gap: 8px; flex-wrap: wrap; margin: 12px 0 4px; }
.catalog-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: rgba(39,197,113,0.12);
  color: var(--c-price);
  border-radius: 999px;
  padding: 5px 6px 5px 12px;
  font-size: 12px;
  font-weight: 600;
}
.catalog-chip a { color: inherit; text-decoration: none; font-size: 14px; line-height: 1; padding: 2px 4px; }

/* ── Seleção em lote no catálogo ── */
.catalog-select-banner {
  background: rgba(39,197,113,0.08);
  border: 1px solid rgba(150, 230, 179,0.18);
  border-radius: var(--r-md);
  padding: var(--s-3) var(--s-4);
  margin-bottom: var(--s-4);
  font-size: var(--fs-sm);
}

.catalog-select-checkbox {
  position: absolute;
  top: 8px;
  left: 8px;
  z-index: 2;
  display: block;
}
.catalog-select-checkbox input { width: 20px; height: 20px; accent-color: var(--c-accent); }

.product-card-tags-btn {
  position: absolute;
  top: 8px;
  right: 8px;
  z-index: 2;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  border: none;
  background: rgba(255, 255, 255, 0.9);
  color: var(--text-secondary);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  box-shadow: 0 2px 6px rgba(21, 32, 28, 0.15);
  transition: background 0.15s, color 0.15s;
}
.product-card-tags-btn:hover { background: var(--c-card); color: var(--c-accent); }

.catalog-select-badge { background: rgba(90, 117, 102,0.15); color: var(--text-tertiary); }

.catalog-select-bar {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 40;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: var(--s-3);
  padding: var(--s-3) var(--s-5);
  background: var(--c-card);
  border-top: 1px solid rgba(150, 230, 179,0.18);
  box-shadow: 0 -8px 24px rgba(21, 32, 28,0.25);
}
.catalog-select-actions { display: flex; align-items: center; gap: var(--s-2); flex-wrap: wrap; }
.catalog-select-count { font-weight: 600; font-size: var(--fs-md); }

.catalog-select-preview {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 60px;
  z-index: 39;
  max-height: 240px;
  overflow-y: auto;
  background: var(--c-card);
  border-top: 1px solid rgba(150, 230, 179,0.18);
  padding: var(--s-3) var(--s-5);
}
.catalog-select-preview-item { padding: 4px 0; font-size: var(--fs-sm); border-bottom: 1px solid rgba(150, 230, 179,0.08); }

.catalog-select-bar-spacer { height: 64px; }

@media (max-width: 900px) {
  /* .admin-bottom-nav (z-index: 200) fica fixa embaixo — a barra de seleção precisa
     subir pra não ficar coberta por ela nem sobrepor os links de navegação. */
  .catalog-select-bar {
    bottom: calc(58px + env(safe-area-inset-bottom, 0px));
  }
  .catalog-select-preview {
    bottom: calc(58px + 100px + env(safe-area-inset-bottom, 0px));
  }
  .catalog-select-bar-spacer { height: 150px; }
}

.review-card { cursor: default; }
.review-card-fields { padding: 0 var(--s-2) var(--s-2); display: flex; flex-direction: column; gap: 6px; }

/* Chip de margem */
.margin-chip {
  display: inline-flex;
  align-items: baseline;
  gap: 4px;
  padding: 2px 8px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 600;
  line-height: 1.4;
  white-space: nowrap;
}
.margin-chip small { font-weight: 500; opacity: 0.8; }
.margin-chip.is-profit { color: var(--c-profit); background: var(--c-profit-bg); }
.margin-chip.is-thin   { color: var(--c-thin);   background: var(--c-thin-bg); }
.margin-chip.is-loss   { color: var(--c-loss);   background: var(--c-loss-bg); }
.margin-chip.is-nodata { color: var(--c-nodata); background: var(--c-nodata-bg); }
.margin-chip.is-pago     { color: var(--c-profit); background: var(--c-profit-bg); }
.margin-chip.is-parcial  { color: var(--c-thin);   background: var(--c-thin-bg); }
.margin-chip.is-pendente { color: var(--c-loss);   background: var(--c-loss-bg); }
.delivery-chip { padding: 2px 8px; border-radius: 4px; font-size: 11px; font-weight: 600; }
.delivery-chip.is-pedido_feito { color: var(--c-nodata); background: var(--c-nodata-bg); }
.delivery-chip.is-enviado      { color: var(--c-thin);   background: var(--c-thin-bg); }
.delivery-chip.is-entregue     { color: var(--c-profit); background: var(--c-profit-bg); }
.delivery-chip.is-conferido    { color: var(--c-profit); background: var(--c-profit-bg); }
.liga-recency-stale { color: var(--c-thin); font-weight: 600; }

/* Modal de detalhe de margem */
.modal-overlay {
  position: fixed;
  inset: 0;
  z-index: 1000;
  background: rgba(0, 0, 0, 0.45);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
}
.modal-box {
  width: 100%;
  max-width: 560px;
  max-height: 85vh;
  overflow-y: auto;
}

/* ── Catalog: multi-select tags + active-filters shelf ── */
.tag-check-list { display: flex; flex-wrap: wrap; gap: var(--s-2); }
.tag-check-list--more { margin-top: var(--s-2); }
.tag-more-btn {
  margin-top: var(--s-3);
  background: none;
  border: none;
  color: var(--c-accent);
  font-family: var(--font-body);
  font-weight: 700;
  font-size: var(--fs-xs);
  padding: 4px 0;
  cursor: pointer;
  text-align: left;
}

.active-filters-shelf {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: var(--s-2);
  padding: var(--s-3) var(--s-4);
  margin-bottom: var(--s-4);
  background: var(--c-card);
  border: 1px dashed var(--c-border);
  border-radius: var(--r-sm);
}
.active-filters-label {
  font-size: var(--fs-xxs);
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--text-quiet);
}
.active-filters-empty { font-size: var(--fs-xs); color: var(--text-quiet); font-style: italic; }
.active-filter-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: var(--c-bg);
  border: 1.5px solid var(--c-accent);
  color: var(--c-price);
  font-weight: 700;
  font-size: var(--fs-xs);
  padding: 4px 10px;
  border-radius: var(--r-pill);
  text-decoration: none;
  cursor: pointer;
}
.active-filter-chip:hover { background: rgba(39,197,113,0.08); }

/* ── Home: binder tabs + tab grid ── */
.rail-section { padding: var(--s-8) 0 var(--s-12); }
.rail-head { text-align: center; margin-bottom: var(--s-6); }
.rail-head h2 { font-family: var(--font-brand); font-size: var(--fs-h2); margin: 4px 0 0; }
.rail-head .eyebrow { font-size: var(--fs-xxs); font-weight: 800; letter-spacing: 0.08em; text-transform: uppercase; color: var(--c-accent); }

.binder-tabs { display: flex; gap: var(--s-2); justify-content: center; flex-wrap: wrap; margin-bottom: var(--s-4); }
.binder-tab {
  font-family: var(--font-brand);
  font-weight: 600;
  font-size: var(--fs-body);
  padding: 12px 22px;
  border: 1px solid var(--c-border);
  border-bottom: none;
  border-radius: var(--r-md) var(--r-md) 0 0;
  background: var(--c-bg);
  color: var(--text-quiet);
  cursor: pointer;
}
.binder-tab.active { background: var(--c-card); color: var(--text-primary); }
.binder-tab[data-cat="fofas"].active { color: var(--c-accent); }
.binder-tab[data-cat="baratezas"].active { color: var(--c-thin); }

.rail-panel { background: var(--c-card); border: 1px solid var(--c-border); border-radius: 0 var(--r-lg) var(--r-lg) var(--r-lg); padding: var(--s-6); }
.home-tab-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: var(--s-4); }
@media (min-width: 640px) { .home-tab-grid { grid-template-columns: repeat(4, 1fr); } }

.home-tab-card-link { text-decoration: none; color: inherit; display: flex; flex-direction: column; gap: 6px; }
.home-tab-card-image { aspect-ratio: 63/88; border-radius: var(--r-sm); overflow: hidden; background: var(--c-bg); }
.home-tab-card-image img { width: 100%; height: 100%; object-fit: cover; opacity: 0; transition: opacity 0.2s; }
.home-tab-card-image img.loaded { opacity: 1; }
.home-tab-card-name { font-size: var(--fs-sm); font-weight: 700; color: var(--text-primary); line-height: 1.3; }
.home-tab-card-price { font-family: var(--font-heading); font-weight: 600; color: var(--c-price); }

.home-tab-cta {
  grid-column: 1 / -1;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin-top: var(--s-2);
  padding: var(--s-4);
  border: 1.5px dashed rgba(39, 197, 113, 0.35);
  border-radius: var(--r-md);
  color: var(--c-accent);
  font-family: var(--font-brand);
  font-weight: 600;
  font-size: var(--fs-body);
  text-decoration: none;
  text-align: center;
  transition: border-color 0.15s, background 0.15s;
}
.home-tab-cta:hover { border-style: solid; background: rgba(39, 197, 113, 0.06); }
.home-tab-cta-arrow { transition: transform 0.15s; }
.home-tab-cta:hover .home-tab-cta-arrow { transform: translateX(3px); }

/* ── Header live search dropdown ── */
.store-header-search { position: relative; }
.header-search-dropdown:empty { display: none; }
.header-search-dropdown {
  position: absolute;
  left: 0;
  right: 0;
  top: calc(100% + 6px);
  z-index: 50;
  background: var(--c-card);
  border: 1px solid var(--c-border);
  border-radius: var(--r-sm);
  box-shadow: 0 12px 28px var(--c-shadow);
  max-height: 60vh;
  overflow-y: auto;
}
.header-search-result {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  text-decoration: none;
  color: var(--text-primary);
  border-bottom: 1px solid var(--c-border);
}
.header-search-result:last-child { border-bottom: none; }
.header-search-result:hover { background: rgba(39,197,113,0.06); }
.header-search-result-thumb { width: 34px; height: 46px; border-radius: 4px; overflow: hidden; flex-shrink: 0; background: var(--c-bg); }
.header-search-result-thumb img { width: 100%; height: 100%; object-fit: cover; }
.header-search-result-body { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.header-search-result-name { font-weight: 700; font-size: var(--fs-sm); }
.header-search-result-meta { font-size: var(--fs-xxs); color: var(--text-quiet); }
.header-search-result-price { font-family: var(--font-heading); font-weight: 600; color: var(--c-price); white-space: nowrap; }
.header-search-empty { padding: 12px; font-size: var(--fs-xs); color: var(--text-quiet); }

/* ── Compact filter toolbar: pills + popovers ── */
.filter-select {
  appearance: none;
  -webkit-appearance: none;
  border: 1.5px solid var(--c-border);
  border-radius: var(--r-pill);
  padding: 8px 34px 8px 14px;
  font-family: var(--font-body);
  font-weight: 700;
  font-size: var(--fs-sm);
  background: var(--c-card) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6' viewBox='0 0 10 6'%3E%3Cpath d='M1 1l4 4 4-4' stroke='%2327C571' stroke-width='1.6' fill='none' stroke-linecap='round'/%3E%3C/svg%3E") no-repeat right 14px center;
  color: var(--text-primary);
}
.filter-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  border: 1.5px solid var(--c-border);
  border-radius: var(--r-pill);
  background: var(--c-card);
  color: var(--text-primary);
  font-family: var(--font-body);
  font-weight: 700;
  font-size: var(--fs-sm);
  padding: 8px 14px;
  cursor: pointer;
}
.filter-pill:hover { border-color: var(--c-accent); }
.filter-pill.has-value { border-color: var(--c-accent); background: rgba(39,197,113,0.08); color: var(--c-price); }
.filter-select.has-value { border-color: var(--c-accent); }

.filter-popover-body {
  z-index: 200;
  background: var(--c-card);
  border: 1px solid var(--c-border);
  border-radius: var(--r-md);
  box-shadow: 0 16px 40px -18px rgba(21, 32, 28, 0.35);
  padding: 14px;
  min-width: 220px;
}

@media (min-width: 901px) {
  .filter-toolbar { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
}
@media (max-width: 900px) {
  .filter-toolbar { display: none; }
}
