/* ============================================================
   Caresoft Foundation Crafts — design system
   Palette taken from the CF mark (red + blue) and from the
   material itself: raw clay slip, fired body, kiln ash.
   Display face is Marcellus — inscriptional Roman capitals,
   the closest type equivalent to a stamp pressed into wet clay.
   ============================================================ */

:root {
  /* colour */
  --ink:        #1a1410;   /* fired dark, near-black brown */
  --kiln:       #2a211b;
  --clay:       #b2542f;   /* unglazed terracotta body */
  --clay-deep:  #8c3f22;
  --slip:       #f2ebe3;   /* raw slip — page ground */
  --slip-2:     #e8ded2;
  --paper:      #fffdfa;
  --ash:        #8a8078;   /* kiln ash — muted text & rules */
  --rule:       #ddd2c4;
  --cf-red:     #e01b22;   /* from the mark */
  --cf-blue:    #0089cf;   /* from the mark */
  --good:       #2e7d4f;
  --warn:       #b3620a;

  /* type */
  --display: "Marcellus", "Cormorant Garamond", Georgia, serif;
  --body:    "Karla", -apple-system, "Segoe UI", Roboto, sans-serif;
  --mono:    "IBM Plex Mono", ui-monospace, "SF Mono", Menlo, monospace;

  --step--1: clamp(.78rem, .76rem + .1vw, .84rem);
  --step-0:  clamp(.95rem, .92rem + .15vw, 1.03rem);
  --step-1:  clamp(1.15rem, 1.08rem + .35vw, 1.35rem);
  --step-2:  clamp(1.45rem, 1.3rem + .7vw, 1.95rem);
  --step-3:  clamp(1.9rem, 1.6rem + 1.4vw, 2.9rem);
  --step-4:  clamp(2.4rem, 1.9rem + 2.4vw, 4.2rem);

  --gap:  clamp(1rem, .7rem + 1.4vw, 2rem);
  --bay:  clamp(2.6rem, 1.8rem + 3.4vw, 5.5rem);   /* vertical section rhythm */

  /* the arch: a pottery niche / kiln mouth */
  --arch: 46% 46% 3px 3px / 34% 34% 3px 3px;
}

*, *::before, *::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; }
}

body {
  margin: 0;
  font-family: var(--body);
  font-size: var(--step-0);
  line-height: 1.62;
  color: var(--ink);
  background: var(--slip);
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4, .display {
  font-family: var(--display);
  font-weight: 400;
  line-height: 1.12;
  letter-spacing: -.005em;
  margin: 0 0 .5em;
}
h1 { font-size: var(--step-3); }
h2 { font-size: var(--step-2); }
h3 { font-size: var(--step-1); }

p { margin: 0 0 1em; }
a { color: var(--ink); text-decoration-color: var(--rule); text-underline-offset: .22em; }
a:hover { text-decoration-color: var(--clay); }
:focus-visible { outline: 2px solid var(--cf-blue); outline-offset: 3px; border-radius: 2px; }

.wrap { width: min(1220px, 100% - 2.4rem); margin-inline: auto; }
.wrap--narrow { width: min(760px, 100% - 2.4rem); }
.bay { padding-block: var(--bay); }
.rule { border: 0; border-top: 1px solid var(--rule); margin: 0; }

/* eyebrow: used only where it encodes something real (craft, place, series) */
.eyebrow {
  font-family: var(--mono);
  font-size: .68rem;
  letter-spacing: .2em;
  text-transform: uppercase;
  color: var(--ash);
  display: block;
  margin-bottom: .7em;
}

.lede { font-size: var(--step-1); line-height: 1.5; color: var(--kiln); max-width: 46ch; }
.muted { color: var(--ash); }
.num { font-family: var(--mono); font-variant-numeric: tabular-nums; }

/* ---------------------------------------------------- header */
.topbar {
  background: var(--ink); color: var(--slip);
  font-size: .78rem; letter-spacing: .04em; padding: .5rem 0;
}
.topbar .wrap { display: flex; justify-content: space-between; align-items: center; gap: 1rem; flex-wrap: wrap; }
.topbar a { color: var(--slip); }

.masthead { background: var(--paper); border-bottom: 1px solid var(--rule); position: sticky; top: 0; z-index: 60; }
.masthead .wrap { display: flex; align-items: center; gap: var(--gap); padding: .9rem 0; }
.masthead__logo img { height: 46px; width: auto; display: block; }
.nav { display: flex; gap: 1.5rem; margin-left: auto; align-items: center; }
.nav a {
  font-size: .9rem; letter-spacing: .02em; text-decoration: none; padding: .35rem 0;
  border-bottom: 1px solid transparent;
}
.nav a:hover, .nav a[aria-current="page"] { border-bottom-color: var(--clay); }
.nav__actions { display: flex; gap: 1.1rem; align-items: center; }
.cart-pip {
  display: inline-grid; place-items: center; min-width: 1.35rem; height: 1.35rem; padding: 0 .35rem;
  background: var(--cf-red); color: #fff; border-radius: 999px;
  font-family: var(--mono); font-size: .7rem; margin-left: .35rem;
}
.navtoggle { display: none; background: none; border: 1px solid var(--rule); padding: .45rem .7rem; font: inherit; }
@media (max-width: 860px) {
  .navtoggle { display: block; margin-left: auto; }
  .nav { display: none; width: 100%; flex-direction: column; align-items: flex-start; gap: .2rem; margin: 0; padding-bottom: .8rem; }
  .nav.open { display: flex; }
  .masthead .wrap { flex-wrap: wrap; }
  .nav__actions { flex-direction: row; padding-top: .6rem; }
}

/* ---------------------------------------------------- buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .5rem;
  font-family: var(--body); font-size: .92rem; font-weight: 600; letter-spacing: .02em;
  padding: .8rem 1.5rem; border: 1px solid var(--ink); background: var(--ink); color: var(--slip);
  cursor: pointer; text-decoration: none; transition: background .18s, color .18s, border-color .18s;
}
.btn:hover { background: var(--clay-deep); border-color: var(--clay-deep); color: #fff; }
.btn--ghost { background: transparent; color: var(--ink); }
.btn--ghost:hover { background: var(--ink); color: var(--slip); }
.btn--clay { background: var(--clay); border-color: var(--clay); color: #fff; }
.btn--sm { padding: .5rem 1rem; font-size: .82rem; }
.btn--wide { width: 100%; }
.btn[disabled] { opacity: .45; cursor: not-allowed; }

/* ---------------------------------------------------- hero
   The thesis: a single piece, photographed as an object, with the
   maker named beside it. The product and the person share the frame. */
.hero { background: var(--paper); border-bottom: 1px solid var(--rule); overflow: hidden; }
.hero__grid { display: grid; grid-template-columns: 1.05fr .95fr; align-items: center; gap: var(--bay); }
.hero__copy { padding-block: var(--bay); }
.hero h1 { font-size: var(--step-4); margin-bottom: .35em; }
.hero__figure { position: relative; align-self: stretch; min-height: 60vh; }
.hero__figure img { width: 100%; height: 100%; object-fit: cover; border-radius: var(--arch); display: block; padding: 17px;}
@media (max-width: 900px) {
  .hero__grid { grid-template-columns: 1fr; gap: 0; }
  .hero__figure { min-height: 46vh; margin-bottom: var(--gap); }
}

/* ---------------------------------------------------- SIGNATURE: the maker's stamp
   Potters press a seal into the base of a piece. Every product here
   carries one, showing the artisan's code and district. */
.stamp {
  --d: 76px;
  width: var(--d); height: var(--d); border-radius: 50%;
  display: grid; place-content: center; text-align: center;
  border: 1.5px solid var(--clay); color: var(--clay-deep);
  font-family: var(--mono); background: var(--paper);
  position: relative; flex: none;
}
.stamp::before {
  content: ""; position: absolute; inset: 4px; border-radius: 50%;
  border: 1px dashed color-mix(in srgb, var(--clay) 45%, transparent);
}
.stamp__initials { font-size: .95rem; letter-spacing: .1em; line-height: 1; font-weight: 600; }
.stamp__place { font-size: .5rem; letter-spacing: .1em; text-transform: uppercase; margin-top: .2rem; opacity: .8; }
.stamp--sm { --d: 52px; }
.stamp--sm .stamp__initials { font-size: .72rem; }
.stamp--sm .stamp__place { font-size: .42rem; }

/* the maker line — artisan identity attached to every piece */
.maker { display: flex; align-items: center; gap: .8rem; }
.maker__name { font-family: var(--display); font-size: 1.05rem; line-height: 1.2; }
.maker__where { font-size: .78rem; color: var(--ash); }

/* artisan share bar — the transparency device */
.share-bar { margin: .9rem 0; }
.share-bar__track { height: 6px; background: var(--slip-2); position: relative; overflow: hidden; }
.share-bar__fill { position: absolute; inset: 0 auto 0 0; background: var(--clay); }
.share-bar__label { display: flex; justify-content: space-between; font-size: .76rem; color: var(--ash); margin-top: .4rem; }
.share-bar__label b { color: var(--clay-deep); font-family: var(--mono); }

/* ---------------------------------------------------- product grid */
.grid { display: grid; gap: var(--gap); }
.grid--4 { grid-template-columns: repeat(4, 1fr); }
.grid--3 { grid-template-columns: repeat(3, 1fr); }
.grid--2 { grid-template-columns: repeat(2, 1fr); }
@media (max-width: 1024px) { .grid--4 { grid-template-columns: repeat(3, 1fr); } }
@media (max-width: 780px)  { .grid--4, .grid--3 { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 480px)  { .grid--4, .grid--3, .grid--2 { grid-template-columns: 1fr; } }

.card { background: transparent; position: relative; }
.card__media { position: relative; aspect-ratio: 4 / 5; overflow: hidden; background: var(--slip-2); border-radius: var(--arch); }
.card__media img { width: 100%; height: 100%; object-fit: cover; transition: transform .5s cubic-bezier(.2,.7,.3,1); }
.card:hover .card__media img { transform: scale(1.035); }
.card__stamp { position: absolute; right: .7rem; bottom: .7rem; }
.card__flag {
  position: absolute; left: 0; top: 1rem; background: var(--ink); color: var(--slip);
  font-family: var(--mono); font-size: .62rem; letter-spacing: .14em; text-transform: uppercase; padding: .3rem .7rem;
}
.card__flag--sale { background: var(--cf-red); }
.card__body { padding-top: .9rem; }
.card__craft { font-family: var(--mono); font-size: .64rem; letter-spacing: .16em; text-transform: uppercase; color: var(--ash); }
.card__title { font-family: var(--display); font-size: 1.08rem; line-height: 1.25; margin: .3rem 0 .35rem; }
.card__title a { text-decoration: none; }
.card__title a:hover { text-decoration: underline; text-decoration-color: var(--clay); }
.card__by { font-size: .8rem; color: var(--ash); margin-bottom: .5rem; }
.card__price { font-family: var(--mono); font-size: .98rem; display: flex; gap: .55rem; align-items: baseline; }
.card__mrp { color: var(--ash); text-decoration: line-through; font-size: .82rem; }
.card__off { color: var(--cf-red); font-size: .78rem; }
.card__soldout { color: var(--ash); font-size: .8rem; letter-spacing: .04em; }

/* ---------------------------------------------------- product page */
.pdp { display: grid; grid-template-columns: 1.05fr .95fr; gap: var(--bay); align-items: start; }
@media (max-width: 940px) { .pdp { grid-template-columns: 1fr; } }
.pdp__gallery { display: grid; gap: .6rem; }
.pdp__main { aspect-ratio: 1; overflow: hidden; border-radius: var(--arch); background: var(--slip-2); }
.pdp__main img { width: 100%; height: 100%; object-fit: cover; }
.pdp__thumbs { display: grid; grid-template-columns: repeat(5, 1fr); gap: .6rem; }
.pdp__thumbs button { padding: 0; border: 1px solid var(--rule); background: none; aspect-ratio: 1; overflow: hidden; cursor: pointer; }
.pdp__thumbs button[aria-pressed="true"] { border-color: var(--clay); }
.pdp__thumbs img { width: 100%; height: 100%; object-fit: cover; }
.price-row { display: flex; align-items: baseline; gap: .8rem; margin: .4rem 0 .2rem; }
.price-now { font-family: var(--mono); font-size: var(--step-2); }
.price-mrp { font-family: var(--mono); color: var(--ash); text-decoration: line-through; }
.price-off { color: var(--cf-red); font-size: .9rem; }
.spec { width: 100%; border-collapse: collapse; margin: 1.2rem 0; font-size: .9rem; }
.spec th, .spec td { text-align: left; padding: .55rem 0; border-bottom: 1px solid var(--rule); vertical-align: top; }
.spec th { font-weight: 500; color: var(--ash); width: 38%; }
.qty { display: inline-flex; border: 1px solid var(--ink); }
.qty button { width: 2.6rem; height: 2.9rem; border: 0; background: none; font: inherit; font-size: 1.1rem; cursor: pointer; }
.qty input { width: 3rem; border: 0; border-inline: 1px solid var(--ink); text-align: center; font-family: var(--mono); background: none; }

/* delivery checker */
.pincheck { border: 1px solid var(--rule); padding: 1rem; margin: 1.2rem 0; background: var(--paper); }
.pincheck__row { display: flex; gap: .5rem; }
.pincheck input { flex: 1; padding: .6rem .8rem; border: 1px solid var(--rule); font: inherit; font-family: var(--mono); background: var(--paper); }
.pincheck__out { margin-top: .7rem; font-size: .87rem; }

/* ---------------------------------------------------- AEO answer block
   The paragraph an answer engine will lift. Visually it reads as the
   editor's summary, so it earns its place for humans too. */
.answer-block {
  border-left: 3px solid var(--clay); padding: .1rem 0 .1rem 1.2rem;
  margin: 1.4rem 0 2rem; max-width: 62ch;
}
.answer-block__text { font-size: 1.03rem; line-height: 1.62; margin: 0; }
.answer-block__facts { display: grid; grid-template-columns: auto 1fr; gap: .25rem 1.2rem; margin: .9rem 0 0; font-size: .87rem; }
.answer-block__facts dt { color: var(--ash); }
.answer-block__facts dd { margin: 0; font-family: var(--mono); }

/* ---------------------------------------------------- FAQ */
.faqs { margin-block: var(--bay); }
.faq { border-bottom: 1px solid var(--rule); }
.faq summary {
  cursor: pointer; list-style: none; padding: 1.05rem 2rem 1.05rem 0; position: relative;
  font-family: var(--display); font-size: 1.08rem;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after {
  content: "+"; position: absolute; right: .3rem; top: 50%; transform: translateY(-50%);
  font-family: var(--mono); color: var(--clay); font-size: 1.2rem;
}
.faq[open] summary::after { content: "−"; }
.faq__a { padding: 0 0 1.1rem; max-width: 62ch; color: var(--kiln); }
.faq__a p:last-child { margin-bottom: 0; }

/* ---------------------------------------------------- misc blocks */
.crumbs ol { list-style: none; display: flex; flex-wrap: wrap; gap: .5rem; padding: 0; margin: 0 0 1.2rem; font-size: .8rem; color: var(--ash); }
.crumbs li + li::before { content: "/"; margin-right: .5rem; color: var(--rule); }
.crumbs a { text-decoration: none; color: var(--ash); }
.crumbs a:hover { color: var(--clay); }

.section-title { font-size: var(--step-2); margin-bottom: .8em; }
.section-head { display: flex; justify-content: space-between; align-items: baseline; gap: 1rem; margin-bottom: var(--gap); }
.section-head a { font-size: .85rem; white-space: nowrap; }

.impact { background: var(--ink); color: var(--slip); }
.impact .wrap { display: grid; grid-template-columns: repeat(3, 1fr); gap: var(--gap); padding-block: var(--bay); }
.impact__n { font-family: var(--display); font-size: var(--step-3); line-height: 1; color: var(--slip); }
.impact__l { font-size: .84rem; color: color-mix(in srgb, var(--slip) 65%, transparent); margin-top: .4rem; }
@media (max-width: 700px) { .impact .wrap { grid-template-columns: 1fr; text-align: left; } }

.notice { border: 1px solid var(--rule); background: var(--paper); padding: .9rem 1.1rem; font-size: .88rem; margin-bottom: 1rem; }
.notice--warn { border-color: var(--warn); color: var(--warn); }
.notice--good { border-color: var(--good); color: var(--good); }
.notice--bad  { border-color: var(--cf-red); color: var(--cf-red); }

/* forms */
label { display: block; font-size: .82rem; color: var(--ash); margin-bottom: .3rem; letter-spacing: .02em; }
.input, input[type=text], input[type=email], input[type=tel], input[type=password], input[type=number], input[type=search], input[type=datetime-local], select, textarea {
  width: 100% ; padding: .72rem .85rem; border: 1px solid var(--rule); background: var(--paper);
  font: inherit; font-size: .95rem; color: var(--ink); border-radius: 0;
}
.input:focus, input:focus, select:focus, textarea:focus { border-color: var(--clay); outline: none; }
.field { margin-bottom: 1rem; }
.field--half { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
@media (max-width: 560px) { .field--half { grid-template-columns: 1fr; } }
.err { color: var(--cf-red); font-size: .8rem; margin-top: .25rem; }

/* cart / checkout */
.line-item { display: grid; grid-template-columns: 88px 1fr auto; gap: 1rem; padding: 1.1rem 0; border-bottom: 1px solid var(--rule); align-items: start; }
.line-item__img { aspect-ratio: 1; overflow: hidden; background: var(--slip-2); }
.line-item__img img { width: 100%; height: 100%; object-fit: cover; }
.totals { font-size: .92rem; }
.totals__row { display: flex; justify-content: space-between; padding: .4rem 0; }
.totals__row b, .totals__row span:last-child { font-family: var(--mono); }
.totals__grand { border-top: 2px solid var(--ink); margin-top: .5rem; padding-top: .8rem; font-size: 1.15rem; }
.panel { background: var(--paper); border: 1px solid var(--rule); padding: var(--gap); }
.sticky { position: sticky; top: 6.2rem; }

/* timeline for order tracking */
.timeline { list-style: none; padding: 0; margin: 1.4rem 0; }
.timeline li { position: relative; padding: 0 0 1.5rem 2rem; border-left: 1px solid var(--rule); }
.timeline li:last-child { border-left-color: transparent; padding-bottom: 0; }
.timeline li::before {
  content: ""; position: absolute; left: -5px; top: .45rem; width: 9px; height: 9px;
  border-radius: 50%; background: var(--slip-2); border: 1px solid var(--rule);
}
.timeline li.done::before { background: var(--clay); border-color: var(--clay); }
.timeline__when { font-family: var(--mono); font-size: .74rem; color: var(--ash); }
.timeline__what { font-family: var(--display); font-size: 1rem; }

/* footer */
.footer { background: var(--ink); color: color-mix(in srgb, var(--slip) 76%, transparent); padding-block: var(--bay) 2rem; margin-top: var(--bay); }
.footer a { color: color-mix(in srgb, var(--slip) 76%, transparent); text-decoration: none; }
.footer a:hover { color: var(--slip); text-decoration: underline; }
.footer__grid { display: grid; grid-template-columns: 1.5fr 1fr 1fr 1fr; gap: var(--gap); }
@media (max-width: 860px) { .footer__grid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 500px) { .footer__grid { grid-template-columns: 1fr; } }
.footer h4 { font-family: var(--mono); font-size: .68rem; letter-spacing: .18em; text-transform: uppercase; color: var(--slip); margin-bottom: 1rem; }
.footer ul { list-style: none; padding: 0; margin: 0; font-size: .88rem; }
.footer li { margin-bottom: .5rem; }
.footer__base { border-top: 1px solid color-mix(in srgb, var(--slip) 15%, transparent); margin-top: var(--bay); padding-top: 1.4rem; font-size: .78rem; display: flex; justify-content: space-between; gap: 1rem; flex-wrap: wrap; }

/* geo page state index */
.state-index { columns: 4 200px; column-gap: var(--gap); font-size: .9rem; }
.state-index a { display: block; padding: .28rem 0; text-decoration: none; break-inside: avoid; }
.state-index a:hover { color: var(--clay); }

/* whatsapp float */
.wa-float {
  position: fixed; right: 1.1rem; bottom: 1.1rem; z-index: 90;
  width: 3.2rem; height: 3.2rem; border-radius: 50%; background: #25d366;
  display: grid; place-items: center; box-shadow: 0 3px 14px rgba(26,20,16,.25);
}
.wa-float svg { width: 1.7rem; height: 1.7rem; fill: #fff; }

.skip { position: absolute; left: -9999px; }
.skip:focus { left: 1rem; top: 1rem; background: var(--ink); color: var(--slip); padding: .7rem 1.2rem; z-index: 999; }
