/* ========================================
   EROS PREMIUM - CSS CORRIGIDO v14
   Loja de Luxo para Bem-Estar Íntimo
   ======================================== */

/* ===== RESET E VARIÁVEIS ===== */
*,
*::before,
*::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

:root {
  --primary-gold: #d4af37;
  --primary-gold-light: #e8c864;
  --primary-gold-dark: #b8960c;
  --bg-dark: #0a0a0a;
  --bg-card: #141414;
  --bg-card-hover: #1a1a1a;
  --bg-input: #1a1a1a;
  --text-primary: #ffffff;
  --text-secondary: #a0a0a0;
  --text-muted: #666666;
  --accent-rose: #e63946;
  --accent-success: #2ecc71;
  --border-subtle: rgba(255, 255, 255, 0.08);
  --shadow-card: 0 4px 20px rgba(0, 0, 0, 0.4);
  --shadow-glow: 0 0 30px rgba(212, 175, 55, 0.15);
  --transition-fast: 0.2s ease;
  --transition-medium: 0.3s ease;
  --transition-slow: 0.4s ease;
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 16px;
  --radius-xl: 24px;
}

html {
  scroll-behavior: smooth;
  font-size: 16px;
}

body {
  font-family:
    "Montserrat",
    -apple-system,
    BlinkMacSystemFont,
    sans-serif;
  background: var(--bg-dark);
  color: var(--text-primary);
  line-height: 1.6;
  min-height: 100vh;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  -webkit-text-size-adjust: 100%;
}

/* CORREÇÃO v11: Lock de scroll para modais - IMPEDIR scroll do body quando modal aberto */
body.modal-open {
  overflow: hidden !important;
  position: fixed !important;
  width: 100% !important;
  height: 100% !important;
  touch-action: none !important;
  overscroll-behavior: none !important;
  /* Importante: não usar top/left aqui para não mover a posição de scroll */
}

/* ===== SCROLLBAR PERSONALIZADA ===== */
::-webkit-scrollbar {
  width: 8px;
}
::-webkit-scrollbar-track {
  background: var(--bg-dark);
}
::-webkit-scrollbar-thumb {
  background: var(--primary-gold-dark);
  border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
  background: var(--primary-gold);
}

/* ===== LINKS E BOTÕES ===== */
a {
  text-decoration: none;
  color: inherit;
}
button {
  font-family: inherit;
  cursor: pointer;
  border: none;
  background: none;
}

/* ===== HEADER COM CATEGORIAS FIXAS ===== */
header {
  position: sticky;
  top: 0;
  z-index: 1000;
  background: linear-gradient(
    180deg,
    rgba(10, 10, 10, 0.98) 0%,
    rgba(10, 10, 10, 0.95) 100%
  );
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--border-subtle);
}

.header-container {
  max-width: 1400px;
  margin: 0 auto;
  padding: 16px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  flex-wrap: wrap;
}

/* ===== NAVEGAÇÃO DE CATEGORIAS - FIXA NO SCROLL ===== */
.nav-categories {
  display: flex;
  gap: 8px;
  flex-wrap: nowrap;
  overflow-x: auto;
  scrollbar-width: none;
  -ms-overflow-style: none;
  padding: 8px 0;
  margin: 0 -8px;
  flex: 1;
  justify-content: flex-start;
  scroll-snap-type: x mandatory;
  -webkit-overflow-scrolling: touch;
}

.nav-categories::-webkit-scrollbar {
  display: none;
}

.cat-btn {
  padding: 10px 18px;
  background: transparent;
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-xl);
  color: var(--text-secondary);
  font-size: 0.8rem;
  font-weight: 500;
  cursor: pointer;
  transition: var(--transition-medium);
  white-space: nowrap;
  scroll-snap-align: start;
  flex-shrink: 0;
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
  position: relative;
  z-index: 1;
}

.cat-btn:hover {
  border-color: var(--primary-gold);
  color: var(--primary-gold);
}

.cat-btn.active {
  background: linear-gradient(
    135deg,
    var(--primary-gold) 0%,
    var(--primary-gold-dark) 100%
  );
  border-color: var(--primary-gold);
  color: var(--bg-dark);
  font-weight: 600;
}

/* CORREÇÃO: Garantir que header funcione bem em mobile */
@media (max-width: 768px) {
  .nav-categories {
    order: 3;
    width: 100%;
    justify-content: flex-start;
    padding: 8px 0;
  }

  .cat-btn {
    padding: 8px 14px;
    font-size: 0.75rem;
  }
}

/* ===== LOGO ===== */
.logo {
  display: flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
  position: relative;
  z-index: 1001;
}

.logo-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 48px;
  height: 48px;
  background: linear-gradient(
    135deg,
    var(--bg-card) 0%,
    var(--bg-card-hover) 100%
  );
  border: 1px solid var(--primary-gold);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-glow);
}

.logo-text {
  display: flex;
  flex-direction: column;
}

.logo-text h1 {
  font-family: "Playfair Display", serif;
  font-size: 1.75rem;
  font-weight: 700;
  color: var(--primary-gold);
  letter-spacing: 4px;
  line-height: 1;
}

.logo-text span {
  font-size: 0.65rem;
  font-weight: 500;
  color: var(--text-secondary);
  letter-spacing: 3px;
  text-transform: uppercase;
  margin-top: 2px;
}

/* ===== AÇÕES DO HEADER ===== */
.header-actions {
  display: flex;
  align-items: center;
  gap: 16px;
  position: relative;
  z-index: 1001;
}

.search-box {
  position: relative;
  display: flex;
  align-items: center;
}

.search-box svg {
  position: absolute;
  left: 14px;
  color: var(--text-muted);
  pointer-events: none;
}

.search-box input {
  width: 220px;
  padding: 12px 14px 12px 44px;
  background: var(--bg-input);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-xl);
  color: var(--text-primary);
  font-size: 0.85rem;
  transition: var(--transition-medium);
}

.search-box input::placeholder {
  color: var(--text-muted);
}
.search-box input:focus {
  outline: none;
  border-color: var(--primary-gold);
  box-shadow: 0 0 0 3px rgba(212, 175, 55, 0.1);
}

.icon-btn {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 48px;
  height: 48px;
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  color: var(--text-secondary);
  cursor: pointer;
  transition: var(--transition-medium);
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
  z-index: 1001;
}

.icon-btn:hover {
  border-color: var(--primary-gold);
  color: var(--primary-gold);
  box-shadow: var(--shadow-glow);
}

.icon-btn .badge {
  position: absolute;
  top: -6px;
  right: -6px;
  min-width: 20px;
  height: 20px;
  background: var(--accent-rose);
  border-radius: 10px;
  font-size: 0.7rem;
  font-weight: 600;
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 6px;
}

/* ===== HAMBURGUER ===== */
.hamburger {
  display: none;
  flex-direction: column;
  gap: 5px;
  padding: 10px;
  cursor: pointer;
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
  z-index: 1001;
}

.hamburger span {
  display: block;
  width: 25px;
  height: 3px;
  background: var(--primary-gold);
  border-radius: 2px;
  transition: var(--transition-fast);
}

/* ===== SIDEBAR (CARRINHO/WISHLIST) - CORREÇÃO Z-INDEX ===== */
.sidebar {
  position: fixed;
  top: 0;
  right: 0;
  width: 100%;
  max-width: 420px;
  height: 100vh;
  height: 100dvh;
  background: var(--bg-card);
  border-left: 1px solid var(--border-subtle);
  z-index: 3000;
  display: flex;
  flex-direction: column;
  transform: translateX(100%);
  transition: transform var(--transition-slow) cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: -10px 0 40px rgba(0, 0, 0, 0.5);
}

.sidebar:not(.hidden) {
  transform: translateX(0);
}

.sidebar-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 24px;
  border-bottom: 1px solid var(--border-subtle);
  flex-shrink: 0;
  position: relative;
  z-index: 1;
}

.sidebar-header h2 {
  font-family: "Playfair Display", serif;
  font-size: 1.5rem;
  font-weight: 600;
  color: var(--primary-gold);
}

.close-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  background: transparent;
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  color: var(--text-secondary);
  cursor: pointer;
  transition: var(--transition-medium);
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
  position: relative;
  z-index: 10;
}

.close-btn:hover {
  border-color: var(--accent-rose);
  color: var(--accent-rose);
}

.sidebar-content {
  flex: 1;
  overflow-y: auto;
  padding: 20px;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior: contain;
}

.sidebar-footer {
  padding: 24px;
  border-top: 1px solid var(--border-subtle);
  background: var(--bg-dark);
  flex-shrink: 0;
  position: relative;
  z-index: 1;
}

.cart-total {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 16px;
  font-size: 1.1rem;
}

.cart-total span:first-child {
  color: var(--text-secondary);
}
.cart-total span:last-child {
  font-weight: 700;
  color: var(--primary-gold);
  font-size: 1.3rem;
}

/* CORREÇÃO v11: Botão checkout com área clicável FULL - sem transform que causa bugs */
.checkout-btn {
  width: 100%;
  padding: 18px 24px;
  background: linear-gradient(
    135deg,
    var(--primary-gold) 0%,
    var(--primary-gold-dark) 100%
  );
  border: none;
  border-radius: var(--radius-md);
  color: var(--bg-dark);
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  transition:
    box-shadow var(--transition-medium),
    background var(--transition-medium);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
  position: relative;
  z-index: 5;
  box-sizing: border-box;
  min-height: 56px;
  /* Garantir que todo o botão seja clicável */
  isolation: isolate;
  contain: layout style;
}

.checkout-btn::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  z-index: -1;
}

.checkout-btn:hover {
  box-shadow: 0 8px 25px rgba(212, 175, 55, 0.4);
}

.checkout-btn:active {
  box-shadow: 0 4px 15px rgba(212, 175, 55, 0.3);
}

/* ===== ITEM DO CARRINHO ===== */
.cart-item {
  display: flex;
  gap: 16px;
  padding: 16px;
  background: var(--bg-dark);
  border-radius: var(--radius-md);
  margin-bottom: 12px;
  position: relative;
}

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

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

.cart-item-info h4 {
  font-size: 0.9rem;
  font-weight: 500;
  margin-bottom: 4px;
  line-height: 1.3;
  overflow: hidden;
  text-overflow: ellipsis;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

.cart-item-info .price {
  color: var(--primary-gold);
  font-weight: 600;
  font-size: 1rem;
}
.cart-item-info .qty {
  color: var(--text-muted);
  font-size: 0.8rem;
  margin-top: 4px;
}

.cart-item .quantity-controls {
  display: flex;
  align-items: center;
  gap: 0;
  width: fit-content;
  background: var(--bg-card);
  border-radius: var(--radius-sm);
  overflow: hidden;
  border: 1px solid var(--border-subtle);
  margin-top: 8px;
  position: relative;
  z-index: 1;
}

.cart-item .quantity-controls button {
  width: 26px;
  height: 26px;
  background: transparent;
  border: none;
  color: var(--text-secondary);
  font-size: 1.2rem;
  cursor: pointer;
  transition: var(--transition-fast);
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
  position: relative;
  z-index: 2;
}

.cart-item .quantity-controls button:hover {
  background: var(--bg-card-hover);
  color: var(--primary-gold);
}

.cart-item .quantity-controls input {
  width: 20px;
  height: 20px;
  background: transparent;
  border: none;
  border-left: 1px solid var(--border-subtle);
  border-right: 1px solid var(--border-subtle);
  color: var(--text-primary);
  font-size: 0.85rem;
  font-weight: 600;
  text-align: center;
}

.remove-item-btn {
  position: absolute;
  top: 12px;
  right: 12px;
  width: 32px;
  height: 32px;
  background: transparent;
  border: 1px solid var(--border-subtle);
  border-radius: 50%;
  color: var(--text-muted);
  cursor: pointer;
  transition: var(--transition-fast);
  display: flex;
  align-items: center;
  justify-content: center;
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
  z-index: 5;
}

.remove-item-btn:hover {
  border-color: var(--accent-rose);
  color: var(--accent-rose);
  background: rgba(228, 19, 37, 0.1);
}

/* ===== WISHLIST ===== */
.wishlist-item {
  display: flex;
  gap: 16px;
  padding: 16px;
  background: var(--bg-dark);
  border-radius: var(--radius-md);
  margin-bottom: 12px;
  cursor: pointer;
  transition: var(--transition-medium);
  touch-action: manipulation;
  position: relative;
  z-index: 1;
}

.wishlist-item:hover {
  background: var(--bg-card-hover);
}
.wishlist-item img {
  width: 70px;
  height: 70px;
  object-fit: cover;
  border-radius: var(--radius-sm);
  flex-shrink: 0;
}
.wishlist-item-info {
  flex: 1;
  min-width: 0;
}
.wishlist-item-info h4 {
  font-size: 0.85rem;
  font-weight: 500;
  margin-bottom: 4px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.wishlist-item-info .price {
  color: var(--primary-gold);
  font-weight: 600;
}

/* ===== ESTADO VAZIO ===== */
.empty-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 60px 20px;
  text-align: center;
}

.empty-state svg {
  width: 80px;
  height: 80px;
  color: var(--text-muted);
  margin-bottom: 20px;
  opacity: 0.5;
}
.empty-state h3 {
  font-size: 1.2rem;
  color: var(--text-secondary);
  margin-bottom: 8px;
}
.empty-state p {
  color: var(--text-muted);
  font-size: 0.9rem;
}

/* ===== OVERLAY - CORREÇÃO Z-INDEX ===== */
.overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.6);
  backdrop-filter: blur(4px);
  z-index: 2000;
  opacity: 0;
  visibility: hidden;
  transition: var(--transition-medium);
}

.overlay:not(.hidden) {
  opacity: 1;
  visibility: visible;
}

/* ===== HERO ===== */
.hero {
  position: relative;
  padding: 80px 24px 60px;
  background: linear-gradient(
    135deg,
    var(--bg-dark) 0%,
    #0f0f0f 50%,
    var(--bg-dark) 100%
  );
  overflow: hidden;
  text-align: center;
}

.hero::before {
  content: "";
  position: absolute;
  top: -50%;
  right: -20%;
  width: 600px;
  height: 600px;
  background: radial-gradient(
    circle,
    rgba(212, 175, 55, 0.08) 0%,
    transparent 70%
  );
  pointer-events: none;
}

.hero-content {
  max-width: 800px;
  margin: 0 auto;
  position: relative;
  z-index: 1;
}

.hero-content h2 {
  font-family: "Playfair Display", serif;
  font-size: clamp(2rem, 5vw, 3.5rem);
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 16px;
  line-height: 1.2;
}

.hero-content h2 span {
  color: var(--primary-gold);
}
.hero-content p {
  font-size: 1.1rem;
  color: var(--text-secondary);
  margin-bottom: 32px;
}

.hero-badges {
  display: flex;
  gap: 24px;
  flex-wrap: wrap;
  justify-content: center;
}

.badge-item {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 12px 20px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-xl);
  font-size: 0.85rem;
  color: var(--text-secondary);
}

.badge-item svg {
  color: var(--accent-success);
}

/* ===== BARRA DE FILTROS ===== */
.filters-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px 24px;
  max-width: 1400px;
  margin: 0 auto;
  border-bottom: 1px solid var(--border-subtle);
  flex-wrap: wrap;
  gap: 16px;
}

.products-count {
  color: var(--text-muted);
  font-size: 0.9rem;
}
.products-count span {
  color: var(--primary-gold);
  font-weight: 600;
}

.sort-box {
  display: flex;
  align-items: center;
  gap: 10px;
}
.sort-box label {
  color: var(--text-muted);
  font-size: 0.85rem;
}

.sort-box select {
  padding: 10px 36px 10px 14px;
  background: var(--bg-input);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  color: var(--text-primary);
  font-size: 0.85rem;
  cursor: pointer;
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%23a0a0a0' stroke-width='2'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
  transition: var(--transition-medium);
}

.sort-box select:focus {
  outline: none;
  border-color: var(--primary-gold);
}

/* ===== GRID DE PRODUTOS ===== */
.products-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 24px;
  padding: 32px 24px;
  max-width: 1400px;
  margin: 0 auto;
}

/* ===== CARD DE PRODUTO ===== */
.product-card {
  background: var(--bg-card);
  border-radius: var(--radius-lg);
  overflow: hidden;
  border: 1px solid var(--border-subtle);
  transition:
    transform var(--transition-medium),
    box-shadow var(--transition-medium),
    border-color var(--transition-medium);
  cursor: pointer;
  position: relative;
  display: flex;
  flex-direction: column;
  height: 100%;
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
}

.product-card:hover {
  transform: translateY(-8px);
  border-color: rgba(212, 175, 55, 0.3);
  box-shadow: var(--shadow-card), var(--shadow-glow);
}

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

.product-card .card-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform var(--transition-slow);
}

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

.product-card .card-badges {
  position: absolute;
  top: 12px;
  left: 12px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  z-index: 2;
}

.product-card .badge-tag {
  padding: 6px 10px;
  background: var(--accent-rose);
  border-radius: var(--radius-sm);
  font-size: 0.7rem;
  font-weight: 600;
  color: white;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.product-card .badge-new {
  background: var(--accent-success);
}

.product-card .wishlist-btn {
  position: absolute;
  top: 12px;
  right: 12px;
  width: 40px;
  height: 40px;
  background: rgba(0, 0, 0, 0.6);
  backdrop-filter: blur(8px);
  border: none;
  border-radius: 50%;
  color: white;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: var(--transition-medium);
  opacity: 1;
  transform: scale(1);
  z-index: 3;
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
}

.product-card .wishlist-btn:hover {
  background: var(--accent-rose);
}
.product-card .wishlist-btn.active svg {
  fill: var(--accent-rose);
  stroke: var(--accent-rose);
}

.product-card .card-content {
  padding: 20px;
  display: flex;
  flex-direction: column;
  flex: 1 1 auto;
  min-height: 0;
  width: 100%;
}

.product-card .product-category {
  font-size: 0.7rem;
  font-weight: 500;
  color: var(--primary-gold);
  text-transform: uppercase;
  letter-spacing: 1px;
  margin-bottom: 8px;
  display: block;
}

.product-card h3 {
  font-size: 1rem;
  font-weight: 500;
  color: var(--text-primary);
  margin-bottom: 8px;
  line-height: 1.4;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.product-card .product-rating {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 12px;
}

.product-card .stars {
  display: flex;
  gap: 2px;
  color: var(--primary-gold);
  font-size: 0.8rem;
}
.product-card .rating-count {
  font-size: 0.75rem;
  color: var(--text-muted);
}

.product-card .price-container {
  display: flex;
  align-items: baseline;
  gap: 10px;
  margin-bottom: 16px;
  flex-wrap: wrap;
}

.product-card .current-price {
  font-size: 1.4rem;
  font-weight: 700;
  color: var(--primary-gold);
}
.product-card .old-price {
  font-size: 0.9rem;
  color: var(--text-muted);
  text-decoration: line-through;
}

.product-card .installment {
  font-size: 0.75rem;
  color: #00ff6a;
  width: 100%;
  margin-top: 4px;
  text-align: center;
}

/* ===== SELETOR DE TAMANHO NO CARD ===== */
.card-size-selector {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 10px 0;
  padding: 10px 12px;
  background: rgba(212, 175, 55, 0.05);
  border-radius: 8px;
  border: 1px solid rgba(212, 175, 55, 0.2);
  overflow: visible;
  position: relative;
  z-index: 1;
}

.card-size-selector .size-label {
  font-size: 11px;
  color: #d4af37;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  flex-shrink: 0;
}

.card-size-selector .size-buttons {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  max-width: 100%;
  overflow: visible;
}

.card-size-selector .size-btn {
  min-width: 32px;
  height: 32px;
  border: 2px solid #d4af37;
  background: transparent;
  color: #d4af37;
  font-size: 11px;
  font-weight: 700;
  border-radius: 6px;
  cursor: pointer;
  transition: all 0.2s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 8px;
  flex-shrink: 0;
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
  position: relative;
  z-index: 2;
}

.card-size-selector .size-btn:hover {
  background: rgba(212, 175, 55, 0.2);
  transform: scale(1.05);
}

.card-size-selector .size-btn.selected {
  background: linear-gradient(135deg, #d4af37, #b8941a);
  color: #000;
  border-color: #d4af37;
  box-shadow: 0 2px 10px rgba(212, 175, 55, 0.4);
}

.product-card .card-actions {
  display: flex;
  gap: 10px;
  margin-top: auto;
  padding-top: 12px;
  flex-shrink: 0;
  position: relative;
  z-index: 2;
}

.product-card .btn-add-cart {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 14px;
  background: linear-gradient(
    135deg,
    var(--primary-gold) 0%,
    var(--primary-gold-dark) 100%
  );
  border: none;
  border-radius: var(--radius-md);
  color: var(--bg-dark);
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition-medium);
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
  position: relative;
  z-index: 3;
  box-sizing: border-box;
}

.product-card .btn-add-cart:hover {
  box-shadow: 0 6px 20px rgba(212, 175, 55, 0.3);
}

.product-card .btn-add-cart:active {
  box-shadow: 0 2px 10px rgba(212, 175, 55, 0.2);
  opacity: 0.95;
}

.product-card .btn-quick-view {
  width: 48px;
  height: 48px;
  background: var(--bg-dark);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  color: var(--text-secondary);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: var(--transition-medium);
  flex-shrink: 0;
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
  position: relative;
  z-index: 3;
}

.product-card .btn-quick-view:hover {
  border-color: var(--primary-gold);
  color: var(--primary-gold);
}

/* ===== MODAL DE PRODUTO - CORREÇÃO Z-INDEX ===== */
.modal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 4000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  opacity: 0;
  visibility: hidden;
  transition:
    opacity 0.2s ease,
    visibility 0.2s ease;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior: contain;
}

.modal:not(.hidden) {
  opacity: 1;
  visibility: visible;
}

.modal-container {
  position: relative;
  width: 100%;
  max-width: 1000px;
  max-height: 90vh;
  background: var(--bg-card);
  border-radius: var(--radius-xl);
  border: 1px solid var(--border-subtle);
  overflow: hidden;
  transform: scale(0.95);
  transition: transform 0.2s ease;
  display: flex;
  flex-direction: column;
  z-index: 4001;
}

.modal:not(.hidden) .modal-container {
  transform: scale(1);
}

.close-modal-btn {
  position: absolute;
  top: 16px;
  right: 16px;
  width: 44px;
  height: 44px;
  background: var(--bg-dark);
  border: 1px solid var(--border-subtle);
  border-radius: 50%;
  color: var(--text-secondary);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 15;
  transition: var(--transition-medium);
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
}

.close-modal-btn:hover {
  border-color: var(--accent-rose);
  color: var(--accent-rose);
}

.modal-content {
  display: grid;
  grid-template-columns: 1fr 1fr;
  flex: 1;
  overflow: hidden;
}

.modal-gallery {
  background: var(--bg-dark);
  padding: 24px;
  display: flex;
  flex-direction: column;
}

.main-image-container {
  position: relative;
  aspect-ratio: 1;
  border-radius: var(--radius-lg);
  overflow: hidden;
  margin-bottom: 16px;
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--bg-card);
}

#modal-main-img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.modal-badge {
  position: absolute;
  top: 16px;
  left: 16px;
  padding: 8px 12px;
  background: var(--accent-rose);
  border-radius: var(--radius-sm);
  font-size: 0.8rem;
  font-weight: 700;
  color: white;
}

.wishlist-btn-modal {
  position: absolute;
  top: 16px;
  right: 16px;
  width: 48px;
  height: 48px;
  background: rgba(0, 0, 0, 0.6);
  backdrop-filter: blur(8px);
  border: none;
  border-radius: 50%;
  color: white;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: var(--transition-medium);
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
  z-index: 10;
}

.wishlist-btn-modal:hover {
  background: var(--accent-rose);
}
.wishlist-btn-modal.active svg {
  fill: var(--accent-rose);
  stroke: var(--accent-rose);
}

.gallery-thumbs {
  display: flex;
  gap: 10px;
  overflow-x: auto;
  padding-bottom: 8px;
  flex-shrink: 0;
  -webkit-overflow-scrolling: touch;
}

.gallery-thumbs img {
  width: 60px;
  height: 60px;
  object-fit: cover;
  border-radius: var(--radius-sm);
  cursor: pointer;
  border: 2px solid transparent;
  transition: var(--transition-fast);
  flex-shrink: 0;
}

.gallery-thumbs img:hover,
.gallery-thumbs img.active {
  border-color: var(--primary-gold);
}

.modal-details {
  padding: 32px;
  display: flex;
  flex-direction: column;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior: contain;
}

.product-category {
  font-size: 0.75rem;
  font-weight: 500;
  color: var(--primary-gold);
  text-transform: uppercase;
  letter-spacing: 1.5px;
  margin-bottom: 8px;
}

.modal-title {
  font-family: "Playfair Display", serif;
  font-size: 1.5rem;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 12px;
  line-height: 1.3;
}

.modal-description {
  font-size: 0.9rem;
  color: var(--text-secondary);
  line-height: 1.6;
  margin-bottom: 20px;
}

.product-rating {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 20px;
}

.product-rating .stars {
  display: flex;
  gap: 2px;
  color: var(--primary-gold);
  font-size: 0.9rem;
}
.product-rating .rating-count {
  font-size: 0.85rem;
  color: var(--text-muted);
}

.modal-price {
  margin-bottom: 20px;
  padding-bottom: 20px;
  border-bottom: 1px solid var(--border-subtle);
}
.modal-price .price-main {
  font-size: 2rem;
  font-weight: 700;
  color: var(--primary-gold);
  margin-bottom: 6px;
}
.modal-price .price-old {
  font-size: 1rem;
  color: var(--text-muted);
  text-decoration: line-through;
  margin-left: 10px;
}
.modal-price .price-installment {
  font-size: 0.9rem;
  color: rgb(99, 255, 99);
  margin-top: 6px;
}

.product-features {
  margin-bottom: 20px;
}
.product-features h3 {
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 12px;
}
.product-features ul {
  list-style: none;
}
.product-features ul li {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 0;
  font-size: 0.85rem;
  color: var(--text-secondary);
  border-bottom: 1px solid var(--border-subtle);
}
.product-features ul li:last-child {
  border-bottom: none;
}
.product-features ul li svg {
  color: var(--accent-success);
  flex-shrink: 0;
}

/* ===== SELETOR DE TAMANHO NO MODAL ===== */
.size-selector {
  margin-bottom: 20px;
  width: 100%;
}

.size-selector h3 {
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 12px;
}

.size-options {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  width: 100%;
  max-width: 100%;
  position: relative;
  z-index: 2;
}

.size-option {
  min-width: 48px;
  height: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 16px;
  background: var(--bg-dark);
  border: 2px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  color: var(--text-secondary);
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition-medium);
  flex-shrink: 0;
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
  position: relative;
  z-index: 3;
}

.size-option:hover {
  border-color: var(--primary-gold);
  color: var(--primary-gold);
}
.size-option.selected {
  border-color: var(--primary-gold);
  background: rgba(212, 175, 55, 0.1);
  color: var(--primary-gold);
}

/* ===== SELETOR DE QUANTIDADE ===== */
.quantity-selector {
  margin-bottom: 20px;
}
.quantity-selector h3 {
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 12px;
}

.quantity-controls {
  display: flex;
  align-items: center;
  gap: 0;
  width: fit-content;
  background: var(--bg-dark);
  border-radius: var(--radius-md);
  overflow: hidden;
  border: 10px solid var(--border-subtle);
  position: relative;
  z-index: 1;
}

.quantity-controls button,
.qty-btn {
  width: 48px;
  height: 48px;
  background: transparent;
  border: none;
  color: var(--text-secondary);
  font-size: 1.2rem;
  cursor: pointer;
  transition: var(--transition-fast);
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
  position: relative;
  z-index: 2;
}

.quantity-controls button:hover,
.qty-btn:hover {
  background: var(--bg-card-hover);
  color: var(--primary-gold);
}

.quantity-controls input {
  width: 60px;
  height: 48px;
  background: transparent;
  border: none;
  border-left: 1px solid var(--border-subtle);
  border-right: 1px solid var(--border-subtle);
  color: var(--text-primary);
  font-size: 1rem;
  font-weight: 600;
  text-align: center;
  -moz-appearance: textfield;
}

.quantity-controls input::-webkit-outer-spin-button,
.quantity-controls input::-webkit-inner-spin-button {
  -webkit-appearance: none;
  margin: 0;
}

.modal-actions {
  margin-top: auto;
  position: relative;
  z-index: 2;
}

/* CORREÇÃO v11: Botões do modal com área clicável full - sem transform */
.add-cart-btn {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 18px 24px;
  background: linear-gradient(
    135deg,
    var(--primary-gold) 0%,
    var(--primary-gold-dark) 100%
  );
  border: none;
  border-radius: var(--radius-md);
  color: var(--bg-dark);
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  transition:
    box-shadow var(--transition-medium),
    background var(--transition-medium);
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
  position: relative;
  z-index: 5;
  box-sizing: border-box;
  min-height: 56px;
  isolation: isolate;
  contain: layout style;
}

.add-cart-btn::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  z-index: -1;
}

.add-cart-btn:hover {
  box-shadow: 0 8px 25px rgba(212, 175, 55, 0.4);
}

.add-cart-btn:active {
  box-shadow: 0 4px 15px rgba(212, 175, 55, 0.3);
}

.buy-now-btn {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 18px 24px;
  background: linear-gradient(135deg, var(--accent-success) 0%, #27ae60 100%);
  border: none;
  border-radius: var(--radius-md);
  color: white;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  transition:
    box-shadow var(--transition-medium),
    background var(--transition-medium);
  margin-top: 12px;
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
  position: relative;
  z-index: 5;
  box-sizing: border-box;
  min-height: 56px;
  isolation: isolate;
  contain: layout style;
}

.buy-now-btn::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  z-index: -1;
}

.buy-now-btn:hover {
  box-shadow: 0 8px 25px rgba(46, 204, 113, 0.4);
}

.buy-now-btn:active {
  box-shadow: 0 4px 15px rgba(46, 204, 113, 0.3);
}

.buy-now-btn svg {
  width: 20px;
  height: 20px;
}

.product-meta {
  margin-top: 20px;
  padding-top: 20px;
  border-top: 1px solid var(--border-subtle);
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.meta-item {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 0.8rem;
  color: var(--text-muted);
}
.meta-item svg {
  color: var(--primary-gold);
  flex-shrink: 0;
}

/* ===== MODAL DE CHECKOUT EM ETAPAS - CORREÇÃO Z-INDEX ===== */
.checkout-container {
  position: relative;
  width: 100%;
  max-width: 600px;
  max-height: 90vh;
  background: var(--bg-card);
  border-radius: var(--radius-xl);
  border: 1px solid var(--border-subtle);
  overflow: hidden;
  transform: scale(0.95);
  transition: transform 0.2s ease;
  display: flex;
  flex-direction: column;
  z-index: 4001;
}

.modal:not(.hidden) .checkout-container {
  transform: scale(1);
}

/* PROGRESSO DO CHECKOUT */
.checkout-progress {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  background: var(--bg-dark);
  border-bottom: 1px solid var(--border-subtle);
  flex-shrink: 0;
  position: relative;
  z-index: 1;
}

.progress-step {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
}

.progress-step .step-number {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: var(--bg-card);
  border: 2px solid var(--border-subtle);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 600;
  color: var(--text-muted);
  transition: var(--transition-medium);
}

.progress-step.active .step-number,
.progress-step.completed .step-number {
  background: var(--primary-gold);
  border-color: var(--primary-gold);
  color: var(--bg-dark);
}

.progress-step .step-label {
  font-size: 0.75rem;
  color: var(--text-muted);
  transition: var(--transition-medium);
}

.progress-step.active .step-label {
  color: var(--primary-gold);
  font-weight: 600;
}

.progress-line {
  width: 60px;
  height: 2px;
  background: var(--border-subtle);
  margin: 0 16px;
  margin-bottom: 24px;
  transition: var(--transition-medium);
}

.progress-line.completed {
  background: var(--primary-gold);
}

.checkout-content {
  overflow-y: auto;
  padding: 24px;
  flex: 1;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior: contain;
}

.checkout-header {
  text-align: center;
  margin-bottom: 24px;
}
.checkout-header h2 {
  font-family: "Playfair Display", serif;
  font-size: 1.5rem;
  color: var(--primary-gold);
  margin-bottom: 8px;
}
.checkout-header p {
  color: var(--text-secondary);
  font-size: 0.9rem;
}

/* ETAPAS DO CHECKOUT */
.checkout-step {
  display: none;
}

.checkout-step.active {
  display: block;
  animation: fadeIn 0.3s ease;
}

.checkout-form-step {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.form-group label {
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--text-secondary);
}

.form-group input,
.form-group select {
  padding: 14px 16px;
  background: var(--bg-dark);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  color: var(--text-primary);
  font-size: 1rem;
  transition: var(--transition-medium);
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
  position: relative;
  z-index: 1;
}

.form-group input:focus,
.form-group select:focus {
  outline: none;
  border-color: var(--primary-gold);
  box-shadow: 0 0 0 3px rgba(212, 175, 55, 0.1);
}

.form-group input::placeholder {
  color: var(--text-muted);
}
.form-group select {
  cursor: pointer;
}

/* Fix mobile: evitar zoom em inputs */
@media (max-width: 768px) {
  .form-group input,
  .form-group select {
    font-size: 16px;
  }
}

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

.form-groupcep {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 12px;
  align-items: flex-end;
}

.search-cep-btn {
  padding: 14px 20px;
  background: var(--primary-gold);
  border: none;
  border-radius: var(--radius-md);
  color: var(--bg-dark);
  font-weight: 600;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 8px;
  white-space: nowrap;
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
  transition: var(--transition-medium);
  position: relative;
  z-index: 5;
  box-sizing: border-box;
}

.search-cep-btn:hover {
  background: var(--primary-gold-dark);
}

.delivery-info-bar {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 14px 16px;
  background: linear-gradient(
    135deg,
    rgba(46, 204, 113, 0.1) 0%,
    rgba(39, 174, 96, 0.05) 100%
  );
  border: 1px solid rgba(46, 204, 113, 0.2);
  border-radius: var(--radius-md);
  font-size: 0.85rem;
  color: var(--accent-success);
  margin-top: 8px;
}

.delivery-info-bar svg {
  flex-shrink: 0;
}

/* BOTÕES DE ETAPA - CORREÇÃO v11: Área clicável full - sem transform problemático */
.step-buttons {
  display: flex;
  gap: 12px;
  margin-top: 24px;
  position: relative;
  z-index: 5;
}

.step-btn {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 16px 24px;
  background: linear-gradient(
    135deg,
    var(--primary-gold) 0%,
    var(--primary-gold-dark) 100%
  );
  border: none;
  border-radius: var(--radius-md);
  color: var(--bg-dark);
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  transition:
    box-shadow 0.15s ease,
    background 0.15s ease;
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
  min-height: 56px;
  box-sizing: border-box;
  position: relative;
  z-index: 6;
  isolation: isolate;
  contain: layout style;
}

.step-btn::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  z-index: -1;
}

.step-btn:hover {
  box-shadow: 0 4px 15px rgba(212, 175, 55, 0.4);
}

.step-btn:active {
  box-shadow: 0 2px 10px rgba(212, 175, 55, 0.3);
}

.step-btn-back {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 16px 20px;
  background: var(--bg-dark);
  border: 2px solid var(--primary-gold);
  border-radius: var(--radius-md);
  color: var(--primary-gold);
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  transition:
    background 0.15s ease,
    box-shadow 0.15s ease;
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
  min-height: 56px;
  position: relative;
  z-index: 6;
  box-sizing: border-box;
  isolation: isolate;
  contain: layout style;
}

.step-btn-back::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  z-index: -1;
}

.step-btn-back:hover {
  background: rgba(212, 175, 55, 0.1);
  box-shadow: 0 4px 15px rgba(212, 175, 55, 0.2);
}

.step-btn-back:active {
  box-shadow: 0 2px 10px rgba(212, 175, 55, 0.15);
}

/* RESUMO DO PEDIDO */
.order-summary {
  background: var(--bg-dark);
  padding: 20px;
  border-radius: var(--radius-lg);
  border: 1px solid var(--border-subtle);
  margin-bottom: 20px;
}

.order-summary h3 {
  font-size: 1rem;
  font-weight: 600;
  color: var(--primary-gold);
  margin-bottom: 16px;
}

.checkout-items {
  max-height: 180px;
  overflow-y: auto;
  margin-bottom: 16px;
  padding-right: 8px;
}

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

.checkout-item:last-child {
  border-bottom: none;
}
.checkout-item img {
  width: 50px;
  height: 50px;
  object-fit: cover;
  border-radius: var(--radius-sm);
}
.checkout-item-info {
  flex: 1;
}
.checkout-item-info h4 {
  font-size: 0.85rem;
  font-weight: 500;
  margin-bottom: 4px;
}
.checkout-item-info span {
  font-size: 0.8rem;
  color: var(--text-muted);
}
.checkout-item-price {
  font-weight: 600;
  color: var(--primary-gold);
}

.summary-totals {
  border-top: 1px solid var(--border-subtle);
  padding-top: 16px;
}
.summary-line {
  display: flex;
  justify-content: space-between;
  padding: 8px 0;
  font-size: 0.9rem;
  color: var(--text-secondary);
}
.summary-line.discount {
  color: var(--accent-success);
}
.summary-line.total {
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--text-primary);
  padding-top: 16px;
  margin-top: 8px;
  border-top: 1px solid var(--border-subtle);
}
.summary-line.total span:last-child {
  color: var(--primary-gold);
}

/* PAGAMENTO */
.payment-section {
  margin-bottom: 20px;
}
.payment-section h3 {
  font-size: 1rem;
  font-weight: 600;
  color: var(--primary-gold);
  margin-bottom: 16px;
}

.payment-methods {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
}

.payment-option {
  position: relative;
  cursor: pointer;
}

.payment-content {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  padding: 24px 16px;
  background: var(--bg-dark);
  border: 2px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  transition: var(--transition-medium);
  text-align: center;
}

.payment-content div {
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.payment-content strong {
  color: var(--text-primary);
  font-weight: 600;
}
.payment-content span {
  font-size: 0.8rem;
  color: var(--text-muted);
}
.payment-option:hover .payment-content {
  border-color: var(--primary-gold);
}

/* CORREÇÃO v10: Submit button área full */
.submit-btn {
  background: linear-gradient(135deg, var(--accent-success) 0%, #27ae60 100%);
  position: relative;
  z-index: 6;
}

.submit-btn:hover {
  box-shadow: 0 6px 20px rgba(46, 204, 113, 0.3);
}

.security-note {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-size: 0.8rem;
  color: var(--text-muted);
  margin-top: 16px;
}

.security-note svg {
  color: var(--accent-success);
}

/* ===== MODAL PIX - RESPONSIVO - CORREÇÃO Z-INDEX ===== */
.pix-container {
  position: relative;
  width: 100%;
  max-width: 500px;
  background: var(--bg-card);
  border-radius: var(--radius-xl);
  border: 1px solid var(--border-subtle);
  overflow: visible;
  transform: scale(0.95);
  transition: none;
  z-index: 4001;
}

.modal:not(.hidden) .pix-container {
  transform: scale(1);
}

.pix-header {
  position: relative;
  text-align: center;
  padding: 24px;
  padding-right: 60px;
  background: var(--bg-dark);
  border-bottom: 1px solid var(--border-subtle);
  z-index: 10;
}

.close-pix-btn {
  position: absolute;
  top: 16px;
  right: 16px;
  width: 48px;
  height: 48px;
  background: var(--accent-rose);
  border: none;
  border-radius: 50%;
  color: white;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 25;
  transition:
    box-shadow 0.15s ease,
    background 0.15s ease;
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
  min-width: 48px;
  min-height: 48px;
  box-sizing: border-box;
}

.close-pix-btn:hover {
  background: #c5303c;
  box-shadow: 0 4px 15px rgba(230, 57, 70, 0.4);
}

.close-pix-btn:active {
  box-shadow: 0 2px 10px rgba(230, 57, 70, 0.3);
}

.pix-header svg {
  margin-bottom: 12px;
}
.pix-header h2 {
  font-family: "Playfair Display", serif;
  font-size: 1.5rem;
  color: var(--primary-gold);
  margin-bottom: 8px;
}
.pix-header p {
  color: var(--text-secondary);
  font-size: 0.9rem;
}

.pix-content {
  padding: 24px;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 20px;
  overflow-y: auto;
  max-height: 70vh;
  overscroll-behavior: contain;
  -webkit-overflow-scrolling: touch;
  flex-shrink: 0;
}

/* QR CODE - RESPONSIVO E AJUSTÁVEL - CORREÇÃO v12 */
.pix-qrcode-wrapper {
  position: relative;
  width: 100%;
  max-width: 280px;
  margin: 0 auto;
}

.pix-qrcode {
  background: white;
  padding: 16px;
  border-radius: var(--radius-lg);
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  aspect-ratio: 1;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
}

.pix-qrcode img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
}

/* Botões de controle do QR Code */
.pix-qrcode-controls {
  display: flex;
  gap: 8px;
  justify-content: center;
  margin-top: 12px;
}

.pix-zoom-btn {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  color: var(--text-secondary);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition:
    box-shadow 0.1s ease,
    border-color 0.1s ease;
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
  min-width: 44px;
  min-height: 44px;
  box-sizing: border-box;
}

.pix-zoom-btn:hover {
  border-color: var(--primary-gold);
  color: var(--primary-gold);
  box-shadow: 0 4px 15px rgba(212, 175, 55, 0.2);
}

.pix-zoom-btn:active {
  box-shadow: 0 2px 8px rgba(212, 175, 55, 0.15);
}

.pix-copy {
  width: 100%;
  max-width: 400px;
  position: relative;
  z-index: 5;
}
.pix-copy label {
  display: block;
  font-size: 0.85rem;
  color: var(--text-secondary);
  margin-bottom: 8px;
  text-align: left;
}

.copy-box {
  display: flex;
  gap: 12px;
  flex-wrap: nowrap;
  position: relative;
  z-index: 6;
  align-items: stretch;
}

.copy-box input {
  flex: 1;
  min-width: 0;
  padding: 14px 16px;
  background: var(--bg-dark);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  color: var(--text-primary);
  font-size: 0.85rem;
  position: relative;
  z-index: 7;
  font-family: monospace;
  word-break: break-all;
}

/* CORREÇÃO v12: Copy button área full - sem transform, funciona no mobile */
.copy-btn {
  padding: 14px 20px;
  background: var(--primary-gold);
  border: none;
  border-radius: var(--radius-md);
  color: var(--bg-dark);
  font-weight: 600;
  font-size: 0.9rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
  white-space: nowrap;
  transition:
    box-shadow 0.1s ease,
    background 0.1s ease,
    transform 0.1s ease;
  min-height: 50px;
  min-width: 100px;
  position: relative;
  z-index: 8;
  box-sizing: border-box;
  flex-shrink: 0;
  -webkit-appearance: none;
  appearance: none;
  user-select: none;
  -webkit-user-select: none;
}

.copy-btn:hover {
  background: var(--primary-gold-dark);
  box-shadow: 0 4px 15px rgba(212, 175, 55, 0.3);
}

.copy-btn:active {
  box-shadow: 0 2px 10px rgba(212, 175, 55, 0.2);
}

/* Valor e expiração */
.pix-value {
  width: 100%;
  max-width: 400px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  flex-wrap: wrap;
}
.pix-value span {
  color: var(--text-secondary);
  font-size: 0.9rem;
}
.pix-value strong {
  font-size: 1.5rem;
  color: var(--primary-gold);
  font-weight: 700;
}

.pix-expires {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-size: 0.85rem;
  color: var(--text-muted);
  width: 100%;
}

.pix-expires svg {
  color: var(--accent-rose);
  flex-shrink: 0;
}

/* Footer PIX - botões alinhados - CORREÇÃO v10 */
.pix-footer {
  padding: 20px;
  background: var(--bg-dark);
  border-top: 1px solid var(--border-subtle);
  text-align: center;
  display: flex;
  flex-direction: column;
  gap: 12px;
  position: relative;
  z-index: 10;
}

.pix-footer p {
  font-size: 0.85rem;
  color: var(--text-secondary);
}

.pix-payment-info {
  font-size: 0.8rem !important;
  color: var(--text-muted) !important;
  margin-bottom: 4px;
}

.pix-delivery-info {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 16px;
  background: linear-gradient(
    135deg,
    rgba(46, 204, 113, 0.1) 0%,
    rgba(39, 174, 96, 0.05) 100%
  );
  border: 1px solid rgba(46, 204, 113, 0.2);
  border-radius: var(--radius-md);
  color: var(--accent-success);
  font-size: 0.85rem;
  flex-shrink: 0;
}

.pix-delivery-info svg {
  flex-shrink: 0;
}

/* Layout dos botões no footer - CORREÇÃO v11: área clicável sem transform */
.pix-footer-buttons {
  display: flex;
  flex-direction: column;
  gap: 10px;
  width: 100%;
  max-width: 400px;
  margin: 0 auto;
  position: relative;
  z-index: 15;
}

/* CORREÇÃO v11: Continue e back buttons área full - sem transform */
.continue-btn {
  width: 100%;
  padding: 16px 24px;
  background: linear-gradient(
    135deg,
    var(--primary-gold) 0%,
    var(--primary-gold-dark) 100%
  );
  border: none;
  border-radius: var(--radius-md);
  color: var(--bg-dark);
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
  transition:
    box-shadow 0.15s ease,
    background 0.15s ease;
  min-height: 56px;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  z-index: 20;
  box-sizing: border-box;
  isolation: isolate;
  contain: layout style;
}

.continue-btn::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  z-index: -1;
}

.continue-btn:hover {
  box-shadow: 0 4px 15px rgba(212, 175, 55, 0.4);
}

.continue-btn:active {
  box-shadow: 0 2px 10px rgba(212, 175, 55, 0.3);
}

.back-btn {
  width: 100%;
  padding: 14px 24px;
  background: var(--bg-card);
  border: 2px solid var(--primary-gold);
  border-radius: var(--radius-md);
  color: var(--primary-gold);
  font-size: 0.95rem;
  font-weight: 600;
  cursor: pointer;
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
  transition:
    background 0.15s ease,
    box-shadow 0.15s ease;
  min-height: 52px;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  z-index: 20;
  box-sizing: border-box;
  isolation: isolate;
  contain: layout style;
}

.back-btn::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  z-index: -1;
}

.back-btn:hover {
  background: rgba(212, 175, 55, 0.1);
  box-shadow: 0 4px 15px rgba(212, 175, 55, 0.2);
}

.back-btn:active {
  box-shadow: 0 2px 10px rgba(212, 175, 55, 0.15);
}

/* ===== MODAL SUCESSO ===== */
.success-container {
  position: relative;
  width: 100%;
  max-width: 500px;
  background: var(--bg-card);
  border-radius: var(--radius-xl);
  border: 1px solid var(--border-subtle);
  padding: 40px 24px;
  text-align: center;
  transform: scale(0.95);
  transition: transform 0.2s ease;
  z-index: 4001;
}

.modal:not(.hidden) .success-container {
  transform: scale(1);
}

.success-icon {
  margin-bottom: 20px;
}
.success-container h2 {
  font-family: "Playfair Display", serif;
  font-size: 1.5rem;
  color: var(--primary-gold);
  margin-bottom: 12px;
}
.success-container p {
  color: var(--text-secondary);
  margin-bottom: 8px;
  font-size: 0.9rem;
}
.order-number {
  margin: 20px 0;
  font-size: 1rem;
}
.order-number strong {
  color: var(--primary-gold);
}

.success-delivery {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 14px 16px;
  background: linear-gradient(
    135deg,
    rgba(46, 204, 113, 0.1) 0%,
    rgba(39, 174, 96, 0.05) 100%
  );
  border: 1px solid rgba(46, 204, 113, 0.2);
  border-radius: var(--radius-md);
  color: var(--accent-success);
  margin: 20px 0;
  font-size: 0.9rem;
}

.success-delivery svg {
  flex-shrink: 0;
}

/* ===== NOTIFICAÇÃO ===== */
.notification {
  position: fixed;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%) translateY(100px);
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 16px 24px;
  background: var(--accent-success);
  border-radius: var(--radius-lg);
  color: white;
  font-weight: 500;
  z-index: 6000;
  opacity: 0;
  transition:
    transform var(--transition-medium),
    opacity var(--transition-medium);
  box-shadow: 0 10px 30px rgba(46, 204, 113, 0.3);
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
  max-width: 90%;
}

.notification:not(.hidden) {
  transform: translateX(-50%) translateY(0);
  opacity: 1;
}
.notification.error {
  background: var(--accent-rose);
  box-shadow: 0 10px 30px rgba(230, 57, 70, 0.3);
}
.notification.info {
  background: var(--primary-gold);
  box-shadow: 0 10px 30px rgba(212, 175, 55, 0.3);
  color: var(--bg-dark);
}

/* ===== BOTÕES FLUTUANTES ===== */
.floating-buttons {
  position: fixed;
  bottom: 24px;
  right: 24px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  z-index: 1000;
  opacity: 0;
  visibility: hidden;
  transform: translateY(20px);
  transition: var(--transition-medium);
}

.floating-buttons:not(.hidden) {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.float-btn {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: var(--transition-medium);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
  position: relative;
  z-index: 1000;
}

.float-btn svg {
  width: 24px;
  height: 24px;
}

.cart-float-btn {
  background: linear-gradient(
    135deg,
    var(--primary-gold) 0%,
    var(--primary-gold-dark) 100%
  );
  color: var(--bg-dark);
}

.cart-float-btn:hover {
  transform: scale(1.1);
  box-shadow: 0 6px 25px rgba(212, 175, 55, 0.4);
}

.cart-float-btn .badge {
  position: absolute;
  top: -4px;
  right: -4px;
  min-width: 22px;
  height: 22px;
  background: var(--accent-rose);
  border-radius: 11px;
  font-size: 0.7rem;
  font-weight: 700;
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 6px;
}

.back-to-top {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  color: var(--text-secondary);
}

.back-to-top:hover {
  background: var(--bg-card-hover);
  border-color: var(--primary-gold);
  color: var(--primary-gold);
  transform: translateY(-4px);
}

/* ===== FOOTER ===== */
footer {
  background: var(--bg-card);
  border-top: 1px solid var(--border-subtle);
  margin-top: 60px;
}

.footer-container {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 40px;
  max-width: 1400px;
  margin: 0 auto;
  padding: 60px 24px 40px;
}

.footer-col h4 {
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--primary-gold);
  text-transform: uppercase;
  letter-spacing: 1px;
  margin-bottom: 20px;
}

.footer-logo h3 {
  font-family: "Playfair Display", serif;
  font-size: 1.5rem;
  color: var(--primary-gold);
  margin-bottom: 12px;
}
.footer-logo p {
  font-size: 0.85rem;
  color: var(--text-muted);
  line-height: 1.6;
  margin-bottom: 16px;
}

.footer-badges {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
}
.footer-badges span {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 0.75rem;
  color: var(--text-muted);
}
.footer-badges span svg {
  color: var(--primary-gold);
}

.footer-col ul {
  list-style: none;
}
.footer-col ul li {
  margin-bottom: 10px;
}
.footer-col ul li a {
  color: var(--text-secondary);
  text-decoration: none;
  font-size: 0.85rem;
  transition: var(--transition-fast);
}
.footer-col ul li a:hover {
  color: var(--primary-gold);
}
.footer-col ul li svg {
  color: var(--text-muted);
  margin-right: 8px;
  vertical-align: middle;
}

.footer-bottom {
  text-align: center;
  padding: 24px;
  border-top: 1px solid var(--border-subtle);
  background: var(--bg-dark);
}

.footer-bottom p {
  font-size: 0.8rem;
  color: var(--text-muted);
  margin-bottom: 6px;
}
.footer-bottom p:last-child {
  color: var(--primary-gold);
  font-weight: 500;
}

/* ===== LOCALIZAÇÃO ===== */
.location-bar {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 20px;
  background: linear-gradient(
    135deg,
    rgba(46, 204, 113, 0.1) 0%,
    rgba(39, 174, 96, 0.05) 100%
  );
  border-bottom: 1px solid rgba(46, 204, 113, 0.2);
  justify-content: center;
  font-size: 0.85rem;
  color: var(--text-secondary);
  transition: var(--transition-medium);
}

.location-bar svg {
  color: var(--accent-success);
  flex-shrink: 0;
}

@keyframes pulse {
  0%,
  100% {
    opacity: 1;
  }
  50% {
    opacity: 0.5;
  }
}

/* ===== UTILIDADES ===== */
.hidden {
  display: none !important;
}

.fade-in {
  animation: fadeIn 0.4s ease forwards;
}
@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* ===================================================== */
/* ===== MEDIA QUERIES - RESPONSIVIDADE MOBILE ===== */
/* ===================================================== */

/* CORREÇÃO: Header mobile */
@media (max-width: 768px) {
  .header-container {
    padding: 12px 16px;
    justify-content: center;
  }

  .hamburger {
    display: flex;
    position: fixed;
    top: 16px;
    left: 16px;
  }

  .logo {
    width: 100%;
    justify-content: center;
  }
  .logo-text h1 {
    font-size: 1.4rem;
  }

  .search-box {
    display: none;
  }

  .sidebar {
    max-width: 100%;
  }

  .hero {
    padding: 60px 16px 40px;
  }
  .hero-badges {
    gap: 12px;
  }
  .badge-item {
    padding: 8px 14px;
    font-size: 0.75rem;
  }

  .filters-bar {
    flex-direction: column;
    gap: 12px;
    align-items: flex-start;
    padding: 16px;
  }

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

  .product-card {
    min-height: auto;
  }

  .product-card .card-content {
    padding: 14px;
  }
  .product-card h3 {
    font-size: 0.85rem;
  }
  .product-card .current-price {
    font-size: 1.1rem;
  }

  .product-card .card-actions {
    flex-direction: column;
    gap: 8px;
  }
  .product-card .btn-add-cart {
    width: 100%;
    padding: 12px 14px;
    font-size: 0.8rem;
  }
  .product-card .btn-quick-view {
    width: 100%;
    height: 40px;
  }

  /* SELETOR DE TAMANHO NO CARD */
  .card-size-selector {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 6px;
    padding: 8px;
    margin: 8px 0;
    width: 100%;
    box-sizing: border-box;
    overflow: visible;
  }

  .card-size-selector .size-label {
    font-size: 10px;
    margin-bottom: 2px;
  }

  .card-size-selector .size-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
    width: 100%;
    max-width: 100%;
    overflow: visible;
  }

  .card-size-selector .size-btn {
    min-width: 30px;
    height: 30px;
    padding: 0 6px;
    font-size: 10px;
    flex-shrink: 0;
  }

  /* MODAL */
  .modal-container,
  .checkout-container,
  .pix-container,
  .success-container {
    max-height: 95vh;
  }

  .modal-content {
    grid-template-columns: 1fr;
    overflow-y: auto;
    max-height: none;
  }

  .modal-gallery {
    max-height: 280px;
  }
  .modal-details {
    padding: 20px;
  }
  .modal-title {
    font-size: 1.25rem;
  }

  .size-selector {
    width: 100%;
  }
  .size-options {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    width: 100%;
  }

  .size-option {
    flex: 1;
    min-width: 40px;
    padding: 10px;
    font-size: 12px;
  }

  .checkout-progress {
    padding: 16px;
  }
  .progress-step .step-number {
    width: 32px;
    height: 32px;
    font-size: 0.85rem;
  }
  .progress-step .step-label {
    font-size: 0.65rem;
  }
  .progress-line {
    width: 40px;
    margin: 0 8px;
    margin-bottom: 20px;
  }

  .checkout-content {
    padding: 16px;
  }
  .form-row {
    grid-template-columns: 1fr;
  }
  .form-groupcep {
    grid-template-columns: 1fr;
  }
  .search-cep-btn {
    width: 100%;
    justify-content: center;
  }
  .payment-methods {
    grid-template-columns: 1fr;
  }

  .footer-container {
    grid-template-columns: 1fr 1fr;
    padding: 40px 16px 24px;
    gap: 30px;
  }

  .pix-content {
    padding: 20px;
  }
  .pix-qrcode img {
    width: 160px;
    height: 160px;
  }

  .step-buttons {
    flex-direction: column;
  }
  .step-btn,
  .step-btn-back {
    width: 100%;
  }
}

/* Mobile pequeno */
@media (max-width: 480px) {
  .products-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
    padding: 12px;
  }

  .footer-container {
    grid-template-columns: 1fr;
  }
  .form-group-small {
    grid-template-columns: 1fr 1fr;
  }

  .floating-buttons {
    bottom: 16px;
    right: 16px;
  }
  .float-btn {
    width: 48px;
    height: 48px;
  }
  .float-btn svg {
    width: 20px;
    height: 20px;
  }

  .buy-now-btn {
    padding: 14px;
    font-size: 0.85rem;
  }
  .buy-now-btn svg {
    width: 16px;
    height: 16px;
  }

  .card-size-selector {
    padding: 6px;
    gap: 4px;
  }
  .card-size-selector .size-label {
    font-size: 9px;
  }
  .card-size-selector .size-btn {
    min-width: 26px;
    height: 26px;
    padding: 0 4px;
    font-size: 9px;
    border-radius: 4px;
  }

  .size-option {
    min-width: 36px;
    height: 40px;
    padding: 8px;
    font-size: 11px;
  }

  .modal-details {
    padding: 16px;
  }
  .modal-title {
    font-size: 1.1rem;
  }

  .add-cart-btn,
  .buy-now-btn {
    padding: 14px;
    font-size: 0.9rem;
  }

  .logo-text h1 {
    font-size: 1.2rem;
    letter-spacing: 2px;
  }
  .logo-text span {
    font-size: 0.55rem;
  }
  .logo-icon {
    width: 40px;
    height: 40px;
  }

  .hero-content h2 {
    font-size: 1.5rem;
  }
  .hero-content p {
    font-size: 0.9rem;
  }

  .sidebar {
    max-width: 100%;
  }
  .sidebar-header h2 {
    font-size: 1.2rem;
  }
}

/* Mobile muito pequeno */
@media (max-width: 360px) {
  .products-grid {
    grid-template-columns: 1fr 1fr;
    gap: 8px;
    padding: 10px;
  }
  .product-card .card-content {
    padding: 10px;
  }
  .product-card h3 {
    font-size: 0.75rem;
  }
  .product-card .current-price {
    font-size: 1rem;
  }

  .card-size-selector .size-btn {
    min-width: 24px;
    height: 24px;
    font-size: 8px;
    padding: 0 3px;
  }

  .floating-buttons {
    bottom: 12px;
    right: 12px;
  }
  .float-btn {
    width: 44px;
    height: 44px;
  }
}

/* Landscape mobile */
@media (max-height: 500px) and (orientation: landscape) {
  .modal-container {
    max-height: 98vh;
  }
  .modal-content {
    flex-direction: row;
  }
  .modal-gallery {
    max-height: none;
    flex: 1;
  }
  .modal-details {
    flex: 1;
    overflow-y: auto;
  }
}

/* CORREÇÃO MOBILE: Melhorar área de toque */
@media (hover: none) and (pointer: coarse) {
  .product-card .wishlist-btn {
    opacity: 1;
    transform: scale(1);
  }

  .cat-btn {
    padding: 12px 20px;
  }

  .size-option,
  .size-btn {
    min-height: 44px;
    padding: 12px 16px;
  }

  .btn-add-cart,
  .btn-quick-view {
    min-height: 44px;
  }

  .product-card .btn-add-cart,
  .product-card .btn-quick-view {
    min-height: 44px;
  }
}

/* Desktop grande */
@media (min-width: 1400px) {
  .products-grid {
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
  }

  /* QR Code maior em telas grandes */
  .pix-qrcode-wrapper {
    max-width: 320px;
  }
}

/* Responsividade PIX - Mobile (até 600px) */
@media (max-width: 600px) {
  .modal.pix-modal {
    align-items: flex-end;
    justify-content: center;
    padding: 0;
  }

  .pix-container {
    width: 100%;
    max-width: 100%;
    max-height: 92vh;
    border-radius: 20px 20px 0 0;
    position: relative;
    overflow-y: auto;
    overflow-x: hidden;
    display: flex;
    flex-direction: column;
  }

  .pix-header {
    position: sticky;
    top: 0;
    z-index: 15;
    padding: 20px 16px;
    padding-right: 60px;
    background: var(--bg-dark);
    border-bottom: 1px solid var(--border-subtle);
    flex-shrink: 0;
  }

  .close-pix-btn {
    position: absolute;
    top: 14px;
    right: 14px;
    width: 40px;
    height: 40px;
    background: var(--accent-rose);
    border: none;
    border-radius: 50%;
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 30;
  }

  .close-pix-btn:active {
    transform: scale(0.95);
  }

  .pix-header h2 {
    font-size: 1.2rem;
  }
  .pix-header p {
    font-size: 0.85rem;
  }

  .pix-content {
    padding: 20px 16px;
    gap: 16px;
    max-height: none;
    overflow-y: visible;
    flex-shrink: 0;
  }

  .pix-qrcode-wrapper {
    max-width: 220px;
    margin: 0 auto;
  }

  .pix-qrcode {
    padding: 10px;
  }

  /* MOSTRAR BOTÃO COPIAR SEMPRE NO MOBILE - CORREÇÃO CRÍTICA */
  .pix-copy {
    width: 100%;
    flex-shrink: 0;
  }

  .pix-copy label {
    font-size: 0.8rem;
    margin-bottom: 6px;
    display: block;
  }

  .copy-box {
    flex-direction: row;
    gap: 10px;
    width: 100%;
    flex-shrink: 0;
  }

  .copy-box input {
    flex: 1;
    min-width: 0;
    padding: 14px 12px;
    font-size: 0.8rem;
    border-radius: 10px;
    min-height: 48px;
  }

  .copy-btn {
    width: auto;
    flex-shrink: 0;
    justify-content: center;
    padding: 14px 20px;
    font-size: 0.95rem;
    border-radius: 10px;
    min-height: 48px;
    min-width: 100px;
  }

  .copy-btn:active {
    transform: scale(0.98);
  }

  .copy-btn span {
    display: inline;
  }

  .pix-value {
    max-width: 100%;
    flex-shrink: 0;
  }

  .pix-value span {
    font-size: 0.85rem;
  }
  .pix-value strong {
    font-size: 1.3rem;
  }

  /* Footer menor no mobile */
  .pix-footer {
    padding: 12px 16px;
    position: relative;
    bottom: auto;
    background: var(--bg-dark);
    border-top: 1px solid var(--border-subtle);
    flex-shrink: 0;
  }

  .pix-footer-buttons {
    max-width: 100%;
  }

  .pix-delivery-info {
    font-size: 0.75rem;
    padding: 8px 12px;
    margin-bottom: 8px;
    flex-shrink: 0;
  }

  .continue-btn,
  .back-btn {
    width: 100%;
    padding: 14px 20px;
    font-size: 0.95rem;
    min-height: 50px;
  }

  .continue-btn:active,
  .back-btn:active {
    transform: scale(0.98);
  }
}

/* Responsividade PIX - telas pequenas (até 480px) */
@media (max-width: 480px) {
  .pix-header {
    padding: 16px;
    padding-right: 56px;
  }

  .close-pix-btn {
    width: 38px;
    height: 38px;
    top: 12px;
    right: 12px;
  }

  .close-pix-btn svg {
    width: 18px;
    height: 18px;
  }

  .pix-header h2 {
    font-size: 1.1rem;
  }
  .pix-header svg {
    width: 36px;
    height: 36px;
  }

  .pix-content {
    padding: 16px;
    gap: 12px;
  }

  .pix-qrcode-wrapper {
    max-width: 180px;
  }

  .pix-qrcode {
    padding: 8px;
  }

  .pix-value strong {
    font-size: 1.2rem;
  }
  .pix-expires {
    font-size: 0.8rem;
  }

  .pix-footer {
    padding: 14px;
  }

  .pix-footer p {
    font-size: 0.8rem;
  }
  .pix-delivery-info {
    font-size: 0.8rem;
    padding: 10px 12px;
  }

  .continue-btn,
  .back-btn {
    padding: 12px 16px;
    font-size: 0.9rem;
    min-height: 48px;
  }
}

/* Responsividade PIX - telefones muito pequenos (até 380px) */
@media (max-width: 380px) {
  .pix-qrcode-wrapper {
    max-width: 160px;
  }

  .pix-header h2 {
    font-size: 1rem;
  }
  .pix-header p {
    font-size: 0.75rem;
  }
  .pix-value strong {
    font-size: 1.1rem;
  }

  .copy-btn span {
    display: none;
  }
  .copy-btn {
    padding: 12px 14px;
  }
}

/* Desktop (acima de 768px) - Layout centralizado */
@media (min-width: 768px) {
  .modal.pix-modal {
    align-items: center;
    justify-content: center;
  }

  .pix-container {
    max-width: 480px;
    max-height: 90vh;
    border-radius: var(--radius-xl);
    overflow-y: auto;
  }

  .pix-content {
    max-height: none;
    overflow-y: visible;
  }

  .pix-footer {
    position: relative;
  }
}

/* Tablet em landscape */
@media (min-height: 500px) and (max-height: 800px) and (orientation: landscape) {
  .pix-container {
    max-height: 85vh;
  }
}

/* Altas resoluções */
@media (min-width: 1920px) {
  body {
    font-size: 17px;
  }
  .products-grid {
    gap: 24px;
  }
}

/* Correção para Safari iOS */
@supports (-webkit-touch-callout: none) {
  .pix-container {
    max-height: -webkit-fill-available;
  }
}

/* ===== CORREÇÕES MÓBILE FINAIS ===== */

/* Prevenir highlight em taps */
* {
  -webkit-tap-highlight-color: transparent;
}

/* Melhorar elementos clicáveis em touch */
button,
.btn,
a,
.product-card,
.cat-btn {
  touch-action: manipulation;
}

/* Prevenir scroll duplo em iOS - CORREÇÃO v10 */
html {
  overscroll-behavior: none;
}

body {
  overscroll-behavior: none;
  overscroll-behavior-y: none;
}

/* Quando modal aberto - lock total */
body.modal-open {
  overscroll-behavior: none !important;
  -webkit-overflow-scrolling: touch;
}

/* Melhorar scroll em modais */
.modal,
.sidebar,
.checkout-content,
.pix-content {
  -webkit-overflow-scrolling: touch;
  overscroll-behavior: contain;
}

/* Prevenir zoom em inputs no iOS */
input[type="text"],
input[type="email"],
input[type="tel"],
input[type="number"],
select,
textarea {
  font-size: 16px !important;
}

/* Touch feedback visual */
@media (hover: none) and (pointer: coarse) {
  button:active,
  .btn:active,
  .cat-btn:active,
  .product-card:active {
    opacity: 0.9;
    transform: scale(0.98);
  }
}

/* CORREÇÃO: Garantir que sidebar funcione bem em mobile */
@media (max-width: 768px) {
  .sidebar {
    height: 100vh;
    height: 100dvh;
  }
}

/* Prevenir seleção de texto acidental */
.no-select {
  -webkit-user-select: none;
  -moz-user-select: none;
  -ms-user-select: none;
  user-select: none;
}

/* Feedback visual para elementos interativos */
interactive-element {
  cursor: pointer;
}

/* Garantir que imagens não causem overflow */
img {
  max-width: 100%;
  height: auto;
}

/* Fix para Android Chrome - não redimensionar viewport */
@supports (-webkit-touch-callout: none) {
  body {
    min-height: -webkit-fill-available;
  }
}

/* ===== CORREÇÃO OVERLAY - BLUR E FECHAMENTO ===== */
.overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.85);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  z-index: 2000;
  opacity: 0;
  visibility: hidden;
  transition:
    opacity 0.3s ease,
    visibility 0.3s ease;
  display: flex;
  align-items: center;
  justify-content: center;
}

.overlay:not(.hidden) {
  opacity: 1;
  visibility: visible;
}

/* Garantir que overlay esconda corretamente */
.overlay.hidden {
  display: none;
}

/* Prevenir interação com conteúdo por trás do overlay */
.overlay::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: -1;
}

/* Responsividade do overlay em mobile */
@media (max-width: 768px) {
  .overlay {
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
  }
}

/* CORREÇÃO v10: Toast notification z-index */
#toast {
  position: fixed;
  bottom: 30px;
  left: 50%;
  transform: translateX(-50%);
  background: linear-gradient(135deg, var(--accent-success) 0%, #27ae60 100%);
  color: #fff;
  padding: 18px 28px;
  border-radius: 14px;
  box-shadow: 0 15px 40px rgba(0, 0, 0, 0.4);
  opacity: 0;
  transition: all 0.4s ease;
  z-index: 99999;
  font-weight: 600;
  font-size: 15px;
  display: flex;
  align-items: center;
  gap: 10px;
}

#toast.show {
  opacity: 1;
  bottom: 50px;
}

/* FIX BOTÃO CHECKOUT */
#toast {
  pointer-events: none;
  z-index: 9999;
}

#checkout-fixed {
  position: fixed;
  bottom: 10px;
  left: 0;
  width: 100%;
  display: flex;
  justify-content: center;
  z-index: 10000;
}

.checkout-btn {
  width: 90%;
  max-width: 500px;
  background: #d4af37;
  border: none;
  padding: 16px;
  border-radius: 12px;
  font-weight: bold;
  cursor: pointer;
}
