/* ============================================================
  BLACK WOOD — Premium Fashion E-Commerce
   base.css — Design Tokens, Reset, Typography, Utilities
   ============================================================ */

@import url('https://fonts.googleapis.com/css2?family=Playfair+Display:ital,wght@0,400;0,500;0,600;0,700;1,400;1,600&family=Inter:wght@300;400;500;600;700&display=swap');

/* ===== DESIGN TOKENS ===== */
:root {
  /* Core Palette */
  --clr-black:        #0a0a0a;
  --clr-charcoal:     #1c1c1c;
  --clr-white:        #ffffff;
  --clr-off-white:    #fafaf8;
  --clr-beige:        #f2ebe0;
  --clr-beige-mid:    #e4d9c8;
  --clr-beige-dark:   #c9b89e;
  --clr-tan:          #b0957a;
  --clr-accent:       #8b6f47;
  --clr-accent-hover: #6e5738;
  --clr-gray-100:     #f5f5f3;
  --clr-gray-200:     #ebebea;
  --clr-gray-300:     #d8d8d5;
  --clr-gray-400:     #b5b5b0;
  --clr-gray-500:     #8a8a84;
  --clr-gray-600:     #5a5a55;
  --clr-gray-700:     #3a3a36;
  --clr-star:         #d4a843;
  --clr-success:      #2e7d56;
  --clr-error:        #c0392b;
  --clr-wa-green:     #25D366;

  /* Text */
  --text-primary:     var(--clr-black);
  --text-secondary:   var(--clr-gray-600);
  --text-muted:       var(--clr-gray-500);
  --text-light:       var(--clr-gray-400);
  --text-inverse:     var(--clr-white);

  /* Backgrounds */
  --bg-page:          var(--clr-off-white);
  --bg-surface:       var(--clr-white);
  --bg-subtle:        var(--clr-gray-100);
  --bg-dark:          var(--clr-black);

  /* Borders */
  --border-light:     var(--clr-gray-200);
  --border-base:      var(--clr-gray-300);
  --border-dark:      var(--clr-gray-400);

  /* Fonts */
  --font-display:     'Playfair Display', Georgia, 'Times New Roman', serif;
  --font-body:        'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;

  /* Font Sizes */
  --fs-10: 0.625rem;
  --fs-11: 0.6875rem;
  --fs-12: 0.75rem;
  --fs-13: 0.8125rem;
  --fs-14: 0.875rem;
  --fs-16: 1rem;
  --fs-18: 1.125rem;
  --fs-20: 1.25rem;
  --fs-22: 1.375rem;
  --fs-24: 1.5rem;
  --fs-28: 1.75rem;
  --fs-32: 2rem;
  --fs-36: 2.25rem;
  --fs-42: 2.625rem;
  --fs-48: 3rem;
  --fs-56: 3.5rem;
  --fs-64: 4rem;
  --fs-72: 4.5rem;
  --fs-80: 5rem;

  /* Spacing (8px base) */
  --sp-1:  0.25rem;
  --sp-2:  0.5rem;
  --sp-3:  0.75rem;
  --sp-4:  1rem;
  --sp-5:  1.25rem;
  --sp-6:  1.5rem;
  --sp-8:  2rem;
  --sp-10: 2.5rem;
  --sp-12: 3rem;
  --sp-14: 3.5rem;
  --sp-16: 4rem;
  --sp-20: 5rem;
  --sp-24: 6rem;
  --sp-28: 7rem;
  --sp-32: 8rem;
  --sp-40: 10rem;

  /* Border Radius */
  --r-xs:   2px;
  --r-sm:   4px;
  --r-md:   6px;
  --r-lg:   10px;
  --r-xl:   16px;
  --r-2xl:  24px;
  --r-full: 9999px;

  /* Shadows */
  --sh-xs:  0 1px 2px rgba(0,0,0,0.06);
  --sh-sm:  0 2px 8px rgba(0,0,0,0.08);
  --sh-md:  0 4px 16px rgba(0,0,0,0.10);
  --sh-lg:  0 8px 32px rgba(0,0,0,0.12);
  --sh-xl:  0 16px 48px rgba(0,0,0,0.16);
  --sh-2xl: 0 24px 64px rgba(0,0,0,0.20);

  /* Transitions */
  --tr-fast:   150ms ease;
  --tr-base:   250ms ease;
  --tr-slow:   400ms ease;
  --tr-bounce: 300ms cubic-bezier(0.34, 1.56, 0.64, 1);

  /* Z-index layers */
  --z-base:     1;
  --z-raised:   10;
  --z-dropdown: 100;
  --z-sticky:   200;
  --z-overlay:  300;
  --z-modal:    400;
  --z-toast:    500;
  --z-float:    600;

  /* Layout */
  --container-max:  1440px;
  --container-pad:  clamp(1rem, 4vw, 2rem);
  --navbar-h:       80px;
  --navbar-h-sm:    64px;
}

/* ===== RESET ===== */
*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
  font-size: 16px;
  -webkit-text-size-adjust: 100%;
  text-rendering: optimizeLegibility;
}

body {
  font-family: var(--font-body);
  font-size: var(--fs-16);
  line-height: 1.65;
  color: var(--text-primary);
  background-color: var(--bg-page);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
  min-height: 100vh;
}

body.no-scroll { overflow: hidden; }

img, picture, video, canvas, svg {
  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;
  font-size: inherit;
  color: inherit;
}

input, select, textarea {
  font-family: inherit;
  font-size: inherit;
  color: inherit;
}

ul, ol { list-style: none; }

table { border-collapse: collapse; }

/* ===== TYPOGRAPHY ===== */
h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-display);
  font-weight: 600;
  line-height: 1.15;
  color: var(--text-primary);
  letter-spacing: -0.01em;
}

h1 { font-size: clamp(var(--fs-42), 7vw, var(--fs-80)); }
h2 { font-size: clamp(var(--fs-32), 5vw, var(--fs-56)); }
h3 { font-size: clamp(var(--fs-24), 3.5vw, var(--fs-42)); }
h4 { font-size: clamp(var(--fs-20), 2.5vw, var(--fs-32)); }
h5 { font-size: var(--fs-20); }
h6 { font-size: var(--fs-18); }

p { color: var(--text-secondary); line-height: 1.75; }

strong, b { font-weight: 600; }

small { font-size: var(--fs-13); }

/* ===== UTILITIES ===== */
.container {
  max-width: var(--container-max);
  margin: 0 auto;
  padding: 0 var(--container-pad);
  width: 100%;
}

.section-py  { padding-top: clamp(var(--sp-12), 8vw, var(--sp-24)); padding-bottom: clamp(var(--sp-12), 8vw, var(--sp-24)); }
.section-pt  { padding-top: clamp(var(--sp-12), 8vw, var(--sp-24)); }
.section-pb  { padding-bottom: clamp(var(--sp-12), 8vw, var(--sp-24)); }

.text-center { text-align: center; }
.text-left   { text-align: left; }
.text-right  { text-align: right; }

.fw-300 { font-weight: 300; }
.fw-400 { font-weight: 400; }
.fw-500 { font-weight: 500; }
.fw-600 { font-weight: 600; }
.fw-700 { font-weight: 700; }

.italic { font-style: italic; }
.uppercase { text-transform: uppercase; letter-spacing: 0.08em; }
.tracking-wide { letter-spacing: 0.06em; }

.text-accent   { color: var(--clr-accent); }
.text-muted    { color: var(--text-muted); }
.text-inverse  { color: var(--text-inverse); }
.text-success  { color: var(--clr-success); }
.text-error    { color: var(--clr-error); }

.d-none    { display: none; }
.d-flex    { display: flex; }
.d-grid    { display: grid; }
.d-block   { display: block; }
.d-inline  { display: inline; }

.flex-col      { flex-direction: column; }
.align-center  { align-items: center; }
.align-start   { align-items: flex-start; }
.align-end     { align-items: flex-end; }
.justify-center { justify-content: center; }
.justify-between { justify-content: space-between; }
.justify-end   { justify-content: flex-end; }
.flex-wrap     { flex-wrap: wrap; }
.flex-1        { flex: 1; }

.gap-1  { gap: var(--sp-1); }
.gap-2  { gap: var(--sp-2); }
.gap-3  { gap: var(--sp-3); }
.gap-4  { gap: var(--sp-4); }
.gap-6  { gap: var(--sp-6); }
.gap-8  { gap: var(--sp-8); }
.gap-12 { gap: var(--sp-12); }

.w-full    { width: 100%; }
.h-full    { height: 100%; }
.min-h-screen { min-height: 100vh; }

.overflow-hidden { overflow: hidden; }
.relative  { position: relative; }
.absolute  { position: absolute; }
.fixed     { position: fixed; }
.sticky    { position: sticky; }
.inset-0   { inset: 0; }

.rounded      { border-radius: var(--r-md); }
.rounded-lg   { border-radius: var(--r-lg); }
.rounded-xl   { border-radius: var(--r-xl); }
.rounded-full { border-radius: var(--r-full); }

.shadow-sm { box-shadow: var(--sh-sm); }
.shadow-md { box-shadow: var(--sh-md); }
.shadow-lg { box-shadow: var(--sh-lg); }

.pointer { cursor: pointer; }

.transition { transition: all var(--tr-base); }

/* Price styles */
.price-wrap {
  display: flex;
  align-items: baseline;
  flex-wrap: wrap;
  gap: var(--sp-2);
}
.price-current {
  font-size: var(--fs-20);
  font-weight: 700;
  color: var(--text-primary);
  letter-spacing: -0.02em;
}
.price-original {
  font-size: var(--fs-14);
  color: var(--text-muted);
  text-decoration: line-through;
  font-weight: 400;
}
.price-off {
  font-size: var(--fs-12);
  color: var(--clr-success);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

/* Rating */
.rating-row {
  display: flex;
  align-items: center;
  gap: var(--sp-2);
}
.stars {
  display: inline-flex;
  gap: 1px;
  color: var(--clr-star);
  font-size: var(--fs-13);
  line-height: 1;
}
.rating-count {
  font-size: var(--fs-12);
  color: var(--text-muted);
}

/* Badges */
.badge {
  display: inline-flex;
  align-items: center;
  padding: 3px 10px;
  border-radius: var(--r-full);
  font-size: var(--fs-10);
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  white-space: nowrap;
  line-height: 1.6;
}
.badge-sale   { background: var(--clr-black); color: var(--clr-white); }
.badge-new    { background: var(--clr-accent); color: var(--clr-white); }
.badge-best   { background: var(--clr-beige-dark); color: var(--clr-accent-hover); }
.badge-out    { background: var(--clr-gray-300); color: var(--clr-gray-600); }

/* Label */
.label {
  display: block;
  font-size: var(--fs-11);
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: var(--sp-2);
}

/* Section Header */
.section-header {
  text-align: center;
  margin-bottom: clamp(var(--sp-8), 5vw, var(--sp-16));
}
.section-eyebrow {
  font-size: var(--fs-11);
  font-weight: 600;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--clr-accent);
  margin-bottom: var(--sp-3);
  display: block;
}
.section-title {
  font-family: var(--font-display);
  font-size: clamp(var(--fs-28), 4vw, var(--fs-48));
  font-weight: 600;
  color: var(--text-primary);
  line-height: 1.15;
}
.section-desc {
  font-size: var(--fs-16);
  color: var(--text-secondary);
  max-width: 540px;
  margin: var(--sp-4) auto 0;
  line-height: 1.75;
}

/* Divider */
.divider {
  border: none;
  border-top: 1px solid var(--border-light);
  margin: var(--sp-8) 0;
}

/* WhatsApp Float Button */
.wa-float {
  position: fixed;
  bottom: var(--sp-8);
  right: var(--sp-8);
  width: 58px;
  height: 58px;
  background: var(--clr-wa-green);
  border-radius: var(--r-full);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: var(--z-float);
  box-shadow: 0 4px 20px rgba(37, 211, 102, 0.38);
  animation: wa-pulse 2.8s ease-in-out infinite;
  transition: transform var(--tr-base), box-shadow var(--tr-base);
  text-decoration: none;
}
.wa-float:hover {
  transform: scale(1.1);
  box-shadow: 0 6px 28px rgba(37, 211, 102, 0.55);
  animation-play-state: paused;
}
.wa-float svg {
  width: 28px;
  height: 28px;
  fill: #fff;
  flex-shrink: 0;
}
.wa-float .wa-tip {
  position: absolute;
  right: 68px;
  top: 50%;
  transform: translateY(-50%);
  background: var(--clr-black);
  color: var(--clr-white);
  font-size: var(--fs-13);
  font-weight: 500;
  padding: 7px 14px;
  border-radius: var(--r-sm);
  white-space: nowrap;
  opacity: 0;
  pointer-events: none;
  transition: opacity var(--tr-fast);
}
.wa-float .wa-tip::after {
  content: '';
  position: absolute;
  left: 100%;
  top: 50%;
  transform: translateY(-50%);
  border: 5px solid transparent;
  border-left-color: var(--clr-black);
}
.wa-float:hover .wa-tip { opacity: 1; }

/* Custom Scrollbar */
::-webkit-scrollbar { width: 5px; height: 5px; }
::-webkit-scrollbar-track { background: var(--bg-page); }
::-webkit-scrollbar-thumb { background: var(--clr-beige-dark); border-radius: var(--r-full); }
::-webkit-scrollbar-thumb:hover { background: var(--clr-accent); }

/* Selection */
::selection { background: var(--clr-accent); color: var(--clr-white); }

/* Focus Visible */
:focus-visible {
  outline: 2px solid var(--clr-accent);
  outline-offset: 3px;
}

/* Lazy Loading Placeholder */
img[data-src] {
  background: var(--clr-gray-100);
  min-height: 100px;
}

/* Screen Reader Only */
.sr-only {
  position: absolute;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden;
  clip: rect(0,0,0,0);
  white-space: nowrap;
  border: 0;
}
