/* ============================================================
   shop.css — Storefront White-label
   Usa exclusivamente var(--color-*) injetadas server-side.
   Mobile-first. Breakpoints: 640px, 1024px.
   ============================================================ */

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

body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
  font-size: 15px;
  line-height: 1.5;
  color: var(--color-text);
  background: var(--color-bg);
}

img { max-width: 100%; height: auto; display: block; }

/* ─── Loading Spinner ────────────────────────────────────── */
.loading-spinner {
  width: 40px;
  height: 40px;
  border: 3px solid var(--color-border);
  border-top-color: var(--color-primary);
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
}

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

/* ─── Header ─────────────────────────────────────────────── */
.shop-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--color-header-bg);
  border-bottom: 1px solid color-mix(in srgb, var(--color-header-icon) 15%, transparent);
  box-shadow: var(--shadow-sm);
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 0 16px;
  height: 56px;
}

.shop-header-brand {
  flex: 1;
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}

.shop-header-actions {
  display: flex;
  align-items: center;
  gap: 4px;
  flex-shrink: 0;
}

.shop-logo {
  height: 32px;
  width: auto;
  max-width: 115px;
  object-fit: contain;
  border-radius: var(--radius-sm);
  flex-shrink: 0;
}

.shop-logo-placeholder {
  width: 32px;
  height: 32px;
  border-radius: var(--radius-sm);
  background: var(--color-primary);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.shop-logo-placeholder-letter {
  color: #fff;
  font-weight: 700;
  font-size: 15px;
}

.shop-name {
  font-weight: 700;
  font-size: .95rem;
  color: var(--color-header-icon);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* Icon button (search, cart in header) */
.shop-icon-btn {
  width: 38px;
  height: 38px;
  border-radius: var(--radius-full);
  border: none;
  background: transparent;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--color-header-icon);
  transition: background .15s;
  flex-shrink: 0;
}
.shop-icon-btn:hover { background: color-mix(in srgb, var(--color-header-icon) 10%, transparent); }
.shop-icon-btn svg { width: 22px; height: 22px; stroke: currentColor; fill: none; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }

/* Keep cart-btn class working for legacy references */
.cart-btn { /* inherits .shop-icon-btn via HTML class */ }

.cart-badge, .bnav-cart-badge {
  position: absolute;
  top: 4px;
  right: 4px;
  background: #EF4444;
  color: #fff;
  border-radius: var(--radius-full);
  font-size: .65rem;
  font-weight: 700;
  min-width: 16px;
  height: 16px;
  line-height: 16px;
  text-align: center;
  padding: 0 4px;
  font-variant-numeric: tabular-nums;
  display: none;
}
.cart-badge.visible, .bnav-cart-badge.visible { display: block; }

.sidebar-toggle {
  background: none;
  border: none;
  cursor: pointer;
  padding: 8px;
  border-radius: var(--radius);
  color: var(--color-header-icon);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.15s;
  flex-shrink: 0;
}

.sidebar-toggle:hover { background: color-mix(in srgb, var(--color-header-icon) 10%, transparent); }
.sidebar-toggle svg { width: 20px; height: 20px; stroke: currentColor; fill: none; }

@media (min-width: 1024px) {
  .sidebar-toggle { display: none; }
}

/* ─── Category Pills ─────────────────────────────────────── */
.category-pills-wrap {
  position: sticky;
  top: 56px;
  z-index: 90;
  background: var(--color-bg);
  border-bottom: 1px solid var(--color-border);
  display: flex;
  align-items: center;
  overflow: hidden;
}

.pills-arrow {
  flex-shrink: 0;
  width: 36px;
  height: 42px;
  border: none;
  background: transparent;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--color-text-muted);
  padding: 0;
  transition: color .15s;
}
.pills-arrow:hover { color: var(--color-text); }
.pills-arrow svg {
  width: 18px;
  height: 18px;
  stroke: currentColor;
  fill: none;
  stroke-width: 2.5;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.category-pills {
  flex: 1;
  min-width: 0;
  display: flex;
  gap: 8px;
  align-items: center;
  padding: 10px 4px;
  overflow-x: auto;
  scrollbar-width: none;
  -webkit-overflow-scrolling: touch;
}

.category-pills::-webkit-scrollbar { display: none; }

.category-pill {
  flex-shrink: 0;
  padding: 6px 16px;
  border-radius: var(--radius-full);
  border: 1.5px solid var(--color-border);
  background: transparent;
  font-size: .85rem;
  font-weight: 500;
  color: var(--color-text-muted);
  cursor: pointer;
  white-space: nowrap;
  transition: all .18s ease;
  line-height: 1.4;
}

.category-pill:hover { border-color: var(--color-primary); color: var(--color-primary); }

.category-pill.active {
  background: var(--color-primary);
  border-color: var(--color-primary);
  color: #fff;
}

/* ─── Search Bar (collapsible) ───────────────────────────── */
.shop-search-bar {
  padding: 10px 16px;
  background: var(--color-bg);
  border-bottom: 1px solid var(--color-border);
  position: sticky;
  top: 112px; /* 56px header + 56px pills */
  z-index: 85;
}

/* ─── Layout ──────────────────────────────────────────────── */
.shop-layout {
  display: flex;
  min-height: calc(100vh - 56px);
}

/* ─── Sidebar ─────────────────────────────────────────────── */
.shop-sidebar {
  width: 240px;
  flex-shrink: 0;
  background: var(--color-surface);
  border-right: 1px solid var(--color-border);
  overflow-y: auto;
  position: fixed;
  top: 56px;
  left: 0;
  height: calc(100vh - 56px);
  z-index: 80;
  transform: translateX(-100%);
  transition: transform 0.25s ease;
  padding: 16px 0;
}

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

@media (max-width: 1023px) {
  .shop-sidebar.open { z-index: 95; }
}

@media (min-width: 1024px) {
  .shop-sidebar {
    position: sticky;
    top: 56px; /* fica logo abaixo do header sticky */
    height: calc(100vh - 56px);
    overflow-y: auto;
    transform: none;
    flex-shrink: 0;
  }
}

.sidebar-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.4);
  z-index: 79;
}

/* When visible: raises above pills-wrap (90) so sidebar content is fully accessible */
.sidebar-overlay.visible { display: block; z-index: 93; }

@media (min-width: 1024px) {
  .sidebar-overlay { display: none !important; }
}

/* ─── Category Nav ───────────────────────────────────────── */
.category-nav {
  list-style: none;
  margin: 0;
  padding: 0 8px;
}

.category-nav-item {
  margin-bottom: 2px;
}

.category-nav-btn {
  display: flex;
  align-items: center;
  width: 100%;
  background: none;
  border: none;
  cursor: pointer;
  padding: 8px 12px;
  border-radius: var(--radius);
  font-size: 14px;
  color: var(--color-text-muted);
  text-align: left;
  gap: 8px;
  transition: background 0.15s, color 0.15s;
}

.category-nav-btn:hover {
  background: var(--color-border);
  color: var(--color-text);
}

.category-nav-btn.active {
  background: var(--color-primary);
  color: #fff;
  font-weight: 600;
}

.category-nav-btn .cat-arrow {
  margin-left: auto;
  width: 14px;
  height: 14px;
  stroke: currentColor;
  fill: none;
  transition: transform 0.2s;
}

.category-nav-item.expanded > .category-nav-btn .cat-arrow {
  transform: rotate(90deg);
}

.category-children {
  display: none;
  list-style: none;
  margin: 0;
  padding: 0 0 0 16px;
}

.category-nav-item.expanded > .category-children { display: block; }

/* ─── Main Content ───────────────────────────────────────── */
.shop-main {
  flex: 1;
  padding: 16px 12px;
  /* CTA bar ≈ 90px + bnav 60px on mobile */
  padding-bottom: calc(var(--bnav-height) + 90px);
  min-width: 0;
}

@media (min-width: 1024px) {
  .shop-main {
    padding: 24px;
    padding-bottom: 32px;
  }
}

/* ─── Search Bar ─────────────────────────────────────────── */
.shop-search {
  display: flex;
  align-items: center;
  gap: 10px;
  background: var(--color-surface);
  border: 1.5px solid var(--color-border);
  border-radius: var(--radius-full);
  padding: 0 16px;
  height: 42px;
  transition: border-color .15s;
}

.shop-search:focus-within { border-color: var(--color-primary); }

.shop-search svg {
  width: 18px;
  height: 18px;
  stroke: var(--color-text-muted);
  fill: none;
  flex-shrink: 0;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.shop-search input {
  flex: 1;
  border: none;
  background: none;
  font-size: .9rem;
  color: var(--color-text);
  outline: none;
  padding: 0;
}

.shop-search input::placeholder { color: var(--color-text-muted); }

.search-close-btn {
  background: none;
  border: none;
  cursor: pointer;
  padding: 4px;
  color: var(--color-text-muted);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  border-radius: var(--radius-full);
  transition: color .15s, background .15s;
}
.search-close-btn:hover { color: var(--color-text); background: var(--color-border); }
.search-close-btn svg { width: 18px; height: 18px; stroke: currentColor; fill: none; stroke-width: 2.5; stroke-linecap: round; stroke-linejoin: round; }

/* ─── Product Grid ───────────────────────────────────────── */
.product-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

@media (min-width: 640px) {
  .product-grid { grid-template-columns: repeat(3, 1fr); gap: 16px; }
}

@media (min-width: 1024px) {
  .product-grid { grid-template-columns: repeat(4, 1fr); gap: 20px; }
}

/* ─── Product Card ───────────────────────────────────────── */
.product-card {
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
  overflow: hidden;
  cursor: pointer;
  transition: transform .18s ease, box-shadow .18s ease;
  display: flex;
  flex-direction: column;
}

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

.product-card.out-of-stock { opacity: 0.65; }

/* Portrait image wrap (3:4 ratio) */
.product-card-img-wrap {
  position: relative;
  aspect-ratio: 3 / 4;
  overflow: hidden;
  background: var(--color-surface);
}

.product-card-img-wrap img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform .3s ease;
}

.product-card:hover .product-card-img-wrap img { transform: scale(1.04); }

/* Placeholder for cards without image */
.product-image-placeholder {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--color-text-muted);
}

.product-image-placeholder svg {
  width: 40px;
  height: 40px;
  stroke: currentColor;
  fill: none;
  opacity: 0.35;
}

/* Discount badge */
.badge-discount {
  position: absolute;
  top: 8px;
  left: 8px;
  background: #EF4444;
  color: #fff;
  font-size: .7rem;
  font-weight: 700;
  padding: 2px 7px;
  border-radius: var(--radius-full);
  line-height: 1.4;
  z-index: 1;
}

/* Out of stock badge */
.badge-out-of-stock {
  position: absolute;
  top: 8px;
  left: 8px;
  background: rgba(0,0,0,0.55);
  color: #fff;
  font-size: .7rem;
  font-weight: 600;
  padding: 2px 7px;
  border-radius: var(--radius-full);
  text-transform: uppercase;
  letter-spacing: .04em;
  z-index: 1;
}

/* Full-width Adicionar + button (Pague Menos style) */
.btn-card-add {
  width: 100%;
  background: var(--color-primary);
  color: #fff;
  border: none;
  border-radius: var(--radius);
  padding: 9px 12px;
  margin-top: 8px;
  font-size: .875rem;
  font-weight: 600;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  transition: background .15s ease;
  flex-shrink: 0;
}

.btn-card-add:hover { background: var(--color-primary-hover); }
.btn-card-add:active { transform: scale(.98); }

.btn-card-remove {
  background: #EF4444;
}
.btn-card-remove:hover { background: #DC2626; }
.btn-card-remove svg { stroke: #fff; }

.btn-card-add svg {
  width: 16px;
  height: 16px;
  stroke: #fff;
  fill: none;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
  flex-shrink: 0;
}

/* ─── Card Quantity Stepper ──────────────────────────────── */
.card-qty-stepper {
  display: none;
  align-items: center;
  width: 100%;
  border-radius: var(--radius);
  overflow: hidden;
  border: 1.5px solid var(--color-primary);
  height: 40px;
  margin-top: 4px;
}

.card-qty-btn {
  background: transparent;
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--color-primary);
  padding: 0 12px;
  height: 100%;
  flex-shrink: 0;
  transition: background 0.15s;
}
.card-qty-btn:hover {
  background: color-mix(in srgb, var(--color-primary) 12%, transparent);
}

.card-qty-value {
  flex: 1;
  text-align: center;
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--color-text);
  font-variant-numeric: tabular-nums;
  border-left: 1.5px solid var(--color-primary);
  border-right: 1.5px solid var(--color-primary);
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  pointer-events: none;
}

.card-qty-remove {
  background: #EF4444;
  color: #fff;
  padding: 0 10px;
}
.card-qty-remove:hover { background: #DC2626; }
.card-qty-remove svg {
  width: 15px;
  height: 15px;
  stroke: currentColor;
  fill: none;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
  pointer-events: none;
}

/* ─── Checkout CTA Bar (fixed bottom, mobile) ────────────── */
.checkout-cta-bar {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  background: var(--color-bg);
  border-top: 1px solid var(--color-border);
  padding: 10px 16px calc(14px + env(safe-area-inset-bottom, 0px));
  z-index: 300;
  box-shadow: 0 -4px 20px rgba(0,0,0,.1);
}

@media (min-width: 1024px) {
  .checkout-cta-bar { display: none; }
}

.checkout-cta-subtotal {
  font-size: 13px;
  color: var(--color-text-muted);
  text-align: center;
  margin: 0 0 8px;
  font-variant-numeric: tabular-nums;
}

.checkout-cta-subtotal:empty { display: none; }

.checkout-cta-btn {
  width: 100%;
  height: 52px;
  background: #25D366;
  color: #fff;
  border: none;
  border-radius: var(--radius);
  font-size: 15px;
  font-weight: 700;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  letter-spacing: .01em;
}

.checkout-cta-btn:hover { background: #1daa50; }
.checkout-cta-btn:active { background: #1a9946; transform: scale(.99); }

/* Card body */
.product-card-body {
  padding: 10px 10px 12px;
  display: flex;
  flex-direction: column;
  gap: 3px;
  flex: 1;
}

.product-card-name {
  font-size: .85rem;
  font-weight: 600;
  color: var(--color-text);
  line-height: 1.3;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  margin: 0;
}

.product-card-price {
  font-size: .95rem;
  font-weight: 700;
  color: var(--color-primary);
  font-variant-numeric: tabular-nums;
  margin: 4px 0 0;
}

.product-card-price-from {
  font-size: .72rem;
  font-weight: 500;
  color: var(--color-text-muted);
  margin-right: 2px;
}

.product-card-compare {
  font-size: .78rem;
  color: var(--color-text-muted);
  text-decoration: line-through;
  font-variant-numeric: tabular-nums;
  margin: 0;
}

.product-card-stock {
  font-size: .73rem;
  color: var(--color-text-muted);
  margin: 2px 0 0;
}

/* Legacy selectors — kept for cart items and modal */
.price-row {
  display: flex;
  align-items: baseline;
  gap: 6px;
  margin-top: auto;
  padding-top: 6px;
}

.price {
  font-size: 14px;
  font-weight: 700;
  color: var(--color-primary);
  font-variant-numeric: tabular-nums;
}

.compare-price {
  font-size: 12px;
  color: var(--color-text-muted);
  text-decoration: line-through;
  font-variant-numeric: tabular-nums;
}

/* Legacy add-to-cart button (kept for possible future use) */
.btn-add-to-cart {
  margin-top: 8px;
  background: var(--color-primary);
  color: #fff;
  border: none;
  border-radius: var(--radius);
  padding: 7px 12px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  width: 100%;
  transition: background 0.15s;
}

.btn-add-to-cart:hover { background: var(--color-accent); }
.btn-add-to-cart:disabled { opacity: 0.5; cursor: not-allowed; }

/* ─── Skeleton Cards ─────────────────────────────────────── */
.skeleton-card {
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  overflow: hidden;
}

.skeleton-img {
  aspect-ratio: 3 / 4;
  background: var(--color-surface);
  position: relative;
  overflow: hidden;
}

.skeleton-img::after,
.skeleton-line::after,
.skeleton-btn::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, transparent 0%, rgba(255,255,255,0.3) 50%, transparent 100%);
  animation: shimmer 1.2s infinite;
}

.skeleton-line {
  height: 12px;
  background: var(--color-surface);
  border-radius: 4px;
  position: relative;
  overflow: hidden;
}

.skeleton-btn {
  height: 36px;
  border-radius: 6px;
  background: var(--color-surface);
  position: relative;
  overflow: hidden;
  margin-top: 4px;
}

.skeleton-body { padding: 10px 12px 12px; display: flex; flex-direction: column; gap: 8px; }

@keyframes shimmer {
  from { transform: translateX(-100%); }
  to   { transform: translateX(100%); }
}

/* ─── Skeleton: Category Pills ───────────────────────────── */
.skeleton-pill {
  height: 34px;
  border-radius: 99px;
  background: var(--color-surface);
  flex-shrink: 0;
  position: relative;
  overflow: hidden;
}
.skeleton-pill::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, transparent 0%, rgba(255,255,255,0.3) 50%, transparent 100%);
  animation: shimmer 1.2s infinite;
}

/* ─── Skeleton: Layout Sections ──────────────────────────── */
.skeleton-banner-block {
  width: 100%;
  aspect-ratio: 16 / 4;
  max-height: 320px;
  border-radius: var(--radius-lg);
  background: var(--color-surface);
  position: relative;
  overflow: hidden;
  margin-bottom: 24px;
}
.skeleton-banner-block::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, transparent 0%, rgba(255,255,255,0.3) 50%, transparent 100%);
  animation: shimmer 1.2s infinite;
}

@media (max-width: 640px) {
  .skeleton-banner-block { aspect-ratio: 16 / 7; }
}

.skeleton-section-block {
  margin-bottom: 28px;
}

.skeleton-section-title {
  height: 18px;
  width: 160px;
  border-radius: 6px;
  background: var(--color-surface);
  margin-bottom: 14px;
  position: relative;
  overflow: hidden;
}
.skeleton-section-title::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, transparent 0%, rgba(255,255,255,0.3) 50%, transparent 100%);
  animation: shimmer 1.2s infinite;
}

.skeleton-category-row {
  display: flex;
  gap: 12px;
  overflow: hidden;
}

.skeleton-category-card {
  flex: 0 0 100px;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.skeleton-category-img {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  background: var(--color-surface);
  position: relative;
  overflow: hidden;
}
.skeleton-category-img::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, transparent 0%, rgba(255,255,255,0.3) 50%, transparent 100%);
  animation: shimmer 1.2s infinite;
}

.skeleton-product-row {
  display: flex;
  gap: 12px;
  overflow: hidden;
}

.skeleton-card-row {
  flex: 0 0 140px;
}

/* ─── Empty State ────────────────────────────────────────── */
.empty-state {
  text-align: center;
  padding: 64px 20px;
  color: var(--color-text-muted);
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

.empty-state svg {
  width: 56px;
  height: 56px;
  stroke: currentColor;
  fill: none;
  opacity: 0.4;
  margin: 0 auto 16px;
}

.empty-state h3 { font-size: 16px; font-weight: 600; margin: 0 0 6px; color: var(--color-text); }
.empty-state p  { font-size: 14px; margin: 0; }

/* ─── Sentinel (infinite scroll) ────────────────────────── */
#scroll-sentinel { height: 1px; }

/* ─── Buttons ────────────────────────────────────────────── */
.btn-primary {
  background: var(--color-primary);
  color: #fff;
  border: none;
  border-radius: var(--radius);
  padding: 10px 20px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.15s;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.btn-primary:hover { background: var(--color-accent); }
.btn-primary:disabled { opacity: 0.5; cursor: not-allowed; }

.btn-secondary {
  background: var(--color-surface);
  color: var(--color-text);
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  padding: 10px 20px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.15s;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.btn-secondary:hover { background: var(--color-border); }

.btn-icon {
  background: none;
  border: none;
  cursor: pointer;
  padding: 6px;
  border-radius: var(--radius);
  color: var(--color-text-muted);
  display: flex;
  align-items: center;
  transition: background 0.15s, color 0.15s;
}

.btn-icon:hover { background: var(--color-surface); color: var(--color-text); }
.btn-icon svg { width: 16px; height: 16px; stroke: currentColor; fill: none; }

/* ─── Qty Stepper ────────────────────────────────────────── */
.qty-stepper {
  display: flex;
  align-items: center;
  gap: 0;
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  overflow: hidden;
  width: fit-content;
}

.qty-stepper button {
  background: var(--color-surface);
  border: none;
  cursor: pointer;
  width: 30px;
  height: 30px;
  font-size: 16px;
  color: var(--color-text);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.15s;
  flex-shrink: 0;
}

.qty-stepper button:hover { background: var(--color-border); }

.qty-stepper .qty-value {
  min-width: 36px;
  height: 30px;
  line-height: 30px;
  text-align: center;
  font-size: 14px;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
  color: var(--color-text);
  user-select: none;
}

/* ─── Bottom Navigation ──────────────────────────────────── */
.shop-bottom-nav {
  display: none;
}

@media (max-width: 767px) {
  .shop-bottom-nav {
    display: flex;
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    height: var(--bnav-height);
    background: var(--bnav-bg);
    border-top: 1px solid var(--bnav-border);
    z-index: 200;
    box-shadow: 0 -2px 12px rgba(0,0,0,.06);
  }
}

.bottom-nav-btn {
  flex: 1;
  border: none;
  background: transparent;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
  cursor: pointer;
  color: var(--bnav-icon-color);
  font-size: .68rem;
  font-weight: 500;
  transition: color .15s ease;
  padding: 8px 4px;
}

.bottom-nav-btn svg {
  width: 22px;
  height: 22px;
  stroke: currentColor;
  fill: none;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
  flex-shrink: 0;
}

.bottom-nav-btn.active { color: var(--bnav-icon-active); }

/* ─── Product Modal ──────────────────────────────────────── */
.modal-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.6);
  z-index: 400;
  align-items: flex-end;
  justify-content: center;
}

.modal-overlay.open { display: flex; }

@media (min-width: 640px) {
  .modal-overlay { align-items: center; }
}

.product-modal {
  background: var(--color-bg);
  width: 100%;
  max-height: 92vh;
  border-radius: var(--radius-xl) var(--radius-xl) 0 0;
  overflow: hidden;
  position: relative;
  animation: slideUp 0.25s ease;
  display: flex;
  flex-direction: column;
}

@media (min-width: 640px) {
  .product-modal {
    max-width: 760px;
    border-radius: var(--radius-xl);
    max-height: 90vh;
    animation: fadeIn 0.2s ease;
  }
}

/* Scrollable area inside modal (gallery + body) */
.modal-scroll-area {
  flex: 1;
  overflow-y: auto;
  min-height: 0;
}

@keyframes slideUp {
  from { transform: translateY(100%); }
  to   { transform: translateY(0); }
}

@keyframes fadeIn {
  from { opacity: 0; transform: scale(0.97); }
  to   { opacity: 1; transform: scale(1); }
}

.modal-close {
  position: absolute;
  top: 12px;
  right: 12px;
  background: var(--color-surface);
  border: none;
  border-radius: 50%;
  width: 32px;
  height: 32px;
  cursor: pointer;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--color-text);
  transition: background 0.15s;
}

.modal-close:hover { background: var(--color-border); }
.modal-close svg { width: 16px; height: 16px; stroke: currentColor; fill: none; }

.modal-gallery {
  position: relative;
}

.modal-gallery-main {
  width: 100%;
  padding-top: 60%;
  position: relative;
  background: var(--color-surface);
  overflow: hidden;
}

.modal-gallery-main img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* Fullscreen button overlay on gallery image */
.modal-fullscreen-btn {
  position: absolute;
  bottom: 8px;
  right: 8px;
  width: 32px;
  height: 32px;
  border: none;
  border-radius: 50%;
  background: rgba(0,0,0,0.45);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  z-index: 5;
  transition: background 0.15s;
}
.modal-fullscreen-btn:hover { background: rgba(0,0,0,0.65); }
.modal-fullscreen-btn svg { width: 15px; height: 15px; stroke: currentColor; fill: none; }
.modal-fullscreen-btn[hidden] { display: none; }

/* ─── Fullscreen Image Lightbox ────────────────────────── */
.img-fullscreen-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.95);
  z-index: 600;
  align-items: center;
  justify-content: center;
}
.img-fullscreen-overlay.open { display: flex; }
.img-fullscreen-overlay img {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
}
.img-fullscreen-close {
  position: absolute;
  top: 16px;
  right: 16px;
  width: 40px;
  height: 40px;
  border: none;
  border-radius: 50%;
  background: rgba(255,255,255,0.15);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}
.img-fullscreen-close svg { width: 18px; height: 18px; stroke: currentColor; fill: none; }

.modal-thumbs {
  display: flex;
  gap: 6px;
  padding: 8px 16px;
  overflow-x: auto;
}

.modal-thumb {
  width: 52px;
  height: 52px;
  border-radius: var(--radius);
  overflow: hidden;
  cursor: pointer;
  flex-shrink: 0;
  border: 2px solid transparent;
  transition: border-color 0.15s;
}

.modal-thumb.active { border-color: var(--color-primary); }
.modal-thumb img { width: 100%; height: 100%; object-fit: cover; }

.modal-body { padding: 16px; }

.modal-title {
  font-size: 20px;
  font-weight: 700;
  margin: 0 0 6px;
  color: var(--color-text);
}

.modal-sku { font-size: 12px; color: var(--color-text-muted); margin: 0 0 10px; }

.modal-price-row {
  display: flex;
  align-items: baseline;
  gap: 10px;
  margin-bottom: 12px;
}

.modal-price {
  font-size: 24px;
  font-weight: 700;
  color: var(--color-primary);
  font-variant-numeric: tabular-nums;
}

.modal-compare-price {
  font-size: 16px;
  color: var(--color-text-muted);
  text-decoration: line-through;
  font-variant-numeric: tabular-nums;
}

.modal-description {
  font-size: 14px;
  color: var(--color-text-muted);
  line-height: 1.7;
  margin: 0 0 14px;
}
.modal-description p { margin: 0 0 10px; }
.modal-description p:last-child { margin-bottom: 0; }
.modal-description h1,
.modal-description h2,
.modal-description h3 { font-size: 1rem; font-weight: 700; color: var(--color-text); margin: 12px 0 6px; }
.modal-description ul,
.modal-description ol { padding-left: 20px; margin: 0 0 10px; }
.modal-description li { margin-bottom: 4px; }
.modal-description strong { color: var(--color-text); }
.modal-description a { color: var(--color-primary); }
.modal-description code { background: var(--color-surface); padding: 1px 5px; border-radius: 4px; font-size: .85em; }

.modal-attributes {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 16px;
}

.attr-badge {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  padding: 3px 10px;
  font-size: 12px;
  color: var(--color-text-muted);
}

.attr-badge strong { color: var(--color-text); }

/* ─── Modifier groups (delivery-style, mobile-first) ──────── */

.modal-modifiers {
  margin-top: 8px;
}

.modifier-group {
  margin-bottom: 4px;
  border-radius: 10px;
  overflow: hidden;
  border: 1.5px solid var(--color-border);
  transition: border-color .15s;
}

.modifier-group--error {
  border-color: var(--color-danger, #ef4444);
  animation: shake .3s ease;
}

@keyframes shake {
  0%, 100% { transform: translateX(0); }
  25% { transform: translateX(-4px); }
  75% { transform: translateX(4px); }
}

.modifier-group-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 14px 10px;
  background: var(--color-surface-alt, #f8f8f8);
  gap: 10px;
}

.modifier-group-title {
  font-size: .95rem;
  font-weight: 700;
  color: var(--color-text);
  flex: 1;
}

.modifier-group-header-right {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 3px;
  flex-shrink: 0;
}

.modifier-required-badge {
  font-size: .68rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .03em;
  padding: 2px 7px;
  border-radius: 20px;
  background: color-mix(in srgb, var(--color-primary) 14%, transparent);
  color: var(--color-primary);
  border: 1px solid color-mix(in srgb, var(--color-primary) 28%, transparent);
}

.modifier-optional-badge {
  font-size: .68rem;
  font-weight: 600;
  padding: 2px 7px;
  border-radius: 20px;
  background: transparent;
  color: var(--color-text-muted);
  border: 1px solid var(--color-border);
}

.modifier-group-hint {
  font-size: .72rem;
  color: var(--color-text-muted);
  white-space: nowrap;
}

/* Items list */
.modifier-item-row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 14px;
  cursor: pointer;
  border-top: 1px solid var(--color-border);
  transition: background .1s;
  min-height: 56px;
}

.modifier-item-row:hover,
.modifier-item-row:has(input:checked) {
  background: color-mix(in srgb, var(--color-primary) 5%, transparent);
}

.modifier-item-input {
  width: 20px;
  height: 20px;
  flex-shrink: 0;
  accent-color: var(--color-primary);
  cursor: pointer;
}

.modifier-item-label {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}

.modifier-item-name {
  font-size: .95rem;
  color: var(--color-text);
  line-height: 1.3;
}

.modifier-item-desc {
  font-size: .78rem;
  color: var(--color-text-muted);
  line-height: 1.35;
  overflow: hidden;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

.modifier-item-right {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 6px;
  flex-shrink: 0;
}

.modifier-item-price {
  font-size: .875rem;
  font-weight: 600;
  color: var(--color-text-muted);
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.modifier-item-thumb {
  width: 64px;
  height: 64px;
  object-fit: cover;
  border-radius: 8px;
  cursor: pointer;
  transition: opacity .15s;
}

.modifier-item-thumb:hover { opacity: .85; }

.modifier-item-info-btn {
  background: transparent;
  border: none;
  padding: 4px;
  cursor: pointer;
  color: var(--color-text-muted);
  display: flex;
  align-items: center;
}

.modifier-item-info-btn svg { width: 18px; height: 18px; }
.modifier-item-info-btn:hover { color: var(--color-primary); }

/* ─── Modifier Item Detail Overlay ─────────────────────────── */

.modifier-detail-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,.55);
  z-index: 10100;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity .2s;
}

.modifier-detail-overlay.open {
  opacity: 1;
  pointer-events: all;
}

.modifier-detail-sheet {
  background: var(--color-bg);
  border-radius: 18px 18px 0 0;
  width: 100%;
  max-width: 560px;
  max-height: 90dvh;
  overflow-y: auto;
  position: relative;
  transform: translateY(24px);
  transition: transform .25s ease;
}

.modifier-detail-overlay.open .modifier-detail-sheet {
  transform: translateY(0);
}

.modifier-detail-close {
  position: absolute;
  top: 14px;
  right: 14px;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  border: none;
  background: color-mix(in srgb, var(--color-text) 10%, transparent);
  color: var(--color-text);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1;
}

.modifier-detail-close svg { width: 16px; height: 16px; }

.modifier-detail-img-wrap {
  width: 100%;
  aspect-ratio: 16/9;
  overflow: hidden;
  border-radius: 18px 18px 0 0;
}

.modifier-detail-img-wrap img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.modifier-detail-body {
  padding: 20px 20px 28px;
}

.modifier-detail-body h3 {
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--color-text);
  margin: 0 0 8px;
}

.modifier-detail-desc {
  font-size: .9rem;
  color: var(--color-text-muted);
  line-height: 1.55;
  margin: 0;
  white-space: pre-wrap;
}

/* Error hint below group */
.modifier-group--error + .modifier-error-hint,
.modifier-group--error::after {
  display: block;
  font-size: .75rem;
  color: var(--color-danger, #ef4444);
  padding: 4px 2px 0;
}

/* Scheduling: day chips (preview of available days for agenda products) */
.sched-day-chips {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding: 4px 2px 12px;
  scroll-snap-type: x mandatory;
  -webkit-overflow-scrolling: touch;
}

.sched-day-chip {
  flex: 0 0 auto;
  min-width: 72px;
  padding: 10px 12px;
  border: 1.5px solid var(--color-border);
  border-radius: 12px;
  background: var(--color-bg);
  cursor: pointer;
  text-align: center;
  scroll-snap-align: start;
  font-variant-numeric: tabular-nums;
  transition: background .15s, border-color .15s;
  font-family: inherit;
}

.sched-day-chip:hover:not(:disabled) {
  border-color: var(--color-primary);
}

.sched-day-chip.is-active {
  background: var(--color-primary-10);
  border-color: var(--color-primary);
}

.sched-day-chip:disabled,
.sched-day-chip[data-empty="true"] {
  opacity: .55;
  cursor: not-allowed;
}

.sched-day-chip .day-num {
  font-size: 1.15rem;
  font-weight: 700;
  line-height: 1;
  color: var(--color-text);
}

.sched-day-chip .day-dow {
  font-size: .7rem;
  text-transform: lowercase;
  color: var(--color-text-muted);
  margin-top: 2px;
}

.sched-day-chip .day-month {
  font-size: .65rem;
  text-transform: lowercase;
  color: var(--color-text-muted);
}

.sched-day-chip .day-vagas {
  font-size: .7rem;
  font-weight: 600;
  color: var(--color-primary);
  margin-top: 6px;
}

.sched-day-chip[data-empty="true"] .day-vagas {
  color: var(--color-text-muted);
}

.sched-day-chip.is-active .day-num,
.sched-day-chip.is-active .day-dow,
.sched-day-chip.is-active .day-month {
  color: var(--color-text);
}

/* ─────────────────────────────────────────────────────────── */

.modal-actions {
  display: flex;
  align-items: center;
  gap: 12px;
  padding-top: 8px;
}

/* Remove sticky from modal-actions — sched-nav-footer handles the sticky nav */
@media (max-width: 639px) {
  .product-modal:not(.scheduling-mode) .modal-actions {
    position: sticky;
    bottom: 0;
    background: var(--color-bg);
    padding: 12px 16px;
    margin: 0 -16px;
    border-top: 1px solid var(--color-border);
  }
}

/* Scheduling mode: .modal-actions scrolls naturally */
.product-modal.scheduling-mode .modal-actions {
  position: static;
  border-top: none;
  padding: 0;
  margin: 0;
}

/* ─── Sticky scheduling nav footer ─────────────────────── */
.sched-nav-footer {
  display: none;
  gap: 10px;
  padding: 12px 16px;
  padding-bottom: calc(12px + env(safe-area-inset-bottom, 0px));
  background: var(--color-bg);
  border-top: 1px solid var(--color-border);
  flex-shrink: 0;
}

/* ─── Collapsible description ───────────────────────────── */
.modal-description-wrap { margin-bottom: 8px; }

.modal-description {
  font-size: .875rem;
  line-height: 1.6;
  color: var(--color-text-muted);
  margin: 0;
  overflow: hidden;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  line-clamp: 3;
  -webkit-box-orient: vertical;
}
.modal-description.expanded {
  display: block;
  -webkit-line-clamp: unset;
  line-clamp: unset;
}

.modal-desc-toggle {
  background: none;
  border: none;
  padding: 4px 0 0;
  font-size: .8rem;
  font-weight: 600;
  color: var(--color-primary);
  cursor: pointer;
}

.modal-add-btn {
  flex: 1;
  background: var(--color-primary);
  color: #fff;
  border: none;
  border-radius: var(--radius);
  padding: 12px 20px;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.15s;
}

.modal-add-btn:hover { background: var(--color-accent); }
.modal-add-btn:disabled { opacity: 0.5; cursor: not-allowed; }

/* ─── Cart Drawer ────────────────────────────────────────── */
.cart-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.5);
  z-index: 350;
}

.cart-overlay.open { display: block; }

.cart-drawer {
  position: fixed;
  top: 0;
  right: 0;
  bottom: 0;
  width: 100%;
  max-width: 400px;
  background: var(--color-bg);
  z-index: 351;
  display: flex;
  flex-direction: column;
  transform: translateX(100%);
  transition: transform 0.3s ease;
  box-shadow: -4px 0 24px rgba(0,0,0,0.15);
}

.cart-drawer.open { transform: translateX(0); }

.cart-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 20px;
  border-bottom: 1px solid var(--color-border);
}

.cart-header h2 {
  font-size: 17px;
  font-weight: 700;
  margin: 0;
}

.cart-body {
  flex: 1;
  overflow-y: auto;
  padding: 12px 0;
}

.cart-empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  height: 200px;
  gap: 12px;
  color: var(--color-text-muted);
  font-size: 14px;
}

.cart-empty svg {
  width: 48px;
  height: 48px;
  stroke: currentColor;
  fill: none;
  opacity: 0.4;
}

/* ─── Cart Item ──────────────────────────────────────────── */
/* ─── Cart summary rows (matches checkout modal style) ──────── */

.cart-summary-row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 20px;
  font-size: 14px;
  border-bottom: 1px solid var(--color-border);
}

.cart-summary-row:last-child { border-bottom: none; }

.cart-summary-name {
  flex: 1;
  color: var(--color-text);
  line-height: 1.4;
}

.cart-summary-stepper {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-shrink: 0;
}

.cart-summary-stepper button {
  width: 26px;
  height: 26px;
  border-radius: 50%;
  border: 1.5px solid var(--color-border);
  background: transparent;
  color: var(--color-text);
  font-size: 1rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  line-height: 1;
  transition: background .1s, border-color .1s;
}

.cart-summary-stepper button:hover:not(:disabled) {
  border-color: var(--color-primary);
  color: var(--color-primary);
}

.cart-summary-stepper button:disabled { opacity: .35; cursor: default; }

.cart-summary-qty {
  font-size: .9rem;
  font-weight: 600;
  min-width: 18px;
  text-align: center;
  font-variant-numeric: tabular-nums;
}

.cart-summary-remove {
  background: transparent;
  border: none;
  color: var(--color-text-muted);
  cursor: pointer;
  padding: 4px;
  border-radius: 4px;
  display: flex;
  align-items: center;
  flex-shrink: 0;
  opacity: .6;
  transition: opacity .1s, color .1s;
}

.cart-summary-remove:hover {
  opacity: 1;
  color: var(--color-danger, #ef4444);
}

/* legacy — kept for any remaining references */
.cart-item {
  display: flex;
  gap: 12px;
  padding: 12px 20px;
  align-items: flex-start;
}

.cart-item + .cart-item {
  border-top: 1px solid var(--color-border);
}

.cart-item-img {
  width: 60px;
  height: 60px;
  border-radius: var(--radius);
  object-fit: cover;
  flex-shrink: 0;
  background: var(--color-surface);
}

.cart-item-info { flex: 1; min-width: 0; }

.cart-item-name {
  font-size: 13px;
  font-weight: 600;
  color: var(--color-text);
  margin: 0 0 4px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.cart-item-price {
  font-size: 13px;
  color: var(--color-primary);
  font-weight: 600;
  font-variant-numeric: tabular-nums;
  margin: 0 0 8px;
}

.cart-item-subtitle {
  font-size: .72rem;
  color: var(--color-text-muted);
  margin: 1px 0 4px;
  line-height: 1.3;
}

.cart-item-time-badge {
  display: inline-flex;
  align-items: center;
  font-size: .78rem;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
  color: var(--color-primary);
  background: color-mix(in srgb, var(--color-primary) 12%, transparent);
  border: 1px solid color-mix(in srgb, var(--color-primary) 25%, transparent);
  border-radius: 20px;
  padding: 2px 9px;
  white-space: nowrap;
}

.order-item-subtitle {
  font-size: .72rem;
  color: var(--color-text-muted);
  margin-top: 1px;
}

.order-item-mod-group {
  font-size: .75rem;
  font-weight: 600;
  color: var(--color-text-muted);
  margin-top: 4px;
  display: inline-block;
}

.cart-item-controls {
  display: flex;
  align-items: center;
  gap: 8px;
}

/* ─── Cart Footer ────────────────────────────────────────── */
.cart-footer {
  padding: 16px 20px;
  border-top: 1px solid var(--color-border);
}

.cart-subtotal {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 15px;
  margin-bottom: 12px;
}

.cart-subtotal-label { color: var(--color-text-muted); }

.cart-subtotal-value {
  font-weight: 700;
  color: var(--color-text);
  font-variant-numeric: tabular-nums;
}

.btn-checkout {
  width: 100%;
  background: #25D366;
  color: #fff;
  border: none;
  border-radius: var(--radius);
  padding: 13px;
  font-size: 15px;
  font-weight: 700;
  cursor: pointer;
  transition: background 0.15s;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

.btn-checkout:hover { background: #1ebe59; }
.btn-checkout:disabled { opacity: 0.5; cursor: not-allowed; }

.btn-checkout svg { width: 18px; height: 18px; fill: currentColor; }

.cart-no-session {
  font-size: 12px;
  color: var(--color-text-muted);
  text-align: center;
  padding: 10px;
  line-height: 1.5;
}

/* ─── Checkout Modal ─────────────────────────────────────── */
.checkout-modal-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.7);
  z-index: 400;
  align-items: flex-end;
  justify-content: center;
}

.checkout-modal-overlay.open { display: flex; }

@media (min-width: 640px) {
  .checkout-modal-overlay { align-items: center; }
}

.checkout-modal {
  background: var(--color-bg);
  width: 100%;
  max-width: 480px;
  border-radius: var(--radius-lg) var(--radius-lg) 0 0;
  overflow-y: auto;
  max-height: 90vh;
  animation: slideUp 0.25s ease;
}

@media (min-width: 640px) {
  .checkout-modal {
    border-radius: var(--radius-lg);
    animation: fadeIn 0.2s ease;
  }
}

.checkout-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px 20px 0;
}

.checkout-header h2 { font-size: 18px; font-weight: 700; margin: 0; }

.checkout-body { padding: 16px 20px; }

.order-summary { margin-bottom: 16px; }

.order-summary-item {
  display: flex;
  justify-content: space-between;
  font-size: 14px;
  padding: 6px 0;
  border-bottom: 1px solid var(--color-border);
  gap: 12px;
}

.order-summary-item:last-child { border-bottom: none; }

.order-item-name {
  color: var(--color-text);
  flex: 1;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.order-item-qty { color: var(--color-text-muted); font-variant-numeric: tabular-nums; }
.order-item-total { font-weight: 600; font-variant-numeric: tabular-nums; }

.order-total-row {
  display: flex;
  justify-content: space-between;
  font-size: 16px;
  font-weight: 700;
  padding-top: 12px;
  margin-top: 4px;
  border-top: 2px solid var(--color-border);
}

.order-total-value { color: var(--color-primary); font-variant-numeric: tabular-nums; }

.checkout-note label {
  display: block;
  font-size: 13px;
  font-weight: 600;
  color: var(--color-text);
  margin-bottom: 6px;
}

.checkout-note textarea {
  width: 100%;
  height: 80px;
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  padding: 10px 12px;
  font-size: 14px;
  color: var(--color-text);
  background: var(--color-surface);
  resize: vertical;
  font-family: inherit;
  outline: none;
  transition: border-color 0.15s;
}

.checkout-note textarea:focus { border-color: var(--color-primary); }

.checkout-footer {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 16px 20px 24px;
}

/* ─── Checkout Success ───────────────────────────────────── */
.checkout-success {
  text-align: center;
  padding: 40px 20px;
}

.success-check {
  width: 64px;
  height: 64px;
  background: #22c55e;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 16px;
  animation: popIn 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.success-check svg {
  width: 34px;
  height: 34px;
  stroke: #fff;
  fill: none;
  stroke-width: 2.5;
}

@keyframes popIn {
  from { transform: scale(0); opacity: 0; }
  to   { transform: scale(1); opacity: 1; }
}

.checkout-success h3 { font-size: 20px; font-weight: 700; margin: 0 0 6px; }
.checkout-success p  { font-size: 14px; color: var(--color-text-muted); margin: 0; }

/* ─── Toast ──────────────────────────────────────────────── */
.shop-toast-container {
  position: fixed;
  top: 16px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 1500;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  pointer-events: none;
  width: max-content;
  max-width: calc(100vw - 32px);
}

.shop-toast {
  background: var(--color-text);
  color: var(--color-bg);
  padding: 11px 20px;
  border-radius: var(--radius-full);
  font-size: 13px;
  font-weight: 500;
  max-width: 360px;
  box-shadow: 0 4px 20px rgba(0,0,0,0.25);
  animation: toastIn 0.25s ease;
  pointer-events: auto;
  text-align: center;
  white-space: nowrap;
}

@media (max-width: 767px) {
  .shop-toast {
    font-size: 0.9rem;
    padding: 12px 20px;
    white-space: normal;
    max-width: calc(100vw - 32px);
  }
}

.shop-toast.success { background: #22c55e; color: #fff; }
.shop-toast.error   { background: #ef4444; color: #fff; }
.shop-toast.warning { background: #f59e0b; color: #fff; }
.shop-toast.info    { background: var(--color-primary); color: #fff; }

@keyframes toastIn {
  from { transform: translateY(-12px); opacity: 0; }
  to   { transform: translateY(0);     opacity: 1; }
}

/* ─── Sections Container ─────────────────────────────────── */
#sections-container {
  padding: 0 0 24px;
}

/* ─── Section Block ──────────────────────────────────────── */
.section-block {
  margin-bottom: 32px;
}

.section-title {
  font-size: 1.125rem;
  font-weight: 600;
  color: var(--color-text);
  margin: 0 0 12px;
}

.section-desc {
  font-size: 0.875rem;
  color: var(--color-text-muted);
  margin: -8px 0 12px;
}

/* ─── Banner Carousel ────────────────────────────────────── */
.banner-carousel {
  position: relative;
  overflow: hidden;
  border-radius: var(--radius-lg);
  aspect-ratio: 16 / 4;
  max-height: 320px;
  background: var(--color-surface);
}

@media (max-width: 640px) {
  .banner-carousel { aspect-ratio: 16 / 7; }
}

.carousel-track {
  display: flex;
  height: 100%;
  transition: transform 0.45s ease;
}

.banner-slide {
  flex: 0 0 100%;
  height: 100%;
}

.banner-slide-inner {
  display: block;
  width: 100%;
  height: 100%;
  text-decoration: none;
}

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

.carousel-arrow {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: rgba(0, 0, 0, 0.45);
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  z-index: 2;
  transition: background 0.15s;
}

.carousel-arrow:hover {
  background: rgba(0, 0, 0, 0.65);
}

.carousel-arrow.prev { left: 10px; }
.carousel-arrow.next { right: 10px; }

.carousel-arrow svg {
  width: 18px;
  height: 18px;
  stroke: currentColor;
  fill: none;
  stroke-width: 2.5;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.carousel-indicators {
  position: absolute;
  bottom: 10px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: 6px;
  z-index: 2;
}

.carousel-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.5);
  border: none;
  cursor: pointer;
  padding: 0;
  transition: background 0.15s, transform 0.15s;
}

.carousel-dot.active {
  background: #fff;
  transform: scale(1.2);
}

/* ─── Category Row ───────────────────────────────────────── */
.category-row-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
  gap: 12px;
}

@media (min-width: 640px) {
  .category-row-grid { grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 16px; }
}

.category-row-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  padding: 12px 8px;
  cursor: pointer;
  transition: border-color 0.15s, box-shadow 0.15s;
  text-align: center;
}

.category-row-card:hover {
  border-color: var(--color-primary);
  box-shadow: 0 2px 8px rgba(0,0,0,0.08);
}

.category-row-card img {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  object-fit: cover;
}

.category-row-placeholder {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  background: var(--color-border);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--color-text-muted);
}

.category-icon-emoji {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  background: var(--color-primary-10);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.75rem;
  line-height: 1;
}

.category-row-placeholder svg {
  width: 28px;
  height: 28px;
  stroke: currentColor;
  fill: none;
  stroke-width: 1.5;
}

.category-row-name {
  font-size: 0.8125rem;
  font-weight: 500;
  color: var(--color-text);
}

/* ─── Product Row (section) ──────────────────────────────── */
.section-product-row {
  display: grid;
  gap: 16px;
}

/* 1 produto — card largo centralizado */
.section-product-row--1 {
  grid-template-columns: minmax(0, 420px);
  justify-content: center;
}

.section-product-row--1 .product-card-img-wrap {
  aspect-ratio: 16 / 9;
}

/* 2 produtos — 50/50 */
.section-product-row--2 {
  grid-template-columns: repeat(2, 1fr);
}

/* 3+ produtos — carrossel horizontal */
.section-product-row--carousel {
  display: flex;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  gap: 12px;
  padding-bottom: 8px;
  scrollbar-width: thin;
  -webkit-overflow-scrolling: touch;
}

.section-product-row--carousel .product-card {
  flex: 0 0 200px;
  scroll-snap-align: start;
}

@media (max-width: 640px) {
  .section-product-row--1 {
    grid-template-columns: 1fr;
  }

  .section-product-row--2 {
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
  }

  .section-product-row--carousel .product-card {
    flex: 0 0 160px;
  }
}

/* ─── Product Tags ─────────────────────────────────────────── */

.product-tag {
  display: inline-flex;
  align-items: center;
  padding: 2px 8px;
  border-radius: var(--radius-full);
  font-size: .7rem;
  font-weight: 600;
  white-space: nowrap;
  background: var(--tag-color, #3B82F6);
  color: #fff;
  border: 1px solid var(--tag-color, #3B82F6);
}

.product-card-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  margin-top: 6px;
}

.modal-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 12px;
}

/* ─── Category Header ──────────────────────────────────────── */

.category-header {
  margin-bottom: 16px;
}

.category-header-banner {
  width: 100%;
  height: 160px;
  overflow: hidden;
  border-radius: var(--radius-lg);
  margin-bottom: 12px;
}

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

.category-header-title {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--color-text);
  margin: 0 0 4px;
}

.category-header-desc {
  font-size: .85rem;
  color: var(--color-text-muted);
  margin: 0 0 4px;
}

.category-row-tag {
  margin-top: 2px;
  background: var(--tag-color, #3B82F6);
  color: #fff;
  border-color: var(--tag-color, #3B82F6);
}

/* ─── Store Footer ───────────────────────────────────────── */
.shop-footer {
  text-align: center;
  padding: 20px 16px 24px;
  border-top: 1px solid var(--color-border);
}

@media (max-width: 767px) {
  .shop-footer {
    padding-bottom: calc(var(--bnav-height) + 16px);
  }
}

.shop-footer-custom {
  font-size: 13px;
  color: var(--color-text-muted);
  margin: 0 0 6px;
}

.shop-footer-powered {
  font-size: 13px;
  color: var(--color-text-muted);
  opacity: 0.75;
  margin: 0;
}

.shop-footer-powered a {
  color: var(--color-primary);
  text-decoration: none;
}
