/* ============================================
   CATÁLOGO DIGITAL - CSS PRINCIPAL
   Design: Azul escuro + dourado/âmbar
   ============================================ */

@import url('https://fonts.googleapis.com/css2?family=Sora:wght@300;400;500;600;700;800&family=DM+Sans:ital,wght@0,300;0,400;0,500;0,600;1,400&display=swap');

:root {
  --navy: #0d1b3e;
  --navy-light: #162550;
  --navy-mid: #1e3a6e;
  --gold: #b8860b;
  --gold-bright: #d4a017;
  --gold-light: #f0c040;
  --red: #e53e3e;
  --green: #22c55e;
  --green-dark: #16a34a;
  --purple: #a855f7;
  --blue-accent: #3b82f6;
  --white: #ffffff;
  --gray-50: #f9fafb;
  --gray-100: #f3f4f6;
  --gray-200: #e5e7eb;
  --gray-300: #d1d5db;
  --gray-400: #9ca3af;
  --gray-500: #6b7280;
  --gray-600: #4b5563;
  --gray-700: #374151;
  --gray-800: #1f2937;
  --text: #1a1a2e;
  --border: #e2e8f0;
  --shadow: 0 1px 3px rgba(0,0,0,0.08), 0 1px 2px rgba(0,0,0,0.04);
  --shadow-md: 0 4px 6px rgba(0,0,0,0.07), 0 2px 4px rgba(0,0,0,0.06);
  --shadow-lg: 0 10px 25px rgba(0,0,0,0.1), 0 4px 10px rgba(0,0,0,0.05);
  --shadow-xl: 0 20px 40px rgba(0,0,0,0.15);
  --radius: 10px;
  --radius-lg: 16px;
  --radius-xl: 24px;
  --transition: all 0.2s ease;
}

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

html { scroll-behavior: smooth; }

body {
  font-family: 'DM Sans', sans-serif;
  color: var(--text);
  background: var(--gray-50);
  min-height: 100vh;
  font-size: 15px;
  line-height: 1.6;
}

h1,h2,h3,h4,h5,h6 { font-family: 'Sora', sans-serif; line-height: 1.3; }

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

/* ============ NAVBAR ============ */
.navbar {
  background: var(--white);
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: var(--shadow);
}

.navbar-inner {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 0 16px;
  height: 58px;
  max-width: 1400px;
  width: 100%;
  margin: 0 auto;
  box-sizing: border-box;
}

.navbar-logo {
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: 'Sora', sans-serif;
  font-weight: 700;
  font-size: 16px;
  color: var(--navy);
  flex-shrink: 0;
}

.navbar-logo img {
  width: 36px;
  height: 36px;
  object-fit: contain;
  border-radius: 6px;
}

.navbar-logo-placeholder {
  width: 36px;
  height: 36px;
  background: var(--navy);
  border-radius: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--white);
  font-size: 14px;
  font-weight: 800;
}

.navbar-spacer { flex: 1; min-width: 0; }

.navbar-links {
  display: flex;
  align-items: center;
  gap: 4px;
}

.navbar-link {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 7px 12px;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 500;
  color: var(--gray-600);
  transition: var(--transition);
  white-space: nowrap;
}

.navbar-link:hover { background: var(--gray-100); color: var(--navy); }
.navbar-link.active { color: var(--navy); font-weight: 600; }
.navbar-link.green { color: #16a34a; }
.navbar-link.green:hover { background: #dcfce7; }
.navbar-link svg { flex-shrink: 0; }

.navbar-btn-cart {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: var(--gold-bright);
  color: var(--white);
  border: none;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  transition: var(--transition);
  flex-shrink: 0;
}

.navbar-btn-cart:hover { background: var(--gold); transform: scale(1.05); }

.cart-badge {
  position: absolute;
  top: -4px;
  right: -4px;
  background: var(--red);
  color: var(--white);
  font-size: 10px;
  font-weight: 700;
  border-radius: 50%;
  width: 18px;
  height: 18px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 2px solid var(--white);
}

.navbar-link-icon {
  width: 36px;
  height: 36px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--gray-500);
  transition: var(--transition);
}

.navbar-link-icon:hover { background: var(--gray-100); color: var(--navy); }

/* Mobile nav hidden items */
@media (max-width: 640px) {
  .nav-hide-mobile { display: none !important; }
  .navbar-link span { display: none; }
  .navbar-link { padding: 7px 9px; }
}

/* ============ TABS ============ */
.tabs {
  background: var(--white);
  border-bottom: 1px solid var(--border);
  padding: 0 20px;
}

.tabs-inner {
  display: flex;
  gap: 0;
  max-width: 1400px;
  margin: 0 auto;
  overflow-x: auto;
  scrollbar-width: none;
}

.tabs-inner::-webkit-scrollbar { display: none; }

.tab {
  padding: 12px 20px;
  font-size: 14px;
  font-weight: 500;
  color: var(--gray-500);
  border: none;
  background: none;
  border-bottom: 2px solid transparent;
  cursor: pointer;
  transition: var(--transition);
  white-space: nowrap;
}

.tab:hover { color: var(--navy); }
.tab.active { color: var(--navy); border-bottom-color: var(--navy); font-weight: 600; }

/* ============ ALERT BANNER ============ */
.alert-banner {
  background: #eff6ff;
  border: 1px solid #bfdbfe;
  border-radius: var(--radius);
  padding: 14px 18px;
  display: flex;
  gap: 12px;
  align-items: flex-start;
  margin-bottom: 24px;
}

.alert-banner svg { flex-shrink: 0; color: #3b82f6; margin-top: 1px; }

.alert-banner-text { font-size: 13.5px; color: var(--gray-700); }

.alert-banner-text strong { color: var(--navy); display: block; margin-bottom: 2px; font-size: 14px; }

/* ============ LAYOUT ============ */
.store-layout {
  display: grid;
  grid-template-columns: 280px 1fr;
  gap: 24px;
  max-width: 1400px;
  margin: 0 auto;
  padding: 24px 20px;
  align-items: start;
}

/* Sidebar overlay — always fixed, hidden by default on all screen sizes */
.sidebar-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,.45);
  z-index: 499;
}
.sidebar-overlay.open { display: block; }

@media (max-width: 640px) {
  .store-layout {
    grid-template-columns: 1fr;
  }
  /* Sidebar como drawer fixo com overlay escuro — apenas mobile */
  .sidebar {
    position: fixed !important;
    top: 0; left: 0; bottom: 0;
    width: 82%;
    max-width: 320px;
    z-index: 500;
    border-radius: 0 var(--radius-xl) var(--radius-xl) 0;
    overflow-y: auto;
    transform: translateX(-110%);
    transition: transform .28s cubic-bezier(.4,0,.2,1);
    box-shadow: 4px 0 32px rgba(0,0,0,.2);
    display: block !important;
  }
  .sidebar.open {
    transform: translateX(0);
  }
}

/* ============ SIDEBAR / FILTERS — desktop ============ */
.sidebar {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 20px;
  position: sticky;
  top: 80px;
}

.sidebar-title {
  display: flex;
  align-items: center;
  gap: 8px;
  font-family: 'Sora', sans-serif;
  font-size: 15px;
  font-weight: 700;
  color: var(--navy);
  margin-bottom: 20px;
}

.filter-section { margin-bottom: 22px; }

.filter-label {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.08em;
  color: var(--gray-400);
  text-transform: uppercase;
  margin-bottom: 10px;
  display: block;
}

.search-input-wrap {
  position: relative;
}

.search-input-wrap svg {
  position: absolute;
  left: 10px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--gray-400);
  pointer-events: none;
}

.search-input {
  width: 100%;
  padding: 9px 12px 9px 34px;
  border: 1px solid var(--border);
  border-radius: 8px;
  font-size: 14px;
  color: var(--text);
  background: var(--gray-50);
  transition: var(--transition);
}

.search-input:focus { outline: none; border-color: var(--navy-mid); background: var(--white); }
.search-input::placeholder { color: var(--gray-400); }

/* Toggle switch */
.toggle-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 12px;
  background: var(--gray-50);
  border-radius: 8px;
  margin-bottom: 8px;
  border: 1px solid var(--border);
}

.toggle-info { flex: 1; }

.toggle-title {
  font-size: 13.5px;
  font-weight: 600;
  color: var(--gray-700);
  display: block;
}

.toggle-desc {
  font-size: 11.5px;
  color: var(--gray-400);
  display: block;
}

.toggle {
  position: relative;
  width: 40px;
  height: 22px;
  flex-shrink: 0;
}

.toggle input { opacity: 0; width: 0; height: 0; }

.toggle-slider {
  position: absolute;
  inset: 0;
  background: var(--gray-300);
  border-radius: 22px;
  cursor: pointer;
  transition: 0.25s;
}

.toggle-slider::before {
  content: '';
  position: absolute;
  width: 16px;
  height: 16px;
  left: 3px;
  top: 3px;
  background: white;
  border-radius: 50%;
  transition: 0.25s;
  box-shadow: 0 1px 3px rgba(0,0,0,0.2);
}

.toggle input:checked + .toggle-slider { background: var(--navy); }
.toggle input:checked + .toggle-slider::before { transform: translateX(18px); }

/* Radio categories */
.radio-list { display: flex; flex-direction: column; gap: 6px; }

.radio-item {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 7px 10px;
  border-radius: 8px;
  cursor: pointer;
  transition: var(--transition);
  font-size: 14px;
  color: var(--gray-600);
}

.radio-item:hover { background: var(--gray-100); color: var(--navy); }
.radio-item input { accent-color: var(--navy); width: 15px; height: 15px; }

/* Price range */
.price-range-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 10px;
}

.price-value {
  font-size: 13px;
  font-weight: 600;
  color: var(--navy);
}

input[type="range"] {
  width: 100%;
  accent-color: var(--navy);
  height: 4px;
  cursor: pointer;
}

.btn-clear {
  width: 100%;
  padding: 10px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--white);
  font-size: 13.5px;
  color: var(--gray-500);
  transition: var(--transition);
  margin-top: 8px;
}

.btn-clear:hover { background: var(--gray-100); color: var(--navy); }

/* ============ PRODUCTS GRID ============ */
.products-main { min-width: 0; }

.section-header {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 16px;
}

.section-title {
  font-family: 'Sora', sans-serif;
  font-size: 18px;
  font-weight: 700;
  color: var(--navy);
}

.products-count {
  font-size: 13px;
  color: var(--gray-400);
  margin-left: auto;
}

.products-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
  margin-bottom: 32px;
}

@media (max-width: 1100px) {
  .products-grid { grid-template-columns: repeat(3, 1fr); }
}

@media (max-width: 700px) {
  .products-grid { grid-template-columns: repeat(2, 1fr); gap: 10px; }
}

/* ============ PRODUCT CARD ============ */
.product-card {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  transition: var(--transition);
  display: flex;
  flex-direction: column;
}

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

.product-card-image {
  position: relative;
  aspect-ratio: 1;
  background: var(--navy);
  overflow: hidden;
}

.product-card-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.3s ease;
}

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

.product-card-image-placeholder {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: rgba(255,255,255,0.3);
}

.badge-wrap {
  position: absolute;
  top: 10px;
  left: 10px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px 8px;
  border-radius: 20px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.03em;
  width: fit-content;
}

.badge-destaque { background: var(--gold-bright); color: white; }
.badge-oferta { background: #e53e3e; color: white; }
.badge-pendente { background: #fef3c7; color: #92400e; }
.badge-despachado { background: #ede9fe; color: #7c3aed; }
.badge-entregue { background: #dcfce7; color: #15803d; }
.badge-cancelado { background: #fee2e2; color: #b91c1c; }

.product-card-body {
  padding: 14px;
  flex: 1;
  display: flex;
  flex-direction: column;
}

.product-category-tag {
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  color: var(--gray-400);
  margin-bottom: 4px;
}

.product-price-wrap {
  display: flex;
  align-items: baseline;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 2px;
}

.product-price-original {
  font-size: 11px;
  color: var(--gray-400);
  text-decoration: line-through;
}

.product-price {
  font-family: 'Sora', sans-serif;
  font-size: 17px;
  font-weight: 700;
  color: var(--navy);
}

.product-name {
  font-family: 'Sora', sans-serif;
  font-size: 14px;
  font-weight: 700;
  color: var(--navy);
  margin-bottom: 4px;
  line-height: 1.3;
}

.product-desc {
  font-size: 12.5px;
  color: var(--gray-500);
  line-height: 1.5;
  flex: 1;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  margin-bottom: 12px;
}

.btn-add {
  width: 100%;
  padding: 11px;
  background: var(--navy);
  color: white;
  border: none;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 600;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  transition: var(--transition);
  margin-top: auto;
}

.btn-add:hover { background: var(--gold-bright); color: var(--navy); transform: translateY(-1px); box-shadow: 0 4px 14px rgba(0,0,0,.18); }

/* ============ MOBILE FILTER BUTTON ============ */
.mobile-filter-btn {
  display: none;
  align-items: center;
  gap: 8px;
  padding: 9px 16px;
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: 8px;
  font-size: 14px;
  font-weight: 500;
  color: var(--gray-600);
  margin-bottom: 16px;
}

@media (max-width: 900px) {
  .mobile-filter-btn { display: flex; }
}

/* ============ NAVBAR LOGO MAIOR ============ */
.navbar { height: 64px; }
.navbar-inner { height: 64px; }

.navbar-logo-img {
  height: 46px;
  width: auto;
  max-width: 160px;
  object-fit: contain;
  border-radius: 6px;
}

.navbar-logo-name {
  font-family: 'Sora', sans-serif;
  font-weight: 700;
  font-size: 17px;
  color: var(--navy);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 180px;
}

@media (max-width: 640px) {
  .navbar-logo-img  { height: 38px; }
}

/* ============ STORE NAVBAR (navbar-store) ============ */
nav.navbar-store {
  background: var(--navy);
  border-bottom: none;
  box-shadow: 0 4px 32px rgba(0,0,0,.22);
  height: 74px;
}
nav.navbar-store .navbar-inner {
  height: 74px;
  gap: 14px;
  padding: 0 14px;
}

/* Logo wrapper com ring */
.navbar-logo-wrap {
  position: relative;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
}
nav.navbar-store .navbar-logo-wrap .navbar-logo-img {
  height: 52px;
  width: 52px;
  object-fit: cover;
  border-radius: 50%;
  border: 2.5px solid rgba(255,255,255,.35);
  background: rgba(255,255,255,.08);
  padding: 3px;
  transition: var(--transition);
}
nav.navbar-store .navbar-logo:hover .navbar-logo-img {
  border-color: var(--gold-light);
}
nav.navbar-store .navbar-logo-placeholder {
  width: 52px;
  height: 52px;
  border-radius: 50%;
  background: rgba(255,255,255,.12);
  border: 2.5px solid rgba(255,255,255,.25);
  color: white;
  font-size: 18px;
  font-weight: 800;
  letter-spacing: -.5px;
}

/* Brand text bloco */
.navbar-brand-text {
  display: flex;
  flex-direction: column;
  gap: 1px;
  min-width: 0;
}
nav.navbar-store .navbar-logo-name {
  color: white;
  font-size: 17px;
  font-weight: 700;
  max-width: 220px;
  letter-spacing: -.2px;
}
.navbar-tagline {
  font-size: 9.5px;
  font-weight: 600;
  color: rgba(255,255,255,.45);
  letter-spacing: .12em;
  text-transform: uppercase;
}

/* Links da nav */
nav.navbar-store .navbar-link {
  color: rgba(255,255,255,.72);
}
nav.navbar-store .navbar-link:hover {
  background: rgba(255,255,255,.1);
  color: white;
}
nav.navbar-store .navbar-link.active {
  background: rgba(255,255,255,.13);
  color: white;
  font-weight: 600;
}
nav.navbar-store .navbar-link.green {
  color: #4ade80;
}
nav.navbar-store .navbar-link.green:hover {
  background: rgba(74,222,128,.14);
  color: #4ade80;
}
nav.navbar-store .navbar-link-icon {
  color: rgba(255,255,255,.6);
}
nav.navbar-store .navbar-link-icon:hover {
  background: rgba(255,255,255,.1);
  color: white;
}

/* Botão carrinho */
nav.navbar-store .navbar-btn-cart {
  background: var(--gold-bright);
  box-shadow: 0 2px 10px rgba(0,0,0,.25);
}
nav.navbar-store .navbar-btn-cart:hover {
  background: var(--gold-light);
  transform: scale(1.06);
}

/* ============ TABS STORE (dark, merges with navbar) ============ */
.tabs-store {
  background: color-mix(in srgb, var(--navy) 92%, black);
  border-bottom: none;
  box-shadow: 0 3px 16px rgba(0,0,0,.18);
  padding: 0 20px;
}
.tabs-store .tabs-inner {
  max-width: 1400px;
  margin: 0 auto;
  display: flex;
  overflow-x: auto;
  scrollbar-width: none;
}
.tabs-store .tabs-inner::-webkit-scrollbar { display: none; }
.tabs-store .tab {
  color: rgba(255,255,255,.55);
  border-bottom: 2px solid transparent;
  padding: 11px 18px;
  font-size: 13.5px;
  font-weight: 500;
}
.tabs-store .tab:hover {
  color: rgba(255,255,255,.9);
  background: rgba(255,255,255,.06);
}
.tabs-store .tab.active {
  color: white;
  font-weight: 600;
  border-bottom-color: var(--gold-bright);
  background: none;
}

/* Sub-tabs de categoria — tom mais claro, visualmente subordinado */
.tabs-subtabs {
  background: color-mix(in srgb, var(--navy) 78%, black);
  border-bottom: 1px solid rgba(255,255,255,.08);
  padding: 0 20px;
}
.tabs-subtabs .tabs-inner {
  max-width: 1400px;
  margin: 0 auto;
  display: flex;
  overflow-x: auto;
  scrollbar-width: none;
}
.tabs-subtabs .tabs-inner::-webkit-scrollbar { display: none; }
.tabs-subtabs .tab {
  color: rgba(255,255,255,.5);
  border-bottom: 2px solid transparent;
  padding: 9px 16px;
  font-size: 13px;
  font-weight: 500;
}
.tabs-subtabs .tab:hover {
  color: rgba(255,255,255,.85);
  background: rgba(255,255,255,.05);
}
.tabs-subtabs .tab.active {
  color: white;
  font-weight: 600;
  border-bottom-color: var(--gold-bright);
  opacity: .85;
}

/* ============ SITE FOOTER DARK ============ */
.site-footer {
  background: var(--navy);
  border-top: none;
  margin-top: 60px;
  color: rgba(255,255,255,.65);
}
.footer-brand-name {
  color: white;
}
.footer-brand-tagline {
  color: rgba(255,255,255,.45);
}
.footer-divider {
  background: var(--gold-bright);
  opacity: .7;
}
.footer-info-label {
  color: rgba(255,255,255,.35);
}
.footer-info-value {
  color: rgba(255,255,255,.7);
}
.footer-info-value a {
  color: white;
}
.footer-info-value a:hover {
  color: var(--gold-bright);
}
.footer-bottom {
  border-top: 1px solid rgba(255,255,255,.1);
  color: rgba(255,255,255,.3);
}

/* ============ ZOOM IMAGEM MODAL ============ */
.zoom-wrap {
  position: relative;
  overflow: hidden;
  cursor: crosshair;
  background: var(--gray-50);
  width: 100%;
  aspect-ratio: 1;
}

.zoom-img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
  transition: transform 0.05s ease;
  transform-origin: center center;
  pointer-events: none;
  user-select: none;
}

.zoom-lens {
  display: none;
  position: absolute;
  width: 70px;
  height: 70px;
  border: 2px solid rgba(255,255,255,0.7);
  border-radius: 50%;
  background: rgba(255,255,255,0.1);
  transform: translate(-50%, -50%);
  pointer-events: none;
  box-shadow: 0 0 0 1px rgba(0,0,0,0.15), 0 4px 16px rgba(0,0,0,0.2);
  backdrop-filter: blur(1px);
}

.zoom-wrap.zooming .zoom-img {
  transition: none;
}

/* Hint de zoom no canto */
.zoom-wrap::after {
  content: '🔍 Passe o mouse para ampliar';
  position: absolute;
  bottom: 10px;
  right: 10px;
  background: rgba(0,0,0,0.5);
  color: #fff;
  font-size: 11px;
  padding: 4px 10px;
  border-radius: 20px;
  pointer-events: none;
  opacity: 1;
  transition: opacity 0.3s;
  font-family: 'DM Sans', sans-serif;
}

.zoom-wrap.zooming::after {
  opacity: 0;
}

/* ============ SCROLLBARS HARMONIOSAS ============ */
* {
  scrollbar-width: thin;
  scrollbar-color: var(--gray-300) transparent;
}

::-webkit-scrollbar {
  width: 6px;
  height: 6px;
}

::-webkit-scrollbar-track {
  background: transparent;
}

::-webkit-scrollbar-thumb {
  background: var(--gray-300);
  border-radius: 99px;
}

::-webkit-scrollbar-thumb:hover {
  background: var(--gray-400);
}

::-webkit-scrollbar-corner {
  background: transparent;
}

/* Scrollbar no cart drawer e modal — ainda mais discreta */
.cart-items::-webkit-scrollbar,
.modal::-webkit-scrollbar,
.attr-list::-webkit-scrollbar {
  width: 4px;
}

.cart-items::-webkit-scrollbar-thumb,
.modal::-webkit-scrollbar-thumb,
.attr-list::-webkit-scrollbar-thumb {
  background: var(--gray-200);
  border-radius: 99px;
}

/* ============ MODAL ATRIBUTOS DESTAQUE ============ */
.modal-attrs-wrap {
  display: flex;
  flex-direction: column;
  gap: 16px;
  margin-top: 4px;
  padding: 16px;
  background: var(--gray-50);
  border: 1px solid var(--border);
  border-radius: var(--radius);
}

.modal-attr-grupo { display: flex; flex-direction: column; gap: 8px; }

.modal-attr-label {
  display: flex;
  align-items: baseline;
  gap: 8px;
}

.modal-attr-label-nome {
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--gray-500);
}

.modal-attr-label-hint {
  font-size: 12px;
  color: var(--gray-400);
  font-style: italic;
  transition: var(--transition);
}

.modal-attr-options {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.modal-attr-btn {
  padding: 8px 18px;
  border: 2px solid var(--border);
  border-radius: 8px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  background: var(--white);
  color: var(--gray-600);
  transition: var(--transition);
  min-width: 48px;
  text-align: center;
}

.modal-attr-btn:hover {
  border-color: var(--navy);
  color: var(--navy);
  background: #f0f4ff;
}

.modal-attr-btn.selected {
  border-color: var(--navy);
  background: var(--navy);
  color: var(--white);
  box-shadow: 0 2px 8px rgba(13,27,62,0.25);
}

/* ============ MODAL PRODUTO ============ */
.modal-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.6);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  z-index: 200;
  align-items: flex-end;
  justify-content: center;
  padding: 0;
}
.modal-overlay.open { display: flex; }

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

/* Wrapper não-scrollável que contém o botão fechar */
.modal-shell {
  position: relative;
  width: 100%;
  max-width: 560px;
  max-height: 93vh;
  display: flex;
  flex-direction: column;
  animation: slideUp 0.32s cubic-bezier(.22,.68,0,1.2);
}
@media (min-width: 640px) {
  .modal-shell { max-height: 87vh; }
}

/* Botão fechar — fixo no canto do shell, nunca scrollável */
.modal-close {
  position: absolute;
  top: 12px;
  right: 12px;
  width: 34px; height: 34px;
  border-radius: 50%;
  border: none;
  background: rgba(0,0,0,.38);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  color: white;
  display: flex; align-items: center; justify-content: center;
  cursor: pointer;
  z-index: 30;
  transition: var(--transition);
  font-size: 15px;
  flex-shrink: 0;
}
.modal-close:hover { background: rgba(0,0,0,.65); transform: scale(1.1); }

/* Modal — a parte scrollável */
.modal {
  background: var(--white);
  border-radius: 24px 24px 0 0;
  width: 100%;
  max-height: 93vh;
  overflow-y: auto;
  position: relative;
  box-shadow: 0 -8px 60px rgba(0,0,0,.25);
}
@media (min-width: 640px) {
  .modal {
    border-radius: 20px;
    max-height: 87vh;
    box-shadow: 0 20px 80px rgba(0,0,0,.3);
  }
}

@keyframes slideUp {
  from { transform: translateY(50px); opacity: 0; }
  to   { transform: translateY(0);    opacity: 1; }
}

/* Handle */
.modal-handle {
  width: 44px; height: 5px;
  background: rgba(255,255,255,.5);
  border-radius: 3px;
  margin: 14px auto 8px;
}
@media (min-width: 640px) { .modal-handle { display: none; } }

/* Image zone */
.modal-image {
  background: var(--navy);
  overflow: hidden;
  min-height: 0;
  border-radius: 24px 24px 0 0;
}
@media (min-width: 640px) {
  .modal-image { border-radius: 20px 20px 0 0; }
}

.modal-image .zoom-wrap {
  aspect-ratio: 4 / 3;
  max-height: 260px;
}
@media (min-width: 640px) {
  .modal-image .zoom-wrap { max-height: 300px; }
}

/* Body */
.modal-body {
  padding: 22px 22px 8px;
}

/* Category pill */
.modal-cat {
  display: inline-flex;
  align-items: center;
  padding: 3px 10px;
  background: color-mix(in srgb, var(--navy) 10%, transparent);
  color: var(--navy);
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .1em;
  border-radius: 20px;
  margin-bottom: 10px;
}

.modal-name {
  font-family: 'Sora', sans-serif;
  font-size: 21px;
  font-weight: 800;
  color: var(--navy);
  line-height: 1.25;
  margin-bottom: 12px;
}

/* Price row — destaque total */
.modal-price-row {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 14px;
  flex-wrap: wrap;
}

.modal-price {
  font-family: 'Sora', sans-serif;
  font-size: 28px;
  font-weight: 800;
  color: var(--navy);
  letter-spacing: -.5px;
}

.modal-price-orig {
  font-size: 14px;
  color: var(--gray-400);
  text-decoration: line-through;
  padding: 2px 8px;
  background: var(--gray-100);
  border-radius: 6px;
}

/* Promo badge */
.modal-promo-badge {
  font-size: 11px; font-weight: 800;
  background: #fef3c7; color: #92400e;
  padding: 3px 9px; border-radius: 20px;
  letter-spacing: .03em;
}

.modal-desc {
  font-size: 14px;
  color: var(--gray-500);
  line-height: 1.65;
  margin-bottom: 18px;
  padding-bottom: 18px;
  border-bottom: 1px solid var(--border);
}

/* Attrs */
.attr-label { font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.07em; color: var(--gray-500); margin-bottom: 8px; display: block; }
.attr-options { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 16px; }
.attr-option {
  padding: 6px 14px;
  border: 1.5px solid var(--border);
  border-radius: 20px;
  font-size: 13px; font-weight: 500;
  cursor: pointer; transition: var(--transition);
  background: var(--white); color: var(--gray-600);
}
.attr-option:hover { border-color: var(--navy); color: var(--navy); }
.attr-option.selected { border-color: var(--navy); background: var(--navy); color: white; }

/* Footer */
.modal-footer {
  padding: 16px 22px 22px;
  border-top: 1px solid var(--border);
  background: var(--gray-50);
  border-radius: 0 0 24px 24px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  position: sticky;
  bottom: 0;
  z-index: 5;
}
@media (min-width: 640px) { .modal-footer { border-radius: 0 0 20px 20px; } }

/* Qty selector inline no footer */
.modal-footer-row {
  display: flex;
  align-items: center;
  gap: 12px;
}
.modal-qty-wrap {
  display: flex;
  align-items: center;
  gap: 0;
  border: 1.5px solid var(--border);
  border-radius: 10px;
  overflow: hidden;
  flex-shrink: 0;
}
.modal-qty-btn {
  width: 36px; height: 42px;
  border: none; background: white;
  font-size: 18px; font-weight: 300;
  cursor: pointer; color: var(--navy);
  transition: var(--transition);
  display: flex; align-items: center; justify-content: center;
}
.modal-qty-btn:hover { background: var(--gray-100); }
.modal-qty-num {
  min-width: 36px; height: 42px;
  display: flex; align-items: center; justify-content: center;
  font-size: 15px; font-weight: 700; color: var(--navy);
  background: white;
  border-left: 1px solid var(--border);
  border-right: 1px solid var(--border);
}

.btn-add-modal {
  flex: 1;
  padding: 13px 16px;
  background: var(--navy);
  color: white;
  border: none;
  border-radius: 10px;
  font-size: 15px; font-weight: 700;
  display: flex; align-items: center; justify-content: center;
  gap: 8px;
  transition: var(--transition);
  cursor: pointer;
}
.btn-add-modal:hover { background: var(--gold-bright); color: var(--navy); transform: translateY(-1px); box-shadow: 0 6px 20px rgba(0,0,0,.15); }
.btn-add-modal:active { transform: translateY(0); }

/* ============ CART DRAWER ============ */
.cart-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.5);
  z-index: 300;
}

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

.cart-drawer {
  position: fixed;
  top: 0;
  right: -100%;
  width: 100%;
  max-width: 420px;
  height: 100%;
  background: var(--white);
  z-index: 301;
  display: flex;
  flex-direction: column;
  transition: right 0.3s ease;
  box-shadow: -5px 0 30px rgba(0,0,0,0.15);
}

.cart-drawer.open { right: 0; }

.cart-header {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 18px 20px;
  border-bottom: 1px solid var(--border);
  flex-shrink: 0;
}

.cart-header h3 {
  font-family: 'Sora', sans-serif;
  font-size: 18px;
  font-weight: 700;
  color: var(--navy);
  flex: 1;
}

.cart-close {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  border: 1px solid var(--border);
  background: var(--white);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  color: var(--gray-500);
  transition: var(--transition);
}

.cart-close:hover { background: var(--gray-100); }

.cart-info-banner {
  margin: 16px 20px 0;
  padding: 10px 14px;
  background: #eff6ff;
  border: 1px solid #bfdbfe;
  border-radius: 8px;
  font-size: 12.5px;
  color: var(--gray-600);
  display: flex;
  gap: 8px;
  align-items: flex-start;
  flex-shrink: 0;
}

.cart-items {
  flex: 1;
  overflow-y: auto;
  padding: 16px 20px;
}

.cart-empty {
  text-align: center;
  padding: 40px 20px;
  color: var(--gray-400);
}

.cart-empty svg { margin: 0 auto 12px; opacity: 0.4; }
.cart-empty p { font-size: 14px; }

.cart-item {
  display: flex;
  gap: 12px;
  padding: 12px 0;
  border-bottom: 1px solid var(--border);
}

.cart-item-img {
  width: 60px;
  height: 60px;
  border-radius: 8px;
  background: var(--navy);
  overflow: hidden;
  flex-shrink: 0;
}

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

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

.cart-item-name {
  font-size: 14px;
  font-weight: 600;
  color: var(--navy);
  margin-bottom: 2px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.cart-item-attrs {
  font-size: 12px;
  color: var(--gray-400);
  margin-bottom: 8px;
}

.cart-item-bottom { display: flex; align-items: center; justify-content: space-between; }

.qty-control {
  display: flex;
  align-items: center;
  gap: 8px;
}

.qty-btn {
  width: 26px;
  height: 26px;
  border-radius: 50%;
  border: 1px solid var(--border);
  background: var(--white);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  font-size: 16px;
  color: var(--gray-600);
  transition: var(--transition);
}

.qty-btn:hover { background: var(--gray-100); }

.qty-num {
  font-size: 14px;
  font-weight: 600;
  min-width: 20px;
  text-align: center;
}

.cart-item-price {
  font-family: 'Sora', sans-serif;
  font-size: 14px;
  font-weight: 700;
  color: var(--navy);
}

.cart-item-remove {
  background: none;
  border: none;
  color: var(--gray-300);
  padding: 4px;
  border-radius: 6px;
  display: flex;
  align-items: center;
  transition: var(--transition);
}

.cart-item-remove:hover { color: var(--red); background: #fee2e2; }

.cart-footer {
  padding: 16px 20px;
  border-top: 1px solid var(--border);
  flex-shrink: 0;
  overflow-y: auto;
  max-height: 55vh; /* allows form to scroll on small screens */
  -webkit-overflow-scrolling: touch;
}

.cart-customer { display: flex; flex-direction: column; gap: 10px; margin-bottom: 16px; }

.cart-input-group { display: flex; flex-direction: column; gap: 4px; }

.cart-input-group label {
  font-size: 13px;
  font-weight: 600;
  color: var(--gray-600);
}

.cart-input {
  padding: 9px 12px;
  border: 1px solid var(--border);
  border-radius: 8px;
  font-size: 14px;
  background: var(--gray-50);
  transition: var(--transition);
}

.cart-input:focus { outline: none; border-color: var(--navy-mid); background: var(--white); }

.cart-total-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 14px;
}

.cart-total-label {
  font-size: 15px;
  font-weight: 600;
  color: var(--gray-700);
}

.cart-total-val {
  font-family: 'Sora', sans-serif;
  font-size: 18px;
  font-weight: 800;
  color: var(--navy);
}

.btn-whatsapp {
  width: 100%;
  padding: 14px;
  background: var(--gold-bright);
  color: white;
  border: none;
  border-radius: 10px;
  font-size: 15px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  transition: var(--transition);
}

.btn-whatsapp:hover { background: var(--gold); }

/* ============ SUCCESS PAGE ============ */
.success-wrap {
  min-height: calc(100vh - 120px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px 20px;
}

.success-card {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  padding: 48px 40px;
  text-align: center;
  max-width: 480px;
  width: 100%;
}

.success-icon {
  width: 72px;
  height: 72px;
  background: #f0f9ff;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 20px;
  color: var(--gold-bright);
}

.success-title {
  font-family: 'Sora', sans-serif;
  font-size: 26px;
  font-weight: 800;
  color: var(--navy);
  margin-bottom: 8px;
}

.success-subtitle { font-size: 15px; color: var(--gray-500); margin-bottom: 24px; }

.success-next {
  background: var(--gray-50);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 16px;
  display: flex;
  gap: 12px;
  align-items: flex-start;
  text-align: left;
  margin-bottom: 24px;
}

.success-next svg { color: var(--green-dark); flex-shrink: 0; margin-top: 1px; }

.success-next-text { font-size: 13.5px; color: var(--gray-600); line-height: 1.5; }

.success-next-text strong { display: block; color: var(--navy); margin-bottom: 2px; }

.success-thank { font-size: 12.5px; color: var(--gray-400); margin-top: 12px; }

/* ============ ADMIN LAYOUT ============ */
.admin-wrap {
  max-width: 1100px;
  margin: 0 auto;
  padding: 28px 20px;
}

.admin-page-title {
  font-family: 'Sora', sans-serif;
  font-size: 24px;
  font-weight: 800;
  color: var(--navy);
  margin-bottom: 20px;
}

.admin-tabs {
  display: flex;
  gap: 4px;
  margin-bottom: 24px;
  background: var(--gray-100);
  padding: 4px;
  border-radius: var(--radius);
  width: fit-content;
  flex-wrap: wrap;
}

.admin-tab {
  padding: 8px 18px;
  border-radius: 7px;
  font-size: 14px;
  font-weight: 500;
  color: var(--gray-500);
  background: none;
  border: none;
  cursor: pointer;
  transition: var(--transition);
  display: flex;
  align-items: center;
  gap: 6px;
  white-space: nowrap;
}

.admin-tab:hover { color: var(--navy); }
.admin-tab.active { background: var(--white); color: var(--navy); font-weight: 600; box-shadow: var(--shadow); }

.admin-card {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 24px;
  margin-bottom: 20px;
}

.admin-card-title {
  font-family: 'Sora', sans-serif;
  font-size: 16px;
  font-weight: 700;
  color: var(--navy);
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 20px;
}

/* ============ FORMS ============ */
.form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  margin-bottom: 16px;
}

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

.form-group { display: flex; flex-direction: column; gap: 5px; }
.form-group.full { grid-column: 1 / -1; }

.form-label {
  font-size: 13px;
  font-weight: 600;
  color: var(--gray-600);
}

.form-control {
  padding: 9px 12px;
  border: 1px solid var(--border);
  border-radius: 8px;
  font-size: 14px;
  background: var(--gray-50);
  color: var(--text);
  transition: var(--transition);
  width: 100%;
}

.form-control:focus { outline: none; border-color: var(--navy-mid); background: var(--white); }

textarea.form-control { min-height: 80px; resize: vertical; }

/* Toggle row for form */
.form-toggle-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 14px;
  background: var(--gray-50);
  border: 1px solid var(--border);
  border-radius: 8px;
}

.form-toggle-label { font-size: 14px; font-weight: 500; color: var(--gray-700); }
.form-toggle-desc { font-size: 12px; color: var(--gray-400); display: block; margin-top: 1px; }

/* Attr picker */
.attr-picker { display: flex; flex-wrap: wrap; gap: 6px; }

.attr-chip {
  padding: 5px 12px;
  border: 1.5px solid var(--border);
  border-radius: 20px;
  font-size: 12.5px;
  font-weight: 500;
  cursor: pointer;
  transition: var(--transition);
  color: var(--gray-600);
}

.attr-chip.selected { border-color: var(--navy); background: var(--navy); color: white; }

/* Image upload */
.img-upload-area {
  border: 2px dashed var(--border);
  border-radius: var(--radius);
  padding: 20px;
  text-align: center;
  cursor: pointer;
  transition: var(--transition);
  background: var(--gray-50);
}

.img-upload-area:hover { border-color: var(--navy); background: #f0f4ff; }

.img-preview-wrap { position: relative; display: inline-block; }

.img-preview {
  max-height: 120px;
  border-radius: 8px;
  object-fit: contain;
  border: 1px solid var(--border);
}

.img-upload-placeholder { color: var(--gray-400); font-size: 13px; }

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 9px 18px;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 600;
  border: none;
  cursor: pointer;
  transition: var(--transition);
}

.btn-primary { background: var(--gold-bright); color: white; }
.btn-primary:hover { background: var(--gold); }
.btn-full { width: 100%; justify-content: center; padding: 12px 18px; font-size: 15px; }
.btn-danger { background: #fee2e2; color: var(--red); }
.btn-danger:hover { background: #fecaca; }
.btn-ghost { background: var(--gray-100); color: var(--gray-600); }
.btn-ghost:hover { background: var(--gray-200); }
.btn-icon { padding: 7px; width: 34px; height: 34px; justify-content: center; }

.form-actions {
  display: flex;
  gap: 10px;
  align-items: center;
  flex-wrap: wrap;
}

/* ============ TABLE ============ */
.table-wrap { overflow-x: auto; }

.admin-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
  min-width: 500px;
}

.admin-table th {
  text-align: left;
  padding: 10px 12px;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  color: var(--gray-400);
  border-bottom: 1px solid var(--border);
}

.admin-table td {
  padding: 12px;
  border-bottom: 1px solid var(--gray-100);
  color: var(--gray-700);
  vertical-align: middle;
}

.admin-table tr:last-child td { border-bottom: none; }
.admin-table tr:hover td { background: var(--gray-50); }

.table-filters {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr 1fr;
  gap: 12px;
  margin-bottom: 20px;
}

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

@media (max-width: 480px) {
  .table-filters { grid-template-columns: 1fr; }
}

.status-actions { display: flex; gap: 6px; align-items: center; }

.status-btn {
  width: 28px;
  height: 28px;
  border-radius: 6px;
  border: 1px solid var(--border);
  background: var(--white);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: var(--transition);
  color: var(--gray-500);
}

.status-btn:hover { background: var(--gray-100); }
.status-btn.pendente:hover { background: #fef3c7; color: #92400e; border-color: #fde68a; }
.status-btn.despachado:hover { background: #ede9fe; color: #7c3aed; border-color: #ddd6fe; }
.status-btn.entregue:hover { background: #dcfce7; color: #15803d; border-color: #bbf7d0; }

/* ============ ATRIBUTOS ============ */
.attrs-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}

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

.attr-card { background: var(--white); border: 1px solid var(--border); border-radius: var(--radius-lg); padding: 20px; }

.attr-card-title {
  font-family: 'Sora', sans-serif;
  font-size: 15px;
  font-weight: 700;
  color: var(--navy);
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 4px;
}

.attr-card-desc { font-size: 12.5px; color: var(--gray-400); margin-bottom: 16px; }

.attr-add-row { display: flex; gap: 8px; margin-bottom: 14px; }

.attr-add-input {
  flex: 1;
  padding: 8px 12px;
  border: 1px solid var(--border);
  border-radius: 8px;
  font-size: 14px;
  background: var(--gray-50);
}

.attr-add-input:focus { outline: none; border-color: var(--navy-mid); }

.attr-add-btn {
  width: 36px;
  height: 36px;
  border-radius: 8px;
  background: var(--navy);
  color: white;
  border: none;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  flex-shrink: 0;
  font-size: 20px;
  font-weight: 600;
}

.attr-list { display: flex; flex-direction: column; gap: 6px; }

.attr-list-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 9px 12px;
  background: var(--gray-50);
  border: 1px solid var(--border);
  border-radius: 8px;
  font-size: 14px;
  color: var(--gray-700);
}

.attr-list-item button {
  background: none;
  border: none;
  color: var(--gray-300);
  cursor: pointer;
  padding: 2px;
  border-radius: 4px;
  display: flex;
  align-items: center;
  transition: var(--transition);
}

.attr-list-item button:hover { color: var(--red); background: #fee2e2; }

/* ============ LOGIN ============ */
.login-wrap {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px 20px;
  background: var(--gray-50);
}

.login-card {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  padding: 40px 36px;
  width: 100%;
  max-width: 380px;
}

.login-logo {
  text-align: center;
  margin-bottom: 28px;
}

.login-logo-box {
  width: 56px;
  height: 56px;
  background: var(--navy);
  border-radius: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 12px;
  color: white;
  font-family: 'Sora', sans-serif;
  font-weight: 800;
  font-size: 20px;
}

.login-title {
  font-family: 'Sora', sans-serif;
  font-size: 20px;
  font-weight: 700;
  color: var(--navy);
}

.login-subtitle { font-size: 13.5px; color: var(--gray-400); margin-top: 4px; }

.alert { padding: 10px 14px; border-radius: 8px; font-size: 13.5px; margin-bottom: 16px; }
.alert-error { background: #fee2e2; color: #b91c1c; border: 1px solid #fecaca; }
.alert-success { background: #dcfce7; color: #15803d; border: 1px solid #bbf7d0; }

/* ============ TOAST ============ */
.toast-container {
  position: fixed;
  bottom: 20px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 9999;
  display: flex;
  flex-direction: column;
  gap: 8px;
  align-items: center;
  pointer-events: none;
}

.toast {
  padding: 10px 20px;
  border-radius: 20px;
  font-size: 14px;
  font-weight: 500;
  color: white;
  box-shadow: var(--shadow-lg);
  animation: toastIn 0.3s ease forwards;
  pointer-events: auto;
}

.toast.success { background: var(--green-dark); }
.toast.error { background: var(--red); }

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

/* ============ PEDIDO DETAIL MODAL ============ */
.order-modal {
  background: var(--white);
  border-radius: var(--radius-xl);
  padding: 28px;
  max-width: 520px;
  width: 100%;
  max-height: 85vh;
  overflow-y: auto;
}

.order-item-row {
  display: flex;
  justify-content: space-between;
  padding: 8px 0;
  border-bottom: 1px solid var(--border);
  font-size: 14px;
}

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

/* ============ SETTINGS PAGE ============ */
.settings-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

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

/* ============ FOOTER (dark) ============ */
.site-footer {
  background: var(--navy);
  border-top: none;
  margin-top: 60px;
  color: rgba(255,255,255,.6);
}

.footer-inner {
  max-width: 900px;
  margin: 0 auto;
  padding: 48px 24px 32px;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 28px;
}

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

.footer-brand-name {
  font-family: 'Sora', sans-serif;
  font-size: 18px;
  font-weight: 700;
  color: white;
}

.footer-brand-tagline {
  font-size: 13px;
  color: rgba(255,255,255,.42);
}

.footer-divider {
  width: 40px;
  height: 3px;
  background: var(--gold-bright);
  border-radius: 2px;
  opacity: .7;
}

.footer-info {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 20px 40px;
}

.footer-info-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
}

.footer-info-label {
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: rgba(255,255,255,.32);
}

.footer-info-value {
  font-size: 13.5px;
  color: rgba(255,255,255,.65);
}

.footer-info-value a {
  color: white;
  font-weight: 500;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  transition: var(--transition);
}

.footer-info-value a:hover { color: var(--gold-bright); }

.footer-bottom {
  border-top: 1px solid rgba(255,255,255,.1);
  padding: 16px 24px;
  text-align: center;
  font-size: 12px;
  color: rgba(255,255,255,.28);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
}

@media (max-width: 640px) {
  .footer-inner { padding: 36px 20px 24px; gap: 22px; }
  .footer-info { gap: 16px 28px; }
}

/* ============ UTIL ============ */
.text-center { text-align: center; }
.text-right { text-align: right; }
.mt-auto { margin-top: auto; }
.mt-4 { margin-top: 16px; }
.mt-6 { margin-top: 24px; }
.mb-4 { margin-bottom: 16px; }
.flex { display: flex; }
.gap-2 { gap: 8px; }
.items-center { align-items: center; }
.justify-between { justify-content: space-between; }
.font-bold { font-weight: 700; }
.text-sm { font-size: 13px; }
.text-xs { font-size: 12px; }
.text-gray { color: var(--gray-500); }
.text-navy { color: var(--navy); }
.hidden { display: none !important; }

/* ============ ADMIN STICKY LAYOUT ============ */
/* body nas páginas admin usa flex column para empurrar footer pro fundo */
body.admin-page {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}
body.admin-page .admin-wrap {
  flex: 1;
}

/* ============ ADMIN FOOTER ============ */
.admin-footer {
  margin-top: auto;
  border-top: 1px solid rgba(255,255,255,.07);
  background: var(--navy);
  padding: 13px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}

.admin-footer-brand {
  display: flex;
  align-items: center;
  gap: 8px;
  font-family: 'Sora', sans-serif;
  font-size: 13px;
  font-weight: 700;
  color: rgba(255,255,255,.72);
}

.admin-footer-brand span {
  font-weight: 400;
  color: rgba(255,255,255,.32);
  font-size: 12px;
}

.admin-footer-copy {
  font-size: 11.5px;
  color: rgba(255,255,255,.28);
}

@media (max-width: 640px) {
  .admin-footer { justify-content: center; text-align: center; }
}

/* ============================================================
   ADMIN MOBILE — comprehensive fixes
   ============================================================ */

/* Navbar: show all links on admin but stack gracefully */
@media (max-width: 768px) {
  .admin-wrap { padding: 16px 12px; }

  /* Keep admin navbar links visible but smaller */
  nav.navbar-store .navbar-links { gap: 2px; }
  nav.navbar-store .navbar-link  { padding: 6px 8px; gap: 4px; }
  nav.navbar-store .navbar-link span { font-size: 11px; }

  /* Admin tabs: scrollable row */
  .admin-tabs {
    width: 100%;
    overflow-x: auto;
    flex-wrap: nowrap;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    padding: 4px 4px;
  }
  .admin-tabs::-webkit-scrollbar { display: none; }
  .admin-tab { white-space: nowrap; padding: 7px 12px; font-size: 13px; }

  /* Table wraps always scroll */
  .table-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; }
  .admin-table { width: 100%; }

  /* Admin card padding */
  .admin-card { padding: 14px; }
  .admin-card-title { font-size: 14px; flex-wrap: wrap; gap: 6px; }

  /* Product slide-in panel — full screen on mobile */
  .prod-modal-panel { max-width: 100%; }

  /* Quick filters wrap */
  .quick-filters { gap: 5px; }
  .qf-btn { padding: 5px 10px; font-size: 11px; }

  /* Variante grid scroll */
  #variantesGrid { overflow-x: auto; }
  .variante-row { min-width: 480px; }

  /* Pedidos table buttons stack */
  .table-filters { flex-wrap: wrap; gap: 7px; }
  .table-filters .form-control { width: auto; flex: 1; min-width: 120px; }
}

@media (max-width: 480px) {
  nav.navbar-store .navbar-link span { display: none; }
  nav.navbar-store .navbar-link { padding: 6px 8px; }
  .navbar-brand-text .navbar-tagline { display: none; }
  .admin-page-title { font-size: 18px; margin-bottom: 12px; }
  .prod-list-header { flex-direction: column; align-items: flex-start; gap: 10px; }
  .prod-list-header .btn { align-self: stretch; justify-content: center; }
}

/* Cart drawer mobile scroll fix */
@media (max-width: 640px) {
  .cart-footer {
    max-height: 60vh;
    padding: 12px 14px;
  }
  .cart-drawer { max-width: 100%; }
  .cart-items  { min-height: 60px; }
}

/* ============ CADASTRO TOGGLE ============ */
.cadastro-toggle {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  background: var(--gray-50);
  border: 1.5px solid var(--border);
  border-radius: 10px;
  cursor: pointer;
  margin-bottom: 12px;
  transition: var(--transition);
  user-select: none;
}
.cadastro-toggle:has(input:checked) {
  background: #eff6ff;
  border-color: var(--navy);
}
.cadastro-toggle-inner {
  position: relative;
  width: 40px;
  height: 22px;
  flex-shrink: 0;
}
.cadastro-toggle-inner input { display: none; }
.cadastro-slider {
  position: absolute;
  inset: 0;
  background: var(--gray-300);
  border-radius: 22px;
  transition: .25s;
  cursor: pointer;
}
.cadastro-slider::before {
  content: '';
  position: absolute;
  left: 3px; top: 3px;
  width: 16px; height: 16px;
  background: white;
  border-radius: 50%;
  transition: .25s;
  box-shadow: 0 1px 4px rgba(0,0,0,.2);
}
.cadastro-toggle-inner input:checked ~ .cadastro-slider { background: var(--navy); }
.cadastro-toggle-inner input:checked ~ .cadastro-slider::before { transform: translateX(18px); }
.cadastro-toggle-text {
  font-size: 13.5px;
  font-weight: 600;
  color: var(--gray-700);
}
.cadastro-toggle:has(input:checked) .cadastro-toggle-text { color: var(--navy); }

.aviso-novo-cadastro {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  padding: 10px 12px;
  background: #f0fdf4;
  border: 1px solid #86efac;
  border-left: 4px solid #16a34a;
  border-radius: 8px;
  font-size: 13px;
  color: #14532d;
  margin-bottom: 12px;
  line-height: 1.5;
}
.aviso-novo-cadastro svg { flex-shrink: 0; margin-top: 1px; }

/* Endereço section animated */
#enderecoSection {
  overflow: hidden;
  transition: max-height .3s ease, opacity .3s ease;
  max-height: 600px;
  opacity: 1;
}
#enderecoSection.hidden {
  max-height: 0;
  opacity: 0;
  pointer-events: none;
}

/* ============================================================
   ADMIN MOBILE — Hamburger menu
   ============================================================ */
.navbar-hamburger {
  display: none;
  width: 36px; height: 36px;
  border-radius: 8px;
  border: 1px solid rgba(255,255,255,.2);
  background: rgba(255,255,255,.1);
  color: white;
  align-items: center; justify-content: center;
  cursor: pointer;
  transition: var(--transition);
}
.navbar-hamburger:hover { background: rgba(255,255,255,.2); }

/* Dropdown menu overlay */
.admin-nav-dropdown {
  display: none;
  position: fixed;
  top: 68px; right: 0; left: 0;
  background: var(--navy);
  z-index: 150;
  flex-direction: column;
  padding: 8px 0;
  box-shadow: 0 8px 24px rgba(0,0,0,.3);
  border-bottom: 2px solid rgba(255,255,255,.1);
}
.admin-nav-dropdown.open { display: flex; }
.admin-nav-dropdown a {
  display: flex; align-items: center; gap: 12px;
  padding: 13px 20px;
  color: rgba(255,255,255,.8);
  font-size: 15px; font-weight: 500;
  text-decoration: none;
  transition: background .15s;
  border-bottom: 1px solid rgba(255,255,255,.06);
}
.admin-nav-dropdown a:last-child { border-bottom: none; }
.admin-nav-dropdown a:hover,
.admin-nav-dropdown a.active { background: rgba(255,255,255,.1); color: white; }
.admin-nav-dropdown a svg { flex-shrink: 0; opacity: .7; }

@media (max-width: 768px) {
  .navbar-hamburger { display: flex; }
  .nav-hide-mobile  { display: none !important; }

  /* Compact admin wrap */
  .admin-wrap { padding: 12px 10px 60px; }
  .admin-page-title { font-size: 17px; margin-bottom: 10px; }

  /* Tabs scrollable */
  .admin-tabs { overflow-x: auto; flex-wrap: nowrap; gap: 4px; scrollbar-width: none; padding: 4px; }
  .admin-tabs::-webkit-scrollbar { display: none; }
  .admin-tab { white-space: nowrap; padding: 7px 12px; font-size: 12px; flex-shrink: 0; }

  /* Tables */
  .table-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; }
  .admin-table { width: 100%; font-size: 12px; }
  .admin-table th, .admin-table td { padding: 8px 10px; }

  /* Quick filters */
  .quick-filters { gap: 5px; }
  .qf-btn { padding: 5px 9px; font-size: 11px; }

  /* Prod list header */
  .prod-list-header { flex-direction: column; align-items: flex-start; gap: 8px; }
  .prod-list-header .btn { align-self: stretch; justify-content: center; }

  /* Prod modal full screen */
  .prod-modal-panel { max-width: 100%; }

  /* Variante grid */
  #variantesGrid { overflow-x: auto; }
  .variante-row { min-width: 460px; }

  /* Admin card */
  .admin-card { padding: 12px; }
  .admin-card-title { font-size: 13px; flex-wrap: wrap; gap: 5px; }

  /* Cat cards in atributos */
  .cat-card-header { flex-wrap: wrap; gap: 6px; padding: 10px 12px; }

  /* Type card */
  .tipo-header { padding: 10px 14px; }
  .tipo-nome { font-size: 14px; }
}

/* ============================================================
   PWA INSTALL BANNER
   ============================================================ */
.pwa-banner {
  position: fixed;
  bottom: 0; left: 0; right: 0;
  background: var(--navy);
  color: white;
  padding: 14px 16px;
  display: flex;
  align-items: center;
  gap: 12px;
  z-index: 9000;
  box-shadow: 0 -4px 20px rgba(0,0,0,.3);
  transform: translateY(100%);
  transition: transform .35s cubic-bezier(.22,.68,0,1.2);
}
.pwa-banner.show { transform: translateY(0); }
.pwa-banner-icon { font-size: 28px; flex-shrink: 0; }
.pwa-banner-text { flex: 1; min-width: 0; }
.pwa-banner-title { font-size: 14px; font-weight: 700; }
.pwa-banner-sub   { font-size: 12px; color: rgba(255,255,255,.6); margin-top: 2px; }
.pwa-banner-btn {
  background: var(--gold-bright);
  color: var(--navy);
  border: none;
  border-radius: 8px;
  padding: 9px 14px;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  white-space: nowrap;
  flex-shrink: 0;
  transition: var(--transition);
}
.pwa-banner-btn:hover { opacity: .88; }
.pwa-banner-close {
  width: 28px; height: 28px;
  background: rgba(255,255,255,.12);
  border: none; border-radius: 50%;
  color: rgba(255,255,255,.7);
  font-size: 16px;
  cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
}

/* iOS instruction tooltip */
.ios-install-hint {
  position: fixed;
  bottom: 80px; left: 12px; right: 12px;
  background: #1f2937;
  color: white;
  padding: 14px 16px;
  border-radius: 12px;
  font-size: 13px;
  line-height: 1.55;
  z-index: 9001;
  box-shadow: 0 8px 24px rgba(0,0,0,.4);
  display: none;
}
.ios-install-hint::after {
  content: '';
  position: absolute;
  bottom: -8px; left: 50%;
  transform: translateX(-50%);
  border: 8px solid transparent;
  border-bottom: none;
  border-top-color: #1f2937;
}

/* ============================================================
   PAGINAÇÃO
   ============================================================ */
.pagination {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 32px 0 12px;
  flex-wrap: wrap;
}

.pag-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 40px;
  height: 40px;
  padding: 0 6px;
  border-radius: 10px;
  font-size: 14px;
  font-weight: 600;
  color: var(--gray-600);
  background: var(--white);
  border: 1.5px solid var(--border);
  text-decoration: none;
  transition: var(--transition);
}
.pag-btn:hover {
  border-color: var(--navy);
  color: var(--navy);
  background: #f0f4ff;
}
.pag-btn.active {
  background: var(--navy);
  color: white;
  border-color: var(--navy);
  box-shadow: 0 2px 8px rgba(0,0,0,.18);
}
.pag-btn.pag-arrow {
  color: var(--gray-500);
}
.pag-dots {
  color: var(--gray-400);
  font-size: 14px;
  padding: 0 4px;
  line-height: 40px;
}

@media (max-width: 480px) {
  .pag-btn { min-width: 36px; height: 36px; font-size: 13px; border-radius: 8px; }
}

/* ============ NAVBAR MOBILE FIXES ============ */
@media (max-width: 480px) {
  .navbar-inner,
  nav.navbar-store .navbar-inner { padding: 0 10px; gap: 8px; height: 66px; }
  nav.navbar-store { height: 66px; }
  nav.navbar-store .navbar-logo-wrap .navbar-logo-img { height: 46px; width: 46px; }
  nav.navbar-store .navbar-logo-placeholder { width: 46px; height: 46px; font-size: 15px; }
  nav.navbar-store .navbar-logo-name { font-size: 14px; max-width: 130px; }
  .navbar-tagline { display: none; }
  .admin-nav-dropdown { top: 66px; }
  body.admin-page .admin-wrap { padding-top: 8px; }
}

/* Fix navbar spacer */
.navbar-spacer { flex: 1; min-width: 0; }

/* ============================================================
   SHOW/HIDE por breakpoint — admin usa tabela sempre
   ============================================================ */
.desktop-only { display: block; }
.mobile-only  { display: none !important; }

/* ============================================================
   PRODUCT MOBILE CARDS — aba Produtos no admin
   ============================================================ */
.prod-card-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.prod-mobile-card {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 12px 14px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.prod-mobile-card-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 8px;
}

.prod-mobile-card-name {
  font-weight: 700;
  font-size: 14px;
  color: var(--navy);
  line-height: 1.3;
}

.prod-mobile-card-cat {
  font-size: 12px;
  color: var(--gray-400);
  margin-top: 2px;
}

.prod-mobile-card-actions {
  display: flex;
  gap: 6px;
  flex-shrink: 0;
}

.prod-mobile-card-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 13px;
  color: var(--gray-700);
  padding-top: 6px;
  border-top: 1px solid var(--border);
}

.prod-mobile-label {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .06em;
  color: var(--gray-400);
}

/* ============================================================
   ADMIN FOOTER — revisado
   ============================================================ */
.admin-footer {
  margin-top: auto;
  background: var(--navy);
  padding: 12px 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  border-top: 1px solid rgba(255,255,255,.07);
}

.admin-footer-brand {
  display: flex;
  align-items: center;
  gap: 8px;
  font-family: 'Sora', sans-serif;
  font-size: 13px;
  font-weight: 700;
  color: rgba(255,255,255,.75);
}

.admin-footer-brand span {
  font-weight: 400;
  color: rgba(255,255,255,.35);
  font-size: 12px;
}

.admin-footer-copy {
  font-size: 11.5px;
  color: rgba(255,255,255,.3);
}

@media (max-width: 640px) {
  .admin-footer {
    justify-content: center;
    text-align: center;
    padding: 10px 16px;
    gap: 4px;
    flex-direction: column;
  }
  .admin-footer-brand { font-size: 12px; }
  .admin-footer-copy  { font-size: 11px; }
}

/* ============================================================
   TARJA DE DEMONSTRAÇÃO
   ============================================================ */
.demo-banner {
  background: #dc2626;
  color: white;
  text-align: center;
  padding: 10px 20px;
  font-size: 13.5px;
  font-weight: 700;
  letter-spacing: .03em;
  position: sticky;
  top: 0;
  z-index: 99;
  box-shadow: 0 2px 8px rgba(220,38,38,.4);
}
.demo-banner span {
  display: inline-flex;
  align-items: center;
  gap: 7px;
}

@media (max-width: 640px) {
  .demo-banner {
    padding: 11px 14px;
    font-size: 13px;
    position: sticky;
  }
}

/* 641–900px: mantém grid 2 colunas mas sidebar menor */
@media (min-width: 641px) and (max-width: 900px) {
  .store-layout { grid-template-columns: 220px 1fr; }
  .sidebar { padding: 14px; }
}
