:root {
  --brand: #2b3d8f;
  --brand-dark: #1f2d6b;
  --black: #111;
  --text: #333;
  --text-muted: #666;
  --border: #e8e8e8;
  --bg-page: #f5f5f5;
  --bg-white: #fff;
  --container: 1200px;
  --hero-orange-1: #f58220;
  --hero-orange-2: #ffb066;
  --radius-hero: 12px;
  --shadow-float: 0 2px 12px rgba(0, 0, 0, 0.12);
  --home-green: #00bc12;
  --flash-green: #52c41a;
  --flash-green-soft: #e6f7e9;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  font-family: Inter, "Helvetica Neue", Helvetica, Arial, "PingFang SC", "Microsoft YaHei", sans-serif;
  font-size: 12px;
  color: var(--text);
  -webkit-font-smoothing: antialiased;
}

body {
  margin: 0;
  background: var(--bg-page);
  line-height: 1.5;
  padding-bottom: 40px;
}

a {
  color: inherit;
  text-decoration: none;
}

a:hover {
  color: var(--brand);
}

.container {
  width: 100%;
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 16px;
}

.app {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

/* 1. Announcement bar */
.announce-bar {
  position: relative;
  z-index: 100;
  background: #000;
  color: #fff;
  font-size: 11px;
}

.announce-inner {
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.announce-left {
  display: flex;
  align-items: center;
  gap: 18px;
  flex-wrap: wrap;
}

.announce-item {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  opacity: 0.92;
  white-space: nowrap;
}

.announce-item .check {
  color: #7cff7c;
  font-size: 10px;
  font-weight: 700;
}

.announce-nav {
  background: transparent;
  border: none;
  color: #fff;
  font-size: 11px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  white-space: nowrap;
}

.announce-nav .caret {
  font-size: 9px;
  opacity: 0.85;
}

/* 2. Header main */
.header-main {
  position: relative;
  z-index: 50;
  background: var(--bg-white);
  border-bottom: 1px solid var(--border);
}

.header-main-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  flex-wrap: wrap;
  padding: 10px 0 12px;
}

.header-brand-row {
  display: flex;
  align-items: center;
  gap: 16px;
}

.logo-text {
  font-size: 24px;
  font-weight: 800;
  color: var(--brand);
  letter-spacing: -0.5px;
}

.cat-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  height: 36px;
  padding: 0 12px;
  border: 1px solid var(--border);
  border-radius: 4px;
  background: #fff;
  font-size: 13px;
  font-weight: 500;
  color: var(--text);
  cursor: pointer;
}

.cat-ico {
  width: 16px;
  height: 12px;
  background: linear-gradient(#333 0%, #333 20%, transparent 20%, transparent 40%, #333 40%, #333 60%, transparent 60%, transparent 80%, #333 80%, #333 100%);
  border-radius: 1px;
}

.caret {
  font-size: 10px;
  color: #888;
}

.caret.sm {
  font-size: 9px;
}

/* Search */
.search-combo {
  --search-green: var(--home-green, #00bc12);
  flex: 1;
  display: flex;
  align-items: stretch;
  max-width: 560px;
  min-width: 200px;
  border: 2px solid var(--search-green);
  border-radius: 8px;
  overflow: visible;
  background: #fff;
  position: relative;
}

.search-type-wrap {
  position: relative;
  flex-shrink: 0;
  display: flex;
  align-items: stretch;
  z-index: 5;
}

.search-type-wrap.is-open .caret--search {
  display: inline-block;
  transform: rotate(180deg);
}

.search-type {
  min-width: 96px;
  padding: 0 12px;
  border: none;
  border-right: 1px solid #e0e0e0;
  background: #fafafa;
  font-size: 12px;
  color: var(--text);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  border-radius: 6px 0 0 6px;
}

.search-type:hover {
  background: #f3f3f3;
}

.search-type-menu {
  position: absolute;
  top: calc(100% + 4px);
  left: 0;
  min-width: 100%;
  padding: 6px 0;
  margin: 0;
  list-style: none;
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 6px;
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.12);
  z-index: 130;
}

.search-type-option {
  display: block;
  width: 100%;
  padding: 8px 14px;
  border: none;
  background: transparent;
  text-align: left;
  font-size: 12px;
  color: var(--text);
  cursor: pointer;
}

.search-type-option:hover,
.search-type-option.is-selected {
  background: #f5f5f5;
  color: var(--search-green);
  font-weight: 600;
}

.search-input {
  flex: 1;
  border: none;
  padding: 0 14px;
  font-size: 13px;
  min-width: 0;
  outline: none;
  background: #fff;
}

.search-input:focus {
  box-shadow: inset 0 0 0 1px rgba(0, 188, 18, 0.2);
}

.search-submit {
  flex-shrink: 0;
  width: 50px;
  border: none;
  border-radius: 0 6px 6px 0;
  background: var(--black);
  color: #fff;
  cursor: pointer;
  display: grid;
  place-items: center;
  align-self: stretch;
  min-height: 40px;
}

.search-submit:hover {
  background: #333;
}

/* Header util */
.header-util {
  display: flex;
  align-items: center;
  gap: 20px;
  flex-shrink: 0;
}

.util-btn {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  height: 36px;
  padding: 0 10px;
  border: 1px solid transparent;
  background: transparent;
  font-size: 12px;
  color: var(--text);
  cursor: pointer;
  border-radius: 4px;
}

.util-btn--icon {
  gap: 6px;
  padding: 0 4px;
  color: var(--black);
}

.util-btn:hover {
  background: #f5f5f5;
}

.util-ico {
  font-size: 16px;
}

.util-ico-svg {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--black);
}

.util-ico-svg svg {
  display: block;
}

.util-chevron {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #888;
  transition: transform 0.2s ease;
}

.util-me-text {
  font-weight: 500;
  font-size: 12px;
}

.cart-block {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 4px 6px 2px;
  border-radius: 4px;
  position: relative;
  color: var(--black);
}

.cart-block:hover {
  background: #f5f5f5;
}

.cart-ico-wrap {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 24px;
}

.cart-ico-svg {
  display: inline-flex;
  color: var(--black);
}

.cart-ico-svg svg {
  display: block;
}

.cart-label {
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.02em;
}

.cart-badge {
  position: absolute;
  top: -6px;
  right: -8px;
  min-width: 16px;
  height: 16px;
  padding: 0 4px;
  border-radius: 999px;
  background: var(--home-green);
  color: #fff;
  font-size: 10px;
  font-weight: 700;
  line-height: 16px;
  text-align: center;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  box-sizing: border-box;
}

/* 3. Sub nav */
.sub-nav {
  background: #f0f0f0;
  border-bottom: 1px solid #e5e5e5;
}

.sub-nav-inner {
  display: flex;
  align-items: center;
  gap: 28px;
  flex-wrap: wrap;
  min-height: 40px;
}

.sub-nav-link {
  font-size: 12px;
  color: var(--text-muted);
  padding: 10px 0;
}

.sub-nav-link:hover,
.sub-nav-link.is-active {
  color: var(--text);
  font-weight: 600;
}

/* Main */
.main-content {
  flex: 1;
}

.page-main {
  padding: 20px 0 32px;
}

/* Hero carousel */
.hero-wrap {
  position: relative;
}

.hero-carousel {
  position: relative;
  border-radius: var(--radius-hero);
  overflow: hidden;
  background: linear-gradient(135deg, var(--hero-orange-1) 0%, var(--hero-orange-2) 100%);
  min-height: 280px;
  box-shadow: var(--shadow-float);
}

.hero-slides {
  position: relative;
}

.hero-slide {
  outline: none;
}

.hero-slide[hidden] {
  display: none;
}

.hero-slide-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 28px 48px 40px;
  min-height: 280px;
}

.hero-copy {
  flex: 0 1 420px;
  z-index: 1;
}

.hero-title {
  margin: 0 0 8px;
  font-size: 28px;
  font-weight: 800;
  color: #2a1a0a;
  line-height: 1.2;
  letter-spacing: -0.3px;
}

.hero-sub {
  margin: 0 0 18px;
  font-size: 15px;
  font-weight: 500;
  color: rgba(42, 26, 10, 0.85);
}

.hero-cta {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 38px;
  padding: 0 22px;
  background: var(--black);
  color: #fff;
  font-size: 13px;
  font-weight: 600;
  border-radius: 6px;
}

.hero-cta:hover {
  background: #333;
  color: #fff;
}

.hero-products {
  display: flex;
  align-items: flex-end;
  gap: 10px;
  flex: 1;
  justify-content: flex-end;
  flex-wrap: wrap;
}

.hero-products img {
  width: 88px;
  height: 120px;
  object-fit: cover;
  border-radius: 8px;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.15);
}

.hero-badge-circle {
  position: absolute;
  right: 36px;
  top: 50%;
  transform: translateY(-50%);
  width: 88px;
  height: 88px;
  border-radius: 50%;
  background: #e53935;
  color: #fff;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  box-shadow: 0 4px 12px rgba(229, 57, 53, 0.45);
}

.hb-small {
  font-size: 10px;
  font-weight: 600;
  text-transform: uppercase;
  line-height: 1.1;
}

.hb-big {
  font-size: 22px;
  font-weight: 800;
  line-height: 1.1;
}

.hero-slide-alt .hero-slide-inner {
  justify-content: center;
  min-height: 220px;
}

/* Hero arrows */
.hero-arrow {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 44px;
  height: 44px;
  border: none;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.35);
  color: #fff;
  font-size: 26px;
  line-height: 1;
  cursor: pointer;
  z-index: 2;
  display: grid;
  place-items: center;
  transition: background 0.2s;
}

.hero-arrow:hover {
  background: rgba(255, 255, 255, 0.55);
}

.hero-prev {
  left: 12px;
}

.hero-next {
  right: 12px;
}

/* Dots */
.hero-dots {
  position: absolute;
  bottom: 14px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: 8px;
  z-index: 2;
}

.hero-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  border: none;
  padding: 0;
  background: rgba(255, 255, 255, 0.45);
  cursor: pointer;
}

.hero-dot.is-active {
  background: #fff;
  width: 22px;
  border-radius: 4px;
}

/* Footer */
.footer-site {
  margin-top: auto;
}

.footer-upper {
  background: #f0f0f0;
  padding: 28px 0 36px;
  border-top: 1px solid var(--border);
}

.footer-upper-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 28px;
}

.footer-logo {
  font-size: 22px;
  font-weight: 800;
  color: var(--brand);
}

.footer-upper-tools {
  display: flex;
  gap: 10px;
}

.tool-chip {
  height: 34px;
  padding: 0 12px;
  border: 1px solid var(--border);
  border-radius: 4px;
  background: #fff;
  font-size: 12px;
  cursor: pointer;
}

.tool-chip.wide {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.footer-columns {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 24px;
}

.fc h3 {
  margin: 0 0 12px;
  font-size: 13px;
  font-weight: 700;
  color: var(--text);
}

.fc a {
  display: block;
  margin-bottom: 8px;
  font-size: 12px;
  color: var(--text-muted);
}

.fc a:hover {
  color: var(--brand);
}

.footer-lower {
  background: var(--bg-white);
  padding: 24px 0 32px;
  border-top: 1px solid var(--border);
  text-align: center;
}

.footer-links-row {
  font-size: 12px;
  color: var(--text-muted);
  margin-bottom: 10px;
}

.footer-links-row a {
  color: var(--text-muted);
}

.footer-links-row a:hover {
  color: var(--brand);
}

.pipe {
  margin: 0 8px;
  color: #ccc;
}

.friend-link {
  margin: 0 0 12px;
  font-size: 12px;
  color: var(--text-muted);
}

.copyright {
  margin: 0 0 10px;
  font-size: 11px;
  color: #888;
  line-height: 1.6;
}

.contact-line {
  margin: 0 0 12px;
  font-size: 11px;
  color: #888;
  line-height: 1.7;
}

.footer-note {
  margin: 0;
  font-size: 11px;
  color: #aaa;
}

/* Floating sidebar */
.float-sidebar {
  position: fixed;
  right: 12px;
  top: 50%;
  transform: translateY(-50%);
  z-index: 100;
  width: 52px;
  background: #fff;
  border-radius: 8px;
  box-shadow: var(--shadow-float);
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 8px 0;
  gap: 2px;
}

.fs-item {
  font-size: 10px;
  color: var(--text-muted);
  text-align: center;
  padding: 10px 6px;
  line-height: 1.3;
  border-bottom: 1px solid #f0f0f0;
  width: 100%;
}

.fs-item:last-child {
  border-bottom: none;
}

.fs-item:hover {
  color: var(--brand);
  background: #f9f9f9;
}

.fs-ico {
  display: block;
  font-size: 16px;
  margin-bottom: 2px;
}

/* ===== Homepage middle content (below hero) ===== */
.mid-strip {
  margin-top: 16px;
  margin-bottom: 4px;
  padding: 10px 16px;
  border-radius: 8px;
  background: linear-gradient(90deg, #ff7eb9 0%, #ff4fa2 40%, #e91e8c 100%);
  text-align: center;
  box-shadow: 0 2px 8px rgba(233, 30, 140, 0.2);
}

.mid-strip-text {
  font-size: 13px;
  font-weight: 800;
  color: #fff;
  letter-spacing: 0.5px;
}

.mid-strip-highlight {
  color: #ffeb3b;
}

.mid-floor {
  margin-top: 14px;
  padding: 16px 18px 18px;
  background: var(--bg-white);
  border-radius: 8px;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.06);
}

.mid-floor--carousel {
  padding-top: 12px;
  padding-bottom: 12px;
}

.mid-floor-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 14px;
}

.mid-floor-head--simple {
  margin-bottom: 10px;
}

.mid-floor-head--center {
  justify-content: center;
  margin-bottom: 16px;
}

.mid-floor-title {
  margin: 0;
  font-size: 15px;
  font-weight: 800;
  color: var(--black);
}

.mid-floor-title--underline {
  position: relative;
  padding-bottom: 8px;
}

.mid-floor-title--underline::after {
  content: "";
  position: absolute;
  left: 50%;
  bottom: 0;
  transform: translateX(-50%);
  width: 36px;
  height: 3px;
  background: var(--black);
  border-radius: 2px;
}

.mid-view-more {
  font-size: 12px;
  color: var(--text-muted);
  font-weight: 500;
}

.mid-view-more:hover {
  color: var(--brand);
}

/* Carousel shell */
.mid-carousel {
  position: relative;
  display: flex;
  align-items: center;
  gap: 8px;
}

.mid-scroll-wrap,
.trio-scroll-wrap {
  flex: 1;
  min-width: 0;
  overflow: hidden;
}

.mid-scroll-track,
.trio-scroll-track {
  display: flex;
  gap: 12px;
  overflow-x: auto;
  scroll-behavior: smooth;
  padding-bottom: 6px;
  scrollbar-width: none;
}

.trio-scroll-track {
  padding-left: 12px;
  padding-right: 12px;
}

.mid-scroll-track::-webkit-scrollbar,
.trio-scroll-track::-webkit-scrollbar {
  display: none;
}

.mid-arrow {
  flex-shrink: 0;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  border: none;
  background: rgba(0, 0, 0, 0.06);
  color: #666;
  font-size: 20px;
  line-height: 1;
  cursor: pointer;
  display: grid;
  place-items: center;
  transition: background 0.2s, color 0.2s;
}

.trio-carousel .mid-arrow {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  z-index: 2;
}

.trio-carousel .mid-arrow--left {
  left: 8px;
}

.trio-carousel .mid-arrow--right {
  right: 8px;
}

.pop-carousel .mid-arrow {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  z-index: 2;
}

.pop-carousel .mid-arrow--left {
  left: 8px;
}

.pop-carousel .mid-arrow--right {
  right: 8px;
}

.pop-track {
  padding-left: 12px;
  padding-right: 12px;
}

.mid-arrow:hover {
  background: rgba(0, 0, 0, 0.12);
  color: var(--black);
}

/* Group carousel: semi-transparent circle + white chevron */
.mid-carousel--group {
  align-items: stretch;
  gap: 6px;
}

.mid-carousel--group .mid-arrow--group {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  z-index: 2;
  width: 36px;
  height: 36px;
  align-self: center;
  background: rgba(0, 0, 0, 0.18);
  color: #fff;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.08);
}

.mid-carousel--group .mid-arrow--group.mid-arrow--left {
  left: 8px;
}

.mid-carousel--group .mid-arrow--group.mid-arrow--right {
  right: 8px;
}

.mid-carousel--group .mid-arrow--group:hover {
  background: rgba(0, 0, 0, 0.28);
  color: #fff;
}

.mid-arrow-glyph {
  display: block;
  font-size: 22px;
  font-weight: 300;
  line-height: 1;
  margin-top: -2px;
}

.group-scroll .mid-scroll-track {
  gap: 10px;
  padding: 2px 12px 8px;
}

/* Group buy cards */
.group-card {
  flex: 0 0 196px;
  width: 196px;
}

.group-card-link {
  display: block;
  border: 1px solid #eee;
  border-radius: 6px;
  overflow: hidden;
  background: #fff;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
  transition: box-shadow 0.2s, border-color 0.2s;
}

.group-card-link:hover {
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.1);
  border-color: #e8e8e8;
}

.group-img {
  aspect-ratio: 1;
  overflow: hidden;
  background: #f5f5f5;
}

.group-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

/* Orange–red banner under image */
.group-orange-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 6px;
  padding: 5px 8px;
  background: linear-gradient(90deg, #ff6b35 0%, #ff5722 45%, #f4511e 100%);
  color: #fff;
  font-size: 10px;
  font-weight: 700;
  line-height: 1.2;
}

.group-orange-label {
  flex-shrink: 0;
  letter-spacing: 0.02em;
}

.group-orange-time {
  flex: 1;
  text-align: right;
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* Title + 3group badge */
.group-body {
  padding: 0;
}

.group-title {
  margin: 0;
  padding: 8px 8px 4px;
  display: flex;
  flex-direction: row;
  align-items: flex-start;
  gap: 6px;
  font-size: inherit;
  font-weight: 400;
}

.group-tag {
  flex-shrink: 0;
  margin-top: 1px;
  padding: 1px 5px;
  border-radius: 2px;
  background: #ececec;
  color: #555;
  font-size: 9px;
  font-weight: 700;
  line-height: 1.45;
  text-transform: lowercase;
}

.group-title-text {
  flex: 1;
  min-width: 0;
  font-size: 11px;
  font-weight: 500;
  color: #333;
  line-height: 1.35;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.group-price-line {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  padding: 4px 8px 10px;
  gap: 6px;
}

.group-prices {
  margin: 0;
  min-width: 0;
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
}

.group-price-now {
  font-size: 16px;
  font-weight: 800;
  color: #111;
  letter-spacing: -0.02em;
}

.group-price-was {
  font-size: 11px;
  font-weight: 400;
  color: #c4c4c4;
  text-decoration: line-through;
  margin-left: 6px;
}

/* Trapezoid Spell CTA (left edge cut) */
.group-price-line .btn-spell {
  flex-shrink: 0;
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 52px;
  padding: 6px 10px 6px 14px;
  border: none;
  background: linear-gradient(180deg, #ff3b30 0%, #e53935 100%);
  color: #fff;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.02em;
  cursor: pointer;
  clip-path: polygon(10px 0, 100% 0, 100% 100%, 0 100%);
  box-shadow: 0 1px 2px rgba(229, 57, 53, 0.35);
}

.group-price-line .btn-spell:hover {
  filter: brightness(1.06);
  color: #fff;
}

/* Flash sales */
.mid-floor--flash {
  background: #f0f2f5;
  border-radius: 10px;
  box-shadow: none;
  border: 1px solid #e8e8e8;
}

.flash-countdown {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
  font-size: 12px;
}

.flash-ends-label {
  font-weight: 700;
  color: var(--black);
  margin-right: 2px;
}

.cd-box {
  min-width: 28px;
  padding: 5px 7px;
  background: var(--black);
  color: #fff;
  font-size: 12px;
  font-weight: 800;
  font-variant-numeric: tabular-nums;
  text-align: center;
  border-radius: 4px;
}

.cd-unit {
  font-size: 11px;
  font-weight: 700;
  color: var(--black);
  margin-right: 2px;
  margin-left: 2px;
}

.cd-sep {
  font-weight: 700;
  color: var(--black);
  margin: 0 1px;
}

.cd-more {
  border: none;
  background: transparent;
  font-size: 18px;
  font-weight: 700;
  cursor: pointer;
  color: #999;
  line-height: 1;
  padding: 0 2px 0 6px;
}

.cd-more:hover {
  color: var(--black);
}

.flash-row {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 14px;
}

.flash-card {
  position: relative;
}

.flash-card-link {
  display: flex;
  flex-direction: column;
  height: 100%;
  border: 1px solid var(--border);
  border-radius: 8px;
  overflow: hidden;
  background: #fff;
  transition: box-shadow 0.2s ease, transform 0.2s ease;
}

.flash-card-link:hover {
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.08);
  transform: translateY(-2px);
}

.flash-img-wrap {
  position: relative;
  aspect-ratio: 1;
  background: #fafafa;
}

.flash-img-wrap img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.flash-badge-off {
  align-self: flex-start;
  margin: 8px 10px 0;
  padding: 4px 8px;
  background: var(--flash-green);
  color: #fff;
  font-size: 10px;
  font-weight: 700;
  border-radius: 2px;
}

.flash-title {
  margin: 6px 10px 0;
  font-size: 11px;
  font-weight: 500;
  color: var(--black);
  line-height: 1.4;
  display: -webkit-box;
  -webkit-line-clamp: 1;
  -webkit-box-orient: vertical;
  overflow: hidden;
  flex: 1;
  min-height: 1.4em;
}

.flash-price-row {
  display: flex;
  align-items: flex-end;
  justify-content: flex-start;
  padding: 6px 36px 10px 10px;
  margin-top: auto;
}

.flash-price-stack {
  display: flex;
  flex-direction: column;
  gap: 2px;
  align-items: flex-start;
}

.flash-now {
  font-size: 15px;
  font-weight: 800;
  color: var(--black);
  letter-spacing: 0.02em;
}

.flash-was {
  font-size: 11px;
  color: #8c8c8c;
  text-decoration: line-through;
}

.flash-plus {
  position: absolute;
  right: 8px;
  bottom: 10px;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  border: none;
  background: var(--flash-green-soft);
  font-size: 18px;
  font-weight: 700;
  line-height: 1;
  cursor: pointer;
  color: var(--flash-green);
  transition: transform 0.15s ease, background 0.15s ease;
}

.flash-plus:hover {
  background: #d4f0db;
  color: #389e0d;
}

.flash-plus.is-pulse {
  transform: scale(1.12);
}

/* Trio banners */
.mid-floor--trio {
  padding-left: 8px;
  padding-right: 8px;
}

.trio-scroll-track {
  gap: 14px;
}

.trio-card {
  position: relative;
  flex: 0 0 min(360px, 85vw);
  min-height: 160px;
  border-radius: 8px;
  overflow: hidden;
  display: flex;
  align-items: stretch;
  padding: 16px 18px;
  gap: 12px;
}

.trio-pink {
  background: linear-gradient(135deg, #fce4ec 0%, #f8bbd9 100%);
}

.trio-blue {
  background: linear-gradient(135deg, #e3f2fd 0%, #90caf9 100%);
}

.trio-yellow {
  background: linear-gradient(135deg, #fff8e1 0%, #ffe082 100%);
}

.trio-body {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
  z-index: 1;
}

.trio-h {
  margin: 0 0 4px;
  font-size: 18px;
  font-weight: 800;
  color: var(--black);
}

.trio-sub {
  margin: 0 0 12px;
  font-size: 12px;
  color: var(--text-muted);
}

.trio-btn {
  display: inline-block;
  align-self: flex-start;
  padding: 8px 18px;
  border-radius: 4px;
  font-size: 12px;
  font-weight: 700;
  color: #fff;
}

.trio-btn-red {
  background: #b71c1c;
}

.trio-btn-blue {
  background: #0d47a1;
}

.trio-btn-olive {
  background: #5d4037;
  color: #fff;
}

.trio-visual {
  flex: 0 0 42%;
  display: flex;
  align-items: center;
  justify-content: center;
}

.trio-visual img {
  max-width: 100%;
  max-height: 120px;
  object-fit: contain;
  filter: drop-shadow(0 4px 8px rgba(0, 0, 0, 0.12));
}

.trio-ribbon {
  position: absolute;
  top: 12px;
  right: 12px;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  font-size: 11px;
  font-weight: 800;
  color: #fff;
  background: #e53935;
  z-index: 2;
}

.trio-ribbon-hot {
  font-size: 10px;
}

.trio-ribbon-5 {
  font-size: 11px;
}

/* Popular categories */
.pop-track .pop-cat-card {
  flex: 0 0 148px;
  width: 148px;
  text-align: center;
  padding: 10px 8px 12px;
  border-radius: 10px;
  background: #fff;
  box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.03);
  transition: box-shadow 0.18s ease, transform 0.18s ease;
}

.pop-track .pop-cat-card:hover {
  box-shadow: 0 8px 18px rgba(0, 0, 0, 0.06);
  transform: translateY(-2px);
}

.pop-cat-img {
  aspect-ratio: 4/3;
  border-radius: 8px;
  overflow: hidden;
  background: #f0f0f0;
  margin-bottom: 8px;
}

.pop-cat-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.pop-cat-name {
  font-size: 12px;
  font-weight: 600;
  color: var(--black);
}

/* Best sellers */
.best-row {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 14px;
}

.best-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding: 10px 8px 12px;
  border-radius: 10px;
  background: #fff;
  box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.03);
  transition: box-shadow 0.18s ease, transform 0.18s ease;
}

.best-item:hover {
  box-shadow: 0 8px 18px rgba(0, 0, 0, 0.06);
  transform: translateY(-2px);
}

.best-img {
  aspect-ratio: 4/3;
  border-radius: 8px;
  overflow: hidden;
  background: #f5f5f5;
  margin-bottom: 8px;
}

.best-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.best-cat {
  display: block;
  font-size: 12px;
  font-weight: 700;
  color: var(--black);
  margin-bottom: 4px;
}

.best-sold {
  font-size: 11px;
  color: #e53935;
  font-weight: 600;
}

/* Recommended grid */
.mid-floor--rec {
  padding-bottom: 24px;
}

.rec-grid-mid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 14px;
}

.rec-item {
  position: relative;
}

.rec-item-link {
  display: block;
  border: 1px solid var(--border);
  border-radius: 8px;
  overflow: hidden;
  background: #fff;
  padding-bottom: 36px;
  height: 100%;
  transition: box-shadow 0.2s;
}

.rec-item-link:hover {
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.08);
}

.rec-item-img {
  aspect-ratio: 1;
  background: #f8f8f8;
}

.rec-item-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.rec-item-title {
  margin: 8px 10px 4px;
  font-size: 11px;
  font-weight: 400;
  color: var(--text);
  line-height: 1.4;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  min-height: 2.8em;
}

.rec-item-sold {
  margin: 0 10px 6px;
  font-size: 10px;
  color: #999;
}

.rec-item-bottom {
  padding: 0 40px 8px 10px;
}

.rec-item-price {
  display: block;
  font-size: 15px;
  font-weight: 800;
  color: var(--black);
}

.rec-item-store {
  display: block;
  font-size: 10px;
  color: #2e7d32;
  font-weight: 600;
  margin-top: 2px;
}

.rec-item-plus {
  position: absolute;
  right: 8px;
  bottom: 8px;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  border: 1px solid #ddd;
  background: #f5f5f5;
  font-size: 16px;
  line-height: 1;
  cursor: pointer;
  color: #666;
  z-index: 2;
}

.rec-item-plus:hover {
  background: #eee;
}

@media (max-width: 992px) {
  .footer-columns {
    grid-template-columns: repeat(2, 1fr);
  }

  .hero-badge-circle {
    position: static;
    transform: none;
    margin: 16px auto 0;
  }

  .hero-slide-inner {
    flex-direction: column;
    padding: 24px 20px 48px;
  }

  .hero-products {
    justify-content: center;
  }

  .float-sidebar {
    display: none;
  }

  .flash-row {
    grid-template-columns: repeat(3, 1fr);
  }

  .best-row {
    grid-template-columns: repeat(3, 1fr);
  }

  .rec-grid-mid {
    grid-template-columns: repeat(3, 1fr);
  }
}

@media (max-width: 640px) {
  .header-main-inner {
    flex-direction: column;
    align-items: stretch;
  }

  .search-combo {
    max-width: none;
  }

  .header-util {
    justify-content: space-between;
  }

  .flash-row {
    grid-template-columns: repeat(2, 1fr);
  }

  .best-row {
    grid-template-columns: repeat(2, 1fr);
  }

  .rec-grid-mid {
    grid-template-columns: repeat(2, 1fr);
  }

  .mid-arrow {
    display: none;
  }
}

/* —— Home dropdowns (Site nav, header lang/currency, Me, footer lang) —— */
.announce-nav-wrap {
  position: relative;
  z-index: 30;
}

.announce-nav-wrap.is-open .caret--flip {
  display: inline-block;
  transform: rotate(180deg);
}

.site-nav-dropdown {
  position: absolute;
  top: calc(100% + 6px);
  right: 0;
  min-width: 200px;
  padding: 10px 0;
  background: #fff;
  border-radius: 6px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.18);
  border: 1px solid var(--border);
}

.site-nav-link {
  display: block;
  padding: 10px 16px;
  font-size: 13px;
  color: var(--brand);
  font-weight: 600;
}

.site-nav-link:hover {
  background: #f7f7f7;
  color: var(--brand-dark);
}

.util-dropdown-wrap {
  position: relative;
  z-index: 40;
}

.util-dropdown-wrap.is-open .caret--flip,
.util-dropdown-wrap.is-open .util-chevron {
  transform: rotate(180deg);
}

.util-dropdown-wrap--me.is-open .util-me {
  color: var(--home-green);
}

.util-dropdown-wrap--me.is-open .util-me .util-chevron {
  color: var(--home-green);
}

.dropdown-panel {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  width: 260px;
  padding: 14px 16px 16px;
  background: #fff;
  border-radius: 8px;
  box-shadow: 0 8px 28px rgba(0, 0, 0, 0.14);
  border: 1px solid var(--border);
  text-align: left;
}

.hdr-pop-section + .hdr-pop-section {
  margin-top: 14px;
  padding-top: 12px;
  border-top: 1px solid #f0f0f0;
}

.hdr-pop-title {
  font-size: 14px;
  font-weight: 800;
  color: var(--black);
  margin-bottom: 10px;
}

.lang-row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 6px 0;
  cursor: pointer;
  font-size: 13px;
  color: var(--text);
}

.lang-row--active,
.lang-row.lang-row--active {
  color: var(--home-green);
  font-weight: 700;
}

.lang-input {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.lang-radio {
  width: 16px;
  height: 16px;
  border-radius: 50%;
  border: 2px solid #ccc;
  flex-shrink: 0;
  display: grid;
  place-items: center;
}

.lang-row--active .lang-radio {
  border-color: var(--home-green);
}

.lang-row--active .lang-radio::after {
  content: "";
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--home-green);
}

.hdr-currency-line {
  margin: 0 0 8px;
  font-size: 13px;
  color: var(--text);
}

.hdr-currency-change {
  font-size: 13px;
  color: #1a73e8;
}

.hdr-currency-change:hover {
  text-decoration: underline;
}

.header-me-dropdown {
  width: 220px;
  padding: 12px 0 8px;
}

.me-dropdown-head {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 0 14px 12px;
  border-bottom: 1px solid #f0f0f0;
  margin-bottom: 6px;
}

.me-avatar {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: linear-gradient(145deg, #b8e0ff, #e8f4ff);
  display: grid;
  place-items: center;
  font-size: 9px;
  font-weight: 800;
  color: #333;
  flex-shrink: 0;
}

.me-user-name {
  font-size: 14px;
  font-weight: 700;
  color: var(--text);
}

.me-dropdown-link {
  display: block;
  padding: 9px 16px;
  font-size: 13px;
  color: var(--text);
}

.me-dropdown-link:hover {
  background: #f7f7f7;
}

.me-dropdown-link--muted {
  color: #aaa;
  margin-top: 4px;
  padding-top: 12px;
  border-top: 1px solid #f0f0f0;
}

.footer-dropdown-wrap {
  position: relative;
  z-index: 25;
}

.footer-lang-dropdown {
  top: auto;
  bottom: calc(100% + 10px);
  right: 0;
  width: 240px;
}

.footer-lang-dropdown .hdr-pop-title {
  margin-bottom: 8px;
}

/* —— Categories mega menu —— */
.cat-wrap {
  position: relative;
}

.cat-wrap.is-open .caret--cat {
  display: inline-block;
  transform: rotate(180deg);
}

.cat-mega-wrap {
  position: absolute;
  left: 0;
  right: 0;
  top: 100%;
  z-index: 120;
  background: #fff;
  border-top: 1px solid var(--border);
  box-shadow: 0 12px 28px rgba(0, 0, 0, 0.12);
}

.cat-mega-inner {
  display: grid;
  grid-template-columns: minmax(200px, 240px) 1fr;
  gap: 0;
  align-items: stretch;
  max-height: min(72vh, 640px);
}

.cat-mega-side {
  border-right: 1px solid #f0f0f0;
  padding: 10px 0;
  overflow-y: auto;
  background: #fafafa;
}

.cat-side-item {
  display: block;
  width: 100%;
  text-align: left;
  padding: 12px 14px;
  border: none;
  background: transparent;
  font-size: 12px;
  color: var(--text);
  cursor: pointer;
  line-height: 1.35;
}

.cat-side-item:hover {
  background: rgba(0, 188, 18, 0.06);
}

.cat-side-item.is-active {
  background: rgba(0, 188, 18, 0.12);
  color: var(--home-green, #00bc12);
  font-weight: 700;
}

.cat-mega-panels {
  padding: 16px 18px 20px;
  overflow-y: auto;
  max-height: min(72vh, 640px);
}

.cat-mega-panel {
  display: none;
}

.cat-mega-panel.is-active {
  display: block;
}

.cat-mega-section + .cat-mega-section {
  margin-top: 22px;
  padding-top: 18px;
  border-top: 1px solid #f0f0f0;
}

.cat-mega-h {
  margin: 0 0 12px;
  font-size: 13px;
  font-weight: 800;
  color: var(--text);
}

.cat-mega-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(88px, 1fr));
  gap: 14px 12px;
}

.cat-cell {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 8px;
  font-size: 11px;
  color: var(--text-muted);
}

.cat-cell:hover {
  color: var(--home-green, #00bc12);
}

.cat-cell-img {
  width: 72px;
  height: 72px;
  border-radius: 6px;
  overflow: hidden;
  border: 1px solid var(--border);
  background: #fafafa;
  display: block;
}

.cat-cell-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.cat-cell-label {
  display: block;
  line-height: 1.35;
  max-width: 100%;
}

@media (max-width: 900px) {
  .cat-mega-inner {
    grid-template-columns: 180px 1fr;
    max-height: min(65vh, 520px);
  }

  .cat-mega-grid {
    grid-template-columns: repeat(auto-fill, minmax(72px, 1fr));
  }

  .cat-cell-img {
    width: 64px;
    height: 64px;
  }
}

@media (max-width: 640px) {
  .cat-mega-inner {
    grid-template-columns: 1fr;
    max-height: min(75vh, 560px);
  }

  .cat-mega-side {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    padding: 10px;
    border-right: none;
    border-bottom: 1px solid #f0f0f0;
  }

  .cat-side-item {
    flex: 1 1 auto;
    padding: 8px 10px;
    border-radius: 4px;
    background: #fff;
    border: 1px solid #eee;
  }
}
