:root { --brand: #d7261e; --ink: #222; --muted: #6b6b6b; --line: #e7e7e7; --bg: #f4f4f4; }
* { box-sizing: border-box; }
body { margin: 0; background: var(--bg); color: var(--ink); font: 15px/1.5 system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif; }
a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }
h1 { font-size: 24px; margin: 16px 0; }
h2 { font-size: 20px; margin: 0 0 12px; }
h3 { font-size: 15px; margin: 0; }
.wrap { max-width: 1200px; margin: 0 auto; padding: 0 16px; }
.pre { white-space: pre-line; }
.grow { flex: 1; min-width: 0; }

.top { background: #fff; }
.top-row { display: flex; align-items: center; gap: 28px; min-height: 76px; flex-wrap: wrap; padding-block: 8px; }
.logo { font-size: 26px; font-weight: 800; color: var(--brand); margin-right: auto; }
.logo img { width: 170px; height: 56px; object-fit: cover; }
.info { display: flex; flex-direction: column; font-size: 13px; line-height: 1.35; }
.cart-link { font-weight: 600; display: flex; align-items: center; gap: 6px; min-height: 44px; }
.badge { background: var(--brand); color: #fff; border-radius: 12px; font-size: 12px; padding: 1px 8px; }

.nav { background: var(--brand); position: sticky; top: 0; z-index: 10; }
.nav-row { display: flex; align-items: center; gap: 16px; }
.nav-links { display: flex; overflow-x: auto; flex: 1; scrollbar-width: none; }
.nav-links a { color: #fff; font-weight: 600; padding: 13px 12px; white-space: nowrap; }
.nav-links a:hover, .nav-links a.on { background: rgba(0, 0, 0, .18); }
.search { display: flex; background: #fff; border-radius: 20px; overflow: hidden; width: 260px; flex: none; }
.search input { border: 0; padding: 7px 14px; flex: 1; min-width: 0; font: inherit; outline: none; }
.search button { border: 0; background: none; padding: 0 12px; font-size: 18px; cursor: pointer; }

main { padding-block: 16px 40px; }
section { margin-bottom: 24px; }
.hero { display: grid; grid-template-columns: 250px 1fr; gap: 16px; }
.catmenu { background: #fff; border-radius: 10px; overflow: visible; align-self: start; }
.catmenu h2 { background: var(--brand); color: #fff; font-size: 15px; margin: 0; padding: 10px 14px; border-radius: 10px 10px 0 0; text-transform: uppercase; }
.catmenu a { display: flex; justify-content: space-between; padding: 9px 14px; }
.catmenu a:hover, .catmenu a.on { color: var(--brand); }
.catmenu i { font-style: normal; color: var(--brand); }
.cat-name { display: flex; align-items: center; gap: 8px; }
.cat-name img { width: 26px; height: 26px; object-fit: contain; }
.cat { position: relative; }
.sub { display: none; position: absolute; left: 100%; top: 0; width: 220px; background: #fff; box-shadow: 0 4px 16px rgba(0, 0, 0, .15); border-radius: 8px; z-index: 5; max-height: 360px; overflow: auto; }
.cat:hover .sub, .cat:focus-within .sub { display: block; }
.slider { display: flex; overflow-x: auto; scroll-snap-type: x mandatory; border-radius: 10px; scrollbar-width: none; aspect-ratio: 3 / 1; background: #fff; }
.slider a { flex: 0 0 100%; scroll-snap-align: start; }
.slider img { width: 100%; height: 100%; object-fit: cover; }

.sec-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 12px; }
.sec-head h2 { margin: 0; }
.sec-head a { color: var(--brand); font-weight: 600; }
.grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; }
.card { position: relative; background: #fff; border-radius: 10px; padding: 12px; display: flex; flex-direction: column; gap: 4px; transition: box-shadow .15s; }
.card:hover { box-shadow: 0 4px 16px rgba(0, 0, 0, .12); }
.card img { aspect-ratio: 1; object-fit: contain; width: 100%; margin-bottom: 6px; }
.card h3 { font-weight: 500; }
.card small { color: var(--muted); }
.tag { position: absolute; top: 10px; left: 10px; background: var(--brand); color: #fff; font-size: 12px; font-weight: 700; padding: 1px 7px; border-radius: 4px; }
.price { color: var(--brand); font-weight: 700; margin-top: auto; }
.price s { color: var(--muted); font-weight: 400; font-size: 13px; }
.price.big { font-size: 26px; margin: 8px 0; }

.posts { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; }
.post { background: #fff; border-radius: 10px; overflow: hidden; padding-bottom: 10px; }
.post img { aspect-ratio: 16 / 9; object-fit: cover; width: 100%; margin-bottom: 8px; }
.post h3, .post small, .post p { padding-inline: 12px; display: block; }
.post small { color: var(--muted); }
.post p { margin: 4px 0 0; font-size: 14px; }

.crumb { color: var(--muted); font-size: 14px; margin-bottom: 12px; }
.crumb a:hover { color: var(--brand); }
.shop { display: flex; gap: 16px; align-items: flex-start; }
.side { width: 250px; flex: none; display: grid; gap: 12px; }
.filter { background: #fff; border-radius: 10px; padding: 14px; display: grid; gap: 10px; }
.row2 { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.toolbar { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 8px; background: #fff; padding: 10px 14px; border-radius: 10px; margin-bottom: 12px; }
.sorts { display: flex; gap: 14px; flex-wrap: wrap; }
.sorts a.on { color: var(--brand); font-weight: 700; }
.g3 { grid-template-columns: repeat(3, 1fr); }
.pager { display: flex; gap: 6px; justify-content: center; margin-top: 16px; flex-wrap: wrap; }
.pager a { background: #fff; padding: 6px 12px; border-radius: 6px; }
.pager a.on { background: var(--brand); color: #fff; }
.empty { background: #fff; padding: 40px; text-align: center; border-radius: 10px; }

.detail { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; background: #fff; border-radius: 10px; padding: 20px; margin-bottom: 16px; }
.gallery > img { width: 100%; max-height: 460px; object-fit: contain; }
.thumbs { display: flex; gap: 8px; margin-top: 10px; overflow-x: auto; }
.thumbs button { border: 1px solid var(--line); background: #fff; padding: 2px; border-radius: 6px; cursor: pointer; flex: none; }
.thumbs img { width: 60px; height: 60px; object-fit: contain; }
.buy h1 { margin-top: 0; }
.buy-form { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; margin-top: 16px; }
.buy-form label { display: flex; gap: 8px; align-items: center; }
.buy-form input { width: 70px; }

.box { background: #fff; border-radius: 10px; padding: 18px; margin-bottom: 16px; }
.center { text-align: center; }
.prose { overflow-wrap: anywhere; }
.prose img { height: auto; }
.btn { display: inline-block; background: var(--brand); color: #fff; border: 1px solid var(--brand); border-radius: 8px; padding: 10px 20px; font: inherit; font-weight: 600; cursor: pointer; }
.btn:hover { filter: brightness(.92); }
.btn.ghost { background: #fff; color: var(--brand); }
.btn.wide { width: 100%; }
.link { background: none; border: 0; color: var(--brand); cursor: pointer; font: inherit; padding: 6px; }
input, textarea, select { font: inherit; padding: 9px 10px; border: 1px solid #ccc; border-radius: 6px; width: 100%; background: #fff; }
input[type=checkbox], input[type=radio] { width: auto; }
.form { display: grid; gap: 12px; }
.form form { display: grid; gap: 12px; }
.form label { display: grid; gap: 4px; font-weight: 500; }
.form h2 { margin: 6px 0 0; }
label.check, .form label.check { display: flex; align-items: center; gap: 8px; font-weight: 400; }

.checkout { display: flex; gap: 16px; align-items: flex-start; }
.summary { width: 340px; flex: none; position: sticky; top: 60px; }
.summary > p { display: flex; justify-content: space-between; gap: 12px; margin: 8px 0; }
.summary .total { font-size: 18px; border-top: 1px solid var(--line); padding-top: 10px; color: var(--brand); }
.voucher, .form form.voucher { display: flex; gap: 8px; margin-bottom: 8px; }
.voucher input { flex: 1; min-width: 0; }
.voucher .btn { padding-inline: 14px; }
.line { display: flex; gap: 12px; align-items: center; padding: 10px 0; border-bottom: 1px solid var(--line); }
.line:last-child { border-bottom: 0; }
.line img { width: 64px; height: 64px; object-fit: contain; }
.qty input { width: 68px; }
.table { width: 100%; border-collapse: collapse; }
.table th, .table td { text-align: left; padding: 10px 8px; border-bottom: 1px solid var(--line); }
.two { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; align-items: start; }
.carriers { display: flex; flex-wrap: wrap; gap: 8px; }
.voucher-card .code { font-size: 20px; font-weight: 800; color: var(--brand); border: 1px dashed var(--brand); padding: 6px 12px; display: inline-block; border-radius: 6px; }
.alert { padding: 10px 14px; border-radius: 8px; margin: 0 0 12px; }
.alert p { margin: 4px 0; }
.alert.ok { background: #e8f6ec; color: #17602f; }
.alert.err { background: #fdeceb; color: #a11a14; }

.footer { background: #fff; padding: 28px 0; border-top: 3px solid var(--brand); }
.foot-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.footer h3 { font-size: 16px; margin-bottom: 8px; }
.footer p { margin: 4px 0; font-size: 14px; }
.footer a:hover { color: var(--brand); }
.social-float { position: fixed; left: 14px; bottom: 24px; display: grid; gap: 12px; z-index: 20; }
.social-float a { width: 52px; height: 52px; border-radius: 50%; display: grid; place-items: center; box-shadow: 0 4px 12px rgba(0, 0, 0, .25); transition: transform .15s; }
.social-float a:hover { transform: scale(1.08); }
.social-float svg { width: 30px; height: 30px; }
.sf-facebook { background: #1877f2; }
.sf-messenger { background: linear-gradient(45deg, #0a7cff, #a033ff 60%, #ff5c87); }
.sf-tiktok { background: #111; }

@media (max-width: 900px) {
  .hero, .detail, .two, .foot-grid { grid-template-columns: 1fr; }
  .hero .catmenu { display: none; }
  .grid, .g3, .posts { grid-template-columns: repeat(2, 1fr); }
  .shop, .checkout { flex-direction: column; align-items: stretch; }
  .side, .summary { width: 100%; position: static; }
  .side .catmenu .sub { display: none; }
  .nav-row { flex-wrap: wrap; gap: 0; padding-bottom: 8px; }
  .nav-links { flex-basis: 100%; }
  .search { width: 100%; }
  .info { display: none; }
  .top-row { min-height: 60px; }
}
