/* ============================================================
   CraftyWorth v2 — Design Tokens & Base Reset
   Premium gifting platform · Editorial · Minimal · Fast
   ============================================================ */

:root {
  /* ── Brand Colors ── */
  --p:         #A0293E;   /* primary rose-maroon */
  --p-d:       #7A1E2F;   /* primary dark */
  --p-l:       #FCEEF1;   /* primary light tint */
  --a:         #E8651A;   /* accent saffron */
  --a-d:       #C04E0E;   /* accent dark */

  /* ── Neutral Palette ── */
  --white:     #FFFFFF;
  --off:       #FEF7F0;   /* barely-peach surface */
  --ink:       #1A1208;   /* near-black */
  --ink-2:     #3D2E20;   /* secondary text */
  --ink-3:     #7A6458;   /* muted text */
  --line:      #EAD9CC;   /* border */
  --line-soft: #F2E8DE;   /* subtle border */

  /* ── Typography ── */
  --head: 'Fraunces', Georgia, 'Times New Roman', serif;
  --body: 'Manrope', system-ui, -apple-system, sans-serif;

  /* ── Spacing Scale ── */
  --s1:  4px;  --s2:  8px;  --s3: 12px;  --s4: 16px;
  --s5: 20px;  --s6: 24px;  --s8: 32px;  --s10: 40px;
  --s12: 48px; --s16: 64px; --s20: 80px; --s24: 96px;

  /* ── Layout ── */
  --max:  1280px;   /* container max-width */
  --px:   40px;     /* container horizontal padding */

  /* ── Radius ── */
  --r:    10px;   /* default */
  --r-lg: 18px;   /* card */
  --r-xl: 24px;   /* modal/panel */
  --pill: 999px;  /* pill shape */

  /* ── Shadows ── */
  --sh-1: 0 2px 8px rgba(160,41,62,.06);
  --sh-2: 0 8px 24px rgba(160,41,62,.10);
  --sh-3: 0 16px 40px rgba(160,41,62,.14);

  /* ── Transitions ── */
  --t:    .2s ease;
  --t-lg: .35s ease;

  /* ── Section spacing ── */
  --sec: 80px;
}

/* ── Reset ── */
*, *::before, *::after { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
html { -webkit-text-size-adjust: 100%; overflow-x: hidden; }
img, video, iframe, svg, canvas { max-width: 100%; display: block; height: auto; }
button { font-family: inherit; cursor: pointer; }
a { color: inherit; text-decoration: none; }
table { border-collapse: collapse; max-width: 100%; }

/* ── Base ── */
body {
  font-family: var(--body);
  font-size: 15px;
  line-height: 1.65;
  color: var(--ink);
  background: var(--white);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}

h1, h2, h3, h4, h5, h6 {
  font-family: var(--head);
  font-weight: 500;
  line-height: 1.12;
  letter-spacing: -.015em;
  margin: 0;
}

h1 { font-size: clamp(32px, 5vw, 60px); }
h2 { font-size: clamp(24px, 3.5vw, 42px); }
h3 { font-size: clamp(18px, 2.5vw, 28px); }
h4 { font-size: clamp(16px, 2vw, 22px); }
h5 { font-size: 16px; }
h6 { font-size: 13px; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; font-family: var(--body); }

p { margin: 0; }

/* ── Container ── */
.cw-container {
  max-width: var(--max);
  margin: 0 auto;
  padding: 0 var(--px);
}

/* ── Section ── */
.cw-section {
  padding: var(--sec) 0;
}
.cw-section--sm  { padding: 48px 0; }
.cw-section--off { background: var(--off); }

/* ── Section header ── */
.cw-sh {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: var(--s6);
  margin-bottom: var(--s8);
  flex-wrap: wrap;
}
.cw-sh__eyebrow {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .28em;
  text-transform: uppercase;
  color: var(--p);
  margin-bottom: var(--s2);
}
.cw-sh__title { font-size: clamp(22px, 3vw, 36px); }
.cw-sh__sub   { font-size: 15px; color: var(--ink-3); margin-top: var(--s2); max-width: 520px; }
.cw-sh__more  {
  font-size: 13px;
  font-weight: 600;
  color: var(--p);
  display: inline-flex;
  align-items: center;
  gap: 6px;
  border-bottom: 1px solid currentColor;
  padding-bottom: 2px;
  white-space: nowrap;
  flex-shrink: 0;
}

/* ── Buttons ── */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--s2);
  height: 48px;
  padding: 0 var(--s6);
  border-radius: var(--pill);
  font-family: var(--body);
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  border: 0;
  white-space: nowrap;
  transition: transform var(--t), box-shadow var(--t), background var(--t);
  line-height: 1;
}
.btn:hover { transform: translateY(-1px); box-shadow: var(--sh-2); }
.btn--primary { background: var(--p); color: #fff; }
.btn--primary:hover { background: var(--p-d); }
.btn--accent  { background: var(--a); color: #fff; }
.btn--accent:hover { background: var(--a-d); }
.btn--ghost   { background: transparent; color: var(--p); border: 1.5px solid var(--p); }
.btn--ghost:hover { background: var(--p-l); }
.btn--dark    { background: var(--ink); color: #fff; }
.btn--outline-light { background: transparent; color: #fff; border: 1.5px solid rgba(255,255,255,.4); }
.btn--outline-light:hover { border-color: #fff; background: rgba(255,255,255,.1); }
.btn--sm      { height: 38px; padding: 0 var(--s4); font-size: 13px; }
.btn--lg      { height: 56px; padding: 0 var(--s8); font-size: 15px; }
.btn--full    { width: 100%; }

/* ── Eyebrow tag ── */
.eyebrow {
  display: inline-block;
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: .26em;
  text-transform: uppercase;
  color: var(--p);
}

/* ── Responsive ── */
@media (max-width: 1024px) {
  :root { --px: 24px; --sec: 64px; }
}
@media (max-width: 640px) {
  :root { --px: 16px; --sec: 48px; }
  .cw-sh { flex-direction: column; align-items: flex-start; margin-bottom: var(--s6); }
}

/* ── Global Mobile Safety ── */
html, body {
  overflow-x: hidden;
  max-width: 100%;
}
*, *::before, *::after {
  min-width: 0;
}
img, video, iframe, embed, object {
  max-width: 100%;
  height: auto;
}
.cw-container, .cw-wrap {
  width: 100%;
  max-width: var(--max, 1280px);
  margin-left: auto;
  margin-right: auto;
  padding-left: var(--px, 40px);
  padding-right: var(--px, 40px);
}
/* WooCommerce global fixes */
.woocommerce, .woocommerce-page {
  max-width: 100%;
  overflow-x: hidden;
}
.woocommerce ul.products,
ul.products {
  display: grid !important;
  grid-template-columns: repeat(var(--cw-card-cols, 4), minmax(0, 1fr));
  gap: 20px;
  margin: 0 !important;
  padding: 0 !important;
  list-style: none !important;
}
.woocommerce ul.products li.product,
ul.products li.product {
  width: auto !important;
  float: none !important;
  margin: 0 !important;
  padding: 0 !important;
}
@media (max-width: 1024px) {
  .woocommerce ul.products, ul.products {
    grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
    gap: 16px;
  }
}
@media (max-width: 640px) {
  .woocommerce ul.products, ul.products {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    gap: 10px;
    padding: 0 !important;
  }
}
