/* ==========================================================================
   JHON CAR - LOJA AUTOMOTIVA & PAINEL ADMINISTRATIVO
   Estilo harmonizado com o Design System Oficial da Jhon Car
   ========================================================================== */

/* --- HERO DA LOJA COM AUTO-RECOLHIMENTO SUAVE --- */
.store-hero {
  position: relative;
  padding: 38px 0 44px 0;
  background: linear-gradient(180deg, #ffffff 0%, #f8fafc 100%);
  border-bottom: 1px solid var(--border-subtle);
  overflow: hidden;
  transition: padding 0.5s cubic-bezier(0.4, 0, 0.2, 1), background-color 0.4s ease;
}

.store-hero.is-collapsed {
  padding: 18px 0 20px 0;
  background: #ffffff;
}

@media (max-width: 768px) {
  .store-hero {
    padding: 24px 0 28px 0;
  }
  .store-hero.is-collapsed {
    padding: 14px 0 16px 0;
  }
}

.store-hero-collapsible-top,
.store-hero-collapsible-bottom {
  max-height: 500px;
  opacity: 1;
  overflow: hidden;
  transition: max-height 0.55s cubic-bezier(0.4, 0, 0.2, 1),
              opacity 0.4s ease,
              transform 0.45s ease,
              margin 0.4s ease;
  transform: translateY(0);
}

.store-hero-collapsible-top {
  margin-bottom: 14px;
}

.store-hero-collapsible-bottom {
  margin-top: 0;
}

.store-hero.is-collapsed .store-hero-collapsible-top {
  max-height: 0;
  opacity: 0;
  margin-bottom: 0;
  transform: translateY(-8px);
  pointer-events: none;
}

.store-hero.is-collapsed .store-hero-collapsible-bottom {
  max-height: 0;
  opacity: 0;
  margin-top: 0;
  transform: translateY(-8px);
  pointer-events: none;
}

.store-hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: rgba(253, 89, 0, 0.08);
  border: 1px solid rgba(253, 89, 0, 0.25);
  padding: 6px 16px;
  border-radius: var(--radius-full);
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--brand-orange);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  margin-bottom: 0;
}

.store-hero-title {
  font-family: var(--font-heading);
  font-size: clamp(1.85rem, 3.4vw, 2.75rem);
  font-weight: 800;
  color: var(--text-main);
  line-height: 1.3;
  padding-bottom: 2px;
  letter-spacing: -0.02em;
  margin-bottom: 16px;
  cursor: pointer;
  user-select: none;
  display: inline-flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
  transition: all 0.45s cubic-bezier(0.4, 0, 0.2, 1);
}

.store-hero.is-collapsed .store-hero-title {
  font-size: clamp(1.2rem, 2vw, 1.55rem);
  line-height: 1.35;
  margin-bottom: 0;
}

.store-hero-title:hover {
  color: var(--brand-orange);
}

.store-hero-toggle-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 26px;
  height: 26px;
  border-radius: var(--radius-full);
  background: rgba(15, 23, 42, 0.05);
  color: var(--text-muted);
  border: 1px solid var(--border-subtle);
  transition: all 0.3s ease;
  flex-shrink: 0;
}

.store-hero-title:hover .store-hero-toggle-btn {
  background: rgba(253, 89, 0, 0.12);
  color: var(--brand-orange);
  border-color: rgba(253, 89, 0, 0.3);
  transform: scale(1.08);
}

.store-hero-toggle-btn svg {
  transition: transform 0.45s cubic-bezier(0.4, 0, 0.2, 1);
  transform: rotate(180deg);
}

.store-hero.is-collapsed .store-hero-toggle-btn svg {
  transform: rotate(0deg);
}

.store-hero-subtitle {
  font-size: clamp(0.95rem, 1.15vw, 1.1rem);
  color: var(--text-body);
  max-width: 720px;
  line-height: 1.6;
  margin-bottom: 24px;
}

.store-features-banner {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  margin-top: 20px;
}

.store-feature-chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: #ffffff;
  padding: 8px 16px;
  border-radius: var(--radius-md);
  border: 1px solid var(--border-subtle);
  box-shadow: var(--shadow-sm);
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--text-main);
}

.store-feature-chip svg {
  color: var(--brand-orange);
  flex-shrink: 0;
}

:root {
  --top-nav-height: calc(110px + env(safe-area-inset-top, 0px));
}

@media (max-width: 1080px) {
  :root {
    --top-nav-height: calc(68px + env(safe-area-inset-top, 0px));
  }
}

/* --- BARRA DE FILTROS E BUSCA (FLUSH AO NAVBAR, SEM FRESTAS) --- */
.store-controls-section {
  padding: 12px 0;
  background: #ffffff;
  position: sticky;
  top: calc(var(--top-nav-height, 110px) - 1px);
  z-index: 120;
  border-bottom: 1px solid var(--border-subtle);
  box-shadow: 0 4px 16px rgba(15, 23, 42, 0.05);
  transition: box-shadow 0.2s ease;
}

/* Extensao opaca superior discreta: protege contra subpixel gap sem invadir o titulo do hero */
.store-controls-section::before {
  content: "";
  position: absolute;
  top: -1px;
  left: 0;
  right: 0;
  height: 2px;
  background: #ffffff;
  pointer-events: none;
  z-index: 119;
}

@media (max-width: 1080px) {
  .store-controls-section {
    top: calc(var(--top-nav-height, 68px) - 1px);
    padding: 10px 0;
  }
}

.store-controls-wrap {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.category-chips-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}

.btn-category-chip {
  background: #ffffff;
  border: 1px solid var(--border-medium);
  padding: 8px 18px;
  border-radius: var(--radius-full);
  font-family: var(--font-heading);
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--text-body);
  cursor: pointer;
  transition: var(--transition-fast);
}

.btn-category-chip:hover {
  border-color: var(--brand-orange);
  color: var(--brand-orange);
  transform: translateY(-1px);
}

.btn-category-chip.active {
  background: var(--brand-gradient);
  border-color: transparent;
  color: #ffffff;
  box-shadow: 0 4px 12px rgba(253, 89, 0, 0.3);
}

.store-search-box {
  position: relative;
  min-width: 260px;
}

.store-search-input {
  width: 100%;
  padding: 10px 16px 10px 40px;
  border: 1px solid var(--border-medium);
  border-radius: var(--radius-full);
  background: #ffffff;
  font-family: var(--font-body);
  font-size: 0.9rem;
  color: var(--text-main);
  outline: none;
  transition: var(--transition-fast);
}

.store-search-input:focus {
  border-color: var(--brand-orange);
  box-shadow: 0 0 0 3px rgba(253, 89, 0, 0.15);
}

.store-search-icon {
  position: absolute;
  left: 14px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-dim);
  pointer-events: none;
}

/* --- GRID DE PRODUTOS --- */
.store-products-section {
  padding: 40px 0 80px 0;
}

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

.product-card {
  background: #ffffff;
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  display: flex;
  flex-direction: column;
  transition: var(--transition-normal);
  position: relative;
}

.product-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-card-hover);
  border-color: rgba(253, 89, 0, 0.25);
}

/* Efeito de Atualizacao em Tempo Real (Ao Vivo) */
.product-card.card-live-updated {
  animation: liveCardPulse 2.6s cubic-bezier(0.2, 0.8, 0.2, 1) forwards;
  z-index: 10;
}

@keyframes liveCardPulse {
  0% {
    box-shadow: 0 0 0 0 rgba(22, 163, 74, 0.8);
    border-color: #16a34a;
    transform: scale(1.025);
  }
  30% {
    box-shadow: 0 0 28px 4px rgba(22, 163, 74, 0.45);
    border-color: #22c55e;
    transform: scale(1.03);
  }
  65% {
    box-shadow: 0 0 16px 2px rgba(22, 163, 74, 0.25);
    border-color: #22c55e;
    transform: scale(1.01);
  }
  100% {
    box-shadow: var(--shadow-sm);
    border-color: var(--border-subtle);
    transform: scale(1);
  }
}

.product-live-pill {
  background: #16a34a;
  color: #ffffff;
  font-size: 0.72rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  padding: 3px 8px;
  border-radius: var(--radius-full);
  box-shadow: 0 2px 8px rgba(22, 163, 74, 0.4);
  display: inline-flex;
  align-items: center;
  gap: 4px;
  animation: livePillFade 2.6s ease forwards;
}

@keyframes livePillFade {
  0% { opacity: 0; transform: translateY(-4px); }
  15% { opacity: 1; transform: translateY(0); }
  75% { opacity: 1; transform: translateY(0); }
  100% { opacity: 0; transform: translateY(-4px); }
}

.live-status-indicator {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font-size: 0.8rem;
  font-weight: 700;
  color: #16a34a;
  background: rgba(22, 163, 74, 0.08);
  border: 1px solid rgba(22, 163, 74, 0.25);
  padding: 5px 12px;
  border-radius: var(--radius-full);
  white-space: nowrap;
}

.live-status-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #16a34a;
  box-shadow: 0 0 0 0 rgba(22, 163, 74, 0.7);
  animation: livePulseDot 2s infinite;
}

@keyframes livePulseDot {
  0% {
    box-shadow: 0 0 0 0 rgba(22, 163, 74, 0.7);
  }
  70% {
    box-shadow: 0 0 0 6px rgba(22, 163, 74, 0);
  }
  100% {
    box-shadow: 0 0 0 0 rgba(22, 163, 74, 0);
  }
}

.product-media-wrap {
  position: relative;
  width: 100%;
  aspect-ratio: 1 / 1;
  background: #ffffff;
  border: none;
  padding: 0;
  overflow: hidden;
  cursor: pointer;
}

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

.product-card:hover .product-media-img {
  transform: scale(1.05);
}

.product-badges-layer {
  position: absolute;
  top: 10px;
  left: 10px;
  right: 10px;
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  justify-content: space-between;
  gap: 6px;
  pointer-events: none;
  z-index: 2;
}

.product-badge-tag {
  background: var(--brand-gradient);
  color: #ffffff;
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  padding: 4px 10px;
  border-radius: var(--radius-full);
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.16);
  white-space: nowrap;
}

.product-discount-pill {
  background: #16a34a;
  color: #ffffff;
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.02em;
  padding: 4px 10px;
  border-radius: var(--radius-full);
  box-shadow: 0 4px 10px rgba(22, 163, 74, 0.3);
  white-space: nowrap;
  margin-left: auto;
}

.product-content {
  padding: 20px;
  display: flex;
  flex-direction: column;
  flex-grow: 1;
}

.product-category-meta {
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--brand-orange);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 6px;
}

.product-title {
  font-family: var(--font-heading);
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--text-main);
  line-height: 1.3;
  margin-bottom: 8px;
}

.product-desc {
  font-size: 0.88rem;
  color: var(--text-muted);
  line-height: 1.5;
  margin-bottom: 16px;
  flex-grow: 1;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.product-pricing-box {
  background: #f8fafc;
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 12px 14px;
  margin-bottom: 16px;
}

.pricing-original-row {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.85rem;
  color: var(--text-muted);
}

.price-strikethrough {
  text-decoration: line-through;
}

.pricing-cash-row {
  display: flex;
  align-items: baseline;
  gap: 8px;
  margin-top: 2px;
}

.pricing-cash-val {
  font-family: var(--font-heading);
  font-size: 1.45rem;
  font-weight: 800;
  color: var(--accent-green);
}

.pricing-cash-tag {
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--accent-green);
  background: transparent;
  padding: 0;
  border: none;
  white-space: nowrap;
}

.product-actions-row {
  display: flex;
  gap: 10px;
}

.btn-add-cart {
  flex: 1;
  background: var(--brand-gradient);
  color: #ffffff;
  border: none;
  padding: 12px 16px;
  border-radius: var(--radius-md);
  font-family: var(--font-heading);
  font-size: 0.92rem;
  font-weight: 700;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  box-shadow: 0 4px 14px rgba(253, 89, 0, 0.25);
  transition: var(--transition-fast);
}

.btn-add-cart:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 18px rgba(253, 89, 0, 0.35);
}

.btn-quick-view {
  background: #ffffff;
  border: 1px solid var(--border-medium);
  color: var(--text-main);
  padding: 12px;
  border-radius: var(--radius-md);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: var(--transition-fast);
}

.btn-quick-view:hover {
  border-color: var(--brand-orange);
  color: var(--brand-orange);
}

/* --- BOTÃO FLUTUANTE DE CARRINHO / SACOLA --- */
.floating-cart-btn {
  position: fixed;
  bottom: 24px;
  right: 24px;
  background: var(--brand-gradient);
  color: #ffffff;
  border: none;
  width: 60px;
  height: 60px;
  border-radius: var(--radius-full);
  box-shadow: 0 10px 25px rgba(253, 89, 0, 0.45);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 99;
  transition: transform 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

.floating-cart-btn:hover {
  transform: scale(1.08);
}

.cart-count-badge {
  position: absolute;
  top: -4px;
  right: -4px;
  background: #0f172a;
  color: #ffffff;
  border: 2px solid #ffffff;
  width: 24px;
  height: 24px;
  border-radius: var(--radius-full);
  font-size: 0.78rem;
  font-weight: 800;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* --- GAVETA DO CARRINHO (DRAWER) --- */
.cart-drawer-overlay {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.55);
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
  pointer-events: none;
  z-index: 2000;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s ease, visibility 0.3s ease;
}

.cart-drawer-overlay.active {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
}

.cart-drawer {
  position: fixed;
  top: 0;
  right: 0;
  width: 100%;
  max-width: 440px;
  height: 100vh;
  height: 100dvh;
  max-height: 100dvh;
  padding-top: env(safe-area-inset-top, 0px);
  background: #ffffff;
  box-shadow: -10px 0 30px rgba(0, 0, 0, 0.15);
  z-index: 2001;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  transform: translateX(100%);
  transition: transform 0.35s cubic-bezier(0.16, 1, 0.3, 1);
}

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

.cart-drawer-header {
  padding: 20px 24px;
  border-bottom: 1px solid var(--border-subtle);
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-shrink: 0;
}

.cart-drawer-title {
  font-family: var(--font-heading);
  font-size: 1.25rem;
  font-weight: 800;
  color: var(--text-main);
  display: flex;
  align-items: center;
  gap: 10px;
}

.btn-close-drawer {
  background: transparent;
  border: none;
  cursor: pointer;
  color: var(--text-dim);
  padding: 4px;
  border-radius: var(--radius-xs);
  transition: var(--transition-fast);
}

.btn-close-drawer:hover {
  color: var(--text-main);
}

.cart-drawer-body {
  padding: 20px 24px;
  overflow-y: auto;
  overflow-x: hidden;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior: contain;
  flex: 1 1 auto;
  min-height: 0;
}

.cart-item-row {
  display: flex;
  gap: 14px;
  padding: 14px 0;
  border-bottom: 1px solid var(--border-subtle);
  align-items: center;
}

.cart-item-thumb {
  width: 64px;
  height: 64px;
  border-radius: var(--radius-sm);
  object-fit: contain;
  background: #ffffff;
  border: 1px solid var(--border-subtle);
  padding: 3px;
  box-sizing: border-box;
  flex-shrink: 0;
}

.cart-item-info {
  flex-grow: 1;
}

.cart-item-name {
  font-weight: 700;
  font-size: 0.92rem;
  color: var(--text-main);
  line-height: 1.25;
  margin-bottom: 4px;
}

.cart-item-price {
  font-size: 0.88rem;
  color: var(--accent-green);
  font-weight: 700;
}

.cart-item-qty-wrap {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 6px;
}

.btn-qty {
  width: 24px;
  height: 24px;
  border-radius: var(--radius-xs);
  border: 1px solid var(--border-medium);
  background: #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  font-weight: bold;
}

.cart-drawer-footer {
  padding: 20px 24px;
  border-top: 1px solid var(--border-subtle);
  background: #f8fafc;
}

.cart-summary-line {
  display: flex;
  justify-content: space-between;
  font-size: 0.92rem;
  color: var(--text-body);
  margin-bottom: 8px;
}

.cart-savings-line {
  display: flex;
  justify-content: space-between;
  font-size: 0.92rem;
  font-weight: 700;
  color: var(--accent-green);
  margin-bottom: 12px;
  padding: 6px 10px;
  background: var(--accent-green-bg);
  border-radius: var(--radius-sm);
}

.cart-total-line {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  font-size: 1.25rem;
  font-family: var(--font-heading);
  font-weight: 800;
  color: var(--text-main);
  margin-bottom: 18px;
}

.btn-checkout-whatsapp {
  width: 100%;
  background: #25d366;
  color: #ffffff;
  border: none;
  padding: 14px 20px;
  border-radius: var(--radius-md);
  font-family: var(--font-heading);
  font-size: 1rem;
  font-weight: 700;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  box-shadow: 0 4px 14px rgba(37, 211, 102, 0.35);
  margin-bottom: 10px;
  transition: var(--transition-fast);
}

.btn-checkout-whatsapp:hover {
  background: #1ebc59;
  transform: translateY(-2px);
}

.btn-checkout-shop {
  width: 100%;
  background: #ffffff;
  color: var(--text-main);
  border: 1px solid var(--border-medium);
  padding: 12px 20px;
  border-radius: var(--radius-md);
  font-family: var(--font-heading);
  font-size: 0.92rem;
  font-weight: 700;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  transition: var(--transition-fast);
}

.btn-checkout-shop:hover {
  border-color: var(--brand-orange);
  color: var(--brand-orange);
}

.btn-copy-order-text {
  width: 100%;
  margin-top: 8px;
  background: transparent;
  border: 1px dashed var(--border-medium);
  color: var(--text-muted);
  padding: 9px 14px;
  border-radius: var(--radius-md);
  font-size: 0.82rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  cursor: pointer;
  transition: all 0.2s ease;
}

.btn-copy-order-text:hover {
  background: #f8fafc;
  color: var(--text-main);
  border-color: var(--brand-orange);
}

.btn-copy-order-text.copied {
  background: rgba(34, 197, 94, 0.1);
  color: #16a34a;
  border-color: #16a34a;
}

.future-payment-notice {
  text-align: center;
  font-size: 0.78rem;
  color: var(--text-dim);
  margin-top: 10px;
}

/* ==========================================================================
   PAINEL ADMINISTRATIVO FACILITADO (SUPER AMIGAVEL)
   ========================================================================== */
.admin-card-box {
  background: #ffffff;
  border-radius: var(--radius-xl);
  border: 1px solid var(--border-subtle);
  box-shadow: var(--shadow-card);
  padding: 32px;
  margin-bottom: 30px;
}

.admin-form-group {
  margin-bottom: 22px;
}

.admin-form-label {
  display: block;
  font-family: var(--font-heading);
  font-size: 1rem;
  font-weight: 700;
  color: var(--text-main);
  margin-bottom: 8px;
}

.admin-input-text, .admin-textarea {
  width: 100%;
  padding: 14px 18px;
  border-radius: var(--radius-md);
  border: 2px solid var(--border-medium);
  font-family: var(--font-body);
  font-size: 1rem;
  color: var(--text-main);
  outline: none;
  transition: var(--transition-fast);
}

.admin-input-text:focus, .admin-textarea:focus {
  border-color: var(--brand-orange);
  box-shadow: 0 0 0 4px rgba(253, 89, 0, 0.15);
}

/* Botoes de categoria grandes no admin */
.admin-category-selector {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.admin-cat-btn {
  padding: 12px 20px;
  border-radius: var(--radius-md);
  border: 2px solid var(--border-medium);
  background: #ffffff;
  font-family: var(--font-heading);
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--text-body);
  cursor: pointer;
  transition: var(--transition-fast);
}

.admin-cat-btn.selected {
  background: var(--brand-orange);
  border-color: var(--brand-orange);
  color: #ffffff;
  box-shadow: 0 4px 12px rgba(253, 89, 0, 0.3);
}

/* Botoes faceis de desconto a vista */
.discount-presets {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 8px;
}

.discount-preset-btn {
  padding: 8px 16px;
  border-radius: var(--radius-full);
  border: 1px solid var(--border-medium);
  background: #f8fafc;
  font-weight: 700;
  font-size: 0.9rem;
  cursor: pointer;
  transition: var(--transition-fast);
}

.discount-preset-btn.selected {
  background: var(--accent-green);
  border-color: var(--accent-green);
  color: #ffffff;
}

.live-calculation-box {
  background: #f0fdf4;
  border: 1px solid rgba(22, 163, 74, 0.25);
  border-radius: var(--radius-md);
  padding: 14px 18px;
  margin-top: 12px;
}

/* Area de Upload de Foto com conversao automatica */
.upload-drop-zone {
  border: 2px dashed var(--brand-orange);
  background: rgba(253, 89, 0, 0.03);
  border-radius: var(--radius-lg);
  padding: 36px 20px;
  text-align: center;
  cursor: pointer;
  position: relative;
  transition: var(--transition-fast);
}

.upload-drop-zone:hover {
  background: rgba(253, 89, 0, 0.08);
}

.upload-preview-container {
  margin-top: 16px;
  display: flex;
  align-items: center;
  gap: 16px;
  background: #ffffff;
  padding: 14px;
  border-radius: var(--radius-md);
  border: 1px solid var(--border-subtle);
}

.upload-preview-img {
  width: 90px;
  height: 90px;
  border-radius: var(--radius-sm);
  object-fit: cover;
  background: #f1f5f9;
}

.compression-status-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: #f0fdf4;
  color: #16a34a;
  border: 1px solid rgba(22, 163, 74, 0.25);
  font-size: 0.85rem;
  font-weight: 700;
  padding: 4px 10px;
  border-radius: var(--radius-full);
}

/* ==========================================================================
   MODAL DE CAPTURA DE LEAD (WHATSAPP & ORCAMENTO)
   ========================================================================== */
.lead-modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.65);
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
  pointer-events: none;
  z-index: 2100;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s ease, visibility 0.3s ease;
}

.lead-modal-overlay.active {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
}

.lead-modal-card {
  background: #ffffff;
  border-radius: var(--radius-xl);
  border: 1px solid var(--border-subtle);
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
  width: 100%;
  max-width: 480px;
  padding: 32px 28px;
  position: relative;
  transform: scale(0.95) translateY(12px);
  transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  max-height: 90vh;
  overflow-y: auto;
}

.lead-modal-overlay.active .lead-modal-card {
  transform: scale(1) translateY(0);
}

.lead-modal-close-btn {
  position: absolute;
  top: 18px;
  right: 18px;
  background: #f1f5f9;
  border: none;
  width: 32px;
  height: 32px;
  border-radius: var(--radius-full);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  color: var(--text-muted);
  transition: var(--transition-fast);
}

.lead-modal-close-btn:hover {
  background: #e2e8f0;
  color: var(--text-main);
}

.lead-product-preview-bar {
  display: flex;
  align-items: center;
  gap: 12px;
  background: #f8fafc;
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 10px 14px;
  margin: 18px 0 20px 0;
}

.lead-product-thumb {
  width: 48px;
  height: 48px;
  border-radius: var(--radius-xs);
  object-fit: contain;
  background: #ffffff;
  border: 1px solid var(--border-medium);
  padding: 2px;
  box-sizing: border-box;
  flex-shrink: 0;
}

.lead-product-info {
  flex-grow: 1;
  min-width: 0;
}

.lead-product-title {
  font-weight: 700;
  font-size: 0.88rem;
  color: var(--text-main);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.lead-product-price {
  font-size: 0.85rem;
  font-weight: 800;
  color: var(--accent-green);
  margin-top: 2px;
}

.lead-terms-checkbox-wrap {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  font-size: 0.84rem;
  color: var(--text-body);
  line-height: 1.45;
  margin: 16px 0 22px 0;
  user-select: none;
  cursor: pointer;
}

.lead-terms-checkbox-wrap input[type="checkbox"] {
  width: 17px;
  height: 17px;
  margin-top: 2px;
  accent-color: var(--brand-orange);
  cursor: pointer;
}

.lead-terms-checkbox-wrap a {
  color: var(--brand-orange);
  text-decoration: underline;
  font-weight: 600;
}

.lead-terms-checkbox-wrap a:hover {
  color: #ea580c;
}

/* Tabela de Leads no Painel Admin */
.admin-leads-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.88rem;
  margin-top: 10px;
  table-layout: auto;
}

.admin-leads-table th {
  background: #f8fafc;
  color: var(--text-muted);
  font-weight: 700;
  text-align: left;
  padding: 10px 12px;
  border-bottom: 2px solid var(--border-medium);
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

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

.admin-leads-table tr:hover td {
  background: #fcfcfd;
}

.btn-lead-whatsapp {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: #25d366;
  color: #ffffff !important;
  padding: 6px 12px;
  border-radius: var(--radius-full);
  font-size: 0.8rem;
  font-weight: 700;
  text-decoration: none;
  transition: var(--transition-fast);
  box-shadow: 0 2px 6px rgba(37, 211, 102, 0.25);
  white-space: nowrap;
}

.btn-lead-whatsapp:hover {
  background: #1ebc59;
  transform: translateY(-1px);
}

.btn-lead-copy {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  background: #f8fafc;
  color: var(--text-main);
  border: 1px solid var(--border-medium);
  padding: 6px 11px;
  border-radius: var(--radius-sm);
  font-size: 0.78rem;
  font-weight: 700;
  cursor: pointer;
  transition: var(--transition-fast);
  white-space: nowrap;
}

.btn-lead-copy:hover {
  background: #e2e8f0;
  border-color: #cbd5e1;
}

.leads-filter-container {
  background: #f8fafc;
  border: 1px solid var(--border-medium);
  border-radius: var(--radius-md);
  padding: 14px;
  margin-bottom: 16px;
  transition: var(--transition-normal);
}

.leads-search-input-wrapper {
  position: relative;
  flex: 1;
  min-width: 240px;
}

.leads-search-input-wrapper svg {
  position: absolute;
  left: 12px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-dim);
  pointer-events: none;
}

.leads-search-input-wrapper input {
  padding-left: 36px !important;
}

/* ==========================================================================
   CRUD DE CATEGORIAS E DESCONTOS NO PAINEL ADMIN
   ========================================================================== */
.admin-step-label-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 8px;
}

.btn-step-crud-action {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  background: #ffffff;
  border: 1px dashed var(--border-medium);
  color: var(--brand-orange);
  padding: 5px 12px;
  border-radius: var(--radius-sm);
  font-size: 0.8rem;
  font-weight: 700;
  cursor: pointer;
  transition: var(--transition-fast);
}

.btn-step-crud-action:hover {
  background: rgba(253, 89, 0, 0.08);
  border-color: var(--brand-orange);
  color: var(--brand-orange-hover);
}

.admin-cat-btn.btn-plus-crud-pill {
  border: 2px dashed var(--brand-orange);
  background: rgba(253, 89, 0, 0.04);
  color: var(--brand-orange);
  display: inline-flex;
  align-items: center;
  gap: 6px;
  cursor: pointer;
}

.admin-cat-btn.btn-plus-crud-pill:hover {
  background: rgba(253, 89, 0, 0.12);
  border-color: var(--brand-orange);
  transform: translateY(-1px);
}

.discount-preset-btn.btn-plus-crud-pill {
  border: 1.5px dashed var(--accent-green);
  background: rgba(22, 163, 74, 0.04);
  color: var(--accent-green);
  display: inline-flex;
  align-items: center;
  gap: 5px;
  cursor: pointer;
}

.discount-preset-btn.btn-plus-crud-pill:hover {
  background: rgba(22, 163, 74, 0.12);
  border-color: var(--accent-green);
  transform: translateY(-1px);
}

/* Modais de Gerenciamento CRUD */
.crud-modal-overlay {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(15, 23, 42, 0.65);
  backdrop-filter: blur(4px);
  z-index: 10000;
  align-items: center;
  justify-content: center;
  padding: 16px;
}

.crud-modal-overlay.active {
  display: flex;
}

.crud-modal-card {
  background: #ffffff;
  border-radius: var(--radius-lg);
  max-width: 520px;
  width: 100%;
  max-height: 90vh;
  max-height: 90dvh;
  display: flex;
  flex-direction: column;
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.2);
  border: 1px solid var(--border-subtle);
  position: relative;
  animation: crudModalPopIn 0.22s cubic-bezier(0.16, 1, 0.3, 1);
  overflow: hidden;
}

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

.crud-modal-header {
  padding: 18px 22px;
  border-bottom: 1px solid var(--border-subtle);
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: #f8fafc;
}

.crud-modal-header h3 {
  font-family: var(--font-heading);
  font-size: 1.2rem;
  font-weight: 800;
  color: var(--text-main);
  margin: 0;
}

.crud-modal-close-btn {
  background: none;
  border: none;
  color: var(--text-dim);
  cursor: pointer;
  padding: 6px;
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: var(--transition-fast);
}

.crud-modal-close-btn:hover {
  color: var(--text-main);
  background: #e2e8f0;
}

.crud-modal-body {
  padding: 20px 22px calc(20px + env(safe-area-inset-bottom, 0px)) 22px;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior: contain;
  flex: 1 1 auto;
  min-height: 0;
}

.crud-add-box {
  background: #f8fafc;
  border: 1px solid var(--border-medium);
  border-radius: var(--radius-md);
  padding: 14px;
  margin-bottom: 20px;
}

.crud-add-form {
  display: flex;
  gap: 8px;
  margin-top: 8px;
}

.crud-items-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.crud-item-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 14px;
  background: #ffffff;
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  gap: 12px;
  transition: var(--transition-fast);
}

.crud-item-row:hover {
  border-color: var(--border-medium);
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.03);
}

.crud-item-info {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-grow: 1;
  min-width: 0;
}

.crud-item-title {
  font-weight: 700;
  color: var(--text-main);
  font-size: 0.95rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.crud-item-pill {
  font-size: 0.72rem;
  font-weight: 800;
  padding: 2px 8px;
  border-radius: var(--radius-full);
  background: #f1f5f9;
  color: var(--text-muted);
}

.crud-item-actions {
  display: flex;
  gap: 6px;
  align-items: center;
  flex-shrink: 0;
}

.btn-crud-action-sm {
  padding: 6px 10px;
  border-radius: var(--radius-sm);
  font-size: 0.8rem;
  font-weight: 700;
  cursor: pointer;
  border: 1px solid transparent;
  transition: var(--transition-fast);
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.btn-crud-edit {
  background: #f1f5f9;
  border-color: var(--border-medium);
  color: var(--text-main);
}

.btn-crud-edit:hover {
  background: #e2e8f0;
}

.btn-crud-delete {
  background: #fef2f2;
  border-color: #fecaca;
  color: #dc2626;
}

.btn-crud-delete:hover:not(:disabled) {
  background: #fee2e2;
}

.btn-crud-delete:disabled {
  opacity: 0.35;
  cursor: not-allowed;
}

.crud-inline-edit-form {
  display: flex;
  align-items: center;
  gap: 6px;
  width: 100%;
}

/* ==========================================================================
   VISUALIZADOR CLEAN DE PRODUTO (LIGHTBOX / QUICK-VIEW NO TEMA CLARO)
   ========================================================================== */
.clean-viewer-overlay {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.65);
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
  pointer-events: none;
  z-index: 99999;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.25s ease, visibility 0.25s ease;
  padding: 20px;
  box-sizing: border-box;
}

.clean-viewer-overlay.active {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}

.clean-viewer-container {
  width: 100%;
  max-width: 980px;
  max-height: 88vh;
  background: #ffffff;
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-xl);
  display: flex;
  flex-direction: row;
  box-shadow: 0 25px 60px -15px rgba(15, 23, 42, 0.25), 0 0 0 1px rgba(0, 0, 0, 0.04);
  overflow: hidden;
  position: relative;
  transform: scale(0.96);
  transition: transform 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

.clean-viewer-overlay.active .clean-viewer-container {
  transform: scale(1);
}

/* Coluna Esquerda: Galeria de Fotos */
.clean-viewer-gallery-col {
  flex: 1.15;
  min-width: 0;
  background: radial-gradient(circle at center, #ffffff 65%, #f8fafc 100%);
  border-right: 1px solid var(--border-subtle);
  display: flex;
  flex-direction: column;
  padding: 24px;
  box-sizing: border-box;
  position: relative;
}

.clean-viewer-gallery-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
}

.clean-viewer-counter {
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--text-muted);
  background: #f1f5f9;
  border: 1px solid var(--border-subtle);
  padding: 4px 12px;
  border-radius: var(--radius-full);
}

.clean-viewer-stage {
  flex: 1;
  min-height: 320px;
  max-height: 440px;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  background: transparent;
}

.clean-viewer-img-wrapper {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
}

.clean-viewer-img {
  max-width: 100%;
  max-height: 100%;
  width: auto;
  height: auto;
  object-fit: contain;
  filter: drop-shadow(0 6px 16px rgba(0, 0, 0, 0.06));
  transition: opacity 0.2s ease, transform 0.2s ease;
  user-select: none;
}

.clean-viewer-img.is-switching {
  opacity: 0.25;
  transform: scale(0.97);
}

/* Botoes de Navegacao (Setas) */
.clean-viewer-nav-btn {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: #ffffff;
  border: 1px solid var(--border-medium);
  color: var(--text-main);
  width: 42px;
  height: 42px;
  border-radius: var(--radius-full);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  z-index: 10;
  transition: all 0.2s ease;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.clean-viewer-nav-btn:hover {
  background: var(--brand-orange);
  border-color: var(--brand-orange);
  color: #ffffff;
  transform: translateY(-50%) scale(1.08);
}

.clean-viewer-nav-btn.prev {
  left: 6px;
}

.clean-viewer-nav-btn.next {
  right: 6px;
}

.clean-viewer-nav-btn.hidden {
  display: none !important;
}

/* Miniaturas da Galeria */
.clean-viewer-thumbs {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  margin-top: 14px;
  padding-top: 12px;
  border-top: 1px solid var(--border-subtle);
}

.clean-viewer-thumb-btn {
  width: 54px;
  height: 54px;
  border-radius: var(--radius-md);
  overflow: hidden;
  border: 2px solid var(--border-subtle);
  background: #ffffff;
  cursor: pointer;
  padding: 3px;
  box-sizing: border-box;
  opacity: 0.7;
  transition: all 0.2s ease;
  display: flex;
  align-items: center;
  justify-content: center;
}

.clean-viewer-thumb-btn:hover {
  opacity: 1;
  border-color: var(--border-medium);
}

.clean-viewer-thumb-btn.active {
  opacity: 1;
  border-color: var(--brand-orange);
  box-shadow: 0 0 0 2px rgba(253, 89, 0, 0.25);
  transform: scale(1.05);
}

.clean-viewer-thumb-btn img {
  max-width: 100%;
  max-height: 100%;
  width: auto;
  height: auto;
  object-fit: contain;
}

/* Botao de Fechar (Close) */
.clean-viewer-close-btn {
  background: #f1f5f9;
  border: 1px solid var(--border-subtle);
  color: var(--text-muted);
  width: 36px;
  height: 36px;
  border-radius: var(--radius-full);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.2s ease;
}

.clean-viewer-close-btn:hover {
  background: #fee2e2;
  color: #dc2626;
  border-color: #fca5a5;
  transform: rotate(90deg);
}

.clean-viewer-close-btn.mobile-only-close {
  display: none;
}

/* Coluna Direita: Detalhes, Preco, Descricao e CTA */
.clean-viewer-details-col {
  flex: 1;
  min-width: 0;
  background: #ffffff;
  padding: 28px 28px 24px 28px;
  display: flex;
  flex-direction: column;
  overflow-y: auto;
  box-sizing: border-box;
}

.clean-viewer-details-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.clean-viewer-badges-row {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
}

.clean-viewer-category {
  font-size: 0.74rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  padding: 4px 10px;
  background: rgba(253, 89, 0, 0.1);
  color: var(--brand-orange);
  border-radius: var(--radius-full);
  white-space: nowrap;
}

.clean-viewer-title {
  color: var(--text-main);
  font-size: 1.45rem;
  font-weight: 800;
  line-height: 1.25;
  margin: 12px 0 14px 0;
}

/* Card de Precos */
.clean-viewer-pricing-card {
  background: #f8fafc;
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 14px 18px;
  margin-bottom: 18px;
}

.clean-viewer-old-price {
  font-size: 0.82rem;
  color: var(--text-dim);
  display: flex;
  gap: 6px;
  align-items: center;
  margin-bottom: 2px;
}

.clean-viewer-cash-price-row {
  display: flex;
  align-items: baseline;
  gap: 8px;
  flex-wrap: wrap;
}

.clean-viewer-price {
  color: #16a34a;
  font-size: 1.85rem;
  font-weight: 800;
  line-height: 1.1;
}

.clean-viewer-tag {
  color: var(--text-muted);
  font-size: 0.82rem;
  font-weight: 700;
}

.clean-viewer-savings-note {
  margin-top: 6px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.78rem;
  font-weight: 700;
  color: #16a34a;
  background: rgba(22, 163, 74, 0.08);
  padding: 3px 8px;
  border-radius: var(--radius-full);
}

/* Descricao e Aplicacao */
.clean-viewer-desc-section {
  margin-bottom: 18px;
  flex-grow: 1;
}

.clean-viewer-section-label {
  display: block;
  font-size: 0.78rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--text-muted);
  margin-bottom: 6px;
}

.clean-viewer-desc-content {
  font-size: 0.92rem;
  color: #334155;
  line-height: 1.6;
  white-space: pre-line;
  max-height: 170px;
  overflow-y: auto;
  padding-right: 6px;
}

/* Vantagens / Trust */
.clean-viewer-trust-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 12px 14px;
  background: #f8fafc;
  border-radius: var(--radius-md);
  margin-bottom: 18px;
  border: 1px dashed var(--border-medium);
}

.clean-viewer-trust-item {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.8rem;
  color: var(--text-muted);
  font-weight: 600;
}

.clean-viewer-trust-item svg {
  color: var(--brand-orange);
  flex-shrink: 0;
}

/* Acao Adicionar ao Carrinho */
.clean-viewer-action-box {
  margin-top: auto;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.clean-viewer-cta-btn {
  width: 100%;
  font-size: 1.05rem;
  padding: 15px 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  box-shadow: 0 4px 14px rgba(253, 89, 0, 0.35);
  cursor: pointer;
}

.clean-viewer-action-hint {
  font-size: 0.75rem;
  color: var(--text-dim);
  text-align: center;
}

/* Responsividade Mobile (<= 860px) */
@media (max-width: 860px) {
  .clean-viewer-container {
    flex-direction: column;
    max-height: 94vh;
    max-width: 520px;
    overflow-y: auto;
  }

  .clean-viewer-gallery-col {
    flex: none;
    border-right: none;
    border-bottom: 1px solid var(--border-subtle);
    padding: 16px;
  }

  .clean-viewer-close-btn.mobile-only-close {
    display: inline-flex;
  }

  .clean-viewer-close-btn.desktop-close {
    display: none;
  }

  .clean-viewer-stage {
    min-height: 240px;
    max-height: 280px;
  }

  .clean-viewer-details-col {
    padding: 20px 16px;
    overflow-y: visible;
  }

  .clean-viewer-title {
    font-size: 1.25rem;
  }

  .clean-viewer-price {
    font-size: 1.55rem;
  }
}

/* Indicadores nos cards da loja */
.product-media-wrap {
  cursor: pointer;
}

.product-zoom-hint {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%) scale(0.85);
  background: rgba(15, 23, 42, 0.78);
  color: #ffffff;
  padding: 7px 14px;
  border-radius: var(--radius-full);
  font-size: 0.78rem;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  border: 1px solid rgba(255, 255, 255, 0.2);
  opacity: 0;
  transition: all 0.25s ease;
  pointer-events: none;
  z-index: 3;
}

.product-card:hover .product-zoom-hint {
  opacity: 1;
  transform: translate(-50%, -50%) scale(1);
}

.product-gallery-pill {
  position: absolute;
  bottom: 8px;
  right: 8px;
  background: rgba(15, 23, 42, 0.75);
  color: #ffffff;
  font-size: 0.72rem;
  font-weight: 700;
  padding: 3px 8px;
  border-radius: var(--radius-full);
  display: inline-flex;
  align-items: center;
  gap: 4px;
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  border: 1px solid rgba(255, 255, 255, 0.15);
  z-index: 2;
  pointer-events: none;
}

/* --- GERENCIADOR DE ATE 3 IMAGENS NO ADMIN --- */
.image-slots-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
  margin-top: 10px;
}

@media (max-width: 820px) {
  .image-slots-grid {
    grid-template-columns: 1fr;
  }
}

.image-slot-card {
  background: #ffffff;
  border: 1px solid var(--border-medium);
  border-radius: var(--radius-md);
  padding: 14px;
  display: flex;
  flex-direction: column;
  transition: all 0.2s ease;
  position: relative;
}

.image-slot-card:hover {
  border-color: var(--brand-orange);
  box-shadow: var(--shadow-sm);
}

.image-slot-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 10px;
}

.image-slot-badge {
  font-size: 0.75rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  color: var(--text-muted);
}

.image-slot-card.slot-primary .image-slot-badge {
  color: var(--brand-orange);
}

.image-slot-empty {
  border: 2px dashed var(--border-medium);
  border-radius: var(--radius-sm);
  padding: 24px 12px;
  text-align: center;
  cursor: pointer;
  background: #f8fafc;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  transition: all 0.2s ease;
  min-height: 140px;
}

.image-slot-empty:hover {
  background: #fff7ed;
  border-color: var(--brand-orange);
}

.image-slot-empty svg {
  color: var(--brand-orange);
  margin-bottom: 6px;
}

.image-slot-filled {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.image-slot-thumb-wrap {
  width: 100%;
  height: 160px;
  border-radius: var(--radius-sm);
  overflow: hidden;
  position: relative;
  cursor: pointer;
  background: radial-gradient(circle at center, #ffffff 65%, #f1f5f9 100%);
  border: 1px solid var(--border-subtle);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 8px;
  box-sizing: border-box;
}

.image-slot-thumb {
  max-width: 100%;
  max-height: 100%;
  width: auto;
  height: auto;
  object-fit: contain;
  transition: transform 0.3s ease;
}

.image-slot-thumb-wrap:hover .image-slot-thumb {
  transform: scale(1.05);
}

.image-slot-zoom-overlay {
  position: absolute;
  inset: 0;
  background: rgba(15, 23, 42, 0.45);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #ffffff;
  opacity: 0;
  transition: opacity 0.2s ease;
}

.image-slot-thumb-wrap:hover .image-slot-zoom-overlay {
  opacity: 1;
}

.image-slot-details {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px;
}

.image-slot-metric {
  font-size: 0.76rem;
  color: #16a34a;
  font-weight: 700;
}

.image-slot-btns {
  display: flex;
  gap: 6px;
}

.btn-slot-action {
  background: #f1f5f9;
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  padding: 4px 8px;
  font-size: 0.75rem;
  font-weight: 700;
  cursor: pointer;
  color: var(--text-main);
  transition: all 0.2s ease;
}

.btn-slot-action:hover {
  background: #e2e8f0;
}

.btn-slot-remove:hover {
  background: #fee2e2;
  color: #dc2626;
  border-color: #fca5a5;
}

/* ==========================================================================
   ELEMENTOS SEMANTICOS DA LOJA, SACOLA & RODAPE
   ========================================================================== */
.store-controls-search-wrap {
  display: flex;
  align-items: center;
  gap: 14px;
  flex-wrap: wrap;
}

.cart-customer-name-box {
  margin-bottom: 12px;
  background: #ffffff;
  border: 1px solid var(--border-subtle);
  border-radius: 10px;
  padding: 10px 12px;
}

.cart-customer-name-label {
  display: block;
  font-size: 0.76rem;
  font-weight: 800;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  margin-bottom: 6px;
}

.cart-customer-name-input {
  width: 100%;
  border: 1px solid var(--border-medium);
  border-radius: 8px;
  padding: 8px 12px;
  font-size: 0.9rem;
  font-family: var(--font-body);
  color: var(--text-main);
  outline: none;
  box-sizing: border-box;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.cart-customer-name-input:focus {
  border-color: var(--brand-orange);
  box-shadow: 0 0 0 3px rgba(253, 89, 0, 0.14);
}

/* Previa da mensagem do WhatsApp na Sacola */
.cart-msg-preview-details {
  margin-bottom: 12px;
  background: #ffffff;
  border: 1px dashed var(--border-medium);
  border-radius: 10px;
  overflow: hidden;
}

.cart-msg-preview-summary {
  padding: 8px 12px;
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--text-muted);
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 6px;
  user-select: none;
  list-style: none;
  transition: color 0.2s ease, background 0.2s ease;
}

.cart-msg-preview-summary::-webkit-details-marker {
  display: none;
}

.cart-msg-preview-summary:hover {
  color: var(--brand-orange);
  background: #f8fafc;
}

.cart-msg-preview-box {
  margin: 0;
  padding: 10px 12px;
  background: #f0fdf4;
  border-top: 1px dashed rgba(22, 163, 74, 0.25);
  font-family: var(--font-body);
  font-size: 0.76rem;
  line-height: 1.48;
  color: #1e293b;
  white-space: pre-wrap;
  word-break: break-word;
  max-height: 160px;
  overflow-y: auto;
}

/* Rodape da Loja */
.store-footer {
  background: #0f172a;
  color: #ffffff;
  padding: 40px 0;
  margin-top: 40px;
}

.store-footer-inner {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: 20px;
}

.store-footer-title {
  font-family: var(--font-heading);
  font-weight: 800;
  font-size: 1.2rem;
}

.store-footer-sub {
  color: #94a3b8;
  font-size: 0.88rem;
  margin-top: 4px;
}

.store-footer-links {
  display: flex;
  gap: 16px;
  align-items: center;
  flex-wrap: wrap;
}

.store-footer-link {
  color: #cbd5e1;
  text-decoration: none;
  font-size: 0.9rem;
  transition: color 0.2s ease;
}

.store-footer-link:hover {
  color: #ffffff;
}

.store-footer-admin-link {
  color: #64748b;
  text-decoration: none;
  font-size: 0.82rem;
  border: 1px solid #334155;
  padding: 6px 12px;
  border-radius: 6px;
  transition: all 0.2s ease;
}

.store-footer-admin-link:hover {
  color: #e2e8f0;
  border-color: #64748b;
}

/* ==========================================================================
   RESPONSIVIDADE TOTAL DA LOJA (DESKTOP, TABLET & CELULAR)
   Garante experiencia fluida de compra em qualquer tela (320px a 4K)
   ========================================================================== */

/* Em dispositivos touch (celular/tablet), exibe dica discreta de toque na foto */
@media (hover: none) {
  .product-zoom-hint {
    opacity: 1;
    top: auto;
    bottom: 8px;
    left: 8px;
    transform: none;
    padding: 4px 10px;
    font-size: 0.7rem;
    background: rgba(15, 23, 42, 0.72);
  }
  .product-card:hover {
    transform: none;
  }
}

/* --- TABLETS & TELAS MEDIAS (<= 860px) --- */
@media (max-width: 860px) {
  .clean-viewer-overlay {
    padding: 10px;
    align-items: flex-end;
  }

  .clean-viewer-container {
    flex-direction: column;
    max-height: 92vh;
    max-height: 92dvh;
    max-width: 100%;
    border-radius: 20px 20px 14px 14px;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
  }

  .clean-viewer-desc-content {
    max-height: none;
    overflow-y: visible;
    padding-right: 0;
  }

  .clean-viewer-action-box {
    position: sticky;
    bottom: 0;
    background: #ffffff;
    padding-top: 12px;
    padding-bottom: calc(4px + env(safe-area-inset-bottom, 0px));
    border-top: 1px solid var(--border-subtle);
    z-index: 5;
  }
}

/* --- TABLETS RETRATO & CELULARES (<= 768px) --- */
@media (max-width: 768px) {
  .store-hero-badge {
    font-size: clamp(0.66rem, 2.8vw, 0.74rem);
    padding: 5px 12px;
    white-space: nowrap;
    max-width: 100%;
  }

  .store-hero-badge svg {
    flex-shrink: 0;
  }

  .store-hero-title {
    font-size: clamp(1.38rem, 5.2vw, 1.85rem);
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    flex-wrap: nowrap;
    width: 100%;
    gap: 10px;
    margin-bottom: 10px;
  }

  .store-hero-toggle-btn {
    margin-top: 4px;
  }

  .store-hero-subtitle {
    font-size: 0.9rem;
    line-height: 1.5;
    margin-bottom: 14px;
  }

  /* Chips de diferenciais com rolagem horizontal suave no celular */
  .store-features-banner {
    flex-wrap: nowrap;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    gap: 8px;
    margin-top: 12px;
    padding-bottom: 4px;
  }

  .store-features-banner::-webkit-scrollbar {
    display: none;
  }

  .store-feature-chip {
    flex-shrink: 0;
    white-space: nowrap;
    font-size: 0.8rem;
    padding: 6px 12px;
  }

  /* Barra fixa de categorias e busca enxuta no celular */
  .store-controls-section {
    padding: 8px 0;
  }

  .store-controls-wrap {
    flex-direction: column;
    align-items: stretch;
    gap: 8px;
  }

  .category-chips-list {
    flex-wrap: nowrap;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    width: 100%;
    gap: 6px;
    padding-bottom: 2px;
  }

  .category-chips-list::-webkit-scrollbar {
    display: none;
  }

  .btn-category-chip {
    flex-shrink: 0;
    white-space: nowrap;
    padding: 7px 14px;
    font-size: 0.82rem;
  }

  .store-controls-search-wrap {
    width: 100%;
    gap: 8px;
  }

  .live-status-indicator {
    display: none;
  }

  .store-search-box {
    min-width: 0;
    width: 100%;
    flex: 1;
  }

  /* 16px evita zoom automatico no iOS Safari */
  .store-search-input,
  .cart-customer-name-input,
  .admin-input-text,
  .admin-textarea {
    font-size: 16px !important;
  }

  .store-search-input {
    padding: 9px 14px 9px 38px;
  }

  /* Grid de produtos responsivo: catalogo nativo em 2 colunas proporcional como no desktop */
  .store-products-section {
    padding: 20px 0 calc(96px + env(safe-area-inset-bottom, 0px)) 0;
  }

  .store-products-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
  }

  .product-card {
    border-radius: var(--radius-md);
  }

  .product-zoom-hint {
    display: none;
  }

  .product-badges-layer {
    top: 7px;
    left: 7px;
    right: 7px;
    gap: 4px;
  }

  .product-badge-tag,
  .product-discount-pill {
    font-size: 0.62rem;
    padding: 3px 7px;
    max-width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
  }

  .product-gallery-pill {
    bottom: 7px;
    right: 7px;
    font-size: 0.64rem;
    padding: 3px 7px;
  }

  .product-content {
    padding: 11px 11px 12px;
  }

  .product-category-meta {
    font-size: 0.65rem;
    margin-bottom: 3px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }

  .product-title {
    font-size: 0.88rem;
    line-height: 1.28;
    margin-bottom: 5px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
  }

  .product-desc {
    font-size: 0.75rem;
    line-height: 1.38;
    margin-bottom: 10px;
    -webkit-line-clamp: 2;
  }

  .product-pricing-box {
    padding: 8px 9px;
    margin-bottom: 10px;
    border-radius: var(--radius-sm);
  }

  .pricing-original-row {
    font-size: 0.7rem;
    gap: 4px;
    flex-wrap: wrap;
  }

  .pricing-cash-row {
    flex-wrap: wrap;
    gap: 2px 5px;
  }

  .pricing-cash-val {
    font-size: 1.06rem;
    line-height: 1.15;
  }

  .pricing-cash-tag {
    font-size: 0.68rem;
  }

  .btn-add-cart {
    padding: 9px 10px;
    font-size: 0.8rem;
    border-radius: var(--radius-sm);
    gap: 6px;
    white-space: nowrap;
  }

  .btn-add-cart svg {
    width: 15px;
    height: 15px;
    flex-shrink: 0;
  }

  /* Gaveta da Sacola (Cart Drawer) otimizada para telas de celular */
  .cart-drawer {
    max-width: 100%;
    height: 100vh;
    height: 100dvh;
  }

  .cart-drawer-header {
    padding: 14px 16px;
  }

  .cart-drawer-title {
    font-size: 1.1rem;
  }

  .btn-close-drawer {
    min-width: 40px;
    min-height: 40px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
  }

  .cart-drawer-body {
    padding: 12px 16px;
  }

  .cart-item-row {
    padding: 10px 0;
    gap: 12px;
  }

  .cart-item-thumb {
    width: 56px;
    height: 56px;
  }

  .btn-qty {
    width: 32px;
    height: 32px;
    font-size: 1rem;
  }

  .cart-drawer-footer {
    padding: 12px 16px calc(14px + env(safe-area-inset-bottom, 0px));
    max-height: 56dvh;
    overflow-y: auto;
  }

  .cart-customer-name-box {
    padding: 8px 10px;
    margin-bottom: 8px;
  }

  .cart-customer-name-label {
    font-size: 0.7rem;
    margin-bottom: 4px;
  }

  .cart-customer-name-input {
    padding: 7px 10px;
  }

  .cart-summary-line {
    font-size: 0.85rem;
    margin-bottom: 4px;
  }

  .cart-savings-line {
    font-size: 0.84rem;
    padding: 5px 8px;
    margin-bottom: 8px;
  }

  .cart-total-line {
    font-size: 1.12rem;
    margin-bottom: 10px;
  }

  .btn-checkout-whatsapp {
    padding: 12px 16px;
    font-size: 0.95rem;
    margin-bottom: 8px;
  }

  .btn-checkout-shop {
    padding: 10px 14px;
    font-size: 0.86rem;
  }

  .btn-copy-order-text {
    padding: 8px 12px;
    font-size: 0.78rem;
    margin-top: 6px;
  }

  /* Botao flutuante da sacola respeitando safe-area */
  .floating-cart-btn {
    bottom: calc(18px + env(safe-area-inset-bottom, 0px));
    right: calc(18px + env(safe-area-inset-right, 0px));
    width: 56px;
    height: 56px;
  }

  /* Modal de Lead no celular */
  .lead-modal-overlay {
    padding: 12px;
  }

  .lead-modal-card {
    padding: 22px 18px;
    max-height: 92dvh;
    border-radius: 18px;
  }

  /* Rodape da loja empilhado e centralizado */
  .store-footer {
    padding: 32px 0 calc(32px + env(safe-area-inset-bottom, 0px));
  }

  .store-footer-inner {
    flex-direction: column;
    text-align: center;
    gap: 16px;
  }

  .store-footer-links {
    justify-content: center;
  }
}

/* --- SMARTPHONES PADRAO & COMPACTOS (<= 480px) --- */
@media (max-width: 480px) {
  .product-content {
    padding: 16px;
  }

  .product-title {
    font-size: 1.05rem;
  }

  .product-desc {
    font-size: 0.84rem;
    margin-bottom: 12px;
  }

  .product-pricing-box {
    padding: 10px 12px;
    margin-bottom: 12px;
  }

  .pricing-cash-val {
    font-size: 1.32rem;
  }

  .btn-add-cart {
    min-height: 46px;
    font-size: 0.9rem;
    padding: 12px 14px;
  }

  .btn-quick-view {
    min-width: 46px;
    min-height: 46px;
  }

  .clean-viewer-stage {
    min-height: 200px;
    max-height: 230px;
  }

  .clean-viewer-thumbs {
    gap: 8px;
  }

  .clean-viewer-thumb-btn {
    width: 58px;
    height: 58px;
  }

  .clean-viewer-title {
    font-size: 1.12rem;
    margin: 8px 0 10px 0;
  }

  .clean-viewer-pricing-card {
    padding: 12px 14px;
    margin-bottom: 14px;
  }

  .clean-viewer-price {
    font-size: 1.45rem;
  }

  .clean-viewer-cta-btn {
    padding: 13px 16px;
    font-size: 0.96rem;
  }
}

/* ==========================================================================
   RESPONSIVIDADE MOBILE DO PAINEL ADMINISTRATIVO & ANTI-ZOOM iOS
   ========================================================================== */
@media (max-width: 768px) {
  .admin-card-box {
    padding: 18px 16px;
    border-radius: 18px;
    margin-bottom: 18px;
  }

  .admin-input-text,
  .admin-textarea,
  .cart-customer-name-input,
  .store-search-input {
    font-size: 16px !important;
  }

  .admin-cat-btn {
    padding: 10px 14px;
    font-size: 0.88rem;
  }

  .leads-search-input-wrapper {
    min-width: 0;
  }

  .crud-modal-overlay {
    padding: 12px;
  }

  .crud-modal-header {
    padding: 14px 16px;
  }

  .crud-modal-header h3 {
    font-size: 1.05rem;
  }

  .crud-modal-body {
    padding: 16px 16px calc(22px + env(safe-area-inset-bottom, 0px)) 16px;
  }
}

@media (max-width: 480px) {
  .admin-card-box {
    padding: 16px 14px;
    border-radius: 16px;
    margin-bottom: 14px;
  }

  .crud-add-form {
    flex-direction: column;
  }

  .crud-add-form button {
    width: 100%;
    justify-content: center;
  }

  .crud-item-row {
    flex-wrap: wrap;
    padding: 10px 12px;
  }

  .crud-item-actions {
    width: 100%;
    justify-content: flex-end;
    padding-top: 6px;
    border-top: 1px dashed var(--border-subtle);
  }

  .store-products-grid {
    gap: 10px;
  }
}

@media (max-width: 345px) {
  .store-products-grid {
    grid-template-columns: 1fr;
  }
}


