:root {
  --nav: #131921;
  --nav2: #232f3e;
  --accent: #febd69;
  --accent-hover: #f3a847;
  --link: #007185;
  --price: #b12704;
  --border: #d5d9d9;
  --bg: #eaeded;
  --star: #ffa41c;
}
* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  font-family: "Amazon Ember", Arial, Helvetica, sans-serif;
  background: var(--bg);
  color: #0f1111;
  line-height: 1.4;
}
a { color: var(--link); text-decoration: none; }
a:hover { text-decoration: underline; color: #c7511f; }
img { max-width: 100%; display: block; }

/* ---------- Header ---------- */
.top { background: var(--nav); color: #fff; }
.top-row {
  display: flex; align-items: center; gap: 10px;
  padding: 6px 12px; max-width: 1500px; margin: 0 auto;
}
.logo {
  color: #fff; font-weight: 800; font-size: 22px; letter-spacing: -.5px;
  padding: 6px 8px; border: 1px solid transparent; border-radius: 4px; white-space: nowrap;
}
.logo:hover { border-color: #fff; text-decoration: none; color: #fff; }
.logo .tld { color: var(--accent); }
.deliver { display: flex; align-items: center; gap: 4px; font-size: 12px; padding: 6px; border: 1px solid transparent; border-radius: 4px; cursor: pointer; }
.deliver small { color: #ccc; }
.deliver:hover { border-color: #fff; }
.search {
  flex: 1; display: flex; height: 40px; border-radius: 4px; overflow: hidden;
  min-width: 180px;
}
.search select {
  border: none; background: #e6e6e6; padding: 0 8px; font-size: 12px; cursor: pointer;
  border-right: 1px solid #cdcdcd;
}
.search input {
  flex: 1; border: none; padding: 0 12px; font-size: 15px; min-width: 60px;
}
.search input:focus { outline: 2px solid var(--accent); }
.search button {
  background: var(--accent); border: none; width: 45px; cursor: pointer; font-size: 18px;
  display: flex; align-items: center; justify-content: center;
}
.search button:hover { background: var(--accent-hover); }
.navlink {
  color: #fff; font-size: 13px; padding: 8px; border: 1px solid transparent; border-radius: 4px;
  display: flex; flex-direction: column; line-height: 1.1; white-space: nowrap;
}
.navlink b { font-size: 14px; }
.navlink small { color: #ccc; font-size: 12px; }
.navlink:hover { border-color: #fff; text-decoration: none; color: #fff; }
.cart-link { display: flex; align-items: flex-end; gap: 2px; position: relative; }
.cart-count {
  background: var(--accent); color: #131921; font-weight: 800; font-size: 13px;
  border-radius: 50%; min-width: 20px; height: 20px; display: inline-flex;
  align-items: center; justify-content: center; padding: 0 5px; margin-bottom: 6px;
}
.subnav {
  background: var(--nav2); color: #fff; display: flex; gap: 4px; align-items: center;
  padding: 4px 12px; max-width: 1500px; margin: 0 auto; overflow-x: auto;
}
.subnav a { color: #fff; font-size: 14px; padding: 6px 8px; border-radius: 4px; border: 1px solid transparent; white-space: nowrap; }
.subnav a:hover { border-color: #fff; text-decoration: none; }
.subnav .all { font-weight: 700; }

/* ---------- Layout ---------- */
.wrap { max-width: 1500px; margin: 0 auto; padding: 14px 12px; }
.hero {
  background: linear-gradient(180deg, #cfe9f5, #eaeded);
  border-radius: 6px; padding: 28px; margin-bottom: 16px;
  display: flex; align-items: center; justify-content: space-between; gap: 20px; flex-wrap: wrap;
}
.hero h1 { margin: 0 0 8px; font-size: 30px; }
.hero p { margin: 0 0 14px; color: #333; max-width: 560px; }
.btn {
  background: var(--accent); border: 1px solid #a88734; color: #0f1111;
  padding: 9px 18px; border-radius: 20px; font-size: 14px; font-weight: 600; cursor: pointer;
  display: inline-block;
}
.btn:hover { background: var(--accent-hover); text-decoration: none; color: #0f1111; }
.btn.secondary { background: #fff; }
.btn.block { display: block; width: 100%; text-align: center; border-radius: 8px; margin-top: 8px; }
.btn.big { padding: 12px 22px; font-size: 15px; }

/* category cards */
.cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 16px; margin-bottom: 16px; }
.card { background: #fff; border-radius: 6px; padding: 18px; }
.card h3 { margin: 0 0 12px; font-size: 18px; }
.card .thumb { height: 150px; border-radius: 4px; margin-bottom: 10px; }

/* section heading */
.section-title { font-size: 21px; margin: 22px 0 12px; }

/* product grid */
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 16px; }
.p-card {
  background: #fff; border-radius: 6px; padding: 14px; display: flex; flex-direction: column;
  position: relative; border: 1px solid transparent;
}
.p-card:hover { border-color: #e0e0e0; box-shadow: 0 2px 8px rgba(0,0,0,.08); }
.p-card .img { height: 190px; border-radius: 4px; margin-bottom: 12px; }
.p-card .title { font-size: 15px; color: #0f1111; margin: 0 0 6px; min-height: 42px;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.p-card .title:hover { color: #c7511f; }
.stars { color: var(--star); font-size: 14px; }
.stars .count { color: var(--link); font-size: 13px; margin-left: 5px; }
.price { color: #0f1111; margin: 6px 0; }
.price .cur { font-size: 20px; font-weight: 700; }
.price .old { color: #565959; text-decoration: line-through; font-size: 13px; margin-left: 8px; }
.badge-prime { display: inline-block; font-size: 12px; color: var(--link); font-weight: 700; margin: 2px 0; }
.wish {
  position: absolute; top: 10px; right: 10px; background: #fff; border: 1px solid var(--border);
  border-radius: 50%; width: 32px; height: 32px; cursor: pointer; font-size: 15px; line-height: 30px;
  text-align: center; color: #565959;
}
.wish.active { color: #c7511f; border-color: #c7511f; }

/* ---------- Category page ---------- */
.layout { display: grid; grid-template-columns: 240px 1fr; gap: 18px; }
.filters { background: #fff; border-radius: 6px; padding: 16px; align-self: start; }
.filters h4 { margin: 14px 0 8px; font-size: 15px; }
.filters h4:first-child { margin-top: 0; }
.filters label { display: block; font-size: 14px; margin: 4px 0; cursor: pointer; }
.filters input[type=range] { width: 100%; }
.toolbar { background: #fff; border-radius: 6px; padding: 10px 14px; margin-bottom: 14px;
  display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 8px; }
.toolbar select { padding: 6px; border-radius: 6px; border: 1px solid var(--border); }

/* ---------- Product detail ---------- */
.detail { background: #fff; border-radius: 6px; padding: 24px; display: grid;
  grid-template-columns: 1fr 1.2fr 300px; gap: 28px; }
.detail .big-img { height: 380px; border-radius: 6px; }
.detail h1 { font-size: 25px; margin: 0 0 8px; }
.detail .desc { margin: 14px 0; color: #333; }
.buybox { border: 1px solid var(--border); border-radius: 8px; padding: 18px; align-self: start; }
.buybox .price .cur { font-size: 26px; }
.qty { display: flex; align-items: center; gap: 8px; margin: 12px 0; }
.qty select { padding: 6px; border-radius: 6px; border: 1px solid var(--border); }
.instock { color: #007600; font-weight: 600; margin: 8px 0; }

/* ---------- Cart ---------- */
.cart-layout { display: grid; grid-template-columns: 1fr 320px; gap: 18px; }
.cart-items, .summary, .panel { background: #fff; border-radius: 6px; padding: 20px; }
.cart-row { display: grid; grid-template-columns: 120px 1fr auto; gap: 16px; padding: 16px 0; border-bottom: 1px solid #e7e7e7; }
.cart-row .ci-img { height: 110px; border-radius: 4px; }
.cart-row h3 { margin: 0 0 6px; font-size: 17px; }
.cart-row .ctrls { display: flex; gap: 12px; align-items: center; margin-top: 8px; font-size: 13px; }
.cart-row select { padding: 5px; border-radius: 6px; border: 1px solid var(--border); }
.link-btn { background: none; border: none; color: var(--link); cursor: pointer; font-size: 13px; padding: 0; }
.link-btn:hover { color: #c7511f; text-decoration: underline; }
.summary .total { font-size: 19px; font-weight: 700; }
.summary .row { display: flex; justify-content: space-between; margin: 8px 0; }
.empty { background: #fff; border-radius: 6px; padding: 40px; text-align: center; }

/* ---------- Forms / checkout ---------- */
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.field { display: flex; flex-direction: column; margin-bottom: 12px; }
.field.full { grid-column: 1 / -1; }
.field label { font-size: 13px; font-weight: 600; margin-bottom: 4px; }
.field input, .field textarea, .field select {
  padding: 9px; border: 1px solid #888c8c; border-radius: 6px; font-size: 14px;
}
.checkout-layout { display: grid; grid-template-columns: 1fr 320px; gap: 18px; }
.note { font-size: 12px; color: #565959; margin-top: 6px; }

/* ---------- Footer ---------- */
footer { background: var(--nav2); color: #ddd; margin-top: 30px; }
.back-top { background: #37475a; color: #fff; text-align: center; padding: 14px; cursor: pointer; font-size: 14px; }
.back-top:hover { background: #485769; }
.foot-cols { max-width: 1100px; margin: 0 auto; padding: 30px 16px; display: grid;
  grid-template-columns: repeat(4, 1fr); gap: 24px; }
.foot-cols h5 { color: #fff; margin: 0 0 10px; font-size: 15px; }
.foot-cols a { color: #ddd; display: block; font-size: 13px; margin: 6px 0; }
.foot-bottom { border-top: 1px solid #3a4553; text-align: center; padding: 18px; font-size: 12px; color: #aaa; }

.toast {
  position: fixed; bottom: 20px; left: 50%; transform: translateX(-50%);
  background: #0f1111; color: #fff; padding: 12px 20px; border-radius: 8px; font-size: 14px;
  opacity: 0; pointer-events: none; transition: opacity .25s, bottom .25s; z-index: 999;
}
.toast.show { opacity: 1; bottom: 34px; }

.breadcrumb { font-size: 13px; color: #565959; margin-bottom: 12px; }

@media (max-width: 1000px) {
  .detail { grid-template-columns: 1fr; }
  .layout { grid-template-columns: 1fr; }
  .cart-layout, .checkout-layout { grid-template-columns: 1fr; }
}
@media (max-width: 700px) {
  .navlink.hide-sm, .deliver { display: none; }
  .foot-cols { grid-template-columns: repeat(2, 1fr); }
  .form-grid { grid-template-columns: 1fr; }
  .hero h1 { font-size: 23px; }
}
