﻿/* Design system — REFIL Redesign 2026 - DARK MODE ELEGANTE */
:root {
  /* Primary Colors - Navy Escuro Profundo */
  --color-primary: #0D1B2A;
  --color-primary-light: #1A2B3D;
  --color-primary-dark: #050C14;

  /* Accent Colors - Ciano Brilhante & Magenta */
  --color-accent: #00E5FF;
  --color-accent-dark: #00B8CC;
  --color-accent-light: #33ECFF;
  --color-secondary: #FF1493;
  --color-secondary-light: #FF47A8;

  /* Tertiary - Roxo Suave */
  --color-tertiary: #A78BFA;
  --color-tertiary-light: #C4B5FD;

  /* Secondary Colors */
  --color-success: #10B981;
  --color-warning: #F59E0B;
  --color-error: #EF4444;

  /* Neutrals - Ajustados para Dark Mode */
  --color-text-dark: #F0F3FF;
  --color-text-medium: #CBD5E1;
  --color-text-light: #94A3B8;
  --color-border: #1F3A4F;
  --color-bg-light: #1A2B3D;
  --color-bg-white: #0D1B2A;

  /* Sky Blue (Light Background) */
  --color-sky: #0F2D45;
  --color-sky-dark: #00D9FF;

  /* Backgrounds */
  --bg-body: #0A0F1B;
  --bg-card: #1A2B3D;
  --bg-elevated: #1F3A4F;

  /* Shadows - Ajustadas para Dark Mode */
  --shadow-sm: 0 1px 2px 0 rgba(0, 229, 255, 0.05);
  --shadow-md: 0 4px 6px -1px rgba(0, 229, 255, 0.1);
  --shadow-lg: 0 10px 15px -3px rgba(0, 229, 255, 0.12);
  --shadow-xl: 0 20px 25px -5px rgba(0, 229, 255, 0.15);

  /* Border Radius */
  --radius-sm: 0.375rem;
  --radius-md: 0.5rem;
  --radius-lg: 0.75rem;
  --radius-xl: 1rem;

  /* Typography */
  --font-family-sans: 'DM Sans', 'Segoe UI', sans-serif;
  --font-family-mono: 'Courier New', monospace;

  /* Transitions */
  --transition-fast: 150ms ease-in-out;
  --transition-base: 200ms ease-in-out;
  --transition-slow: 300ms ease-in-out;
}

html {
  scroll-behavior: smooth;
  overflow-x: clip;
  max-width: 100%;
}

body {
  overflow-x: clip;
  max-width: 100%;
}

/* Carrossel da home — scrollbar oculto, foco visível */
.home-carousel__track {
  scrollbar-width: none;
  -ms-overflow-style: none;
}
.home-carousel__track::-webkit-scrollbar {
  display: none;
}
.home-carousel__track:focus {
  outline: none;
}
.home-carousel__track:focus-visible {
  outline: 2px solid rgba(37, 99, 235, 0.45);
  outline-offset: 4px;
  border-radius: 0.75rem;
}

/* ========== Parceiros — faixa contínua (marquee infinito, sem troca de slides) ========== */

.home-partners__carousel-wrap {
  box-sizing: border-box;
  width: 100%;
  max-width: 100%;
  min-width: 0;
  margin-left: auto;
  margin-right: auto;
  padding: 0.25rem 1.25rem 0.5rem;
}
@media (min-width: 768px) {
  .home-partners__carousel-wrap {
    padding-left: 1.75rem;
    padding-right: 1.75rem;
  }
}
@media (min-width: 1024px) {
  .home-partners__carousel-wrap {
    width: 90%;
    max-width: min(90vw, 1600px);
    padding-left: 2rem;
    padding-right: 2rem;
  }
}

.home-partners-marquee {
  overflow: hidden;
  overflow-x: clip;
  padding-top: 0.75rem;
  padding-bottom: 0.75rem;
  max-width: 100%;
  min-width: 0;
  /* Reduz impacto da faixa larga + transform no cálculo de overflow do documento */
  contain: layout;
  mask-image: linear-gradient(90deg, transparent 0%, #000 2%, #000 98%, transparent 100%);
  -webkit-mask-image: linear-gradient(90deg, transparent 0%, #000 2%, #000 98%, transparent 100%);
}

/* !important: sem flex, os divs viram bloco e os logos empilham numa coluna */
.home-partners-marquee__track {
  display: flex !important;
  flex-direction: row !important;
  flex-wrap: nowrap !important;
  align-items: center;
  width: max-content;
  gap: 0;
  animation: home-partners-marquee-scroll var(--marquee-sec, 55s) linear infinite;
  will-change: transform;
}

.home-partners-marquee__group {
  display: flex !important;
  flex-direction: row !important;
  flex-wrap: nowrap !important;
  align-items: center;
  /* Espaço entre logos: ver padding nas células (não usar gap — Tailwind CDN/layers) */
  gap: 0 !important;
  column-gap: 0 !important;
}

.home-partners-marquee__cell {
  flex: 0 0 auto;
  display: flex;
  justify-content: center;
  align-items: center;
  box-sizing: border-box;
  /* 20px por lado ≈ 40px entre um card e o próximo; não depende de flex gap */
  padding-left: 20px;
  padding-right: 20px;
}

@keyframes home-partners-marquee-scroll {
  from {
    transform: translate3d(0, 0, 0);
  }
  to {
    transform: translate3d(calc(-1 * var(--marquee-shift, 0px)), 0, 0);
  }
}

@media (prefers-reduced-motion: reduce) {
  .home-partners-marquee__track {
    animation: none;
    flex-wrap: wrap !important;
    justify-content: center;
    width: 100%;
    max-width: 100%;
    margin-left: auto;
    margin-right: auto;
  }
  .home-partners-marquee__group--clone {
    display: none;
  }
  .home-partners-marquee {
    mask-image: none;
    -webkit-mask-image: none;
  }
}

/* Caixa fixa 100×100 px */
.home-partners__card {
  display: flex;
  align-items: center;
  justify-content: center;
  box-sizing: border-box;
  width: 100px;
  height: 100px;
  flex-shrink: 0;
  padding: 7px;
  margin: 0 auto;
  border-radius: 10px;
  border: 1px solid rgba(37, 99, 235, 0.2);
  background: linear-gradient(165deg, #E0F2FE 0%, #E0F2FE 55%, #F0F9FF 100%);
  box-shadow:
    0 0 0 1px rgba(37, 99, 235, 0.1) inset,
    0 2px 8px rgba(15, 23, 42, 0.08),
    0 1px 2px rgba(0, 0, 0, 0.04);
  backface-visibility: hidden;
  transition: box-shadow 0.2s ease, border-color 0.2s ease;
}

.home-partners__card:hover {
  border-color: rgba(37, 99, 235, 0.4);
  box-shadow:
    0 0 0 1px rgba(37, 99, 235, 0.2) inset,
    0 4px 12px rgba(37, 99, 235, 0.12);
}

.home-partners__img {
  display: block;
  box-sizing: border-box;
  width: 100%;
  height: 100%;
  max-width: 100%;
  max-height: 100%;
  margin: 0;
  padding: 0;
  object-fit: contain;
  object-position: center center;
  -webkit-user-select: none;
  user-select: none;
  filter: drop-shadow(0 1px 1px rgba(0, 0, 0, 0.1));
}

/**
 * Do topo até ao fim da secção "Destaques da loja": fundo fixo
 */
.home-fixed-bg {
  background-color: #0F172A;
  /* Imagem opcional: <style id="home-bg-dynamic"> em SiteSettings (evita 404 se JPG não existir no servidor) */
  background-image: linear-gradient(165deg, #0A0F1B 0%, #0F172A 38%, #1E3A5F 72%, #0F172A 100%);
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  background-attachment: fixed;
}

@media (max-width: 768px) {
  .home-fixed-bg {
    background-attachment: scroll;
  }
}

/* Hero: véu + leve “mesh” para legibilidade moderna */
.home-hero::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 0;
  background:
    radial-gradient(ellipse 80% 60% at 20% 30%, rgba(255, 255, 255, 0.92) 0%, transparent 55%),
    radial-gradient(ellipse 70% 50% at 90% 70%, rgba(255, 255, 255, 0.45) 0%, transparent 50%),
    linear-gradient(145deg, rgba(255, 255, 255, 0.94) 0%, rgba(255, 255, 255, 0.65) 40%, rgba(250, 253, 248, 0.35) 100%);
  pointer-events: none;
}

.home-hero > * {
  position: relative;
  z-index: 1;
}

/* Grade «Produtos que enviamos» — gradiente moderno; imagem opcional via #home-bg-dynamic */
.section-home-envio-bg {
  background-color: #F8FAFC;
  background-image: radial-gradient(
      ellipse 120% 90% at 50% -10%,
      rgba(37, 99, 235, 0.08),
      transparent 52%
    ),
    linear-gradient(180deg, #F8FAFC 0%, #E0F2FE 45%, #F0FAFF 100%);
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
}

/* Tipos de cannabis — fundo */
.section-bg-imagem2 {
  background-color: #0F172A;
  background-image: linear-gradient(
      180deg,
      rgba(10, 15, 27, 0.92) 0%,
      rgba(15, 23, 42, 0.85) 50%,
      rgba(10, 15, 27, 0.9) 100%
    );
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  background-attachment: scroll;
}

/* Botão primário (gradiente) — usado com classes Tailwind em conjunto */
.btn-gradient {
  background-image: linear-gradient(135deg, #2563EB 0%, #1E40AF 45%, #1e3a8a 100%);
  box-shadow: 0 4px 20px -4px rgba(37, 99, 235, 0.55), 0 0 0 1px rgba(255, 255, 255, 0.12) inset;
  transition: transform 0.2s ease, box-shadow 0.2s ease, filter 0.2s ease;
}

.btn-gradient:hover {
  filter: brightness(1.06);
  box-shadow: 0 8px 28px -6px rgba(37, 99, 235, 0.6), 0 0 0 1px rgba(255, 255, 255, 0.15) inset;
}

.btn-gradient:active {
  transform: scale(0.98);
}

/**
 * Zoom no hover — cards de produto, vitrine, blog, etc.
 * Use a classe .card-hover-zoom em qualquer bloco tipo card.
 */
.card-hover-zoom,
.home-product-card,
.product-card,
.quote-card {
  transition: transform 0.3s cubic-bezier(0.34, 1.45, 0.64, 1), box-shadow 0.3s ease, border-color 0.3s ease;
  will-change: transform;
  transform-origin: center center;
}

.card-hover-zoom:hover,
.home-product-card:hover,
.product-card:hover,
.quote-card:hover {
  position: relative;
  z-index: 2;
  transform: scale(1.035) translateY(-3px);
  box-shadow: 0 14px 36px -14px rgba(15, 23, 42, 0.2), 0 6px 12px -8px rgba(15, 23, 42, 0.12);
}

/* Vídeo: cantos e foco */
.video-frame {
  box-shadow: 0 20px 50px -20px rgba(0, 0, 0, 0.35);
}

/* Depoimento — aspas decorativas */
.quote-card {
  position: relative;
}

.quote-card::before {
  content: "“";
  position: absolute;
  top: 0.5rem;
  left: 1rem;
  font-family: Georgia, "Times New Roman", serif;
  font-size: 3.5rem;
  line-height: 1;
  color: rgba(37, 99, 235, 0.15);
  pointer-events: none;
}

.product-card img {
  image-rendering: auto;
}

/* Header — menu mobile (drawer) */
.mobile-menu.is-open {
  opacity: 1;
  pointer-events: auto;
}

.mobile-menu.is-open .mobile-menu__panel {
  transform: translate3d(0, 0, 0);
}

body.mobile-menu-open {
  overflow: hidden;
}

/**
 * Home: sem zoom/hover de escala no mobile (evita “salto” ao tocar e hover preso).
 * A partir de md (768px) mantém o efeito global .card-hover-zoom / .home-product-card.
 */
@media (max-width: 767px) {
  .page-home .card-hover-zoom,
  .page-home .home-product-card {
    transition: box-shadow 0.3s ease, border-color 0.3s ease;
    will-change: auto;
  }

  .page-home .card-hover-zoom:hover,
  .page-home .home-product-card:hover {
    transform: none;
    z-index: auto;
    /* Mantém aspecto de “card” sem o reforço do hover (equiv. ~ shadow-md) */
    box-shadow: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1);
  }

  .page-home img.hover\:scale-105:hover {
    transform: none !important;
  }
}

@media (prefers-reduced-motion: reduce) {
  .mobile-menu,
  .mobile-menu__panel {
    transition-duration: 0.01ms !important;
  }

  .card-hover-zoom,
  .home-product-card,
  .product-card,
  .quote-card {
    transition-duration: 0.01ms !important;
  }

  .card-hover-zoom:hover,
  .home-product-card:hover,
  .product-card:hover,
  .quote-card:hover {
    transform: none;
    box-shadow: inherit;
  }
}

/* Widget WhatsApp — cartão + frase + ícone; animação no ícone */
.section-entrega-brasil {
  background-color: #0A0F1B;
  background-image: linear-gradient(
      105deg,
      rgba(0, 0, 0, 0.82) 0%,
      rgba(37, 99, 235, 0.05) 45%,
      rgba(0, 0, 0, 0.78) 100%
    );
  background-size: cover;
  background-position: center;
  background-attachment: scroll;
}

/* ========== Mobile touch fixes ========== */

/* Auto-scroll carousel: ensure buttons/links are tappable on touch devices */
.home-autoscroll__group a,
.home-autoscroll__group button,
.home-autoscroll__group form {
  position: relative;
  z-index: 2;
  /* Ensure touch targets are at least 44px (WCAG 2.5.5) */
  min-height: 44px;
}

/* Ensure "Adicionar ao carrinho" buttons have proper touch target */
.home-product-card form button,
.product-card form button {
  min-height: 44px;
  -webkit-tap-highlight-color: rgba(37, 99, 235, 0.2);
  touch-action: manipulation;
}

/* All interactive elements: proper touch behavior and always on top */
a, button, [role="button"], input, select, textarea, summary, label {
  touch-action: manipulation;
  position: relative;
  z-index: 10;
}

/* Prevent iOS zoom on input focus (font-size >= 16px) */
@media (max-width: 767px) {
  input[type="text"],
  input[type="email"],
  input[type="password"],
  input[type="search"],
  input[type="tel"],
  input[type="number"],
  input[type="date"],
  select,
  textarea {
    font-size: 16px;
  }
}

/* Fix: flash offer carousel arrows on mobile — ensure they're above gradient overlays */
.home-carousel__arrow {
  position: relative;
  z-index: 3;
  -webkit-tap-highlight-color: rgba(37, 99, 235, 0.2);
  touch-action: manipulation;
}

/* Fix: category hover popover — don't show on mobile (touch devices can't hover) */
@media (max-width: 767px) {
  [data-tab-group] .tab-btn {
    min-height: 44px;
  }
}

/* Ensure forms and their children are always clickable above decorative layers */
form {
  position: relative;
  z-index: 10;
}

/* Quantity selector buttons on product page */
.qty-option {
  -webkit-tap-highlight-color: rgba(37, 99, 235, 0.15);
  touch-action: manipulation;
  min-width: 4.5rem;
  min-height: 3.5rem;
  cursor: pointer;
  user-select: none;
  -webkit-user-select: none;
  z-index: 10;
  position: relative;
}

/* Cart +/- buttons */
.cart-qty-btn {
  -webkit-tap-highlight-color: rgba(37, 99, 235, 0.15);
  touch-action: manipulation;
  min-width: 2.25rem;
  min-height: 2.25rem;
  user-select: none;
  -webkit-user-select: none;
}


/* ========== UTILITÁRIOS ADICIONAIS — REFIL 2026 ========== */

/* Text utilities */
.text-primary {
  color: var(--color-primary);
}

.text-accent {
  color: var(--color-accent);
}

.text-success {
  color: var(--color-success);
}

.text-warning {
  color: var(--color-warning);
}

.text-error {
  color: var(--color-error);
}

/* Background utilities */
.bg-primary {
  background-color: var(--color-primary);
}

.bg-accent {
  background-color: var(--color-accent);
}

.bg-success {
  background-color: var(--color-success);
}

.bg-warning {
  background-color: var(--color-warning);
}

.bg-error {
  background-color: var(--color-error);
}

.bg-sky {
  background-color: var(--color-sky);
}

/* Border utilities */
.border-primary {
  border-color: var(--color-primary);
}

.border-accent {
  border-color: var(--color-accent);
}

/* Shadow utilities */
.shadow-sm {
  box-shadow: var(--shadow-sm);
}

.shadow-md {
  box-shadow: var(--shadow-md);
}

.shadow-lg {
  box-shadow: var(--shadow-lg);
}

.shadow-xl {
  box-shadow: var(--shadow-xl);
}

/* Button base styles */
.btn-base {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.75rem 1.5rem;
  border-radius: var(--radius-lg);
  font-weight: 600;
  font-size: 1rem;
  border: none;
  cursor: pointer;
  transition: all var(--transition-base);
  text-decoration: none;
}

.btn-primary {
  background-color: var(--color-accent);
  color: white;
}

.btn-primary:hover {
  background-color: var(--color-accent-dark);
  transform: translateY(-2px);
  box-shadow: var(--shadow-lg);
}

.btn-primary:active {
  transform: translateY(0);
}

.btn-secondary {
  background-color: var(--color-bg-light);
  color: var(--color-primary);
  border: 1px solid var(--color-border);
}

.btn-secondary:hover {
  background-color: var(--color-border);
  transform: translateY(-2px);
}

/* Card base styles */
.card-base {
  background-color: var(--bg-card);
  border-radius: var(--radius-lg);
  border: 1px solid var(--color-border);
  box-shadow: var(--shadow-sm);
  transition: all var(--transition-base);
}

.card-base:hover {
  box-shadow: var(--shadow-md);
  border-color: var(--color-accent);
}

/* Badge styles */
.badge-success {
  display: inline-block;
  background-color: #F0FDF4;
  color: #065F46;
  padding: 0.25rem 0.75rem;
  border-radius: var(--radius-md);
  font-size: 0.875rem;
  font-weight: 600;
}

.badge-warning {
  display: inline-block;
  background-color: #FFFBEB;
  color: #92400E;
  padding: 0.25rem 0.75rem;
  border-radius: var(--radius-md);
  font-size: 0.875rem;
  font-weight: 600;
}

.badge-error {
  display: inline-block;
  background-color: #FEF2F2;
  color: #991B1B;
  padding: 0.25rem 0.75rem;
  border-radius: var(--radius-md);
  font-size: 0.875rem;
  font-weight: 600;
}

/* Focus visible state for accessibility */
.btn-base:focus-visible,
.card-base:focus-visible,
a:focus-visible {
  outline: 2px solid var(--color-accent);
  outline-offset: 2px;
}

/* Gradient backgrounds */
.gradient-primary {
  background: linear-gradient(135deg, var(--color-primary) 0%, var(--color-primary-light) 100%);
}

.gradient-accent {
  background: linear-gradient(135deg, var(--color-accent) 0%, var(--color-accent-dark) 100%);
}

.gradient-hero {
  background: linear-gradient(135deg, #0F172A 0%, #2563EB 50%, #E0F2FE 100%);
}

/* Responsive utilities */
@media (max-width: 767px) {
  .btn-base {
    padding: 0.625rem 1.25rem;
    font-size: 0.95rem;
  }
}

/* ========== CARROSSEL AUTOMÁTICO (Home) ========== */

#carousel-wrapper {
  display: flex;
  /* Transição suave - controlada via JavaScript */
  transition: transform 2s ease-in-out;
}

.carousel-dot {
  transition: all 0.3s ease;
  cursor: pointer;
}

.carousel-dot.active {
  background-color: #2563EB;
  width: 2rem;
}

/* Botões de navegação — estilo */
#carousel-prev,
#carousel-next {
  transition: all 0.3s ease;
  backdrop-filter: blur(10px);
}

#carousel-prev:hover,
#carousel-next:hover {
  transform: scale(1.1);
  background-color: #1E40AF;
}

#carousel-prev:active,
#carousel-next:active {
  transform: scale(0.95);
}

/* Responsividade carrossel */
@media (max-width: 767px) {
  #carousel-prev,
  #carousel-next {
    display: none;
  }
}

/* Acessibilidade — motion preferences */
@media (prefers-reduced-motion: reduce) {
  #carousel-wrapper {
    transition: none !important;
  }
  
  .carousel-dot {
    transition: none !important;
  }
}

/* ========== ANIMAÇÕES MODERNAS ========== */

@keyframes blob {
  0%, 100% {
    transform: translate(0px, 0px) scale(1);
  }
  33% {
    transform: translate(30px, -50px) scale(1.1);
  }
  66% {
    transform: translate(-20px, 20px) scale(0.9);
  }
}

@keyframes fade-in {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

@keyframes slide-up {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes float {
  0%, 100% {
    transform: translateY(0px);
  }
  50% {
    transform: translateY(-20px);
  }
}

.animate-blob {
  animation: blob 7s infinite;
}

.animate-fade-in {
  animation: fade-in 0.6s ease-out;
}

.animate-slide-up {
  animation: slide-up 0.6s ease-out;
}

.animate-float {
  animation: float 6s ease-in-out infinite;
}

.animation-delay-200 {
  animation-delay: 0.2s;
}

.animation-delay-400 {
  animation-delay: 0.4s;
}

.animation-delay-600 {
  animation-delay: 0.6s;
}

.animation-delay-2000 {
  animation-delay: 2s;
}

.animation-delay-4000 {
  animation-delay: 4s;
}

/* Prefers reduced motion */
@media (prefers-reduced-motion: reduce) {
  .animate-blob,
  .animate-fade-in,
  .animate-slide-up,
  .animate-float {
    animation: none !important;
  }
}

