:root {
  --nav: #131921;
  --nav2: #232f3e;
  --orange: #ff9900;
  --orange-soft: #febd69;
  --yellow: #ffd814;
  --yellow-h: #f7ca00;
  --buy: #ffa41c;
  --buy-h: #fa8900;
  --link: #007185;
  --link-h: #c7511f;
  --price: #b12704;
  --bg: #eaeded;
  --card: #fff;
  --text: #0f1111;
  --muted: #565959;
  --border: #d5d9d9;
  --star: #de7921;
  --green: #007600;
}
* { box-sizing: border-box; }
html, body { margin: 0; }
body {
  font-family: "Amazon Ember", Arial, "Helvetica Neue", sans-serif;
  font-size: 14px; color: var(--text); background: var(--bg); line-height: 1.4;
}
a { color: var(--link); text-decoration: none; }
a:hover { color: var(--link-h); text-decoration: underline; }
img { max-width: 100%; display: block; }
button, select, input { font: inherit; }

/* ---------- Header ---------- */
.hdr { background: var(--nav); color: #fff; }
.hdr-main { display: flex; align-items: center; gap: 10px; padding: 8px 14px; }
.hdr a { color: #fff; }
.hdr a:hover { text-decoration: none; }
.hdr .box { padding: 6px 8px; border: 1px solid transparent; border-radius: 2px; white-space: nowrap; }
.hdr .box:hover { border-color: #fff; }
.logo { font-size: 26px; font-weight: 800; letter-spacing: -1px; position: relative; padding: 4px 8px 12px !important; }
.logo span { color: var(--orange); }
.logo::after {
  content: ""; position: absolute; left: 12px; right: 14px; bottom: 6px; height: 6px;
  border-bottom: 3px solid var(--orange); border-radius: 0 0 60% 60%;
}
.deliver { font-size: 12px; line-height: 1.2; color: #ccc; }
.deliver b { display: block; color: #fff; font-size: 14px; }
.search { flex: 1; display: flex; height: 40px; border-radius: 4px; overflow: hidden; min-width: 0; }
.search:focus-within { box-shadow: 0 0 0 3px var(--orange); }
.search select {
  background: #e6e6e6; border: 0; border-right: 1px solid #cdcdcd; padding: 0 8px; color: #555;
  max-width: 120px; font-size: 12px;
}
.search input { flex: 1; border: 0; padding: 0 10px; font-size: 15px; outline: 0; min-width: 0; }
.search button {
  width: 46px; border: 0; background: var(--orange-soft); cursor: pointer; display: grid; place-items: center;
}
.search button:hover { background: var(--orange); }
.hdr .acct { font-size: 12px; line-height: 1.2; }
.hdr .acct b { display: block; font-size: 14px; }
.cart-link { display: flex; align-items: flex-end; gap: 2px; font-weight: 700; font-size: 14px; position: relative; }
.cart-link svg { width: 38px; height: 34px; }
.cart-count {
  position: absolute; top: -4px; left: 20px; width: 24px; text-align: center;
  color: var(--orange); font-size: 16px; font-weight: 800;
}
.hdr-sub { background: var(--nav2); display: flex; gap: 2px; padding: 0 10px; overflow-x: auto; white-space: nowrap; scrollbar-width: none; }
.hdr-sub::-webkit-scrollbar { display: none; }
.hdr-sub a { color: #fff; padding: 8px 10px; font-size: 14px; border: 1px solid transparent; }
.hdr-sub a:hover { border-color: #fff; text-decoration: none; }
.hdr-sub .menu { font-weight: 700; display: flex; align-items: center; gap: 6px; }
.hdr-sub .grow { flex: 1; }
.hdr-sub .promo { font-weight: 700; }

/* ---------- Layout ---------- */
.wrap { max-width: 1500px; margin: 0 auto; }
.page { padding: 14px; }

/* ---------- Hero ---------- */
.hero { position: relative; height: 420px; overflow: hidden; background: #232f3e; }
.slide {
  position: absolute; inset: 0; display: flex; align-items: flex-start; padding: 50px 8% 0;
  opacity: 0; transition: opacity .6s; color: #fff;
}
.slide.on { opacity: 1; }
.slide h1 { font-size: clamp(26px, 4.5vw, 52px); margin: 0 0 10px; line-height: 1.05; max-width: 640px; }
.slide p { font-size: clamp(14px, 1.6vw, 20px); margin: 0 0 18px; max-width: 520px; opacity: .92; }
.slide .art { position: absolute; right: 8%; top: 40px; font-size: clamp(90px, 16vw, 220px); opacity: .9; }
.slide .btn-cta {
  display: inline-block; background: var(--yellow); color: var(--text); padding: 10px 22px; border-radius: 20px;
  font-weight: 600;
}
.slide .btn-cta:hover { background: var(--yellow-h); text-decoration: none; color: var(--text); }
.s1 { background: linear-gradient(120deg, #1b3a57, #3f7ea6 60%, #8cc7d9); }
.s2 { background: linear-gradient(120deg, #3b1d4f, #8a3f8f 60%, #e57a9d); }
.s3 { background: linear-gradient(120deg, #14412f, #2d8b5d 60%, #a5d86a); }
.hero::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 160px; pointer-events: none;
  background: linear-gradient(to bottom, transparent, var(--bg));
}
.hero-arrow {
  position: absolute; top: 0; height: 62%; width: 60px; border: 0; background: transparent; color: #fff;
  font-size: 40px; cursor: pointer; z-index: 2; opacity: .8;
}
.hero-arrow:hover { background: rgba(0,0,0,.15); }
.hero-arrow.l { left: 0; } .hero-arrow.r { right: 0; }

/* ---------- Card grid (overlaps hero) ---------- */
.tiles { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 20px; margin: -190px 14px 20px; position: relative; z-index: 3; }
.tile { background: var(--card); padding: 18px 20px 14px; display: flex; flex-direction: column; min-height: 420px; }
.tile h2 { font-size: 21px; margin: 0 0 12px; font-weight: 700; }
.tile .mini { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px 12px; flex: 1; align-content: start; }
.tile .mini a { min-width: 0; }
.tile .mini .thumb { font-size: 40px; }
.tile .mini a { color: var(--text); font-size: 12px; }
.tile .mini a:hover { text-decoration: none; }
.tile .mini .thumb { aspect-ratio: 1; margin-bottom: 4px; }
.tile .mini span { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tile .more { margin-top: 12px; display: inline-block; }
.tile.signin { justify-content: flex-start; }
.tile.signin p { color: var(--muted); }
.btn-yellow {
  display: block; width: 100%; background: var(--yellow); border: 1px solid #fcd200; border-radius: 20px;
  padding: 8px 12px; text-align: center; cursor: pointer; color: var(--text);
}
.btn-yellow:hover { background: var(--yellow-h); text-decoration: none; color: var(--text); }
.btn-buy { background: var(--buy); border-color: #ff8f00; }
.btn-buy:hover { background: var(--buy-h); }
.btn-gray { background: #fff; border: 1px solid var(--border); border-radius: 8px; padding: 6px 14px; cursor: pointer; }

/* ---------- Thumbs / placeholders ---------- */
.thumb {
  background: #f3f3f3 center / contain no-repeat; display: grid; place-items: center; overflow: hidden;
  font-size: 56px; position: relative;
}
.thumb img { width: 100%; height: 100%; object-fit: contain; mix-blend-mode: multiply; }

/* ---------- Rails & product grid ---------- */
.section { background: var(--card); margin: 0 14px 20px; padding: 16px 20px; }
.section > h2 { margin: 0 0 12px; font-size: 21px; }
.rail { display: flex; gap: 14px; overflow-x: auto; padding-bottom: 8px; scroll-snap-type: x proximity; }
.rail .pcard { flex: 0 0 190px; scroll-snap-align: start; }
.pcard { color: var(--text); display: block; }
.pcard:hover { text-decoration: none; color: var(--text); }
.pcard .thumb { aspect-ratio: 1; margin-bottom: 8px; }
.pcard .t { font-size: 14px; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.pcard:hover .t { color: var(--link-h); }
.badge-deal {
  display: inline-block; background: #cc0c39; color: #fff; font-size: 12px; font-weight: 700; padding: 2px 7px;
  border-radius: 2px; margin: 4px 0; align-self: flex-start;
}
.ribbon {
  position: absolute; top: 6px; left: 0; background: #cc0c39; color: #fff; font-size: 11px; font-weight: 700;
  padding: 3px 8px; border-radius: 0 3px 3px 0;
}
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: 18px; }
.grid .pcard { background: #fff; border: 1px solid var(--border); border-radius: 8px; padding: 12px; display: flex; flex-direction: column; }
.grid .pcard .btn-yellow { margin-top: auto; }
.grid .pcard .spacer { flex: 1; }
.results-bar { display: flex; justify-content: space-between; align-items: center; margin-bottom: 14px; flex-wrap: wrap; gap: 8px; }
.results-bar h2 { margin: 0; font-size: 18px; }
.results-bar select { padding: 5px 8px; border: 1px solid var(--border); border-radius: 8px; background: #f0f2f2; }

/* ---------- Price & stars ---------- */
.price { display: flex; align-items: flex-start; font-weight: 500; margin: 2px 0; }
.price .cur { font-size: 12px; margin-top: 3px; }
.price .whole { font-size: 24px; line-height: 1.1; }
.price .frac { font-size: 12px; margin-top: 3px; }
.price.big .whole { font-size: 30px; } .price.big .cur, .price.big .frac { font-size: 14px; margin-top: 5px; }
.price.sale { color: var(--price); }
.was { color: var(--muted); font-size: 12px; text-decoration: line-through; margin-left: 6px; align-self: flex-end; }
.stars { color: var(--star); letter-spacing: 1px; white-space: nowrap; }
.stars .empty { color: #ccc; }
.rating-row { display: flex; align-items: center; gap: 6px; font-size: 12px; }
.prime { color: #00a8e1; font-weight: 800; font-style: italic; font-size: 12px; }
.free-ship { color: var(--muted); font-size: 12px; }

/* ---------- Product page ---------- */
.pdp { display: grid; grid-template-columns: minmax(280px, 5fr) minmax(300px, 5fr) 260px; gap: 28px; background: var(--card); padding: 20px; }
.gallery { display: grid; grid-template-columns: 56px 1fr; gap: 12px; align-self: start; position: sticky; top: 10px; }
.gallery .thumbs { display: flex; flex-direction: column; gap: 8px; }
.gallery .thumbs button {
  width: 48px; height: 48px; border: 1px solid var(--border); border-radius: 6px; background: #fff; padding: 2px; cursor: pointer;
}
.gallery .thumbs button.on, .gallery .thumbs button:hover { border-color: var(--orange); box-shadow: 0 0 3px 2px rgba(255,153,0,.4); }
.gallery .main { aspect-ratio: 1; }
.pdp h1 { font-size: 24px; font-weight: 400; margin: 0 0 6px; line-height: 1.25; }
.pdp hr { border: 0; border-top: 1px solid var(--border); margin: 12px 0; }
.pdp .desc { white-space: pre-line; }
.pdp .about h3 { font-size: 16px; margin: 0 0 6px; }
.opt-group { margin: 10px 0; }
.opt-group b { display: block; margin-bottom: 6px; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip { border: 1px solid var(--border); border-radius: 8px; background: #fff; padding: 6px 12px; cursor: pointer; }
.chip.on { border: 2px solid var(--orange); padding: 5px 11px; background: #fffaf0; }
.chip:disabled { opacity: .45; cursor: not-allowed; text-decoration: line-through; }
.buybox { border: 1px solid var(--border); border-radius: 8px; padding: 16px; align-self: start; }
.buybox .instock { color: var(--green); font-size: 18px; margin: 8px 0; }
.buybox .oos { color: var(--price); font-size: 18px; margin: 8px 0; }
.buybox select { padding: 5px 8px; border: 1px solid var(--border); border-radius: 8px; background: #f0f2f2; margin: 4px 0 12px; }
.buybox .btn-yellow { margin-bottom: 10px; padding: 10px; }
.buybox .meta { display: grid; grid-template-columns: auto 1fr; gap: 3px 10px; font-size: 12px; color: var(--muted); margin-top: 12px; }
.buybox .meta b { color: var(--muted); font-weight: 400; }
.buybox .secure { color: var(--link); display: flex; gap: 6px; align-items: center; font-size: 12px; margin: 8px 0; }

/* ---------- Cart ---------- */
.cart-layout { display: grid; grid-template-columns: 1fr 300px; gap: 18px; align-items: start; }
.cart-box { background: var(--card); padding: 20px; }
.cart-box h1 { font-size: 28px; font-weight: 400; margin: 0; }
.cart-box .head { display: flex; justify-content: space-between; border-bottom: 1px solid var(--border); padding-bottom: 6px; color: var(--muted); font-size: 14px; }
.line { display: grid; grid-template-columns: 180px 1fr auto; gap: 18px; padding: 18px 0; border-bottom: 1px solid var(--border); }
.line .thumb { aspect-ratio: 1; }
.line h3 { font-size: 18px; font-weight: 500; margin: 0 0 4px; }
.line .controls { display: flex; align-items: center; gap: 10px; margin-top: 10px; flex-wrap: wrap; }
.line .controls select { padding: 4px 8px; border: 1px solid var(--border); border-radius: 8px; background: #f0f2f2; }
.line .controls .sep { border-left: 1px solid var(--border); height: 16px; }
.linkbtn { background: none; border: 0; color: var(--link); cursor: pointer; padding: 0; }
.linkbtn:hover { color: var(--link-h); text-decoration: underline; }
.subtotal { text-align: right; font-size: 18px; padding-top: 10px; }
.subtotal b { font-weight: 700; }
.side { background: var(--card); padding: 20px; }
.side .free { color: var(--green); font-size: 13px; margin-bottom: 10px; }
.side .st { font-size: 18px; margin-bottom: 14px; }
.empty-cart { background: var(--card); padding: 30px; }
.empty-cart h1 { margin-top: 0; font-weight: 400; }

/* ---------- Messages ---------- */
.notice { background: #fff8e1; border: 1px solid #f0c36d; padding: 10px 14px; margin: 14px; border-radius: 6px; font-size: 13px; }
.center-card { max-width: 560px; margin: 60px auto; background: var(--card); padding: 34px; text-align: center; border-radius: 8px; }
.center-card h1 { font-weight: 400; margin-top: 0; }
.center-card .big { font-size: 60px; }
.toast {
  position: fixed; bottom: 20px; left: 50%; transform: translate(-50%, 80px); background: #0f1111; color: #fff; padding: 12px 20px;
  border-radius: 6px; transition: transform .3s; z-index: 50;
}
.toast.show { transform: translate(-50%, 0); }
.skeleton { background: linear-gradient(90deg, #eee, #f7f7f7, #eee); background-size: 200% 100%; animation: sk 1.2s infinite; border-radius: 6px; }
@keyframes sk { to { background-position: -200% 0; } }

/* ---------- Footer ---------- */
.to-top { display: block; background: #37475a; color: #fff; text-align: center; padding: 14px; font-size: 13px; margin-top: 30px; }
.to-top:hover { background: #485769; text-decoration: none; color: #fff; }
.ftr { background: var(--nav2); color: #ddd; padding: 40px 20px 30px; }
.ftr-cols { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; max-width: 1000px; margin: 0 auto 30px; }
.ftr h4 { color: #fff; margin: 0 0 10px; font-size: 16px; }
.ftr a { color: #ddd; display: block; margin: 6px 0; font-size: 14px; }
.ftr-bottom { background: var(--nav); color: #ddd; text-align: center; padding: 22px 10px; font-size: 12px; }

/* ---------- Responsive ---------- */
@media (max-width: 1100px) {
  .tiles { grid-template-columns: repeat(2, minmax(0, 1fr)); margin-top: -120px; }
  .pdp { grid-template-columns: 1fr 1fr; }
  .buybox { grid-column: 1 / -1; }
  .gallery { position: static; }
}
@media (max-width: 760px) {
  .deliver, .hdr .acct { display: none; }
  .hdr-main { flex-wrap: wrap; }
  .search { order: 5; flex: 1 0 100%; }
  .search select { display: none; }
  .hero { height: 300px; }
  .tiles { grid-template-columns: 1fr; margin-top: -90px; }
  .tile { min-height: 0; }
  .pdp { grid-template-columns: 1fr; }
  .cart-layout { grid-template-columns: 1fr; }
  .line { grid-template-columns: 100px 1fr; }
  .line .price-col { grid-column: 2; }
  .ftr-cols { grid-template-columns: 1fr 1fr; }
  .section { margin: 0 8px 14px; padding: 12px; }
}
