/* Lamliy: nền vải mộc, chữ to, nút lớn, ưu tiên điện thoại. */
:root {
  --paper: #f6f1e7;
  --card: #fffdf8;
  --ink: #2b2622;
  --muted: #6f655b;
  --line: #e2d9c8;
  --accent: #8f3324;
  --accent-ink: #fff;
  --ok: #3f6b3a;
  --warn: #a4551a;
  --bad: #a3271c;
  --radius: 10px;
  --wrap: 1180px;
  --serif: 'Lora', Georgia, 'Times New Roman', serif;
  --sans: 'Be Vietnam Pro', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
}
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body { margin: 0; background: var(--paper); color: var(--ink); font: 400 17px/1.55 var(--sans); }
img { max-width: 100%; height: auto; display: block; }
a { color: inherit; text-underline-offset: 3px; }
h1, h2 { font-family: var(--serif); font-weight: 600; line-height: 1.2; margin: 0; text-wrap: balance; }
p { margin: 0 0 .6em; }
button, input, textarea { font: inherit; color: inherit; }
:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; }
.skip { position: absolute; left: -999px; }
.skip:focus { left: 8px; top: 8px; background: var(--card); padding: 8px 12px; z-index: 50; }

.notice { background: var(--ink); color: #f3ead9; text-align: center; font-size: 14px; padding: 7px 12px; }
.top { position: sticky; top: 0; z-index: 20; background: var(--paper); border-bottom: 1px solid var(--line); display: grid; grid-template-columns: 1fr auto; align-items: center; gap: 4px 16px; padding: 8px 16px 0; }
.logo { font: italic 500 30px/1 var(--serif); text-decoration: none; letter-spacing: .01em; margin: 0; }
.cart-link { grid-row: 1; grid-column: 2; position: relative; display: grid; place-items: center; width: 48px; height: 48px; }
.cart-count { position: absolute; top: 4px; right: 0; min-width: 22px; height: 22px; padding: 0 6px; border-radius: 11px; background: var(--accent); color: var(--accent-ink); font-size: 13px; font-weight: 600; display: grid; place-items: center; }
.cart-count[hidden] { display: none; }
.cats { grid-column: 1 / -1; display: flex; gap: 4px; overflow-x: auto; scrollbar-width: none; margin: 0 -16px; padding: 0 12px; }
.cats::-webkit-scrollbar { display: none; }
.cats a { white-space: nowrap; text-decoration: none; padding: 12px 10px; font-weight: 500; }
.cats a:hover { color: var(--accent); }

main { min-height: 60vh; }
.block { max-width: var(--wrap); margin: 0 auto; padding: 28px 16px; }
.narrow { max-width: 760px; }
.block-head { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; margin-bottom: 16px; }
.block-head h2 { font-size: 26px; }
.page-title { font-size: 30px; margin-bottom: 18px; }

.btn { display: inline-flex; align-items: center; justify-content: center; min-height: 54px; padding: 12px 26px; border-radius: var(--radius); border: 1.5px solid transparent; font-weight: 600; font-size: 18px; text-decoration: none; cursor: pointer; transition: background .15s, transform .1s; }
.btn:active { transform: translateY(1px); }
.btn-primary { background: var(--accent); color: var(--accent-ink); }
.btn-primary:hover { background: #7a2a1d; }
.btn-ghost { background: transparent; border-color: var(--ink); }
.btn-ghost:hover { background: #ece4d3; }
.btn-light { background: #fffdf8; color: var(--ink); }
.btn-block { display: flex; width: 100%; margin-top: 12px; }
.btn:disabled { background: #cfc6b6; color: #6b635a; border-color: transparent; cursor: not-allowed; }

/* Trang chủ */
.hero { position: relative; height: min(78vh, 640px); overflow: hidden; background: #3a2b25; }
.hero-img { width: 100%; height: 100%; object-fit: cover; object-position: 50% 22%; }
.hero-text { position: absolute; inset: auto 0 0 0; padding: 80px 20px 28px; color: #fff; background: linear-gradient(transparent, rgba(24, 16, 12, .78)); }
.hero-text h1 { font-size: clamp(30px, 6vw, 52px); max-width: 15em; margin-bottom: 18px; }
.eyebrow { font-size: 14px; letter-spacing: .12em; text-transform: uppercase; margin-bottom: 8px; }
.promises { list-style: none; margin: 0 auto; padding: 18px 16px; max-width: var(--wrap); display: grid; grid-template-columns: 1fr 1fr; gap: 14px 18px; border-bottom: 1px solid var(--line); }
.promises li { display: grid; gap: 2px; font-size: 15px; }
.promises span { color: var(--muted); }
.types { max-width: var(--wrap); margin: 0 auto; padding: 8px 16px 40px; display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.types a { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 20px; text-align: center; text-decoration: none; font: 500 21px var(--serif); }
.types a:hover { border-color: var(--accent); color: var(--accent); }

/* Lưới sản phẩm */
.grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 22px 12px; }
.card { text-decoration: none; display: block; }
.card-img { position: relative; aspect-ratio: 2 / 3; background: #e8dfce; border-radius: var(--radius); overflow: hidden; }
.card-img img { width: 100%; height: 100%; object-fit: cover; transition: transform .4s; }
.card:hover .card-img img { transform: scale(1.03); }
.card-name { margin: 10px 0 2px; font-size: 16px; line-height: 1.35; }
.card-price { margin: 0; font-weight: 600; font-size: 17px; }
.card.is-out .card-img img { opacity: .55; }
.badge { position: absolute; left: 8px; top: 8px; background: var(--ink); color: #fff; font-size: 13px; padding: 4px 10px; border-radius: 20px; }

/* Bộ lọc */
.filters { display: grid; gap: 10px; margin-bottom: 14px; }
.chips { display: flex; gap: 8px; overflow-x: auto; align-items: center; scrollbar-width: none; margin: 0 -16px; padding: 2px 16px; }
.chips::-webkit-scrollbar { display: none; }
.chips-label { color: var(--muted); font-size: 15px; white-space: nowrap; }
.chip { white-space: nowrap; text-decoration: none; padding: 9px 16px; min-height: 44px; display: inline-flex; align-items: center; border: 1px solid var(--line); border-radius: 24px; background: var(--card); font-size: 16px; }
.chip.on { background: var(--ink); color: #fff; border-color: var(--ink); }
.count, .hint, .sku, .optional { color: var(--muted); font-size: 15px; }
.empty, .loading { padding: 24px 0; color: var(--muted); }

/* Trang sản phẩm */
.crumbs { max-width: var(--wrap); margin: 0 auto; padding: 12px 16px 0; font-size: 15px; color: var(--muted); }
.product { max-width: var(--wrap); margin: 0 auto; padding: 12px 0 24px; display: grid; gap: 20px; }
.gallery { display: flex; overflow-x: auto; scroll-snap-type: x mandatory; gap: 6px; scrollbar-width: none; }
.gallery::-webkit-scrollbar { display: none; }
.gallery img { flex: 0 0 100%; min-width: 0; scroll-snap-align: center; aspect-ratio: 2 / 3; object-fit: cover; background: #e8dfce; }
.gallery.many img { flex-basis: 88%; }
.buy { padding: 0 16px; }
.buy h1 { font-size: 28px; }
.price { font-size: 26px; font-weight: 600; color: var(--accent); margin: 8px 0 2px; }
.options fieldset, .pay { border: 0; padding: 0; margin: 18px 0 0; }
.options legend, .pay legend { font-weight: 600; padding: 0; margin-bottom: 8px; }
.options legend span { font-weight: 400; }
.one-size .opts { display: none; }
.opts { display: flex; flex-wrap: wrap; gap: 8px; }
.opt input { position: absolute; opacity: 0; pointer-events: none; }
.opt span { display: inline-flex; align-items: center; min-height: 48px; padding: 8px 16px; border: 1.5px solid var(--line); border-radius: var(--radius); background: var(--card); cursor: pointer; }
.opt input:checked + span { border-color: var(--ink); background: var(--ink); color: #fff; }
.opt input:focus-visible + span { outline: 3px solid var(--accent); outline-offset: 2px; }
.opt.out span { color: #a39a8c; text-decoration: line-through; background: transparent; }
.size-help { display: flex; align-items: center; gap: 10px; margin-top: 14px; padding: 10px 14px; min-height: 48px; border: 1px dashed #b9ad98; border-radius: var(--radius); text-decoration: none; font-size: 16px; }
.size-help svg { flex: none; color: #1b6fd6; }
.size-help:hover { background: #ece4d3; }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.form .remember { grid-template-columns: 26px 1fr; align-items: start; gap: 10px; font-weight: 400; cursor: pointer; }
.form .remember input { width: 22px; height: 22px; margin: 2px 0 0; accent-color: var(--accent); }
.stock { min-height: 1.6em; margin: 14px 0 0; font-weight: 500; color: var(--muted); }
.stock.ok { color: var(--ok); }
.actions .btn { padding-inline: 10px; white-space: nowrap; }
.stock.low { color: var(--warn); }
.stock.bad { color: var(--bad); }
.actions { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 10px; }
.added { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; margin-top: 12px; color: var(--ok); font-weight: 500; }
.added[hidden] { display: none; }
.assure { list-style: none; padding: 16px; margin: 22px 0 0; background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); display: grid; gap: 10px; font-size: 16px; }
.assure li { display: grid; grid-template-columns: 22px 1fr; gap: 8px; align-items: start; }
.assure svg { color: var(--ok); margin-top: 3px; }
.measure { border-bottom: 1px solid var(--line); padding: 14px 0; }
.measure summary { font-weight: 600; cursor: pointer; min-height: 32px; }
.measure table { width: 100%; border-collapse: collapse; margin: 10px 0; }
.measure th, .measure td { text-align: left; padding: 8px 0; border-top: 1px solid var(--line); font-weight: 400; vertical-align: top; }
.measure th { color: var(--muted); width: 45%; }
.measure p { margin-top: 10px; }

/* Giỏ hàng và đặt hàng */
.lines { list-style: none; margin: 0; padding: 0; }
.line { display: grid; grid-template-columns: 72px 1fr auto; gap: 12px; padding: 14px 0; border-bottom: 1px solid var(--line); }
.line img, .no-img { width: 72px; height: 108px; object-fit: cover; border-radius: 6px; background: #e8dfce; }
.line-info a, .line-info span { font-weight: 500; text-decoration: none; }
.line-info p { margin: 2px 0; color: var(--muted); font-size: 15px; }
.line-price { font-weight: 600; white-space: nowrap; margin: 0; }
.problem, .form-error, .field-error { color: var(--bad) !important; font-weight: 500; }
.qty { display: flex; align-items: center; gap: 4px; margin-top: 8px; }
.qty button { width: 44px; height: 44px; border: 1px solid var(--line); background: var(--card); border-radius: 8px; font-size: 22px; cursor: pointer; }
.qty button:disabled { opacity: .4; cursor: not-allowed; }
.qty span { min-width: 34px; text-align: center; font-weight: 600; }
.qty .remove { width: auto; padding: 0 12px; font-size: 15px; margin-left: 8px; border: 0; background: none; text-decoration: underline; color: var(--muted); }
.totals { margin: 16px 0 6px; display: grid; gap: 8px; }
.totals div { display: flex; justify-content: space-between; }
.totals dd { margin: 0; }
.totals .grand { font-size: 21px; font-weight: 600; border-top: 1px solid var(--line); padding-top: 10px; }
.checkout { display: grid; gap: 28px; }
.summary { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px; order: -1; }
.summary h2 { font-size: 21px; }
.form { display: grid; gap: 16px; }
.form label { display: grid; gap: 6px; font-weight: 600; }
.form input:not([type=radio]), .form textarea { width: 100%; min-height: 54px; padding: 13px 14px; border: 1.5px solid #bdb19c; border-radius: var(--radius); background: #fff; font-size: 18px; font-weight: 400; }
.form [aria-invalid=true] { border-color: var(--bad); }
.field-error { font-size: 15px; }
.form .radio { grid-template-columns: 26px 1fr; align-items: start; gap: 10px; font-weight: 400; padding: 14px; border: 1.5px solid var(--line); border-radius: var(--radius); background: var(--card); margin-bottom: 8px; cursor: pointer; }
.form .radio input { width: 22px; height: 22px; margin: 3px 0 0; accent-color: var(--accent); }
.form .radio:has(input:checked) { border-color: var(--ink); }
.thanks .order-code { font-size: 21px; background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 14px 16px; }
.prose h2 { font-size: 22px; margin: 22px 0 8px; }

/* Chân trang và nút tư vấn */
.foot { background: #ebe3d2; margin-top: 30px; padding: 30px 16px 96px; display: grid; gap: 22px; }
.foot > div { display: grid; gap: 6px; align-content: start; }
.foot p { margin: 0; }
.foot-h { font-weight: 600; }
.contact-row { display: flex; flex-wrap: wrap; gap: 10px; }
.size-help a { font-weight: 600; }
/* Cụm tư vấn: một khối duy nhất theo màu của trang, hai kênh là hai nút tròn bằng nhau. */
/* Nền màu mực (cùng màu thanh thông báo trên đầu trang), đổ bóng để nổi lên khỏi ảnh. */
.chat-dock { position: fixed; right: 14px; bottom: 14px; z-index: 30; display: flex; align-items: center; gap: 6px; padding: 5px 5px 5px 16px; background: var(--ink); border-radius: 30px; box-shadow: 0 8px 22px rgba(24, 16, 12, .32), 0 2px 6px rgba(24, 16, 12, .2); }
.chat-label { font-size: 15px; font-weight: 600; color: #f3ead9; margin-right: 4px; }
.chat-btn { display: grid; place-items: center; width: 44px; height: 44px; border-radius: 50%; color: #fff; text-decoration: none; transition: transform .15s; }
.chat-btn:hover { transform: scale(1.06); }
.chat-ms { background: #0a7cff; }
.chat-zl { background: #0068ff; }
.zalo-mark { font: 700 13px/1 var(--sans); letter-spacing: -.02em; }

@media (max-width: 899px) {
  /* Nút mua luôn nằm trong tầm ngón tay trên điện thoại. */
  .has-buybar .actions { position: sticky; bottom: 0; z-index: 15; margin: 10px -16px 0; padding: 10px 16px; background: var(--paper); border-top: 1px solid var(--line); }
  /* Trang sản phẩm: bỏ chữ cho gọn, cụm nút nằm trên thanh mua. */
  .has-buybar .chat-dock { bottom: 88px; padding-left: 5px; }
  .has-buybar .chat-label { display: none; }
}
@media (min-width: 900px) {
  body { font-size: 18px; }
  .top { grid-template-columns: auto 1fr auto; padding: 6px 28px; }
  .cart-link { grid-column: 3; }
  .cats { grid-column: 2; grid-row: 1; justify-content: center; margin: 0; overflow: visible; }
  .cats a { padding: 16px 14px; }
  .block { padding: 44px 28px; }
  .grid { grid-template-columns: repeat(4, 1fr); gap: 34px 22px; }
  .promises { grid-template-columns: repeat(4, 1fr); padding: 24px 28px; }
  .types { grid-template-columns: repeat(5, 1fr); padding: 8px 28px 56px; }
  /* Ảnh mẫu là ảnh dọc, nên trên màn hình rộng chia đôi: chữ bên trái, ảnh bên phải. */
  .hero { height: min(82vh, 760px); display: grid; grid-template-columns: 1fr 1fr; }
  .hero-img { grid-column: 2; grid-row: 1; }
  .hero-text { position: static; grid-column: 1; grid-row: 1; align-self: center; padding: 48px 56px; background: none; }
  .product { grid-template-columns: 1.1fr 1fr; gap: 44px; padding: 20px 28px 40px; align-items: start; }
  .gallery { display: grid; grid-template-columns: 1fr; overflow: visible; }
  .gallery.many { grid-template-columns: 1fr 1fr; }
  .gallery img, .gallery.many img { border-radius: var(--radius); }
  .buy { padding: 0; position: sticky; top: 84px; }
  .buy h1 { font-size: 34px; }
  .crumbs { padding: 16px 28px 0; }
  .checkout { grid-template-columns: 1.2fr 1fr; align-items: start; }
  .summary { order: 0; position: sticky; top: 90px; }
  .foot { grid-template-columns: 2fr 1fr 1fr; padding: 44px 28px; }
  .foot > * { max-width: 420px; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  * { transition: none !important; }
}

/* Thông báo đầu trang, tạm ngừng nhận đơn, thông tin chuyển khoản */
.announce { background: var(--accent); color: var(--accent-ink); text-align: center; font-size: 16px; font-weight: 500; padding: 9px 14px; }
.announce::before, .announce::after { content: var(--ornament, ''); margin: 0 8px; opacity: .85; }
.announce-pause { background: var(--warn); }
.paused-box { background: var(--card); border: 1px solid var(--line); border-left: 5px solid var(--warn); border-radius: var(--radius); padding: 14px 16px; font-size: 18px; }
.bank-box { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 14px 16px; margin: 0 0 14px; }
.bank-box h2 { font-size: 20px; margin-bottom: 8px; }
.bank-box dl { margin: 0 0 8px; }
.bank-box dl div { display: flex; justify-content: space-between; gap: 12px; padding: 6px 0; border-bottom: 1px dashed var(--line); }
.bank-box dt { color: var(--muted); }
.bank-box dd { margin: 0; text-align: right; font-size: 18px; }

/* Chủ đề ngày lễ (mục "Chủ đề trang trí" trong tab Cài đặt web): chỉ đổi màu nhấn và một họa tiết nhỏ */
.theme-tet { --accent: #b3261e; --ornament: '✽'; }
.theme-8-3 { --accent: #a8325e; --ornament: '✿'; }
.theme-20-10 { --accent: #8a3d7a; --ornament: '❀'; }
.theme-noel { --accent: #1f5c43; --ornament: '❄'; }
.theme-tet .notice { background: #7d1a14; }
.theme-noel .notice { background: #7a1f1a; }
.theme-tet .logo::after, .theme-8-3 .logo::after, .theme-20-10 .logo::after, .theme-noel .logo::after { content: var(--ornament); font-style: normal; font-size: 18px; color: var(--accent); margin-left: 6px; vertical-align: super; }
