/* ============================================================
   Wild Canvas — shared styles
   ============================================================ */

* { margin: 0; padding: 0; box-sizing: border-box; }

:root {
  --cream: #faf5e8;
  --cream-deep: #f1e9d6;
  --ink: #1c1812;
  --muted: #8a8270;
  --gold: #dba53f;
  --gold-deep: #b9852a;
  --rust: #c05a2c;
  --teal: #3f8f88;
  --forest: #3f5c42;
  --navy: #333e63;
  --plum: #7a4a68;
  --slate: #5c6b7a;

  --sidebar-w: 280px;
  --font-display: 'Poppins', sans-serif;
  --font-body: 'Poppins', sans-serif;
}

html { scroll-behavior: smooth; }

body {
  background: var(--cream);
  color: var(--ink);
  font-family: var(--font-body);
  min-height: 100vh;
}

img { display: block; max-width: 100%; }

a { color: inherit; text-decoration: none; }

/* ── Sidebar toggle (always visible) ── */

.sidebar-toggle {
  position: fixed;
  top: 22px;
  left: calc(var(--sidebar-w) - 46px);
  z-index: 200;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  border: 2px solid var(--ink);
  background: var(--cream);
  cursor: pointer;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  transition: left 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.sidebar-toggle .arrow {
  width: 9px;
  height: 9px;
  border-left: 2px solid var(--ink);
  border-bottom: 2px solid var(--ink);
  transform: rotate(45deg);
  margin-left: 3px;
  transition: transform 0.3s ease;
}

body.sidebar-collapsed .sidebar-toggle { left: 16px; }
body.sidebar-collapsed .sidebar-toggle .arrow { transform: rotate(225deg); margin-left: -3px; }

/* ── Sidebar ── */

.sidebar {
  position: fixed;
  top: 0;
  left: 0;
  height: 100vh;
  width: var(--sidebar-w);
  background: var(--cream-deep);
  padding: 32px 22px 24px;
  display: flex;
  flex-direction: column;
  z-index: 150;
  transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  overflow-y: auto;
}

body.sidebar-collapsed .sidebar { transform: translateX(-100%); }

.sidebar-logo-link {
  display: block;
}

.sidebar-mark {
  width: 100%;
  max-width: 190px;
  height: auto;
  object-fit: contain;
  display: block;
  margin: 0 auto 12px;
}

.sidebar-tagline {
  text-align: center;
  font-family: var(--font-body);
  font-weight: 500;
  font-size: 13px;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: var(--gold);
  margin-bottom: 28px;
}

.sidebar-nav {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.nav-link {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 14.5px;
  letter-spacing: 0.4px;
  padding: 11px 12px;
  border-radius: 10px;
  color: var(--ink);
  transition: background 0.15s, color 0.15s, padding-left 0.15s;
}

.nav-link:hover { background: rgba(28, 24, 18, 0.06); padding-left: 16px; }

.nav-link.active {
  color: var(--gold-deep);
  background: rgba(219, 165, 63, 0.18);
}

.nav-group {
  margin: 6px 0;
}

.nav-group-label {
  display: block;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 11px;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  color: var(--ink);
  padding: 10px 12px 4px;
  transition: color 0.15s;
}

a.nav-group-label:hover,
a.nav-group-label.active { color: var(--gold-deep); }

.nav-sublink {
  display: block;
  font-family: var(--font-display);
  font-weight: 500;
  font-size: 13px;
  letter-spacing: 0.3px;
  color: var(--muted);
  padding: 7px 12px 7px 24px;
  border-radius: 10px;
  transition: background 0.15s, color 0.15s, padding-left 0.15s;
}

.nav-sublink:hover {
  background: rgba(28, 24, 18, 0.06);
  color: var(--ink);
  padding-left: 28px;
}

.sidebar-note {
  margin-top: auto;
  font-size: 11px;
  line-height: 1.6;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 1.5px;
  padding-top: 20px;
}

/* ── Main content ── */

.main {
  margin-left: var(--sidebar-w);
  min-height: 100vh;
  transition: margin-left 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  padding-bottom: 40px;
}

body.sidebar-collapsed .main { margin-left: 0; }

.page-header {
  position: relative;
  display: flex;
  justify-content: center;
  padding: 10px 20px 16px;
}

.cart-link {
  position: absolute;
  right: 20px;
  top: 50%;
  transform: translateY(-50%);
  display: flex;
  align-items: center;
  gap: 5px;
  color: var(--ink);
  text-decoration: none;
}

.cart-link:hover { color: var(--gold-deep); }

.cart-count {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 10.5px;
  background: var(--muted);
  color: #fff;
  min-width: 16px;
  height: 16px;
  border-radius: 999px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 4px;
}

.cart-link.has-items .cart-count { background: var(--gold-deep); }

.site-title {
  display: flex;
  flex-direction: row;
  align-items: baseline;
  gap: 14px;
}

.site-name {
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 14px;
  letter-spacing: 3px;
  text-transform: uppercase;
  color: var(--ink);
}

.site-subtitle {
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 14px;
  letter-spacing: 3px;
  text-transform: uppercase;
  color: var(--gold);
}

/* ── Banner ── */

.banner {
  position: relative;
  margin: 0;
  max-width: none;
  padding: 0;
}

.banner-frame {
  position: relative;
  border-radius: 0;
  overflow: hidden;
  background: var(--cream);
}

.banner-img {
  display: block;
  width: 100%;
  height: auto;
}

.banner-shade {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(20, 16, 10, 0.05) 0%, rgba(20, 16, 10, 0.55) 100%);
}

.banner-content {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  padding: 28px 34px 30px;
  color: var(--cream);
}

.banner-word {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 15px;
  letter-spacing: 4px;
  text-transform: uppercase;
  color: var(--gold);
  display: block;
  margin-bottom: 8px;
}

.banner-tagline {
  font-family: var(--font-display);
  font-weight: 500;
  font-size: clamp(20px, 3vw, 30px);
  max-width: 620px;
  line-height: 1.25;
}

/* ── Collections ── */

.collections {
  max-width: 1180px;
  margin: 0 auto;
  padding: 50px 24px 10px;
}

.collection { margin-bottom: 46px; }

.collection-head {
  display: flex;
  align-items: baseline;
  gap: 14px;
  border-bottom: 1.5px solid var(--ink);
  padding-bottom: 10px;
  margin-bottom: 20px;
}

.collection-head h2 {
  font-family: var(--font-display);
  font-weight: 500;
  font-size: 22px;
  letter-spacing: 0.5px;
  text-transform: uppercase;
}

.collection-count {
  font-size: 12px;
  color: var(--muted);
  font-weight: 500;
}

.collection[data-accent="gold"] .collection-head { border-bottom-color: var(--gold); }
.collection[data-accent="rust"] .collection-head { border-bottom-color: var(--rust); }
.collection[data-accent="teal"] .collection-head { border-bottom-color: var(--teal); }
.collection[data-accent="forest"] .collection-head { border-bottom-color: var(--forest); }
.collection[data-accent="navy"] .collection-head { border-bottom-color: var(--navy); }
.collection[data-accent="plum"] .collection-head { border-bottom-color: var(--plum); }
.collection[data-accent="slate"] .collection-head { border-bottom-color: var(--slate); }

.collection[data-accent="gold"] .collection-head h2 { color: var(--gold-deep); }
.collection[data-accent="rust"] .collection-head h2 { color: var(--rust); }
.collection[data-accent="teal"] .collection-head h2 { color: var(--teal); }
.collection[data-accent="forest"] .collection-head h2 { color: var(--forest); }
.collection[data-accent="navy"] .collection-head h2 { color: var(--navy); }
.collection[data-accent="plum"] .collection-head h2 { color: var(--plum); }
.collection[data-accent="slate"] .collection-head h2 { color: var(--slate); }

.collection-row {
  display: flex;
  align-items: flex-start;
  gap: 20px;
  overflow-x: auto;
  padding: 4px 4px 16px;
  scroll-snap-type: x proximity;
  scrollbar-width: none;
}

.collection-row::-webkit-scrollbar { display: none; }

.product-card {
  flex: 0 0 210px;
  scroll-snap-align: start;
  cursor: pointer;
}

.product-image {
  aspect-ratio: 1 / 1;
  border-radius: 0;
  border: none;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  transition: transform 0.18s ease;
}

.product-card:hover .product-image { transform: translateY(-4px); }

.product-image img {
  width: 46%;
  opacity: 0.22;
}

.product-image.has-photo {
  background: #fff;
}

.product-image.has-photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 1;
}

.collection[data-accent="gold"] .product-image,
.collection-accent-gold { background: rgba(219, 165, 63, 0.22); }
.collection[data-accent="rust"] .product-image,
.collection-accent-rust { background: rgba(192, 90, 44, 0.18); }
.collection[data-accent="teal"] .product-image,
.collection-accent-teal { background: rgba(63, 143, 136, 0.18); }
.collection[data-accent="forest"] .product-image,
.collection-accent-forest { background: rgba(63, 92, 66, 0.18); }
.collection[data-accent="navy"] .product-image,
.collection-accent-navy { background: rgba(51, 62, 99, 0.18); }
.collection[data-accent="plum"] .product-image,
.collection-accent-plum { background: rgba(122, 74, 104, 0.18); }
.collection[data-accent="slate"] .product-image,
.collection-accent-slate { background: rgba(92, 107, 122, 0.18); }

.product-name {
  font-family: var(--font-display);
  font-weight: 500;
  font-size: 13.5px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-top: 10px;
  color: var(--ink);
}

.add-to-cart-btn {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 10.5px;
  letter-spacing: 1px;
  text-transform: uppercase;
  background: var(--ink);
  color: var(--cream);
  border: none;
  padding: 7px 14px;
  border-radius: 999px;
  cursor: pointer;
  white-space: nowrap;
  transition: background 0.15s;
}

.add-to-cart-btn:hover { background: var(--gold-deep); }
.add-to-cart-btn.added { background: var(--forest); }

/* ── Simple pages (About / Intake) ── */

.page-content {
  max-width: 720px;
  margin: 0 auto;
  padding: 10px 24px 60px;
}

.page-content h1 {
  font-family: var(--font-display);
  font-size: 34px;
  margin-bottom: 16px;
}

.page-content p {
  line-height: 1.7;
  color: var(--ink);
  margin-bottom: 14px;
}

.placeholder-badge {
  display: inline-block;
  font-family: var(--font-display);
  font-size: 11px;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  color: var(--gold-deep);
  background: rgba(219, 165, 63, 0.18);
  padding: 6px 14px;
  border-radius: 999px;
  margin-bottom: 20px;
}

/* ── Order form ── */

.order-form {
  display: flex;
  flex-direction: column;
  gap: 20px;
  margin-top: 24px;
}

.form-field {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.form-field label {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 11px;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  color: var(--muted);
}

.form-field input,
.form-field select {
  font-family: var(--font-body);
  font-size: 14px;
  padding: 10px 12px;
  border: 1.5px solid rgba(28, 24, 18, 0.18);
  border-radius: 10px;
  background: #fff;
  color: var(--ink);
}

.form-field input:focus,
.form-field select:focus {
  outline: none;
  border-color: var(--gold);
}

.order-items {
  display: flex;
  flex-direction: column;
  gap: 14px;
  padding-top: 14px;
  border-top: 1px solid rgba(28, 24, 18, 0.12);
}

#itemRows {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.order-items-title {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 13px;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  color: var(--ink);
}

.item-row {
  display: flex;
  align-items: flex-end;
  gap: 10px;
}

.item-row .form-field {
  flex: 1;
}

.remove-item-btn {
  background: none;
  border: 1.5px solid rgba(28, 24, 18, 0.18);
  color: var(--muted);
  width: 38px;
  height: 38px;
  border-radius: 10px;
  font-size: 16px;
  line-height: 1;
  cursor: pointer;
  flex-shrink: 0;
  transition: all 0.15s;
}

.remove-item-btn:hover {
  border-color: var(--rust);
  color: var(--rust);
}

.add-item-btn {
  align-self: flex-start;
  background: none;
  border: 1px dashed rgba(28, 24, 18, 0.25);
  color: var(--muted);
  padding: 9px 16px;
  border-radius: 10px;
  font-family: var(--font-body);
  font-size: 13px;
  cursor: pointer;
  transition: all 0.15s;
}

.add-item-btn:hover {
  border-color: var(--gold);
  color: var(--gold-deep);
  background: rgba(219, 165, 63, 0.08);
}

.add-item-btn:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}

.order-summary {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding-top: 16px;
  border-top: 1px solid rgba(28, 24, 18, 0.12);
}

.summary-row {
  display: flex;
  justify-content: space-between;
  font-family: var(--font-body);
  font-size: 14px;
  color: var(--ink);
}

.summary-row.total {
  font-weight: 700;
  font-size: 17px;
  padding-top: 8px;
  border-top: 1px solid rgba(28, 24, 18, 0.12);
}

.submit-btn {
  align-self: flex-start;
  background: var(--gold);
  color: #fff;
  border: none;
  padding: 12px 30px;
  border-radius: 999px;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 13px;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  cursor: pointer;
  transition: background 0.15s;
}

.submit-btn:hover { background: var(--gold-deep); }
.submit-btn:disabled { opacity: 0.6; cursor: not-allowed; }

.form-status {
  font-size: 12px;
  color: var(--muted);
  font-style: italic;
}

.form-status-error { color: #b0453f; }

/* ── Product detail page ── */

.page-content-wide {
  max-width: 900px;
}

.back-link {
  display: inline-block;
  font-family: var(--font-display);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 1px;
  text-transform: uppercase;
  color: var(--muted);
  text-decoration: none;
  margin-bottom: 24px;
}

.back-link:hover { color: var(--gold-deep); }

.product-detail {
  display: flex;
  gap: 40px;
  flex-wrap: wrap;
}

.product-detail-image {
  flex: 1 1 320px;
  max-width: 380px;
  border-radius: 0;
}

.product-detail-info {
  flex: 1 1 280px;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
}

.product-detail-group {
  font-family: var(--font-display);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 8px;
}

.product-detail-name {
  font-family: var(--font-display);
  font-weight: 500;
  font-size: 28px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 24px;
}

.product-detail-add {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 12px;
}

.product-detail-add label {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 11px;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  color: var(--muted);
}

.product-detail-add input[type="number"] {
  width: 60px;
  font-family: var(--font-body);
  font-size: 14px;
  padding: 9px 10px;
  border: 1.5px solid rgba(28, 24, 18, 0.18);
  border-radius: 10px;
  background: #fff;
  color: var(--ink);
}

.product-detail-add input[type="number"]:focus {
  outline: none;
  border-color: var(--gold);
}

.product-detail-status {
  font-size: 12px;
  color: var(--muted);
  font-style: italic;
}

.product-missing {
  color: var(--muted);
  margin-bottom: 20px;
}

/* ── Cart page ── */

.cart-note {
  font-size: 13px;
  color: var(--muted);
  max-width: 520px;
}

.cart-empty {
  color: var(--muted);
  margin-top: 20px;
}

.cart-empty a { color: var(--gold-deep); }

.cart-items {
  display: flex;
  flex-direction: column;
  gap: 16px;
  margin-top: 28px;
}

.cart-row {
  display: grid;
  grid-template-columns: 56px 1fr auto auto;
  align-items: center;
  gap: 14px;
  padding-bottom: 16px;
  border-bottom: 1px solid rgba(28, 24, 18, 0.12);
}

.cart-row-image {
  width: 56px;
  height: 56px;
  flex: none;
}

.cart-row-image img { width: 46%; }
.cart-row-image.has-photo img { width: 100%; }

.cart-row-info {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}

.cart-row-name {
  font-family: var(--font-display);
  font-weight: 500;
  font-size: 13px;
  text-transform: uppercase;
  letter-spacing: 0.3px;
  color: var(--ink);
}

.cart-row-qty {
  width: 52px;
  font-family: var(--font-body);
  font-size: 14px;
  padding: 7px 8px;
  border: 1.5px solid rgba(28, 24, 18, 0.18);
  border-radius: 8px;
  background: #fff;
  color: var(--ink);
  text-align: center;
}

.cart-row-qty:focus {
  outline: none;
  border-color: var(--gold);
}

.cart-row-remove {
  background: none;
  border: 1.5px solid rgba(28, 24, 18, 0.18);
  color: var(--muted);
  width: 32px;
  height: 32px;
  border-radius: 8px;
  font-size: 15px;
  line-height: 1;
  cursor: pointer;
  transition: all 0.15s;
}

.cart-row-remove:hover {
  border-color: var(--rust);
  color: var(--rust);
}

.cart-summary {
  max-width: 320px;
  margin-top: 24px;
  margin-left: auto;
}

.cart-form {
  max-width: 420px;
}

/* ── Subscription page ── */

.plan-toggle {
  display: flex;
  gap: 10px;
  margin-top: 24px;
}

.plan-btn {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 13px;
  letter-spacing: 0.5px;
  background: none;
  border: 1.5px solid rgba(28, 24, 18, 0.18);
  color: var(--muted);
  padding: 10px 22px;
  border-radius: 999px;
  cursor: pointer;
  transition: all 0.15s;
}

.plan-btn:hover { border-color: var(--gold); color: var(--gold-deep); }

.plan-btn.active {
  background: var(--ink);
  border-color: var(--ink);
  color: var(--cream);
}

.sub-months {
  display: flex;
  flex-direction: column;
  gap: 14px;
  margin-top: 24px;
  padding-top: 20px;
  border-top: 1px solid rgba(28, 24, 18, 0.12);
}

/* ── Footer ── */

.site-footer {
  max-width: 1180px;
  margin: 30px auto 0;
  padding: 20px 24px;
  border-top: 1px solid rgba(28, 24, 18, 0.12);
  font-size: 12px;
  color: var(--muted);
  text-align: center;
}

/* ── Password gate ── */

.password-gate {
  display: flex;
  justify-content: center;
  padding: 80px 24px;
}

.password-gate-box {
  max-width: 340px;
  width: 100%;
  text-align: center;
}

.password-gate-box h1 {
  font-family: var(--font-display);
  font-size: 26px;
  margin-bottom: 12px;
}

.password-gate-box p {
  color: var(--muted);
  font-size: 14px;
  line-height: 1.6;
  margin-bottom: 24px;
}

.password-gate-box form {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
}

.password-gate-box input[type="password"] {
  width: 100%;
  font-family: var(--font-body);
  font-size: 14px;
  padding: 12px 14px;
  border: 1.5px solid rgba(28, 24, 18, 0.18);
  border-radius: 10px;
  background: #fff;
  color: var(--ink);
  text-align: center;
}

.password-gate-box input[type="password"]:focus {
  outline: none;
  border-color: var(--gold);
}

/* ── Responsive ── */

@media (max-width: 720px) {
  :root { --sidebar-w: 220px; }
}
