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

:root {
  --bg: #f5f5f7;
  --surface: #ffffff;
  --text: #1a1a2e;
  --text-secondary: #6b7280;
  --accent: #e63946;
  --accent-hover: #d62839;
  --accent-light: #fef2f2;
  --border: #e5e7eb;
  --shadow-sm: 0 1px 2px rgba(0,0,0,.05);
  --shadow: 0 1px 3px rgba(0,0,0,.08), 0 1px 2px rgba(0,0,0,.04);
  --shadow-md: 0 4px 12px rgba(0,0,0,.08);
  --shadow-lg: 0 10px 40px rgba(0,0,0,.12);
  --radius: 12px;
  --radius-sm: 8px;
  --radius-full: 9999px;
  --transition: .2s cubic-bezier(.4,0,.2,1);
  --max-w: 1320px;
  --header-h: 64px;
  --font: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
  overflow-x: hidden;
}

body {
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
  padding-bottom: env(safe-area-inset-bottom, 0);
  position: relative;
  width: 100%;
}

a { color: inherit; text-decoration: none; }
button { font-family: inherit; cursor: pointer; border: none; background: none; }
img { display: block; max-width: 100%; }
input, select { font-family: inherit; font-size: inherit; }

/* ===== UTILITIES ===== */
.container { max-width: var(--max-w); margin: 0 auto; padding: 0 16px; overflow-x: hidden; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0,0,0,0); }

/* ===== SCROLLBAR ===== */
::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: #d1d5db; border-radius: 3px; }

/* ===== HEADER ===== */
.header {
  position: sticky; top: 0; z-index: 100;
  background: rgba(255,255,255,.85);
  backdrop-filter: blur(20px) saturate(180%);
  -webkit-backdrop-filter: blur(20px) saturate(180%);
  border-bottom: 1px solid var(--border);
  height: var(--header-h);
}
.header__inner {
  display: flex; align-items: center; gap: 16px;
  height: 100%; max-width: var(--max-w); margin: 0 auto; padding: 0 16px;
}
.header__logo {
  font-size: 1.35rem; font-weight: 800; letter-spacing: -.03em;
  color: var(--text); flex-shrink: 0;
}
.header__logo span { color: var(--accent); }

/* Search */
.header__search {
  flex: 1; max-width: 480px; position: relative;
}
.header__search input {
  width: 100%; height: 40px; padding: 0 16px 0 40px;
  border: 1px solid var(--border); border-radius: var(--radius-full);
  background: var(--bg); color: var(--text); outline: none;
  transition: var(--transition);
}
.header__search input:focus {
  border-color: var(--accent); background: #fff;
  box-shadow: 0 0 0 3px rgba(230,57,70,.12);
}
.header__search input::placeholder { color: var(--text-secondary); }
.header__search-icon {
  position: absolute; left: 14px; top: 50%; transform: translateY(-50%);
  width: 16px; height: 16px; color: var(--text-secondary); pointer-events: none;
}

/* Header actions */
.header__actions { display: flex; gap: 4px; align-items: center; margin-left: auto; }
.header__btn {
  position: relative; width: 40px; height: 40px;
  display: flex; align-items: center; justify-content: center;
  border-radius: var(--radius-sm); transition: var(--transition);
  color: var(--text);
}
.header__btn:hover { background: var(--bg); }
.header__btn svg { width: 22px; height: 22px; }
.header__badge {
  position: absolute; top: 2px; right: 2px;
  min-width: 18px; height: 18px; padding: 0 5px;
  background: var(--accent); color: #fff;
  font-size: 11px; font-weight: 700; line-height: 18px;
  border-radius: var(--radius-full); text-align: center;
  transform: scale(0); transition: transform .25s cubic-bezier(.34,1.56,.64,1);
}
.header__badge.visible { transform: scale(1); }

/* Mobile menu btn */
.header__menu-btn { display: none; }

/* ===== BREADCRUMBS ===== */
.breadcrumbs {
  padding: 16px 0 0;
  font-size: .85rem; color: var(--text-secondary);
}
.breadcrumbs a:hover { color: var(--accent); }
.breadcrumbs span { margin: 0 6px; opacity: .4; }

/* ===== HERO ===== */
.hero {
  margin-top: 16px;
  background: linear-gradient(135deg, #1a1a2e 0%, #16213e 100%);
  border-radius: var(--radius);
  padding: 48px 40px;
  color: #fff;
  position: relative;
  overflow: hidden;
}
.hero::after {
  content: '';
  position: absolute; right: -40px; top: -40px;
  width: 300px; height: 300px;
  background: radial-gradient(circle, rgba(230,57,70,.3) 0%, transparent 70%);
  pointer-events: none;
}
.hero__tag {
  display: inline-block;
  background: rgba(255,255,255,.12);
  backdrop-filter: blur(8px);
  padding: 6px 14px; border-radius: var(--radius-full);
  font-size: .8rem; font-weight: 600; letter-spacing: .03em;
  text-transform: uppercase; margin-bottom: 16px;
}
.hero h1 {
  font-size: 2rem; font-weight: 800; letter-spacing: -.03em;
  line-height: 1.15; margin-bottom: 8px;
}
.hero p { color: rgba(255,255,255,.7); max-width: 500px; font-size: .95rem; }

/* ===== TOOLBAR ===== */
.toolbar {
  display: flex; align-items: center; justify-content: space-between;
  padding: 0 0 12px; gap: 12px; flex-wrap: wrap;
}
.toolbar__count { font-size: .9rem; color: var(--text-secondary); }
.toolbar__count b { color: var(--text); font-weight: 700; }
.toolbar__right { display: flex; gap: 8px; align-items: center; }

.toolbar__sort {
  display: flex; align-items: center; gap: 6px;
  font-size: .85rem; color: var(--text-secondary);
}
.toolbar__sort select {
  border: 1px solid var(--border); border-radius: var(--radius-sm);
  padding: 7px 30px 7px 10px; background: var(--surface);
  color: var(--text); outline: none; cursor: pointer;
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' fill='%236b7280' viewBox='0 0 16 16'%3E%3Cpath d='M8 11L3 6h10z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 10px center;
  transition: var(--transition);
}
.toolbar__sort select:focus { border-color: var(--accent); }

.toolbar__view { display: flex; gap: 2px; }
.toolbar__view-btn {
  width: 36px; height: 36px;
  display: flex; align-items: center; justify-content: center;
  border-radius: var(--radius-sm); border: 1px solid var(--border);
  color: var(--text-secondary); transition: var(--transition);
}
.toolbar__view-btn.active, .toolbar__view-btn:hover {
  background: var(--text); color: #fff; border-color: var(--text);
}
.toolbar__view-btn svg { width: 18px; height: 18px; }

.toolbar__filter-btn {
  display: none;
  align-items: center; gap: 6px;
  padding: 8px 16px; border-radius: var(--radius-sm);
  background: var(--surface); border: 1px solid var(--border);
  font-size: .85rem; font-weight: 600; color: var(--text);
  transition: var(--transition);
}
.toolbar__filter-btn svg { width: 16px; height: 16px; }
.toolbar__filter-btn:hover { border-color: var(--accent); color: var(--accent); }

/* ===== LAYOUT ===== */
.catalog { display: flex; gap: 24px; padding-bottom: 60px; }
.catalog__sidebar { width: 260px; flex-shrink: 0; }
.catalog__main { flex: 1; min-width: 0; }

/* ===== FILTERS ===== */
.filters {
  position: sticky; top: calc(var(--header-h) + 16px);
  background: var(--surface);
  border-radius: var(--radius);
  padding: 20px;
  box-shadow: var(--shadow-sm);
  overflow: hidden;
  max-height: calc(100vh - var(--header-h) - 32px);
  overflow-y: auto;
}
.filters__header {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: 20px;
}
.filters__title { font-size: 1rem; font-weight: 700; }
.filters__reset {
  font-size: .8rem; color: var(--accent); font-weight: 600;
  opacity: 0; pointer-events: none; transition: var(--transition);
}
.filters__reset.visible { opacity: 1; pointer-events: auto; cursor: pointer; }
.filters__reset:hover { text-decoration: underline; }

.filter-group { margin-bottom: 20px; padding-bottom: 20px; border-bottom: 1px solid var(--border); }
.filter-group:last-child { border-bottom: none; margin-bottom: 0; padding-bottom: 0; }
.filter-group__title {
  font-size: .85rem; font-weight: 700; margin-bottom: 12px;
  display: flex; align-items: center; justify-content: space-between;
  cursor: pointer; user-select: none;
}
.filter-group__title::after {
  content: '';
  width: 8px; height: 8px;
  border-right: 2px solid var(--text-secondary);
  border-bottom: 2px solid var(--text-secondary);
  transform: rotate(-135deg);
  transition: var(--transition);
}
.filter-group.collapsed .filter-group__title::after { transform: rotate(45deg); }
.filter-group__body { transition: var(--transition); }
.filter-group.collapsed .filter-group__body { display: none; }

/* Checkboxes */
.filter-check {
  display: flex; align-items: center; gap: 10px;
  padding: 5px 0; cursor: pointer; font-size: .88rem;
  transition: var(--transition);
}
.filter-check:hover { color: var(--accent); }
.filter-check input { display: none; }
.filter-check__box {
  width: 18px; height: 18px; border-radius: 4px;
  border: 2px solid var(--border); flex-shrink: 0;
  display: flex; align-items: center; justify-content: center;
  transition: var(--transition);
}
.filter-check input:checked + .filter-check__box {
  background: var(--accent); border-color: var(--accent);
}
.filter-check input:checked + .filter-check__box::after {
  content: '';
  width: 5px; height: 9px;
  border: 2px solid #fff; border-top: none; border-left: none;
  transform: rotate(45deg) translateY(-1px);
}
.filter-check__count {
  margin-left: auto; font-size: .78rem; color: var(--text-secondary);
  background: var(--bg); padding: 1px 7px; border-radius: var(--radius-full);
}

/* Price range */
.price-range { padding: 4px 0; }
.price-range__inputs {
  display: flex; gap: 8px; align-items: center;
  margin-bottom: 12px;
}
.price-range__inputs span { color: var(--text-secondary); font-size: .85rem; }
.price-range__input {
  flex: 1; min-width: 0; width: 100%; height: 36px; padding: 0 8px;
  border: 1px solid var(--border); border-radius: var(--radius-sm);
  text-align: center; outline: none; background: var(--bg);
  transition: var(--transition);
  -moz-appearance: textfield;
}
.price-range__input::-webkit-outer-spin-button,
.price-range__input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.price-range__input:focus { border-color: var(--accent); background: #fff; }

.price-slider { position: relative; height: 4px; background: #e5e7eb; border-radius: 2px; margin: 0 4px; }
.price-slider__track {
  position: absolute; height: 100%; background: var(--accent);
  border-radius: 2px; top: 0;
}
.price-slider__thumb {
  position: absolute; top: 50%; width: 18px; height: 18px;
  background: #fff; border: 2px solid var(--accent);
  border-radius: 50%; transform: translate(-50%,-50%);
  cursor: grab; z-index: 2; transition: box-shadow var(--transition);
}
.price-slider__thumb:hover, .price-slider__thumb:active {
  box-shadow: 0 0 0 6px rgba(230,57,70,.15);
}
.price-slider__thumb:active { cursor: grabbing; }

/* Size buttons */
.filter-sizes { display: flex; flex-wrap: wrap; gap: 6px; }
.filter-size-btn {
  padding: 6px 10px; border-radius: var(--radius-sm);
  border: 1px solid var(--border); font-size: .8rem;
  background: var(--surface); color: var(--text);
  transition: var(--transition); font-weight: 500;
}
.filter-size-btn:hover { border-color: var(--accent); color: var(--accent); }
.filter-size-btn.active {
  background: var(--accent); color: #fff; border-color: var(--accent);
}

/* ===== PRODUCT GRID ===== */
.products {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 16px;
}
.products.list-view { grid-template-columns: 1fr; }

/* ===== PRODUCT CARD ===== */
.product-card {
  background: var(--surface);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  transition: transform var(--transition), box-shadow var(--transition);
  position: relative;
  display: flex;
  flex-direction: column;
}
.product-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}
.list-view .product-card {
  flex-direction: row;
}

/* Card badges */
.product-card__badges {
  position: absolute; top: 12px; left: 12px; z-index: 2;
  display: flex; flex-direction: column; gap: 4px;
}
.product-card__badge {
  padding: 3px 10px; border-radius: var(--radius-full);
  font-size: .72rem; font-weight: 700; letter-spacing: .02em;
  text-transform: uppercase;
}
.product-card__badge--sale { background: var(--accent); color: #fff; }
.product-card__badge--new { background: #10b981; color: #fff; }
.product-card__badge--hit { background: #f59e0b; color: #fff; }

/* Card image */
.product-card__img {
  position: relative;
  aspect-ratio: 3/4;
  background: linear-gradient(145deg, #f3f4f6 0%, #e5e7eb 100%);
  display: flex; align-items: center; justify-content: center;
  overflow: hidden;
}
.list-view .product-card__img { width: 200px; aspect-ratio: 3/4; flex-shrink: 0; }
.product-card__img svg {
  width: 64px; height: 64px; color: #d1d5db;
}
.product-card__wishlist {
  position: absolute; top: 12px; right: 12px; z-index: 2;
  width: 36px; height: 36px;
  background: rgba(255,255,255,.9); backdrop-filter: blur(4px);
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  transition: var(--transition);
  box-shadow: var(--shadow-sm);
}
.product-card__wishlist svg { width: 18px; height: 18px; color: var(--text-secondary); transition: var(--transition); }
.product-card__wishlist:hover svg,
.product-card__wishlist.active svg { color: var(--accent); fill: var(--accent); }

/* Quick view */
.product-card__quick {
  position: absolute; bottom: 0; left: 0; right: 0;
  padding: 10px;
  background: linear-gradient(transparent, rgba(0,0,0,.5));
  transform: translateY(100%);
  transition: transform .3s ease;
  display: flex; justify-content: center;
}
.product-card:hover .product-card__quick { transform: translateY(0); }
.product-card__quick-btn {
  padding: 8px 20px; border-radius: var(--radius-full);
  background: #fff; color: var(--text);
  font-size: .82rem; font-weight: 600;
  transition: var(--transition);
}
.product-card__quick-btn:hover { background: var(--accent); color: #fff; }

/* Card body */
.product-card__body {
  padding: 16px;
  display: flex; flex-direction: column; flex: 1;
}
.product-card__brand {
  font-size: .75rem; font-weight: 600; color: var(--text-secondary);
  text-transform: uppercase; letter-spacing: .04em; margin-bottom: 4px;
}
.product-card__name {
  font-size: .95rem; font-weight: 600; line-height: 1.3;
  margin-bottom: 8px;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical;
  overflow: hidden;
}
.product-card__specs {
  display: flex; flex-wrap: wrap; gap: 4px; margin-bottom: 12px;
}
.product-card__spec {
  padding: 2px 8px; border-radius: var(--radius-full);
  background: var(--bg); font-size: .75rem; color: var(--text-secondary);
  white-space: nowrap;
}

/* Rating */
.product-card__rating {
  display: flex; align-items: center; gap: 4px; margin-bottom: 12px;
}
.product-card__stars { display: flex; gap: 1px; }
.product-card__stars svg { width: 14px; height: 14px; }
.product-card__stars svg.filled { color: #f59e0b; fill: #f59e0b; }
.product-card__stars svg.empty { color: #d1d5db; fill: #d1d5db; }
.product-card__reviews { font-size: .78rem; color: var(--text-secondary); }

/* Price & cart */
.product-card__footer { margin-top: auto; display: flex; align-items: flex-end; justify-content: space-between; gap: 8px; }
.product-card__price-block { display: flex; flex-direction: column; min-width: 0; }
.product-card__price {
  font-size: 1.2rem; font-weight: 800; color: var(--text);
  letter-spacing: -.02em; white-space: nowrap;
}
.product-card__price--old {
  font-size: .82rem; font-weight: 500; color: var(--text-secondary);
  text-decoration: line-through; white-space: nowrap;
}
.product-card__price--sale { color: var(--accent); }
.product-card__cart-area { flex-shrink: 0; }

.product-card__cart-btn {
  width: 42px; height: 42px; border-radius: var(--radius-sm);
  background: var(--text); color: #fff;
  display: flex; align-items: center; justify-content: center;
  transition: var(--transition); flex-shrink: 0;
}
.product-card__cart-btn:hover { background: var(--accent); }
.product-card__cart-btn svg { width: 20px; height: 20px; }

/* Qty control on card */
.product-card__qty-control {
  display: flex; align-items: center; gap: 0;
  border: 1px solid var(--border); border-radius: var(--radius-sm);
  overflow: hidden; flex-shrink: 0;
  height: 42px;
}
.product-card__qty-btn {
  width: 36px; height: 100%;
  display: flex; align-items: center; justify-content: center;
  color: var(--text); transition: var(--transition);
}
.product-card__qty-btn:first-child { border-right: 1px solid var(--border); }
.product-card__qty-btn:last-child { border-left: 1px solid var(--border); }
.product-card__qty-btn:hover { background: var(--bg); }
.product-card__qty-btn:first-child:hover { color: var(--accent); }
.product-card__qty-btn svg { width: 16px; height: 16px; }
.product-card__qty-value {
  min-width: 32px; text-align: center;
  font-size: .9rem; font-weight: 700;
  line-height: 42px; user-select: none;
}

/* ===== CART DRAWER ===== */
.cart-overlay {
  position: fixed; inset: 0; z-index: 998;
  background: rgba(0,0,0,.4);
  opacity: 0; pointer-events: none;
  transition: opacity .3s ease;
}
.cart-overlay.open { opacity: 1; pointer-events: auto; }

.cart-drawer {
  position: fixed; top: 0; right: 0; bottom: 0; z-index: 999;
  width: 420px; max-width: 100vw;
  background: var(--surface);
  box-shadow: var(--shadow-lg);
  transform: translateX(100%);
  transition: transform .35s cubic-bezier(.4,0,.2,1);
  display: flex; flex-direction: column;
}
.cart-drawer.open { transform: translateX(0); }

.cart-drawer__header {
  padding: 20px 24px;
  display: flex; align-items: center; justify-content: space-between;
  border-bottom: 1px solid var(--border);
}
.cart-drawer__title { font-size: 1.1rem; font-weight: 700; }
.cart-drawer__close {
  width: 36px; height: 36px; border-radius: var(--radius-sm);
  display: flex; align-items: center; justify-content: center;
  transition: var(--transition);
}
.cart-drawer__close:hover { background: var(--bg); }
.cart-drawer__close svg { width: 20px; height: 20px; }

.cart-drawer__body { flex: 1; overflow-y: auto; padding: 16px 24px; }

.cart-drawer__empty {
  display: flex; flex-direction: column; align-items: center;
  justify-content: center; height: 100%;
  color: var(--text-secondary); text-align: center;
}
.cart-drawer__empty svg { width: 64px; height: 64px; color: #d1d5db; margin-bottom: 16px; }
.cart-drawer__empty p { font-size: .95rem; margin-bottom: 4px; }
.cart-drawer__empty small { font-size: .82rem; }

/* Cart item */
.cart-item {
  display: flex; gap: 14px; padding: 16px 0;
  border-bottom: 1px solid var(--border);
  animation: cartItemIn .3s ease;
}
@keyframes cartItemIn { from { opacity: 0; transform: translateX(20px); } }
.cart-item__img {
  width: 72px; height: 72px; border-radius: var(--radius-sm);
  background: var(--bg);
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
}
.cart-item__img svg { width: 32px; height: 32px; color: #d1d5db; }
.cart-item__info { flex: 1; min-width: 0; }
.cart-item__brand { font-size: .72rem; color: var(--text-secondary); text-transform: uppercase; font-weight: 600; }
.cart-item__name { font-size: .88rem; font-weight: 600; margin-bottom: 8px;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cart-item__controls { display: flex; align-items: center; justify-content: space-between; }
.cart-item__qty {
  display: flex; align-items: center; gap: 0;
  border: 1px solid var(--border); border-radius: 6px; overflow: hidden;
}
.cart-item__qty button {
  width: 28px; height: 28px;
  display: flex; align-items: center; justify-content: center;
  font-size: .85rem; font-weight: 600; color: var(--text);
  transition: var(--transition); padding: 0;
}
.cart-item__qty button svg { width: 14px; height: 14px; }
.cart-item__qty button:hover { background: var(--bg); }
.cart-item__qty span {
  width: 28px; text-align: center; font-size: .82rem; font-weight: 600;
  border-left: 1px solid var(--border); border-right: 1px solid var(--border);
  line-height: 28px;
}
.cart-item__price { font-weight: 700; font-size: .95rem; }
.cart-item__remove {
  color: var(--text-secondary); font-size: .78rem;
  margin-top: 6px; transition: var(--transition);
}
.cart-item__remove:hover { color: var(--accent); }

/* Cart footer */
.cart-drawer__footer {
  padding: 20px 24px;
  border-top: 1px solid var(--border);
  background: var(--surface);
}
.cart-drawer__total {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: 16px;
}
.cart-drawer__total-label { font-size: .95rem; color: var(--text-secondary); }
.cart-drawer__total-value { font-size: 1.3rem; font-weight: 800; }
.cart-drawer__checkout {
  display: block; width: 100%;
  padding: 14px; border-radius: var(--radius-sm);
  background: var(--accent); color: #fff;
  font-size: 1rem; font-weight: 700;
  text-align: center;
  transition: var(--transition);
}
.cart-drawer__checkout:hover { background: var(--accent-hover); }

/* ===== QUICK VIEW MODAL ===== */
/* Product sheet — bottom sheet style */
.modal-overlay {
  position: fixed; inset: 0; z-index: 1000;
  pointer-events: none; opacity: 0;
  transition: opacity .3s ease;
}
.modal-overlay.open { pointer-events: auto; opacity: 1; }
.modal-overlay__bg {
  position: absolute; inset: 0;
  background: rgba(0,0,0,.4);
}
.modal {
  position: absolute; bottom: 0; left: 0; right: 0;
  background: var(--surface);
  border-radius: var(--radius) var(--radius) 0 0;
  height: 100vh; height: 100dvh;
  display: flex; flex-direction: column;
  overflow: hidden;
  transform: translateY(100%);
  transition: transform .35s cubic-bezier(.4,0,.2,1);
  box-shadow: 0 -4px 24px rgba(0,0,0,.12);
}
.modal-overlay.open .modal { transform: translateY(0); }
.modal__handle {
  width: 40px; height: 4px; background: #d1d5db;
  border-radius: 2px; margin: 12px auto 8px;
  cursor: grab; touch-action: none;
  flex-shrink: 0;
}
.modal__inner {
  display: flex; flex-direction: column;
  flex: 1; overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior: contain;
}
.modal__img {
  width: 100%; flex-shrink: 0;
  display: flex; align-items: center; justify-content: center;
  overflow: hidden;
}
.modal__img img { width: 100%; height: auto; display: block; }
.modal__img svg { width: 80px; height: 80px; color: #d1d5db; }
.modal__body { padding: 16px 20px calc(20px + env(safe-area-inset-bottom, 0)); }
.modal__brand {
  font-size: .78rem; text-transform: uppercase; font-weight: 600;
  color: var(--text-secondary); letter-spacing: .04em; margin-bottom: 2px;
}
.modal__name { font-size: 1.05rem; font-weight: 700; margin-bottom: 8px; }
.modal__rating { display: flex; align-items: center; gap: 6px; margin-bottom: 10px; }
.modal__specs {
  display: flex; flex-direction: column; gap: 6px;
  padding: 12px 0; border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border); margin-bottom: 12px;
}
.modal__spec { display: flex; justify-content: space-between; font-size: .85rem; }
.modal__spec-label { color: var(--text-secondary); }
.modal__spec-value { font-weight: 600; }
.modal__price { font-size: 1.3rem; font-weight: 800; margin-bottom: 12px; }
.modal__price--old { font-size: .88rem; color: var(--text-secondary); text-decoration: line-through; font-weight: 500; margin-left: 8px; }
.modal__add-btn {
  display: flex; align-items: center; justify-content: center; gap: 8px;
  width: 100%; padding: 14px;
  background: var(--accent); color: #fff;
  border-radius: var(--radius-sm);
  font-size: .95rem; font-weight: 700;
  transition: var(--transition);
}
.modal__add-btn:hover { background: var(--accent-hover); }
.modal__add-btn svg { width: 20px; height: 20px; }

/* ===== PAGINATION ===== */
.pagination {
  display: flex; align-items: center; justify-content: center;
  gap: 4px; padding: 32px 0;
}
.pagination__btn {
  min-width: 40px; height: 40px; padding: 0 8px;
  display: flex; align-items: center; justify-content: center;
  border-radius: var(--radius-sm); font-size: .88rem; font-weight: 600;
  border: 1px solid var(--border); color: var(--text);
  transition: var(--transition);
}
.pagination__btn:hover { border-color: var(--accent); color: var(--accent); }
.pagination__btn.active {
  background: var(--accent); color: #fff; border-color: var(--accent);
}
.pagination__dots { padding: 0 4px; color: var(--text-secondary); }

/* ===== FOOTER ===== */
.footer {
  background: var(--text);
  color: rgba(255,255,255,.7);
  padding: 48px 0 24px;
  margin-top: 40px;
}
.footer__grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 32px; margin-bottom: 32px;
}
.footer__brand { font-size: 1.3rem; font-weight: 800; color: #fff; margin-bottom: 8px; }
.footer__brand span { color: var(--accent); }
.footer__desc { font-size: .88rem; line-height: 1.6; max-width: 300px; }
.footer__title { font-size: .85rem; font-weight: 700; color: #fff; margin-bottom: 12px; text-transform: uppercase; letter-spacing: .04em; }
.footer__link { display: block; padding: 4px 0; font-size: .88rem; transition: var(--transition); }
.footer__link:hover { color: #fff; }
.footer__bottom {
  padding-top: 24px; border-top: 1px solid rgba(255,255,255,.1);
  display: flex; align-items: center; justify-content: space-between;
  font-size: .82rem;
}

/* ===== MOBILE BOTTOM NAV ===== */
.bottom-nav {
  display: none;
  position: fixed; bottom: 0; left: 0; right: 0; z-index: 100;
  background: var(--surface);
  border-top: 1px solid var(--border);
  padding: 6px 0 calc(6px + env(safe-area-inset-bottom, 0));
  -webkit-backface-visibility: hidden;
  backface-visibility: hidden;
  will-change: transform;
}
.bottom-nav__inner {
  display: flex; justify-content: space-around; align-items: center;
}
.bottom-nav__item {
  display: flex; flex-direction: column; align-items: center; gap: 2px;
  padding: 6px 12px; color: var(--text-secondary);
  font-size: .68rem; font-weight: 600;
  transition: var(--transition); position: relative;
}
.bottom-nav__item.active, .bottom-nav__item:hover { color: var(--accent); }
.bottom-nav__item svg { width: 22px; height: 22px; }
.bottom-nav__badge {
  position: absolute; top: 0; right: 4px;
  min-width: 16px; height: 16px; padding: 0 4px;
  background: var(--accent); color: #fff;
  font-size: 10px; font-weight: 700; line-height: 16px;
  border-radius: var(--radius-full); text-align: center;
  transform: scale(0); transition: transform .25s cubic-bezier(.34,1.56,.64,1);
}
.bottom-nav__badge.visible { transform: scale(1); }

/* ===== TOAST ===== */
.toast {
  position: fixed; bottom: 100px; left: 50%; transform: translateX(-50%) translateY(20px);
  padding: 12px 24px; border-radius: var(--radius-full);
  background: var(--text); color: #fff;
  font-size: .88rem; font-weight: 600; white-space: nowrap;
  box-shadow: var(--shadow-lg); z-index: 1100;
  opacity: 0; pointer-events: none;
  transition: all .3s cubic-bezier(.4,0,.2,1);
  max-width: calc(100vw - 40px);
}
.toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }

/* ===== MOBILE FILTER SHEET ===== */
.filter-sheet {
  position: fixed; inset: 0; z-index: 999;
  pointer-events: none; opacity: 0;
  transition: opacity .3s ease;
  overflow: hidden;
}
.filter-sheet.open { pointer-events: auto; opacity: 1; }
.filter-sheet__bg {
  position: absolute; inset: 0;
  background: rgba(0,0,0,.4);
}
.filter-sheet__content {
  position: absolute; bottom: 0; left: 0; right: 0;
  width: 100%;
  max-width: 100vw;
  background: var(--surface);
  border-radius: var(--radius) var(--radius) 0 0;
  max-height: 85vh;
  overflow-x: hidden;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior: contain;
  padding: 24px 20px calc(40px + env(safe-area-inset-bottom, 0));
  transform: translateY(100%);
  transition: transform .35s cubic-bezier(.4,0,.2,1);
}
.filter-sheet.open .filter-sheet__content { transform: translateY(0); }
.filter-sheet__handle {
  width: 40px; height: 4px; background: #d1d5db;
  border-radius: 2px; margin: 0 auto 20px;
  cursor: grab;
  touch-action: none;
}
.filter-sheet__actions {
  display: flex; gap: 12px; padding-top: 20px;
  position: sticky; bottom: 0; background: var(--surface);
}
.filter-sheet__apply {
  flex: 1; padding: 14px; border-radius: var(--radius-sm);
  background: var(--accent); color: #fff;
  font-weight: 700; font-size: .95rem;
}
.filter-sheet__clear {
  padding: 14px 20px; border-radius: var(--radius-sm);
  border: 1px solid var(--border); font-weight: 600; font-size: .95rem;
}

/* ===== RESPONSIVE ===== */
@media (max-width: 1024px) {
  .catalog__sidebar { display: none; }
  .toolbar__filter-btn { display: flex; }
  .footer__grid { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 768px) {
  :root { --header-h: 56px; }
  .header__search { display: none; }
  .header__menu-btn { display: flex; }
  .hero { padding: 32px 24px; margin-top: 12px; }
  .hero h1 { font-size: 1.5rem; }
  .products { grid-template-columns: repeat(2, 1fr); gap: 10px; }
  .product-card__body { padding: 12px; }
  .product-card__name { font-size: .85rem; }
  .product-card__price { font-size: .95rem; }
  .product-card__cart-btn { width: 36px; height: 36px; }
  .product-card__cart-btn svg { width: 18px; height: 18px; }
  .product-card__qty-control { height: 36px; }
  .product-card__qty-btn { width: 30px; }
  .product-card__qty-btn svg { width: 14px; height: 14px; }
  .product-card__qty-value { min-width: 26px; font-size: .82rem; line-height: 36px; }
  .product-card__footer { gap: 6px; }
  .product-card__quick { display: none; }
  .bottom-nav { display: block; }
  body { padding-bottom: 64px; }
  .footer { padding-bottom: 80px; }
  .cart-drawer { width: 100vw; }
  .footer__grid { grid-template-columns: 1fr; gap: 24px; }
  .footer__bottom { flex-direction: column; gap: 8px; text-align: center; }
  .toolbar__view { display: none; }
  .toolbar__sort select { font-size: .8rem; }

  /* Mobile search in hero area */
  .mobile-search { display: block; margin: 16px 0 0; position: relative; }
  .mobile-search input {
    width: 100%; height: 44px; padding: 0 16px 0 42px;
    border: none; border-radius: var(--radius-sm);
    background: rgba(255,255,255,.12); color: #fff;
    font-size: .95rem; outline: none;
  }
  .mobile-search input::placeholder { color: rgba(255,255,255,.5); }
  .mobile-search svg {
    position: absolute; left: 14px; top: 50%; transform: translateY(-50%);
    width: 18px; height: 18px; color: rgba(255,255,255,.5);
  }
}

@media (max-width: 480px) {
  .products { grid-template-columns: repeat(2, 1fr); gap: 8px; }
  .product-card__specs { display: none; }
  .product-card__rating { margin-bottom: 8px; }
  .product-card__body { padding: 10px; }
  .hero { padding: 24px 20px; }
}

@media (min-width: 769px) {
  .mobile-search { display: none; }
}

/* ===== ANIMATIONS ===== */
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
@keyframes slideUp { from { opacity: 0; transform: translateY(12px); } to { opacity: 1; transform: translateY(0); } }

.product-card { animation: slideUp .4s ease both; }
.product-card:nth-child(1) { animation-delay: .02s; }
.product-card:nth-child(2) { animation-delay: .04s; }
.product-card:nth-child(3) { animation-delay: .06s; }
.product-card:nth-child(4) { animation-delay: .08s; }
.product-card:nth-child(5) { animation-delay: .10s; }
.product-card:nth-child(6) { animation-delay: .12s; }
.product-card:nth-child(7) { animation-delay: .14s; }
.product-card:nth-child(8) { animation-delay: .16s; }
.product-card:nth-child(9) { animation-delay: .18s; }
.product-card:nth-child(10) { animation-delay: .20s; }
.product-card:nth-child(11) { animation-delay: .22s; }
.product-card:nth-child(12) { animation-delay: .24s; }

/* Loading skeleton */
.skeleton {
  background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
  background-size: 200% 100%;
  animation: shimmer 1.5s infinite;
}
@keyframes shimmer { from { background-position: 200% 0; } to { background-position: -200% 0; } }
