:root {
  --red: #b51f2e;
  --red-dark: #8d1622;
  --ink: #292b2d;
  --brand-soft: #f6ecee;
  --brand-deep: #7d2630;
  --muted: #667079;
  --line: #dfe3e6;
  --soft: #f4f5f5;
  --white: #fff;
  --green: #06c755;
  --max: 1180px;
  font-family: Arial, "Noto Sans Thai", sans-serif;
  color: var(--ink);
  background: var(--white);
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; min-width: 320px; background: var(--white); }
button, input, textarea, select { font: inherit; }
button, a { -webkit-tap-highlight-color: transparent; }
a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }
.container { width: min(var(--max), calc(100% - 40px)); margin: 0 auto; }
.topbar { background: var(--brand-soft); color: var(--brand-deep); font-size: 12px; }
.topbar .container { min-height: 34px; display: flex; align-items: center; justify-content: space-between; gap: 20px; }
.top-links { display: flex; gap: 18px; align-items: center; }
.site-header { background: rgba(255,255,255,.97); border-bottom: 1px solid var(--line); position: sticky; top: 0; z-index: 20; }
.nav { min-height: 72px; display: flex; align-items: center; gap: 30px; }
.brand { font-size: 27px; font-weight: 700; color: var(--red); letter-spacing: 0; }
.brand-logo { width: 118px; max-height: 48px; object-fit: contain; object-position: left center; }
.brand small { color: var(--ink); font-size: 11px; font-weight: 400; display: block; margin-top: -3px; }
.nav-links { margin-left: auto; display: flex; align-items: center; gap: 4px; }
.nav-link, .lang-btn { padding: 10px 12px; border: 0; background: transparent; color: #333; cursor: pointer; }
.nav-link:hover, .nav-link.active { color: var(--red); }
.lang-btn { border-left: 1px solid var(--line); margin-left: 8px; font-weight: 700; }
.menu-btn { display: none; margin-left: auto; border: 1px solid var(--line); background: var(--white); width: 42px; height: 42px; cursor: pointer; }
.hero-carousel { height: 590px; position: relative; overflow: hidden; background: var(--ink); color: var(--white); }
.hero-slide { position: absolute; inset: 0; opacity: 0; visibility: hidden; transition: opacity .55s ease; }
.hero-slide.active { opacity: 1; visibility: visible; z-index: 1; }
.hero-slide picture, .hero-slide picture::after { position: absolute; inset: 0; }
.hero-slide picture::after { content: ""; display: block; background: linear-gradient(90deg, rgba(18,20,22,.82) 0%, rgba(18,20,22,.52) 42%, rgba(18,20,22,.08) 72%); }
.hero-slide picture img { width: 100%; height: 100%; object-fit: cover; }
.hero-hit { position: absolute; inset: 0; z-index: 1; }
.hero-inner { height: 100%; display: flex; align-items: end; }
.hero-content { position: relative; z-index: 1; padding: 82px 0 68px; max-width: 640px; }
.eyebrow { color: var(--red); text-transform: uppercase; font-weight: 700; font-size: 13px; margin-bottom: 14px; }
.hero-carousel .eyebrow { color: #ffb5bd; }
h1 { font-size: clamp(38px, 5vw, 66px); line-height: 1.08; margin: 0 0 22px; letter-spacing: 0; }
h2 { font-size: 34px; line-height: 1.2; letter-spacing: 0; margin: 0; }
h3 { margin: 0; font-size: 20px; letter-spacing: 0; }
p { line-height: 1.7; }
.hero-carousel p { font-size: 18px; max-width: 570px; color: #f0f0f0; }
.hero-carousel .hero-content .btn { position: relative; z-index: 2; margin-top: 12px; }
.hero-arrow { position: absolute; z-index: 4; top: 50%; transform: translateY(-50%); width: 44px; height: 44px; border: 1px solid rgba(255,255,255,.6); background: rgba(0,0,0,.24); color: var(--white); font-size: 30px; cursor: pointer; }
.hero-arrow.prev { left: 20px; }
.hero-arrow.next { right: 20px; }
.hero-dots { position: absolute; z-index: 4; left: 50%; bottom: 22px; transform: translateX(-50%); display: flex; gap: 8px; }
.hero-dot { width: 10px; height: 10px; padding: 0; border: 1px solid var(--white); border-radius: 50%; background: transparent; cursor: pointer; }
.hero-dot.active { background: var(--white); }
.actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 28px; }
.btn { display: inline-flex; align-items: center; justify-content: center; min-height: 44px; padding: 0 19px; border: 1px solid transparent; cursor: pointer; font-weight: 700; }
.btn-primary { background: var(--red); color: var(--white); }
.btn-primary:hover { background: var(--red-dark); }
.btn-light { background: var(--white); color: var(--ink); }
.btn-outline { border-color: var(--line); background: var(--white); }
.btn-danger { border-color: #e4b8bd; background: #fff5f6; color: var(--red-dark); }
.stats { background: var(--red); color: var(--white); }
.stat-grid { display: grid; grid-template-columns: repeat(3, 1fr); }
.stat { padding: 28px 30px; border-right: 1px solid rgba(255,255,255,.26); }
.stat:last-child { border: 0; }
.stat strong { display: block; font-size: 28px; }
.stat span { font-size: 13px; opacity: .85; }
.section { padding: 82px 0; }
.section-soft { background: var(--soft); }
.section-head { display: flex; justify-content: space-between; align-items: end; gap: 30px; margin-bottom: 34px; }
.section-head p { color: var(--muted); max-width: 570px; margin: 0; }
.category-grid { display: grid; grid-template-columns: repeat(4, 1fr); border-top: 1px solid var(--line); border-left: 1px solid var(--line); }
.category { border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); background: var(--white); display: flex; flex-direction: column; overflow: hidden; }
.category-media { aspect-ratio: 4/3; overflow: hidden; background: var(--soft); }
.category-media img { width: 100%; height: 100%; object-fit: cover; transition: transform .3s ease; }
.category:hover .category-media img { transform: scale(1.025); }
.category-copy { min-height: 205px; padding: 24px; display: flex; flex-direction: column; }
.category-index { font-size: 12px; color: var(--red); font-weight: 700; margin-bottom: 26px; }
.category p { color: var(--muted); margin: 10px 0 0; }
.category .arrow { margin-top: auto; padding-top: 14px; color: var(--red); font-size: 22px; }
.product-grid, .outlet-grid, .article-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
.product-card, .outlet-card, .article-card { border: 1px solid var(--line); background: var(--white); border-radius: 6px; overflow: hidden; }
.product-media, .outlet-media { aspect-ratio: 4/3; overflow: hidden; background: #e9ebec; }
.product-media img, .outlet-media img { width: 100%; height: 100%; object-fit: cover; transition: transform .3s ease; }
.product-card:hover img, .outlet-card:hover img { transform: scale(1.025); }
.card-body { padding: 22px; }
.card-body p { color: var(--muted); margin-bottom: 0; }
.card-kicker { color: var(--red); font-size: 12px; font-weight: 700; margin-bottom: 8px; }
.split { display: grid; grid-template-columns: 1.05fr .95fr; min-height: 520px; }
.split-photo { background-size: cover; background-position: center; }
.split-copy { background: var(--brand-soft); color: var(--ink); padding: 72px max(40px, calc((100vw - var(--max))/2)); padding-right: 6vw; }
.split-copy p { color: #62565a; }
.feature-list { display: grid; gap: 18px; margin-top: 30px; }
.feature { border-top: 1px solid #ddc9cd; padding-top: 15px; }
.feature strong { display: block; margin-bottom: 5px; }
.page-hero { padding: 78px 0 55px; background: var(--soft); border-bottom: 1px solid var(--line); }
.page-hero h1 { color: var(--ink); font-size: 48px; }
.page-hero p { color: var(--muted); max-width: 680px; }
.filters { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 28px; }
.filter { border: 1px solid var(--line); background: var(--white); padding: 9px 13px; cursor: pointer; }
.filter.active { border-color: var(--red); color: var(--red); }
.outlet-note { display: grid; grid-template-columns: 1fr 1fr; border: 1px solid var(--line); margin-bottom: 34px; }
.outlet-note > div { padding: 28px; }
.outlet-note > div:first-child { background: var(--red); color: var(--white); }
.grade { display: inline-flex; background: var(--brand-deep); color: var(--white); padding: 5px 9px; font-size: 12px; margin-bottom: 10px; }
.detail { display: grid; grid-template-columns: 1.1fr .9fr; gap: 46px; }
.detail-image { aspect-ratio: 4/3; width: 100%; object-fit: cover; }
.specs { padding: 18px 0; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); color: var(--muted); }
.footer { background: var(--brand-deep); color: #f6ecee; padding: 58px 0 24px; }
.footer-grid { display: grid; grid-template-columns: 1.3fr 1.15fr .75fr 1fr; gap: 42px; }
.footer h3 { color: var(--white); }
.footer a { display: block; margin: 10px 0; color: #f6ecee; }
.social-icons { display: flex; gap: 10px; margin-top: 14px; }
.footer .social-icon { width: 40px; height: 40px; margin: 0; padding: 0; display: grid; place-items: center; border: 1px solid #bc828a; background: transparent; cursor: pointer; }
.social-icon img, .shop-link img { width: 20px; height: 20px; filter: brightness(0) invert(1); }
.footer .shop-link { display: flex; align-items: center; gap: 10px; }
.shop-link img { flex: 0 0 20px; }
.footer-bottom { border-top: 1px solid #a45d66; margin-top: 42px; padding-top: 20px; color: #ecd5d9; font-size: 12px; }
.line-float { position: fixed; z-index: 30; right: 22px; top: 50%; transform: translateY(-50%); border: 0; background: var(--green); width: 58px; height: 58px; border-radius: 50%; cursor: pointer; box-shadow: 0 8px 24px rgba(0,0,0,.22); display: grid; place-items: center; }
.line-float img { width: 30px; height: 30px; filter: brightness(0) invert(1); }
.line-backdrop { position: fixed; z-index: 40; inset: 0; background: rgba(15,18,20,.58); }
.line-modal { position: fixed; z-index: 41; left: 50%; top: 50%; transform: translate(-50%,-50%); width: min(390px, calc(100% - 32px)); background: var(--white); padding: 30px; text-align: center; box-shadow: 0 20px 60px rgba(0,0,0,.3); }
.line-close { position: absolute; top: 10px; right: 10px; width: 38px; height: 38px; border: 0; background: transparent; color: var(--muted); font-size: 28px; cursor: pointer; }
.line-mark { width: 44px; height: 44px; margin: 0 auto 12px; }
.line-modal h2 { font-size: 25px; }
.line-modal p { color: var(--muted); margin: 10px 0 18px; }
.line-qr { width: 230px; height: 230px; margin: 0 auto 20px; border: 1px solid var(--line); object-fit: contain; }
.empty { padding: 50px; background: var(--soft); color: var(--muted); text-align: center; }

/* Admin */
.admin-shell { min-height: 100vh; background: #eef0f1; }
.admin-header { height: 64px; background: var(--ink); color: var(--white); display: flex; align-items: center; padding: 0 24px; gap: 20px; position: sticky; top: 0; z-index: 10; }
.admin-header .brand { color: var(--white); }
.admin-header .admin-actions { margin-left: auto; display: flex; gap: 10px; }
.admin-header .btn-outline { color: var(--ink); }
.admin-layout { display: grid; grid-template-columns: 230px 1fr; min-height: calc(100vh - 64px); }
.admin-nav { background: var(--white); border-right: 1px solid var(--line); padding: 20px 12px; }
.admin-nav button { display: block; width: 100%; text-align: left; border: 0; background: transparent; padding: 12px 14px; cursor: pointer; color: #42484c; }
.admin-nav button.active { background: #f8e9eb; color: var(--red); font-weight: 700; }
.admin-main { padding: 30px; min-width: 0; }
.admin-title { display: flex; align-items: center; justify-content: space-between; gap: 20px; margin-bottom: 22px; }
.panel { background: var(--white); border: 1px solid var(--line); padding: 22px; margin-bottom: 18px; }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.field { display: grid; gap: 7px; }
.field.full { grid-column: 1 / -1; }
.field label { font-size: 12px; font-weight: 700; color: #4d555a; }
.field input, .field textarea, .field select { width: 100%; border: 1px solid #cbd1d5; background: var(--white); padding: 10px 11px; min-height: 42px; }
.field textarea { min-height: 92px; resize: vertical; }
.admin-list { display: grid; gap: 10px; }
.admin-row { background: var(--white); border: 1px solid var(--line); padding: 15px; display: grid; grid-template-columns: 70px 1fr auto; gap: 16px; align-items: center; }
.admin-row img { width: 70px; height: 55px; object-fit: cover; background: var(--soft); }
.row-actions { display: flex; gap: 8px; }
.icon-btn { width: 38px; height: 38px; border: 1px solid var(--line); background: var(--white); cursor: pointer; }
.login { min-height: 100vh; display: grid; place-items: center; background: var(--soft); }
.login-card { width: min(400px, calc(100% - 32px)); background: var(--white); border: 1px solid var(--line); padding: 34px; }
.login-card .brand { margin-bottom: 28px; }
.notice { padding: 11px 14px; background: #e8f5eb; color: #246a37; margin-bottom: 15px; }
.notice.error { background: #fdecee; color: var(--red-dark); }
.upload-control { display: flex; gap: 10px; align-items: center; margin-top: 8px; }
.upload-control input { max-width: 260px; }
.password-panel { max-width: 760px; }
.form-intro { color: var(--muted); margin-top: 0; margin-bottom: 22px; }
.detail-gallery { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; align-content: start; }
.detail-gallery a:first-child { grid-column: 1 / -1; }
.detail-gallery img { width: 100%; aspect-ratio: 4/3; object-fit: contain; background: var(--soft); }
.gallery-editor { display: flex; flex-wrap: wrap; gap: 12px; }
.gallery-editor img { width: 120px; height: 90px; object-fit: cover; }
.admin-image-preview { width: 180px; height: 120px; object-fit: contain; background: var(--soft); }
.image-guidance { color: #59636b; font-size: 13px; line-height: 1.7; margin: 4px 0 0; max-width: 720px; }
.operations-item { padding: 20px 0; border-bottom: 1px solid var(--line); margin-bottom: 20px; }
.check-field { display: flex; align-items: center; gap: 8px; }
.field, .admin-row > div, .detail > div { min-width: 0; overflow-wrap: anywhere; }
.nav-link { padding: 10px 8px; }
.detail p { white-space: normal; }
.line-modal { max-height: calc(100vh - 32px); overflow-y: auto; }

@media (max-width: 900px) {
  .nav-links { display: none; position: absolute; top: 72px; left: 0; right: 0; background: var(--white); border-bottom: 1px solid var(--line); padding: 12px 20px; }
  .nav-links.open { display: grid; }
  .lang-btn { border: 0; margin: 0; text-align: left; }
  .menu-btn { display: block; }
  .category-grid, .product-grid, .outlet-grid, .article-grid { grid-template-columns: repeat(2, 1fr); }
  .split { grid-template-columns: 1fr; }
  .split-photo { min-height: 400px; }
  .detail { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: repeat(2, 1fr); }
  .admin-layout { grid-template-columns: 1fr; }
  .admin-header { height: auto; min-height: 64px; padding: 10px 14px; flex-wrap: wrap; position: static; }
  .admin-header > span { display: none; }
  .admin-header .admin-actions { margin-left: auto; }
  .admin-header .btn { min-height: 40px; padding: 0 12px; }
  .admin-nav { display: flex; overflow-x: auto; position: static; padding: 8px; }
  .admin-nav button { width: auto; white-space: nowrap; }
}
@media (max-width: 620px) {
  .container { width: min(100% - 28px, var(--max)); }
  .topbar { display: none; }
  .nav { min-height: 62px; }
  .nav-links { top: 62px; }
  .hero-carousel { height: 560px; }
  .hero-slide picture::after { background: rgba(18,20,22,.65); }
  .hero-content { padding-bottom: 48px; }
  .hero-arrow { width: 38px; height: 38px; top: auto; bottom: 18px; transform: none; }
  .hero-arrow.prev { left: 14px; }
  .hero-arrow.next { right: 14px; }
  h1 { font-size: 42px; }
  h2 { font-size: 28px; }
  .stat-grid { grid-template-columns: 1fr; }
  .stat { border-right: 0; border-bottom: 1px solid rgba(255,255,255,.25); }
  .section { padding: 58px 0; }
  .section-head { align-items: start; flex-direction: column; }
  .category-grid, .product-grid, .outlet-grid, .article-grid { grid-template-columns: 1fr; }
  .outlet-note, .footer-grid, .form-grid { grid-template-columns: 1fr; }
  .admin-main { padding: 18px 12px; }
  .admin-title { align-items: start; flex-direction: column; }
  .admin-row { grid-template-columns: 56px 1fr; }
  .admin-row img { width: 56px; height: 48px; }
  .row-actions { grid-column: 2; }
  .line-float { top: 60%; right: 14px; width: 54px; height: 54px; }
}
