/* ===================================================
   Tokens — AliExpress-inspired palette
=================================================== */
:root {
  --bg:            #ffffff;
  --bg-page:       #f5f5f5;
  --bg-soft:       #fafafa;
  --ink:           #1a1a1a;
  --ink-soft:      #767676;
  --border:        #ececec;
  --accent:        #ff4747;   /* AliExpress red */
  --accent-2:      #ff8a00;   /* orange, used in gradients */
  --accent-dark:   #e0392f;
  --accent-soft:   #fff1ee;
  --radius:        6px;
  --radius-lg:     10px;
  --shadow:        0 1px 4px rgba(0, 0, 0, 0.06);
  --shadow-hover:  0 8px 20px rgba(0, 0, 0, 0.12);
  --font-display:  'Sora', 'Segoe UI', sans-serif;
  --font-body:     'Inter', 'Segoe UI', sans-serif;
  --max-width:     1240px;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  background: var(--bg-page);
  color: var(--ink);
  font-family: var(--font-body);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

h1, h2, h3 { font-family: var(--font-display); color: var(--ink); line-height: 1.25; margin: 0 0 .5em; }
h1 { font-size: clamp(1.5rem, 3vw, 2.05rem); font-weight: 800; }
h2 { font-size: clamp(1.1rem, 2.2vw, 1.35rem); font-weight: 700; margin-top: 1.6em; }
p { margin: 0 0 1em; }
.muted { color: var(--ink-soft); }
.muted.small { font-size: .875rem; }

.wrap {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 20px;
}

/* ===================================================
   Header
=================================================== */
.site-header {
  background: var(--bg);
  position: sticky;
  top: 0;
  z-index: 50;
  box-shadow: 0 1px 0 rgba(0,0,0,0.06);
}
.header-top {
  display: flex;
  align-items: center;
  gap: 20px;
  height: 68px;
}
.brand {
  display: flex;
  align-items: center;
  gap: 9px;
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 1.15rem;
  flex-shrink: 0;
}
.brand-mark {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  border-radius: 8px;
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  color: #fff;
  font-size: 1rem;
}

.search-bar {
  flex: 1;
  display: flex;
  align-items: center;
  max-width: 640px;
  border: 2px solid var(--accent);
  border-radius: 999px;
  overflow: hidden;
  height: 42px;
}
.search-bar input {
  flex: 1;
  border: none;
  outline: none;
  padding: 0 16px;
  font-size: .92rem;
  font-family: var(--font-body);
  background: var(--bg);
  color: var(--ink);
}
.search-bar button {
  border: none;
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  color: #fff;
  width: 52px;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  flex-shrink: 0;
}
.search-bar button:hover { filter: brightness(1.05); }

.header-strip {
  background: var(--bg);
  border-top: 1px solid var(--border);
}
.site-nav { display: flex; gap: 26px; height: 42px; align-items: center; }
.site-nav a {
  font-weight: 600;
  font-size: .88rem;
  color: var(--ink-soft);
  padding: 4px 2px;
  border-bottom: 2px solid transparent;
  transition: color .15s ease, border-color .15s ease;
}
.site-nav a:hover { color: var(--accent); border-color: var(--accent); }

.nav-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 8px;
  flex-shrink: 0;
}
.nav-toggle span { width: 22px; height: 2px; background: var(--ink); border-radius: 2px; }

/* ===================================================
   Hero banner (homepage)
=================================================== */
.hero-banner {
  background: linear-gradient(120deg, var(--accent) 0%, var(--accent-2) 100%);
  border-radius: var(--radius-lg);
  padding: 34px 32px;
  margin-bottom: 22px;
  color: #fff;
  position: relative;
  overflow: hidden;
}
.hero-banner::after {
  content: "";
  position: absolute;
  right: -60px;
  top: -60px;
  width: 220px;
  height: 220px;
  background: rgba(255,255,255,0.14);
  border-radius: 50%;
}
.hero-banner h1 {
  color: #fff;
  font-size: clamp(1.4rem, 3.4vw, 2rem);
  margin-bottom: 6px;
  position: relative;
}
.hero-banner p {
  color: rgba(255,255,255,0.92);
  margin: 0;
  position: relative;
  font-size: .95rem;
}

/* ===================================================
   Category chip strip
=================================================== */
.cat-strip-wrap {
  margin-bottom: 26px;
  overflow-x: auto;
  -ms-overflow-style: none;
  scrollbar-width: none;
}
.cat-strip-wrap::-webkit-scrollbar { display: none; }
.cat-strip {
  display: flex;
  gap: 14px;
  padding: 2px;
}
.cat-chip {
  flex: 0 0 auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  width: 78px;
  text-align: center;
}
.cat-chip-icon {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: var(--bg);
  border: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 1.2rem;
  color: var(--accent);
  transition: background .15s ease, color .15s ease, border-color .15s ease;
}
.cat-chip:hover .cat-chip-icon {
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  color: #fff;
  border-color: transparent;
}
.cat-chip-label {
  font-size: .74rem;
  font-weight: 600;
  color: var(--ink-soft);
  line-height: 1.2;
}

/* ===================================================
   Layout: content + sidebar
=================================================== */
.site-main { padding: 22px 0 56px; }

.layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 260px;
  gap: 22px;
  align-items: start;
}
.layout.layout-full {
  grid-template-columns: 1fr;
}

.main-content { min-width: 0; }

.page-head { margin-bottom: 16px; }
.eyebrow {
  display: inline-block;
  font-size: .72rem;
  font-weight: 800;
  letter-spacing: .06em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 6px;
}

/* ===================================================
   Sidebar
=================================================== */
.sidebar-box {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 18px;
  position: sticky;
  top: 128px;
  box-shadow: var(--shadow);
}
.sidebar-title {
  font-size: .95rem;
  margin-bottom: 10px;
  position: relative;
  padding-left: 10px;
}
.sidebar-title::before {
  content: "";
  position: absolute;
  left: 0;
  top: 2px;
  bottom: 2px;
  width: 4px;
  border-radius: 3px;
  background: linear-gradient(180deg, var(--accent), var(--accent-2));
}
.cat-list { list-style: none; margin: 0; padding: 0; }
.cat-list li { margin-bottom: 2px; }
.cat-list a {
  display: block;
  padding: 9px 10px;
  border-radius: var(--radius);
  font-size: .88rem;
  font-weight: 500;
  color: var(--ink-soft);
  transition: background .15s ease, color .15s ease;
}
.cat-list a:hover { background: var(--accent-soft); color: var(--accent-dark); }
.cat-list a.is-active { background: var(--accent); color: #fff; font-weight: 700; }

/* ===================================================
   Card grid (home / category / related / search)
=================================================== */
.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(190px, 1fr));
  gap: 14px;
}
.card {
  display: flex;
  flex-direction: column;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  transition: box-shadow .18s ease, transform .18s ease;
}
.card:hover { box-shadow: var(--shadow-hover); transform: translateY(-2px); }
.card-thumb {
  position: relative;
  aspect-ratio: 1 / 1;
  background: var(--bg-soft);
  overflow: hidden;
}
.card-thumb img { width: 100%; height: 100%; object-fit: cover; transition: transform .3s ease; }
.card:hover .card-thumb img { transform: scale(1.05); }

.card-ribbon {
  position: absolute;
  top: 8px;
  left: 0;
  background: linear-gradient(90deg, var(--accent), var(--accent-2));
  color: #fff;
  font-size: .66rem;
  font-weight: 800;
  letter-spacing: .02em;
  text-transform: uppercase;
  padding: 4px 10px 4px 8px;
  border-radius: 0 4px 4px 0;
  box-shadow: var(--shadow);
  z-index: 2;
}
.card-overlay {
  position: absolute;
  inset: auto 0 0 0;
  background: linear-gradient(0deg, rgba(0,0,0,.55), transparent);
  color: #fff;
  font-size: .72rem;
  font-weight: 700;
  text-align: center;
  padding: 18px 8px 8px;
  opacity: 0;
  transform: translateY(6px);
  transition: opacity .18s ease, transform .18s ease;
}
.card:hover .card-overlay { opacity: 1; transform: translateY(0); }

.card-body { padding: 10px 12px 14px; }
.card-title {
  font-family: var(--font-body);
  font-size: .86rem;
  font-weight: 600;
  margin: 0 0 8px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  line-height: 1.35;
}
.card-cat {
  display: inline-block;
  font-size: .68rem;
  font-weight: 700;
  letter-spacing: .03em;
  text-transform: uppercase;
  color: var(--accent-dark);
  background: var(--accent-soft);
  padding: 3px 8px;
  border-radius: 999px;
}

/* ===================================================
   Breadcrumb
=================================================== */
.breadcrumb {
  font-size: .82rem;
  color: var(--ink-soft);
  margin-bottom: 14px;
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}
.breadcrumb a:hover { color: var(--accent); }
.breadcrumb .current { color: var(--ink); font-weight: 600; }

/* ===================================================
   Product hero box (2 col / 1 row)
=================================================== */
.hero-box {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 30px;
  margin-bottom: 28px;
  box-shadow: var(--shadow);
}
.hero-stacked {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 28px;
  align-items: center;
}
.hero-media {
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--bg-soft);
  aspect-ratio: 1 / 1;
}
.hero-media img { width: 100%; height: 100%; object-fit: cover; }
.hero-info h1 { margin-bottom: 16px; }

.hero-meta-list {
  display: flex;
  flex-direction: column;
  margin-bottom: 20px;
}
.meta-row {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 13px 0;
  border-bottom: 1px solid var(--border);
  font-size: .92rem;
}
.meta-label {
  font-weight: 700;
  color: var(--ink-soft);
}
.meta-label::after { content: ":"; }
.meta-value {
  font-weight: 600;
  color: var(--ink);
}

.cart-icon { flex-shrink: 0; }

.btn-affiliate {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  background: linear-gradient(90deg, var(--accent), var(--accent-2));
  color: #fff;
  font-weight: 800;
  font-size: 1rem;
  padding: 15px 28px;
  border-radius: 999px;
  box-shadow: 0 6px 16px rgba(255, 71, 71, 0.35);
  transition: filter .15s ease, transform .15s ease;
}
.btn-affiliate:hover { filter: brightness(1.05); transform: translateY(-1px); }

/* ===================================================
   Product description / typography
=================================================== */
.product-description {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 26px 28px;
}
.prose {
  max-width: 74ch;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 26px 28px;
}
.product-description p, .prose p { color: var(--ink); }
.product-description ul, .prose ul { padding-left: 1.2em; margin-bottom: 1em; }
.product-description li, .prose li { margin-bottom: .4em; }
.product-description hr, .prose hr {
  border: none;
  border-top: 1px solid var(--border);
  margin: 2em 0;
}
.product-description h2 {
  position: relative;
  padding-left: 12px;
}
.product-description h2::before {
  content: "";
  position: absolute;
  left: 0;
  top: 3px;
  bottom: 3px;
  width: 4px;
  border-radius: 3px;
  background: linear-gradient(180deg, var(--accent), var(--accent-2));
}

.table-wrap { overflow-x: auto; margin: 1.2em 0; }
.desc-table {
  width: 100%;
  border-collapse: collapse;
  font-size: .9rem;
}
.desc-table th, .desc-table td {
  border: 1px solid var(--border);
  padding: 10px 12px;
  text-align: left;
}
.desc-table th {
  background: var(--accent-soft);
  color: var(--accent-dark);
  font-weight: 700;
}
.desc-table tr:nth-child(even) td { background: var(--bg-soft); }

/* ===================================================
   Static pages / prose
=================================================== */
.static-page .prose { margin-top: 6px; }

/* ===================================================
   Related section
=================================================== */
.related-section { margin-top: 32px; }

/* ===================================================
   Contact form
=================================================== */
.contact-form {
  max-width: 520px;
  margin-top: 16px;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 24px;
  box-shadow: var(--shadow);
}
.form-row { margin-bottom: 16px; display: flex; flex-direction: column; gap: 6px; }
.form-row label { font-weight: 600; font-size: .88rem; }
.form-row input, .form-row textarea {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 10px 12px;
  font-family: var(--font-body);
  font-size: .92rem;
  color: var(--ink);
  background: #fff;
}
.form-row input:focus, .form-row textarea:focus { border-color: var(--accent); }
.btn-primary {
  background: linear-gradient(90deg, var(--accent), var(--accent-2));
  color: #fff;
  border: none;
  font-weight: 800;
  font-size: .92rem;
  padding: 12px 26px;
  border-radius: 999px;
  cursor: pointer;
  box-shadow: 0 6px 16px rgba(255, 71, 71, 0.3);
}
.btn-primary:hover { filter: brightness(1.05); }
.alert-success {
  background: var(--accent-soft);
  color: var(--accent-dark);
  border: 1px solid var(--accent);
  padding: 12px 16px;
  border-radius: var(--radius);
  margin-bottom: 16px;
  font-weight: 700;
}

/* ===================================================
   Footer
=================================================== */
.site-footer {
  border-top: 1px solid var(--border);
  background: var(--bg);
  padding: 26px 0;
}
.footer-inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 16px;
}
.brand-text.small { font-family: var(--font-display); font-weight: 800; }
.footer-nav { display: flex; gap: 20px; }
.footer-nav a { font-size: .88rem; font-weight: 600; color: var(--ink-soft); }
.footer-nav a:hover { color: var(--accent); }

/* ===================================================
   Responsive
=================================================== */
@media (max-width: 880px) {
  .layout { grid-template-columns: 1fr; }
  .sidebar { order: 2; }
  .sidebar-box { position: static; }
  .main-content { order: 1; }

  .hero-box { grid-template-columns: 1fr; }
  .product-description, .prose { padding: 20px; }

  .header-top { height: auto; padding: 10px 20px; flex-wrap: wrap; }
  .search-bar { display: none; }
  .nav-toggle { display: flex; margin-left: auto; }

  .header-strip { position: relative; }
  .site-nav {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    background: var(--bg);
    border-bottom: 1px solid var(--border);
    flex-direction: column;
    gap: 0;
    height: auto;
    max-height: 0;
    overflow: hidden;
    transition: max-height .2s ease;
  }
  .site-nav.is-open { max-height: 200px; }
  .site-nav a { padding: 14px 20px; border-bottom: 1px solid var(--border); width: 100%; }
}

@media (max-width: 480px) {
  .card-grid { grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); }
  .hero-banner { padding: 24px 20px; }
}
