/* ================================================================
   Forma — Global Design System
   Apple-inspired: warm neutrals, clean typography, generous space
   ================================================================ */

/* ── Design Tokens ─────────────────────────────────────────────── */
:root {
  /* Colours */
  --color-bg:           #FAFAF8;
  --color-bg-2:         #F2F2EF;
  --color-surface:      #FFFFFF;
  --color-surface-2:    #F7F7F4;
  --color-border:       #E8E8E3;
  --color-border-2:     #D4D4CF;

  --color-text:         #1C1B1A;
  --color-text-2:       #6B6B68;
  --color-text-3:       #A0A09C;
  --color-text-inv:     #FFFFFF;

  --color-accent:       #1C1B1A;
  --color-accent-hover: #3A3936;
  --color-accent-light: rgba(28,27,26,.06);

  --color-success:      #30A46C;
  --color-warning:      #F76B15;
  --color-danger:       #E5484D;
  --color-sale:         #E5484D;

  /* Typography */
  --font-sans:   'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', system-ui, sans-serif;
  --font-mono:   'SF Mono', 'Fira Code', monospace;
  --font-display:'Funnel Display', -apple-system, BlinkMacSystemFont, 'Segoe UI', system-ui, sans-serif;

  --text-xs:    0.6875rem;   /* 11px */
  --text-sm:    0.8125rem;   /* 13px */
  --text-base:  0.9375rem;   /* 15px */
  --text-md:    1.0625rem;   /* 17px */
  --text-lg:    1.25rem;     /* 20px */
  --text-xl:    1.5rem;      /* 24px */
  --text-2xl:   2rem;        /* 32px */
  --text-3xl:   2.75rem;     /* 44px */
  --text-4xl:   3.75rem;     /* 60px */
  --text-5xl:   5.5rem;      /* 88px */

  --weight-light:   300;
  --weight-regular: 400;
  --weight-medium:  500;
  --weight-semibold:600;

  /* Spacing */
  --space-1:   0.25rem;
  --space-2:   0.5rem;
  --space-3:   0.75rem;
  --space-4:   1rem;
  --space-5:   1.25rem;
  --space-6:   1.5rem;
  --space-8:   2rem;
  --space-10:  2.5rem;
  --space-12:  3rem;
  --space-16:  4rem;
  --space-20:  5rem;
  --space-24:  6rem;
  --space-32:  8rem;

  /* Layout */
  --container-sm:  640px;
  --container-md:  768px;
  --container-lg:  1024px;
  --container-xl:  1280px;
  --container-2xl: 1440px;
  --container-pad: clamp(1.25rem, 5vw, 3rem);

  /* Radius */
  --radius-sm:  0.375rem;
  --radius-md:  0.625rem;
  --radius-lg:  1rem;
  --radius-xl:  1.5rem;
  --radius-full:9999px;

  /* Shadows */
  --shadow-sm:  0 1px 3px rgba(0,0,0,.06), 0 1px 2px rgba(0,0,0,.04);
  --shadow-md:  0 4px 16px rgba(0,0,0,.07), 0 2px 6px rgba(0,0,0,.04);
  --shadow-lg:  0 8px 32px rgba(0,0,0,.09), 0 4px 12px rgba(0,0,0,.05);
  --shadow-xl:  0 20px 60px rgba(0,0,0,.12), 0 8px 24px rgba(0,0,0,.07);

  /* Transitions */
  --ease:       cubic-bezier(.25,.46,.45,.94);
  --ease-spring:cubic-bezier(.34,1.56,.64,1);
  --duration-fast: 150ms;
  --duration-base: 250ms;
  --duration-slow: 400ms;

  /* Z-index scale */
  --z-below:  -1;
  --z-base:    0;
  --z-raised:  10;
  --z-dropdown:200;
  --z-sticky:  300;
  --z-overlay: 400;
  --z-modal:   500;
  --z-toast:   600;
}

/* ── Reset ──────────────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html {
  font-size: 16px;
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: clip;
}

body {
  font-family: var(--font-sans);
  font-size: var(--text-base);
  font-weight: var(--weight-regular);
  line-height: 1.6;
  color: var(--color-text);
  background-color: var(--color-bg);
  min-height: 100vh;
  overflow-x: clip;
}

img, svg, video { display: block; max-width: 100%; }
img { object-fit: cover; }

a { color: inherit; text-decoration: none; }
button { cursor: pointer; border: none; background: none; font-family: inherit; }
input, textarea, select { font-family: inherit; }
ul, ol { list-style: none; }
h1,h2,h3,h4,h5,h6 { font-weight: var(--weight-semibold); line-height: 1.15; }

/* ── Layout ─────────────────────────────────────────────────────── */
.container {
  width: 100%;
  max-width: var(--container-2xl);
  margin-inline: auto;
  padding-inline: var(--container-pad);
}
.container--sm  { max-width: var(--container-sm);  }
.container--md  { max-width: var(--container-md);  }
.container--lg  { max-width: var(--container-lg);  }
.container--xl  { max-width: var(--container-xl);  }

/* ── Section Base ───────────────────────────────────────────────── */
.section {
  padding-block: var(--space-10);
}
.section--lg {
  padding-block: var(--space-32);
}
.section-header {
  margin-bottom: var(--space-12);
}
.section-label {
  display: inline-block;
  font-size: var(--text-xs);
  font-weight: var(--weight-semibold);
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--color-text-3);
  margin-bottom: var(--space-3);
}
.section-title {
  font-size: clamp(var(--text-xl), 3.5vw, var(--text-3xl));
  font-weight: var(--weight-semibold);
  letter-spacing: -.025em;
  color: var(--color-text);
}
.section-subtitle {
  margin-top: var(--space-3);
  font-size: var(--text-base);
  color: var(--color-text-2);
  max-width: 48ch;
}
.section-header--row {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: var(--space-6);
}

/* ── Buttons ─────────────────────────────────────────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-2);
  padding: 0 var(--space-6);
  height: 44px;
  font-size: var(--text-sm);
  font-weight: var(--weight-medium);
  letter-spacing: -.01em;
  border-radius: var(--radius-full);
  border: 1.5px solid transparent;
  transition: all var(--duration-base) var(--ease);
  white-space: nowrap;
  user-select: none;
}
.btn--primary {
  background: var(--color-accent);
  color: var(--color-text-inv);
  border-color: var(--color-accent);
}
.btn--primary:hover {
  background: var(--color-accent-hover);
  border-color: var(--color-accent-hover);
}
.btn--secondary {
  background: transparent;
  color: var(--color-text);
  border-color: var(--color-border-2);
}
.btn--secondary:hover {
  border-color: var(--color-text);
}
.btn--ghost {
  background: transparent;
  color: var(--color-text);
  padding: 0 var(--space-3);
  height: auto;
}
.btn--ghost:hover { color: var(--color-text-2); }

.btn--sm {
  height: 36px;
  padding: 0 var(--space-4);
  font-size: var(--text-xs);
}
.btn--lg {
  height: 52px;
  padding: 0 var(--space-8);
  font-size: var(--text-base);
}
.btn--block { width: 100%; }
.btn--icon {
  width: 44px;
  height: 44px;
  padding: 0;
  border-radius: var(--radius-full);
}
.btn--icon.btn--sm { width: 36px; height: 36px; }

.btn:disabled {
  opacity: .4;
  cursor: not-allowed;
  pointer-events: none;
}

/* ── Typography ──────────────────────────────────────────────────── */
.text-xs    { font-size: var(--text-xs); }
.text-sm    { font-size: var(--text-sm); }
.text-base  { font-size: var(--text-base); }
.text-lg    { font-size: var(--text-lg); }
.text-xl    { font-size: var(--text-xl); }
.text-2xl   { font-size: var(--text-2xl); }
.text-3xl   { font-size: var(--text-3xl); }
.text-muted { color: var(--color-text-2); }
.text-light { color: var(--color-text-3); }
.text-center { text-align: center; }
.font-medium  { font-weight: var(--weight-medium); }
.font-semibold{ font-weight: var(--weight-semibold); }

/* ── Divider ─────────────────────────────────────────────────────── */
.divider {
  width: 100%;
  height: 1px;
  background: var(--color-border);
}

/* ── Badge ───────────────────────────────────────────────────────── */
.badge {
  display: inline-flex;
  align-items: center;
  padding: var(--space-1) var(--space-3);
  border-radius: var(--radius-full);
  font-size: var(--text-xs);
  font-weight: var(--weight-medium);
  letter-spacing: .04em;
  line-height: 1;
}
.badge--sale   { background: var(--color-sale); color: #fff; }
.badge--new    { background: var(--color-text); color: #fff; }
.badge--muted  { background: var(--color-bg-2); color: var(--color-text-2); }
.badge--label  { background: var(--color-accent, var(--color-text)); color: #fff; text-transform: uppercase; font-size: 9px; }

/* ── Price ───────────────────────────────────────────────────────── */
.price-group { display: inline-flex; align-items: baseline; gap: var(--space-2); }
.price        { font-size: var(--text-md); font-weight: var(--weight-semibold); }
.price--sale  { color: var(--color-sale); }
.price--orig  { font-size: var(--text-sm); color: var(--color-text-3); text-decoration: line-through; font-weight: var(--weight-regular); }
.price--por {    font-size: 16px;
    font-weight: 400;}

/* ── Icon wrapper ────────────────────────────────────────────────── */
.icon { display: inline-flex; align-items: center; justify-content: center; }
.icon svg { flex-shrink: 0; }

/* ── Skeleton ────────────────────────────────────────────────────── */
.skeleton {
  background: linear-gradient(90deg, var(--color-bg-2) 25%, var(--color-border) 50%, var(--color-bg-2) 75%);
  background-size: 200% 100%;
  animation: skeleton-pulse 1.4s ease infinite;
  border-radius: var(--radius-sm);
}
@keyframes skeleton-pulse {
  0%   { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}

/* ── Cart Badge Pulse ─────────────────────────────────────────────── */
.site-header__cart-count.cart-pulse {
  animation: cartPop .4s var(--ease-spring) forwards;
}
@keyframes cartPop {
  0%   { transform: scale(1); }
  50%  { transform: scale(1.5); }
  100% { transform: scale(1); }
}

/* ATC added state */
.pc__atc-btn--added {
  background: var(--color-success) !important;
  border-color: var(--color-success) !important;
  color: #fff !important;
}
.link-arrow {
  display: inline-flex;
  align-items: center;
  gap: var(--space-1);
  font-size: var(--text-sm);
  font-weight: var(--weight-medium);
  color: var(--color-text);
  transition: gap var(--duration-fast) var(--ease);
}
.link-arrow:hover { gap: var(--space-2); }
.link-arrow svg { transition: transform var(--duration-fast) var(--ease); }
.link-arrow:hover svg { transform: translateX(2px); }


@media(max-width: 568px) {
  .price--por {
    font-size: 14px;
  }
  .section-header {
  margin-bottom: var(--space-6);
}
}