/* ================================================================
   まるいち CYCLING & SPORTS EC - メインスタイルシート
   ================================================================ */

/* === CSS Variables === */
:root {
  /* Brand Colors */
  --clr-header:     #0d0d0d;
  --clr-nav:        #1a0000;
  --clr-nav-hover:  #2d0000;
  --clr-accent:     #d62828;
  --clr-accent-h:   #a4161a;
  --clr-accent-lt:  #ff6b6b;
  --clr-text:       #111111;
  --clr-text-sub:   #555555;
  --clr-text-lt:    #888888;
  --clr-bg:         #f4f4f4;
  --clr-white:      #ffffff;
  --clr-border:     #e0e0e0;
  --clr-star:       #f0a500;
  --clr-star-empty: #d0d0d0;
  --clr-success:    #166534;
  --clr-danger:     #d62828;
  --clr-card:       #ffffff;
  --clr-link:       #d62828;
  --clr-link-h:     #a4161a;
  --clr-badge-bs:   #d62828;
  --clr-badge-new:  #166534;

  /* Typography */
  --font: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
  --fs-xs:   11px;
  --fs-sm:   12px;
  --fs-base: 14px;
  --fs-md:   15px;
  --fs-lg:   18px;
  --fs-xl:   22px;
  --fs-2xl:  28px;

  /* Spacing */
  --sp-xs:  4px;
  --sp-sm:  8px;
  --sp-md:  12px;
  --sp-lg:  16px;
  --sp-xl:  24px;
  --sp-2xl: 32px;
  --sp-3xl: 48px;

  /* Border radius */
  --r:    6px;
  --r-md: 12px;
  --r-lg: 20px;

  /* Shadows */
  --shadow-sm:     0 1px 4px rgba(0,0,0,.10);
  --shadow:        0 4px 14px rgba(0,0,0,.12);
  --shadow-lg:     0 8px 30px rgba(0,0,0,.20);
  --shadow-card:   0 2px 12px rgba(0,0,0,.08);
  --shadow-card-h: 0 12px 36px rgba(0,0,0,.18);
  --shadow-red:    0 4px 20px rgba(214,40,40,.35);

  /* Transitions */
  --tr:      .18s ease;
  --tr-slow: .32s ease;

  /* Layout */
  --container: 1440px;
  --sidebar-w: 220px;
}

/* === Reset & Base === */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  font-size: var(--fs-base);
  scroll-behavior: smooth;
}

body {
  font-family: var(--font);
  color: var(--clr-text);
  background: var(--clr-bg);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

a {
  color: var(--clr-link);
  text-decoration: none;
}

a:hover { color: var(--clr-link-h); }

img {
  display: block;
  max-width: 100%;
}

ul { list-style: none; }

/* === Layout === */
.container {
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 var(--sp-lg);
}

.page-wrapper {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

.main-content {
  flex: 1;
  padding: var(--sp-lg) 0 var(--sp-3xl);
}

/* === Buttons === */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--sp-xs);
  padding: 10px var(--sp-lg);
  border: 1px solid transparent;
  border-radius: var(--r);
  font-family: var(--font);
  font-size: var(--fs-base);
  font-weight: 700;
  cursor: pointer;
  transition: background var(--tr), border-color var(--tr), box-shadow var(--tr), transform var(--tr);
  white-space: nowrap;
  text-decoration: none;
  letter-spacing: .3px;
}

.btn:active { transform: translateY(1px); }

.btn-primary {
  background: linear-gradient(135deg, #e63030 0%, var(--clr-accent) 50%, var(--clr-accent-h) 100%);
  border-color: var(--clr-accent-h);
  color: var(--clr-white);
}

.btn-primary:hover {
  background: linear-gradient(135deg, #c02020 0%, var(--clr-accent-h) 100%);
  box-shadow: var(--shadow-red);
  color: var(--clr-white);
  transform: translateY(-1px);
}

.btn-secondary {
  background: var(--clr-white);
  border-color: #cccccc;
  color: var(--clr-text);
}

.btn-secondary:hover {
  background: #f5f5f5;
  border-color: #aaaaaa;
  color: var(--clr-text);
}

.btn-outline-red {
  background: transparent;
  border-color: var(--clr-accent);
  color: var(--clr-accent);
}

.btn-outline-red:hover {
  background: var(--clr-accent);
  color: var(--clr-white);
}

/* backward compat alias */
.btn-orange {
  background: var(--clr-accent);
  border-color: var(--clr-accent-h);
  color: var(--clr-white);
}

.btn-orange:hover {
  background: var(--clr-accent-h);
  box-shadow: var(--shadow-red);
  color: var(--clr-white);
}

.btn-block {
  display: flex;
  width: 100%;
}

.btn-lg {
  padding: 12px var(--sp-xl);
  font-size: var(--fs-md);
}

.btn-sm {
  padding: 5px var(--sp-sm);
  font-size: var(--fs-sm);
}

/* === Form Elements === */
.form-group {
  margin-bottom: var(--sp-lg);
}

.form-label {
  display: block;
  margin-bottom: var(--sp-xs);
  font-weight: 700;
  font-size: var(--fs-base);
  color: var(--clr-text);
}

.form-input {
  display: block;
  width: 100%;
  padding: var(--sp-sm) var(--sp-md);
  border: 1px solid #c0c0c0;
  border-radius: var(--r);
  font-family: var(--font);
  font-size: var(--fs-base);
  color: var(--clr-text);
  background: var(--clr-white);
  transition: border-color var(--tr), box-shadow var(--tr);
}

.form-input:focus {
  outline: none;
  border-color: var(--clr-accent);
  box-shadow: 0 0 0 3px rgba(214,40,40,.2);
}

/* === Header - Top Bar === */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
}

.header-top {
  background: var(--clr-header);
  padding: var(--sp-sm) 0;
  border-bottom: 2px solid var(--clr-accent);
}

.header-top .container {
  display: flex;
  align-items: center;
  gap: var(--sp-md);
}

/* Logo */
.header-logo {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  padding: var(--sp-xs) var(--sp-sm);
  border: 1px solid transparent;
  border-radius: var(--r);
  text-decoration: none;
  transition: border-color var(--tr);
  white-space: nowrap;
  flex-shrink: 0;
}

.header-logo:hover {
  border-color: rgba(255,255,255,.3);
}

.logo-text {
  font-size: 26px;
  font-weight: 800;
  color: var(--clr-white);
  letter-spacing: -1px;
  line-height: 1;
  text-transform: uppercase;
}

.logo-accent {
  color: var(--clr-accent);
}

.logo-tld {
  font-size: var(--fs-xs);
  color: rgba(255,255,255,.5);
  align-self: flex-end;
  margin-top: -1px;
  letter-spacing: .5px;
}

.logo-img {
  height: 40px;
  width: auto;
  filter: invert(1);
  display: block;
  flex-shrink: 0;
}

/* Deliver location */
.header-deliver {
  display: flex;
  align-items: center;
  gap: 3px;
  padding: var(--sp-xs) var(--sp-sm);
  border: 1px solid transparent;
  border-radius: var(--r);
  cursor: pointer;
  transition: border-color var(--tr);
  flex-shrink: 0;
}

.header-deliver:hover {
  border-color: rgba(255,255,255,.3);
}

.deliver-icon {
  font-size: 16px;
  color: var(--clr-white);
}

.deliver-text {
  display: flex;
  flex-direction: column;
}

.deliver-label {
  font-size: var(--fs-xs);
  color: rgba(255,255,255,.6);
  line-height: 1;
}

.deliver-value {
  font-size: var(--fs-sm);
  font-weight: 700;
  color: var(--clr-white);
  line-height: 1.3;
}

/* === Header - Search === */
.header-search {
  flex: 1;
  display: flex;
  height: 42px;
  border-radius: var(--r);
  overflow: hidden;
  max-width: 800px;
  box-shadow: 0 0 0 2px rgba(214,40,40,.4);
}

.search-category {
  background: #f0f0f0;
  border: none;
  border-radius: var(--r) 0 0 var(--r);
  padding: 0 var(--sp-sm);
  font-size: var(--fs-sm);
  color: var(--clr-text);
  cursor: pointer;
  min-width: 80px;
  border-right: 1px solid #d0d0d0;
  flex-shrink: 0;
}

.search-category:focus { outline: none; }

.search-input {
  flex: 1;
  border: none;
  padding: 0 var(--sp-md);
  font-size: var(--fs-base);
  color: var(--clr-text);
  min-width: 0;
}

.search-input:focus { outline: none; }

.search-btn {
  background: var(--clr-accent);
  border: none;
  padding: 0 var(--sp-lg);
  cursor: pointer;
  font-size: 18px;
  border-radius: 0 var(--r) var(--r) 0;
  transition: background var(--tr);
  flex-shrink: 0;
}

.search-btn:hover {
  background: var(--clr-accent-h);
}

/* === Header - Account & Cart === */
.header-actions {
  display: flex;
  align-items: center;
  gap: var(--sp-xs);
  flex-shrink: 0;
}

.header-link {
  display: flex;
  flex-direction: column;
  padding: var(--sp-xs) var(--sp-sm);
  border: 1px solid transparent;
  border-radius: var(--r);
  color: var(--clr-white);
  text-decoration: none;
  transition: border-color var(--tr);
  cursor: pointer;
}

.header-link:hover {
  border-color: rgba(255,255,255,.3);
  color: var(--clr-white);
}

.header-link-label {
  font-size: var(--fs-xs);
  color: rgba(255,255,255,.6);
  line-height: 1;
}

.header-link-main {
  font-size: var(--fs-sm);
  font-weight: 700;
  line-height: 1.3;
}

.header-cart {
  display: flex;
  align-items: center;
  gap: var(--sp-xs);
  padding: var(--sp-xs) var(--sp-sm);
  border: 1px solid transparent;
  border-radius: var(--r);
  color: var(--clr-white);
  text-decoration: none;
  transition: border-color var(--tr);
  position: relative;
}

.header-cart:hover {
  border-color: rgba(255,255,255,.3);
  color: var(--clr-white);
}

.cart-icon-wrap {
  position: relative;
  font-size: 28px;
  line-height: 1;
}

.cart-count {
  position: absolute;
  top: -4px;
  right: -6px;
  background: var(--clr-accent);
  color: var(--clr-white);
  font-size: var(--fs-xs);
  font-weight: 800;
  min-width: 18px;
  height: 18px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 3px;
  border: 2px solid var(--clr-header);
}

.cart-text {
  font-size: var(--fs-sm);
  font-weight: 700;
}

/* === Navigation Bar === */
.header-nav {
  background: var(--clr-nav);
  padding: 6px 0;
  overflow: hidden;
}

.nav-list {
  display: flex;
  align-items: center;
  gap: 0;
  overflow-x: auto;
  scrollbar-width: none;
}

.nav-list::-webkit-scrollbar { display: none; }

.nav-link {
  display: block;
  padding: 7px 12px;
  color: rgba(255,255,255,.88);
  font-size: var(--fs-base);
  font-weight: 500;
  white-space: nowrap;
  border: 1px solid transparent;
  border-radius: var(--r);
  transition: border-color var(--tr), background var(--tr), color var(--tr);
  text-decoration: none;
}

.nav-link:hover {
  border-color: rgba(255,255,255,.25);
  color: var(--clr-white);
}

.nav-link.active {
  font-weight: 700;
  color: var(--clr-white);
}

.nav-link-highlight {
  color: var(--clr-accent-lt);
  font-weight: 700;
}

.nav-link-highlight:hover {
  color: #ff8888;
}

/* === Section Components === */
.section {
  margin-bottom: var(--sp-lg);
}

.section-header {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  margin-bottom: var(--sp-md);
  padding: var(--sp-md) var(--sp-lg) 0;
}

.section-title {
  font-size: var(--fs-xl);
  font-weight: 800;
  color: var(--clr-text);
  letter-spacing: -.5px;
}

.section-more {
  font-size: var(--fs-base);
  color: var(--clr-link);
  font-weight: 600;
}

.section-more:hover {
  color: var(--clr-link-h);
  text-decoration: underline;
}

/* === Hero Banner === */
.hero-banner {
  position: relative;
  background: #0d0d0d url('../../pic/top.jpg') right center / cover no-repeat;
  min-height: 480px;
  display: flex;
  align-items: center;
  overflow: hidden;
  margin-bottom: var(--sp-lg);
}

.hero-banner::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(
    to right,
    rgba(0,0,0,0.94) 0%,
    rgba(0,0,0,0.84) 36%,
    rgba(0,0,0,0.52) 58%,
    rgba(0,0,0,0.08) 100%
  );
}

/* Diagonal slash decoration */
.hero-banner::after {
  content: '';
  position: absolute;
  top: -20%;
  right: 30%;
  width: 3px;
  height: 180%;
  background: linear-gradient(to bottom, transparent, rgba(214,40,40,.25), transparent);
  transform: rotate(20deg);
}

.hero-content {
  position: relative;
  z-index: 1;
  padding: var(--sp-3xl) var(--sp-3xl);
  max-width: 600px;
}

.hero-eyebrow {
  display: flex;
  align-items: center;
  gap: var(--sp-sm);
  margin-bottom: var(--sp-md);
}

.hero-badge {
  display: inline-block;
  background: var(--clr-accent);
  color: var(--clr-white);
  font-size: var(--fs-sm);
  font-weight: 800;
  padding: 4px 10px;
  border-radius: var(--r);
  text-transform: uppercase;
  letter-spacing: 1px;
}

.hero-badge-ghost {
  display: inline-block;
  border: 1px solid rgba(255,255,255,.25);
  color: rgba(255,255,255,.7);
  font-size: var(--fs-xs);
  font-weight: 600;
  padding: 4px 10px;
  border-radius: var(--r);
  text-transform: uppercase;
  letter-spacing: 1px;
}

.hero-title {
  font-size: 44px;
  font-weight: 800;
  color: var(--clr-white);
  line-height: 1.15;
  margin-bottom: var(--sp-md);
  letter-spacing: -1px;
}

.hero-title span {
  color: var(--clr-accent);
}

.hero-title em {
  font-style: normal;
  color: rgba(255,255,255,.55);
  font-size: 32px;
  font-weight: 700;
  display: block;
  margin-top: 4px;
}

.hero-desc {
  font-size: var(--fs-md);
  color: rgba(255,255,255,.72);
  margin-bottom: var(--sp-xl);
  line-height: 1.7;
}

.hero-actions {
  display: flex;
  gap: var(--sp-md);
  flex-wrap: wrap;
}

.btn-hero {
  background: var(--clr-accent);
  color: var(--clr-white);
  font-size: var(--fs-md);
  font-weight: 800;
  padding: 14px var(--sp-2xl);
  border-radius: var(--r);
  border: none;
  transition: background var(--tr), transform var(--tr), box-shadow var(--tr);
  text-transform: uppercase;
  letter-spacing: .5px;
}

.btn-hero:hover {
  background: var(--clr-accent-h);
  color: var(--clr-white);
  transform: translateY(-2px);
  box-shadow: var(--shadow-red);
}

.btn-hero-outline {
  background: transparent;
  color: var(--clr-white);
  font-size: var(--fs-md);
  font-weight: 700;
  padding: 13px var(--sp-2xl);
  border-radius: var(--r);
  border: 2px solid rgba(255,255,255,.35);
  transition: border-color var(--tr), background var(--tr), transform var(--tr);
}

.btn-hero-outline:hover {
  border-color: rgba(255,255,255,.7);
  background: rgba(255,255,255,.08);
  color: var(--clr-white);
  transform: translateY(-2px);
}

/* Hero stats bar */
.hero-stats {
  display: flex;
  gap: var(--sp-2xl);
  margin-top: var(--sp-2xl);
  padding-top: var(--sp-xl);
  border-top: 1px solid rgba(255,255,255,.12);
}

.hero-stat {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.hero-stat-value {
  font-size: var(--fs-xl);
  font-weight: 800;
  color: var(--clr-white);
  line-height: 1;
}

.hero-stat-label {
  font-size: var(--fs-xs);
  color: rgba(255,255,255,.5);
  text-transform: uppercase;
  letter-spacing: .5px;
}

.hero-decoration {
  position: absolute;
  right: 80px;
  top: 50%;
  transform: translateY(-50%);
  width: 360px;
  height: 360px;
  border: 1px solid rgba(214,40,40,.12);
  border-radius: 50%;
  opacity: 1;
}

.hero-decoration::before {
  content: '';
  position: absolute;
  inset: 20px;
  border: 1px solid rgba(214,40,40,.18);
  border-radius: 50%;
}

.hero-decoration::after {
  content: '';
  position: absolute;
  inset: 60px;
  background: radial-gradient(circle, rgba(214,40,40,.15) 0%, transparent 70%);
  border-radius: 50%;
}

/* === Category Grid === */
.category-grid-section {
  background: var(--clr-white);
  padding: var(--sp-xl);
  margin-bottom: var(--sp-lg);
  border-radius: var(--r-md);
  box-shadow: var(--shadow-sm);
}

.category-grid {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: var(--sp-md);
}

.category-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--sp-sm);
  padding: var(--sp-lg) var(--sp-md);
  border: 2px solid var(--clr-border);
  border-radius: var(--r-md);
  text-decoration: none;
  color: var(--clr-text);
  transition: border-color var(--tr), transform var(--tr), box-shadow var(--tr), background var(--tr);
  background: var(--clr-white);
  position: relative;
  overflow: hidden;
}

.category-card::before {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: var(--clr-accent);
  transform: scaleX(0);
  transition: transform var(--tr);
}

.category-card:hover {
  border-color: var(--clr-accent);
  transform: translateY(-3px);
  box-shadow: var(--shadow), 0 0 0 2px rgba(214,40,40,.08);
  color: var(--clr-text);
}

.category-card:hover::before {
  transform: scaleX(1);
}

.category-icon {
  font-size: 32px;
  line-height: 1;
}

.category-name {
  font-size: var(--fs-sm);
  font-weight: 700;
  text-align: center;
  color: var(--clr-text);
}

.category-count {
  font-size: var(--fs-xs);
  color: var(--clr-text-lt);
}

/* === Product Card === */
.product-card {
  background: var(--clr-card);
  border-radius: var(--r-md);
  overflow: hidden;
  box-shadow: var(--shadow-card);
  transition: transform var(--tr), box-shadow var(--tr);
  display: flex;
  flex-direction: column;
  border: 1px solid transparent;
}

.product-card:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow-card-h);
  border-color: rgba(214,40,40,.1);
}

.product-card-image {
  position: relative;
  background: #f8f8f8;
  overflow: hidden;
}

.product-card-image a {
  display: block;
}

.product-card-image img {
  width: 100%;
  aspect-ratio: 1 / 1;
  object-fit: contain;
  padding: var(--sp-md);
  transition: transform var(--tr-slow);
}

.product-card:hover .product-card-image img {
  transform: scale(1.05);
}

.product-badge {
  position: absolute;
  top: var(--sp-sm);
  left: var(--sp-sm);
  font-size: var(--fs-xs);
  font-weight: 800;
  padding: 3px 8px;
  border-radius: var(--r);
  pointer-events: none;
  text-transform: uppercase;
  letter-spacing: .5px;
}

.badge-bestseller {
  background: var(--clr-badge-bs);
  color: var(--clr-white);
}

.badge-new {
  background: var(--clr-badge-new);
  color: var(--clr-white);
}

.product-card-body {
  padding: var(--sp-md);
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: var(--sp-xs);
}

.product-card-title {
  font-size: var(--fs-base);
  font-weight: 500;
  color: var(--clr-text);
  line-height: 1.4;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  min-height: 2.8em;
}

.product-card-title:hover {
  color: var(--clr-link);
  text-decoration: underline;
}

.product-card-rating {
  display: flex;
  align-items: center;
  gap: var(--sp-xs);
}

.stars {
  color: var(--clr-star);
  font-size: var(--fs-md);
  letter-spacing: -1px;
}

.review-count {
  font-size: var(--fs-sm);
  color: var(--clr-text-lt);
}

.product-card-price {
  display: flex;
  align-items: baseline;
  gap: 2px;
  margin-top: auto;
}

.price-currency {
  font-size: var(--fs-sm);
  font-weight: 600;
  color: var(--clr-accent);
  vertical-align: top;
  margin-top: 3px;
}

.price-value {
  font-size: var(--fs-xl);
  font-weight: 700;
  color: var(--clr-accent);
}

.product-card-footer {
  padding: var(--sp-sm) var(--sp-md) var(--sp-md);
}

.add-to-cart-btn {
  width: 100%;
  font-size: var(--fs-sm);
  padding: 8px;
  font-weight: 700;
}

/* === Product Grid === */
.product-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: var(--sp-lg);
}

/* === Horizontal Scroll Section === */
.scroll-section {
  background: var(--clr-white);
  border-radius: var(--r-md);
  padding: var(--sp-lg) 0 var(--sp-xl);
  margin-bottom: var(--sp-lg);
  overflow: hidden;
}

.scroll-track {
  display: flex;
  gap: var(--sp-md);
  overflow-x: auto;
  padding: 0 var(--sp-lg) var(--sp-sm);
  scrollbar-width: thin;
  scrollbar-color: var(--clr-accent) transparent;
  scroll-snap-type: x mandatory;
}

.scroll-track::-webkit-scrollbar {
  height: 4px;
}

.scroll-track::-webkit-scrollbar-track {
  background: transparent;
}

.scroll-track::-webkit-scrollbar-thumb {
  background: var(--clr-accent);
  border-radius: 2px;
}

.scroll-track .product-card {
  min-width: 200px;
  width: 200px;
  flex-shrink: 0;
  scroll-snap-align: start;
}

/* === Products Page Layout === */
.products-layout {
  display: grid;
  grid-template-columns: var(--sidebar-w) 1fr;
  gap: var(--sp-xl);
  align-items: start;
}

/* === Filter Sidebar === */
.filter-sidebar {
  background: var(--clr-white);
  border-radius: var(--r-md);
  padding: var(--sp-lg);
  position: sticky;
  top: calc(52px + var(--sp-lg));
  box-shadow: var(--shadow-sm);
}

.filter-title {
  font-size: var(--fs-md);
  font-weight: 800;
  margin-bottom: var(--sp-md);
  padding-bottom: var(--sp-sm);
  border-bottom: 2px solid var(--clr-accent);
  color: var(--clr-text);
  text-transform: uppercase;
  letter-spacing: .5px;
}

.filter-group {
  margin-bottom: var(--sp-lg);
}

.filter-group-title {
  font-size: var(--fs-base);
  font-weight: 700;
  margin-bottom: var(--sp-sm);
  color: var(--clr-text);
}

.filter-list {
  display: flex;
  flex-direction: column;
  gap: var(--sp-xs);
}

.filter-item {
  display: flex;
  align-items: center;
  gap: var(--sp-sm);
}

.filter-item a {
  font-size: var(--fs-base);
  color: var(--clr-text-sub);
  transition: color var(--tr);
}

.filter-item a:hover,
.filter-item a.active {
  color: var(--clr-accent);
  font-weight: 700;
}

/* === Sort Bar === */
.sort-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: var(--clr-white);
  border-radius: var(--r-md);
  padding: var(--sp-md) var(--sp-lg);
  margin-bottom: var(--sp-md);
  box-shadow: var(--shadow-sm);
  border-left: 3px solid var(--clr-accent);
}

.sort-bar-left {
  font-size: var(--fs-base);
  color: var(--clr-text-sub);
}

.sort-bar-left strong {
  color: var(--clr-text);
  font-weight: 800;
}

.sort-select {
  padding: var(--sp-xs) var(--sp-sm);
  border: 1px solid var(--clr-border);
  border-radius: var(--r);
  font-size: var(--fs-base);
  color: var(--clr-text);
  background: var(--clr-white);
  cursor: pointer;
}

.sort-select:focus {
  outline: none;
  border-color: var(--clr-accent);
}

/* === Product Detail === */
.product-detail-layout {
  display: grid;
  grid-template-columns: 1fr 1.2fr 1fr;
  gap: var(--sp-xl);
  background: var(--clr-white);
  border-radius: var(--r-md);
  padding: var(--sp-2xl);
  box-shadow: var(--shadow-sm);
}

.product-detail-images {
  position: sticky;
  top: calc(52px + var(--sp-lg));
}

.product-main-image {
  border: 2px solid var(--clr-border);
  border-radius: var(--r-md);
  background: #f8f8f8;
  overflow: hidden;
  margin-bottom: var(--sp-md);
  transition: border-color var(--tr);
}

.product-main-image:hover {
  border-color: var(--clr-accent);
}

.product-main-image img {
  width: 100%;
  aspect-ratio: 1 / 1;
  object-fit: contain;
  padding: var(--sp-2xl);
}

.product-info {
  padding: 0 var(--sp-md);
}

.product-title {
  font-size: var(--fs-xl);
  font-weight: 700;
  color: var(--clr-text);
  line-height: 1.4;
  margin-bottom: var(--sp-sm);
}

.product-rating-row {
  display: flex;
  align-items: center;
  gap: var(--sp-md);
  margin-bottom: var(--sp-md);
  padding-bottom: var(--sp-md);
  border-bottom: 1px solid var(--clr-border);
}

.product-rating-row .stars {
  font-size: var(--fs-lg);
}

.product-rating-value {
  font-size: var(--fs-base);
  color: var(--clr-link);
}

.product-price-section {
  margin-bottom: var(--sp-lg);
  padding-bottom: var(--sp-lg);
  border-bottom: 1px solid var(--clr-border);
}

.product-price {
  display: flex;
  align-items: baseline;
  gap: 3px;
}

.product-price .price-currency {
  font-size: var(--fs-md);
  margin-top: 4px;
}

.product-price .price-value {
  font-size: 32px;
}

.product-tax-note {
  font-size: var(--fs-sm);
  color: var(--clr-text-sub);
  margin-top: 4px;
}

.product-description {
  font-size: var(--fs-base);
  line-height: 1.8;
  color: var(--clr-text);
  margin-bottom: var(--sp-lg);
}

.product-features {
  margin-bottom: var(--sp-lg);
}

.product-features li {
  font-size: var(--fs-base);
  padding: 5px 0;
  padding-left: var(--sp-lg);
  position: relative;
  color: var(--clr-text);
}

.product-features li::before {
  content: '▶';
  position: absolute;
  left: 0;
  color: var(--clr-accent);
  font-size: 9px;
  top: 7px;
}

.product-purchase-box {
  background: var(--clr-white);
  border: 2px solid var(--clr-border);
  border-radius: var(--r-md);
  padding: var(--sp-lg);
  position: sticky;
  top: calc(52px + var(--sp-lg));
  transition: border-color var(--tr);
}

.product-purchase-box:hover {
  border-color: rgba(214,40,40,.2);
}

.purchase-price {
  font-size: 28px;
  font-weight: 800;
  color: var(--clr-accent);
  margin-bottom: var(--sp-sm);
}

.purchase-price span {
  font-size: var(--fs-sm);
  vertical-align: top;
  margin-top: 6px;
  display: inline-block;
  font-weight: 600;
}

.purchase-stock {
  font-size: var(--fs-md);
  color: var(--clr-success);
  font-weight: 700;
  margin-bottom: var(--sp-md);
}

.qty-selector {
  display: flex;
  align-items: center;
  gap: var(--sp-sm);
  margin-bottom: var(--sp-md);
}

.qty-label {
  font-size: var(--fs-sm);
  font-weight: 700;
}

.qty-select {
  padding: var(--sp-xs) var(--sp-sm);
  border: 1px solid var(--clr-border);
  border-radius: var(--r);
  font-size: var(--fs-base);
}

.purchase-actions {
  display: flex;
  flex-direction: column;
  gap: var(--sp-sm);
}

/* === Reviews Section === */
.reviews-section {
  background: var(--clr-white);
  border-radius: var(--r-md);
  padding: var(--sp-2xl);
  box-shadow: var(--shadow-sm);
  margin-top: var(--sp-lg);
}

.reviews-title {
  font-size: var(--fs-xl);
  font-weight: 800;
  margin-bottom: var(--sp-xl);
  padding-bottom: var(--sp-md);
  border-bottom: 2px solid var(--clr-accent);
}

.reviews-summary {
  display: flex;
  align-items: center;
  gap: var(--sp-xl);
  margin-bottom: var(--sp-2xl);
  padding-bottom: var(--sp-xl);
  border-bottom: 1px solid var(--clr-border);
}

.rating-big {
  text-align: center;
}

.rating-big-score {
  font-size: 52px;
  font-weight: 800;
  color: var(--clr-text);
  line-height: 1;
}

.rating-big-stars {
  font-size: 22px;
  color: var(--clr-star);
}

.rating-big-count {
  font-size: var(--fs-sm);
  color: var(--clr-text-sub);
}

.review-bars {
  flex: 1;
}

.review-bar-row {
  display: flex;
  align-items: center;
  gap: var(--sp-sm);
  margin-bottom: var(--sp-xs);
}

.review-bar-label {
  font-size: var(--fs-sm);
  color: var(--clr-link);
  white-space: nowrap;
  min-width: 40px;
  text-align: right;
}

.review-bar-track {
  flex: 1;
  height: 16px;
  background: var(--clr-border);
  border-radius: var(--r);
  overflow: hidden;
}

.review-bar-fill {
  height: 100%;
  background: var(--clr-accent);
  border-radius: var(--r);
}

.review-bar-pct {
  font-size: var(--fs-xs);
  color: var(--clr-text-sub);
  min-width: 30px;
}

.review-list {
  display: flex;
  flex-direction: column;
  gap: var(--sp-xl);
}

.review-item {
  padding-bottom: var(--sp-xl);
  border-bottom: 1px solid var(--clr-border);
}

.review-item:last-child {
  border-bottom: none;
  padding-bottom: 0;
}

.review-header {
  display: flex;
  align-items: center;
  gap: var(--sp-md);
  margin-bottom: var(--sp-sm);
}

.review-avatar {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: var(--clr-accent);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--clr-white);
  font-weight: 800;
  font-size: var(--fs-md);
}

.review-author {
  font-size: var(--fs-base);
  font-weight: 700;
}

.review-meta {
  display: flex;
  align-items: center;
  gap: var(--sp-md);
  margin-bottom: var(--sp-sm);
}

.review-stars { color: var(--clr-star); }

.review-title {
  font-size: var(--fs-base);
  font-weight: 700;
}

.review-date {
  font-size: var(--fs-sm);
  color: var(--clr-text-sub);
}

.review-body {
  font-size: var(--fs-base);
  line-height: 1.7;
  color: var(--clr-text);
}

/* === Cart Page === */
.cart-layout {
  display: grid;
  grid-template-columns: 1fr 340px;
  gap: var(--sp-xl);
  align-items: start;
}

.cart-header {
  font-size: var(--fs-2xl);
  font-weight: 800;
  padding-bottom: var(--sp-lg);
  border-bottom: 2px solid var(--clr-accent);
  margin-bottom: var(--sp-lg);
}

.cart-items-container {
  background: var(--clr-white);
  border-radius: var(--r-md);
  padding: var(--sp-xl);
  box-shadow: var(--shadow-sm);
}

.cart-item {
  display: grid;
  grid-template-columns: 120px 1fr auto;
  gap: var(--sp-lg);
  padding: var(--sp-lg) 0;
  border-bottom: 1px solid var(--clr-border);
}

.cart-item:first-child { padding-top: 0; }
.cart-item:last-child { border-bottom: none; }

.cart-item-image img {
  width: 100%;
  aspect-ratio: 1/1;
  object-fit: contain;
  background: #f8f8f8;
  border-radius: var(--r);
  padding: var(--sp-xs);
}

.cart-item-info {
  display: flex;
  flex-direction: column;
  gap: var(--sp-sm);
}

.cart-item-title {
  font-size: var(--fs-md);
  color: var(--clr-text);
  line-height: 1.4;
  font-weight: 500;
}

.cart-item-title a:hover { color: var(--clr-link); text-decoration: underline; }

.cart-item-price {
  font-size: var(--fs-lg);
  font-weight: 700;
  color: var(--clr-accent);
}

.cart-item-actions {
  display: flex;
  align-items: center;
  gap: var(--sp-md);
  flex-wrap: wrap;
}

.qty-control {
  display: flex;
  align-items: center;
  border: 1px solid var(--clr-border);
  border-radius: var(--r);
  overflow: hidden;
}

.qty-btn {
  background: #f0f0f0;
  border: none;
  padding: 5px 12px;
  font-size: var(--fs-lg);
  cursor: pointer;
  color: var(--clr-text);
  transition: background var(--tr);
  font-weight: 700;
}

.qty-btn:hover { background: var(--clr-accent); color: var(--clr-white); }

.qty-value {
  padding: 5px 14px;
  font-size: var(--fs-base);
  font-weight: 700;
  border-left: 1px solid var(--clr-border);
  border-right: 1px solid var(--clr-border);
  min-width: 42px;
  text-align: center;
}

.btn-remove {
  background: none;
  border: none;
  color: var(--clr-text-lt);
  font-size: var(--fs-base);
  cursor: pointer;
  padding: 4px;
  transition: color var(--tr);
}

.btn-remove:hover { color: var(--clr-danger); text-decoration: underline; }

.cart-item-subtotal {
  font-size: var(--fs-lg);
  font-weight: 800;
  color: var(--clr-text);
  white-space: nowrap;
}

.cart-empty {
  text-align: center;
  padding: var(--sp-3xl) var(--sp-xl);
}

.cart-empty-icon { font-size: 64px; margin-bottom: var(--sp-lg); }

.cart-empty h2 {
  font-size: var(--fs-xl);
  margin-bottom: var(--sp-sm);
  font-weight: 700;
}

.cart-empty p {
  color: var(--clr-text-sub);
  margin-bottom: var(--sp-xl);
}

.cart-summary-box {
  background: var(--clr-white);
  border-radius: var(--r-md);
  padding: var(--sp-xl);
  box-shadow: var(--shadow-sm);
  position: sticky;
  top: calc(52px + var(--sp-lg));
  border-top: 3px solid var(--clr-accent);
}

.cart-summary-title {
  font-size: var(--fs-lg);
  font-weight: 800;
  margin-bottom: var(--sp-lg);
}

.cart-summary-row {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  margin-bottom: var(--sp-sm);
  font-size: var(--fs-base);
}

.cart-summary-divider {
  border-top: 1px solid var(--clr-border);
  margin: var(--sp-md) 0;
}

.cart-summary-total {
  font-size: var(--fs-xl);
  font-weight: 800;
}

.cart-summary-total span:last-child {
  color: var(--clr-accent);
}

.cart-checkout-btn {
  margin-top: var(--sp-lg);
  width: 100%;
  padding: 14px;
  font-size: var(--fs-md);
}

/* === Login Page === */
.login-page {
  min-height: calc(100vh - 140px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: var(--sp-2xl) var(--sp-lg);
  background: var(--clr-bg);
}

.login-box {
  background: var(--clr-white);
  border: 1px solid var(--clr-border);
  border-radius: var(--r-md);
  padding: var(--sp-2xl);
  width: 100%;
  max-width: 400px;
  box-shadow: var(--shadow);
  border-top: 3px solid var(--clr-accent);
}

.login-logo {
  text-align: center;
  margin-bottom: var(--sp-xl);
}

.login-logo .logo-text {
  color: var(--clr-text);
  font-size: var(--fs-2xl);
}

.login-title {
  font-size: var(--fs-xl);
  font-weight: 700;
  margin-bottom: var(--sp-lg);
}

.login-divider {
  text-align: center;
  position: relative;
  margin: var(--sp-lg) 0;
}

.login-divider::before {
  content: '';
  position: absolute;
  top: 50%;
  left: 0;
  right: 0;
  height: 1px;
  background: var(--clr-border);
}

.login-divider span {
  position: relative;
  background: var(--clr-white);
  padding: 0 var(--sp-sm);
  font-size: var(--fs-sm);
  color: var(--clr-text-sub);
}

.login-terms {
  font-size: var(--fs-xs);
  color: var(--clr-text-sub);
  margin-top: var(--sp-lg);
  line-height: 1.5;
}

.login-terms a {
  color: var(--clr-link);
}

.login-new {
  margin-top: var(--sp-xl);
  padding-top: var(--sp-xl);
  border-top: 1px solid var(--clr-border);
  text-align: center;
}

.login-new p {
  margin-bottom: var(--sp-sm);
  font-size: var(--fs-sm);
  color: var(--clr-text-sub);
}

/* === Footer === */
.site-footer {
  background: var(--clr-nav);
  margin-top: auto;
}

.footer-top {
  background: var(--clr-header);
  text-align: center;
  padding: var(--sp-md) 0;
  border-top: 1px solid rgba(214,40,40,.3);
}

.footer-top a {
  color: rgba(255,255,255,.8);
  font-size: var(--fs-base);
  font-weight: 600;
}

.footer-top a:hover {
  color: var(--clr-accent-lt);
}

.footer-main {
  padding: var(--sp-2xl) 0;
}

.footer-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: var(--sp-2xl);
  margin-bottom: var(--sp-2xl);
  padding-bottom: var(--sp-2xl);
  border-bottom: 1px solid rgba(255,255,255,.1);
}

.footer-col-title {
  font-size: var(--fs-base);
  font-weight: 800;
  color: var(--clr-white);
  margin-bottom: var(--sp-md);
  text-transform: uppercase;
  letter-spacing: .5px;
}

.footer-link-list {
  display: flex;
  flex-direction: column;
  gap: var(--sp-sm);
}

.footer-link-list a {
  font-size: var(--fs-sm);
  color: rgba(255,255,255,.6);
  transition: color var(--tr);
}

.footer-link-list a:hover {
  color: var(--clr-accent-lt);
}

.footer-bottom {
  text-align: center;
  padding-bottom: var(--sp-xl);
}

.footer-logo-text {
  font-size: var(--fs-xl);
  font-weight: 800;
  color: var(--clr-white);
  margin-bottom: var(--sp-md);
  display: block;
  text-transform: uppercase;
  letter-spacing: -1px;
}

.footer-logo-accent {
  color: var(--clr-accent);
}

.footer-copyright {
  font-size: var(--fs-sm);
  color: rgba(255,255,255,.4);
  margin-bottom: var(--sp-sm);
}

.footer-links {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: var(--sp-lg);
}

.footer-links a {
  font-size: var(--fs-sm);
  color: rgba(255,255,255,.5);
}

.footer-links a:hover {
  color: rgba(255,255,255,.8);
}

/* === Team Characters Strip === */
.chars-section {
  background: #0d0d0d;
  overflow: hidden;
  position: relative;
  margin-bottom: var(--sp-lg);
}

.chars-section-label {
  text-align: center;
  padding: var(--sp-lg) 0 var(--sp-sm);
}

.chars-section-label span {
  font-size: var(--fs-xs);
  font-weight: 800;
  color: rgba(255,255,255,.18);
  letter-spacing: 6px;
  text-transform: uppercase;
}

.chars-row {
  display: flex;
  align-items: flex-end;
  justify-content: center;
  overflow-x: auto;
  scrollbar-width: none;
}

.chars-row::-webkit-scrollbar { display: none; }

.chars-row img {
  height: 230px;
  width: auto;
  object-fit: contain;
  object-position: bottom center;
  transition: transform .3s ease, filter .3s ease;
  flex-shrink: 0;
  display: block;
}

.chars-row img:hover {
  transform: translateY(-12px) scale(1.06);
  filter: brightness(1.2);
  position: relative;
  z-index: 1;
}

/* === Footer Mascots Bar === */
.footer-mascots {
  background: var(--clr-bg);
  display: flex;
  align-items: flex-end;
  justify-content: center;
  gap: var(--sp-xl);
  padding: var(--sp-lg) var(--sp-xl) 0;
  overflow: hidden;
}

.footer-mascots img {
  height: 110px;
  width: auto;
  mix-blend-mode: multiply;
  object-fit: contain;
  object-position: bottom;
  display: block;
  flex-shrink: 0;
  transition: transform .3s ease;
}

.footer-mascots img:hover {
  transform: translateY(-6px) scale(1.1);
}

/* === Cart Feedback Toast === */
.cart-toast {
  position: fixed;
  bottom: var(--sp-xl);
  right: var(--sp-xl);
  background: var(--clr-header);
  color: var(--clr-white);
  padding: var(--sp-md) var(--sp-lg);
  border-radius: var(--r-md);
  font-size: var(--fs-base);
  box-shadow: var(--shadow-lg);
  z-index: 1000;
  animation: toastIn .2s ease, toastOut .3s ease 1.7s forwards;
  display: flex;
  align-items: center;
  gap: var(--sp-sm);
  border-left: 3px solid var(--clr-accent);
}

.cart-toast::before {
  content: '✓';
  color: var(--clr-accent);
  font-weight: 800;
  font-size: var(--fs-lg);
}

@keyframes toastIn {
  from { opacity: 0; transform: translateY(16px); }
  to   { opacity: 1; transform: translateY(0); }
}

@keyframes toastOut {
  from { opacity: 1; }
  to   { opacity: 0; }
}

/* === Utilities === */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0,0,0,0);
  white-space: nowrap;
  border: 0;
}

.text-center { text-align: center; }
.mt-lg { margin-top: var(--sp-lg); }
.mb-lg { margin-bottom: var(--sp-lg); }

/* === Responsive — Tablet (≤ 1024px) === */
@media (max-width: 1024px) {
  .category-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

/* === Responsive — Tablet (≤ 900px) === */
@media (max-width: 900px) {
  .product-detail-layout {
    grid-template-columns: 1fr 1fr;
  }

  .product-purchase-box {
    grid-column: 1 / -1;
    position: static;
  }

  .product-grid {
    grid-template-columns: repeat(3, 1fr);
  }

  .footer-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .cart-layout {
    grid-template-columns: 1fr;
  }

  .cart-summary-box {
    position: static;
  }
}

/* === Responsive — Tablet (≤ 768px) === */
@media (max-width: 768px) {
  .header-deliver { display: none; }

  .product-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .products-layout {
    grid-template-columns: 1fr;
  }

  .filter-sidebar {
    position: static;
  }

  .scroll-track .product-card {
    min-width: 170px;
    width: 170px;
  }

  .hero-title { font-size: 32px; }
  .hero-decoration { display: none; }
  .hero-stats { display: none; }
  .chars-row img { height: 150px; }
  .footer-mascots img { height: 80px; }

  .category-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

/* === Responsive — Mobile (≤ 480px) === */
@media (max-width: 480px) {
  .header-top .container {
    flex-wrap: wrap;
    gap: var(--sp-sm);
  }

  .header-search {
    order: 3;
    flex: 1 1 100%;
    height: 40px;
  }

  .search-category { display: none; }

  .header-logo { order: 1; }

  .header-actions { order: 2; margin-left: auto; }

  .header-link { display: none; }

  .product-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .category-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .footer-grid {
    grid-template-columns: 1fr 1fr;
    gap: var(--sp-lg);
  }

  .hero-content {
    padding: var(--sp-2xl) var(--sp-lg);
  }

  .hero-title { font-size: 26px; }
  .hero-desc { font-size: var(--fs-base); }
  .hero-eyebrow { flex-wrap: wrap; }
  .chars-row img { height: 110px; }
  .footer-mascots img { height: 65px; }
  .footer-mascots { gap: var(--sp-md); }

  .product-detail-layout {
    grid-template-columns: 1fr;
  }

  .cart-item {
    grid-template-columns: 90px 1fr;
  }

  .cart-item-subtotal {
    grid-column: 2;
    justify-self: start;
  }
}
