/* TidySpaces design system — warm editorial palette tuned for Pinterest traffic.
   New tokens live under --color-* / --font-* / --radius-* etc.; the original brand
   variable names are aliased to them below so existing markup keeps working. */
@import url('https://fonts.googleapis.com/css2?family=Playfair+Display:wght@600;700;800&family=Inter:wght@400;500;600;700&display=swap');

:root {
  --color-bg: #faf6f1;
  --color-surface: #ffffff;
  --color-surface-warm: #fdf8f3;
  --color-border: #ede0d4;
  --color-text-heading: #2c1a0e;
  --color-text-body: #3d2b1f;
  --color-text-muted: #7a5c48;
  --color-accent: #c17f4a;
  --color-accent-hover: #a86a38;
  --color-accent-sage: #8aab8c;
  --color-btn-primary-bg: #2c1a0e;
  --color-btn-primary-text: #faf6f1;
  --color-btn-secondary-bg: #c17f4a;
  --color-btn-secondary-text: #ffffff;
  --color-tag-bg: #f0e8df;
  --color-tag-text: #7a5c48;
  --font-serif: 'Playfair Display', Georgia, serif;
  --font-sans: 'Inter', system-ui, sans-serif;
  --radius-card: 16px;
  --radius-btn: 100px;
  --shadow-card: 0 2px 12px rgba(44,26,14,0.07);
  --shadow-card-hover: 0 6px 24px rgba(44,26,14,0.13);
  --max-width: 1100px;
  --transition: 0.2s ease;

  /* Backward-compat aliases (old brand names -> new palette) */
  --page: var(--color-bg);
  --nude-bg: var(--color-tag-bg);
  --card: var(--color-surface);
  --chocolate: var(--color-text-heading);
  --coffee: var(--color-text-muted);
  --caramel: var(--color-accent);
  --cream: var(--color-btn-primary-text);
  --maxw: var(--max-width);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: var(--font-sans);
  color: var(--color-text-body);
  background: var(--color-bg);
  line-height: 1.65;
  font-size: 16px;
}

h1, h2, h3, h4, .wordmark {
  font-family: var(--font-serif);
  color: var(--color-text-heading);
  line-height: 1.2;
}

a { color: var(--color-accent); transition: color var(--transition); }
a:hover { color: var(--color-accent-hover); }

img { max-width: 100%; }

.container { max-width: var(--max-width); margin: 0 auto; padding: 0 24px; }

/* ---------------------------------------------------------------- Header / nav */
.site-header {
  position: sticky; top: 0; z-index: 100;
  background: rgba(250, 246, 241, 0.92);
  backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--color-border);
}
.nav {
  display: flex; align-items: center; justify-content: space-between;
  flex-wrap: wrap; gap: 12px; padding: 16px 24px; max-width: var(--max-width); margin: 0 auto;
}
.wordmark { font-size: 28px; font-weight: 800; text-decoration: none; letter-spacing: 0.5px; color: var(--color-text-heading); }
.wordmark span { color: var(--color-accent); }
.nav-links { display: flex; gap: 22px; flex-wrap: wrap; align-items: center; }
.nav-links a { text-decoration: none; font-size: 15px; font-weight: 600; color: var(--color-text-muted); }
.nav-links a:hover { color: var(--color-text-heading); }
.nav-links a.shop { color: var(--color-accent); font-weight: 700; }

/* Mobile hamburger */
.nav-toggle {
  display: none; flex-direction: column; justify-content: center; gap: 5px;
  width: 44px; height: 44px; padding: 10px; background: none; border: 0; cursor: pointer;
}
.nav-toggle span { display: block; width: 24px; height: 2px; background: var(--color-text-heading); border-radius: 2px; transition: var(--transition); }

/* ---------------------------------------------------------------- Hero */
.hero {
  background: linear-gradient(180deg, var(--color-surface-warm), var(--color-bg));
  padding: 80px 0 60px;
}
.hero .container { display: block; }
.hero-grid { display: grid; grid-template-columns: 60% 40%; gap: 48px; align-items: center; }
.hero-text { text-align: left; }
.hero-image { width: 100%; height: 100%; min-height: 360px; object-fit: cover; border-radius: 20px; box-shadow: var(--shadow-card-hover); }
.hero-logo { width: 88px; height: 88px; border-radius: 50%; display: block; margin: 0 0 18px; box-shadow: 0 6px 20px rgba(44,26,14,0.20); }
.hero .tagline { text-transform: uppercase; letter-spacing: 4px; font-size: 13px; color: var(--color-accent); font-weight: 700; margin-bottom: 14px; }
.hero h1 { font-size: clamp(32px, 8vw, 64px); margin: 0 0 18px; }
.hero p { font-size: 20px; max-width: 620px; margin: 0 0 24px; color: var(--color-text-muted); }
/* Center-text hero fallback (pages still using the old single-column hero) */
.hero:not(:has(.hero-grid)) { text-align: center; }
.hero:not(:has(.hero-grid)) .hero-logo { margin: 0 auto 18px; }
.hero:not(:has(.hero-grid)) p { margin-left: auto; margin-right: auto; }

.trust-strip {
  display: flex; flex-wrap: wrap; gap: 8px 18px; align-items: center;
  font-size: 14px; color: var(--color-text-muted); margin: 0 0 26px;
}
.trust-strip span { white-space: nowrap; display: inline-flex; align-items: center; gap: 6px; }
.ts-ico { width: 16px; height: 16px; flex: 0 0 auto; }
.trust-strip .ts-ico { color: var(--color-accent); }
.social-proof-strip__inner span { display: inline-flex; align-items: center; gap: 6px; }

/* ---------------------------------------------------------------- Buttons */
.btn {
  display: inline-block; background: var(--color-btn-primary-bg); color: var(--color-btn-primary-text);
  padding: 14px 28px; border-radius: var(--radius-btn); text-decoration: none; font-weight: 700;
  min-height: 44px; transition: background var(--transition), transform var(--transition);
}
.btn:hover { background: #1f1209; color: var(--color-btn-primary-text); }
.btn-secondary { background: var(--color-btn-secondary-bg); color: var(--color-btn-secondary-text); }
.btn-secondary:hover { background: var(--color-accent-hover); color: #fff; }

/* ---------------------------------------------------------------- Social proof strip */
.social-proof-strip { background: var(--color-btn-primary-bg); color: rgba(250,246,241,0.85); }
.social-proof-strip__inner {
  display: flex; flex-wrap: wrap; justify-content: center; align-items: center; gap: 16px;
  font-size: 13px; padding: 10px 20px; max-width: var(--max-width); margin: 0 auto;
}
.social-proof-strip .divider { opacity: 0.4; }

/* ---------------------------------------------------------------- Sections */
section { padding: 56px 0; }
.section-title { text-align: center; font-size: clamp(24px, 5vw, 40px); margin: 0 0 8px; }
.section-sub { text-align: center; color: var(--color-text-muted); margin: 0 auto 40px; max-width: 560px; }

/* ---------------------------------------------------------------- Browse by room */
.room-nav { text-align: center; }
.room-nav h2 { font-size: clamp(24px, 5vw, 40px); margin: 0 0 8px; }
.room-nav__sub { color: var(--color-text-muted); margin: 0 auto 32px; }
.room-nav__grid { display: grid; grid-template-columns: repeat(6, 1fr); gap: 16px; max-width: var(--max-width); margin: 0 auto; padding: 0 24px; }
.room-card {
  background: var(--color-surface); border: 1px solid var(--color-border); border-radius: var(--radius-card);
  padding: 20px 16px; text-align: center; text-decoration: none; box-shadow: var(--shadow-card);
  transition: all var(--transition); display: block;
}
.room-card:hover { box-shadow: var(--shadow-card-hover); border-color: var(--color-accent); transform: translateY(-2px); }
.room-card__icon { font-size: 28px; display: block; margin-bottom: 10px; line-height: 0; }
.room-card__icon svg { width: 30px; height: 30px; color: var(--color-accent); }
.room-card__label { font-size: 13px; font-weight: 600; letter-spacing: 0.05em; text-transform: uppercase; color: var(--color-text-muted); }

/* ---------------------------------------------------------------- Cards grid */
.grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 26px; }

/* Legacy text-only card (kept for backward compatibility) */
.card {
  background: var(--color-surface); border: 1px solid var(--color-border);
  border-radius: var(--radius-card); padding: 28px; text-decoration: none; color: var(--color-text-heading);
  transition: transform var(--transition), box-shadow var(--transition); display: block; box-shadow: var(--shadow-card);
}
.card:hover { transform: translateY(-4px); box-shadow: var(--shadow-card-hover); }
.card .eyebrow { color: var(--color-accent); font-weight: 700; font-size: 13px; text-transform: uppercase; letter-spacing: 2px; }
.card h3 { font-size: 22px; margin: 10px 0 8px; }
.card p { color: var(--color-text-muted); margin: 0; }

/* Guide card with image slot */
.guide-card {
  background: var(--color-surface); border: 1px solid var(--color-border); border-radius: var(--radius-card);
  overflow: hidden; text-decoration: none; color: var(--color-text-heading); display: flex; flex-direction: column;
  box-shadow: var(--shadow-card); transition: transform var(--transition), box-shadow var(--transition);
}
.guide-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-card-hover); }
.guide-card__image { height: 200px; overflow: hidden; border-radius: var(--radius-card) var(--radius-card) 0 0; background: var(--color-tag-bg); }
.guide-card__image img { width: 100%; height: 100%; object-fit: cover; display: block; }
.guide-card__body { padding: 22px 24px 24px; display: flex; flex-direction: column; flex-grow: 1; }
.guide-card__tag { display: inline-block; font-size: 11px; letter-spacing: 0.1em; text-transform: uppercase; color: var(--color-accent); font-weight: 700; margin-bottom: 8px; }
.guide-card h3 { font-size: 21px; margin: 0 0 8px; }
.guide-card p { color: var(--color-text-muted); margin: 0; flex-grow: 1; }
.guide-card__cta { color: var(--color-accent); font-weight: 600; font-size: 14px; display: block; margin-top: 12px; transition: letter-spacing var(--transition); }
.guide-card:hover .guide-card__cta { letter-spacing: 0.03em; }

/* ---------------------------------------------------------------- Article */
.reading-progress {
  position: fixed; top: 0; left: 0; height: 3px; width: 0%;
  background: var(--color-accent); z-index: 9999; transition: width 0.1s ease;
}
.article { max-width: 720px; margin: 0 auto; padding: 48px 24px; }
.article .eyebrow { color: var(--color-accent); font-weight: 700; text-transform: uppercase; letter-spacing: 2px; font-size: 13px; }
.article h1 { font-size: clamp(30px, 6vw, 44px); margin: 8px 0 16px; }
.article h2 { font-size: 26px; margin: 34px 0 10px; }
.article p, .article li { font-size: 18px; color: var(--color-text-body); }
.article ul { padding-left: 22px; }
.article .updated { color: var(--color-accent); font-weight: 600; font-size: 14px; }
.article-hero-image { margin: 24px 0; }
.article-hero-image img { width: 100%; max-height: 400px; object-fit: cover; border-radius: 12px; display: block; }

/* Generic prose pages */
.prose { max-width: 720px; margin: 0 auto; padding: 48px 24px; }
.prose h1 { font-size: clamp(30px, 6vw, 44px); margin-bottom: 8px; }
.prose h2 { font-size: 24px; margin-top: 30px; }
.prose .updated { color: var(--color-accent); font-weight: 600; }

.callout {
  background: var(--color-surface-warm); border-left: 4px solid var(--color-accent);
  border-radius: 8px; padding: 16px 20px; margin: 26px 0; color: var(--color-text-muted);
}
/* Sage affiliate-disclosure variant */
.callout--disclosure, .article .callout:first-of-type {
  border-left: 3px solid var(--color-accent-sage); background: #f5f9f5;
  border-radius: 0 8px 8px 0; font-size: 14px; color: var(--color-text-muted);
}

/* Inline + featured product cards */
.inline-product-card {
  display: flex; flex-direction: row; gap: 16px; align-items: center;
  background: var(--color-surface); border: 1px solid var(--color-border);
  border-radius: 12px; padding: 16px; margin: 24px 0;
}
.inline-product-card__image { flex: 0 0 100px; width: 100px; height: 100px; border-radius: 8px; background: var(--color-surface-warm); display: flex; align-items: center; justify-content: center; overflow: hidden; }
.inline-product-card__image img { max-width: 100%; max-height: 100%; object-fit: contain; }
.inline-product-card__info { flex: 1; }
.inline-product-card__label { font-size: 10px; text-transform: uppercase; letter-spacing: 0.1em; color: var(--color-accent); font-weight: 700; }
.inline-product-card h4 { font-size: 15px; font-weight: 700; margin: 4px 0; color: var(--color-text-heading); }
.inline-product-card__note { font-size: 14px; color: var(--color-text-muted); margin: 0 0 8px; }
.btn-product {
  background: var(--color-btn-secondary-bg); color: #fff; border-radius: var(--radius-btn);
  padding: 8px 18px; font-size: 13px; font-weight: 600; display: inline-block; margin-top: 8px;
  text-decoration: none; transition: background var(--transition); min-height: 36px;
}
.btn-product:hover { background: var(--color-accent-hover); color: #fff; }
.shop-this-guide { margin-top: 40px; }
.shop-this-guide .grid { grid-template-columns: repeat(2, 1fr); gap: 18px; }

/* ---------------------------------------------------------------- Product (shop) cards */
.product-card {
  position: relative; display: flex; flex-direction: column; text-align: center;
  background: var(--color-surface); border: 1px solid var(--color-border); border-radius: var(--radius-card);
  box-shadow: var(--shadow-card); transition: all var(--transition); overflow: hidden; padding: 0;
}
.product-card:hover { box-shadow: var(--shadow-card-hover); transform: translateY(-3px); }
.product-img {
  height: 220px; display: flex; align-items: center; justify-content: center;
  background: #fff; margin: 0; overflow: hidden; padding: 20px; aspect-ratio: 1 / 1;
}
.product-img img { max-width: 100%; max-height: 100%; object-fit: contain; }
.product-placeholder { font-family: var(--font-serif); font-size: 30px; font-weight: 700; color: var(--color-accent); }
.product-placeholder span { color: var(--color-text-muted); }
.product-card h3 { font-family: var(--font-serif); font-size: 16px; margin: 12px 16px 4px; flex-grow: 1; line-height: 1.35; color: var(--color-text-heading); }
.product-card .price { color: var(--color-accent); font-weight: 700; font-size: 15px; margin: 0 16px 8px; }
.pinterest-fav {
  position: absolute; top: 12px; right: 12px; font-size: 11px; padding: 3px 10px;
  border-radius: var(--radius-btn); background: var(--color-accent); color: #fff; font-weight: 600; z-index: 2;
  display: inline-flex; align-items: center; gap: 4px;
}
.pinterest-fav svg { width: 11px; height: 11px; flex: 0 0 auto; }
.btn-amazon {
  display: inline-block; background: var(--color-btn-primary-bg); color: var(--color-btn-primary-text);
  padding: 11px 20px; border-radius: var(--radius-btn); text-decoration: none; font-weight: 700; font-size: 15px;
  transition: background var(--transition);
}
.btn-amazon:hover { background: #1f1209; color: var(--color-btn-primary-text); }
/* On shop product cards, render the button full-width amber */
.product-card .btn-amazon { background: var(--color-btn-secondary-bg); color: #fff; margin: 12px 16px 16px; padding: 10px; font-size: 14px; display: block; }
.product-card .btn-amazon:hover { background: var(--color-accent-hover); }

/* ---------------------------------------------------------------- Category tabs (shop) */
.category-tabs { display: flex; gap: 10px; overflow-x: auto; white-space: nowrap; padding: 4px 24px 20px; max-width: var(--max-width); margin: 0 auto; -webkit-overflow-scrolling: touch; }
.category-tab {
  flex: 0 0 auto; border-radius: var(--radius-btn); padding: 8px 18px; font-size: 14px; font-weight: 600;
  background: var(--color-surface); border: 1px solid var(--color-border); color: var(--color-text-muted);
  cursor: pointer; min-height: 40px; transition: all var(--transition);
}
.category-tab.active { background: var(--color-btn-primary-bg); color: var(--color-btn-primary-text); border-color: transparent; }

/* ---------------------------------------------------------------- Footer */
.site-footer { background: var(--color-btn-primary-bg); color: rgba(250,246,241,0.7); padding: 44px 0 36px; margin-top: 40px; }
.site-footer__top { display: flex; flex-wrap: wrap; gap: 20px; justify-content: space-between; align-items: center; padding-bottom: 22px; margin-bottom: 22px; border-bottom: 1px solid rgba(250,246,241,0.15); }
.site-footer__brand .wordmark { color: var(--color-btn-primary-text); font-size: 24px; }
.site-footer__brand p { margin: 6px 0 0; font-size: 14px; color: rgba(250,246,241,0.7); }
.site-footer__social { display: flex; gap: 16px; align-items: center; }
.site-footer__social a { display: inline-flex; align-items: center; gap: 6px; color: rgba(250,246,241,0.85); text-decoration: none; font-size: 14px; }
.site-footer__social a:hover { color: var(--color-accent); }
.site-footer__social svg { width: 18px; height: 18px; fill: currentColor; }
.site-footer .container { display: block; }
.site-footer__links { display: flex; flex-wrap: wrap; gap: 16px; align-items: center; justify-content: space-between; }
.site-footer a { color: rgba(250,246,241,0.7); text-decoration: none; font-size: 14px; }
.site-footer a:hover { color: var(--color-accent); }
.site-footer__links nav a { margin-right: 16px; }
.site-footer .fine { width: 100%; font-size: 11px; opacity: .65; margin-top: 14px; }

/* ---------------------------------------------------------------- Sticky mobile shop bar */
.sticky-shop-bar { display: none; }
.sticky-shop-bar__cta {
  display: block; text-align: center; background: var(--color-btn-primary-bg); color: var(--color-btn-primary-text);
  padding: 14px 24px; padding-bottom: calc(14px + env(safe-area-inset-bottom)); font-weight: 600; font-size: 15px; text-decoration: none;
}

/* ---------------------------------------------------------------- Responsive */
@media (max-width: 768px) {
  .hero { padding: 40px 0 32px; }
  .hero-grid { grid-template-columns: 1fr; gap: 0; }
  .hero-image { display: none; }
  .room-nav__grid { grid-template-columns: repeat(3, 1fr); }
  .guide-card__image { height: 180px; }
  .inline-product-card { flex-direction: column; text-align: center; }
  .inline-product-card__image { width: 100%; height: 160px; flex-basis: auto; }
  .shop-this-guide .grid { grid-template-columns: 1fr; }

  /* Hamburger nav */
  .nav-toggle { display: flex; }
  .nav-links {
    flex-basis: 100%; flex-direction: column; align-items: flex-start; gap: 0;
    max-height: 0; overflow: hidden; transition: max-height var(--transition);
  }
  .site-header.nav-open .nav-links { max-height: 420px; }
  .nav-links a { padding: 12px 0; width: 100%; min-height: 44px; display: flex; align-items: center; }

  /* Sticky shop bar appears on mobile */
  .sticky-shop-bar { display: block; position: fixed; left: 0; right: 0; bottom: 0; z-index: 200; transform: translateY(100%); transition: transform 0.3s ease; }
}

@media (max-width: 600px) {
  .social-proof-strip__inner { font-size: 12px; gap: 8px; }
}
