/* ==========================================================================
   厨集 KitchenGo — 视觉风格参考 Target.com
   主色 #CC0000 · 白底 · 卡片式布局 · 响应式商品网格
   ========================================================================== */

:root {
  --red: #CC0000;
  --red-dark: #A60000;
  --red-tint: #FDEDED;
  --charcoal: #333333;
  --gray: #666666;
  --line: #D6D6D6;
  --line-soft: #EDEDED;
  --gold: #DAAA00;
  --green: #008300;
  --bg: #ffffff;
  --max: 1440px;
  --radius: 8px;
  --shadow: 0 1px 4px rgba(0, 0, 0, .10);
  --shadow-lg: 0 6px 24px rgba(0, 0, 0, .14);
}

* { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  font-family: "Helvetica Neue", Arial, "Microsoft YaHei", "PingFang SC", "Hiragino Sans GB", sans-serif;
  color: var(--charcoal);
  background: var(--bg);
  font-size: 15px;
  line-height: 1.55;
}

a { color: inherit; text-decoration: none; }
a:hover { text-decoration: underline; }
img { max-width: 100%; display: block; }
button { font: inherit; cursor: pointer; }

.wrap { width: 100%; max-width: var(--max); margin: 0 auto; padding: 0 16px; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

.skip-link {
  position: absolute; left: -9999px; top: 0; z-index: 999;
  background: #fff; color: var(--red); padding: 10px 16px; font-weight: 700;
}
.skip-link:focus { left: 0; }

/* ------------------------------------------------------------------ 顶栏 */
.util-bar {
  background: #f7f7f7; border-bottom: 1px solid var(--line-soft);
  font-size: 12px; color: var(--gray);
}
.util-bar .wrap { display: flex; gap: 18px; align-items: center; height: 34px; }
.util-bar a:hover { color: var(--red); }
.util-bar .spacer { flex: 1; }
.util-bar .dot { color: var(--red); font-weight: 700; }

/* ---------------------------------------------------------------- 主导航 */
.main-header { border-bottom: 1px solid var(--line-soft); background: #fff; position: sticky; top: 0; z-index: 60; }
.header-main { display: flex; align-items: center; gap: 20px; height: 72px; }

.logo { display: flex; align-items: center; gap: 9px; font-size: 26px; font-weight: 800; letter-spacing: .5px; white-space: nowrap; }
.logo:hover { text-decoration: none; }
.logo .bullseye {
  width: 30px; height: 30px; border-radius: 50%;
  background: var(--red); position: relative; flex: none;
}
.logo .bullseye::after {
  content: ""; position: absolute; inset: 7px; border-radius: 50%; background: #fff;
}
.logo .bullseye::before {
  content: ""; position: absolute; inset: 13px; border-radius: 50%; background: var(--red); z-index: 1;
}

.search { flex: 1; min-width: 0; }
.search form {
  display: flex; align-items: center; background: #f7f7f7;
  border: 1px solid var(--line); border-radius: 999px; overflow: hidden;
}
.search input {
  flex: 1; min-width: 0; border: 0; background: transparent; outline: none;
  padding: 11px 18px; font-size: 15px;
}
.search button {
  border: 0; background: transparent; padding: 0 16px; height: 44px;
  display: flex; align-items: center; color: var(--gray);
}
.search button:hover { color: var(--red); }

.header-actions { display: flex; align-items: center; gap: 6px; }
.hbtn {
  display: flex; flex-direction: column; align-items: center; gap: 2px;
  padding: 6px 12px; border-radius: var(--radius); color: var(--charcoal);
  font-size: 11px; line-height: 1.15; border: 0; background: transparent;
}
.hbtn:hover { background: #f2f2f2; text-decoration: none; }
.hbtn .ico { font-size: 19px; }
.cart-btn { position: relative; }
.cart-badge {
  position: absolute; top: 0; right: 4px; min-width: 19px; height: 19px; padding: 0 5px;
  background: var(--red); color: #fff; border-radius: 999px;
  font-size: 11px; font-weight: 700; display: flex; align-items: center; justify-content: center;
}
.cart-badge[data-empty="1"] { display: none; }

.nav-toggle { display: none; border: 0; background: transparent; font-size: 22px; padding: 6px 10px; }

/* --------------------------------------------------------- 分类导航条 */
.cat-bar { border-top: 1px solid var(--line-soft); }
.cat-bar .wrap { display: flex; gap: 4px; align-items: stretch; overflow-x: auto; scrollbar-width: none; }
.cat-bar .wrap::-webkit-scrollbar { display: none; }
.cat-item { position: relative; }
.cat-item > a {
  display: block; padding: 12px 14px; font-size: 14px; font-weight: 600; white-space: nowrap;
  border-bottom: 3px solid transparent;
}
.cat-item > a:hover, .cat-item > a.active { color: var(--red); border-bottom-color: var(--red); text-decoration: none; }
.cat-item .mega {
  position: absolute; left: 0; top: 100%; min-width: 220px; background: #fff;
  border: 1px solid var(--line-soft); box-shadow: var(--shadow-lg); border-radius: 0 0 var(--radius) var(--radius);
  padding: 8px; display: none; z-index: 70;
}
.cat-item:hover .mega { display: block; }
.cat-item .mega a { display: block; padding: 8px 12px; border-radius: 6px; font-size: 14px; }
.cat-item .mega a:hover { background: var(--red-tint); color: var(--red); text-decoration: none; }
.deals-link > a { color: var(--red); }

/* -------------------------------------------------------------------- 按钮 */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  border: 1px solid transparent; border-radius: 999px; padding: 11px 22px;
  font-size: 15px; font-weight: 700; background: #f2f2f2; color: var(--charcoal);
  transition: background .15s, box-shadow .15s, opacity .15s;
}
.btn:hover { text-decoration: none; }
.btn-primary { background: var(--red); color: #fff; }
.btn-primary:hover { background: var(--red-dark); }
.btn-outline { background: #fff; border-color: var(--charcoal); color: var(--charcoal); }
.btn-outline:hover { background: #f2f2f2; }
.btn-block { width: 100%; }
.btn[disabled] { opacity: .45; cursor: not-allowed; }
.btn-sm { padding: 8px 16px; font-size: 14px; }

/* --------------------------------------------------------------- Hero */
.hero { position: relative; background: #fbf7f4; overflow: hidden; }
.hero-track { display: flex; transition: transform .45s ease; }
.hero-slide {
  min-width: 100%; display: grid; grid-template-columns: 1.05fr 1fr;
  align-items: center; gap: 30px; padding: 46px 0 54px;
}
.hero-copy { max-width: 520px; }
.hero-kicker { color: var(--red); font-weight: 800; letter-spacing: 3px; font-size: 13px; }
.hero h1 { font-size: 42px; line-height: 1.15; margin: 12px 0 14px; }
.hero p { color: var(--gray); font-size: 16px; margin: 0 0 22px; }
.hero-visual {
  height: 280px; border-radius: 14px; display: flex; align-items: center; justify-content: center;
  font-size: 130px; box-shadow: var(--shadow);
}
.hero-dots { position: absolute; left: 50%; bottom: 14px; transform: translateX(-50%); display: flex; gap: 8px; }
.hero-dots button {
  width: 9px; height: 9px; border-radius: 50%; border: 0; background: #cfcfcf; padding: 0;
}
.hero-dots button.active { background: var(--red); width: 26px; border-radius: 999px; }
.hero-arrow {
  position: absolute; top: 50%; transform: translateY(-50%); width: 42px; height: 42px;
  border-radius: 50%; border: 1px solid var(--line); background: #fff; font-size: 18px;
  display: flex; align-items: center; justify-content: center; box-shadow: var(--shadow);
}
.hero-arrow.prev { left: 10px; }
.hero-arrow.next { right: 10px; }

/* --------------------------------------------------------------- 区块标题 */
section { padding: 34px 0; }
.section-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; margin-bottom: 18px; }
.section-head h2 { font-size: 24px; margin: 0; }
.section-head .more { color: var(--red); font-weight: 700; font-size: 14px; white-space: nowrap; }
.section-head .more:hover { text-decoration: underline; }

/* ------------------------------------------------------- 圆形分类入口 */
.cat-circles { display: grid; grid-template-columns: repeat(8, 1fr); gap: 14px; }
.cat-circle { text-align: center; }
.cat-circle .ring {
  width: 100%; aspect-ratio: 1; border-radius: 50%; display: flex; align-items: center;
  justify-content: center; font-size: 34px; margin-bottom: 9px; transition: transform .18s, box-shadow .18s;
  border: 1px solid var(--line-soft);
}
.cat-circle:hover .ring { transform: translateY(-3px); box-shadow: var(--shadow-lg); }
.cat-circle:hover { text-decoration: none; }
.cat-circle span { font-size: 13px; font-weight: 600; }
.cat-circle small { display: block; color: var(--gray); font-size: 12px; font-weight: 400; }

/* --------------------------------------------------------------- 商品网格 */
.grid { display: grid; gap: 18px; grid-template-columns: repeat(5, minmax(0, 1fr)); }
@media (max-width: 1439px) { .grid { grid-template-columns: repeat(5, minmax(0, 1fr)); } }
@media (max-width: 1199px) { .grid { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
@media (max-width: 899px)  { .grid { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (max-width: 599px)  { .grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; } }

.card {
  display: flex; flex-direction: column; border: 1px solid var(--line-soft);
  border-radius: var(--radius); padding: 12px; background: #fff; position: relative;
  transition: box-shadow .18s, transform .18s;
}
.card:hover { box-shadow: var(--shadow-lg); transform: translateY(-2px); }
.card .thumb { background: #fff; border-radius: 6px; overflow: hidden; margin-bottom: 10px; }
.card .thumb img { width: 100%; aspect-ratio: 1; object-fit: cover; }
.card .flags { position: absolute; top: 18px; left: 18px; display: flex; flex-direction: column; gap: 5px; }
.flag { font-size: 11px; font-weight: 700; padding: 3px 8px; border-radius: 999px; background: var(--red); color: #fff; }
.flag.deal { background: #fff; color: var(--red); border: 1px solid var(--red); }
.flag.new { background: var(--charcoal); }
.card h3 { font-size: 14px; font-weight: 600; margin: 0 0 4px; line-height: 1.4; min-height: 39px; }
.card h3 a:hover { color: var(--red); }
.card .brand { color: var(--gray); font-size: 12px; margin-bottom: 6px; }
.price-row { display: flex; align-items: baseline; gap: 8px; margin-bottom: 2px; }
.price { font-size: 19px; font-weight: 800; color: var(--charcoal); }
.price.list { font-size: 13px; font-weight: 400; color: var(--gray); text-decoration: line-through; }
.rating { display: flex; align-items: center; gap: 5px; font-size: 12px; color: var(--gray); margin-bottom: 8px; }
.stars { color: var(--gold); letter-spacing: -1px; }
.stock-warn { color: var(--red); font-size: 12px; font-weight: 700; margin-bottom: 6px; }
.card .btn { margin-top: auto; }
.card .ship { color: var(--green); font-size: 12px; font-weight: 600; margin-bottom: 8px; }

/* ------------------------------------------------------------- 促销四宫格 */
.promo-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; }
@media (max-width: 899px) { .promo-grid { grid-template-columns: repeat(2, 1fr); } }
.promo {
  border-radius: 12px; padding: 26px 22px; min-height: 190px; display: flex;
  flex-direction: column; justify-content: flex-end; gap: 4px;
  transition: transform .18s, box-shadow .18s;
}
.promo:hover { transform: translateY(-3px); box-shadow: var(--shadow-lg); text-decoration: none; }
.promo .big { font-size: 40px; line-height: 1; margin-bottom: auto; }
.promo h3 { margin: 0; font-size: 19px; }
.promo p { margin: 0; color: var(--gray); font-size: 13px; }
.promo .cta { color: var(--red); font-weight: 700; font-size: 13px; margin-top: 8px; }

/* --------------------------------------------------------------- 面包屑 */
.crumbs { font-size: 13px; color: var(--gray); padding: 16px 0 0; }
.crumbs a:hover { color: var(--red); }
.crumbs .sep { margin: 0 7px; }

/* --------------------------------------------------------- 列表页布局 */
.listing { display: grid; grid-template-columns: 244px 1fr; gap: 26px; align-items: start; padding-bottom: 50px; }
@media (max-width: 899px) { .listing { grid-template-columns: 1fr; } }

.filters { border: 1px solid var(--line-soft); border-radius: var(--radius); padding: 16px; position: sticky; top: 150px; }
.filters h4 { margin: 0 0 10px; font-size: 15px; }
.fgroup { padding: 14px 0; border-top: 1px solid var(--line-soft); }
.fgroup:first-of-type { border-top: 0; padding-top: 4px; }
.fgroup .fname { font-weight: 700; font-size: 14px; margin-bottom: 8px; }
.fopt { display: flex; align-items: center; gap: 8px; padding: 5px 0; font-size: 14px; cursor: pointer; }
.fopt input { accent-color: var(--red); }
.frange { display: flex; align-items: center; gap: 8px; }
.frange input {
  width: 100%; min-width: 0; padding: 7px 10px; border: 1px solid var(--line);
  border-radius: 6px; font-size: 14px; outline: none;
}
.frange input:focus { border-color: var(--red); }

.list-head { display: flex; align-items: center; justify-content: space-between; gap: 14px; flex-wrap: wrap; margin-bottom: 16px; }
.list-head h1 { font-size: 26px; margin: 0; }
.list-head .count { color: var(--gray); font-size: 14px; }
.sortbar { display: flex; align-items: center; gap: 10px; font-size: 14px; }
.sortbar select {
  padding: 9px 12px; border: 1px solid var(--line); border-radius: 999px;
  background: #fff; font-size: 14px; outline: none;
}
.sortbar select:focus { border-color: var(--red); }
.active-chips { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 14px; }
.chip {
  display: inline-flex; align-items: center; gap: 6px; background: var(--red-tint);
  color: var(--red-dark); border-radius: 999px; padding: 5px 12px; font-size: 13px; font-weight: 600;
}
.chip button { border: 0; background: transparent; color: inherit; font-size: 15px; line-height: 1; padding: 0; }

.pager { display: flex; justify-content: center; align-items: center; gap: 6px; padding: 30px 0 10px; }
.pager button {
  min-width: 38px; height: 38px; border: 1px solid var(--line); background: #fff;
  border-radius: 8px; font-size: 14px; padding: 0 10px;
}
.pager button.active { background: var(--red); border-color: var(--red); color: #fff; font-weight: 700; }
.pager button:disabled { opacity: .4; cursor: not-allowed; }

/* ------------------------------------------------------------- 详情页 */
.detail { display: grid; grid-template-columns: 1.05fr 1fr; gap: 40px; padding: 20px 0 46px; }
@media (max-width: 899px) { .detail { grid-template-columns: 1fr; gap: 24px; } }
.gallery { border: 1px solid var(--line-soft); border-radius: 12px; overflow: hidden; background: #fff; }
.gallery img { width: 100%; aspect-ratio: 1; object-fit: cover; }
.thumbs { display: flex; gap: 10px; margin-top: 12px; }
.thumbs img { width: 74px; height: 74px; object-fit: cover; border: 1px solid var(--line-soft); border-radius: 8px; }
.buybox h1 { font-size: 27px; margin: 0 0 8px; line-height: 1.3; }
.buybox .brandline { color: var(--gray); font-size: 14px; margin-bottom: 12px; }
.buybox .rating { font-size: 13px; }
.price-lg { font-size: 32px; font-weight: 800; }
.buybox .price-row { margin: 14px 0 6px; }
.save-tag { background: var(--red-tint); color: var(--red-dark); font-weight: 700; font-size: 13px; padding: 3px 10px; border-radius: 999px; }
.spec-table { width: 100%; border-collapse: collapse; margin: 18px 0; font-size: 14px; }
.spec-table th, .spec-table td { text-align: left; padding: 9px 12px; border-bottom: 1px solid var(--line-soft); }
.spec-table th { color: var(--gray); font-weight: 500; width: 38%; }
.qty { display: inline-flex; align-items: center; border: 1px solid var(--line); border-radius: 999px; overflow: hidden; }
.qty button { width: 40px; height: 42px; border: 0; background: #fff; font-size: 18px; }
.qty button:hover { background: #f2f2f2; }
.qty input { width: 52px; height: 42px; border: 0; text-align: center; font-size: 15px; outline: none; }
.buy-row { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; margin: 18px 0 10px; }
.buy-row .btn-primary { flex: 1; min-width: 180px; }
.deliver { border: 1px solid var(--line-soft); border-radius: var(--radius); padding: 14px 16px; font-size: 14px; margin-top: 16px; }
.deliver div { display: flex; gap: 10px; padding: 4px 0; }
.deliver b { min-width: 74px; font-weight: 700; }

/* ------------------------------------------------------------- 购物车 */
.cart-layout { display: grid; grid-template-columns: 1fr 340px; gap: 28px; align-items: start; padding-bottom: 50px; }
@media (max-width: 899px) { .cart-layout { grid-template-columns: 1fr; } }
.cart-list { border: 1px solid var(--line-soft); border-radius: var(--radius); overflow: hidden; }
.cart-row { display: grid; grid-template-columns: 92px 1fr auto; gap: 16px; padding: 16px; border-bottom: 1px solid var(--line-soft); align-items: center; }
.cart-row:last-child { border-bottom: 0; }
.cart-row img { width: 92px; height: 92px; object-fit: cover; border-radius: 8px; border: 1px solid var(--line-soft); }
.cart-row h3 { margin: 0 0 4px; font-size: 15px; }
.cart-row .meta { color: var(--gray); font-size: 13px; }
.cart-row .controls { display: flex; align-items: center; gap: 14px; margin-top: 10px; }
.link-btn { background: none; border: 0; color: var(--gray); font-size: 13px; text-decoration: underline; padding: 0; }
.link-btn:hover { color: var(--red); }
.cart-row .line-sum { font-weight: 800; font-size: 17px; text-align: right; }

.summary { border: 1px solid var(--line-soft); border-radius: var(--radius); padding: 20px; position: sticky; top: 150px; }
.summary h3 { margin: 0 0 14px; font-size: 18px; }
.sum-row { display: flex; justify-content: space-between; padding: 7px 0; font-size: 15px; }
.sum-row.total { border-top: 1px solid var(--line-soft); margin-top: 8px; padding-top: 14px; font-size: 19px; font-weight: 800; }
.sum-row .free { color: var(--green); font-weight: 700; }
.ship-hint { background: #f7f7f7; border-radius: 8px; padding: 10px 12px; font-size: 13px; color: var(--gray); margin: 10px 0; }

.empty { text-align: center; padding: 70px 20px; }
.empty .big { font-size: 56px; margin-bottom: 12px; }
.empty p { color: var(--gray); margin: 0 0 20px; }

/* --------------------------------------------------------------- 表单 */
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.form-grid .full { grid-column: 1 / -1; }
@media (max-width: 599px) { .form-grid { grid-template-columns: 1fr; } }
.field label { display: block; font-size: 13px; font-weight: 700; margin-bottom: 5px; }
.field input, .field textarea {
  width: 100%; padding: 11px 13px; border: 1px solid var(--line); border-radius: 8px;
  font-size: 15px; outline: none; font-family: inherit;
}
.field input:focus, .field textarea:focus { border-color: var(--red); box-shadow: 0 0 0 3px var(--red-tint); }
.field .err { color: var(--red); font-size: 12px; margin-top: 4px; display: none; }
.field.invalid input, .field.invalid textarea { border-color: var(--red); }
.field.invalid .err { display: block; }

.panel { border: 1px solid var(--line-soft); border-radius: var(--radius); padding: 22px; margin-bottom: 20px; }
.panel h3 { margin: 0 0 16px; font-size: 18px; }

/* --------------------------------------------------------------- 订单 */
.order-hero { background: #f0f8f0; border: 1px solid #cfe9cf; border-radius: 12px; padding: 26px; margin: 22px 0; }
.order-hero h2 { margin: 0 0 8px; color: var(--green); font-size: 24px; }
.order-meta { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 14px; margin: 18px 0; }
.order-meta div { background: #fafafa; border-radius: 8px; padding: 12px 14px; }
.order-meta b { display: block; color: var(--gray); font-size: 12px; font-weight: 600; margin-bottom: 3px; }

/* --------------------------------------------------------------- 提示 */
.toast {
  position: fixed; left: 50%; bottom: 30px; transform: translate(-50%, 20px);
  background: var(--charcoal); color: #fff; padding: 12px 22px; border-radius: 999px;
  font-size: 14px; opacity: 0; pointer-events: none; transition: all .25s; z-index: 999;
  box-shadow: var(--shadow-lg); max-width: 90vw;
}
.toast.show { opacity: 1; transform: translate(-50%, 0); }
.toast.ok { background: var(--green); }
.toast.bad { background: var(--red); }

/* --------------------------------------------------------------- 页脚 */
footer { background: #fafafa; border-top: 1px solid var(--line-soft); margin-top: 30px; padding: 40px 0 26px; }
.foot-cols { display: grid; grid-template-columns: repeat(4, 1fr); gap: 24px; }
@media (max-width: 899px) { .foot-cols { grid-template-columns: repeat(2, 1fr); } }
.foot-cols h4 { font-size: 14px; margin: 0 0 10px; }
.foot-cols a { display: block; color: var(--gray); font-size: 13px; padding: 4px 0; }
.foot-cols a:hover { color: var(--red); }
.foot-bottom { border-top: 1px solid var(--line-soft); margin-top: 26px; padding-top: 18px; color: var(--gray); font-size: 12px; display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; }

/* ------------------------------------------------------------- 移动端 */
@media (max-width: 899px) {
  .util-bar .wrap { gap: 12px; overflow-x: auto; white-space: nowrap; }
  .nav-toggle { display: block; }
  .header-main { height: 64px; gap: 10px; }
  .logo { font-size: 21px; }
  .logo .bullseye { width: 24px; height: 24px; }
  .logo .bullseye::after { inset: 6px; }
  .logo .bullseye::before { inset: 10px; }
  .search { order: 3; flex-basis: 100%; }
  .header-main { flex-wrap: wrap; height: auto; padding: 10px 0; }
  .hbtn .lbl { display: none; }
  .header-actions { margin-left: auto; }
  .cat-bar { display: none; }
  .cat-bar.open { display: block; }
  .cat-bar.open .wrap { flex-direction: column; gap: 0; }
  .cat-item .mega { position: static; display: block; box-shadow: none; border: 0; padding-left: 14px; }
  .hero-slide { grid-template-columns: 1fr; padding: 26px 0 40px; }
  .hero h1 { font-size: 29px; }
  .hero-visual { height: 190px; font-size: 86px; }
  .hero-arrow { display: none; }
  .cat-circles { grid-template-columns: repeat(4, 1fr); }
  .cat-circle .ring { font-size: 26px; }
  .filters { position: static; }
  .summary { position: static; }
  .cart-row { grid-template-columns: 72px 1fr; }
  .cart-row img { width: 72px; height: 72px; }
  .cart-row .line-sum { grid-column: 2; text-align: left; }
}
