/* Nuchan Beauty — สไตล์หลัก (โทนชมพูสด แนวร้านโปรโมชัน) */
:root {
  --pink: #D81B7A;
  --pink-dark: #B5146A;
  --pink-soft: #FFE3F1;
  --pink-bg: #FFF7FB;
  --pink-line: #F3D3E4;
  --plum: #2B1030;
  --plum-2: #4A2A50;
  --yellow: #FFD84D;
  --muted: #6E4F63;
  --radius: 16px;
  --font-head: 'Prompt', 'Noto Sans Thai', sans-serif;
  --font-body: 'Noto Sans Thai', system-ui, sans-serif;
}
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; font-family: var(--font-body); color: var(--plum); background: #fff; line-height: 1.6; }
a { color: inherit; text-decoration: none; }
img, svg { max-width: 100%; }
h1, h2, h3 { font-family: var(--font-head); line-height: 1.3; margin: 0; }
ul { list-style: none; margin: 0; padding: 0; }
button, input, select, textarea { font-family: inherit; font-size: 16px; color: var(--plum); }
button { cursor: pointer; }
a:focus-visible, button:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible, summary:focus-visible {
  outline: 3px solid var(--plum); outline-offset: 2px;
}
.container { width: 100%; max-width: 1320px; margin: 0 auto; padding: 0 32px; }
.sr-only { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.skip-link { position: absolute; left: -9999px; top: 8px; background: #fff; padding: 8px 16px; z-index: 100; }
.skip-link:focus { left: 8px; }
.muted { color: var(--muted); }

/* ---------- ส่วนหัว ---------- */
.topbar { background: var(--pink-soft); font-size: 13px; }
.topbar-inner { min-height: 36px; display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
.topbar-links { display: flex; gap: 20px; }
.site-header { background: #fff; border-bottom: 1px solid var(--pink-line); position: relative; z-index: 10; }
.header-inner { display: flex; align-items: center; gap: 24px; padding-top: 12px; padding-bottom: 12px; }
.logo { font-family: var(--font-head); font-size: 30px; font-weight: 700; color: var(--pink); white-space: nowrap; }
.search { flex: 1 1 auto; position: relative; display: flex; align-items: center; }
.search-icon { position: absolute; left: 16px; pointer-events: none; }
.search input { width: 100%; min-height: 48px; padding: 0 20px 0 46px; border: 1.5px solid var(--pink-line); border-radius: 999px; background: var(--pink-bg); }
.icon-btn { position: relative; width: 48px; height: 48px; border: 1.5px solid var(--pink-line); border-radius: 50%; background: #fff; display: flex; align-items: center; justify-content: center; flex: none; }
.icon-btn .count { position: absolute; top: -4px; right: -4px; min-width: 22px; height: 22px; padding: 0 5px; border-radius: 11px; background: var(--pink); color: #fff; font-size: 12px; font-weight: 600; display: flex; align-items: center; justify-content: center; }
.cat-nav { border-top: 1px solid var(--pink-line); overflow-x: auto; scrollbar-width: none; }
.cat-nav::-webkit-scrollbar { display: none; }
.cat-nav-inner { display: flex; gap: 28px; white-space: nowrap; font-size: 15px; font-weight: 600; }
.cat-link { display: flex; align-items: center; min-height: 48px; border-bottom: 3px solid transparent; }
.cat-link:hover, .cat-link.is-active { color: var(--pink); border-bottom-color: var(--pink); }
.cat-sale { color: var(--pink); }

/* ---------- ปุ่ม ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; min-height: 48px; padding: 0 28px; border-radius: 999px; border: 1.5px solid transparent; font-size: 16px; font-weight: 600; text-align: center; }
.btn-block { display: flex; width: 100%; min-height: 44px; font-size: 15px; }
.btn-primary { background: var(--pink); color: #fff; }
.btn-primary:hover { background: var(--pink-dark); }
.btn-dark { background: var(--plum); color: #fff; }
.btn-dark:hover { background: var(--plum-2); }
.btn-outline { background: transparent; color: var(--pink); border-color: var(--pink); }
.btn-outline:hover { background: var(--pink); color: #fff; }
.btn-lg { min-height: 52px; font-size: 17px; padding: 0 36px; }

/* ---------- แบนเนอร์ ---------- */
.hero { position: relative; padding-top: 24px; }
.slide { display: none; border-radius: 24px; min-height: 380px; padding: 48px 112px; align-items: center; }
.slide.is-active { display: flex; }
.slide--pink { background: var(--pink); color: #fff; }
.slide--yellow { background: var(--yellow); color: var(--plum); }
.slide--plum { background: var(--plum); color: #fff; }
.slide-inner { display: flex; flex-direction: column; gap: 16px; align-items: flex-start; max-width: 560px; }
.slide-tag { font-size: 15px; font-weight: 600; }
.slide h1 { font-size: clamp(32px, 4.6vw, 56px); font-weight: 700; text-wrap: balance; }
.slide p { margin: 0; font-size: 18px; }
.slide--pink .btn { background: var(--yellow); color: var(--plum); }
.slide--yellow .btn { background: var(--plum); color: #fff; }
.slide--plum .btn { background: #FF8FB8; color: var(--plum); }
.hero-arrow { position: absolute; top: calc(50% - 8px); transform: translateY(-50%); width: 48px; height: 48px; border-radius: 50%; border: 0; background: #fff; box-shadow: 0 2px 8px rgba(43, 16, 48, .25); font-size: 22px; }
.hero-prev { left: 48px; }
.hero-next { right: 48px; }
.hero-dots { display: flex; justify-content: center; padding-top: 4px; }
.hero-dots button { width: 32px; height: 44px; border: 0; background: transparent; display: flex; align-items: center; justify-content: center; }
.hero-dots span { display: block; width: 10px; height: 10px; border-radius: 5px; background: #E9B8D2; transition: width .2s; }
.hero-dots .is-active span { width: 28px; background: var(--pink); }

/* ---------- ทางลัด / แถบไฮไลต์ ---------- */
.shortcuts { display: grid; grid-template-columns: repeat(auto-fit, minmax(110px, 1fr)); gap: 16px; text-align: center; padding-top: 16px; }
.shortcut { display: flex; flex-direction: column; align-items: center; gap: 10px; padding: 8px 0; font-size: 15px; font-weight: 600; }
.shortcut-disc { width: 88px; height: 88px; border-radius: 50%; display: flex; align-items: center; justify-content: center; transition: transform .15s; }
.shortcut:hover .shortcut-disc { transform: translateY(-3px); }
.strip { background: var(--pink-soft); margin-top: 24px; border-top: 1px solid #F3C2DC; border-bottom: 1px solid #F3C2DC; }
.strip-inner { display: flex; justify-content: center; gap: 12px 48px; flex-wrap: wrap; padding-top: 14px; padding-bottom: 14px; font-family: var(--font-head); font-size: 18px; font-weight: 600; color: var(--pink-dark); }

/* ---------- ส่วนเนื้อหา ---------- */
.section { padding-top: 56px; padding-bottom: 8px; }
.section-alt { background: var(--pink-bg); padding-bottom: 56px; margin-top: 56px; }
.section-head { display: flex; align-items: center; justify-content: space-between; gap: 16px 24px; flex-wrap: wrap; margin-bottom: 24px; }
.section-title { font-size: 30px; font-weight: 700; }
.flash-title { color: var(--pink); font-size: 34px; }
.flash-head { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; }
.countdown { display: flex; align-items: center; gap: 6px; font-size: 14px; }
.countdown b { background: var(--plum); color: #fff; border-radius: 6px; padding: 2px 8px; font-weight: 600; }
.link-more { font-weight: 600; text-decoration: underline; min-height: 44px; display: inline-flex; align-items: center; }
.chips { display: flex; gap: 8px; flex-wrap: wrap; }
.chip { display: inline-flex; align-items: center; min-height: 44px; padding: 0 22px; border-radius: 999px; border: 1.5px solid var(--pink); color: var(--pink); font-size: 15px; font-weight: 600; background: transparent; }
.chip.is-active, .chip:hover { background: var(--pink); color: #fff; }

/* ---------- การ์ดสินค้า ---------- */
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 20px; }
.card { background: #fff; border: 1.5px solid var(--pink-line); border-radius: var(--radius); padding: 12px 12px 16px; display: flex; flex-direction: column; gap: 10px; }
.card-art { position: relative; background: #FFF0F7; border-radius: 12px; aspect-ratio: 1; display: flex; align-items: center; justify-content: center; overflow: hidden; }
.card-art .art { width: 42%; height: auto; }
.card-art img.art { width: 100%; height: 100%; object-fit: cover; }
.badge { position: absolute; top: 10px; left: 10px; border-radius: 999px; padding: 0 10px; font-size: 13px; font-weight: 700; }
.badge-sale { background: var(--yellow); color: var(--plum); }
.badge-new { background: var(--plum); color: #fff; }
.card-body { display: flex; flex-direction: column; gap: 2px; flex: 1; }
.brand-label { font-size: 13px; font-weight: 600; color: var(--muted); }
.card-title { font-family: var(--font-body); font-size: 16px; font-weight: 500; line-height: 1.45; }
.card-title a:hover { color: var(--pink); }
.card-size { font-size: 13px; color: var(--muted); }
.price-row { display: flex; align-items: baseline; gap: 8px; flex-wrap: wrap; margin-top: 4px; }
.price { font-family: var(--font-head); font-size: 22px; font-weight: 700; color: var(--pink); }
.price-old { font-size: 14px; color: var(--muted); }

/* ---------- ช้อปตามความต้องการ / แบรนด์ ---------- */
.concerns { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 20px; }
.concern { display: flex; flex-direction: column; justify-content: flex-end; gap: 4px; min-height: 170px; padding: 24px; border-radius: 20px; }
.concern strong { font-family: var(--font-head); font-size: 22px; font-weight: 600; }
.concern span { font-size: 15px; font-weight: 500; }
.concern-1 { background: #FFE3F1; } .concern-2 { background: #FFF2B3; } .concern-3 { background: #E4D7FF; } .concern-4 { background: #D8F5E6; }
.brands { display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: 16px; }
.brand-tile { display: flex; align-items: center; justify-content: center; min-height: 72px; border: 1.5px solid var(--pink-line); border-radius: var(--radius); font-weight: 600; color: var(--muted); }
.brand-tile:hover { color: var(--pink); border-color: var(--pink); }

/* ---------- หน้ารายการสินค้า ---------- */
.page-head { padding-top: 32px; padding-bottom: 8px; }
.page-head h1 { font-size: 32px; }
.breadcrumb { font-size: 14px; color: var(--muted); margin-bottom: 8px; }
.breadcrumb a { text-decoration: underline; }
.toolbar { display: flex; justify-content: space-between; align-items: center; gap: 16px; flex-wrap: wrap; margin: 20px 0 24px; }
.sort { display: flex; align-items: center; gap: 8px; font-size: 15px; }
.sort select { min-height: 44px; border: 1.5px solid var(--pink-line); border-radius: 999px; padding: 0 16px; background: #fff; }
.empty { padding: 56px 0; text-align: center; color: var(--muted); }

/* ---------- หน้าสินค้า ---------- */
.pd { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(420px, 100%), 1fr)); gap: 48px; align-items: start; padding-top: 24px; }
.pd-art { background: #FFF0F7; border-radius: 20px; aspect-ratio: 1; display: flex; align-items: center; justify-content: center; overflow: hidden; }
.pd-art .art { width: 34%; height: auto; }
.pd-art img.art { width: 100%; height: 100%; object-fit: cover; }
.pd-info { display: flex; flex-direction: column; gap: 20px; }
.pd-info h1 { font-size: 32px; }
.pd-price { display: flex; align-items: baseline; gap: 12px; flex-wrap: wrap; }
.pd-price .price { font-size: 30px; }
.shade-label { font-weight: 600; margin-bottom: 8px; }
.swatches { display: flex; gap: 12px; flex-wrap: wrap; }
.swatch { position: relative; }
.swatch input { position: absolute; opacity: 0; width: 44px; height: 44px; margin: 0; cursor: pointer; }
.swatch span { display: block; width: 44px; height: 44px; border-radius: 50%; border: 3px solid #fff; box-shadow: 0 0 0 2px var(--pink-line); }
.swatch input:checked + span { box-shadow: 0 0 0 2px var(--plum); }
.swatch input:focus-visible + span { outline: 3px solid var(--pink); outline-offset: 3px; }
.buy-row { display: flex; gap: 12px; flex-wrap: wrap; align-items: center; }
.qty { display: inline-flex; align-items: center; border: 1.5px solid var(--plum); border-radius: 999px; }
.qty button { width: 44px; height: 48px; border: 0; background: transparent; font-size: 20px; }
.qty input { width: 48px; height: 48px; border: 0; background: transparent; text-align: center; font-weight: 600; -moz-appearance: textfield; }
.qty input::-webkit-outer-spin-button, .qty input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.buy-row .btn { flex: 1 1 200px; }
.pd-meta { border-top: 1px solid var(--pink-line); padding-top: 16px; display: flex; flex-direction: column; gap: 4px; font-size: 15px; color: var(--muted); }
details.acc { border-top: 1px solid var(--pink-line); }
details.acc:last-of-type { border-bottom: 1px solid var(--pink-line); }
details.acc summary { min-height: 52px; display: flex; align-items: center; font-weight: 600; cursor: pointer; }
details.acc p { margin: 0 0 16px; color: var(--muted); }

/* ---------- ตะกร้า / ชำระเงิน ---------- */
.cart-layout { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(420px, 100%), 1fr)); gap: 40px; align-items: start; padding-top: 24px; padding-bottom: 56px; }
.cart-line { display: grid; grid-template-columns: 88px 1fr auto; gap: 16px; align-items: center; padding: 16px 0; border-bottom: 1px solid var(--pink-line); }
.cart-thumb { background: #FFF0F7; border-radius: 12px; aspect-ratio: 1; display: flex; align-items: center; justify-content: center; overflow: hidden; }
.cart-thumb .art { width: 50%; height: auto; }
.cart-thumb img.art { width: 100%; height: 100%; object-fit: cover; }
.cart-name { font-weight: 500; }
.cart-sub { font-size: 14px; color: var(--muted); }
.cart-actions { display: flex; align-items: center; gap: 12px; margin-top: 8px; flex-wrap: wrap; }
.cart-actions .qty button { height: 44px; }
.cart-actions .qty input { height: 44px; }
.link-btn { min-height: 44px; border: 0; background: transparent; text-decoration: underline; font-size: 14px; padding: 0 4px; }
.line-total { font-weight: 600; }
.summary { background: #FFF0F7; border-radius: 20px; padding: 28px; display: flex; flex-direction: column; gap: 14px; }
.summary h2 { font-size: 22px; }
.summary-row { display: flex; justify-content: space-between; gap: 12px; font-size: 15px; }
.summary-total { border-top: 1px solid #E9B8D2; padding-top: 14px; font-size: 19px; font-weight: 600; }
.summary-note { font-size: 14px; color: var(--muted); }
.form { display: flex; flex-direction: column; gap: 16px; }
.form-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(200px, 100%), 1fr)); gap: 16px; }
.field { display: flex; flex-direction: column; gap: 6px; }
.field label { font-size: 14px; font-weight: 600; }
.field input, .field textarea { width: 100%; min-height: 48px; padding: 10px 16px; border: 1.5px solid var(--plum); border-radius: 12px; background: #fff; }
.field textarea { min-height: 96px; resize: vertical; }
.field .err { color: #B00020; font-size: 14px; }
.notice { margin-top: 16px; padding: 14px 20px; border-radius: 12px; font-weight: 500; }
.notice-ok { background: #D8F5E6; }
.notice-err { background: #FFE0E0; }
.thanks { max-width: 640px; margin: 0 auto; padding: 56px 0; display: flex; flex-direction: column; gap: 16px; text-align: center; align-items: center; }
.thanks h1 { font-size: 32px; }
.order-id { display: inline-block; background: var(--pink-soft); border-radius: 999px; padding: 4px 20px; font-family: var(--font-head); font-weight: 600; }

/* ---------- ส่วนท้าย ---------- */
.site-footer { background: var(--plum); color: #EBD8E8; margin-top: 72px; }
.footer-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 32px; padding-top: 56px; padding-bottom: 32px; font-size: 15px; }
.footer-logo { font-family: var(--font-head); font-size: 28px; font-weight: 700; color: #FF8FB8; }
.footer-title { font-family: var(--font-body); font-size: 15px; font-weight: 600; color: #fff; margin-bottom: 8px; }
.footer-grid li { margin-bottom: 6px; }
.footer-grid a:hover { text-decoration: underline; }
.footer-grid p { margin: 8px 0 0; }
.footer-bottom { border-top: 1px solid var(--plum-2); padding-top: 24px; padding-bottom: 24px; font-size: 14px; }

/* ---------- มือถือ ---------- */
@media (max-width: 860px) {
  .container { padding: 0 20px; }
  .header-inner { flex-wrap: wrap; gap: 12px; }
  .search { order: 3; flex: 1 1 100%; }
  .logo { flex: 1; font-size: 26px; }
  .slide { padding: 40px 28px 48px; min-height: 340px; }
  .hero-arrow { display: none; }
  .section { padding-top: 40px; }
  .cart-line { grid-template-columns: 72px 1fr; }
  .cart-line .line-total { grid-column: 2; }
}
@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; }
}
.site-footer .muted { color: #CDB3C9; }
