@import url('https://fonts.googleapis.com/css2?family=Noto+Sans+SC:wght@400;500;600;700;800&display=swap');

:root {
  --bg: #fff8f0; --bg-elevated: #ffffff; --ink: #1a1208;
  --ink-soft: #6b5d4d; --line: #f0e6d8; --accent: #ff5c28;
  --accent-dark: #d94412; --gold: #ffb347; --sale: #e63946;
  --wrap: min(1280px, 96vw); --sans: 'Noto Sans SC', sans-serif;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
}
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
body { font-family: var(--sans); background: var(--bg); color: var(--ink); line-height: 1.55; }
a { color: inherit; text-decoration: none; }
img { display: block; max-width: 100%; }
button, input { font: inherit; }
.wrap { width: var(--wrap); margin: 0 auto; }

.top-bar { background: var(--accent); color: #fff; text-align: center; padding: 8px; font-size: 0.8rem; }
.site-header { background: var(--bg-elevated); border-bottom: 1px solid var(--line); position: sticky; top: 0; z-index: 50; }
.header-inner { display: flex; align-items: center; justify-content: space-between; padding: 14px 0; gap: 16px; }
.brand-name { font-size: 1.5rem; font-weight: 800; color: var(--accent); }
.brand-sub { font-size: 0.72rem; color: var(--ink-soft); }
.main-nav { display: flex; gap: 20px; list-style: none; font-size: 0.9rem; }
.main-nav a.is-active, .main-nav a:hover { color: var(--accent); font-weight: 600; }
.header-actions { display: flex; gap: 12px; align-items: center; }
.header-search-wrap { display: flex; border: 2px solid var(--accent); border-radius: 999px; overflow: hidden; }
.header-search { border: none; padding: 8px 14px; width: 180px; outline: none; }
.header-search-btn { background: var(--accent); color: #fff; border: none; padding: 8px 16px; cursor: pointer; }
.cart-badge { background: var(--sale); color: #fff; font-size: 0.7rem; padding: 2px 6px; border-radius: 10px; margin-left: 4px; }

.layout-shop { display: grid; grid-template-columns: 220px 1fr; gap: 28px; padding: 24px 0 48px; }
.side-nav { position: sticky; top: 88px; align-self: start; }
.side-nav h2 { font-size: 0.75rem; letter-spacing: 0.12em; color: var(--ink-soft); margin-bottom: 12px; }
.side-nav a { display: block; padding: 10px 14px; border-radius: 8px; margin-bottom: 4px; font-size: 0.88rem; }
.side-nav a:hover, .side-nav a.is-on { background: var(--accent); color: #fff; font-weight: 600; }

.hero-side { background: linear-gradient(135deg, var(--accent), var(--accent-dark)); color: #fff; border-radius: 16px; padding: 36px 28px; margin-bottom: 24px; }
.hero-side h1 { font-size: 1.85rem; margin: 8px 0; }
.hero-side p { opacity: 0.92; max-width: 36em; }
.hero-ref { font-size: 0.78rem; margin-top: 12px; opacity: 0.85; }

.shop-tools { display: flex; flex-wrap: wrap; gap: 10px; margin-bottom: 20px; align-items: center; }
.filter-chip { border: 1px solid var(--line); background: #fff; padding: 8px 14px; border-radius: 999px; cursor: pointer; font-size: 0.82rem; }
.filter-chip.is-active { background: var(--accent); color: #fff; border-color: var(--accent); }
.search-input { border: 1px solid var(--line); padding: 8px 14px; border-radius: 8px; min-width: 200px; }

.product-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 20px; }
.product-card { background: #fff; border-radius: 12px; overflow: hidden; border: 1px solid var(--line); transition: transform .25s var(--ease), box-shadow .25s; }
.product-card:hover { transform: translateY(-4px); box-shadow: 0 12px 32px rgba(0,0,0,.08); }
.card-media { position: relative; aspect-ratio: 1; background: #f5f5f5; overflow: hidden; }
.card-media img { width: 100%; height: 100%; object-fit: cover; }
.card-overlay-cart {
  position: absolute; left: 10px; right: 10px; bottom: 10px;
  padding: 10px; background: var(--accent); color: #fff; border: none;
  font-weight: 600; cursor: pointer; opacity: 0; transition: opacity .2s;
  z-index: 3; border-radius: 8px; pointer-events: auto;
}
.product-card:hover .card-overlay-cart { opacity: 1; }
@media (hover: none) { .card-overlay-cart { opacity: 1; } }
.card-body .btn-cart { position: relative; z-index: 1; }
.card-tag { position: absolute; top: 10px; left: 10px; background: var(--gold); color: #1a1208; font-size: 0.65rem; padding: 4px 8px; border-radius: 4px; font-weight: 700; }
.card-body { padding: 14px; }
.card-cat { font-size: 0.68rem; color: var(--ink-soft); }
.card-title { font-size: 0.95rem; margin: 6px 0 10px; min-height: 2.6em; font-weight: 600; }
.card-price { margin-bottom: 10px; }
.price-now { font-size: 1.1rem; font-weight: 700; color: var(--accent); }
.price-was { font-size: 0.8rem; color: var(--ink-soft); text-decoration: line-through; margin-left: 8px; }
.btn { display: inline-flex; align-items: center; justify-content: center; padding: 10px 16px; cursor: pointer; border-radius: 8px; font-size: 0.85rem; }
.btn-cart { background: var(--accent); color: #fff; border: none; width: 100%; font-weight: 600; }
.btn-cart:hover { filter: brightness(0.95); }
.btn-outline { border: 1px solid var(--line); background: #fff; }
.btn-lg { padding: 14px 24px; }
.btn-block { width: 100%; }
.btn-ghost { background: transparent; border: 1px solid var(--line); color: var(--ink-soft); }

.page-pad { padding: 32px 0 64px; }
.breadcrumb { font-size: 0.85rem; color: var(--ink-soft); margin-bottom: 20px; }
.detail-layout { display: grid; grid-template-columns: 1fr 1fr; gap: 40px; }
.detail-gallery img { border-radius: 12px; width: 100%; }
.detail-tag { background: var(--gold); padding: 4px 10px; font-size: 0.75rem; font-weight: 700; }
.detail-price { margin: 16px 0; }
.detail-desc { color: var(--ink-soft); margin-bottom: 20px; }
.qty-row { display: flex; align-items: center; gap: 8px; margin-bottom: 20px; }
.qty-btn { width: 36px; height: 36px; border: 1px solid var(--line); background: #fff; cursor: pointer; border-radius: 6px; }
#qty-input { width: 56px; text-align: center; border: 1px solid var(--line); padding: 8px; border-radius: 6px; }
.detail-actions { display: flex; gap: 12px; flex-wrap: wrap; }

.cart-layout { display: grid; grid-template-columns: 1fr 320px; gap: 32px; }
.cart-row { display: grid; grid-template-columns: 80px 1fr auto auto auto; gap: 16px; align-items: center; padding: 16px 0; border-bottom: 1px solid var(--line); }
.cart-thumb img { width: 80px; height: 80px; object-fit: cover; border-radius: 8px; }
.cart-summary { background: #fff; border: 1px solid var(--line); border-radius: 12px; padding: 24px; height: fit-content; }
.summary-row { display: flex; justify-content: space-between; font-size: 1.2rem; margin-bottom: 16px; }
.summary-note { font-size: 0.82rem; color: var(--ink-soft); margin-bottom: 16px; }

.site-footer { background: var(--ink); color: #fff; padding: 40px 0; margin-top: 48px; }
.footer-grid { display: flex; flex-wrap: wrap; gap: 24px; justify-content: space-between; align-items: flex-start; }
.footer-nav { display: flex; gap: 20px; flex-wrap: wrap; }
.footer-nav a { opacity: 0.85; }
.footer-ref { font-size: 0.75rem; opacity: 0.7; margin-top: 8px; }
.footer-ref a { text-decoration: underline; }

.content-page { padding: 48px 0; max-width: 720px; }
.content-page h1 { margin-bottom: 24px; }
.contact-card { background: #fff; border: 1px solid var(--line); padding: 32px; border-radius: 12px; }
.contact-company { font-size: 1.25rem; font-weight: 600; }
.prose h2 { margin: 24px 0 8px; font-size: 1.1rem; }

.toast { position: fixed; bottom: 24px; left: 50%; transform: translateX(-50%) translateY(80px); background: var(--ink); color: #fff; padding: 12px 24px; border-radius: 8px; opacity: 0; transition: all .3s; z-index: 200; }
.toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }
.empty-msg, .empty-state { text-align: center; padding: 48px; color: var(--ink-soft); }

.cat-strip {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
  margin-bottom: 24px;
}
.cat-tile {
  background: var(--bg-elevated);
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 18px 12px;
  text-align: center;
  transition: transform .2s, box-shadow .2s;
}
.cat-tile:hover { transform: translateY(-3px); box-shadow: 0 8px 24px rgba(0,0,0,.08); }
.cat-tile span { font-weight: 600; font-size: 0.95rem; display: block; }
.cat-tile small { font-size: 0.72rem; color: var(--ink-soft); margin-top: 4px; display: block; }

@media (max-width: 900px) {
  .layout-shop { grid-template-columns: 1fr; }
  .side-nav { display: flex; flex-wrap: wrap; gap: 8px; position: static; }
  .side-nav a { margin: 0; }
  .detail-layout, .cart-layout { grid-template-columns: 1fr; }
  .cat-strip { grid-template-columns: repeat(2, 1fr); }
}
