/* ========================================
   ADECOAL WEAR - CSS RESPONSIVO UNIFICADO
   Design System Moderno e Totalmente Responsivo
   Breakpoints: Mobile (320px), Tablet (768px), Desktop (1024px+)
======================================== */

/* ========================================
   CSS CUSTOM PROPERTIES (VARIÁVEIS)
======================================== */
:root {
  /* Cores da marca Adecoal */
  --primary-black: #000000;
  --primary-yellow: #FFD700;
  --primary-beige: #F5F5DC;
  --primary-white: #FFFFFF;
  --primary-gold: #B8860B;
  --primary-silver: #C0C0C0;
  --dourado: #c5a46d;
  --dourado-escuro: #b08f5a;
  
  /* Gradientes modernos */
  --gradient-gold: linear-gradient(135deg, #FFD700, #B8860B);
  --gradient-dourado: linear-gradient(90deg, #c5a46d 70%, #b08f5a 100%);
  --gradient-hero: linear-gradient(135deg, rgba(34,34,34,0.55) 0%, rgba(197,164,109,0.18) 100%);
  
  /* Sombras responsivas */
  --shadow-xs: 0 1px 2px 0 rgb(0 0 0 / 0.05);
  --shadow-sm: 0 1px 3px 0 rgb(0 0 0 / 0.1), 0 1px 2px -1px rgb(0 0 0 / 0.1);
  --shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1);
  --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1);
  --shadow-xl: 0 20px 25px -5px rgb(0 0 0 / 0.1), 0 8px 10px -6px rgb(0 0 0 / 0.1);
  --shadow-gold: 0 8px 32px rgba(197,164,109,0.18);
  
  /* Espaçamentos fluidos */
  --space-xs: clamp(0.25rem, 0.5vw, 0.5rem);
  --space-sm: clamp(0.5rem, 1vw, 1rem);
  --space-md: clamp(1rem, 2vw, 1.5rem);
  --space-lg: clamp(1.5rem, 3vw, 2rem);
  --space-xl: clamp(2rem, 4vw, 3rem);
  --space-2xl: clamp(3rem, 6vw, 4rem);
  --space-3xl: clamp(4rem, 8vw, 6rem);
  
  /* Tipografia responsiva */
  --text-xs: clamp(0.75rem, 1.5vw, 0.875rem);
  --text-sm: clamp(0.875rem, 2vw, 1rem);
  --text-base: clamp(1rem, 2.5vw, 1.125rem);
  --text-lg: clamp(1.125rem, 3vw, 1.25rem);
  --text-xl: clamp(1.25rem, 3.5vw, 1.5rem);
  --text-2xl: clamp(1.5rem, 4vw, 2rem);
  --text-3xl: clamp(2rem, 5vw, 2.5rem);
  --text-4xl: clamp(2.5rem, 6vw, 3rem);
  --text-5xl: clamp(3rem, 8vw, 4rem);
  
  /* Raios de borda */
  --radius-sm: 0.375rem;
  --radius-md: 0.5rem;
  --radius-lg: 0.75rem;
  --radius-xl: 1rem;
  --radius-2xl: 1.5rem;
  --radius-full: 9999px;
  
  /* Transições */
  --transition-fast: 0.15s cubic-bezier(0.4, 0, 0.2, 1);
  --transition-normal: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  --transition-slow: 0.5s cubic-bezier(0.4, 0, 0.2, 1);
  
  /* Z-index */
  --z-dropdown: 1000;
  --z-sticky: 1020;
  --z-fixed: 1030;
  --z-modal: 1050;
  
  /* Layout dimensions */
  --header-height: clamp(60px, 8vw, 80px);
  --sidebar-width: 280px;
  --container-max-width: 1200px;
}

/* ========================================
   MODERN CSS RESET
======================================== */
*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
  font-feature-settings: normal;
  font-variation-settings: normal;
}

body {
  font-family: 'Poppins', system-ui, -apple-system, sans-serif;
  line-height: 1.6;
  color: var(--primary-black);
  background-color: #ffffff !important; /* Fundo branco garantido */
  background: #ffffff !important; /* Fallback para navegadores antigos */
  font-feature-settings: "kern" 1, "liga" 1;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
  min-height: 100vh;
  letter-spacing: 0.02em;
}

/* ========================================
   GARANTIR FUNDO BRANCO
======================================== */
html, body {
  background-color: #ffffff !important;
  background: #ffffff !important;
}

/* ========================================
   UTILITÁRIOS RESPONSIVOS
======================================== */
.container {
  max-width: var(--container-max-width);
  margin: 0 auto;
  padding: 0 var(--space-md);
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* ========================================
   TIPOGRAFIA RESPONSIVA
======================================== */
h1, h2, h3, h4, h5, h6 {
  font-family: 'Playfair Display', serif;
  color: var(--dourado);
  margin-bottom: var(--space-sm);
  letter-spacing: 0.04em;
  text-shadow: 0 2px 8px rgba(0,0,0,0.08);
  line-height: 1.2;
}

h1 { font-size: var(--text-5xl); }
h2 { font-size: var(--text-4xl); }
h3 { font-size: var(--text-3xl); }
h4 { font-size: var(--text-2xl); }
h5 { font-size: var(--text-xl); }
h6 { font-size: var(--text-lg); }

p {
  font-size: var(--text-base);
  color: #222;
  margin-bottom: var(--space-sm);
  line-height: 1.7;
}

a {
  text-decoration: none;
  color: var(--dourado);
  font-weight: 500;
  transition: color var(--transition-normal), text-shadow var(--transition-normal);
  text-shadow: 0 1px 4px rgba(197,164,109,0.08);
}

a:hover {
  color: var(--dourado-escuro);
  text-shadow: 0 2px 8px rgba(176,143,90,0.18);
}

/* ========================================
   HEADER RESPONSIVO
======================================== */
header {
  background: rgba(255,255,255,0.98);
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: var(--space-sm) var(--space-lg);
  border-bottom: 2px solid rgba(197,164,109,0.13);
  position: sticky;
  top: 0;
  z-index: var(--z-sticky);
  box-shadow: 0 2px 12px rgba(197,164,109,0.07);
  backdrop-filter: blur(10px);
  min-height: var(--header-height);
}

header .logo {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  font-size: var(--text-2xl);
  font-weight: bold;
  color: var(--dourado);
  letter-spacing: 3px;
  font-family: 'Playfair Display', serif;
  text-shadow: 0 2px 8px rgba(197,164,109,0.12);
}

header .logo img {
  height: clamp(60px, 8vw, 90px);
  width: auto;
  border-radius: var(--radius-md);
  box-shadow: 0 2px 8px rgba(197,164,109,0.10);
  object-fit: contain;
}

/* Navegação Desktop */
header nav ul {
  list-style: none;
  display: flex;
  gap: var(--space-lg);
  background: none;
  box-shadow: none;
  margin: 0;
  padding: 0;
  justify-content: flex-end;
  flex: 1;
}

header nav ul li a {
  font-family: 'Playfair Display', Poppins;
  font-weight: 500;
  color: var(--dourado);
  font-size: var(--text-sm);
  letter-spacing: 0.04em;
  padding: var(--space-xs) var(--space-md);
  border-radius: var(--radius-2xl);
  transition: all var(--transition-normal);
  background: none;
  position: relative;
  text-decoration: none;
  box-shadow: none;
}

header nav ul li a.active,
header nav ul li a:hover {
  color: var(--primary-white);
  background: var(--gradient-dourado);
  box-shadow: 0 4px 16px rgba(197,164,109,0.12);
  transform: translateY(-2px) scale(1.04);
}

/* Efeito de destaque dourado */
header nav ul li a::before {
  content: '';
  position: absolute;
  left: 12px;
  right: 12px;
  bottom: 6px;
  height: 3px;
  border-radius: 2px;
  background: var(--gradient-dourado);
  opacity: 0;
  transition: opacity var(--transition-normal);
}

header nav ul li a:hover::before,
header nav ul li a.active::before {
  opacity: 1;
}

/* ========================================
   HAMBURGER MENU MOBILE
======================================== */
.menu-toggle {
  display: none;
  flex-direction: column;
  background: none;
  border: none;
  cursor: pointer;
  padding: var(--space-xs);
  border-radius: var(--radius-md);
  transition: all var(--transition-normal);
  gap: 4px;
}

.menu-toggle span {
  width: 25px;
  height: 3px;
  background: var(--dourado);
  transition: var(--transition-normal);
  border-radius: 2px;
}

.menu-toggle.active span:nth-child(1) {
  transform: rotate(45deg) translate(5px, 5px);
}

.menu-toggle.active span:nth-child(2) {
  opacity: 0;
}

.menu-toggle.active span:nth-child(3) {
  transform: rotate(-45deg) translate(7px, -6px);
}

/* ========================================
   HERO SWIPER RESPONSIVO
======================================== */
.hero-swiper {
  width: 100%;
  height: 100vh;
  position: relative;
  overflow: hidden;
}

.hero-swiper .swiper-slide {
  position: relative;
  width: 100%;
  height: 100%;
}

.hero-swiper .swiper-slide img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center center;
  transition: transform 7s ease-in-out;
  transform: scale(1);
}

.hero-swiper .swiper-slide-active img {
  transform: scale(1.02);
}

.hero-content {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  color: white;
  text-align: center;
  text-shadow: 2px 2px 10px rgba(0,0,0,0.7);
  z-index: 2;
  padding: var(--space-md);
}

.hero-content h1 {
  font-family: 'Playfair Display', serif;
  font-size: var(--text-4xl);
  margin-bottom: var(--space-sm);
  color: var(--primary-white);
  text-shadow: 0 4px 16px rgba(0,0,0,0.18);
}

.hero-content p {
  font-family: 'Poppins', sans-serif;
  font-size: var(--text-lg);
  color: #f9f7f4;
  text-shadow: 0 2px 8px rgba(0,0,0,0.12);
}

/* ========================================
   SWIPER NAVIGATION RESPONSIVA
======================================== */
.swiper-button-next,
.swiper-button-prev {
  color: var(--dourado);
  z-index: 10;
  width: clamp(35px, 5vw, 45px);
  height: clamp(35px, 5vw, 45px);
  border-radius: 50%;
  background: rgba(255,255,255,0.3);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all var(--transition-normal);
  backdrop-filter: blur(10px);
}

.swiper-button-next::after,
.swiper-button-prev::after {
  display: none !important;
  content: '';
}

.swiper-button-next::before,
.swiper-button-prev::before {
  content: '';
  display: block;
  width: 18px;
  height: 18px;
  background-repeat: no-repeat;
  background-position: center;
  background-size: contain;
}

.swiper-button-next::before {
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23c5a46d' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'><polyline points='9 18 15 12 9 6'/></svg>");
}

.swiper-button-prev::before {
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23c5a46d' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'><polyline points='15 18 9 12 15 6'/></svg>");
}

.swiper-button-next:hover,
.swiper-button-prev:hover {
  background: var(--dourado);
  color: var(--primary-white);
  transform: scale(1.1);
}

.swiper-pagination-bullet {
  background: rgba(255,255,255,0.5);
  width: clamp(8px, 1.5vw, 12px);
  height: clamp(8px, 1.5vw, 12px);
}

.swiper-pagination-bullet-active {
  background: var(--primary-white);
}

/* ========================================
   CATEGORIAS RESPONSIVAS
======================================== */
.categorias-section {
  padding: var(--space-2xl) var(--space-md);
}

.categorias-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: var(--space-lg);
  max-width: var(--container-max-width);
  margin: 0 auto;
}

.categoria-tile {
  position: relative;
  display: block;
  height: clamp(300px, 40vw, 360px);
  border-radius: var(--radius-xl);
  overflow: hidden;
  box-shadow: 0 8px 18px rgba(0,0,0,0.10);
  transition: all var(--transition-normal);
  text-decoration: none;
}

.categoria-tile img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform var(--transition-slow);
}

.categoria-tile::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(0,0,0,0.0) 45%, rgba(0,0,0,0.45) 100%);
}

.categoria-label {
  position: absolute;
  left: var(--space-md);
  bottom: var(--space-md);
  background: rgba(255,255,255,0.92);
  color: #222;
  padding: var(--space-sm) var(--space-md);
  border-radius: var(--radius-lg);
  font-weight: 700;
  font-family: 'Poppins', sans-serif;
  font-size: var(--text-base);
  backdrop-filter: blur(10px);
}

.categoria-tile:hover {
  transform: translateY(-6px);
  box-shadow: 0 14px 26px rgba(0,0,0,0.15);
}

.categoria-tile:hover img {
  transform: scale(1.05);
}

/* ========================================
   BOTÕES RESPONSIVOS
======================================== */
.btn {
  background: var(--gradient-dourado);
  color: var(--primary-white);
  border: none;
  padding: var(--space-sm) var(--space-lg);
  border-radius: var(--radius-full);
  font-weight: 600;
  cursor: pointer;
  font-size: var(--text-base);
  box-shadow: 0 2px 8px rgba(197,164,109,0.10);
  transition: all var(--transition-normal);
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-xs);
  position: relative;
  overflow: hidden;
  min-height: 44px; /* Touch target mínimo */
}

.btn::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.2), transparent);
  transition: var(--transition-slow);
}

.btn:hover::before {
  left: 100%;
}

.btn:hover {
  background: linear-gradient(90deg, var(--dourado-escuro) 70%, var(--dourado) 100%);
  box-shadow: 0 4px 16px rgba(197,164,109,0.18);
  transform: translateY(-2px);
}

.btn-primary {
  background: var(--gradient-dourado);
}

.btn-secondary {
  background: var(--primary-black);
  color: var(--primary-white);
}

.btn-outline {
  background: transparent;
  color: var(--dourado);
  border: 2px solid var(--dourado);
}

.btn-outline:hover {
  background: var(--dourado);
  color: var(--primary-white);
}

/* ========================================
   FOOTER RESPONSIVO
======================================== */
footer {
  background: var(--dourado);
  color: var(--primary-white);
  text-align: center;
  padding: var(--space-xl) 0 var(--space-md) 0;
  font-size: var(--text-base);
  letter-spacing: 0.04em;
  box-shadow: 0 -2px 12px rgba(197,164,109,0.10);
}

.footer-inner {
  max-width: var(--container-max-width);
  margin: 0 auto;
  padding: var(--space-sm) var(--space-md) 0 var(--space-md);
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: var(--space-lg);
  text-align: left;
}

.footer-col h4 {
  margin: 0 0 var(--space-xs) 0;
  font-family: 'Playfair Display', serif;
  font-size: var(--text-lg);
  color: var(--primary-white);
}

.footer-col ul {
  list-style: none;
  margin: 0;
  padding: 0;
}

.footer-col ul li {
  margin: var(--space-xs) 0;
}

.footer-col a {
  color: var(--primary-white);
  text-decoration: none;
  transition: color var(--transition-normal);
}

.footer-col a:hover {
  color: var(--primary-beige);
  text-decoration: underline;
}

.footer-copy {
  margin-top: var(--space-md);
  opacity: 0.9;
  font-size: var(--text-sm);
}

/* ========================================
   WHATSAPP FLUTUANTE RESPONSIVO
======================================== */
.whatsapp-float {
  position: fixed;
  width: clamp(50px, 8vw, 60px);
  height: clamp(50px, 8vw, 60px);
  bottom: var(--space-md);
  right: var(--space-md);
  background-color: #25d366;
  color: var(--primary-white);
  border-radius: 50%;
  font-size: var(--text-xl);
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: var(--shadow-lg);
  z-index: var(--z-fixed);
  transition: all var(--transition-normal);
  text-decoration: none;
  animation: whatsappPulse 2s infinite;
}

.whatsapp-float:hover {
  transform: scale(1.1);
  box-shadow: 0 8px 25px rgba(37, 211, 102, 0.4);
}

@keyframes whatsappPulse {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.05); }
}

/* ========================================
   RESPONSIVE BREAKPOINTS
======================================== */

/* Tablet Landscape - até 1024px */
@media screen and (max-width: 1024px) {
  .container {
    padding: 0 var(--space-sm);
  }
  
  .categorias-grid {
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: var(--space-md);
  }
  
  .hero-content h1 {
    font-size: var(--text-3xl);
  }
  
  .hero-content p {
    font-size: var(--text-base);
  }
}

/* Tablet Portrait e Mobile Landscape - até 768px */
@media screen and (max-width: 768px) {
  /* Navegação Mobile */
  .menu-toggle {
    display: flex;
  }
  
  header nav ul {
    position: fixed;
    left: -100%;
    top: var(--header-height);
    flex-direction: column;
    background: rgba(255,255,255,0.98);
    backdrop-filter: blur(20px);
    width: 100%;
    text-align: center;
    transition: 0.3s;
    box-shadow: var(--shadow-lg);
    z-index: var(--z-dropdown);
    padding: var(--space-lg) 0;
    gap: 0;
  }

  header nav ul.active {
    left: 0;
  }

  header nav ul li {
    margin: var(--space-xs) 0;
  }

  header nav ul li a {
    padding: var(--space-md);
    display: block;
    font-size: var(--text-lg);
    border-radius: var(--radius-lg);
  }

  /* Hero Mobile */
  .hero-swiper {
    height: 70vh;
  }

  .hero-content h1 {
    font-size: var(--text-2xl);
  }

  .hero-content p {
    font-size: var(--text-sm);
  }

  /* Categorias Mobile */
  .categorias-grid {
    grid-template-columns: 1fr;
    gap: var(--space-md);
  }

  .categoria-tile {
    height: clamp(250px, 50vw, 300px);
  }

  /* Footer Mobile */
  .footer-inner {
    grid-template-columns: 1fr;
    text-align: center;
    gap: var(--space-lg);
  }

  /* WhatsApp Mobile */
  .whatsapp-float {
    bottom: var(--space-sm);
    right: var(--space-sm);
    width: 50px;
    height: 50px;
    font-size: var(--text-lg);
  }
}

/* Mobile Portrait - até 480px */
@media screen and (max-width: 480px) {
  header {
    padding: var(--space-xs) var(--space-sm);
  }

  header .logo img {
    height: 50px;
  }

  .hero-swiper {
    height: 60vh;
  }

  .hero-content {
    padding: var(--space-sm);
  }

  .hero-content h1 {
    font-size: var(--text-xl);
  }

  .categorias-section {
    padding: var(--space-lg) var(--space-sm);
  }

  .categoria-tile {
    height: 200px;
  }

  .categoria-label {
    font-size: var(--text-sm);
    padding: var(--space-xs) var(--space-sm);
  }

  .btn {
    padding: var(--space-xs) var(--space-md);
    font-size: var(--text-sm);
    min-height: 40px;
  }

  footer {
    padding: var(--space-lg) 0 var(--space-sm) 0;
  }

  .footer-inner {
    padding: var(--space-xs) var(--space-sm) 0 var(--space-sm);
    gap: var(--space-md);
  }
}

/* Mobile muito pequeno - até 320px */
@media screen and (max-width: 320px) {
  .hero-content h1 {
    font-size: var(--text-lg);
  }

  .categoria-tile {
    height: 180px;
  }

  .btn {
    padding: var(--space-xs) var(--space-sm);
    font-size: var(--text-xs);
  }
}

/* ========================================
   ORIENTAÇÃO LANDSCAPE
======================================== */
@media screen and (max-width: 768px) and (orientation: landscape) {
  .hero-swiper {
    height: 100vh;
  }

  .hero-content h1 {
    font-size: var(--text-2xl);
  }

  .categorias-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

/* ========================================
   MELHORIAS DE PERFORMANCE
======================================== */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
  
  .whatsapp-float {
    animation: none;
  }
}

/* ========================================
   ACESSIBILIDADE
======================================== */
@media (prefers-contrast: high) {
  :root {
    --dourado: #CC8500;
    --shadow-sm: 0 2px 10px rgba(0,0,0,0.3);
    --shadow-md: 0 5px 20px rgba(0,0,0,0.4);
  }
}

/* Estados de foco melhorados */
button:focus-visible,
a:focus-visible,
input:focus-visible {
  outline: 3px solid var(--dourado);
  outline-offset: 2px;
}

/* ========================================
   IMPRESSÃO
======================================== */
@media print {
  .whatsapp-float,
  .swiper-button-next,
  .swiper-button-prev,
  .swiper-pagination {
    display: none !important;
  }

  .hero-swiper {
    height: auto;
  }

  body {
    font-size: 12pt;
    line-height: 1.4;
    color: #000000 !important;
    background: #ffffff !important;
  }

  .btn {
    border: 1px solid #000000;
    background: transparent !important;
    color: #000000 !important;
  }
}

/* ========================================
   SUPORTE PARA NAVEGADORES ANTIGOS
======================================== */
@supports not (display: grid) {
  .categorias-grid {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
  }
  
  .categoria-tile {
    flex: 0 0 300px;
    margin: var(--space-sm);
  }
  
  .footer-inner {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-around;
  }
  
  .footer-col {
    flex: 0 0 220px;
    margin: var(--space-sm);
  }
}

/* ========================================
   DARK MODE (DESABILITADO - MANTENDO FUNDO BRANCO)
======================================== */
/* 
@media (prefers-color-scheme: dark) {
  :root {
    --primary-white: #1a1a1a;
    --primary-black: #ffffff;
  }
  
  body {
    background-color: var(--primary-white);
    color: var(--primary-black);
  }
  
  header {
    background: rgba(26,26,26,0.98);
  }
  
  .categoria-label {
    background: rgba(26,26,26,0.92);
    color: var(--primary-white);
  }
}
*/
