/* ============================================================
   SG Maillots — Main Stylesheet V8.0
   Sprint 8: Wireframe V8 additions
   ============================================================
   Design System (from frontend-wireframe.html):
   - bg:    #f8f7f4   - bg2:   #ffffff
   - ink:   #1a1a2e   - muted: #6b7280
   - rule:  #e5e7eb   - accent:#16a34a
   - accent2:#dc2626  - blue:  #2563eb
   - orange:#ea580c
   - page-w:1060px    - radius:6px
   - shadow:0 1px 4px rgba(0,0,0,.08)
   ============================================================ */

/* ── Custom Properties ──────────────────────────────────── */
:root {
  --bg:        #f8f7f4;
  --bg2:       #ffffff;
  --ink:       #1a1a2e;
  --muted:     #6b7280;
  --rule:      #e5e7eb;
  --accent:    #16a34a;
  --accent2:   #dc2626;
  --green:     #16a34a;
  --blue:      #2563eb;
  --orange:    #ea580c;
  --page-w:    1060px;
  --radius:    6px;
  --shadow:    0 1px 4px rgba(0,0,0,.08);
  --font:      system-ui, -apple-system, 'Segoe UI', 'PingFang SC', 'Microsoft YaHei', sans-serif;
}

/* ── Reset ──────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { font-size: 16px; scroll-behavior: smooth; }
body {
  font-family: var(--font);
  background: var(--bg);
  color: var(--ink);
  line-height: 1.6;
}
a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }
img { max-width: 100%; height: auto; display: block; }

/* ── Layout ─────────────────────────────────────────────── */
.sg-main {
  max-width: var(--page-w);
  margin: 0 auto;
  padding: 1.5rem 1rem;
  min-height: 60vh;
}

/* ── Header / Navigation ────────────────────────────────── */
.sg-header {
  background: var(--ink);
  color: #fff;
  padding: .45rem 0;
  position: sticky;
  top: 0;
  z-index: 1000;
}
.sg-header__inner {
  max-width: var(--page-w);
  margin: 0 auto;
  padding: 0 1rem;
  display: flex;
  align-items: center;
  gap: .6rem;
  height: 42px;
}

/* Logo */
.sg-logo {
  font-weight: 700;
  font-size: .9rem;
  white-space: nowrap;
  flex-shrink: 0;
}
.sg-logo a {
  color: #fff;
  text-decoration: none;
}

/* ── Nav: Home▾ dropdown + Get Discount ──────────── */
.sg-nav {
  display: flex;
  align-items: center;
  gap: .4rem;
  flex: 0 0 auto;
}

.sg-nav__home {
  position: relative;
}

.sg-nav__home-btn {
  background: none;
  border: 1px solid rgba(255,255,255,.25);
  color: #fff;
  padding: .25rem .6rem;
  border-radius: var(--radius);
  font-size: .72rem;
  cursor: pointer;
  transition: all .15s;
}

.sg-nav__home-btn:hover,
.sg-nav__home-btn:focus,
.sg-nav__home[aria-expanded="true"] .sg-nav__home-btn {
  background: rgba(255,255,255,.12);
  border-color: rgba(255,255,255,.5);
}

.sg-nav__dropdown {
  display: none;
  position: absolute;
  top: 100%;
  left: 0;
  min-width: 180px;
  background: var(--ink);
  border: 1px solid rgba(255,255,255,.15);
  border-radius: var(--radius);
  padding: .3rem 0;
  margin-top: .2rem;
  box-shadow: 0 8px 24px rgba(0,0,0,.3);
  z-index: 1001;
}

.sg-nav__home:hover .sg-nav__dropdown,
.sg-nav__home:focus-within .sg-nav__dropdown,
.sg-nav__home[aria-expanded="true"] .sg-nav__dropdown {
  display: block;
}

.sg-nav__dropdown-item {
  display: block;
  padding: .35rem .7rem;
  color: rgba(255,255,255,.85);
  text-decoration: none;
  font-size: .7rem;
  transition: all .1s;
}

.sg-nav__dropdown-item:hover {
  background: rgba(255,255,255,.1);
  color: #fff;
}

.sg-nav__dropdown-item--home {
  font-weight: 600;
  border-bottom: 1px solid rgba(255,255,255,.1);
  margin-bottom: .1rem;
}

.sg-nav__discount {
  background: var(--accent2);
  color: #fff;
  padding: .25rem .55rem;
  border-radius: var(--radius);
  font-size: .68rem;
  font-weight: 600;
  text-decoration: none;
  white-space: nowrap;
  transition: all .15s;
}

.sg-nav__discount:hover {
  background: #b91c1c;
  color: #fff;
  text-decoration: none;
}

/* Search */
.sg-header-search form {
  display: flex;
  gap: 0;
}
.sg-header-search input[type="search"] {
  padding: 0.35rem 0.6rem;
  border: 1px solid rgba(255,255,255,0.2);
  border-radius: var(--radius) 0 0 var(--radius);
  background: rgba(255,255,255,0.1);
  color: #fff;
  font-size: 0.75rem;
  width: 140px;
}
.sg-header-search input[type="search"]::placeholder {
  color: rgba(255,255,255,0.5);
}
.sg-header-search button {
  padding: 0.35rem 0.6rem;
  border: 1px solid rgba(255,255,255,0.2);
  border-left: none;
  border-radius: 0 var(--radius) var(--radius) 0;
  background: rgba(255,255,255,0.15);
  color: #fff;
  font-size: 0.75rem;
  cursor: pointer;
}

/* Header actions (account, cart, language) */
.sg-header-actions {
  display: flex;
  align-items: center;
  gap: 0.6rem;
}
.sg-header-actions a {
  color: rgba(255,255,255,0.85);
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  font-size: 0.78rem;
  text-decoration: none;
}
.sg-header-actions a:hover { color: #fff; }
.sg-header-actions svg {
  width: 20px;
  height: 20px;
  stroke: currentColor;
}

.sg-header-search {
  flex: 0 1 260px;
  min-width: 170px;
}

.sg-header-search .sg-search-form {
  display: flex;
  width: 100%;
}

.sg-header-search .sg-search-input {
  min-width: 0;
  flex: 1 1 auto;
}

.sg-mobile-front-actions {
  display: none;
}

/* Cart badge */
.sg-cart-icon {
  position: relative;
  min-width: 36px;
  min-height: 36px;
  justify-content: center;
  border: 1px solid rgba(255,255,255,.28);
  border-radius: 999px;
  background: rgba(22, 163, 74, .16);
}
.sg-cart-icon svg {
  width: 26px;
  height: 26px;
  stroke-width: 2.3;
}
.sg-cart-badge {
  position: absolute;
  top: -7px;
  right: -8px;
  background: var(--accent2);
  color: #fff;
  font-size: 0.68rem;
  font-weight: 700;
  line-height: 1;
  padding: 0.18rem 0.36rem;
  border: 2px solid var(--ink);
  border-radius: 999px;
  min-width: 20px;
  text-align: center;
}

/* ── Footer ─────────────────────────────────────────────── */
.sg-footer {
  background: var(--ink);
  color: rgba(255,255,255,0.7);
  padding: 1rem 0;
  margin-top: 2rem;
}
.sg-footer__inner {
  max-width: var(--page-w);
  margin: 0 auto;
  padding: 0 1rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.75rem;
}
.sg-footer__inner a {
  color: rgba(255,255,255,0.7);
  text-decoration: none;
}
.sg-footer__inner a:hover { color: #fff; }

/* ── Section Titles ─────────────────────────────────────── */
.sg-section-title {
  font-size: 1.05rem;
  font-weight: 700;
  margin: 1.5rem 0 0.8rem;
  padding-bottom: 0.4rem;
  border-bottom: 3px solid var(--accent);
  display: flex;
  align-items: center;
  gap: 0.4rem;
}

/* ── Product Card ───────────────────────────────────────── */
.sg-card {
  display: block;
  background: var(--bg2);
  border: 1px solid var(--rule);
  border-radius: 4px;
  overflow: hidden;
  text-decoration: none;
  color: var(--ink);
  transition: box-shadow 0.2s;
}
.sg-card:hover {
  box-shadow: var(--shadow);
  text-decoration: none;
}
.sg-card img,
.sg-card .sg-card__thumb {
  width: 100%;
  aspect-ratio: 1 / 1;
  height: auto;
  object-fit: cover;
  background: var(--rule);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.65rem;
  color: var(--muted);
}
.sg-card__body { padding: 0.4rem 0.5rem; }
.sg-card__title {
  font-size: 0.75rem;
  line-height: 1.25;
  font-weight: 600;
  color: var(--ink);
  min-height: 2.35em;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  white-space: normal;
  overflow: hidden;
  margin-bottom: 0.15rem;
}
.sg-card__meta {
  font-size: 0.62rem;
  color: var(--muted);
  margin-bottom: 0.2rem;
}
.sg-card__badges {
  display: flex;
  gap: 0.2rem;
  flex-wrap: wrap;
}
.sg-card__badge {
  display: inline-block;
  font-size: 0.55rem;
  padding: 0.05rem 0.3rem;
  border-radius: 3px;
  font-weight: 500;
}
.sg-card__badge--home   { background: #dcfce7; color: var(--green); }
.sg-card__badge--away   { background: #dbeafe; color: var(--blue); }
.sg-card__badge--third  { background: #fee2e2; color: var(--accent2); }
.sg-card__badge--gk     { background: var(--rule); color: var(--muted); }
.sg-card__badge--player { background: #dcfce7; color: var(--green); }
.sg-card__badge--fan    { background: var(--rule); color: var(--muted); }

/* Price tag (shown per wireframe V8) */
.sg-price-tag {
  display: inline-flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: .35rem .5rem;
  font-size: .85rem;
  color: var(--accent2);
}
.sg-price-tag strong { font-weight: 700; }
.sg-price-tag small { color: var(--muted); font-size: .78rem; font-weight: 500; }
.sg-card__price { font-size: .75rem; font-weight: 700; color: var(--accent2); margin-top: .2rem; }

/* ── Category Card ──────────────────────────────────────── */
.sg-cat-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.15rem;
  padding: 1.2rem 0.5rem;
  background: var(--bg2);
  border: 1px solid var(--rule);
  border-radius: var(--radius);
  text-align: center;
  text-decoration: none;
  color: var(--ink);
  transition: all 0.2s;
}
.sg-cat-card:hover {
  border-color: var(--accent);
  box-shadow: var(--shadow);
  text-decoration: none;
}
.sg-cat-card__icon { font-size: 1.6rem; line-height: 1; margin-bottom: 0.2rem; }
.sg-cat-card__label {
  font-size: 0.72rem;
  font-weight: 600;
  color: var(--ink);
}

/* ── Product Grid ───────────────────────────────────────── */
.sg-product-grid {
  display: grid;
  gap: 0.6rem;
}
.sg-product-grid--4cols { grid-template-columns: repeat(4, 1fr); }
.sg-product-grid--6cols { grid-template-columns: repeat(6, 1fr); }
.sg-product-grid--category { grid-template-columns: repeat(4, minmax(0, 1fr)); }

@media (min-width: 1280px) {
  .sg-product-grid--category { grid-template-columns: repeat(5, minmax(0, 1fr)); }
}

@media (min-width: 769px) and (max-width: 1023px) {
  .sg-product-grid--category { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

/* ── Grid Utilities ─────────────────────────────────────── */
.sg-grid { display: grid; gap: 0.6rem; }
.sg-grid--4 { grid-template-columns: repeat(4, 1fr); }
.sg-grid--6 { grid-template-columns: repeat(6, 1fr); }
.sg-grid--8 { grid-template-columns: repeat(8, 1fr); }

/* ── Carousel / Hero ────────────────────────────────────── */
.sg-carousel {
  position: relative;
  overflow: hidden;
  border-radius: var(--radius);
  margin-bottom: 0.5rem;
}
.sg-carousel__slides {
  display: flex;
  transition: transform 0.4s ease;
}
.sg-carousel__slide {
  min-width: 100%;
  position: relative;
}
.sg-carousel__slide img {
  width: 100%;
  height: 280px;
  object-fit: cover;
}
.sg-carousel__overlay {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  padding: 2rem 1.5rem 1.5rem;
  background: linear-gradient(transparent, rgba(0,0,0,0.75));
  color: #fff;
}
.sg-carousel__overlay h2 {
  font-size: 1.3rem;
  font-weight: 700;
  margin-bottom: 0.3rem;
}
.sg-carousel__overlay p {
  font-size: 0.8rem;
  opacity: 0.85;
  margin-bottom: 0.4rem;
}
.sg-carousel__btns {
  position: absolute;
  top: 50%;
  left: 0;
  right: 0;
  display: flex;
  justify-content: space-between;
  transform: translateY(-50%);
  pointer-events: none;
  padding: 0 0.5rem;
}
.sg-carousel__btn {
  pointer-events: auto;
  background: rgba(255,255,255,0.85);
  border: none;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  font-size: 1rem;
  cursor: pointer;
  color: var(--ink);
  display: flex;
  align-items: center;
  justify-content: center;
}

/* ── Buttons ────────────────────────────────────────────── */
.sg-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.3rem;
  padding: 0.5rem 1rem;
  border-radius: var(--radius);
  font-size: 0.8rem;
  font-weight: 600;
  cursor: pointer;
  border: 1px solid transparent;
  transition: all 0.2s;
  text-decoration: none;
}
.sg-btn--primary {
  background: var(--accent2);
  color: #fff;
}
.sg-btn--primary:hover {
  background: #b91c1c;
  text-decoration: none;
}
.sg-btn--secondary {
  background: var(--accent);
  color: #fff;
}
.sg-btn--secondary:hover {
  background: #15803d;
  text-decoration: none;
}
.sg-btn--outline {
  background: transparent;
  border-color: var(--rule);
  color: var(--ink);
}
.sg-btn--outline:hover {
  border-color: var(--accent);
  color: var(--accent);
  text-decoration: none;
}

/* ── Style Tabs ─────────────────────────────────────────── */
.sg-style-tabs {
  display: flex;
  gap: 0.3rem;
  flex-wrap: wrap;
  margin-bottom: 0.8rem;
}
.sg-style-tab {
  display: inline-flex;
  align-items: center;
  gap: 0.2rem;
  padding: 0.3rem 0.6rem;
  border-radius: var(--radius);
  border: 1px solid var(--rule);
  background: var(--bg2);
  color: var(--ink);
  font-size: 0.75rem;
  text-decoration: none;
  transition: all 0.2s;
}
.sg-style-tab:hover {
  border-color: var(--accent);
  text-decoration: none;
}
.sg-style-tab--active {
  background: var(--accent);
  color: #fff;
  border-color: var(--accent);
  font-weight: 600;
}
.sg-style-tab__count {
  font-size: 0.7rem;
  opacity: 0.7;
}

/* ── Breadcrumbs ────────────────────────────────────────── */
.sg-breadcrumbs {
  font-size: 0.72rem;
  color: var(--muted);
  margin-bottom: 0.6rem;
}
.sg-breadcrumbs a { color: var(--muted); }
.sg-breadcrumbs a:hover { color: var(--accent); }
.sg-breadcrumbs strong { color: var(--accent); font-weight: 600; }

/* ── Sort Options ───────────────────────────────────────── */
.sg-sort-options {
  display: flex;
  gap: 0.4rem;
  align-items: center;
  font-size: 0.75rem;
}
.sg-sort-options select {
  padding: 0.3rem 0.5rem;
  border: 1px solid var(--rule);
  border-radius: var(--radius);
  background: var(--bg2);
  font-size: 0.75rem;
  color: var(--ink);
}

/* ── Category Page Layout ───────────────────────────────── */
.sg-category-page__layout,
.sg-archive-page__layout {
  display: flex;
  gap: 1rem;
}
.sg-category-page__sidebar,
.sg-archive-page__sidebar,
aside.sg-archive-page__sidebar {
  flex: 0 0 260px;
}
.sg-category-page__content,
.sg-archive-page__content {
  flex: 1;
  min-width: 0;
}
.sg-mobile-filter-toggle {
  display: none;
}

/* ── Sidebar Blocks ─────────────────────────────────────── */
.sg-sidebar-block {
  background: var(--bg2);
  border: 1px solid var(--rule);
  border-radius: var(--radius);
  overflow: hidden;
  margin-bottom: 0.8rem;
}
.sg-sidebar-block__header {
  padding: 0.4rem 0.6rem;
  background: var(--ink);
  color: #fff;
  font-size: 0.75rem;
  font-weight: 600;
}
.sg-sidebar-block__body { padding: 0.3rem 0.5rem; }
.sg-sidebar-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.25rem 0.4rem;
  font-size: 0.7rem;
  border-bottom: 1px solid var(--rule);
  color: var(--ink);
  text-decoration: none;
  transition: background 0.15s;
}
.sg-sidebar-item:last-child { border-bottom: none; }
.sg-sidebar-item:hover {
  background: var(--bg);
  text-decoration: none;
}
.sg-sidebar-item__count {
  font-size: 0.65rem;
  color: var(--muted);
}
.sg-sidebar-item--active {
  font-weight: 600;
  color: var(--accent);
}
.sg-sidebar-item--sub {
  padding-left: 1rem;
  font-size: 0.68rem;
}

/* ── Filter Tags ────────────────────────────────────────── */
.sg-filter-group {
  margin-bottom: 0.5rem;
}
.sg-filter-group__label {
  font-size: 0.7rem;
  font-weight: 600;
  margin-bottom: 0.25rem;
  display: block;
}
.sg-filter-tags {
  display: flex;
  gap: 0.25rem;
  flex-wrap: wrap;
}
.sg-filter-tag {
  display: inline-block;
  font-size: 0.6rem;
  padding: 0.1rem 0.35rem;
  border-radius: 3px;
  cursor: pointer;
  border: 1px solid transparent;
}
.sg-filter-tag--home   { background: #dcfce7; color: var(--green); }
.sg-filter-tag--away   { background: #dbeafe; color: var(--blue); }
.sg-filter-tag--third  { background: #fee2e2; color: var(--accent2); }
.sg-filter-tag--gk     { background: var(--rule); color: var(--muted); }
.sg-filter-tag--year   { background: #dbeafe; color: var(--blue); }
.sg-filter-tag--player { background: #dcfce7; color: var(--green); }
.sg-filter-tag--fan    { background: var(--rule); color: var(--muted); }
.sg-filter-tag--active {
  border-color: var(--ink);
  font-weight: 600;
}

/* ── Pagination ─────────────────────────────────────────── */
.nav-links,
.pagination {
  display: flex;
  justify-content: center;
  gap: 0.3rem;
  margin-top: 1rem;
}
.page-numbers,
.nav-links a,
.nav-links span {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 32px;
  height: 32px;
  padding: 0 0.4rem;
  border: 1px solid var(--rule);
  border-radius: var(--radius);
  background: var(--bg2);
  color: var(--ink);
  font-size: 0.75rem;
  text-decoration: none;
}
.page-numbers.current,
.nav-links span.current {
  background: var(--accent);
  color: #fff;
  border-color: var(--accent);
  font-weight: 600;
}
.page-numbers:hover,
.nav-links a:hover {
  border-color: var(--accent);
  text-decoration: none;
}

/* ── Product Detail ─────────────────────────────────────── */
.sg-product-detail {
  display: grid;
  grid-template-columns: 60% 40%;
  gap: 1.5rem;
}
@media (max-width: 768px) { .sg-product-detail { grid-template-columns: 1fr; } }
.sg-product-gallery img { width: 100%; border-radius: var(--radius); }

.sg-product-detail__gallery {
  flex: 0 0 40%;
}
.sg-product-detail__main-image img {
  width: 100%;
  border-radius: var(--radius);
  border: 1px solid var(--rule);
}
.sg-product-detail__thumbnails {
  display: flex;
  gap: 0.3rem;
  margin-top: 0.4rem;
}
.sg-product-detail__thumbnails img {
  width: 60px;
  height: 60px;
  object-fit: cover;
  border-radius: 4px;
  border: 1px solid var(--rule);
  cursor: pointer;
}
.sg-product-detail__info {
  flex: 1;
}
.sg-product-detail__title {
  font-size: 1.15rem;
  font-weight: 700;
  margin-bottom: 0.3rem;
}
.sg-product-meta {
  display: flex;
  gap: 0.4rem;
  flex-wrap: wrap;
  margin-bottom: 0.5rem;
}
.sg-product-meta span {
  font-size: 0.72rem;
  padding: 0.1rem 0.35rem;
  border-radius: 3px;
  background: var(--bg);
  color: var(--muted);
}

/* Size selector */
.sg-size-selector {
  margin: 0.6rem 0;
}
.sg-size-selector__label {
  font-size: 0.8rem;
  font-weight: 600;
  margin-bottom: 0.3rem;
  display: block;
}
.sg-size-options {
  display: flex;
  gap: 0.3rem;
  flex-wrap: wrap;
}
.sg-size-option {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 44px;
  height: 36px;
  padding: 0 0.4rem;
  border: 1px solid var(--rule);
  border-radius: 4px;
  background: var(--bg2);
  font-size: 0.75rem;
  cursor: pointer;
  transition: all 0.15s;
}
.sg-size-option:hover { border-color: var(--accent); }
.sg-size-option--active {
  background: var(--accent);
  color: #fff;
  border-color: var(--accent);
  font-weight: 600;
}

/* Quantity */
.sg-qty-selector {
  display: inline-flex;
  align-items: center;
  gap: 0;
  border: 1px solid var(--rule);
  border-radius: 4px;
  overflow: hidden;
}
.sg-qty-selector button {
  width: 28px;
  height: 32px;
  border: none;
  background: var(--bg);
  font-size: 0.9rem;
  cursor: pointer;
  color: var(--ink);
}
.sg-qty-selector input {
  width: 36px;
  height: 32px;
  border: none;
  border-left: 1px solid var(--rule);
  border-right: 1px solid var(--rule);
  text-align: center;
  font-size: 0.8rem;
  font-weight: 600;
  background: var(--bg2);
}

/* Customization */
.sg-customization {
  margin: 0.6rem 0;
  padding: 0.6rem;
  background: var(--bg);
  border-radius: 6px;
  border: 1px solid var(--rule);
}
.sg-customization__label {
  font-size: 0.8rem;
  font-weight: 600;
  margin-bottom: 0.35rem;
}
.sg-custom-field {
  margin-bottom: 0.35rem;
}
.sg-custom-field label {
  display: block;
  font-size: 0.7rem;
  font-weight: 600;
  margin-bottom: 0.1rem;
}
.sg-custom-field input {
  padding: 0.2rem 0.4rem;
  border: 1px solid var(--rule);
  border-radius: 4px;
  font-size: 0.75rem;
  background: var(--bg2);
}

/* Patch toggles */
.sg-patch-toggles {
  display: flex;
  gap: 0.25rem;
  flex-wrap: wrap;
}
.sg-patch-toggle {
  display: inline-flex;
  align-items: center;
  gap: 0.15rem;
  padding: 0.1rem 0.3rem;
  border-radius: 3px;
  font-size: 0.6rem;
  cursor: pointer;
  border: 1px solid transparent;
}
.sg-patch-toggle--active {
  background: #dcfce7;
  color: var(--green);
  border-color: #86efac;
}
.sg-patch-toggle--inactive {
  background: var(--bg);
  color: var(--muted);
  border-color: var(--rule);
}

/* Cart preview */
.sg-cart-preview {
  margin-top: 0.4rem;
  padding: 0.3rem 0.4rem;
  background: var(--bg2);
  border: 1px dashed var(--rule);
  border-radius: 4px;
  font-size: 0.68rem;
}
.sg-cart-preview__title {
  margin: 0 0 .35rem;
  font-size: .95rem;
  line-height: 1.2;
}
.sg-cart-preview__total {
  margin-bottom: .35rem;
  color: var(--accent);
  font-weight: 700;
}
.sg-cart-preview__row {
  padding: .4rem 0;
  border-top: 1px solid var(--rule);
}
.sg-cart-preview__main {
  display: flex;
  justify-content: space-between;
  gap: .5rem;
  margin-bottom: .25rem;
}
.sg-cart-preview__tags {
  display: flex;
  flex-wrap: wrap;
  gap: .2rem;
}

/* Action buttons */
.sg-product-detail__actions {
  display: flex;
  gap: 0.5rem;
  margin-top: 0.8rem;
}
.sg-product-detail__actions .sg-btn {
  flex: 1;
}

/* Size Chart Tabs */
.sg-size-chart {
  margin-top: 1rem;
  padding: 0.6rem;
  background: var(--bg2);
  border: 2px dashed var(--rule);
  border-radius: 6px;
}
.sg-size-chart__title {
  font-size: 0.85rem;
  font-weight: 600;
  margin-bottom: 0.3rem;
}
.sg-size-chart__tabs {
  display: flex;
  gap: 0.3rem;
  margin-bottom: 0.5rem;
}
.sg-size-chart__tab {
  padding: 0.2rem 0.5rem;
  border-radius: var(--radius);
  border: 1px solid var(--rule);
  background: var(--bg);
  font-size: 0.7rem;
  cursor: pointer;
}
.sg-size-chart__tab--active {
  background: var(--accent);
  color: #fff;
  border-color: var(--accent);
  font-weight: 600;
}
.sg-size-chart table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.7rem;
}
.sg-size-chart th,
.sg-size-chart td {
  padding: 0.2rem 0.3rem;
  border: 1px solid var(--rule);
  text-align: center;
}
.sg-size-chart th {
  background: var(--ink);
  color: #fff;
  font-weight: 600;
}
.sg-size-chart td:first-child {
  font-weight: 600;
  background: var(--bg);
  text-align: left;
}

/* ── Cart Page ──────────────────────────────────────────── */
.sg-category-view-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: .4rem;
  margin: 0 0 .8rem;
  border-bottom: 1px solid var(--rule);
  padding-bottom: .5rem;
}
.sg-category-view-tabs__item {
  display: inline-flex;
  align-items: center;
  min-height: 32px;
  padding: .35rem .65rem;
  border: 1px solid var(--rule);
  border-radius: 4px;
  color: var(--ink);
  background: var(--bg2);
  font-size: .76rem;
  font-weight: 600;
  text-decoration: none;
}
.sg-category-view-tabs__item--active {
  border-color: var(--accent);
  background: var(--accent);
  color: #fff;
}

.sg-cart-page__title {
  font-size: 1.1rem;
  font-weight: 700;
  margin-bottom: 0.8rem;
}
.sg-cart-page__layout {
  display: flex;
  gap: 1.2rem;
}
.sg-cart-page__table { flex: 1; }
.sg-cart-page__sidebar { flex: 0 0 300px; }

.sg-cart-table {
  width: 100%;
  border: 1px solid var(--rule);
  border-radius: 4px;
  overflow: hidden;
  font-size: 0.78rem;
}
.sg-cart-table__header,
.sg-cart-table__row {
  display: flex;
  align-items: center;
  gap: 0;
  padding: 0.4rem 0.6rem;
}
.sg-cart-table__header {
  background: var(--bg);
  font-weight: 600;
  color: var(--muted);
  font-size: 0.72rem;
}
.sg-cart-table__row {
  border-bottom: 1px solid var(--rule);
}
.sg-cart-table__row:last-child { border-bottom: none; }
.sg-cart-table__col {
  padding: 0 0.3rem;
}
.sg-cart-table__col--product  { width: 35%; }
.sg-cart-table__col--size     { width: 10%; text-align: center; }
.sg-cart-table__col--custom   { width: 20%; }
.sg-cart-table__col--qty      { width: 10%; text-align: center; }
.sg-cart-table__col--subtotal { width: 10%; text-align: center; }
.sg-cart-table__col--action   { width: 15%; text-align: center; }

.sg-cart-product {
  display: flex;
  gap: 0.4rem;
  align-items: center;
}
.sg-cart-product__thumb {
  width: 45px;
  height: 45px;
  border-radius: 4px;
  background: var(--rule);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.5rem;
  color: var(--muted);
  flex-shrink: 0;
}
.sg-cart-product__thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 4px;
}
.sg-cart-product__name {
  font-size: 0.75rem;
  font-weight: 600;
}
.sg-cart-product__meta {
  font-size: 0.65rem;
  color: var(--muted);
}

/* Cart Summary */
.sg-cart-summary {
  background: var(--bg2);
  border: 1px solid var(--rule);
  border-radius: var(--radius);
  padding: 0.8rem;
}
.sg-cart-summary__row {
  display: flex;
  justify-content: space-between;
  font-size: 0.78rem;
  padding: 0.2rem 0;
}
.sg-cart-summary__row--total {
  font-size: 0.9rem;
  font-weight: 700;
  padding: 0.4rem 0;
  border-top: 1px solid var(--rule);
  margin-top: 0.3rem;
}
.sg-cart-summary__detail {
  font-size: 0.65rem;
  color: var(--muted);
  padding: 0.2rem 0 0.3rem 0.5rem;
  border-bottom: 1px dashed var(--rule);
}

/* ── Account Page ───────────────────────────────────────── */
.sg-account-page__title {
  font-size: 1.1rem;
  font-weight: 700;
  margin-bottom: 1rem;
}
.sg-account-section {
  background: var(--bg2);
  border: 1px solid var(--rule);
  border-radius: var(--radius);
  padding: 1rem;
  margin-bottom: 1rem;
}
.sg-account-section h2 {
  font-size: 0.95rem;
  font-weight: 600;
  margin-bottom: 0.6rem;
}

/* ── Mobile Bottom Nav ──────────────────────────────────── */
.sg-mobile-nav {
  display: none;
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  background: var(--bg2);
  border-top: 1px solid var(--rule);
  z-index: 100;
  padding: 0.3rem 0;
}
.sg-mobile-nav__list {
  display: flex;
  justify-content: space-around;
  list-style: none;
}
.sg-mobile-nav__link {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.1rem;
  color: var(--muted);
  font-size: 0.6rem;
  text-decoration: none;
  padding: 0.2rem 0.4rem;
}
.sg-mobile-nav__link svg {
  width: 20px;
  height: 20px;
  stroke: currentColor;
}

/* ── No Results ─────────────────────────────────────────── */
.sg-no-results {
  text-align: center;
  padding: 3rem 1rem;
  color: var(--muted);
  font-size: 0.9rem;
}

/* ── Contact Modal ──────────────────────────────────────── */
.sg-modal-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.5);
  z-index: 200;
  align-items: center;
  justify-content: center;
}
.sg-modal-overlay--show { display: flex; }
.sg-modal {
  background: var(--bg2);
  border-radius: var(--radius);
  padding: 1.5rem;
  max-width: 420px;
  width: 90%;
  box-shadow: 0 4px 20px rgba(0,0,0,0.15);
}
.sg-modal__title {
  font-size: 1rem;
  font-weight: 700;
  margin-bottom: 1rem;
}
.sg-modal__form label {
  display: block;
  font-size: 0.8rem;
  font-weight: 600;
  margin-bottom: 0.2rem;
}
.sg-modal__form input,
.sg-modal__form textarea,
.sg-modal__form select {
  width: 100%;
  padding: 0.4rem 0.6rem;
  border: 1px solid var(--rule);
  border-radius: 4px;
  margin-bottom: 0.6rem;
  font-size: 0.85rem;
}

/* ── Responsive (≤ 768px) ───────────────────────────────── */
@media (max-width: 768px) {
  .sg-main { padding: 1rem 0.5rem; }

  .sg-header__inner {
    gap: 0.4rem;
    padding: 0.4rem 0.5rem;
    height: auto;
  }
  .sg-nav { display: none; }
  .sg-header-actions a:not(.sg-cart-icon) { display: none; }

  .sg-grid--4,
  .sg-grid--6,
  .sg-grid--8,
  .sg-product-grid--4cols,
  .sg-product-grid--6cols,
  .sg-product-grid--category {
    grid-template-columns: repeat(2, 1fr);
  }

  .sg-carousel__slide img { height: 180px; }
  .sg-carousel__overlay { padding: 1rem; }
  .sg-carousel__overlay h2 { font-size: 1rem; }

  .sg-category-page__layout,
  .sg-archive-page__layout,
  .sg-product-detail,
  .sg-cart-page__layout {
    flex-direction: column;
  }
  .sg-category-page__sidebar,
  .sg-archive-page__sidebar,
  .sg-cart-page__sidebar {
    flex: 1 1 100%;
    order: 2;
  }
  .sg-mobile-filter-toggle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    min-height: 40px;
    margin: 0 0 .75rem;
    border: 1px solid var(--accent);
    border-radius: 4px;
    background: var(--accent);
    color: #fff;
    font-size: .82rem;
    font-weight: 700;
  }
  .sg-category-page__sidebar {
    display: none;
  }
  .sg-category-page__sidebar.sg-category-page__sidebar--open {
    display: block;
    order: 0;
  }
  .sg-sub-tabs,
  .sg-category-view-tabs {
    flex-wrap: nowrap;
    overflow-x: auto;
    padding-bottom: .45rem;
    -webkit-overflow-scrolling: touch;
  }
  .sg-sub-tab,
  .sg-category-view-tabs__item {
    flex: 0 0 auto;
  }
  .sg-product-detail__gallery {
    flex: 1 1 100%;
  }

  .sg-mobile-nav { display: block; }
  body { padding-bottom: 60px; }

  .sg-section-title { font-size: 0.95rem; }

  .sg-cart-table__header,
  .sg-cart-table__row {
    flex-wrap: wrap;
    gap: 0.3rem;
  }
  .sg-cart-table__col--product { width: 60%; }
  .sg-cart-table__col--size,
  .sg-cart-table__col--qty,
  .sg-cart-table__col--subtotal,
  .sg-cart-table__col--action {
    width: auto;
    flex: 1;
  }

  .sg-cart-page__table {
    overflow: visible;
  }

  .sg-cart-table,
  .sg-cart-table tbody,
  .sg-cart-table tr,
  .sg-cart-table td {
    display: block;
    width: 100%;
  }

  .sg-cart-table {
    border: 0;
    background: transparent;
  }

  .sg-cart-table thead {
    display: none;
  }

  .sg-cart-table tr {
    margin-bottom: .75rem;
    border: 1px solid var(--rule);
    border-radius: 6px;
    overflow: hidden;
    background: #fff;
  }

  .sg-cart-table td {
    display: grid;
    grid-template-columns: 86px minmax(0, 1fr);
    gap: .6rem;
    align-items: center;
    border-bottom: 1px solid var(--rule);
    padding: .55rem .65rem;
  }

  .sg-cart-table td::before {
    content: attr(data-label);
    color: var(--muted);
    font-size: .68rem;
    font-weight: 700;
    text-transform: uppercase;
  }

  .sg-cart-table td:first-child {
    display: flex;
    justify-content: flex-start;
    padding-bottom: .2rem;
  }

  .sg-cart-table td:first-child::before {
    display: none;
  }

  .sg-cart-table td:last-child {
    border-bottom: 0;
  }

  .sg-cart-table td:last-child .sg-btn {
    width: 100%;
    justify-content: center;
  }

  .sg-cart-table__img {
    width: 72px;
    height: 72px;
  }
}

/* ============================================================
   V8.0 Additions
   ============================================================ */

/* 1. Sub-navigation bar (below header) */
/* 5. Category tree sidebar */
.sg-cat-tree { font-size: .78rem; }
.sg-cat-tree__section { margin-bottom: .8rem; }
.sg-cat-tree__title { font-weight: 700; color: var(--ink); padding: .3rem 0; border-bottom: 2px solid var(--accent); margin-bottom: .3rem; display: flex; align-items: center; gap: .3rem; }
.sg-cat-tree__list { list-style: none; padding-left: .5rem; }
.sg-cat-tree__list li { padding: .2rem 0; }
.sg-cat-tree__list li a { color: var(--muted); font-size: .72rem; }
.sg-cat-tree__list li a:hover { color: var(--accent); }
.sg-cat-tree__flag { margin-right: .3rem; }
.sg-cat-tree__expand { cursor: pointer; font-size: .65rem; color: var(--muted); margin-right: .2rem; }

/* 6. Hot teams quick bar */
.sg-hot-teams { display: flex; gap: .4rem; flex-wrap: wrap; margin: .5rem 0 1rem; }
.sg-hot-team { display: inline-flex; align-items: center; gap: .25rem; padding: .25rem .5rem; background: var(--bg2); border: 1px solid var(--rule); border-radius: var(--radius); font-size: .68rem; color: var(--ink); text-decoration: none; }
.sg-hot-team:hover { border-color: var(--accent); text-decoration: none; }

/* 8. Size selector: active state */
.sg-size-option.sg-size-option--active { background: var(--accent); color: #fff; border-color: var(--accent); font-weight: 600; }

/* 9. Cart page fixes */
.sg-cart-table__img { width: 60px; height: 60px; object-fit: cover; border-radius: 4px; }
.sg-cart-qty { display: inline-grid; grid-template-columns: 32px 58px 32px; align-items: center; border: 1px solid var(--rule); border-radius: 4px; overflow: hidden; background: #fff; }
.sg-cart-qty__btn { width: 32px; height: 32px; border: 0; background: var(--bg2); color: var(--ink); font-size: .9rem; font-weight: 700; cursor: pointer; }
.sg-cart-qty__btn:hover { background: #dcfce7; color: var(--accent); }
.sg-cart-qty__input { width: 58px; height: 32px; border: 0; border-left: 1px solid var(--rule); border-right: 1px solid var(--rule); text-align: center; font-size: .78rem; font-weight: 700; color: var(--ink); }
.sg-cart-qty__input:focus { outline: 2px solid rgba(22, 163, 74, .25); outline-offset: -2px; }
.sg-cart-qty--loading { opacity: .62; pointer-events: none; }
.sg-cart-notice { background: #fffbeb; border: 1px solid #fcd34d; border-radius: var(--radius); padding: .8rem; font-size: .72rem; color: #92400e; margin-bottom: 1rem; }
.sg-cart-agreement { display: flex; align-items: flex-start; gap: .4rem; font-size: .72rem; margin: 1rem 0; }
.sg-cart-agreement input { margin-top: .15rem; }
.sg-cart-extra { background: var(--bg2); border: 1px solid var(--rule); border-radius: var(--radius); padding: .8rem; margin-bottom: 1rem; }
.sg-cart-extra__field { margin-bottom: .5rem; }
.sg-cart-extra__field label { display: block; font-size: .72rem; font-weight: 600; margin-bottom: .2rem; }
.sg-cart-extra__field input, .sg-cart-extra__field textarea { width: 100%; padding: .35rem .5rem; border: 1px solid var(--rule); border-radius: var(--radius); font-size: .72rem; }

/* Get Discount page */
.sg-discount-page {
  max-width: var(--page-w);
  margin: 0 auto;
  padding: .75rem 1rem 1rem;
  display: grid;
  grid-template-columns: minmax(280px, .82fr) minmax(0, 1.18fr);
  gap: .8rem;
  align-items: start;
}
.sg-discount-hero {
  display: grid;
  grid-template-columns: 1fr;
  gap: .65rem;
  align-items: start;
}
.sg-discount-hero__eyebrow {
  margin: 0 0 .3rem;
  color: var(--accent);
  font-size: .72rem;
  font-weight: 700;
  text-transform: uppercase;
}
.sg-discount-hero__title {
  margin: 0 0 .35rem;
  color: var(--ink);
  font-size: 1.45rem;
  line-height: 1.15;
}
.sg-discount-hero__copy {
  margin: 0;
  color: var(--muted);
  font-size: .78rem;
  line-height: 1.5;
}
.sg-discount-hero__panel {
  border: 1px solid var(--rule);
  border-radius: var(--radius);
  background: var(--bg2);
  padding: .75rem;
  color: var(--ink);
  font-size: .74rem;
}
.sg-discount-hero__panel ul {
  margin: .45rem 0 0;
  padding-left: 1.1rem;
  color: var(--muted);
  line-height: 1.45;
}
.sg-discount-lead {
  margin-top: 0;
  display: grid;
  grid-template-columns: minmax(180px, .44fr) minmax(0, 1.56fr);
  gap: .75rem;
  align-items: start;
  border-top: 3px solid var(--accent);
  padding-top: .75rem;
}
.sg-discount-lead__intro h2 {
  margin: 0 0 .3rem;
  color: var(--ink);
  font-size: .92rem;
}
.sg-discount-lead__intro p {
  margin: 0;
  color: var(--muted);
  font-size: .72rem;
  line-height: 1.5;
}
.sg-discount-form {
  border: 1px solid var(--rule);
  border-radius: var(--radius);
  background: var(--bg2);
  padding: .75rem;
}
.sg-discount-form__grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: .5rem;
}
.sg-discount-form label {
  display: block;
  min-width: 0;
}
.sg-discount-form label span {
  display: block;
  margin-bottom: .22rem;
  color: var(--ink);
  font-size: .7rem;
  font-weight: 700;
}
.sg-discount-form input,
.sg-discount-form textarea {
  width: 100%;
  border: 1px solid var(--rule);
  border-radius: var(--radius);
  background: #fff;
  color: var(--ink);
  padding: .38rem .5rem;
  font-size: .72rem;
  line-height: 1.32;
}
.sg-discount-form textarea {
  resize: vertical;
}
.sg-discount-form__message {
  margin-top: .5rem;
}
.sg-discount-form__hint {
  margin: .45rem 0 .55rem;
  color: var(--muted);
  font-size: .7rem;
  line-height: 1.4;
}
.sg-discount-form__result {
  min-height: 1rem;
  margin-top: .4rem;
  font-size: .74rem;
  line-height: 1.5;
}
.sg-discount-form__result--success {
  color: #047857;
  font-weight: 700;
}
.sg-discount-form__result--error {
  color: #b91c1c;
  font-weight: 700;
}
@media (max-width: 768px) {
  .sg-discount-page {
    display: block;
    padding: .75rem .8rem 1rem;
  }
  .sg-discount-hero {
    grid-template-columns: 1fr;
  }
  .sg-discount-hero__title {
    font-size: 1.3rem;
  }
  .sg-discount-lead {
    grid-template-columns: 1fr;
    margin-top: .85rem;
  }
  .sg-discount-form__grid {
    grid-template-columns: 1fr;
  }
}

/* 10. Mobile: hamburger menu */
.sg-mobile-menu { display: none; position: fixed; top: 0; left: 0; right: 0; bottom: 0; background: rgba(0,0,0,.5); z-index: 200; }
.sg-mobile-menu__panel { position: absolute; top: 0; left: 0; width: 280px; height: 100%; background: var(--bg2); padding: 1rem; overflow-y: auto; }
.sg-mobile-menu__close { position: absolute; top: .5rem; right: .5rem; font-size: 1.5rem; background: none; border: none; cursor: pointer; }
.sg-mobile-menu__title { font-weight: 700; font-size: .85rem; margin-bottom: .5rem; padding-bottom: .3rem; border-bottom: 2px solid var(--accent); }
.sg-mobile-menu__list { list-style: none; }
.sg-mobile-menu__list li { padding: .4rem 0; border-bottom: 1px solid var(--rule); }
.sg-mobile-menu__list li a { color: var(--ink); font-size: .78rem; text-decoration: none; }
.sg-hamburger { display: none; background: none; border: none; color: #fff; font-size: 1.2rem; cursor: pointer; }
@media (max-width: 768px) {
  .sg-hamburger { display: block; }
  .sg-nav { display: none; }
  .sg-header {
    padding: .4rem 0;
  }
  .sg-header__inner {
    height: auto;
    flex-wrap: wrap;
    align-items: center;
  }
  .sg-logo {
    flex: 1 1 auto;
  }
  .sg-header-search {
    order: 3;
    flex: 1 1 100%;
    min-width: 100%;
  }
  .sg-nav__discount {
    order: 2;
  }
  .sg-header-actions {
    order: 2;
    gap: .45rem;
  }
  .sg-header-actions__account {
    display: none !important;
  }
  .sg-mobile-front-actions {
    position: sticky;
    top: 0;
    z-index: 999;
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    background: var(--bg);
    border-bottom: 1px solid var(--rule);
  }
  .sg-mobile-front-actions a {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 38px;
    color: var(--ink);
    font-size: .72rem;
    font-weight: 700;
    text-decoration: none;
  }
  .sg-mobile-front-actions a:first-child {
    color: #fff;
    background: var(--accent2);
  }
  .sg-product-grid--4cols { grid-template-columns: repeat(2, 1fr); }
  .sg-grid--4 { grid-template-columns: repeat(2, 1fr); }
  .sg-grid--6 { grid-template-columns: repeat(2, 1fr); }
}

/* 11. Flag quick bar (mobile) */
.sg-flag-bar { display: none; gap: .4rem; overflow-x: auto; padding: .5rem 1rem; background: var(--bg2); border-bottom: 1px solid var(--rule); white-space: nowrap; }
.sg-flag-bar::-webkit-scrollbar { display: none; }
.sg-flag-bar__item { display: inline-flex; align-items: center; gap: .2rem; padding: .25rem .5rem; border: 1px solid var(--rule); border-radius: var(--radius); font-size: .65rem; text-decoration: none; color: var(--ink); }
@media (max-width: 768px) { .sg-flag-bar { display: flex; } }

/* ── Sub-tabs bar ────────────────────────────────────── */
.sg-sub-tabs { display: flex; gap: .35rem; flex-wrap: wrap; margin-bottom: .8rem; padding: .4rem 0; border-bottom: 1px solid var(--rule); }
.sg-sub-tab { display: inline-flex; align-items: center; gap: .2rem; padding: .3rem .65rem; border-radius: 20px; background: var(--bg2); border: 1px solid var(--rule); color: var(--ink); font-size: .72rem; font-weight: 500; text-decoration: none; transition: all .2s; }
.sg-sub-tab:hover { border-color: var(--accent); background: var(--bg); text-decoration: none; }
.sg-sub-tab--active { background: var(--ink); color: #fff; border-color: var(--ink); font-weight: 600; }
.sg-sub-tab__count { font-size: .65rem; opacity: .7; }
.sg-sub-tab--active .sg-sub-tab__count { opacity: .8; }

@media (max-width: 768px) {
  .sg-sub-tabs {
    flex-wrap: nowrap;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    padding-bottom: .55rem;
  }
  .sg-sub-tabs::-webkit-scrollbar { display: none; }
  .sg-sub-tab {
    flex: 0 0 auto;
    white-space: nowrap;
  }
  .sg-sidebar-block--categories {
    display: none;
  }
}

/* ── Category tree enhancements ───────────────────────── */
.sg-cat-tree__current { font-weight: 700; color: var(--accent) !important; }
.sg-cat-tree__toggle { cursor: pointer; user-select: none; }
.sg-cat-tree__toggle:hover { opacity: .8; }
.sg-cat-tree__list li.sg-sidebar-item--active a { color: var(--accent); font-weight: 700; }

/* ── Sidebar item with count ─────────────────────────── */
.sg-sidebar-item__count { font-size: .6rem; color: var(--muted); }
.sg-sidebar-block__body { padding: .5rem .3rem; }
.sg-sidebar-block__header { font-weight: 700; font-size: .72rem; padding: .4rem .3rem; border-bottom: 1px solid var(--rule); text-transform: uppercase; letter-spacing: .02em; }

/* ── Product card placeholder ────────────────────────── */
.sg-card__thumb { width: 100%; height: 140px; display: flex; align-items: center; justify-content: center; background: var(--rule); color: var(--muted); }

/* ── Carousel dots ───────────────────────────────────── */
.sg-carousel__dots { display: flex; justify-content: center; gap: .35rem; margin-top: .3rem; }
.sg-carousel__dot { width: 8px; height: 8px; border-radius: 50%; background: var(--rule); border: none; cursor: pointer; transition: all .2s; }
.sg-carousel__dot--active { background: var(--accent); width: 20px; border-radius: 4px; }
.sg-carousel__slide img { width: 100%; height: 300px; object-fit: cover; }
@media (max-width: 768px) { .sg-carousel__slide img { height: 200px; } }

/* ── Language bar on homepage ───────────────────────── */
.sg-home__language { padding: .55rem 1rem .65rem; border-bottom: 1px solid var(--rule); background: var(--bg); }
.sg-lang-bar { display: flex; gap: .35rem; flex-wrap: wrap; justify-content: center; margin: 0; }
.sg-lang-bar__btn { display: inline-flex; align-items: center; gap: .2rem; padding: .2rem .5rem; border-radius: var(--radius); background: var(--bg2); border: 1px solid var(--rule); font-size: .68rem; cursor: pointer; color: var(--ink); text-decoration: none; transition: all .15s; }
.sg-lang-bar__btn:hover { border-color: var(--accent); text-decoration: none; }
.sg-lang-bar__btn--active { background: var(--accent); color: #fff; border-color: var(--accent); font-weight: 600; }
@media (max-width: 768px) {
  .sg-home__language { padding: .45rem .75rem .5rem; }
  .sg-lang-bar {
    justify-content: flex-start;
    flex-wrap: nowrap;
    overflow-x: auto;
    white-space: nowrap;
    -webkit-overflow-scrolling: touch;
  }
  .sg-lang-bar::-webkit-scrollbar { display: none; }
  .sg-lang-bar__btn { flex: 0 0 auto; }
}

/* ── Hot teams: show count ──────────────────────────── */
.sg-hot-team__count { font-size: .6rem; color: var(--muted); }

/* 12. Banner: product carousel style (left large + right list) */
.sg-hero-split { display: grid; grid-template-columns: 65% 35%; gap: .8rem; margin-bottom: 1rem; }
@media (max-width: 768px) { .sg-hero-split { grid-template-columns: 1fr; } }
.sg-hero-main { position: relative; border-radius: var(--radius); overflow: hidden; }
.sg-hero-main img { width: 100%; height: 320px; object-fit: cover; }
.sg-hero-side { display: flex; flex-direction: column; gap: .5rem; }
.sg-hero-side__item { display: flex; align-items: center; gap: .4rem; padding: .5rem; background: var(--bg2); border: 1px solid var(--rule); border-radius: var(--radius); font-size: .72rem; }
.sg-hero-side__item img { width: 50px; height: 50px; object-fit: cover; border-radius: 4px; }
.sg-hero-badge { display: inline-block; font-size: .55rem; padding: .1rem .3rem; border-radius: 3px; font-weight: 600; }
.sg-hero-badge--hot { background: #fee2e2; color: #dc2626; }
.sg-hero-badge--new { background: #dcfce7; color: #16a34a; }

/* ── Print ──────────────────────────────────────────────── */
@media print {
  .sg-header, .sg-footer, .sg-mobile-nav,
  .sg-carousel__btns, .sg-header-actions {
    display: none !important;
  }
}

/* ════════════════════════════════════════════════════════════
   Sprint 8 — P2 UI Polish
   ════════════════════════════════════════════════════════════ */

/* 8.2.1: Product card height consistency */
.sg-card { display: flex; flex-direction: column; height: 100%; min-height: 260px; }
.sg-card__body { flex: 1; display: flex; flex-direction: column; padding: .4rem; }
.sg-card__title { font-size: .9375rem; line-height: 1.35; min-height: 4.05em; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.sg-card__price { margin-top: auto; }
.sg-card__meta { font-size: .6rem; }
.sg-card__badges { display: flex; gap: .15rem; flex-wrap: wrap; margin: .15rem 0; }
.sg-card__badge { font-size: .5rem; padding: .05rem .25rem; border-radius: 3px; background: var(--bg2); border: 1px solid var(--rule); }
.sg-card__badge--new { background: #e63946; border-color: #e63946; color: #fff; }

/* 8.2.2: Breadcrumb refinements */
.sg-breadcrumbs { display: flex; flex-wrap: wrap; gap: .25rem; align-items: center; padding: .5rem 0; margin-bottom: .5rem; font-size: .7rem; color: var(--muted); border-bottom: 1px solid var(--rule); }
.sg-breadcrumbs a { color: var(--accent); text-decoration: none; }
.sg-breadcrumbs a:hover { text-decoration: underline; }
.sg-breadcrumbs span { color: var(--ink); font-weight: 500; }

/* 8.2.3: Size chart tab styling */
.sg-size-chart { width: 100%; border-collapse: collapse; margin: .5rem 0; font-size: .7rem; }
.sg-size-chart th, .sg-size-chart td { border: 1px solid var(--rule); padding: .35rem .5rem; text-align: center; }
.sg-size-chart th { background: var(--bg2); font-weight: 600; text-transform: uppercase; letter-spacing: .02em; font-size: .65rem; }
.sg-size-chart tr:hover td { background: rgba(0,0,0,.02); }
.sg-tabs__panel { border: 1px solid var(--rule); border-top: none; padding: .6rem; border-radius: 0 0 var(--radius) var(--radius); }

/* 8.2.4: Cart empty state */
.sg-cart-empty { text-align: center; padding: 2rem 1rem; }
.sg-cart-empty__icon { font-size: 2.5rem; margin-bottom: .5rem; opacity: .3; }
.sg-cart-empty__text { font-size: .85rem; color: var(--muted); margin-bottom: 1rem; }
.sg-cart-empty__btn { display: inline-flex; align-items: center; gap: .3rem; padding: .4rem 1rem; border-radius: var(--radius); background: var(--accent); color: #fff; font-size: .75rem; font-weight: 600; text-decoration: none; transition: all .15s; }
.sg-cart-empty__btn:hover { opacity: .85; text-decoration: none; color: #fff; }

/* 8.2.5: Search box focus & accessibility */
.sg-search-form input:focus { outline: 2px solid var(--accent); outline-offset: 1px; box-shadow: 0 0 0 3px rgba(var(--accent-rgb, 37,99,235), .15); }
.sg-search-form input { transition: all .15s; }

/* ════════════════════════════════════════════════════════════
   Wireframe Alignment Fixes — Hero / Team / Product / Cart
   ════════════════════════════════════════════════════════════ */

/* ── Hero Promotional Slides ──────────────────────────── */
.sg-hero-promo {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 300px;
  padding: 2rem;
  text-align: center;
  color: #fff;
  background-color: #14532d;
  background-image: linear-gradient(90deg, rgba(5, 46, 22, .9), rgba(22, 101, 52, .72), rgba(250, 204, 21, .22)), var(--sg-hero-image);
  background-size: cover;
  background-position: center;
}
.sg-hero-promo--slide2 { background-image: linear-gradient(90deg, rgba(6, 78, 59, .9), rgba(5, 150, 105, .7), rgba(14, 165, 233, .26)), var(--sg-hero-image); }
.sg-hero-promo__content { width: min(760px, 100%); }
.sg-hero-promo__proof { display: flex; justify-content: center; gap: .35rem; flex-wrap: wrap; margin-bottom: .55rem; }
.sg-hero-promo__proof span { border: 1px solid rgba(255,255,255,.32); background: rgba(15,23,42,.34); border-radius: 999px; padding: .18rem .55rem; font-size: .62rem; font-weight: 700; }
.sg-hero-promo__title { color: #fff; font-size: 1.55rem; font-weight: 800; margin-bottom: .4rem; text-shadow: 0 2px 12px rgba(15,23,42,.4); }
.sg-hero-promo__subtitle { font-size: .82rem; opacity: .95; margin: 0 auto .8rem; max-width: 620px; text-shadow: 0 1px 8px rgba(15,23,42,.45); }
.sg-hero-promo__contact { display: flex; align-items: center; justify-content: center; gap: .3rem; margin-bottom: .8rem; font-size: .8rem; }
.sg-hero-promo__whatsapp { color: #86efac; font-weight: 600; text-decoration: none; }
.sg-hero-promo__whatsapp:hover { text-decoration: underline; }
.sg-hero-promo__cta { font-size: .75rem; padding: .4rem 1rem; box-shadow: 0 8px 20px rgba(15,23,42,.18); }
.sg-hero-promo__stats { display: flex; gap: 1rem; justify-content: center; flex-wrap: wrap; }
.sg-hero-promo__stat { text-align: center; }
.sg-hero-promo__stat-num { display: block; font-size: 1.3rem; font-weight: 700; }
.sg-hero-promo__stat-label { font-size: .65rem; opacity: .85; text-transform: uppercase; letter-spacing: .05em; }
@media (max-width: 768px) {
  .sg-hero-promo { height: 220px; padding: 1rem; }
  .sg-hero-promo__title { font-size: 1rem; }
  .sg-hero-promo__stats { gap: .6rem; }
  .sg-hero-promo__stat-num { font-size: 1rem; }
  .sg-hero-promo__proof span { font-size: .56rem; padding: .14rem .42rem; }
  .sg-home__hero .sg-carousel__btns { display: none; }
}

/* ── Team Header ──────────────────────────────────────── */
.sg-team-header { display: flex; align-items: center; gap: .8rem; padding: .8rem 1rem; background: var(--bg2); border: 1px solid var(--rule); border-radius: var(--radius); margin-bottom: .8rem; }
.sg-team-header__emoji { font-size: 2rem; line-height: 1; }
.sg-team-header__info { flex: 1; }
.sg-team-header__name { font-size: 1.1rem; font-weight: 700; margin: 0; line-height: 1.3; }
.sg-team-header__league { font-size: .7rem; color: var(--muted); }
.sg-team-header__count { font-size: 1rem; font-weight: 700; color: var(--accent); text-align: right; }
.sg-team-header__count span { display: block; font-size: .6rem; font-weight: 400; color: var(--muted); }

/* ── Style Filter Tabs ────────────────────────────────── */
.sg-style-tabs { display: flex; gap: .3rem; flex-wrap: wrap; margin-bottom: .6rem; padding: .4rem 0; border-bottom: 1px solid var(--rule); }
.sg-style-tab { display: inline-flex; align-items: center; gap: .2rem; padding: .25rem .55rem; border-radius: 16px; background: var(--bg2); border: 1px solid var(--rule); color: var(--ink); font-size: .68rem; font-weight: 500; text-decoration: none; transition: all .15s; }
.sg-style-tab:hover { border-color: var(--accent); text-decoration: none; }
.sg-style-tab--active { background: var(--ink); color: #fff; border-color: var(--ink); }
.sg-style-tab__count { font-size: .6rem; opacity: .7; }
.sg-style-tab--active .sg-style-tab__count { opacity: .85; }

/* ── Sort bar product count ───────────────────────────── */
.sg-sort__count { font-size: .72rem; color: var(--muted); margin-right: auto; }
.sg-sort { display: flex; align-items: center; gap: .4rem; }

/* ── Cart colored tags ────────────────────────────────── */
.sg-cart-tag { display: inline-block; font-size: .6rem; padding: .1rem .35rem; border-radius: 3px; font-weight: 500; margin: .05rem; }
.sg-cart-tag--print { background: #dcfce7; color: #166534; border: 1px solid #bbf7d0; }
.sg-cart-tag--patch { background: #dbeafe; color: #1e40af; border: 1px solid #bfdbfe; }
.sg-cart-tag--none { background: var(--bg2); color: var(--muted); border: 1px solid var(--rule); }

/* ── Cart summary sub-row ─────────────────────────────── */
.sg-cart-summary__row--sub { font-size: .68rem; color: var(--muted); padding-left: .5rem; }
.sg-cart-summary__row--sub span { width: 100%; }

/* ── Accent2 button (Generate PI) ─────────────────────── */
.sg-btn--accent2 { background: #dc2626; color: #fff; border-color: #dc2626; }
.sg-btn--accent2:hover { background: #b91c1c; border-color: #b91c1c; }

/* ── Patch toggle buttons (multi-select) ──────────────── */
.sg-patch-toggles { display: flex; gap: .3rem; flex-wrap: wrap; }
.sg-patch-toggle { cursor: pointer; }
.sg-patch-toggle input { position: absolute; opacity: 0; width: 0; height: 0; }
.sg-patch-toggle__btn { display: inline-block; padding: .25rem .55rem; border-radius: 16px; background: var(--bg2); border: 1px solid var(--rule); font-size: .68rem; font-weight: 500; color: var(--ink); transition: all .15s; }
.sg-patch-toggle input:checked + .sg-patch-toggle__btn { background: var(--accent); color: #fff; border-color: var(--accent); }
.sg-patch-toggle__btn:hover { border-color: var(--accent); }

/* ── Yupoo source box ─────────────────────────────────── */
.sg-product-info__yupoo { background: var(--bg2); border: 1px solid var(--rule); border-radius: var(--radius); padding: .4rem .6rem; margin: .4rem 0; font-size: .72rem; }
.sg-product-info__yupoo-label { color: var(--muted); font-weight: 500; }
.sg-product-info__yupoo-title { color: var(--ink); font-weight: 600; }

/* ── Product source info ──────────────────────────────── */
.sg-product-info__source { display: flex; gap: 1rem; flex-wrap: wrap; font-size: .68rem; color: var(--muted); margin-top: .6rem; padding-top: .4rem; border-top: 1px solid var(--rule); }
.sg-product-info__source-item a { color: var(--accent); }

/* ── National teams flat list (no toggle) ─────────────── */
.sg-cat-tree__section--flat .sg-cat-tree__title { font-weight: 600; padding: .3rem 0; }
.sg-cat-tree__section--flat .sg-cat-tree__list { display: block !important; }

/* Mobile visual evidence fixes */
html,
body {
  max-width: 100%;
  overflow-x: hidden;
}

.sg-carousel__slides,
.sg-hero-promo,
.sg-hero-promo__content,
.sg-cart-empty,
.sg-cart-empty__text {
  min-width: 0;
  max-width: 100%;
}

.sg-carousel__slide {
  flex: 0 0 100%;
  min-width: 100%;
  max-width: 100%;
}

.sg-hero-promo__title,
.sg-hero-promo__subtitle,
.sg-hero-promo__contact,
.sg-cart-empty__text {
  overflow-wrap: anywhere;
  word-break: normal;
}

@media (max-width: 768px) {
  .sg-main {
    width: 100%;
    max-width: 100%;
    overflow-x: hidden;
  }

  .sg-home {
    width: 100%;
    max-width: 100%;
    min-width: 0;
    overflow-x: hidden;
  }

  .sg-home__hero,
  .sg-home__language,
  .sg-home__categories,
  .sg-home__new-arrivals {
    width: 100%;
    max-width: 100%;
    min-width: 0;
    overflow: hidden;
  }

  .sg-home__language,
  .sg-flag-bar,
  .sg-lang-bar {
    min-width: 0;
    max-width: 100%;
  }

  .sg-home__language,
  .sg-flag-bar {
    overflow-x: hidden;
  }

  .sg-lang-bar {
    width: 100%;
    overflow-x: auto;
  }

  .sg-carousel {
    width: 100%;
    max-width: 100%;
    overflow: hidden;
  }

  .sg-carousel__slides {
    width: 100%;
  }

  .sg-carousel__slide {
    flex: 0 0 100%;
    max-width: 100%;
  }

  .sg-hero-promo {
    min-height: 220px;
    height: auto;
    padding: 1.2rem 1.6rem;
  }

  .sg-hero-promo__content {
    width: 100%;
  }

  .sg-hero-promo__title {
    font-size: .98rem;
    line-height: 1.25;
    max-width: 260px;
    margin-left: auto;
    margin-right: auto;
    white-space: normal;
  }

  .sg-hero-promo__subtitle,
  .sg-hero-promo__contact {
    font-size: .72rem;
    line-height: 1.35;
    max-width: 280px;
    margin-left: auto;
    margin-right: auto;
    white-space: normal;
  }

  .sg-grid--4,
  .sg-grid--6,
  .sg-grid--8,
  .sg-product-grid--4cols,
  .sg-product-grid--6cols,
  .sg-product-grid--category {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .sg-cat-card,
  .sg-card {
    min-width: 0;
  }

  .sg-cart-empty {
    padding: 2rem .75rem;
  }

  .sg-cart-empty__text {
    max-width: 320px;
    margin-left: auto;
    margin-right: auto;
    white-space: normal;
    line-height: 1.55;
  }
}

@media (max-width: 600px) {
  .sg-header__inner {
    width: 100%;
    max-width: 375px;
    margin-left: 0;
    margin-right: auto;
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: .45rem;
  }

  .sg-logo {
    min-width: 0;
  }

  .sg-header-actions {
    justify-content: flex-end;
  }

  .sg-header-search {
    grid-column: 1 / -1;
    width: 100%;
    min-width: 0;
  }

  .sg-main {
    padding-left: .5rem;
    padding-right: .5rem;
  }

  .sg-home__hero,
  .sg-carousel,
  .sg-carousel__slides,
  .sg-carousel__slide,
  .sg-hero-promo {
    width: 100%;
    max-width: 100%;
    min-width: 0;
  }

  .sg-hero-promo {
    min-height: 288px;
    padding: 1rem .75rem;
    background-position: center;
    justify-content: flex-start;
  }

  .sg-hero-promo__content {
    width: min(100%, 340px);
    max-width: 340px;
    min-width: 0;
    margin-left: 0;
    margin-right: auto;
  }

  .sg-hero-promo__proof {
    gap: .22rem;
    margin-bottom: .45rem;
  }

  .sg-hero-promo__proof span {
    max-width: 46%;
    padding: .12rem .34rem;
    font-size: .5rem;
    line-height: 1.2;
    white-space: normal;
  }

  .sg-hero-promo__title {
    max-width: 100%;
    font-size: .92rem;
    line-height: 1.2;
  }

  .sg-hero-promo__subtitle {
    max-width: 100%;
    font-size: .68rem;
    line-height: 1.28;
  }

  .sg-home__categories .sg-grid--4 {
    grid-template-columns: 1fr;
    gap: .5rem;
  }

  .sg-home__categories .sg-cat-card {
    width: 100%;
    padding: 1rem .5rem;
  }

  .sg-mobile-nav__list {
    grid-template-columns: repeat(5, minmax(0, 1fr));
    width: 100%;
    max-width: 375px;
    margin-left: 0;
    margin-right: auto;
  }
}
