
:root {
  --blue: #ff7ba9;
  --blue-dark: #ff5c91;
  --blue-light: #ffe4ee;
  --blue-accent: #ffb3c9;
  --text: #5a4a50;
  --text-soft: #8a7a80;
  --muted: #b5a7ad;
  --bg: #fff3ed;
  --white: #ffffff;
  --border: #ffd9e5;
  --danger: #e5484d;
  --success: #4ade80;
  --radius: 24px;
  
  --clay-shadow: 6px 6px 16px rgba(255, 150, 180, 0.22), -6px -6px 16px rgba(255, 255, 255, 0.95);
  --clay-shadow-sm: 4px 4px 12px rgba(255, 150, 180, 0.18), -4px -4px 12px rgba(255, 255, 255, 0.9);
  --clay-border: 3px solid #ffd9e5;
  --maxw: 1180px;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC",
    "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
  color: var(--text);
  background: var(--bg);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

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

.container { max-width: var(--maxw); margin: 0 auto; padding: 0 18px; }


.header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(255, 248, 242, 0.95);
  backdrop-filter: blur(8px);
  border-bottom: 3px solid var(--border);
}
.header-inner {
  display: flex;
  align-items: center;
  gap: 24px;
  height: 66px;
}
.logo {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 19px;
  font-weight: 800;
  color: var(--blue-dark);
  white-space: nowrap;
}
.logo .logo-mark {
  width: 40px; height: 40px;
  border-radius: 13px;
  background: var(--white);
  border: 3px solid var(--border);
  box-shadow: var(--clay-shadow-sm);
  color: var(--blue);
  display: grid; place-items: center;
  font-size: 20px;
}
.nav { display: flex; gap: 6px; flex: 1; }
.nav a {
  padding: 8px 16px;
  border-radius: 14px;
  color: var(--text-soft);
  font-weight: 600;
  font-size: 15px;
  transition: 0.15s;
}
.nav a:hover { color: var(--blue-dark); background: var(--blue-light); }
.nav a.active {
  color: #fff; background: var(--blue);
  box-shadow: 0 4px 0 var(--blue-dark);
}

.search-form {
  display: flex;
  align-items: center;
  background: var(--white);
  border: 3px solid var(--border);
  border-radius: 999px;
  padding: 3px 5px 3px 16px;
  flex: 0 1 260px;
  box-shadow: var(--clay-shadow-sm);
}
.search-form input {
  border: none; background: transparent; outline: none; flex: 1;
  font-size: 14px; color: var(--text);
}
.search-form button {
  border: none; background: var(--blue); color: #fff;
  width: 36px; height: 36px; border-radius: 50%; font-size: 15px;
  box-shadow: 0 3px 0 var(--blue-dark);
}
.cart-link {
  position: relative;
  display: flex; align-items: center; gap: 6px;
  padding: 9px 16px; border-radius: 16px;
  background: var(--white); color: var(--blue-dark);
  border: 3px solid var(--border);
  box-shadow: var(--clay-shadow-sm);
  font-weight: 700; white-space: nowrap;
}
.cart-link:hover { transform: translateY(-1px); }
.cart-badge {
  position: absolute; top: -5px; right: -5px;
  min-width: 22px; height: 22px; padding: 0 6px;
  background: var(--danger); color: #fff;
  border-radius: 999px; font-size: 12px; font-weight: 700;
  display: grid; place-items: center; line-height: 1;
  border: 2px solid #fff;
}


.hero {
  position: relative;
  background: url('/static/images/hero_bg.jpg') center/cover no-repeat;
  border-bottom: 3px solid var(--border);
  overflow: hidden;
}
.hero::before {
  content: '';
  position: absolute; inset: 0;
  background: linear-gradient(90deg, rgba(255, 92, 145, 0.55) 0%, rgba(255, 92, 145, 0.30) 55%, rgba(255, 92, 145, 0.08) 100%);
}
.hero-inner {
  position: relative;
  display: flex; align-items: center;
  padding: 56px 18px;
}
.hero-text h1 { font-size: 32px; line-height: 1.3; margin-bottom: 10px; color: #fff; text-shadow: 0 2px 8px rgba(0,0,0,0.25); }
.hero-text h1 .hl { color: #ffe3ec; }
.hero-text p { color: rgba(255, 255, 255, 0.94); font-size: 15px; max-width: 460px; text-shadow: 0 1px 4px rgba(0,0,0,0.2); }
.hero-text .btn { margin-top: 16px; }
.hero-badge {
  display: inline-block;
  background: #fff;
  color: var(--blue-dark);
  font-size: 12px;
  font-weight: 700;
  padding: 6px 16px;
  border-radius: 20px;
  margin-bottom: 14px;
  border: 3px solid var(--border);
  box-shadow: var(--clay-shadow-sm);
}


.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  padding: 12px 24px; border-radius: 18px; border: none;
  font-size: 15px; font-weight: 700; transition: 0.1s; white-space: nowrap;
}
.btn-primary {
  background: var(--blue); color: #fff;
  box-shadow: 0 5px 0 var(--blue-dark);
}
.btn-primary:hover { filter: brightness(1.05); }
.btn-primary:active { transform: translateY(4px); box-shadow: 0 1px 0 var(--blue-dark); }
.btn-ghost {
  background: var(--white); color: var(--blue-dark);
  border: 3px solid var(--border); box-shadow: var(--clay-shadow-sm);
}
.btn-ghost:hover { background: var(--blue-light); }
.btn-block { width: 100%; }
.btn-sm { padding: 8px 16px; font-size: 13px; }
.btn-danger { background: var(--danger); color: #fff; box-shadow: 0 5px 0 #c03538; }
.btn-danger:active { transform: translateY(4px); box-shadow: 0 1px 0 #c03538; }


.section { padding: 40px 0; }
.section-head {
  display: flex; align-items: baseline; justify-content: space-between;
  margin-bottom: 24px; flex-wrap: wrap; gap: 10px;
}
.section-head h2 { font-size: 25px; color: var(--blue-dark); }
.section-head .sub { color: var(--muted); font-size: 14px; }


.grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 20px;
}
.card {
  background: var(--white); border-radius: var(--radius); overflow: hidden;
  border: var(--clay-border); box-shadow: var(--clay-shadow);
  transition: 0.18s; display: flex; flex-direction: column;
}
.card:hover { transform: translateY(-5px); box-shadow: 8px 10px 22px rgba(255, 150, 180, 0.3), -6px -6px 16px rgba(255, 255, 255, 0.95); }
.card-img {
  height: 170px; display: grid; place-items: center; font-size: 64px;
  background: linear-gradient(135deg, #fff0f0, #ffe9f0);
  border-bottom: 3px solid var(--border);
  overflow: hidden;
}
.card-img img { max-width: 100%; max-height: 100%; object-fit: contain; }
.card-body { padding: 16px; display: flex; flex-direction: column; gap: 6px; flex: 1; }
.card-brand { font-size: 12px; color: var(--blue-dark); font-weight: 800; letter-spacing: 0.5px; }
.card-name { font-size: 16px; font-weight: 700; }
.card-desc {
  font-size: 13px; color: var(--muted);
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.card-foot { display: flex; align-items: center; justify-content: space-between; margin-top: auto; padding-top: 6px; }
.price { color: var(--danger); font-weight: 800; font-size: 19px; }
.price small { font-size: 12px; font-weight: 700; }
.add-btn {
  border: none; background: var(--blue); color: #fff;
  width: 38px; height: 38px; border-radius: 13px; font-size: 20px; line-height: 1;
  box-shadow: 0 4px 0 var(--blue-dark); transition: 0.1s;
}
.add-btn:hover { filter: brightness(1.06); }
.add-btn:active { transform: translateY(3px); box-shadow: 0 1px 0 var(--blue-dark); }

.empty {
  text-align: center; padding: 60px 20px; color: var(--muted);
  background: #fff; border-radius: var(--radius); border: 3px dashed var(--border);
}
.empty .big { font-size: 54px; margin-bottom: 10px; }


.crumb { padding: 16px 0; font-size: 13px; color: var(--muted); }
.crumb a:hover { color: var(--blue-dark); }


.detail { display: grid; grid-template-columns: 1fr 1fr; gap: 40px; padding: 10px 0 30px; }
.detail-img {
  border-radius: var(--radius); background: linear-gradient(135deg, #fff0f0, #ffe9f0);
  display: grid; place-items: center; font-size: 150px; min-height: 360px;
  border: var(--clay-border); box-shadow: var(--clay-shadow);
}
.detail-info .brand { color: var(--blue-dark); font-weight: 800; letter-spacing: 0.5px; }
.detail-info h1 { font-size: 30px; margin: 6px 0 14px; }
.detail-info .desc { color: var(--text-soft); margin-bottom: 18px; }
.detail-price {
  background: var(--blue-light); border-radius: var(--radius);
  padding: 18px 22px; margin-bottom: 22px;
  border: 3px solid var(--border);
}
.detail-price .label { font-size: 13px; color: var(--text-soft); }
.detail-price .amount { color: var(--danger); font-size: 34px; font-weight: 800; }
.detail-price .amount small { font-size: 18px; }
.qty-row { display: flex; align-items: center; gap: 14px; margin-bottom: 22px; }
.qty-row .label { color: var(--text-soft); }
.qty-ctrl { display: inline-flex; align-items: center; border: 3px solid var(--border); border-radius: 16px; overflow: hidden; box-shadow: var(--clay-shadow-sm); }
.qty-ctrl button { width: 40px; height: 40px; border: none; background: #fff; font-size: 20px; color: var(--blue-dark); }
.qty-ctrl button:hover { background: var(--blue-light); }
.qty-ctrl input {
  width: 54px; height: 40px; border: none; text-align: center; font-size: 16px;
  outline: none; border-left: 3px solid var(--border); border-right: 3px solid var(--border);
}
.detail-actions { display: flex; gap: 12px; }
.meta-list { margin-top: 24px; border-top: 3px solid var(--border); padding-top: 18px; }
.meta-list div { display: flex; justify-content: space-between; padding: 7px 0; font-size: 14px; color: var(--text-soft); }
.meta-list div b { color: var(--text); font-weight: 700; }


.cart-layout { display: grid; grid-template-columns: 1fr 320px; gap: 24px; align-items: start; }
.cart-list { display: flex; flex-direction: column; gap: 14px; }
.cart-item {
  display: grid; grid-template-columns: 80px 1fr auto; gap: 16px; align-items: center;
  background: #fff; border: var(--clay-border); border-radius: var(--radius);
  padding: 14px; box-shadow: var(--clay-shadow);
}
.cart-item .ci-img {
  width: 80px; height: 80px; border-radius: 16px; display: grid; place-items: center;
  font-size: 38px; background: linear-gradient(135deg, #fff0f0, #ffe9f0);
  border: 3px solid var(--border);
}
.cart-item .ci-name { font-weight: 700; font-size: 16px; }
.cart-item .ci-brand { font-size: 12px; color: var(--blue-dark); font-weight: 800; }
.cart-item .ci-price { color: var(--danger); font-weight: 700; margin-top: 4px; }
.ci-right { display: flex; flex-direction: column; align-items: flex-end; gap: 10px; }
.ci-subtotal { font-size: 17px; font-weight: 800; color: var(--text); }
.ci-remove { background: none; border: none; color: var(--muted); font-size: 13px; }
.ci-remove:hover { color: var(--danger); }

.summary {
  background: #fff; border: var(--clay-border); border-radius: var(--radius);
  padding: 22px; box-shadow: var(--clay-shadow); position: sticky; top: 86px;
}
.summary h3 { margin-bottom: 16px; font-size: 18px; }
.summary .row { display: flex; justify-content: space-between; padding: 7px 0; color: var(--text-soft); font-size: 14px; }
.summary .total { display: flex; justify-content: space-between; align-items: baseline;
  border-top: 3px dashed var(--border); margin-top: 10px; padding-top: 14px; }
.summary .total .amount { color: var(--danger); font-size: 26px; font-weight: 800; }


.form-grid { display: grid; gap: 16px; }
.field { display: flex; flex-direction: column; gap: 6px; }
.field label { font-size: 14px; font-weight: 700; color: var(--text); }
.field input, .field textarea, .field select {
  border: 3px solid var(--border); border-radius: 14px; padding: 11px 14px;
  font-size: 15px; font-family: inherit; outline: none; background: #fff; transition: 0.2s;
}
.field input:focus, .field textarea:focus, .field select:focus {
  border-color: var(--blue); box-shadow: 0 0 0 4px var(--blue-light);
}
.field textarea { resize: vertical; min-height: 70px; }
.form-card { background: #fff; border: var(--clay-border); border-radius: var(--radius); padding: 26px; box-shadow: var(--clay-shadow); }
.form-error { background: #fdecea; color: var(--danger); border: 3px solid #f5c6c2;
  padding: 11px 14px; border-radius: 14px; font-size: 14px; margin-bottom: 16px; }


.confirm-hero { text-align: center; padding: 30px 20px; background: #fff; border-radius: var(--radius);
  border: var(--clay-border); box-shadow: var(--clay-shadow); }
.confirm-hero .check {
  width: 80px; height: 80px; margin: 0 auto 14px; border-radius: 24px;
  background: var(--success); color: #fff; display: grid; place-items: center; font-size: 42px;
  box-shadow: 0 6px 0 #2faf5e;
}
.confirm-hero h1 { font-size: 26px; }
.confirm-hero p { color: var(--text-soft); margin-top: 6px; }
.order-box { background: #fff; border: var(--clay-border); border-radius: var(--radius);
  padding: 24px; margin-top: 22px; box-shadow: var(--clay-shadow); }
.order-box h3 { margin-bottom: 14px; }
.order-meta { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 14px; margin-bottom: 18px; }
.order-meta .m { background: var(--bg); border-radius: 14px; padding: 12px 14px; border: 3px solid var(--border); }
.order-meta .m .k { font-size: 12px; color: var(--muted); }
.order-meta .m .v { font-weight: 700; }
.oitem { display: flex; justify-content: space-between; padding: 10px 0; border-bottom: 3px dashed var(--border); font-size: 14px; }
.oitem:last-child { border-bottom: none; }


.admin-bar { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 20px; flex-wrap: wrap; }
.admin-table { width: 100%; border-collapse: collapse; background: #fff; border-radius: var(--radius);
  overflow: hidden; box-shadow: var(--clay-shadow); border: var(--clay-border); }
.admin-table th, .admin-table td { padding: 12px 14px; text-align: left; border-bottom: 3px solid var(--border); font-size: 14px; }
.admin-table th { background: var(--blue-light); color: var(--blue-dark); font-weight: 800; }
.admin-table tr:last-child td { border-bottom: none; }
.admin-table .thumb { font-size: 26px; }
.tag { display: inline-block; padding: 3px 12px; border-radius: 999px; background: var(--blue-light);
  color: var(--blue-dark); font-size: 12px; font-weight: 700; }
.tag.gray { background: #f3efe9; color: var(--text-soft); }
.modal-backdrop {
  position: fixed; inset: 0; background: rgba(0,0,0,0.45); display: none;
  align-items: flex-start; justify-content: center; padding: 40px 16px; z-index: 200; overflow: auto;
}
.modal-backdrop.show { display: flex; }
.modal {
  background: #fff; border-radius: var(--radius); width: 100%; max-width: 520px;
  padding: 26px; box-shadow: 0 20px 60px rgba(0,0,0,0.3); border: var(--clay-border);
}
.modal h3 { margin-bottom: 18px; }
.modal .actions { display: flex; gap: 10px; justify-content: flex-end; margin-top: 18px; }


.footer { background: #fff; border-top: 3px solid var(--border); margin-top: 50px; }
.footer-inner { padding: 34px 18px; display: grid; grid-template-columns: repeat(auto-fit, minmax(180px,1fr)); gap: 24px; }
.footer h4 { font-size: 15px; margin-bottom: 12px; color: var(--blue-dark); }
.footer a, .footer p { color: var(--text-soft); font-size: 14px; display: block; padding: 3px 0; }
.footer a:hover { color: var(--blue-dark); }
.footer-bottom { text-align: center; padding: 16px; color: var(--muted); font-size: 13px; border-top: 3px solid var(--border); }


.toast {
  position: fixed; left: 50%; bottom: 34px; transform: translateX(-50%) translateY(20px);
  background: rgba(90, 74, 80, 0.95); color: #fff; padding: 12px 22px; border-radius: 16px;
  font-size: 14px; opacity: 0; pointer-events: none; transition: 0.3s; z-index: 300;
}
.toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }


@media (max-width: 920px) {
  .detail { grid-template-columns: 1fr; gap: 24px; }
  .cart-layout { grid-template-columns: 1fr; }
  .summary { position: static; }
}
@media (max-width: 760px) {
  .header-inner { flex-wrap: wrap; height: auto; padding: 10px 0; gap: 10px; }
  .nav { order: 3; width: 100%; overflow-x: auto; flex-wrap: nowrap; }
  .search-form { flex: 1 1 100%; order: 2; }
  .cart-link { order: 2; }
  .hero-inner { flex-direction: column; text-align: center; padding: 38px 18px; }
  .hero-text h1 { font-size: 28px; }
  .cart-item { grid-template-columns: 64px 1fr; }
  .cart-item .ci-img { width: 64px; height: 64px; font-size: 30px; }
  .ci-right { grid-column: 1 / -1; flex-direction: row; justify-content: space-between; align-items: center; }
  .detail-info h1 { font-size: 24px; }
}
@media (max-width: 480px) {
  .grid { grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 14px; }
  .card-img { height: 130px; font-size: 50px; }
  .section-head h2 { font-size: 20px; }
}


.detail-price { display:flex; align-items:baseline; gap:12px; flex-wrap:wrap; margin:14px 0 6px; }
.detail-price .amount { font-size:34px; font-weight:800; color:#ff5000; }
.detail-price .amount small { font-size:18px; }
.detail-price .orig-price { color:#999; text-decoration:line-through; font-size:14px; }
.detail-price .sales-badge { background:#fff1ec; color:#ff5000; font-size:12px; padding:2px 12px; border-radius:12px; }
.service-bar { display:flex; gap:18px; flex-wrap:wrap; color:#666; font-size:13px; margin:12px 0; padding:10px 16px; background:#fff8f0; border-radius:14px; border:3px solid var(--border); }
.service-bar span::before { content:"✓ "; color:#00b578; font-weight:700; }
.btn-buy { background:#ff5000; color:#fff; box-shadow: 0 5px 0 #cc4000; }
.btn-buy:hover { background:#e64600; color:#fff; }
.btn-buy:active { transform: translateY(4px); box-shadow: 0 1px 0 #cc4000; }
.detail-section { margin-top:8px; }
.detail-copy { max-width:760px; }
.detail-lead { font-size:16px; line-height:2.0; color:#333; background:#fff8f0; padding:18px 20px; border-radius:16px; border:3px solid var(--border); }
.detail-points h3, .detail-spec h3, .detail-notice h3 { font-size:16px; margin:26px 0 12px; color:#111; border-left:4px solid var(--blue); padding-left:10px; }
.detail-points ul { list-style:none; padding:0; }
.detail-points li { padding:9px 0; border-bottom:3px dashed var(--border); color:#444; line-height:1.7; }
.detail-points li::before { content:"✓ "; color:var(--blue); font-weight:700; }
.detail-spec table { width:100%; border-collapse:collapse; font-size:14px; }
.detail-spec td { padding:11px 14px; border:3px solid var(--border); color:#333; }
.detail-spec td:first-child { width:120px; background:#fff8f0; color:#666; }
.detail-notice p { color:#999; font-size:13px; line-height:1.9; margin:4px 0; }


.cat-circle { display: flex; gap: 18px; flex-wrap: wrap; margin-bottom: 26px; justify-content: center; }
.cat-circle a { display: flex; flex-direction: column; align-items: center; gap: 8px; color: var(--text-soft); font-size: 13px; text-decoration: none; }
.cat-circle .circle-icon {
  width: 60px; height: 60px; border-radius: 18px;
  background: #fff; border: 3px solid var(--border);
  box-shadow: var(--clay-shadow-sm);
  display: flex; align-items: center; justify-content: center; font-size: 28px; transition: 0.15s;
}
.cat-circle a.active { color: var(--blue-dark); font-weight: 700; }
.cat-circle a.active .circle-icon {
  background: var(--blue); border-color: var(--blue-dark);
  box-shadow: 0 5px 0 var(--blue-dark);
}
.cat-circle a:hover .circle-icon { transform: translateY(-3px); }
