/* ========================================
   ELORA SKIN BEAUTY — Custom Styles
   ======================================== */

/* Fontes carregadas via <link rel="preload"> no header.php para evitar render-blocking */

:root {
  --primary:           #8a4853;
  --primary-light:     #a6606b;
  --primary-pale:      #ffd9dd;
  --primary-fixed-dim: #ffb2bc;
  --surface:           #fcf9f8;
  --surface-low:       #f6f3f2;
  --surface-container: #f0eded;
  --surface-high:      #eae7e7;
  --surface-dim:       #dcd9d9;
  --on-surface:        #1b1c1c;
  --on-surface-var:    #524345;
  --outline:           #857374;
  --outline-var:       #d7c1c3;
  --secondary-cont:    #f8d8db;
  --shadow-rose:       rgba(138, 72, 83, 0.08);
  --shadow-rose-md:    rgba(138, 72, 83, 0.14);

  /* Short aliases used in inline styles */
  --surf-low:   #f6f3f2;
  --surf-cont:  #f0eded;
  --surf-high:  #eae7e7;
  --sec-cont:   #f8d8db;
  --primary-p:  #ffd9dd;
  --out-var:    #d7c1c3;
  --on-surf:    #1b1c1c;
  --on-surf-v:  #524345;
}

/* ── Reset & Base ── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

a { text-decoration: none; color: inherit; }

html { scroll-behavior: smooth; }

body {
  font-family: 'Montserrat', sans-serif;
  background-color: var(--surface);
  color: var(--on-surface);
  -webkit-font-smoothing: antialiased;
  line-height: 1.5;
}

/* ── Scrollbar ── */
::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: var(--surface-low); }
::-webkit-scrollbar-thumb { background: var(--outline-var); border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: var(--primary-light); }

/* ── Typography ── */
.font-display { font-family: 'Bodoni Moda', serif; }

.text-display {
  font-family: 'Bodoni Moda', serif;
  font-size: clamp(2.2rem, 5vw, 3.2rem);
  font-weight: 600;
  line-height: 1.1;
  letter-spacing: -0.02em;
}

.text-headline-lg {
  font-family: 'Bodoni Moda', serif;
  font-size: clamp(1.6rem, 3vw, 2rem);
  font-weight: 500;
  line-height: 1.2;
}

.text-headline-md {
  font-family: 'Bodoni Moda', serif;
  font-size: 1.5rem;
  font-weight: 500;
  line-height: 1.3;
}

.text-label {
  font-family: 'Montserrat', sans-serif;
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

/* ── Buttons ── */
.btn-primary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  background: var(--primary);
  color: #fff;
  font-family: 'Montserrat', sans-serif;
  font-size: 0.8125rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 0.875rem 2rem;
  border-radius: 4px;
  border: none;
  cursor: pointer;
  transition: background 0.25s ease, box-shadow 0.25s ease, transform 0.2s ease;
}
.btn-primary:hover {
  background: var(--primary-light);
  box-shadow: 0 6px 20px var(--shadow-rose-md);
  transform: translateY(-1px);
}

.btn-secondary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  background: transparent;
  color: var(--primary);
  font-family: 'Montserrat', sans-serif;
  font-size: 0.8125rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 0.875rem 2rem;
  border-radius: 4px;
  border: 1px solid var(--primary);
  cursor: pointer;
  transition: background 0.25s ease, color 0.25s ease, transform 0.2s ease;
}
.btn-secondary:hover {
  background: var(--primary);
  color: #fff;
  transform: translateY(-1px);
}

.btn-ghost {
  background: transparent;
  color: var(--on-surface);
  font-family: 'Montserrat', sans-serif;
  font-size: 0.8125rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  padding: 0.5rem 0;
  border: none;
  cursor: pointer;
  position: relative;
  transition: color 0.2s;
}
.btn-ghost::after {
  content: '';
  position: absolute;
  bottom: 0; left: 0;
  width: 0; height: 1px;
  background: var(--primary);
  transition: width 0.3s ease;
}
.btn-ghost:hover { color: var(--primary); }
.btn-ghost:hover::after { width: 100%; }

/* ── Navigation ── */
.nav-link {
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--on-surface);
  padding: 0.25rem 0;
  position: relative;
  transition: color 0.2s;
}
.nav-link::after {
  content: '';
  position: absolute;
  bottom: -2px; left: 0;
  width: 0; height: 1px;
  background: var(--primary);
  transition: width 0.3s ease;
}
.nav-link:hover, .nav-link.active { color: var(--primary); }
.nav-link:hover::after, .nav-link.active::after { width: 100%; }

/* ── Sticky Header ── */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(252, 249, 248, 0.88);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--outline-var);
  transition: box-shadow 0.3s;
}
.site-header.scrolled {
  box-shadow: 0 2px 20px var(--shadow-rose);
}

/* ── Product Cards ── */
.product-card {
  background: #fff;
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 8px 28px var(--shadow-rose);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  cursor: pointer;
}
.product-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 16px 40px var(--shadow-rose-md);
}
.product-card .card-img {
  position: relative;
  overflow: hidden;
  background: var(--surface-low);
}
.product-card .card-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s ease;
}
.product-card:hover .card-img img {
  transform: scale(1.05);
}
.product-card .card-overlay {
  position: absolute;
  bottom: 0; left: 0; right: 0;
  padding: 1rem;
  background: linear-gradient(to top, rgba(252,249,248,0.96) 0%, transparent 100%);
  transform: translateY(100%);
  transition: transform 0.35s ease;
}
.product-card:hover .card-overlay {
  transform: translateY(0);
}

/* ── Chip / Tag ── */
.chip {
  display: inline-block;
  padding: 0.25rem 0.75rem;
  border-radius: 9999px;
  background: var(--secondary-cont);
  color: var(--primary);
  font-size: 0.6875rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
.chip-outline {
  background: transparent;
  border: 1px solid var(--outline-var);
  color: var(--on-surface-var);
}

/* ── Hero ── */
.hero-section {
  background: linear-gradient(135deg, var(--surface-low) 0%, var(--secondary-cont) 60%, var(--primary-pale) 100%);
  min-height: 88vh;
  position: relative;
  overflow: hidden;
}
.hero-orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(80px);
  pointer-events: none;
}

/* ── Section Divider ── */
.section-label {
  display: flex;
  align-items: center;
  gap: 1rem;
  font-size: 0.6875rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--primary);
  margin-bottom: 0.75rem;
}
.section-label::before {
  content: '';
  width: 32px; height: 1px;
  background: var(--primary);
}

/* ── Cart Drawer ── */
.cart-drawer {
  position: fixed;
  top: 0; right: -420px;
  width: min(420px, 100vw);
  height: 100vh;
  background: var(--surface);
  z-index: 200;
  display: flex;
  flex-direction: column;
  box-shadow: -8px 0 40px rgba(0,0,0,0.1);
  transition: right 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}
.cart-drawer.open { right: 0; }
.cart-overlay {
  position: fixed;
  inset: 0;
  background: rgba(28, 27, 27, 0.4);
  z-index: 199;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.4s;
}
.cart-overlay.open { opacity: 1; pointer-events: auto; }

/* ── Mobile Menu ── */
.mobile-menu {
  position: fixed;
  top: 0; left: -100%;
  width: min(320px, 85vw);
  height: 100vh;
  background: var(--surface);
  z-index: 200;
  display: flex;
  flex-direction: column;
  box-shadow: 8px 0 40px rgba(0,0,0,0.1);
  transition: left 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}
.mobile-menu.open { left: 0; }

/* ── Input ── */
.input-field {
  width: 100%;
  background: var(--surface-container);
  border: 1px solid var(--outline-var);
  border-radius: 4px;
  padding: 0.75rem 1rem;
  font-family: 'Montserrat', sans-serif;
  font-size: 0.875rem;
  color: var(--on-surface);
  outline: none;
  transition: border-color 0.2s, box-shadow 0.2s;
}
.input-field:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(138, 72, 83, 0.1);
}
.input-field::placeholder { color: var(--outline); }

/* ── Range Slider ── */
.range-slider {
  -webkit-appearance: none;
  width: 100%;
  height: 3px;
  background: var(--outline-var);
  border-radius: 2px;
  outline: none;
}
.range-slider::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 16px; height: 16px;
  border-radius: 50%;
  background: var(--primary);
  cursor: pointer;
  box-shadow: 0 2px 8px var(--shadow-rose-md);
}

/* ── Star Rating ── */
.stars { color: #c9956a; letter-spacing: 0.05em; }

/* ── Accordion ── */
.accordion-item { border-bottom: 1px solid var(--outline-var); }
.accordion-btn {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1.25rem 0;
  font-family: 'Montserrat', sans-serif;
  font-size: 0.875rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--on-surface);
  background: none;
  border: none;
  cursor: pointer;
  transition: color 0.2s;
}
.accordion-btn:hover { color: var(--primary); }
.accordion-icon {
  width: 20px; height: 20px;
  transition: transform 0.3s ease;
  color: var(--primary);
  flex-shrink: 0;
}
.accordion-btn.open .accordion-icon { transform: rotate(45deg); }
.accordion-body {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.4s ease, padding 0.3s ease;
}
.accordion-body.open {
  max-height: 400px;
}
.accordion-body-inner {
  padding-bottom: 1.25rem;
  font-size: 0.875rem;
  line-height: 1.7;
  color: var(--on-surface-var);
}

/* ── Routine Steps ── */
.routine-step {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.75rem;
  cursor: pointer;
  transition: transform 0.2s;
}
.routine-step:hover { transform: translateY(-2px); }
.routine-step-icon {
  width: 72px; height: 72px;
  border-radius: 50%;
  border: 1.5px solid var(--outline-var);
  display: flex; align-items: center; justify-content: center;
  background: #fff;
  font-size: 1.5rem;
  transition: border-color 0.2s, box-shadow 0.2s;
}
.routine-step.active .routine-step-icon,
.routine-step:hover .routine-step-icon {
  border-color: var(--primary);
  box-shadow: 0 0 0 4px var(--primary-pale);
}
.routine-step-label {
  font-size: 0.6875rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--on-surface-var);
  text-align: center;
}
.routine-step.active .routine-step-label { color: var(--primary); }

/* ── Product Gallery ── */
.gallery-thumb {
  border: 2px solid transparent;
  border-radius: 6px;
  overflow: hidden;
  cursor: pointer;
  transition: border-color 0.2s;
}
.gallery-thumb.active,
.gallery-thumb:hover { border-color: var(--primary); }

/* ── Newsletter ── */
.newsletter-section {
  background: linear-gradient(135deg, var(--primary) 0%, var(--primary-light) 100%);
}
.newsletter-form .input-field::placeholder {
  color: rgba(255, 255, 255, 0.55);
}
.newsletter-form .input-field:focus::placeholder {
  color: rgba(255, 255, 255, 0.35);
}

/* ── Instagram Grid ── */
.insta-item {
  position: relative;
  overflow: hidden;
  border-radius: 4px;
  aspect-ratio: 1;
  cursor: pointer;
}
.insta-item img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.4s; }
.insta-item:hover img { transform: scale(1.06); }
.insta-item .insta-overlay {
  position: absolute; inset: 0;
  background: rgba(138, 72, 83, 0.5);
  display: flex; align-items: center; justify-content: center;
  opacity: 0; transition: opacity 0.3s;
}
.insta-item:hover .insta-overlay { opacity: 1; }

/* ── Filter Sidebar ── */
.filter-sidebar { background: #fff; border-radius: 8px; padding: 1.5rem; }
.filter-group { margin-bottom: 1.75rem; }
.filter-title {
  font-size: 0.6875rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--on-surface);
  margin-bottom: 1rem;
  padding-bottom: 0.5rem;
  border-bottom: 1px solid var(--outline-var);
}
.filter-checkbox {
  display: flex;
  align-items: center;
  gap: 0.625rem;
  cursor: pointer;
  margin-bottom: 0.625rem;
}
.filter-checkbox input[type="checkbox"] {
  width: 16px; height: 16px;
  accent-color: var(--primary);
  cursor: pointer;
}
.filter-checkbox span {
  font-size: 0.8125rem;
  color: var(--on-surface-var);
}

/* ── Cart Items ── */
.cart-item { display: flex; gap: 1rem; padding: 1rem 0; border-bottom: 1px solid var(--outline-var); }
.cart-item-img { width: 72px; height: 72px; border-radius: 6px; object-fit: cover; background: var(--surface-low); flex-shrink: 0; }
.qty-btn {
  width: 28px; height: 28px;
  border-radius: 4px;
  border: 1px solid var(--outline-var);
  background: #fff;
  display: flex; align-items: center; justify-content: center;
  cursor: pointer; font-size: 1rem;
  transition: border-color 0.2s, color 0.2s;
}
.qty-btn:hover { border-color: var(--primary); color: var(--primary); }

/* ── Toast / SweetAlert Overrides ── */
.swal2-popup { border-radius: 8px !important; font-family: 'Montserrat', sans-serif !important; }
.swal2-confirm { background: var(--primary) !important; border-radius: 4px !important; }
.swal2-cancel { border: 1px solid var(--primary) !important; color: var(--primary) !important; background: transparent !important; border-radius: 4px !important; }

/* ── Animations ── */
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(24px); }
  to   { opacity: 1; transform: translateY(0); }
}
@keyframes fadeIn {
  from { opacity: 0; }
  to   { opacity: 1; }
}
@keyframes float {
  0%, 100% { transform: translateY(0px); }
  50%       { transform: translateY(-10px); }
}

.animate-fade-up { animation: fadeUp 0.7s ease forwards; }
.animate-fade-in { animation: fadeIn 0.5s ease forwards; }
.animate-float   { animation: float 4s ease-in-out infinite; }

[data-aos] { opacity: 0; transform: translateY(20px); transition: opacity 0.6s ease, transform 0.6s ease; }
[data-aos].aos-animate { opacity: 1; transform: translateY(0); }

/* ── Utilities ── */
.divider { height: 1px; background: var(--outline-var); }
.section-pad { padding: 5rem 0; }
@media (max-width: 768px) { .section-pad { padding: 3.5rem 0; } }

.container-custom {
  width: 100%;
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 1.5rem;
}
@media (min-width: 1024px) { .container-custom { padding: 0 4rem; } }

/* ── Badge ── */
.cart-badge {
  position: absolute;
  top: -6px; right: -6px;
  min-width: 18px; height: 18px;
  border-radius: 9999px;
  background: var(--primary);
  color: #fff;
  font-size: 0.625rem;
  font-weight: 700;
  display: flex; align-items: center; justify-content: center;
  padding: 0 4px;
}

/* ── Skeleton Loading ── */
.skeleton {
  background: linear-gradient(90deg, var(--surface-container) 25%, var(--surface-high) 50%, var(--surface-container) 75%);
  background-size: 200% 100%;
  animation: skeleton-loading 1.5s infinite;
  border-radius: 4px;
}
@keyframes skeleton-loading {
  0%   { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}

/* ── Page Banner ── */
.page-banner {
  background: linear-gradient(135deg, var(--surface-low) 0%, var(--secondary-cont) 100%);
  padding: 4rem 0 3rem;
  text-align: center;
}

/* ── Hover underline links ── */
.link-hover,
button.link-hover {
  position: relative;
  color: var(--on-surface-var);
  font-size: 0.8125rem;
  font-family: 'Montserrat', sans-serif;
  font-weight: 400;
  background: none;
  border: none;
  padding: 0;
  margin: 0;
  cursor: pointer;
  text-align: left;
  transition: color 0.2s;
}
.link-hover:hover,
button.link-hover:hover { color: var(--primary); }

/* ── Hero Carousel ── */
#hero-carousel { user-select: none; }

.hslide-img { transform-origin: center center; }

#hc-label,
#hc-title,
#hc-desc,
#hc-ctas {
  opacity: 1;
  transform: translateY(0);
}

/* Arrow nav buttons */
.hero-arrow {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  z-index: 10;
  width: 46px; height: 46px;
  border-radius: 50%;
  background: rgba(252,249,248,0.88);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border: 1px solid var(--outline-var);
  cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  color: var(--on-surface);
  transition: background 0.25s, color 0.25s, border-color 0.25s, box-shadow 0.25s;
  box-shadow: 0 4px 20px rgba(138,72,83,0.1);
}
.hero-arrow:hover {
  background: var(--primary);
  color: #fff;
  border-color: var(--primary);
  box-shadow: 0 8px 28px rgba(138,72,83,0.3);
}

/* ── Responsive Grid Override
   Inline styles (style="grid-template-columns:1fr") beat Tailwind classes.
   These !important rules restore responsive behaviour. ── */
@media (min-width: 768px) {
  .md\:grid-cols-2 { grid-template-columns: repeat(2, minmax(0, 1fr)) !important; }
  .md\:grid-cols-3 { grid-template-columns: repeat(3, minmax(0, 1fr)) !important; }
}
@media (min-width: 1024px) {
  .lg\:grid-cols-2 { grid-template-columns: repeat(2, minmax(0, 1fr)) !important; }
  .lg\:grid-cols-3 { grid-template-columns: repeat(3, minmax(0, 1fr)) !important; }
  .lg\:grid-cols-4 { grid-template-columns: repeat(4, minmax(0, 1fr)) !important; }
  .lg\:grid-cols-6 { grid-template-columns: repeat(6, minmax(0, 1fr)) !important; }
  .lg\:col-span-1  { grid-column: span 1 / span 1 !important; }
  /* Arbitrary grid values used in produto/checkout/produtos */
  .lg\:grid-cols-\[1fr_380px\]  { grid-template-columns: 1fr 380px !important; }
  .lg\:grid-cols-\[260px_1fr\]  { grid-template-columns: 260px 1fr !important; }
}
