/* Estilos Customizados - Shopping da Macumba */

@import url('https://fonts.googleapis.com/css2?family=Open+Sans:wght@300;400;600;700&display=swap');

:root {
  --background: #ffffff;
  --foreground: #000000;
  --primary: #CC0000;
  --primary-foreground: #ffffff;
}

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

html,
body {
  margin: 0;
  padding: 0;
  font-family: 'Open Sans', system-ui, -apple-system, BlinkMacSystemFont, sans-serif;
  background-color: var(--background);
  color: var(--foreground);
}

body {
  min-height: 100vh;
  overflow-x: hidden;
}

/* --------- Animações utilitárias --------- */
@keyframes float {
  0%, 100% { transform: translateY(0px); }
  50% { transform: translateY(-10px); }
}

.animate-float {
  animation: float 4s ease-in-out infinite;
}

@keyframes bounce-soft {
  0%, 20%, 50%, 80%, 100% { transform: translateY(0); }
  40% { transform: translateY(-8px); }
  60% { transform: translateY(-4px); }
}

.animate-bounce {
  animation: bounce-soft 2s infinite;
}

@keyframes shimmer {
  0% { background-position: -200% 0; }
  100% { background-position: 200% 0; }
}

.loading-shimmer {
  background: linear-gradient(90deg, #f5f5f5 25%, #e5e5e5 50%, #f5f5f5 75%);
  background-size: 200% 100%;
  animation: shimmer 1.5s infinite;
}

/* --------- Cartões de produto --------- */
.product-card {
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.product-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.08);
}

/* --------- Line clamp utilitário --------- */
.line-clamp-2 {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* --------- Carousel Horizontal (Slide) - NOVO --------- */
.carousel-wrapper {
  display: flex;
  width: 100%;
  position: relative;
  transition: transform 0.7s ease-in-out;
}

.carousel-slide-item {
  flex-shrink: 0;
  width: 100%;
  position: relative;
  display: block;
}

#banner-carousel {
  position: relative;
  width: 100%;
  overflow: hidden;
  z-index: 0 !important;
}

#banner-carousel .carousel-wrapper {
  display: flex;
  width: 100%;
  transition: transform 0.7s ease-in-out;
}

#banner-carousel .carousel-slide-item {
  flex-shrink: 0;
  width: 100%;
  min-width: 100%;
  position: relative;
  display: block;
}

/* Carrosséis de categoria (Tabacaria e Imagens) */
.carousel-wrapper-tabacaria,
.carousel-wrapper-imagens {
  display: flex;
  width: 100%;
  position: relative;
  overflow: hidden;
}

.carousel-slide-item-tabacaria,
.carousel-slide-item-imagens {
  flex-shrink: 0;
  width: 100%;
  position: relative;
}

#tabacaria-carousel,
#imagens-carousel {
  position: relative;
  overflow: hidden;
  border-radius: 0.5rem;
}

#banner-carousel {
  position: relative;
  z-index: 0 !important; /* Não sobrepor menus - header tem z-index 9999 */
  overflow: hidden;
  width: 100%;
  display: block;
  visibility: visible;
  opacity: 1;
}

.carousel-slide.active {
  position: relative;
  opacity: 1;
  visibility: visible;
  z-index: 2;
  transform: translateX(0);
}

.carousel-slide.prev {
  transform: translateX(-100%);
  transition: transform 0.8s ease-in-out;
}

/* Banner 1920x300px fixo */
.banner-image {
  display: block !important;
  width: 100% !important;
  height: 180px !important;
  object-fit: cover !important;
  object-position: center !important;
}

@media (min-width: 768px) {
  .banner-image {
    height: 300px !important;
  }
}

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

/* --------- Tela de loading estilo app --------- */
.loading-screen {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(135deg, #000000 0%, #1a1a1a 30%, #2a0505 70%, #CC0000 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 9999;
  opacity: 1;
  transition: opacity 0.8s ease;
  overflow: hidden;
}

.loading-screen.hide {
  opacity: 0;
  pointer-events: none;
}

.loading-content {
  text-align: center;
  position: relative;
  animation: slideUp 0.8s ease-out;
}

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

.logo-container {
  position: relative;
  margin-bottom: 2rem;
  display: inline-block;
}

.logo-glow {
  position: absolute;
  inset: -10px;
  background: radial-gradient(circle, #CC0000 0%, transparent 70%);
  border-radius: 50%;
  filter: blur(20px);
  opacity: 0.6;
  animation: pulse 2s ease-in-out infinite;
}

@keyframes pulse {
  0%, 100% {
    transform: scale(1);
    opacity: 0.6;
  }
  50% {
    transform: scale(1.05);
    opacity: 0.85;
  }
}

.logo-image {
  position: relative;
  z-index: 2;
  width: 120px;
  height: auto;
  animation: logoFloat 3s ease-in-out infinite;
  filter: drop-shadow(0 10px 30px rgba(204, 0, 0, 0.45));
}

@keyframes logoFloat {
  0%, 100% { transform: translateY(0) rotate(0deg); }
  33% { transform: translateY(-8px) rotate(1deg); }
  66% { transform: translateY(-4px) rotate(-1deg); }
}

.spinner {
  width: 50px;
  height: 50px;
  border: 3px solid rgba(255, 255, 255, 0.15);
  border-top: 3px solid #CC0000;
  border-radius: 50%;
  animation: spin 1s linear infinite;
  margin: 0 auto;
}

@keyframes spin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

/* --------- Scrollbar oculta (para listas tipo app) --------- */
.scrollbar-hide {
  -ms-overflow-style: none;
  scrollbar-width: none;
}

.scrollbar-hide::-webkit-scrollbar {
  display: none;
}

/* --------- Ajustes mobile (visual de aplicativo) --------- */
@media (max-width: 768px) {
  body {
    background-color: #050505;
  }

  .container {
    padding-left: 1rem;
    padding-right: 1rem;
  }

  h1 {
    font-size: 1.5rem;
    line-height: 1.3;
  }

  h2 {
    font-size: 1.25rem;
    line-height: 1.3;
  }

  h3 {
    font-size: 1.1rem;
    line-height: 1.3;
  }

  button,
  .btn,
  [role="button"] {
    min-height: 44px;
    min-width: 44px;
    -webkit-tap-highlight-color: transparent;
  }

  /* Deixar o header mais compacto no mobile */
  #main-header-content {
    padding-top: 0.5rem;
    padding-bottom: 0.5rem;
  }

  #main-header img {
    max-height: 3.5rem;
  }

  /* Grids de produto em 2 colunas no mobile (estilo app) */
  .product-grid-2 {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.75rem;
  }

  .product-grid-2 .product-card {
    border-radius: 0.75rem;
  }

  /* Carousel mais baixo no mobile */
  .carousel-slide img {
    max-height: 220px;
  }

  /* Nunca exibir imagens dentro do menu lateral mobile (evita banner preso por cima) */
  #mobile-menu img {
    display: none;
  }
  
  /* Ajustes para página minha-conta */
  .min-h-screen {
    padding-top: 1rem;
    padding-bottom: 1rem;
  }
  
  /* Garantir que inputs tenham tamanho mínimo para toque */
  input[type="text"],
  input[type="email"],
  input[type="tel"],
  input[type="password"],
  textarea,
  select {
    min-height: 44px;
    font-size: 16px; /* Evita zoom automático no iOS */
  }
  
  /* Ajustes para cards de pedidos */
  .border.border-gray-200 {
    overflow: hidden;
  }
  
  /* Garantir que textos não quebrem layout */
  .truncate {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }
  
  /* Ajustes para badges e status */
  .rounded-full {
    display: inline-block;
    white-space: nowrap;
  }
}

/* ================================================================
   NOVO CARD DE PRODUTO — Estilo Magazine Luiza / Casas Bahia (pc2)
   ================================================================ */

.pc2 {
  background: #fff;
  border: 1px solid #e8e8e8;
  border-radius: 8px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  position: relative;
  transition: box-shadow .25s ease, transform .25s ease;
}

.pc2:hover {
  box-shadow: 0 8px 28px rgba(0,0,0,.13);
  transform: translateY(-4px);
  border-color: #d0d0d0;
}

.pc2--out { opacity: .75; }

/* ── Área da imagem ──────────────────── */
.pc2-img-wrap {
  position: relative;
  background: #f8f8f8;
  width: 100%;
  aspect-ratio: 1 / 1;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
}

.pc2-img-link {
  display: flex;
  align-items: center;
  justify-content: center;
  position: absolute;
  inset: 0;
  overflow: hidden;
}

.pc2-img-link img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  padding: 10px;
  transition: transform .35s ease;
  display: block;
}

.pc2:hover .pc2-img-link img {
  transform: scale(1.06);
}

/* Overlay de ação (aparece no hover) */
.pc2-overlay {
  position: absolute;
  inset: 0;
  background: rgba(0,0,0,.06);
  display: flex;
  align-items: flex-end;
  justify-content: center;
  padding-bottom: 14px;
  opacity: 0;
  transition: opacity .25s;
  pointer-events: none;
  z-index: 3;
}

.pc2:hover .pc2-overlay {
  opacity: 1;
  pointer-events: auto;
}

.pc2-quick-add {
  background: #CC0000;
  color: #fff;
  border: none;
  border-radius: 6px;
  padding: 9px 18px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
  box-shadow: 0 3px 10px rgba(0,0,0,.25);
  transform: translateY(10px);
  transition: transform .25s, background .2s;
  display: flex;
  align-items: center;
  gap: 6px;
}

.pc2:hover .pc2-quick-add { transform: translateY(0); }
.pc2-quick-add:hover { background: #a80000; }

/* Botão wishlist */
.pc2-wish {
  position: absolute;
  top: 8px;
  right: 8px;
  width: 34px;
  height: 34px;
  background: rgba(255,255,255,.92);
  border-radius: 50%;
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #bbb;
  font-size: 14px;
  box-shadow: 0 1px 5px rgba(0,0,0,.12);
  transition: color .2s, transform .2s, box-shadow .2s;
  z-index: 4;
}

.pc2-wish:hover {
  color: #CC0000;
  transform: scale(1.18);
  box-shadow: 0 2px 8px rgba(204,0,0,.3);
}

/* Badges */
.pc2-badges {
  position: absolute;
  top: 8px;
  left: 8px;
  z-index: 4;
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.pc2-badge {
  font-size: 11px;
  font-weight: 700;
  border-radius: 4px;
  padding: 3px 7px;
  display: inline-block;
  letter-spacing: .3px;
}

.pc2-badge--disc  { background: #CC0000;  color: #fff; }
.pc2-badge--new   { background: #1565c0;  color: #fff; }
.pc2-badge--tag   { background: #6a1b9a;  color: #fff; }
.pc2-badge--offer { background: #e65100;  color: #fff; }
.pc2-badge--feat  { background: #f9a825;  color: #fff; }

/* ── Corpo do card ───────────────────── */
.pc2-body {
  padding: 12px 12px 14px;
  display: flex;
  flex-direction: column;
  flex: 1;
}

/* Frete grátis strip */
.pc2-frete {
  background: #e8f5e9;
  color: #2e7d32;
  font-size: 11px;
  font-weight: 700;
  padding: 4px 10px;
  margin: -12px -12px 10px;
  display: flex;
  align-items: center;
  gap: 5px;
}

/* Categoria */
.pc2-cat {
  font-size: 11px;
  color: #999;
  text-transform: uppercase;
  letter-spacing: .4px;
  margin-bottom: 3px;
  display: block;
}

/* Nome do produto */
.pc2-name {
  font-size: 13px;
  font-weight: 400;
  color: #333;
  line-height: 1.45;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  min-height: 2.6em;
  margin-bottom: 7px;
  text-decoration: none;
  transition: color .15s;
}

.pc2-name:hover { color: #CC0000; }

/* Estrelas */
.pc2-stars {
  display: flex;
  align-items: center;
  gap: 2px;
  margin-bottom: 8px;
}

.pc2-stars .fas { font-size: 10px; }
.pc2-stars-n { font-size: 11px; color: #888; margin-left: 4px; }

/* Área de preços */
.pc2-prices {
  margin-bottom: 10px;
  display: flex;
  flex-direction: column;
  gap: 1px;
}

.pc2-old {
  font-size: 12px;
  color: #999;
  text-decoration: line-through;
  display: flex;
  align-items: center;
  gap: 6px;
}

.pc2-disc-label {
  font-size: 11px;
  font-weight: 700;
  color: #2e7d32;
  background: #e8f5e9;
  padding: 1px 5px;
  border-radius: 3px;
  display: inline-block;
}

.pc2-price {
  font-size: 22px;
  font-weight: 700;
  color: #1a1a1a;
  line-height: 1.15;
}

.pc2-inst {
  font-size: 11px;
  color: #666;
}

.pc2-inst strong { font-weight: 600; color: #333; }

/* Botão comprar */
.pc2-buy {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  width: 100%;
  background: #CC0000;
  color: #fff;
  border: none;
  border-radius: 6px;
  padding: 10px 0;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  transition: background .2s, transform .15s;
  margin-top: auto;
  text-decoration: none;
  letter-spacing: .2px;
}

.pc2-buy:hover { background: #a80000; transform: translateY(-1px); }
.pc2-buy:active { transform: translateY(0); }

.pc2-buy--off {
  background: #d0d0d0;
  color: #888;
  cursor: not-allowed;
}

.pc2-buy--off:hover { background: #d0d0d0; transform: none; }

/* ── Grid padrão de produtos ─────────── */
.products-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
}

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

@media (min-width: 900px) {
  .products-grid { grid-template-columns: repeat(4, 1fr); gap: 16px; }
}

@media (min-width: 1280px) {
  .products-grid { grid-template-columns: repeat(5, 1fr); gap: 16px; }
}

/* ── Responsive card ─────────────────── */
@media (max-width: 639px) {
  .pc2-body { padding: 10px 10px 12px; }
  .pc2-price { font-size: 18px; }
  .pc2-frete { margin: -10px -10px 8px; }
  .pc2-buy { font-size: 12px; padding: 9px 0; }
  .pc2-wish { width: 30px; height: 30px; font-size: 12px; }
}

/* ── Seção "Lançamentos" da home ─────── */
.section-title-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 20px;
}

.section-title {
  font-size: 1.4rem;
  font-weight: 700;
  color: #1a1a1a;
  position: relative;
  padding-left: 14px;
}

.section-title::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 4px;
  background: #CC0000;
  border-radius: 2px;
}

.section-link {
  font-size: 13px;
  color: #CC0000;
  font-weight: 600;
  text-decoration: none;
  display: flex;
  align-items: center;
  gap: 4px;
  transition: gap .2s;
}

.section-link:hover { gap: 8px; }

/* ── Wishlist: estado ativo do coração ─── */
.wishlist-active i,
.pc2-wish.wishlist-active i {
  color: #CC0000 !important;
}
.pc2-wish.wishlist-active {
  color: #CC0000;
}
/* Transição suave ao clicar no coração */
[data-wishlist-product] i {
  transition: color 0.2s ease, transform 0.15s ease;
}
[data-wishlist-product]:active i {
  transform: scale(1.3);
}

/* ── Padronização de imagens de produto (sem distorção) ── */
.product-thumb {
  aspect-ratio: 4 / 3;
  background: #f9fafb;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  width: 100%;
}
.product-thumb img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  padding: 8px;
  transition: transform 0.3s ease;
}
.product-thumb:hover img {
  transform: scale(1.04);
}

/* ── Banner responsivo (corrigir quebra no mobile) ── */
.banner-slide,
.carousel-slide {
  width: 100%;
  overflow: hidden;
}
.banner-slide img,
.carousel-slide img {
  width: 100% !important;
  height: auto !important;
  max-height: 400px;
  object-fit: cover;
  display: block;
}
@media (max-width: 640px) {
  .banner-slide img,
  .carousel-slide img,
  .banner-image {
    max-height: 180px !important;
    height: 180px !important;
    object-position: center center;
  }
}
@media (min-width: 641px) and (max-width: 1023px) {
  .banner-slide img,
  .carousel-slide img,
  .banner-image {
    max-height: 260px !important;
    height: 260px !important;
  }
}

}
