/* ==========================================================================
   BRAND NAME: Hidara  (rename here and in each HTML page header comment)
   Hidara - main stylesheet
   All site styling lives in this one file. Mobile first: base styles are for
   phones, then min-width media queries add tablet and desktop layouts.
   ========================================================================== */

/* ---------- 1. Design tokens ---------- */
:root {
  /* Brand palette */
  --cream: #FBF6EF;
  --sand: #EADBC8;
  --tan: #B07A4A;      /* decorative only: borders, stitching (not text, contrast too low) */
  --saddle: #6B3F25;   /* links, buttons, accents (passes AA on cream and sand) */
  --espresso: #3B2417; /* footer, dark sections */
  --text: #2B1B12;     /* body text */
  --white: #FFFFFF;

  /* Supporting tones */
  --muted: #5A4434;    /* secondary text, AA on cream */
  --success: #2F5D3A;
  --error: #8A1F1F;

  /* Type */
  --font-heading: Georgia, "Times New Roman", Times, serif;
  --font-body: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;

  /* Layout */
  --radius: 14px;
  --radius-sm: 8px;
  --max-width: 1120px;
  --gutter: 1.25rem;
  --stitch: 1.5px dashed var(--tan);
  --shadow: 0 1px 2px rgba(59, 36, 23, 0.06), 0 6px 18px rgba(59, 36, 23, 0.06);
}

/* ---------- 2. Base ---------- */
*,
*::before,
*::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--cream);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 1.0625rem;
  line-height: 1.65;
}

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

h1, h2, h3, h4 {
  font-family: var(--font-heading);
  font-weight: normal;
  color: var(--espresso);
  line-height: 1.2;
  margin: 0 0 0.6em;
}
h1 { font-size: clamp(2rem, 6vw, 3.25rem); letter-spacing: -0.01em; }
h2 { font-size: clamp(1.6rem, 4vw, 2.25rem); }
h3 { font-size: 1.3rem; }

p { margin: 0 0 1em; }

a { color: var(--saddle); text-underline-offset: 3px; }
a:hover { color: var(--espresso); }

ul, ol { padding-left: 1.25rem; }

/* Visible focus for keyboard users */
:focus-visible {
  outline: 3px solid var(--saddle);
  outline-offset: 3px;
  border-radius: 4px;
}

.visually-hidden {
  position: absolute !important;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0, 0, 0, 0);
  white-space: nowrap; border: 0;
}

/* Skip link: hidden until focused */
.skip-link {
  position: absolute;
  left: 1rem; top: -100px;
  background: var(--espresso);
  color: var(--cream);
  padding: 0.6rem 1rem;
  border-radius: var(--radius-sm);
  z-index: 1000;
  text-decoration: none;
}
.skip-link:focus { top: 1rem; color: var(--cream); }

.container {
  width: 100%;
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 var(--gutter);
}

.section { padding: 3.5rem 0; }
.section--sand { background: var(--sand); }
.section.section--tight { padding-top: 1rem; }
.section__intro { max-width: 40rem; margin-bottom: 2rem; }

.eyebrow {
  display: inline-block;
  font-size: 0.8rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--saddle);
  margin-bottom: 0.75rem;
  font-weight: 600;
}

.lead { font-size: 1.2rem; color: var(--muted); max-width: 38rem; }
.lead--center { margin-left: auto; margin-right: auto; }

/* ---------- 3. Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  min-height: 48px;
  padding: 0.7rem 1.4rem;
  border-radius: 999px;
  font: 600 1rem/1.2 var(--font-body);
  text-decoration: none;
  cursor: pointer;
  border: 2px solid var(--saddle);
  position: relative;
  transition: background-color 0.2s ease, color 0.2s ease;
}
/* Stitched detail: a dashed line inset inside the button */
.btn::after {
  content: "";
  position: absolute;
  inset: 4px;
  border: 1px dashed currentColor;
  border-radius: 999px;
  opacity: 0.45;
  pointer-events: none;
}
.btn--primary { background: var(--saddle); color: var(--cream); }
.btn--primary:hover { background: var(--espresso); border-color: var(--espresso); color: var(--cream); }
.btn--secondary { background: transparent; color: var(--saddle); }
.btn--secondary:hover { background: var(--sand); color: var(--espresso); }
.btn--small { min-height: 44px; padding: 0.5rem 1.1rem; font-size: 0.95rem; }

.btn-row { display: flex; flex-wrap: wrap; gap: 0.75rem; }

/* ---------- 4. Header and navigation ---------- */
.site-header {
  background: var(--cream);
  border-bottom: 1px solid var(--sand);
  position: sticky;
  top: 0;
  z-index: 50;
}
.site-header__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 68px;
}
.logo {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-family: var(--font-heading);
  font-size: 1.5rem;
  color: var(--espresso);
  text-decoration: none;
  letter-spacing: 0.04em;
}
.logo img { width: 30px; height: 30px; }

.nav-toggle {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  min-height: 44px;
  padding: 0.4rem 0.9rem;
  background: transparent;
  border: 1.5px solid var(--saddle);
  border-radius: 999px;
  color: var(--saddle);
  font: 600 0.95rem var(--font-body);
  cursor: pointer;
}
.nav-toggle__bars,
.nav-toggle__bars::before,
.nav-toggle__bars::after {
  display: block;
  width: 18px; height: 2px;
  background: currentColor;
  border-radius: 2px;
  position: relative;
  transition: transform 0.2s ease;
}
.nav-toggle__bars::before,
.nav-toggle__bars::after { content: ""; position: absolute; left: 0; }
.nav-toggle__bars::before { top: -6px; }
.nav-toggle__bars::after { top: 6px; }
.nav-toggle[aria-expanded="true"] .nav-toggle__bars { background: transparent; }
.nav-toggle[aria-expanded="true"] .nav-toggle__bars::before { transform: translateY(6px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] .nav-toggle__bars::after { transform: translateY(-6px) rotate(-45deg); }

.site-nav {
  display: none;
  position: absolute;
  top: 100%; left: 0; right: 0;
  background: var(--cream);
  border-bottom: 1px solid var(--sand);
  padding: 0.5rem var(--gutter) 1.25rem;
}
.site-nav.is-open { display: block; }
/* Without JavaScript, show the menu so it is always reachable */
.no-js .site-nav { display: block; position: static; padding: 0; border: 0; }
.no-js .nav-toggle { display: none; }

.site-nav ul { list-style: none; margin: 0; padding: 0; }
.site-nav a {
  display: block;
  padding: 0.75rem 0.25rem;
  color: var(--text);
  text-decoration: none;
  border-bottom: 1px dashed var(--sand);
}
.site-nav a:hover { color: var(--saddle); }
.site-nav a[aria-current="page"] { color: var(--saddle); font-weight: 600; }

/* ---------- 5. Hero ---------- */
.hero { padding: 2.5rem 0 3rem; }
.hero__grid { display: grid; gap: 2rem; align-items: center; }
.hero__media {
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid var(--tan);
  background: var(--sand);
}
.hero__media img { width: 100%; }
.hero .lead { margin-bottom: 1.5rem; }

.concept-note {
  display: inline-block;
  font-size: 0.875rem;
  color: var(--muted);
  border: var(--stitch);
  border-radius: 999px;
  padding: 0.25rem 0.85rem;
  margin-bottom: 1rem;
  background: var(--white);
}

.page-hero { padding: 2.5rem 0 1.5rem; }

/* Honest label for stock photography */
.photo-note { font-size: 0.85rem; color: var(--muted); margin: 0.5rem 0 0; }
.hero__media .photo-note { background: var(--white); padding: 0.45rem 0.9rem; margin: 0; }

/* ---------- 6. Cards (shared) ---------- */
.card {
  background: var(--white);
  border: 1px solid var(--tan);
  border-radius: var(--radius);
  position: relative;
  box-shadow: var(--shadow);
}
/* Stitched detail inset inside each card */
.card::before {
  content: "";
  position: absolute;
  inset: 7px;
  border: var(--stitch);
  border-radius: calc(var(--radius) - 5px);
  opacity: 0.55;
  pointer-events: none;
}

.grid { display: grid; gap: 1.25rem; }

/* Category tiles */
.tile {
  display: block;
  text-decoration: none;
  color: var(--text);
  overflow: hidden;
  transition: transform 0.2s ease;
}
.tile:hover { transform: translateY(-3px); color: var(--text); }
.tile img { width: 100%; background: var(--sand); }
.tile__body { padding: 1.1rem 1.4rem 1.4rem; }
.tile__body h3 { margin-bottom: 0.25rem; }
.tile__body p { margin: 0; color: var(--muted); font-size: 0.95rem; }
.tile__link { display: inline-block; margin-top: 0.6rem; color: var(--saddle); font-weight: 600; }

/* Why points */
.point { padding: 1.6rem; }
.point__icon {
  width: 44px; height: 44px;
  border-radius: 50%;
  background: var(--sand);
  color: var(--saddle);
  display: grid;
  place-items: center;
  font-family: var(--font-heading);
  font-size: 1.2rem;
  margin-bottom: 0.9rem;
}
.point p { margin: 0; color: var(--muted); }

/* Craft teaser */
.teaser { display: grid; gap: 1.5rem; align-items: center; padding: 1.75rem; }

/* ---------- 7. Shop ---------- */
.filter-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin: 0 0 1.75rem;
  padding: 0;
}
.filter-tab {
  min-height: 44px;
  padding: 0.45rem 1.1rem;
  border-radius: 999px;
  border: 1.5px solid var(--saddle);
  background: transparent;
  color: var(--saddle);
  font: 600 0.95rem var(--font-body);
  cursor: pointer;
}
.filter-tab:hover { background: var(--sand); }
.filter-tab[aria-selected="true"] { background: var(--saddle); color: var(--cream); }

.category-heading { margin-top: 0.5rem; }
/* Stop the sticky header covering anchored sections (shop.html#belts etc.) */
.product-group, #products, [id^="product-"], h2[id] { scroll-margin-top: 90px; }
.product-group { margin-bottom: 2.5rem; }
.product-group[hidden] { display: none; }

.product-card { display: flex; flex-direction: column; overflow: hidden; }
.product-card__media { background: var(--sand); position: relative; }
.product-card__media img { width: 100%; }
.badge {
  position: absolute;
  top: 14px; left: 14px;
  background: var(--cream);
  color: var(--saddle);
  border: 1px dashed var(--saddle);
  border-radius: 999px;
  padding: 0.15rem 0.7rem;
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.03em;
  z-index: 1;
}
.product-card__body { padding: 1.2rem 1.4rem 1.5rem; display: flex; flex-direction: column; flex: 1; }
.product-card__body h3 { margin-bottom: 0.35rem; }
.product-card__desc { color: var(--muted); font-size: 0.97rem; }
.spec-list { list-style: none; padding: 0; margin: 0 0 1rem; font-size: 0.92rem; }
.spec-list li { padding: 0.3rem 0; border-top: 1px dashed var(--sand); }
.spec-list strong { color: var(--espresso); font-weight: 600; }
.price { font-family: var(--font-heading); font-size: 1.1rem; color: var(--espresso); margin-bottom: 1rem; }
.product-card .btn { margin-top: auto; align-self: flex-start; }

.placeholder { background: #FFF3D6; padding: 0 0.2em; border-radius: 3px; }

/* ---------- 8. Content pages ---------- */
.prose { max-width: 44rem; }
/* A prose container keeps its left edge in line with the other containers */
.container.prose {
  max-width: calc(44rem + 2 * var(--gutter));
  margin-left: max(0px, calc((100% - var(--max-width)) / 2));
}
.prose h2 { margin-top: 2rem; }
.prose h3 { margin-top: 1.5rem; }
.prose li { margin-bottom: 0.4rem; }

.draft-banner {
  border: var(--stitch);
  background: var(--white);
  border-radius: var(--radius);
  padding: 1rem 1.25rem;
  margin: 0 0 2rem;
}
.draft-banner strong { color: var(--saddle); }

.care-grid { display: grid; gap: 1.25rem; margin: 1.5rem 0 2rem; }
.care-grid .card { padding: 1.5rem; }
.care-grid h3 { margin-bottom: 0.4rem; }
.care-grid p { margin: 0; color: var(--muted); }

.steps { counter-reset: step; list-style: none; padding: 0; }
.steps li {
  counter-increment: step;
  position: relative;
  padding: 0 0 1.1rem 3rem;
}
.steps li::before {
  content: counter(step);
  position: absolute;
  left: 0; top: 0;
  width: 2rem; height: 2rem;
  border-radius: 50%;
  border: 1.5px dashed var(--tan);
  display: grid;
  place-items: center;
  font-family: var(--font-heading);
  color: var(--saddle);
}

/* FAQ */
.faq details {
  background: var(--white);
  border: 1px solid var(--tan);
  border-radius: var(--radius-sm);
  margin-bottom: 0.75rem;
}
.faq summary {
  cursor: pointer;
  padding: 1rem 1.25rem;
  font-weight: 600;
  color: var(--espresso);
  list-style-position: inside;
}
.faq details[open] summary { border-bottom: 1px dashed var(--sand); }
.faq details > div { padding: 1rem 1.25rem 0.25rem; }

/* ---------- 9. Forms ---------- */
.contact-grid { display: grid; gap: 2rem; }
.form-card { padding: 1.75rem; }
.field { margin-bottom: 1.2rem; }
.field-row { display: grid; gap: 0 1rem; }
@media (min-width: 640px) { .field-row { grid-template-columns: 1fr 1fr; } }
.field label { display: block; font-weight: 600; margin-bottom: 0.35rem; color: var(--espresso); }
.field .hint { display: block; font-size: 0.875rem; color: var(--muted); margin-top: 0.25rem; }
.req { color: var(--error); }

input[type="text"],
input[type="email"],
select,
textarea {
  width: 100%;
  min-height: 48px;
  padding: 0.65rem 0.85rem;
  font: inherit;
  color: var(--text);
  background: var(--cream);
  border: 1.5px solid #8C6A50; /* darker than tan for 3:1 non-text contrast */
  border-radius: var(--radius-sm);
}
textarea { min-height: 140px; resize: vertical; }
input:focus-visible, select:focus-visible, textarea:focus-visible { border-color: var(--saddle); }

.checkbox { display: flex; gap: 0.7rem; align-items: flex-start; }
.checkbox input { width: 22px; height: 22px; margin-top: 0.2rem; flex: 0 0 auto; accent-color: var(--saddle); }
.checkbox label { font-weight: normal; color: var(--text); }

.form-status {
  margin-top: 1rem;
  padding: 0.85rem 1rem;
  border-radius: var(--radius-sm);
  font-weight: 600;
}
.form-status:empty { display: none; }
.form-status.is-success { background: #E5F0E7; color: var(--success); border: 1px solid var(--success); }
.form-status.is-error { background: #F7E4E4; color: var(--error); border: 1px solid var(--error); }

.aside-card { padding: 1.5rem; }
.aside-card h2 { font-size: 1.35rem; }

/* ---------- 10. Footer ---------- */
.footer-cta { background: var(--sand); padding: 3rem 0; text-align: center; }
.footer-cta .btn-row { justify-content: center; }
.footer-cta p { max-width: 34rem; margin: 0 auto 1.25rem; color: var(--muted); }

.site-footer {
  background: var(--espresso);
  color: var(--sand);
  padding: 2.75rem 0 2rem;
  font-size: 0.95rem;
}
.site-footer a { color: var(--cream); }
.site-footer a:hover { color: var(--sand); }
.site-footer :focus-visible { outline-color: var(--sand); } /* saddle is too dark on espresso */
.footer-grid { display: grid; gap: 1.75rem; }
.footer-brand { font-family: var(--font-heading); font-size: 1.4rem; color: var(--cream); margin-bottom: 0.3rem; }
.site-footer h2 { font-family: var(--font-body); font-size: 0.85rem; letter-spacing: 0.1em; text-transform: uppercase; color: var(--sand); margin-bottom: 0.6rem; }
.site-footer ul { list-style: none; padding: 0; margin: 0; }
.site-footer li { margin-bottom: 0.4rem; }
.link-button {
  background: none;
  border: 0;
  padding: 0;
  font: inherit;
  color: var(--cream);
  text-decoration: underline;
  text-underline-offset: 3px;
  cursor: pointer;
}
.link-button--inline { color: var(--saddle); }
.link-button--inline:hover { color: var(--espresso); }

.footer-bottom {
  margin-top: 2rem;
  padding-top: 1.25rem;
  border-top: 1px dashed rgba(234, 219, 200, 0.4);
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 1.5rem;
  justify-content: space-between;
  font-size: 0.875rem;
}

/* ---------- 11. Cookie banner ---------- */
.cookie-banner {
  position: fixed;
  left: 1rem; right: 1rem; bottom: 1rem;
  z-index: 100;
  max-width: 36rem;
  margin: 0 auto;
  background: var(--white);
  border: 1px solid var(--tan);
  border-radius: var(--radius);
  box-shadow: 0 10px 30px rgba(59, 36, 23, 0.18);
  padding: 1.25rem 1.4rem;
}
.cookie-banner[hidden] { display: none; }
.cookie-banner h2 { font-size: 1.2rem; margin-bottom: 0.4rem; }
.cookie-banner p { font-size: 0.95rem; color: var(--muted); }
/* Accept and Decline share one style so neither is visually favoured */
.cookie-banner .btn-row .btn { flex: 1 1 8rem; }

/* ---------- 12. 404 ---------- */
.not-found { text-align: center; padding: 4rem 0; }
.not-found img { margin: 0 auto 1.5rem; width: 220px; }
.not-found .btn-row { justify-content: center; }

/* ---------- 13. Tablet (min 640px) ---------- */
@media (min-width: 640px) {
  :root { --gutter: 2rem; }
  .grid--3 { grid-template-columns: repeat(2, 1fr); }
  .grid--2 { grid-template-columns: repeat(2, 1fr); }
  .care-grid { grid-template-columns: repeat(2, 1fr); }
  .footer-grid { grid-template-columns: 1.4fr 1fr 1fr; }
  .section { padding: 4.5rem 0; }
}

/* ---------- 14. Desktop (min 960px) ---------- */
@media (min-width: 960px) {
  .nav-toggle { display: none; }
  .site-nav,
  .no-js .site-nav {
    display: block;
    position: static;
    padding: 0;
    border: 0;
    background: transparent;
  }
  .site-nav ul { display: flex; gap: 1.6rem; }
  .site-nav a { border: 0; padding: 0.5rem 0; }
  .site-nav a[aria-current="page"] { border-bottom: 2px solid var(--saddle); }

  .hero { padding: 4rem 0 4.5rem; }
  .hero__grid { grid-template-columns: 1.05fr 1fr; gap: 3.5rem; }
  .grid--3 { grid-template-columns: repeat(3, 1fr); }
  .teaser { grid-template-columns: 1.5fr 1fr; padding: 2.5rem; }
  .contact-grid { grid-template-columns: 1.6fr 1fr; align-items: start; }
}

/* ---------- 15. Reduced motion ---------- */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
  .tile:hover { transform: none; }
}

/* ==========================================================================
   16. Shop: announcement bar, bag link, product grid, product pages, bag
   ========================================================================== */

/* Announcement bar above the header */
.announce {
  background: var(--espresso);
  color: var(--cream);
  font-size: 0.85rem;
  text-align: center;
  padding: 0.45rem var(--gutter);
  letter-spacing: 0.02em;
}
.announce a { color: var(--cream); }

/* Header actions: bag link + menu button */
.header-actions { display: flex; align-items: center; gap: 0.6rem; }
.bag-link {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  min-height: 44px;
  padding: 0.4rem 0.6rem;
  color: var(--espresso);
  text-decoration: none;
  font-weight: 600;
  font-size: 0.95rem;
}
.bag-link svg { width: 24px; height: 24px; }
.bag-count {
  min-width: 1.4rem;
  height: 1.4rem;
  padding: 0 0.35rem;
  border-radius: 999px;
  background: var(--saddle);
  color: var(--cream);
  font-size: 0.78rem;
  line-height: 1.4rem;
  text-align: center;
}

/* Breadcrumb */
.breadcrumb { font-size: 0.875rem; color: var(--muted); margin: 1.25rem 0 0; }
.breadcrumb ol { list-style: none; padding: 0; margin: 0; display: flex; flex-wrap: wrap; gap: 0.35rem; }
.breadcrumb li + li::before { content: "/"; margin-right: 0.35rem; color: var(--tan); }
.breadcrumb a { color: var(--muted); }

/* Product grid (Shop, Home, related products) */
.product-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1.5rem 1rem;
  list-style: none;
  padding: 0;
  margin: 0;
}
.p-card { position: relative; }
.p-card__link { display: block; color: var(--text); text-decoration: none; }
.p-card__link:hover { color: var(--text); }
.p-card__media {
  position: relative;
  aspect-ratio: 1 / 1;
  overflow: hidden;
  border-radius: var(--radius);
  background: #F4ECE1;
  border: 1px solid var(--sand);
}
.p-card__media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.4s ease, opacity 0.3s ease;
}
.p-card__img--alt { position: absolute; inset: 0; opacity: 0; }
.p-card__link:hover .p-card__img--alt,
.p-card__link:focus-visible .p-card__img--alt { opacity: 1; }
.p-card__link:hover .p-card__media img:only-child { transform: scale(1.04); }
.p-card__tag {
  position: absolute;
  top: 10px; left: 10px;
  z-index: 1;
  background: var(--cream);
  color: var(--saddle);
  border: 1px dashed var(--saddle);
  border-radius: 999px;
  padding: 0.1rem 0.6rem;
  font-size: 0.75rem;
  font-weight: 600;
}
.p-card__body { padding: 0.7rem 0.15rem 0; }
.p-card__name { font-family: var(--font-body); font-size: 1rem; font-weight: 600; color: var(--espresso); margin: 0 0 0.15rem; }
.p-card__meta { font-size: 0.85rem; color: var(--muted); margin: 0 0 0.25rem; }
.p-card__price { font-size: 1rem; color: var(--text); margin: 0; }
.price-note { font-size: 0.8rem; color: var(--muted); }

/* Section header with a "view all" link */
.section-head { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 0.5rem 1rem; margin-bottom: 1.5rem; }
.section-head h2 { margin: 0; }

/* Lookbook banner */
.banner { display: grid; overflow: hidden; border-radius: var(--radius); background: var(--espresso); color: var(--cream); }
.banner img { width: 100%; height: 100%; object-fit: cover; }
.banner__body { padding: 2rem 1.75rem; }
.banner__body h2 { color: var(--cream); }
.banner__body p { color: var(--sand); }
.banner .btn--secondary { color: var(--cream); border-color: var(--cream); }
.banner .btn--secondary:hover { background: var(--cream); color: var(--espresso); }

/* Product detail page */
.pdp { display: grid; gap: 2rem; padding: 1.5rem 0 3rem; }
.pdp__main {
  aspect-ratio: 1 / 1;
  border-radius: var(--radius);
  overflow: hidden;
  background: #F4ECE1;
  border: 1px solid var(--sand);
}
.pdp__main img { width: 100%; height: 100%; object-fit: cover; }
.pdp__thumbs { display: flex; gap: 0.6rem; margin-top: 0.75rem; list-style: none; padding: 0; }
.pdp__thumb {
  width: 78px; height: 78px;
  padding: 0;
  border: 2px solid var(--sand);
  border-radius: var(--radius-sm);
  overflow: hidden;
  background: none;
  cursor: pointer;
}
.pdp__thumb[aria-pressed="true"] { border-color: var(--saddle); }
.pdp__thumb img { width: 100%; height: 100%; object-fit: cover; }
.pdp__photo-note { font-size: 0.8rem; color: var(--muted); margin-top: 0.5rem; }
.pdp__info h1 { font-size: clamp(1.8rem, 4vw, 2.5rem); margin-bottom: 0.4rem; }
.pdp__price { font-family: var(--font-heading); font-size: 1.6rem; color: var(--espresso); margin: 0 0 0.25rem; }
.pdp__status {
  display: inline-block;
  margin: 0.25rem 0 1.25rem;
  font-size: 0.875rem;
  color: var(--saddle);
  border: 1px dashed var(--saddle);
  border-radius: 999px;
  padding: 0.15rem 0.75rem;
}
.option-group { border: 0; padding: 0; margin: 0 0 1.25rem; }
.option-group legend, .option-label { font-weight: 600; color: var(--espresso); margin-bottom: 0.5rem; display: block; }
.option-group legend span { font-weight: normal; color: var(--muted); }
.swatches { display: flex; flex-wrap: wrap; gap: 0.5rem; }
.swatch input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.swatch span {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 0.4rem 1rem;
  border: 1.5px solid #8C6A50;
  border-radius: 999px;
  background: var(--white);
  cursor: pointer;
  font-size: 0.95rem;
}
.swatch input:checked + span { background: var(--saddle); border-color: var(--saddle); color: var(--cream); }
.swatch input:focus-visible + span { outline: 3px solid var(--saddle); outline-offset: 3px; }
.qty-row { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 0.75rem; margin-bottom: 1rem; }
.qty-row .field { margin: 0; }
.qty-row input[type="number"] {
  width: 5.5rem;
  min-height: 48px;
  padding: 0.6rem 0.75rem;
  font: inherit;
  border: 1.5px solid #8C6A50;
  border-radius: var(--radius-sm);
  background: var(--cream);
}
.add-to-bag { width: 100%; }
.pdp__note { font-size: 0.9rem; color: var(--muted); margin-top: 0.75rem; }
.pdp__details { margin-top: 1.75rem; }
.pdp__details details { background: var(--white); border: 1px solid var(--sand); border-radius: var(--radius-sm); margin-bottom: 0.6rem; }
.pdp__details summary { cursor: pointer; padding: 0.9rem 1.1rem; font-weight: 600; color: var(--espresso); }
.pdp__details details > div { padding: 0 1.1rem 0.75rem; font-size: 0.97rem; }
.spec-table { width: 100%; border-collapse: collapse; font-size: 0.95rem; }
.spec-table th, .spec-table td { text-align: left; padding: 0.45rem 0; border-top: 1px dashed var(--sand); vertical-align: top; }
.spec-table th { width: 40%; color: var(--espresso); font-weight: 600; padding-right: 0.75rem; }

/* "Added to bag" message */
.toast {
  position: fixed;
  left: 1rem; right: 1rem; bottom: 1rem;
  z-index: 120;
  max-width: 26rem;
  margin: 0 auto;
  background: var(--espresso);
  color: var(--cream);
  border-radius: var(--radius);
  padding: 0.9rem 1.1rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  box-shadow: 0 10px 30px rgba(59, 36, 23, 0.25);
}
.toast[hidden] { display: none; }
.toast a { color: var(--cream); font-weight: 600; }

/* Bag page */
.bag-layout { display: grid; gap: 2rem; align-items: start; padding-bottom: 3rem; }
.bag-list { list-style: none; padding: 0; margin: 0; }
.bag-item {
  display: grid;
  grid-template-columns: 84px 1fr;
  gap: 1rem;
  padding: 1rem 0;
  border-bottom: 1px dashed var(--sand);
}
.bag-item img { width: 84px; height: 84px; object-fit: cover; border-radius: var(--radius-sm); background: #F4ECE1; }
.bag-item h3 { font-family: var(--font-body); font-size: 1rem; font-weight: 600; margin: 0 0 0.2rem; }
.bag-item h3 a { color: var(--espresso); text-decoration: none; }
.bag-item__meta { font-size: 0.875rem; color: var(--muted); margin: 0 0 0.5rem; }
.bag-item__controls { display: flex; flex-wrap: wrap; align-items: center; gap: 0.75rem; }
.bag-item__controls input { width: 4.5rem; min-height: 40px; padding: 0.4rem 0.6rem; font: inherit; border: 1.5px solid #8C6A50; border-radius: var(--radius-sm); background: var(--cream); }
.bag-item__price { font-weight: 600; margin-left: auto; }
.bag-summary { padding: 1.5rem; }
.bag-summary h2 { font-size: 1.35rem; }
.summary-row { display: flex; justify-content: space-between; gap: 1rem; padding: 0.35rem 0; }
.summary-row--total { border-top: 1px dashed var(--tan); margin-top: 0.5rem; padding-top: 0.75rem; font-weight: 700; font-size: 1.1rem; }
.bag-empty { padding: 2rem 0 3rem; }

/* About page */
.about-grid { display: grid; gap: 2rem; align-items: center; }
.about-grid img { border-radius: var(--radius); border: 1px solid var(--sand); }
.figure-note { font-size: 0.85rem; color: var(--muted); margin-top: 0.5rem; }
.values { display: grid; gap: 1.25rem; }
.values .card { padding: 1.5rem; }
.values p { margin: 0; color: var(--muted); }

@media (min-width: 640px) {
  .product-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 2rem 1.25rem; }
  .values { grid-template-columns: repeat(3, 1fr); }
}
@media (min-width: 960px) {
  .product-grid--4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .pdp { grid-template-columns: 1.1fr 1fr; gap: 3rem; }
  .pdp__info { position: sticky; top: 90px; align-self: start; }
  .banner { grid-template-columns: 1.2fr 1fr; }
  .banner__body { padding: 3rem; align-self: center; }
  .bag-layout { grid-template-columns: 1.5fr 1fr; }
  .about-grid { grid-template-columns: 1fr 1fr; }
  .site-nav { margin-left: auto; margin-right: 1rem; }
}
@media (prefers-reduced-motion: reduce) {
  .p-card__link:hover .p-card__media img:only-child { transform: none; }
}

/* Four-column category tiles and footer */
.grid--4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid--4 .tile img { aspect-ratio: 1 / 1; object-fit: cover; }
.grid--4 .tile__body { padding: 0.9rem 1rem 1.1rem; }
@media (min-width: 640px) { .footer-grid--4 { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 960px) {
  .grid--4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .footer-grid--4 { grid-template-columns: 1.4fr 1fr 1fr 1fr; }
}

/* ==========================================================================
   17. "Ask Hidara" chatbot (markup is added by js/main.js)
   ========================================================================== */
.chat-launcher {
  position: fixed;
  right: 1rem; bottom: 4.5rem; /* sits above the "Powered by Netlify" badge */
  z-index: 90;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  min-height: 48px;
  padding: 0.6rem 1.1rem;
  border: 0;
  border-radius: 999px;
  background: var(--saddle);
  color: var(--cream);
  font: 600 0.95rem var(--font-body);
  cursor: pointer;
  box-shadow: 0 8px 22px rgba(59, 36, 23, 0.28);
}
.chat-launcher:hover { background: var(--espresso); }
.chat-launcher svg { width: 22px; height: 22px; }
.chat-launcher.is-open { background: var(--espresso); }

.chat-panel {
  position: fixed;
  right: 1rem; bottom: 8.25rem;
  z-index: 95;
  width: min(380px, calc(100vw - 2rem));
  max-height: min(560px, calc(100vh - 10rem));
  display: flex;
  flex-direction: column;
  background: var(--white);
  border: 1px solid var(--tan);
  border-radius: var(--radius);
  box-shadow: 0 14px 40px rgba(59, 36, 23, 0.25);
  overflow: hidden;
}
.chat-panel[hidden] { display: none; }
.chat-panel__head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.9rem 1rem;
  background: var(--espresso);
  color: var(--cream);
}
.chat-panel__head h2 { color: var(--cream); font-size: 1.15rem; margin: 0; }
.chat-panel__head p { margin: 0; font-size: 0.8rem; color: var(--sand); }
.chat-close {
  width: 36px; height: 36px;
  border: 1px solid rgba(251, 246, 239, 0.4);
  border-radius: 50%;
  background: transparent;
  color: var(--cream);
  font-size: 1.3rem;
  line-height: 1;
  cursor: pointer;
}
.chat-panel :focus-visible { outline-color: var(--saddle); }
.chat-panel__head :focus-visible { outline-color: var(--sand); }

.chat-log {
  flex: 1;
  overflow-y: auto;
  padding: 1rem;
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
  background: var(--cream);
  min-height: 160px;
}
.chat-msg {
  max-width: 88%;
  padding: 0.6rem 0.85rem;
  border-radius: 14px;
  font-size: 0.93rem;
  line-height: 1.5;
  overflow-wrap: anywhere;
}
.chat-msg--bot { align-self: flex-start; background: var(--white); border: 1px solid var(--sand); border-bottom-left-radius: 4px; }
.chat-msg--user { align-self: flex-end; background: var(--saddle); color: var(--cream); border-bottom-right-radius: 4px; }
.chat-typing { letter-spacing: 0.2em; color: var(--muted); }

.chat-quick {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  padding: 0.6rem 1rem 0;
  background: var(--white);
}
.chat-chip {
  min-height: 34px;
  padding: 0.3rem 0.75rem;
  border: 1px solid var(--saddle);
  border-radius: 999px;
  background: var(--white);
  color: var(--saddle);
  font: 600 0.82rem var(--font-body);
  cursor: pointer;
}
.chat-chip:hover { background: var(--sand); }

.chat-form { display: flex; gap: 0.5rem; padding: 0.75rem 1rem 0.4rem; background: var(--white); }
.chat-form input {
  flex: 1;
  min-width: 0;
  min-height: 44px;
  padding: 0.5rem 0.75rem;
  font: inherit;
  font-size: 0.95rem;
  border: 1.5px solid #8C6A50;
  border-radius: 999px;
  background: var(--cream);
}
.chat-send {
  min-height: 44px;
  padding: 0 1rem;
  border: 0;
  border-radius: 999px;
  background: var(--saddle);
  color: var(--cream);
  font: 600 0.9rem var(--font-body);
  cursor: pointer;
}
.chat-send:hover { background: var(--espresso); }
.chat-note { margin: 0; padding: 0 1rem 0.7rem; font-size: 0.75rem; color: var(--muted); background: var(--white); }

/* Keep the "Added to bag" message clear of the chat button */
.toast { bottom: 8.25rem; }

@media (max-width: 480px) {
  .chat-launcher span { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0, 0, 0, 0); }
  .chat-launcher { padding: 0.6rem; width: 52px; height: 52px; justify-content: center; }
  .chat-panel { right: 0.5rem; left: 0.5rem; width: auto; bottom: 8rem; }
}
@media print { .chat-launcher, .chat-panel { display: none !important; } }
