﻿/* Ladivelle Accents :: frontend\css\style.css */
/* ============================================================
   Ladivelle Accents LLC - Design System
   Warm, minimal, editorial. Small-batch home decoration.
   ============================================================ */

/* ---------- Tokens ---------- */
:root {
  /* Palette — warm neutrals + copper accent */
  --clr-bg:          #faf7f3;
  --clr-bg-alt:      #f5f1ec;
  --clr-surface:     #ffffff;
  --clr-border:      #e5e0da;
  --clr-border-soft: #f0ebe5;

  --clr-text:        #2b2b2b;
  --clr-text-soft:   #4a4a4a;
  --clr-text-muted:  #7a7a7a;

  --clr-primary:     #7c5c4a;
  --clr-primary-dk:  #5f4536;
  --clr-primary-lt:  #a98974;
  --clr-accent:      #c9a875;
  --clr-success:     #4d7c5c;
  --clr-danger:      #b0473e;
  --clr-warning:     #c08a2e;

  /* Typography */
  --font-body:    'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --font-display: 'Cormorant Garamond', Georgia, 'Times New Roman', serif;
  --fs-xs:  0.75rem;
  --fs-sm:  0.875rem;
  --fs-md:  1rem;
  --fs-lg:  1.125rem;
  --fs-xl:  1.375rem;
  --fs-2xl: 1.75rem;
  --fs-3xl: 2.25rem;
  --fs-4xl: 3rem;

  /* Spacing */
  --sp-1: 0.25rem;
  --sp-2: 0.5rem;
  --sp-3: 0.75rem;
  --sp-4: 1rem;
  --sp-5: 1.5rem;
  --sp-6: 2rem;
  --sp-7: 3rem;
  --sp-8: 4rem;
  --sp-9: 6rem;

  /* Layout */
  --container-max: 1200px;
  --container-pad: 1.25rem;
  --radius-sm: 6px;
  --radius:    10px;
  --radius-lg: 16px;
  --radius-pill: 999px;

  /* Shadow */
  --shadow-xs: 0 1px 2px rgba(43, 43, 43, 0.04);
  --shadow-sm: 0 2px 6px rgba(43, 43, 43, 0.06);
  --shadow:    0 4px 16px rgba(43, 43, 43, 0.08);
  --shadow-lg: 0 12px 40px rgba(43, 43, 43, 0.12);

  /* Motion */
  --ease: cubic-bezier(0.4, 0, 0.2, 1);
  --dur-fast: 150ms;
  --dur:      250ms;
  --dur-slow: 400ms;

  /* Header height */
  --header-h: 72px;
}

/* ---------- Reset ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: var(--font-body);
  font-size: var(--fs-md);
  line-height: 1.6;
  color: var(--clr-text);
  background: var(--clr-bg);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}
img, picture, svg { max-width: 100%; display: block; height: auto; }
a { color: var(--clr-primary); text-decoration: none; transition: color var(--dur-fast) var(--ease); }
a:hover { color: var(--clr-primary-dk); }
button { font-family: inherit; cursor: pointer; border: none; background: none; }
input, textarea, select { font-family: inherit; font-size: inherit; }
ul, ol { list-style: none; margin: 0; padding: 0; }

/* ---------- Typography ---------- */
h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-display);
  font-weight: 600;
  line-height: 1.2;
  letter-spacing: -0.01em;
  margin: 0 0 var(--sp-4);
  color: var(--clr-text);
}
h1 { font-size: clamp(2rem, 5vw, 3rem); }
h2 { font-size: clamp(1.5rem, 3.5vw, 2.25rem); }
h3 { font-size: var(--fs-xl); }
h4 { font-size: var(--fs-lg); }
p  { margin: 0 0 var(--sp-4); }
small { font-size: var(--fs-sm); color: var(--clr-text-muted); }

/* ---------- Layout helpers ---------- */
.container {
  width: 100%;
  max-width: var(--container-max);
  margin-inline: auto;
  padding-inline: var(--container-pad);
}
.container-narrow { max-width: 720px; }
.container-wide   { max-width: 1440px; }
.stack > * + * { margin-top: var(--sp-4); }
.cluster { display: flex; gap: var(--sp-3); align-items: center; flex-wrap: wrap; }
.center { text-align: center; }
.grid { display: grid; gap: var(--sp-5); }

/* ---------- Header ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(250, 247, 243, 0.95);
  backdrop-filter: saturate(180%) blur(12px);
  border-bottom: 1px solid var(--clr-border-soft);
  height: var(--header-h);
}
.site-header .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 100%;
  gap: var(--sp-5);
}
.brand {
  font-family: var(--font-display);
  font-size: var(--fs-xl);
  font-weight: 600;
  color: var(--clr-text);
  letter-spacing: 0.02em;
  flex-shrink: 0;
}
.brand:hover { color: var(--clr-primary); }
.brand span { color: var(--clr-primary); font-style: italic; }

.nav-main {
  display: flex;
  gap: var(--sp-5);
  align-items: center;
}
.nav-main a {
  color: var(--clr-text-soft);
  font-size: var(--fs-sm);
  font-weight: 500;
  letter-spacing: 0.02em;
  position: relative;
  padding: var(--sp-2) 0;
}
.nav-main a:hover,
.nav-main a.is-active { color: var(--clr-primary); }
.nav-main a.is-active::after {
  content: '';
  position: absolute;
  left: 0; right: 0; bottom: -2px;
  height: 2px;
  background: var(--clr-primary);
  border-radius: 2px;
}

.nav-actions { display: flex; align-items: center; gap: var(--sp-3); }

.cart-btn {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: var(--sp-2);
  padding: var(--sp-2) var(--sp-3);
  border-radius: var(--radius-pill);
  background: transparent;
  border: 1px solid var(--clr-border);
  color: var(--clr-text);
  font-size: var(--fs-sm);
  font-weight: 500;
  transition: all var(--dur-fast) var(--ease);
}
.cart-btn:hover { border-color: var(--clr-primary); color: var(--clr-primary); }
.cart-count {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 20px;
  height: 20px;
  padding: 0 6px;
  background: var(--clr-primary);
  color: #fff;
  border-radius: var(--radius-pill);
  font-size: 11px;
  font-weight: 600;
}
.cart-count[data-count="0"] { display: none; }

.nav-toggle {
  display: none;
  width: 40px; height: 40px;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius);
  color: var(--clr-text);
}
.nav-toggle:hover { background: var(--clr-bg-alt); }

/* ---------- Hero ---------- */
.hero {
  padding: var(--sp-8) 0 var(--sp-7);
  text-align: center;
}
.hero-eyebrow {
  display: inline-block;
  font-size: var(--fs-xs);
  font-weight: 500;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--clr-primary);
  margin-bottom: var(--sp-4);
}
.hero h1 { max-width: 780px; margin-inline: auto; }
.hero p {
  max-width: 560px;
  margin: var(--sp-4) auto var(--sp-6);
  color: var(--clr-text-soft);
  font-size: var(--fs-lg);
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--sp-2);
  padding: var(--sp-3) var(--sp-5);
  font-size: var(--fs-sm);
  font-weight: 600;
  letter-spacing: 0.02em;
  border-radius: var(--radius-pill);
  transition: all var(--dur) var(--ease);
  border: 1px solid transparent;
  white-space: nowrap;
  cursor: pointer;
}
.btn-primary {
  background: var(--clr-primary);
  color: #fff;
  border-color: var(--clr-primary);
}
.btn-primary:hover {
  background: var(--clr-primary-dk);
  border-color: var(--clr-primary-dk);
  color: #fff;
  transform: translateY(-1px);
  box-shadow: var(--shadow-sm);
}
.btn-outline {
  background: transparent;
  color: var(--clr-primary);
  border-color: var(--clr-primary);
}
.btn-outline:hover {
  background: var(--clr-primary);
  color: #fff;
}
.btn-ghost {
  background: transparent;
  color: var(--clr-text);
  border-color: var(--clr-border);
}
.btn-ghost:hover {
  border-color: var(--clr-primary);
  color: var(--clr-primary);
}
.btn-lg { padding: var(--sp-4) var(--sp-6); font-size: var(--fs-md); }
.btn-sm { padding: var(--sp-2) var(--sp-4); font-size: var(--fs-xs); }
.btn-block { width: 100%; }
.btn:disabled,
.btn[disabled] {
  opacity: 0.5;
  cursor: not-allowed;
  transform: none !important;
}

/* ---------- Cards ---------- */
.card {
  background: var(--clr-surface);
  border: 1px solid var(--clr-border-soft);
  border-radius: var(--radius);
  overflow: hidden;
  transition: transform var(--dur) var(--ease), box-shadow var(--dur) var(--ease);
}
.card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow);
}
.card-body { padding: var(--sp-4); }

/* ---------- Product grid ---------- */
.product-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: var(--sp-5);
  margin-bottom: 25px;
}
.product-card {
  display: flex;
  flex-direction: column;
  background: var(--clr-surface);
  border: 1px solid var(--clr-border-soft);
  border-radius: var(--radius);
  overflow: hidden;
  transition: transform var(--dur) var(--ease), box-shadow var(--dur) var(--ease);
  position: relative;
}
.product-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow);
}
.product-media {
  aspect-ratio: 1 / 1;
  background: var(--clr-bg-alt);
  overflow: hidden;
  position: relative;
}
.product-media img {
  width: 100%; height: 100%;
  object-fit: cover;
  transition: transform var(--dur-slow) var(--ease);
}
.product-card:hover .product-media img { transform: scale(1.05); }

.product-badge {
  position: absolute;
  top: var(--sp-3);
  left: var(--sp-3);
  padding: 4px 10px;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  background: var(--clr-primary);
  color: #fff;
  border-radius: var(--radius-pill);
}
.product-badge.badge-low { background: var(--clr-warning); }
.product-badge.badge-out { background: var(--clr-text-muted); }

.product-info {
  padding: var(--sp-4);
  display: flex;
  flex-direction: column;
  gap: var(--sp-2);
  flex: 1;
}
.product-cat {
  font-size: var(--fs-xs);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--clr-text-muted);
}
.product-name {
  font-family: var(--font-display);
  font-size: var(--fs-lg);
  font-weight: 600;
  line-height: 1.3;
  margin: 0;
  color: var(--clr-text);
}
.product-name a { color: inherit; }
.product-price {
  font-size: var(--fs-md);
  font-weight: 600;
  color: var(--clr-primary);
  margin-top: auto;
}
.product-actions {
  display: flex;
  gap: var(--sp-2);
  margin-top: var(--sp-3);
}

/* ---------- Forms ---------- */
.form-group { margin-bottom: var(--sp-4); }
.form-label {
  display: block;
  font-size: var(--fs-sm);
  font-weight: 500;
  color: var(--clr-text-soft);
  margin-bottom: var(--sp-2);
}
.form-label .req { color: var(--clr-danger); margin-left: 2px; }
.form-control {
  width: 100%;
  padding: var(--sp-3) var(--sp-4);
  font-size: var(--fs-md);
  color: var(--clr-text);
  background: var(--clr-surface);
  border: 1px solid var(--clr-border);
  border-radius: var(--radius);
  transition: border-color var(--dur-fast) var(--ease), box-shadow var(--dur-fast) var(--ease);
}
.form-control:focus {
  outline: none;
  border-color: var(--clr-primary);
  box-shadow: 0 0 0 3px rgba(124, 92, 74, 0.12);
}
.form-control::placeholder { color: #a8a29c; }
textarea.form-control { min-height: 120px; resize: vertical; }
.form-row { display: grid; gap: var(--sp-4); grid-template-columns: 1fr 1fr; }
.form-hint { font-size: var(--fs-xs); color: var(--clr-text-muted); margin-top: var(--sp-1); }
.form-error { font-size: var(--fs-xs); color: var(--clr-danger); margin-top: var(--sp-1); }
.form-control.is-invalid { border-color: var(--clr-danger); }

/* ---------- Cart ---------- */
.cart-layout {
  display: grid;
  grid-template-columns: 1fr 360px;
  gap: var(--sp-6);
  align-items: start;
}
.cart-items { display: flex; flex-direction: column; gap: var(--sp-4); }
.cart-item {
  display: grid;
  grid-template-columns: 96px 1fr auto;
  gap: var(--sp-4);
  padding: var(--sp-4);
  background: var(--clr-surface);
  border: 1px solid var(--clr-border-soft);
  border-radius: var(--radius);
  align-items: center;
}
.cart-item-media {
  width: 96px; height: 96px;
  background: var(--clr-bg-alt);
  border-radius: var(--radius-sm);
  overflow: hidden;
}
.cart-item-media img { width: 100%; height: 100%; object-fit: cover; }
.cart-item-info h4 {
  font-size: var(--fs-md);
  margin: 0 0 var(--sp-1);
  font-family: var(--font-display);
}
.cart-item-cat { font-size: var(--fs-xs); color: var(--clr-text-muted); text-transform: uppercase; letter-spacing: 0.05em; }
.cart-item-price { font-weight: 600; color: var(--clr-primary); margin-top: var(--sp-2); }
.qty-control {
  display: inline-flex;
  align-items: center;
  border: 1px solid var(--clr-border);
  border-radius: var(--radius-pill);
  overflow: hidden;
}
.qty-control button {
  width: 32px; height: 32px;
  font-size: var(--fs-lg);
  color: var(--clr-text-soft);
  transition: background var(--dur-fast) var(--ease);
}
.qty-control button:hover { background: var(--clr-bg-alt); color: var(--clr-primary); }
.qty-control input {
  width: 40px;
  text-align: center;
  border: none;
  background: transparent;
  font-weight: 600;
  color: var(--clr-text);
  -moz-appearance: textfield;
}
.qty-control input::-webkit-outer-spin-button,
.qty-control input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.cart-item-remove {
  color: var(--clr-text-muted);
  font-size: var(--fs-xs);
  text-decoration: underline;
  margin-top: var(--sp-2);
}
.cart-item-remove:hover { color: var(--clr-danger); }

/* ---------- Summary ---------- */
.summary {
  position: sticky;
  top: calc(var(--header-h) + var(--sp-5));
  padding: var(--sp-5);
  background: var(--clr-surface);
  border: 1px solid var(--clr-border-soft);
  border-radius: var(--radius);
}
.summary h3 {
  font-family: var(--font-display);
  font-size: var(--fs-xl);
  margin: 0 0 var(--sp-4);
}
.summary-row {
  display: flex;
  justify-content: space-between;
  padding: var(--sp-2) 0;
  font-size: var(--fs-sm);
  color: var(--clr-text-soft);
}
.summary-row.total {
  padding-top: var(--sp-4);
  margin-top: var(--sp-3);
  border-top: 1px solid var(--clr-border);
  font-size: var(--fs-lg);
  font-weight: 600;
  color: var(--clr-text);
}
.summary-row.total span:last-child { color: var(--clr-primary); }
.summary-free { color: var(--clr-success); font-weight: 600; }
.summary-note {
  font-size: var(--fs-xs);
  color: var(--clr-text-muted);
  margin-top: var(--sp-3);
  padding: var(--sp-3);
  background: var(--clr-bg-alt);
  border-radius: var(--radius-sm);
  text-align: center;
}

/* ---------- Alerts ---------- */
.alert {
  padding: var(--sp-3) var(--sp-4);
  border-radius: var(--radius);
  font-size: var(--fs-sm);
  margin-bottom: var(--sp-4);
  border: 1px solid transparent;
}
.alert-info    { background: #f0f4f8; border-color: #c8d8e6; color: #2c4a63; }
.alert-success { background: #eef6f0; border-color: #c8e0d0; color: #2d5940; }
.alert-warning { background: #fdf6e7; border-color: #f0dcb0; color: #7a5a1a; }
.alert-danger  { background: #fbeeee; border-color: #eecaca; color: #832420; }

/* ---------- Footer ---------- */
.site-footer {
  margin-top: 40px;
  padding: var(--sp-7) 0 var(--sp-5);
  background: var(--clr-bg-alt);
  border-top: 1px solid var(--clr-border-soft);
  font-size: var(--fs-sm);
  color: var(--clr-text-soft);
}
.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: var(--sp-6);
  margin-bottom: var(--sp-6);
}
.footer-brand {
  font-family: var(--font-display);
  font-size: var(--fs-xl);
  color: var(--clr-text);
  margin-bottom: var(--sp-3);
}
.footer-brand span { color: var(--clr-primary); font-style: italic; }
.footer-col h4 {
  font-family: var(--font-body);
  font-size: var(--fs-xs);
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--clr-text-muted);
  margin: 0 0 var(--sp-3);
}
.footer-col ul { display: flex; flex-direction: column; gap: var(--sp-2); }
.footer-col a { color: var(--clr-text-soft); font-size: var(--fs-sm); }
.footer-col a:hover { color: var(--clr-primary); }
.footer-bottom {
  padding-top: var(--sp-5);
  border-top: 1px solid var(--clr-border);
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: var(--sp-3);
  font-size: var(--fs-xs);
  color: var(--clr-text-muted);
}

/* ---------- Utilities ---------- */
.text-muted { color: var(--clr-text-muted); }
.text-center { text-align: center; }
.mt-0 { margin-top: 0; }
.mt-4 { margin-top: var(--sp-4); }
.mt-5 { margin-top: var(--sp-5); }
.mt-6 { margin-top: var(--sp-6); }
.mb-0 { margin-bottom: 0; }
.mb-4 { margin-bottom: var(--sp-4); }
.mb-5 { margin-bottom: var(--sp-5); }
.mb-6 { margin-bottom: var(--sp-6); }
.hidden { display: none !important; }
.spinner {
  width: 20px; height: 20px;
  border: 2px solid rgba(255, 255, 255, 0.3);
  border-top-color: #fff;
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
  display: inline-block;
}
@keyframes spin { to { transform: rotate(360deg); } }