/* ห้างหุ้นส่วนจำกัด อนัญญา กาแฟ — สไตล์ชีตหลัก
   แนวคิด: ร้านกาแฟและเบเกอรี่เมืองลำปาง ได้แรงบันดาลใจจากชามกระเบื้องเขียนลายของลำปาง
   ภาพอยู่ในกรอบทรงชาม มีขอบปากชามเส้นคู่สีคราม
   เส้นคั่นเป็นลายขอบชาม ใต้หัวข้อเป็นรอยพู่กันสามสี แดง เขียว ดำ
   สี: ขาวกระเบื้อง คราม แดงลายไก่ เขียวใบตอง และชมพูดอกโบตั๋น */

:root {
  --cream: #f8f4ea;
  --porcelain: #fdfcf8;
  --cobalt: #1f3f8a;
  --cobalt-pale: #dce3f2;
  --red: #c8402a;
  --red-text: #a8341f;
  --leaf: #3d7a3a;
  --peony: #e58aa6;
  --ink: #2b2622;
  --muted: #625a53;
  --rule: #e4dccb;

  --display: "Charmonman", "Noto Serif Thai", "Leelawadee UI", Tahoma, serif;
  --body: "Anuphan", "Noto Sans Thai", "Leelawadee UI", Tahoma, sans-serif;

  --s--1: 0.9rem;
  --s-0: 1.04rem;
  --s-1: 1.22rem;
  --s-2: 1.55rem;
  --s-3: 1.95rem;
  --s-4: 2.4rem;
  --s-5: 3.1rem;

  --gutter: clamp(1rem, 4vw, 2.5rem);
  --wrap: 72rem;
}

*, *::before, *::after { box-sizing: border-box; }
html { font-size: 112%; scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--cream); color: var(--ink); font-family: var(--body); font-size: var(--s-0); line-height: 1.8; }
img { display: block; max-width: 100%; height: auto; }

a { color: var(--cobalt); text-underline-offset: 0.2em; }
a:hover { color: var(--red-text); }
a[href^="mailto:"] { overflow-wrap: anywhere; }
:focus-visible { outline: 3px solid var(--cobalt); outline-offset: 3px; }

h1, h2 { font-family: var(--display); font-weight: 700; line-height: 1.45; margin: 0; text-wrap: balance; }
h3 { font-family: var(--body); font-weight: 700; line-height: 1.5; margin: 0; }
h1 { font-size: clamp(var(--s-3), 4.4vw, var(--s-5)); line-height: 1.38; }
h2 { font-size: clamp(var(--s-2), 3.1vw, var(--s-4)); }
h3 { font-size: var(--s-1); }
p { margin: 0 0 1em; max-width: 40em; }
p:last-child { margin-bottom: 0; }
ul, ol { margin: 0; padding: 0; }
.nw { white-space: nowrap; }

.wrap { width: min(100% - 2 * var(--gutter), var(--wrap)); margin-inline: auto; }
.skip { position: absolute; left: -999px; top: 0; background: var(--cobalt); color: #fff; padding: 0.6em 1em; z-index: 60; }
.skip:focus { left: 0; }

/* พื้นสำรองเมื่อภาพโหลดไม่ขึ้น: ลายชามกระเบื้อง */
.bowlbg {
  background:
    radial-gradient(circle at 30% 35%, rgba(229,138,166,.55) 0 9%, transparent 10%),
    radial-gradient(circle at 70% 60%, rgba(61,122,58,.4) 0 7%, transparent 8%),
    radial-gradient(circle at 55% 25%, rgba(200,64,42,.35) 0 6%, transparent 7%),
    var(--porcelain);
}

/* ลายขอบชาม: เส้นคู่สีครามกับจุดดอกไม้ */
.rim { height: 1.4rem; background:
    linear-gradient(var(--cobalt), var(--cobalt)) 0 0 / 100% 3px no-repeat,
    linear-gradient(var(--cobalt), var(--cobalt)) 0 100% / 100% 3px no-repeat,
    radial-gradient(circle, var(--peony) 0 4px, transparent 5px) 0 50% / 28px 100% repeat-x,
    radial-gradient(circle, var(--leaf) 0 2.5px, transparent 3.5px) 14px 50% / 28px 100% repeat-x,
    var(--porcelain); }

/* รอยพู่กันสามสีใต้หัวข้อ */
.brush { display: flex; gap: 0.3rem; margin-top: 0.75rem; align-items: center; }
.brush i { display: block; height: 0.42rem; border-radius: 0.3rem 1rem 0.3rem 1rem; }
.brush i:nth-child(1) { width: 2.4rem; background: var(--red); }
.brush i:nth-child(2) { width: 1.4rem; background: var(--leaf); }
.brush i:nth-child(3) { width: 0.8rem; background: var(--ink); }
.band--cobalt .brush i:nth-child(3), .page-head .brush i:nth-child(3) { background: #fff; }

/* ---------- ส่วนหัว ---------- */
.site-head { background: var(--porcelain); position: sticky; top: 0; z-index: 30; box-shadow: 0 3px 0 var(--cobalt), 0 7px 0 var(--porcelain), 0 9px 0 var(--cobalt); }
.site-head__row { display: flex; align-items: center; justify-content: space-between; gap: 1rem; min-height: 4.6rem; }
.brand { display: flex; align-items: center; gap: 0.7rem; color: var(--ink); text-decoration: none; }
.brand:hover { color: var(--ink); }
.brand svg { width: 2.9rem; height: 2.9rem; flex: none; }
.brand__name { display: block; font-family: var(--display); font-weight: 700; font-size: 1.3rem; line-height: 1.35; }
.brand__legal { display: block; font-size: 0.78rem; color: var(--muted); line-height: 1.3; }

.nav ul { list-style: none; display: flex; gap: 0.2rem; }
.nav a { display: block; padding: 0.35em 0.85em; color: var(--ink); text-decoration: none; font-weight: 700; font-size: 0.96rem; border-radius: 999px; }
.nav a:hover { background: var(--cobalt-pale); }
.nav a[aria-current="page"] { background: var(--cobalt); color: #fff; }

.nav-toggle { display: none; font: inherit; font-weight: 700; cursor: pointer; background: var(--cobalt); color: #fff; border: 0; border-radius: 999px; padding: 0.25em 1.1em; }
@media (max-width: 68rem) {
  .nav-toggle { display: block; }
  .nav { display: none; position: absolute; left: 0; right: 0; top: calc(100% + 9px); background: var(--porcelain); border-bottom: 3px solid var(--cobalt); padding: 0.6rem var(--gutter) 1rem; }
  .nav.is-open { display: block; }
  .nav ul { flex-direction: column; gap: 0.2rem; }
  .nav a { padding: 0.55em 0.9em; }
}
@media (max-width: 34rem) { .brand__legal { display: none; } }

/* ---------- ปุ่ม ---------- */
.btn { display: inline-block; font-family: var(--body); font-weight: 700; font-size: 1.04rem; line-height: 1.4;
  padding: 0.7em 1.6em; border-radius: 999px; cursor: pointer; text-decoration: none; background: var(--red); color: #fff; border: 2px solid var(--red); }
.btn:hover { background: var(--red-text); border-color: var(--red-text); color: #fff; }
.btn--line { background: transparent; border-color: var(--cobalt); color: var(--cobalt); }
.btn--line:hover { background: var(--cobalt); color: #fff; }
.band--cobalt .btn { color: #fff; }
.band--cobalt .btn--line { border-color: #fff; color: #fff; }
.band--cobalt .btn--line:hover { background: #fff; color: var(--cobalt); }
.btn-row { display: flex; flex-wrap: wrap; gap: 0.8rem; margin-top: 1.6rem; }

/* ---------- ภาพในกรอบทรงชาม ---------- */
.photo { margin: 0; }
.photo__frame { position: relative; aspect-ratio: 4 / 3; overflow: hidden; border-radius: 0.6rem 0.6rem 45% 45% / 0.6rem 0.6rem 30% 30%; border: 3px solid var(--cobalt); }
.photo__frame::before { content: ""; position: absolute; left: 0; right: 0; top: 0; height: 0.7rem; z-index: 1; background:
    linear-gradient(var(--cobalt), var(--cobalt)) 0 100% / 100% 2px no-repeat, var(--porcelain); }
.photo--square .photo__frame { aspect-ratio: 1; }
.photo--tall .photo__frame { aspect-ratio: 4 / 5; }
.photo__frame img { width: 100%; height: 100%; object-fit: cover; }
.photo figcaption { font-size: 0.76rem; color: var(--muted); margin-top: 0.45rem; text-align: center; }
.photo figcaption a { color: inherit; }
.band--cobalt .photo figcaption { color: var(--cobalt-pale); }
img.is-missing { visibility: hidden; }

/* ---------- แบนเนอร์หน้าแรก ---------- */
.hero { position: relative; overflow: hidden; padding: clamp(2.6rem, 6vw, 4.6rem) 0 clamp(3rem, 7vw, 5rem); }
.hero::before { content: ""; position: absolute; right: -10rem; top: -6rem; width: 40rem; height: 40rem; border-radius: 50%; border: 3px solid var(--cobalt-pale); box-shadow: inset 0 0 0 1rem var(--cream), inset 0 0 0 1.2rem var(--cobalt-pale); }
.hero__grid { position: relative; display: grid; gap: clamp(2rem, 5vw, 4rem); grid-template-columns: minmax(0, 1.05fr) minmax(0, 0.95fr); align-items: center; }
@media (max-width: 58rem) { .hero__grid { grid-template-columns: 1fr; } }
.hero__place { font-weight: 700; letter-spacing: 0.08em; color: var(--red-text); margin-bottom: 0.4rem; }
.hero__lead { font-size: var(--s-1); line-height: 1.8; color: var(--muted); margin-top: 1.1rem; max-width: 31em; }
.hero__chips { list-style: none; display: flex; flex-wrap: wrap; gap: 0.5rem; margin-top: 1.6rem; }
.hero__chips li { background: var(--porcelain); border: 1px solid var(--rule); border-radius: 999px; padding: 0.25em 0.95em; font-size: 0.94rem; }
.hero__chips a { color: var(--ink); font-weight: 700; text-decoration: none; white-space: nowrap; }
.hero__chips a:hover { text-decoration: underline; }
.hero .photo { width: min(100%, 30rem); margin-inline: auto; }

/* ---------- แบนเนอร์หน้าใน ---------- */
.page-head { position: relative; overflow: hidden; color: #fff; background: var(--cobalt); }
.page-head__media { position: absolute; inset: 0; }
.page-head__media img { width: 100%; height: 100%; object-fit: cover; }
.page-head__media::after { content: ""; position: absolute; inset: 0; background: linear-gradient(95deg, rgba(23,44,96,.95) 0%, rgba(23,44,96,.84) 50%, rgba(23,44,96,.3) 100%); }
.page-head__body { position: relative; z-index: 1; padding: clamp(2.6rem, 7vw, 4.4rem) 0; max-width: 40rem; }
.page-head__body p { font-size: var(--s-1); line-height: 1.8; margin-top: 1rem; color: var(--cobalt-pale); }
.page-head__credit { position: absolute; z-index: 1; right: 0.7rem; bottom: 0.5rem; font-size: 0.72rem; line-height: 1.5; color: #fff; background: rgba(23,44,96,.78); padding: 0.1em 0.7em; border-radius: 999px; }
.page-head__credit a { color: inherit; }

/* ---------- ส่วนเนื้อหา ---------- */
.band { padding: clamp(3rem, 7vw, 5rem) 0; }
.band--white { background: var(--porcelain); }
.band--cobalt { background: var(--cobalt); color: #fff; }
.band--cobalt p { color: var(--cobalt-pale); }
.band--cobalt a { color: #fff; }
.band__head { margin-bottom: clamp(1.8rem, 4vw, 2.6rem); max-width: 44rem; }
.band__head p { margin-top: 0.9rem; color: var(--muted); font-size: var(--s-1); line-height: 1.8; }
.band--cobalt .band__head p { color: var(--cobalt-pale); }
.lead-gap { margin-top: 1.3rem; }

.split { display: grid; gap: clamp(1.8rem, 5vw, 4rem); grid-template-columns: minmax(0, 1.1fr) minmax(0, 0.9fr); align-items: center; }
.split--top { align-items: start; }
.split--flip { grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr); }
@media (max-width: 54rem) { .split, .split--flip { grid-template-columns: 1fr; } }

/* หมวดสินค้า */
.groups { list-style: none; display: grid; gap: clamp(1.2rem, 2.5vw, 1.8rem); grid-template-columns: repeat(4, minmax(0, 1fr)); }
@media (max-width: 62rem) { .groups { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 34rem) { .groups { grid-template-columns: 1fr; } }
.groups h3 { margin-top: 0.8rem; text-align: center; }
.groups p { margin-top: 0.3rem; color: var(--muted); text-align: center; }

.cards { list-style: none; display: grid; gap: 1.1rem; grid-template-columns: repeat(3, minmax(0, 1fr)); }
@media (max-width: 58rem) { .cards { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 36rem) { .cards { grid-template-columns: 1fr; } }
.cards li { background: var(--porcelain); padding: 1.3rem 1.4rem 1.5rem; border-radius: 1rem; border: 2px solid var(--cobalt-pale); position: relative; }
.cards li::before { content: ""; position: absolute; left: 1.4rem; top: -0.45rem; width: 0.9rem; height: 0.9rem; border-radius: 50%; background: var(--peony); box-shadow: 1.1rem 0 0 -0.15rem var(--leaf); }
.band--white .cards li { background: var(--cream); }
.cards p { margin-top: 0.35rem; color: var(--muted); }
.band--cobalt .cards li { background: rgba(255,255,255,.08); border-color: rgba(255,255,255,.2); }
.band--cobalt .cards h3 { color: #fff; }
.band--cobalt .cards p { color: var(--cobalt-pale); }

.flow { list-style: none; counter-reset: fl; display: grid; gap: 1.8rem 1.5rem; grid-template-columns: repeat(4, minmax(0, 1fr)); }
@media (max-width: 58rem) { .flow { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 32rem) { .flow { grid-template-columns: 1fr; } }
.flow li { counter-increment: fl; }
.flow li::before { content: counter(fl); display: grid; place-items: center; width: 2.7rem; height: 2.7rem; border-radius: 50%; background: var(--porcelain); border: 3px double var(--cobalt); font-family: var(--display); font-weight: 700; color: var(--red-text); margin-bottom: 0.7rem; }
.flow p { margin-top: 0.3rem; color: var(--muted); }

.note { margin-top: 1.8rem; font-size: 0.95rem; color: var(--muted); }
.band--cobalt .note { color: #c3cde6; }

.deflist { margin: 0; }
.deflist div { display: grid; grid-template-columns: minmax(0, 11rem) minmax(0, 1fr); gap: 0.3rem 1.8rem; padding: 0.95rem 0; border-top: 1px solid var(--rule); }
.deflist div:last-child { border-bottom: 1px solid var(--rule); }
.deflist dt { font-weight: 700; font-size: 1.08rem; line-height: 1.5; }
.deflist dd { margin: 0; color: var(--muted); max-width: 40em; }
@media (max-width: 46rem) { .deflist div { grid-template-columns: 1fr; } }

.ticks { list-style: none; margin-top: 0.8rem; }
.ticks li { position: relative; padding-left: 1.6rem; margin-top: 0.45rem; max-width: 38em; }
.ticks li::before { content: ""; position: absolute; left: 0.1rem; top: 0.55em; width: 0.7rem; height: 0.7rem; border-radius: 50%; background: var(--peony); box-shadow: 0 0 0 2px var(--porcelain), 0 0 0 3.5px var(--leaf); }

/* ---------- รายละเอียด (หน้าสินค้าและบริการ) ---------- */
.item { padding: clamp(2.2rem, 5vw, 3.4rem) 0; border-top: 1px solid var(--rule); }
.item:first-of-type { border-top: 0; padding-top: 0; }
.item:last-of-type { padding-bottom: 0; }
.item h3 { font-family: var(--display); font-size: clamp(var(--s-2), 2.6vw, var(--s-3)); line-height: 1.45; }
.item h4 { font-family: var(--body); font-weight: 700; font-size: 1.06rem; margin: 1.3rem 0 0; }
.item p { margin-top: 0.8rem; }
.item:nth-of-type(even) .split > .photo { order: -1; }
@media (max-width: 54rem) { .item .split > .photo { order: -1; } }

/* ---------- คำถามที่พบบ่อย ---------- */
.faq { max-width: 50rem; }
.faq details { background: var(--porcelain); border-radius: 1rem; margin-top: 0.6rem; padding: 0 1.2rem; border: 1px solid var(--rule); }
.faq summary { cursor: pointer; list-style: none; position: relative; font-weight: 700; font-size: 1.06rem; line-height: 1.55; padding: 0.9rem 2.8rem 0.9rem 0; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; position: absolute; right: 0; top: 50%; transform: translateY(-50%); width: 1.8rem; height: 1.8rem; border-radius: 50%; background: var(--cobalt-pale); color: var(--cobalt); font-family: Tahoma, sans-serif; font-size: 1.2rem; line-height: 1.8rem; text-align: center; }
.faq details[open] summary::after { content: "\2212"; background: var(--cobalt); color: #fff; }
.faq details p { padding: 0 0 1.1rem; color: var(--muted); }

/* ---------- ช่องติดต่อท้ายหน้า ---------- */
.cta { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 0.9fr); gap: clamp(1.8rem, 5vw, 4rem); align-items: center; }
@media (max-width: 54rem) { .cta { grid-template-columns: 1fr; } }
.cta__card { background: var(--porcelain); color: var(--ink); padding: 0.6rem 1.6rem; border-radius: 1.2rem; box-shadow: inset 0 0 0 4px var(--porcelain), inset 0 0 0 6px var(--cobalt); }
.cta__card div { padding: 0.8rem 0.3rem; border-top: 1px solid var(--rule); }
.cta__card div:first-child { border-top: 0; }
.cta__card small { display: block; font-size: var(--s--1); color: var(--muted); }
.cta__card b, .band--cobalt .cta__card a { font-weight: 700; font-size: 1.08rem; line-height: 1.6; color: var(--ink); text-decoration: none; overflow-wrap: anywhere; }
.band--cobalt .cta__card a:hover { color: var(--red-text); text-decoration: underline; }
.cta__card .ln { display: block; }

/* ---------- ตารางข้อมูลบริษัท ---------- */
.spec { width: 100%; border-collapse: separate; border-spacing: 0; background: var(--porcelain); border: 3px double var(--cobalt); border-radius: 1rem; overflow: hidden; }
.spec th, .spec td { text-align: left; vertical-align: top; padding: 0.85em 1.2em; border-top: 1px solid var(--rule); }
.spec tr:first-child th, .spec tr:first-child td { border-top: 0; }
.spec th { width: 13rem; font-weight: 400; color: var(--muted); }
.spec td { font-weight: 700; overflow-wrap: anywhere; }
@media (max-width: 40rem) {
  .spec th, .spec td { display: block; width: auto; }
  .spec td { border-top: 0; padding-top: 0; }
}

/* ---------- หน้าเนื้อหายาว (นโยบาย) ---------- */
.prose { max-width: 46rem; }
.prose h2 { font-family: var(--body); font-weight: 700; font-size: 1.35rem; margin-top: 2.6rem; }
.prose h2:first-of-type { margin-top: 1.5rem; }
.prose p, .prose ul { margin-top: 0.9rem; }
.prose ul { padding-left: 1.4rem; }
.prose li { margin-top: 0.35rem; max-width: 38em; }
.prose .meta { color: var(--muted); font-size: 0.97rem; margin-top: 0; }

/* ---------- หน้าติดต่อ ---------- */
.contact-list { margin: 1.8rem 0 0; }
.contact-list div { padding: 1rem 0; border-top: 1px solid var(--rule); }
.contact-list div:last-child { border-bottom: 1px solid var(--rule); }
.contact-list dt { color: var(--muted); font-size: var(--s--1); }
.contact-list dd { margin: 0.1rem 0 0; font-weight: 700; font-size: var(--s-1); line-height: 1.6; overflow-wrap: anywhere; }
.contact-list dd a { text-decoration: none; }
.contact-list dd a:hover { text-decoration: underline; }
.contact-list dd small { display: block; font-weight: 400; font-size: var(--s--1); color: var(--muted); }
.contact-list .big a { display: block; font-size: var(--s-3); line-height: 1.35; color: var(--ink); white-space: nowrap; }

.form { background: var(--porcelain); padding: clamp(1.2rem, 3vw, 2rem); border-radius: 1.4rem; border: 3px double var(--cobalt); }
.form h2 { font-size: var(--s-2); }
.form > p { color: var(--muted); margin-top: 0.6rem; font-size: 0.98rem; }
.field { margin-top: 1.1rem; }
.field label { display: block; font-weight: 700; margin-bottom: 0.3rem; }
.field input, .field select, .field textarea { width: 100%; font: inherit; color: var(--ink); background: var(--cream); padding: 0.5em 0.9em; border: 1px solid #b4a894; border-radius: 0.7rem; }
.field input, .field select { height: 2.9rem; }
.field textarea { min-height: 8rem; resize: vertical; }
.field input:focus, .field select:focus, .field textarea:focus { outline: 3px solid var(--cobalt-pale); outline-offset: 0; border-color: var(--cobalt); }
.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 0 1rem; align-items: end; }
@media (max-width: 34rem) { .field-row { grid-template-columns: 1fr; } }
.form > .btn { margin-top: 1.4rem; }
.form__result { margin-top: 1.4rem; padding: 1.1rem 1.2rem 1.3rem; background: var(--cobalt-pale); border-radius: 1rem; border: 2px dashed var(--cobalt); }
.form__result[hidden] { display: none; }
.form__result label { display: block; font-weight: 700; margin-bottom: 0.3rem; }
.form__result textarea { width: 100%; min-height: 9.5rem; font: inherit; color: var(--ink); background: var(--porcelain); border: 1px solid #9aa6c4; border-radius: 0.7rem; padding: 0.55em 0.85em; }
.form__result .btn { margin-top: 0.9rem; }
.form__status { margin-top: 0.8rem; font-weight: 700; }
.form__hint { font-size: var(--s--1); color: var(--muted); margin-top: 0.8rem; }

.map { background: var(--porcelain); overflow: hidden; border-radius: 1.4rem; border: 3px solid var(--cobalt); }
.map iframe { display: block; width: 100%; height: clamp(18rem, 45vw, 26rem); border: 0; }
.map p { padding: 0.8rem 1.2rem; font-size: 0.97rem; max-width: none; }

/* ---------- ส่วนท้าย ---------- */
.site-foot { background: #172c60; color: var(--cobalt-pale); padding: clamp(2.5rem, 5vw, 4rem) 0 1.5rem; font-size: 0.98rem; }
.site-foot a { color: #fff; }
.site-foot a:hover { color: var(--peony); }
.site-foot__grid { display: grid; gap: 2rem 3rem; grid-template-columns: minmax(0, 1.3fr) minmax(0, 0.8fr) minmax(0, 1.2fr); }
@media (max-width: 54rem) { .site-foot__grid { grid-template-columns: 1fr; } }
.site-foot h2 { font-family: var(--body); font-weight: 700; font-size: var(--s-1); color: #fff; margin-bottom: 0.7rem; }
.site-foot ul { list-style: none; }
.site-foot li { margin-top: 0.3rem; }
.site-foot address { font-style: normal; overflow-wrap: anywhere; }
.site-foot__base { margin-top: 2.5rem; padding-top: 1.2rem; border-top: 1px solid rgba(255,255,255,.18); display: flex; flex-wrap: wrap; gap: 0.4rem 2rem; justify-content: space-between; font-size: var(--s--1); color: #aebbdc; }
.site-foot__base p { max-width: none; margin: 0; }

@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
@media print { .site-head { position: static; } .nav, .nav-toggle, .btn-row, .map { display: none; } }
