/* ==========================================================================
   MIRADERM — shared design system
   Base: v1 palette and typography. Shared by every page.
   ========================================================================== */

:root {
  /* palette */
  --burgundy:      #8d3f4d;
  --burgundy-dark: #5b202b;
  --burgundy-deep: #3d101b;
  --rose:          #c7828c;
  --blush:         #ead0cb;
  --cream:         #f7f0e8;
  --paper:         #fffaf5;
  --sand:          #d6b291;
  --ink:           #241719;
  --muted:         #746568;
  --line:          rgba(36, 23, 25, .14);
  --line-light:    rgba(255, 255, 255, .2);
  --white:         #fff;
  --success:       #5c8f67;

  /* type */
  --serif: "DM Serif Display", Georgia, serif;
  --sans:  "DM Sans", Arial, Helvetica, sans-serif;

  /* motion */
  --ease: cubic-bezier(.22, .72, .18, 1);

  /* layout */
  --gutter: 6vw;
  --header-h: 74px;
  --bar-h: 32px;
}

* { box-sizing: border-box; }

html {
  scroll-behavior: smooth;
  /* stop anchor links from hiding under the sticky header */
  scroll-padding-top: calc(var(--header-h) + 20px);
}

body {
  margin: 0;
  font-family: var(--sans);
  background: var(--paper);
  color: var(--ink);
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

body.no-scroll { overflow: hidden; }

a { color: inherit; text-decoration: none; }
button, input, select, textarea { font: inherit; }
img { width: 100%; display: block; }

/* The `hidden` attribute must win over any display: grid/flex we set below,
   otherwise hidden panels stay on screen. */
[hidden] { display: none !important; }

::selection { background: var(--burgundy); color: #fff; }

:focus-visible {
  outline: 2px solid var(--burgundy);
  outline-offset: 3px;
}

.visually-hidden {
  position: absolute;
  width: 1px; height: 1px;
  margin: -1px; padding: 0;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

/* --------------------------------------------------------------------------
   Page loader
   -------------------------------------------------------------------------- */
.page-loader {
  position: fixed;
  inset: 0;
  z-index: 9999;
  background: var(--burgundy-deep);
  color: #fff;
  display: grid;
  place-content: center;
  text-align: center;
  gap: 22px;
  transition: opacity .6s var(--ease), visibility .6s var(--ease);
}
.page-loader.is-hidden { opacity: 0; visibility: hidden; }
.loader-kicker {
  margin: 0;
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: .24em;
  color: rgba(255, 255, 255, .65);
}
.loader-logo {
  font-family: var(--sans);
  font-size: clamp(38px, 7vw, 68px);
  font-weight: 700;
  letter-spacing: -.06em;
}
.loader-logo span { font-weight: 400; }
.loader-line {
  width: min(240px, 60vw);
  height: 1px;
  margin: 0 auto;
  background: rgba(255, 255, 255, .22);
  overflow: hidden;
}
.loader-line i {
  display: block;
  height: 100%;
  width: 0;
  background: var(--rose);
  transition: width .2s linear;
}
.loader-count {
  margin: 0;
  font-size: 11px;
  letter-spacing: .2em;
  color: rgba(255, 255, 255, .55);
}

/* --------------------------------------------------------------------------
   Custom cursor (pointer devices only)
   -------------------------------------------------------------------------- */
.cursor, .cursor-ring {
  position: fixed;
  top: 0; left: 0;
  border-radius: 50%;
  pointer-events: none;
  z-index: 9000;
  transform: translate(-50%, -50%);
  will-change: transform;
}
.cursor {
  width: 7px; height: 7px;
  background: var(--burgundy);
}
.cursor-ring {
  width: 38px; height: 38px;
  border: 1px solid rgba(141, 63, 77, .5);
  transition: width .3s var(--ease), height .3s var(--ease), background .3s;
}
.cursor-ring.is-active {
  width: 62px; height: 62px;
  background: rgba(141, 63, 77, .09);
}
@media (hover: none), (pointer: coarse) {
  .cursor, .cursor-ring { display: none; }
}

/* --------------------------------------------------------------------------
   Announcement bar
   -------------------------------------------------------------------------- */
.announcement-bar {
  height: var(--bar-h);
  background: var(--burgundy-deep);
  color: #fff;
  overflow: hidden;
  display: flex;
  align-items: center;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: .14em;
  position: relative;
  z-index: 30;
}
.announcement-track {
  display: flex;
  align-items: center;
  gap: 34px;
  white-space: nowrap;
  width: max-content;
  animation: marquee 32s linear infinite;
}
.announcement-track i {
  width: 4px; height: 4px;
  border-radius: 50%;
  background: var(--rose);
  flex: 0 0 auto;
}
@keyframes marquee { to { transform: translateX(-50%); } }

/* --------------------------------------------------------------------------
   Header
   -------------------------------------------------------------------------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 40;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 16px var(--gutter);
  background: rgba(255, 250, 245, .88);
  backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--line);
  transition: padding .35s var(--ease), background .35s var(--ease);
}
/* transparent over a dark hero, until scrolled */
.site-header.is-over-hero {
  position: fixed;
  top: var(--bar-h);
  left: 0;
  width: 100%;
  background: transparent;
  border-bottom-color: transparent;
  color: #fff;
  backdrop-filter: none;
}
.site-header.is-over-hero.scrolled {
  top: 0;
  background: rgba(255, 250, 245, .93);
  backdrop-filter: blur(16px);
  border-bottom-color: var(--line);
  color: var(--ink);
  padding-top: 11px;
  padding-bottom: 11px;
}

.brand {
  font-size: 27px;
  font-weight: 700;
  letter-spacing: -.06em;
  flex: 0 0 auto;
}
.brand span { font-weight: 400; }

.desktop-nav {
  display: flex;
  gap: 30px;
  font-size: 13px;
}
.desktop-nav a { position: relative; padding: 4px 0; }
.desktop-nav a::after {
  content: "";
  position: absolute;
  left: 0; bottom: 0;
  width: 0; height: 1px;
  background: currentColor;
  transition: width .3s var(--ease);
}
.desktop-nav a:hover::after,
.desktop-nav a.is-current::after { width: 100%; }

.header-actions {
  display: flex;
  align-items: center;
  gap: 4px;
  flex: 0 0 auto;
}
.icon-button, .menu-button {
  width: 42px; height: 42px;
  border: 0;
  background: transparent;
  color: inherit;
  display: grid;
  place-items: center;
  cursor: pointer;
  position: relative;
  border-radius: 50%;
  transition: background .3s;
}
.icon-button:hover, .menu-button:hover { background: rgba(141, 63, 77, .1); }
.icon-button svg {
  width: 20px; height: 20px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.6;
  stroke-linecap: round;
}
.cart-count {
  position: absolute;
  right: 3px; top: 3px;
  min-width: 18px; height: 18px;
  padding: 0 4px;
  background: var(--burgundy);
  color: #fff;
  border-radius: 999px;
  font-size: 10px;
  font-weight: 700;
  display: grid;
  place-items: center;
}
.cart-button.bump { animation: bump .45s var(--ease); }
@keyframes bump {
  30% { transform: scale(1.18); }
  60% { transform: scale(.94); }
}
.menu-button { display: none; }
.menu-button span {
  display: block;
  width: 20px; height: 1px;
  margin: 3px 0;
  background: currentColor;
  transition: transform .3s var(--ease);
}

/* --------------------------------------------------------------------------
   Buttons and links
   -------------------------------------------------------------------------- */
.btn {
  min-height: 52px;
  padding: 0 26px;
  border: 1px solid transparent;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: background .3s, color .3s, transform .3s var(--ease), border-color .3s;
  text-align: center;
}
.btn-primary { background: var(--burgundy); color: #fff; }
.btn-primary:hover { background: var(--burgundy-dark); transform: translateY(-2px); }
.btn-outline { border-color: var(--burgundy); color: var(--burgundy); }
.btn-outline:hover { background: var(--burgundy); color: #fff; }
.btn-ghost { border-color: rgba(255, 255, 255, .55); color: #fff; }
.btn-ghost:hover { background: #fff; color: var(--ink); }
.btn-light { background: #fff; color: var(--ink); }
.btn-light:hover { transform: translateY(-2px); }
.btn-block { width: 100%; }
.btn:disabled { opacity: .45; cursor: not-allowed; transform: none; }

.text-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  font-weight: 700;
  border-bottom: 1px solid;
  padding-bottom: 4px;
}
.text-link span { transition: transform .3s var(--ease); }
.text-link:hover span { transform: translate(3px, -3px); }

/* --------------------------------------------------------------------------
   Type helpers
   -------------------------------------------------------------------------- */
.eyebrow {
  margin: 0 0 18px;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .2em;
}
.eyebrow.dark { color: var(--burgundy); }

h1, h2, h3 { font-family: var(--serif); font-weight: 400; letter-spacing: -.045em; }
h1 em, h2 em, h3 em { font-style: italic; }

.section-pad { padding: 110px var(--gutter); }
.section-pad-sm { padding: 74px var(--gutter); }

.section-heading {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 30px;
  margin-bottom: 44px;
}
.section-heading h2 {
  margin: 0;
  font-size: clamp(42px, 5vw, 74px);
  line-height: 1;
}

/* --------------------------------------------------------------------------
   Scroll reveals
   -------------------------------------------------------------------------- */
.reveal, .reveal-left, .reveal-right {
  opacity: 0;
  transition: opacity .9s var(--ease), transform .9s var(--ease);
}
.reveal { transform: translateY(42px); }
.reveal-left { transform: translateX(-52px); }
.reveal-right { transform: translateX(52px); }
.is-visible { opacity: 1; transform: none; }

@media (prefers-reduced-motion: reduce) {
  .reveal, .reveal-left, .reveal-right { opacity: 1; transform: none; }
  * { animation-duration: .01ms !important; animation-iteration-count: 1 !important; }
}

/* --------------------------------------------------------------------------
   Mobile menu
   -------------------------------------------------------------------------- */
.mobile-menu {
  position: fixed;
  inset: 0;
  z-index: 120;
  background: var(--paper);
  padding: 28px;
  transform: translateY(-100%);
  transition: transform .5s var(--ease);
  display: flex;
  flex-direction: column;
}
.mobile-menu.open { transform: none; }
.mobile-menu .brand { margin-bottom: 40px; }
.mobile-menu nav {
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.mobile-menu nav a {
  font-family: var(--serif);
  font-size: clamp(34px, 9vw, 48px);
}
.close-menu {
  position: absolute;
  right: 22px; top: 22px;
  width: 44px; height: 44px;
  border: 0;
  background: transparent;
  font-size: 32px;
  line-height: 1;
  cursor: pointer;
}
.mobile-menu-foot {
  margin-top: auto;
  font-size: 12px;
  color: var(--muted);
}

/* --------------------------------------------------------------------------
   Cart drawer
   -------------------------------------------------------------------------- */
.drawer-backdrop {
  position: fixed;
  inset: 0;
  z-index: 110;
  background: rgba(20, 10, 12, .5);
  opacity: 0;
  pointer-events: none;
  transition: opacity .35s;
}
.drawer-backdrop.open { opacity: 1; pointer-events: auto; }

.cart-drawer {
  position: fixed;
  top: 0; right: 0;
  z-index: 130;
  width: min(430px, 100%);
  height: 100%;
  background: var(--paper);
  transform: translateX(100%);
  transition: transform .45s var(--ease);
  display: flex;
  flex-direction: column;
  padding: 26px;
}
.cart-drawer.open { transform: none; }
.drawer-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 16px;
  padding-bottom: 18px;
  border-bottom: 1px solid var(--line);
}
.drawer-head small {
  display: block;
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: .16em;
  color: var(--muted);
}
.drawer-head h2 { margin: 6px 0 0; font-size: 32px; }
.close-cart {
  border: 0;
  background: transparent;
  font-size: 30px;
  line-height: 1;
  cursor: pointer;
  color: var(--muted);
}

.cart-items {
  flex: 1;
  overflow-y: auto;
  padding: 20px 0;
  display: flex;
  flex-direction: column;
  gap: 16px;
}
.empty-cart {
  margin: auto 0;
  text-align: center;
  color: var(--muted);
}
.empty-cart span {
  display: block;
  font-family: var(--serif);
  font-size: 74px;
  color: var(--blush);
  line-height: 1;
}
.empty-cart p { margin: 6px 0 0; font-size: 14px; }

.cart-line {
  display: grid;
  grid-template-columns: 68px 1fr auto;
  gap: 14px;
  align-items: center;
}
.cart-line img {
  width: 68px; height: 82px;
  object-fit: cover;
  border-radius: 8px;
  background: var(--blush);
}
.cart-line h4 {
  margin: 3px 0 6px;
  font-family: var(--sans);
  font-size: 13px;
  font-weight: 600;
  line-height: 1.35;
}
.cart-line small {
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: .12em;
  color: var(--muted);
}
.cart-line strong { font-size: 13px; }
.line-qty {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  margin-top: 6px;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 2px;
}
.line-qty button {
  width: 24px; height: 24px;
  border: 0;
  background: transparent;
  border-radius: 50%;
  cursor: pointer;
  font-size: 15px;
  line-height: 1;
  color: var(--burgundy);
}
.line-qty button:hover { background: var(--blush); }
.line-qty span { min-width: 18px; text-align: center; font-size: 12px; }
.remove-line {
  border: 0;
  background: transparent;
  color: var(--muted);
  font-size: 20px;
  cursor: pointer;
  align-self: flex-start;
}
.remove-line:hover { color: var(--burgundy); }

.cart-footer {
  border-top: 1px solid var(--line);
  padding-top: 18px;
}
.cart-row {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  margin-bottom: 10px;
  font-size: 14px;
}
.cart-row strong { font-size: 20px; font-family: var(--serif); }
.cart-note {
  display: block;
  margin-top: 10px;
  font-size: 11px;
  color: var(--muted);
  text-align: center;
}
.bundle-hint {
  background: var(--blush);
  border-radius: 12px;
  padding: 12px 14px;
  margin-bottom: 14px;
  font-size: 12px;
  line-height: 1.5;
}
.bundle-hint strong { font-family: var(--sans); font-size: 12px; }
.bundle-hint button {
  border: 0;
  background: var(--burgundy);
  color: #fff;
  border-radius: 999px;
  padding: 7px 13px;
  margin-top: 8px;
  font-size: 11px;
  font-weight: 600;
  cursor: pointer;
}

/* --------------------------------------------------------------------------
   Product card (shop grid + homepage rail)
   -------------------------------------------------------------------------- */
.product-card { scroll-snap-align: start; }
.product-media {
  position: relative;
  aspect-ratio: .82;
  overflow: hidden;
  border-radius: 18px;
  background: var(--blush);
}
.product-media img {
  height: 100%;
  object-fit: cover;
  transition: transform .7s var(--ease);
}
.product-card:hover .product-media img { transform: scale(1.045); }
.product-badge {
  position: absolute;
  left: 14px; top: 14px;
  z-index: 2;
  padding: 8px 11px;
  background: rgba(255, 255, 255, .94);
  border-radius: 999px;
  font-size: 9px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: .12em;
}
.product-actions {
  position: absolute;
  left: 12px; right: 12px; bottom: 12px;
  z-index: 2;
  display: flex;
  gap: 8px;
  transform: translateY(76px);
  transition: transform .4s var(--ease);
}
.product-card:hover .product-actions { transform: none; }
.product-actions button {
  border: 0;
  background: rgba(255, 255, 255, .95);
  color: var(--ink);
  height: 46px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .1em;
  cursor: pointer;
  transition: background .3s, color .3s;
}
.product-actions .quick-add {
  flex: 1;
  background: var(--burgundy);
  color: #fff;
}
.product-actions .quick-add:hover { background: var(--burgundy-dark); }
.product-actions .quick-view {
  flex: 0 0 46px;
  font-size: 17px;
}
.product-actions .quick-view:hover { background: #fff; }

.product-info {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 16px;
  padding: 16px 2px 0;
}
.product-info small {
  display: block;
  margin-bottom: 5px;
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: .12em;
  color: var(--muted);
}
.product-info h3 {
  margin: 0;
  font-family: var(--sans);
  font-size: 15px;
  font-weight: 600;
  letter-spacing: 0;
  line-height: 1.35;
}
.product-price { text-align: right; white-space: nowrap; }
.product-price strong { font-size: 15px; }
.product-price s {
  display: block;
  font-size: 12px;
  color: var(--muted);
}

/* --------------------------------------------------------------------------
   Newsletter
   -------------------------------------------------------------------------- */
.newsletter {
  background: var(--burgundy);
  color: #fff;
  padding: 96px var(--gutter);
  display: grid;
  grid-template-columns: 1fr 1fr;
  align-items: end;
  gap: 8vw;
}
.newsletter h2 {
  margin: 0;
  font-size: clamp(50px, 6.5vw, 92px);
  line-height: .9;
}
.newsletter-form label {
  display: block;
  margin-bottom: 20px;
  color: rgba(255, 255, 255, .78);
  font-size: 15px;
}
.email-row {
  display: flex;
  border-bottom: 1px solid rgba(255, 255, 255, .6);
}
.email-row input {
  flex: 1;
  min-width: 0;
  background: transparent;
  border: 0;
  color: #fff;
  padding: 18px 0;
  outline: 0;
}
.email-row input::placeholder { color: rgba(255, 255, 255, .55); }
.email-row button {
  border: 0;
  background: transparent;
  color: #fff;
  font-weight: 700;
  cursor: pointer;
  padding: 0 4px;
}
.form-success {
  margin: 14px 0 0;
  font-size: 13px;
  opacity: 0;
  transition: opacity .4s;
}
.form-success.is-visible { opacity: 1; }

/* --------------------------------------------------------------------------
   Footer
   -------------------------------------------------------------------------- */
.site-footer {
  background: #1e1517;
  color: #fff;
  padding: 72px var(--gutter) 26px;
}
.footer-top {
  display: grid;
  grid-template-columns: 1.2fr repeat(3, .8fr);
  gap: 40px;
}
.footer-brand {
  font-size: 46px;
  font-weight: 700;
  letter-spacing: -.06em;
  line-height: 1;
}
.footer-brand span { font-weight: 400; }
.footer-brand small {
  display: block;
  margin-top: 14px;
  font-size: 10px;
  font-weight: 400;
  letter-spacing: .18em;
  text-transform: uppercase;
  color: var(--rose);
}
.footer-column h4 {
  margin: 0 0 4px;
  font-family: var(--sans);
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: .15em;
  color: var(--rose);
}
.footer-column a,
.footer-column p {
  display: block;
  margin: 12px 0;
  font-size: 14px;
  color: rgba(255, 255, 255, .72);
}
.footer-column a:hover { color: #fff; }
.footer-bottom {
  border-top: 1px solid rgba(255, 255, 255, .13);
  margin-top: 54px;
  padding-top: 22px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 18px;
  flex-wrap: wrap;
  font-size: 11px;
  color: rgba(255, 255, 255, .5);
}
.footer-bottom nav { display: flex; gap: 18px; }
#backToTop {
  border: 0;
  background: transparent;
  color: inherit;
  cursor: pointer;
  font-size: 11px;
}

/* --------------------------------------------------------------------------
   Floating WhatsApp button
   -------------------------------------------------------------------------- */
.wa-float {
  position: fixed;
  right: 18px; bottom: 18px;
  z-index: 90;
  width: 54px; height: 54px;
  border-radius: 50%;
  background: #25d366;
  display: grid;
  place-items: center;
  box-shadow: 0 10px 26px rgba(0, 0, 0, .2);
  transition: transform .3s var(--ease);
}
.wa-float:hover { transform: scale(1.08); }
.wa-float svg { width: 27px; height: 27px; fill: #fff; }

/* --------------------------------------------------------------------------
   Responsive
   -------------------------------------------------------------------------- */
@media (max-width: 980px) {
  :root { --gutter: 22px; }
  .desktop-nav { display: none; }
  .menu-button { display: grid; }
  .newsletter { grid-template-columns: 1fr; gap: 48px; }
  .footer-top { grid-template-columns: 1fr 1fr; gap: 34px; }
  .section-pad { padding: 78px var(--gutter); }
  .section-heading { flex-direction: column; align-items: flex-start; }
}

@media (max-width: 560px) {
  .brand { font-size: 23px; }
  .footer-top { grid-template-columns: 1fr; }
  .footer-brand { font-size: 38px; }
  .footer-bottom { flex-direction: column; align-items: flex-start; }
  .cart-drawer { padding: 20px; }
}
