/* ===== VARIABLES ===== */
:root {
  --color-primary:      #1a56a8;
  --color-primary-dark: #134087;
  --color-cta:          #f59e0b;
  --color-cta-dark:     #d97706;
  --color-text:         #111827;
  --color-text-muted:   #6b7280;
  --color-bg:           #ffffff;
  --color-bg-light:     #f3f6fa;
  --color-border:       #e2e6ed;
  --color-topbar-bg:    #111827;
  --color-topbar-text:  rgba(255,255,255,.7);

  --font:    'Inter', sans-serif;
  --fz-xs:   11px;
  --fz-sm:   13px;
  --fz-base: 15px;
  --fz-md:   17px;
  --fz-lg:   21px;
  --fz-xl:   28px;

  --gap-xs: 4px;
  --gap-sm: 8px;
  --gap-md: 16px;
  --gap-lg: 24px;
  --gap-xl: 48px;

  --container:   1260px;
  --radius-card: 8px;
  --radius-btn:  6px;

  --shadow-card: 0 1px 3px rgba(0,0,0,.08), 0 1px 2px rgba(0,0,0,.06);
  --shadow-drop: 0 10px 25px rgba(0,0,0,.12), 0 4px 10px rgba(0,0,0,.08);
  --shadow-hover: 0 8px 20px rgba(26,86,168,.18);
}

/* ===== RESET ===== */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html {
  scroll-behavior: smooth;
  overflow-x: clip;
}
body {
  font-family: var(--font);
  font-size: var(--fz-base);
  color: var(--color-text);
  background: var(--color-bg);
  line-height: 1.5;
  overflow-x: clip;
}
#app {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  max-width: 100%;
}

#app > main {
  flex: 1;
}
a      { color: inherit; text-decoration: none; }
ul     { list-style: none; }
img    { max-width: 100%; display: block; }
button { cursor: pointer; border: none; background: none; font-family: inherit; font-size: inherit; }
button:focus:not(:focus-visible) { outline: none; }
button:focus-visible { outline: 2px solid var(--color-primary); outline-offset: 2px; }
input  { font-family: inherit; font-size: inherit; }

/* ===== CONTAINER ===== */
/* Override Bagisto Tailwind which sets padding: 0 90px on .container */
.container {
  max-width: var(--container) !important;
  margin: 0 auto !important;
  padding-left: var(--gap-md) !important;
  padding-right: var(--gap-md) !important;
  width: 100% !important;
}

/* ===== TOPBAR ===== */
.topbar {
  background: var(--color-topbar-bg);
  font-size: var(--fz-sm);
  color: var(--color-topbar-text);
}
.topbar__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 34px;
  gap: var(--gap-md);
}
.topbar__schedule,
.topbar__phone {
  display: flex;
  align-items: center;
  gap: var(--gap-xs);
}
.topbar__phone a {
  font-weight: 600;
  color: var(--color-cta);
}
.topbar__phone a:hover { color: #fff; }

/* ===== HEADER ===== */
.header {
  background: var(--color-bg);
  border-bottom: 2px solid var(--color-primary);
  box-shadow: 0 2px 8px rgba(26,86,168,.06);
}
.header__inner {
  display: flex;
  align-items: center;
  gap: var(--gap-lg);
  height: 68px;
}
.logo {
  flex-shrink: 0;
  font-size: 22px;
  font-weight: 800;
  color: var(--color-primary);
  letter-spacing: -1px;
  line-height: 1;
}
.logo span { color: var(--color-cta); }

.search {
  flex: 1;
  display: flex;
  max-width: 560px;
}
.search__input {
  flex: 1;
  height: 40px;
  padding: 0 var(--gap-md);
  border: 1.5px solid var(--color-border);
  border-right: none;
  border-radius: var(--radius-btn) 0 0 var(--radius-btn);
  outline: none;
  font-size: var(--fz-sm);
  background: var(--color-bg-light);
  transition: border-color .15s, background .15s;
}
.search__input:focus {
  border-color: var(--color-primary);
  background: #fff;
  box-shadow: 0 0 0 3px rgba(26,86,168,.08);
}
.search__btn {
  height: 40px;
  padding: 0 18px;
  background: var(--color-primary);
  color: #fff;
  border-radius: 0 var(--radius-btn) var(--radius-btn) 0;
  display: flex;
  align-items: center;
  gap: var(--gap-xs);
  font-size: var(--fz-sm);
  font-weight: 600;
  letter-spacing: .2px;
  transition: background .15s;
}
.search__btn:hover { background: var(--color-primary-dark); }

.header__actions {
  display: flex;
  align-items: center;
  gap: var(--gap-md);
  margin-left: auto;
  flex-shrink: 0;
}
.header__action {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  font-size: var(--fz-xs);
  color: var(--color-text-muted);
  transition: color .15s;
  cursor: pointer;
}
.header__action:hover { color: var(--color-primary); }

.icon-wrap {
  position: relative;
  display: flex;
  align-items: center;
}
.cart-badge {
  position: absolute;
  top: -6px;
  right: -8px;
  background: var(--color-cta);
  color: #fff;
  font-size: 10px;
  font-weight: 700;
  min-width: 18px;
  height: 18px;
  border-radius: 9px;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 0 4px;
  line-height: 1;
}

/* ===== NAVBAR ===== */
.navbar {
  background: var(--color-primary);
  position: relative;
  z-index: 100;
}
.navbar__inner {
  display: flex;
  align-items: center;
  height: 46px;
}
.catalog-wrapper { position: relative; }
.catalog-btn {
  display: flex;
  align-items: center;
  gap: var(--gap-sm);
  height: 46px;
  padding: 0 var(--gap-lg);
  background: var(--color-cta);
  color: #fff;
  font-weight: 700;
  font-size: var(--fz-sm);
  text-transform: uppercase;
  letter-spacing: .4px;
  transition: background-color 200ms ease, transform 100ms ease;
}
.catalog-btn:hover  { background: var(--color-cta-dark); }
.catalog-btn:active { transform: translateY(1px); }
.catalog-btn svg  { width: 18px; height: 18px; flex-shrink: 0; }

.catalog-dropdown {
  position: absolute;
  top: 100%;
  left: 0;
  background: #fff;
  border: 1px solid var(--color-border);
  border-top: 2px solid var(--color-primary);
  min-width: 270px;
  box-shadow: var(--shadow-drop);
  display: none;
  z-index: 200;
  border-radius: 0 0 var(--radius-card) var(--radius-card);
}
.catalog-dropdown--open { display: block; }
.catalog-dropdown a {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px var(--gap-md);
  font-size: var(--fz-sm);
  color: var(--color-text);
  border-bottom: 1px solid var(--color-bg-light);
  transition: background .12s, color .12s, padding-left .12s;
}
.catalog-dropdown a:last-child { border-bottom: none; }
.catalog-dropdown a:hover {
  background: #f0f5ff;
  color: var(--color-primary);
  padding-left: 20px;
}
.catalog-dropdown a.link--inactive {
  opacity: .5;
  cursor: default;
  pointer-events: none;
}
.link--soon {
  font-size: var(--fz-xs);
  color: #999;
  margin-left: auto;
  padding-left: var(--gap-sm);
}

.navbar__links {
  display: flex;
  align-items: center;
  margin-left: var(--gap-sm);
}
.navbar__links a {
  display: flex;
  align-items: center;
  height: 46px;
  padding: 0 var(--gap-md);
  color: rgba(255,255,255,.82);
  font-size: var(--fz-sm);
  transition: color .15s, background .15s;
}
.navbar__links a:hover { color: #fff; background: rgba(255,255,255,.10); }

/* ===== BUTTONS ===== */
.btn {
  display: inline-flex;
  align-items: center;
  gap: var(--gap-sm);
  padding: 11px 24px;
  border-radius: var(--radius-btn);
  font-weight: 700;
  font-size: var(--fz-sm);
  letter-spacing: .2px;
  transition: background-color 180ms ease, box-shadow 180ms ease, transform 100ms ease;
  cursor: pointer;
  border: none;
  white-space: nowrap;
}
.btn:active { transform: translateY(1px); }
.btn--cta {
  background: var(--color-cta);
  color: #fff;
  box-shadow: 0 2px 6px rgba(245,158,11,.35);
}
.btn--cta:hover { background: var(--color-cta-dark); box-shadow: 0 4px 10px rgba(245,158,11,.4); }
.btn--primary {
  background: var(--color-primary);
  color: #fff;
  box-shadow: 0 2px 6px rgba(26,86,168,.25);
}
.btn--primary:hover { background: var(--color-primary-dark); box-shadow: 0 4px 10px rgba(26,86,168,.3); }
.btn--outline {
  border: 1.5px solid var(--color-primary);
  color: var(--color-primary);
  background: transparent;
}
.btn--outline:hover { background: var(--color-primary); color: #fff; }

/* ===== HERO ===== */
.hero {
  background: linear-gradient(135deg, #f0f5ff 0%, #e8f0fb 60%, #f3f6fa 100%);
  border-bottom: 1px solid #d0dbee;
  padding: var(--gap-xl) 0;
  position: relative;
  overflow: hidden;
}
.hero::before {
  content: '';
  position: absolute;
  top: -60px; right: -60px;
  width: 320px; height: 320px;
  background: radial-gradient(circle, rgba(26,86,168,.06) 0%, transparent 70%);
  pointer-events: none;
}
.hero__inner {
  display: flex;
  align-items: center;
  gap: var(--gap-xl);
}
.hero__content { flex: 1; }
.hero__label {
  display: inline-block;
  background: var(--color-cta);
  color: #fff;
  font-size: var(--fz-xs);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .6px;
  padding: 3px var(--gap-sm);
  border-radius: var(--radius-btn);
  margin-bottom: var(--gap-sm);
}
.hero__title {
  font-size: 36px;
  font-weight: 800;
  color: var(--color-primary);
  line-height: 1.2;
  margin-bottom: var(--gap-md);
}
.hero__sub {
  font-size: var(--fz-md);
  color: var(--color-text-muted);
  margin-bottom: var(--gap-lg);
  max-width: 420px;
  line-height: 1.6;
}
.hero__image     { flex-shrink: 0; width: 440px; }
.hero__image img { border-radius: var(--radius-card); }

/* ===== SECTION COMMON ===== */
.section       { padding: var(--gap-xl) 0; }
.section--gray { background: var(--color-bg-light); }
.section__head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  margin-bottom: var(--gap-lg);
}
.section__title { font-size: var(--fz-lg); font-weight: 700; }
.section__link  { font-size: var(--fz-sm); color: var(--color-primary); }
.section__link:hover { text-decoration: underline; }

/* ===== CATEGORIES ===== */
.categories__grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: var(--gap-md);
}
.cat-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 20px var(--gap-md) var(--gap-md);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-card);
  text-align: center;
  background: var(--color-bg);
}
.cat-card--active {
  cursor: pointer;
  transition: border-color .18s, box-shadow .18s, background .18s;
}
.cat-card--active:hover {
  border-color: var(--color-primary);
  background: #f0f5ff;
  box-shadow: 0 4px 12px rgba(26,86,168,.12);
}
.cat-card--active:hover .cat-card__icon { color: var(--color-primary); transform: scale(1.1); }
.cat-card--inactive { opacity: .45; cursor: default; }
.cat-card__icon {
  width: 44px;
  height: 44px;
  color: #5b8dd9;
  margin-bottom: 10px;
  transition: transform .2s, color .18s;
}
.cat-card--inactive .cat-card__icon { color: var(--color-text-muted); }
.cat-card__name {
  font-size: var(--fz-sm);
  font-weight: 600;
  line-height: 1.35;
  color: var(--color-text);
}
.cat-card--active:hover .cat-card__name { color: var(--color-primary); }
.cat-card__soon {
  font-size: var(--fz-xs);
  color: var(--color-text-muted);
  margin-top: var(--gap-xs);
}

/* ===== PRODUCT CARDS ===== */
.products__grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: var(--gap-md);
}
.product-card {
  position: relative;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-card);
  background: var(--color-bg);
  display: flex;
  flex-direction: column;
  transition: transform 200ms ease, box-shadow 200ms ease, border-color 200ms ease;
  overflow: hidden;
}
.product-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-hover);
  border-color: var(--color-primary);
}
.product-card__img-wrap {
  overflow: hidden;
  background: var(--color-bg-light);
  border-bottom: 1px solid var(--color-border);
  aspect-ratio: 1;
  padding: var(--gap-md);
  display: flex;
  align-items: center;
  justify-content: center;
}
.product-card__img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
  transition: transform 350ms ease;
}
.product-card:hover .product-card__img { transform: scale(1.06); }
.product-card__body {
  padding: 12px var(--gap-md) var(--gap-md);
  display: flex;
  flex-direction: column;
  flex: 1;
  gap: 6px;
}
.product-card__status {
  font-size: var(--fz-xs);
  font-weight: 600;
  color: #16a34a;
  display: flex;
  align-items: center;
  gap: 4px;
}
.product-card__status::before {
  content: '';
  display: inline-block;
  width: 6px; height: 6px;
  border-radius: 50%;
  background: #16a34a;
  flex-shrink: 0;
}
.product-card__name {
  font-size: var(--fz-sm);
  font-weight: 600;
  line-height: 1.45;
  color: var(--color-text);
}
.product-card__name:hover { color: var(--color-primary); }
.product-card__meta   { font-size: var(--fz-xs); color: var(--color-text-muted); }
.product-card__price-wrap { margin-top: auto; padding-top: var(--gap-sm); }

.price--old { font-size: var(--fz-sm); color: var(--color-text-muted); text-decoration: line-through; display: block; }
.price--current {
  font-size: clamp(14px, 3.5vw, 20px);
  font-weight: 800;
  line-height: 1.2;
  color: var(--color-primary);
  word-break: break-all;
}
.price--currency { font-size: var(--fz-sm); font-weight: 600; color: var(--color-text-muted); }
.product-card__btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  width: 100%;
  padding: 9px;
  margin-top: var(--gap-sm);
  background-color: var(--color-cta);
  color: #fff;
  border-radius: var(--radius-btn);
  font-weight: 700;
  font-size: var(--fz-sm);
  letter-spacing: .2px;
  transition: background-color 180ms ease, transform 100ms ease;
}
.product-card__btn:hover,
.product-card:hover .product-card__btn { background-color: var(--color-cta-dark); }
.product-card__btn:active              { transform: translateY(1px); }
.product-card__btn:disabled            { opacity: .55; cursor: default; }

/* ===== BRANDS ===== */
.brands-strip {
  background: var(--color-bg);
  border-top: 1px solid var(--color-border);
  border-bottom: 1px solid var(--color-border);
  padding: var(--gap-md) 0;
}
.brands__list {
  display: flex;
  align-items: center;
  justify-content: space-around;
  flex-wrap: wrap;
  gap: var(--gap-md) var(--gap-xl);
}
.brands__item {
  font-size: var(--fz-md);
  font-weight: 800;
  color: #c0c8d8;
  letter-spacing: -.2px;
  text-transform: uppercase;
  transition: color .18s;
  cursor: default;
}
.brands__item:hover { color: var(--color-primary); }

/* ===== ADVANTAGES ===== */
.advantages__grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: var(--gap-lg);
}
.adv-item {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: var(--gap-sm);
  padding: var(--gap-lg);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-card);
  background: #fff;
  border-top: 3px solid var(--color-primary);
}
.adv-item__icon {
  width: 40px; height: 40px;
  color: var(--color-primary);
  background: rgba(26,86,168,.08);
  border-radius: 8px;
  padding: 8px;
  box-sizing: content-box;
}
.adv-item__title { font-size: var(--fz-base); font-weight: 700; }
.adv-item__text  { font-size: var(--fz-sm); color: var(--color-text-muted); line-height: 1.6; }

/* ===== FOOTER ===== */
.footer {
  background: #1a2a4a;
  color: rgba(255,255,255,.72);
  padding: var(--gap-xl) 0 0;
}
.footer__grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: var(--gap-xl);
  padding-bottom: var(--gap-xl);
}
.footer__col-title { font-size: var(--fz-base); font-weight: 700; color: #fff; margin-bottom: var(--gap-md); }
.footer__links { display: flex; flex-direction: column; gap: var(--gap-sm); }
.footer__links a { font-size: var(--fz-sm); color: rgba(255,255,255,.6); transition: color .15s; }
.footer__links a:hover { color: #fff; }
.footer__text { font-size: var(--fz-sm); line-height: 1.75; color: rgba(255,255,255,.6); }
.footer__text a { color: rgba(255,255,255,.6); transition: color .15s; }
.footer__text a:hover { color: #fff; }
.footer__bottom {
  border-top: 1px solid rgba(255,255,255,.1);
  padding: var(--gap-md) 0;
  text-align: center;
  font-size: var(--fz-sm);
  color: rgba(255,255,255,.35);
}

/* ===== FLOATING BUTTON ===== */
.float-widget {
  position: fixed;
  bottom: var(--gap-lg);
  right: var(--gap-lg);
  z-index: 1000;
  display: flex;
  flex-direction: column-reverse;
  align-items: center;
  gap: var(--gap-sm);
}
.float-menu {
  display: flex;
  flex-direction: column-reverse;
  align-items: center;
  gap: var(--gap-sm);
  max-height: 0;
  overflow: hidden;
  opacity: 0;
  pointer-events: none;
  transition: max-height .25s ease, opacity .2s ease;
}
.float-menu--open {
  max-height: 200px;
  opacity: 1;
  pointer-events: auto;
}
.float-btn {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 2px 8px rgba(0,0,0,.22);
  transition: transform .15s, box-shadow .15s;
  cursor: pointer;
  text-decoration: none;
  border: none;
}
.float-btn:hover { transform: scale(1.08); box-shadow: 0 4px 12px rgba(0,0,0,.28); }
.float-btn svg   { width: 22px; height: 22px; }
.float-btn--toggle   { background: var(--color-primary); color: #fff; width: 54px; height: 54px; }
.float-btn--phone    { background: var(--color-primary); color: #fff; }
.float-btn--viber    { background: #7360f2;              color: #fff; }
.float-btn--telegram { background: #0088cc;              color: #fff; }

/* ===== BREADCRUMBS ===== */
.breadcrumbs {
  background: var(--color-bg-light);
  border-bottom: 1px solid var(--color-border);
  font-size: var(--fz-sm);
  color: var(--color-text-muted);
  position: relative;
}
.breadcrumbs__inner {
  display: flex;
  align-items: center;
  gap: var(--gap-xs);
  height: 36px;
  overflow: hidden;
}
.breadcrumbs a { color: var(--color-primary); }
.breadcrumbs a:hover { text-decoration: underline; }
.breadcrumbs__sep { color: var(--color-text-muted); margin: 0 2px; }

/* Mobile breadcrumbs: hidden by default */
.breadcrumbs__mobile { display: none; }

/* Toggle button */
.breadcrumbs__toggle {
  display: flex;
  align-items: center;
  gap: 6px;
  height: 36px;
  padding: 0;
  background: none;
  border: none;
  cursor: pointer;
  color: var(--color-text);
  font-size: var(--fz-sm);
  max-width: 100%;
}
.breadcrumbs__toggle svg { flex-shrink: 0; color: var(--color-text-muted); }
.breadcrumbs__toggle .breadcrumbs__sep { font-size: 18px; line-height: 1; margin: 0; }
.breadcrumbs__current {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: var(--color-text-muted);
}

/* Dropdown */
.breadcrumbs__dropdown {
  display: none;
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  background: var(--color-text);
  color: #fff;
  z-index: 500;
  padding: 4px 0;
  box-shadow: 0 4px 16px rgba(0,0,0,.25);
}
.breadcrumbs__dropdown.bc-open { display: block; }
.breadcrumbs__dropdown a {
  display: block;
  padding: 12px 16px;
  color: #fff;
  font-size: var(--fz-base);
  border-bottom: 1px solid rgba(255,255,255,.08);
}
.breadcrumbs__dropdown a:last-child { border-bottom: none; }
.breadcrumbs__dropdown a:hover { background: rgba(255,255,255,.1); }

/* Switch desktop→mobile at 768px */
@media (max-width: 768px) {
  .breadcrumbs__inner--desktop { display: none; }
  .breadcrumbs__mobile { display: block; }
}

/* ===== PAGE HEADER ===== */
.page-header { padding: var(--gap-lg) 0; }
.page-header__title { font-size: var(--fz-xl); font-weight: 800; }
@media (max-width: 480px) {
  .page-header { padding: var(--gap-md) 0; }
  .page-header__title { font-size: var(--fz-lg); }
}

/* ===== EMPTY STATE ===== */
.empty-state {
  text-align: center;
  padding: var(--gap-xl) 0;
}
.empty-state__icon {
  width: 64px;
  height: 64px;
  color: var(--color-border);
  margin: 0 auto var(--gap-md);
}
.empty-state__title {
  font-size: var(--fz-lg);
  font-weight: 700;
  margin-bottom: var(--gap-sm);
}
.empty-state__text {
  font-size: var(--fz-base);
  color: var(--color-text-muted);
  max-width: 400px;
  margin: 0 auto var(--gap-lg);
  line-height: 1.6;
}

/* ===== MOBILE NAV DRAWER ===== */
.mobile-nav {
  display: none;
  position: fixed;
  top: 0; left: -100%;
  width: 280px; height: 100vh;
  background: #fff;
  z-index: 1000;
  flex-direction: column;
  box-shadow: 4px 0 20px rgba(0,0,0,.15);
  transition: left 280ms ease;
  overflow-y: auto;
}
.mobile-nav--open { left: 0; display: flex; }
.mobile-nav__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px;
  border-bottom: 1px solid var(--color-border);
}
.mobile-nav__logo {
  font-size: 20px;
  font-weight: 800;
  color: var(--color-primary);
  text-decoration: none;
}
.mobile-nav__logo span { color: var(--color-cta); }
.mobile-nav__close {
  width: 36px; height: 36px;
  display: flex; align-items: center; justify-content: center;
  background: none; border: none;
  font-size: 22px; cursor: pointer; color: var(--color-text-muted);
  border-radius: 6px;
  transition: background .15s;
}
.mobile-nav__close:hover { background: var(--color-bg-light); }
.mobile-nav__section {
  padding: 12px 16px 0;
}
.mobile-nav__section-title {
  font-size: var(--fz-xs);
  font-weight: 700;
  color: var(--color-text-muted);
  text-transform: uppercase;
  letter-spacing: .6px;
  margin-bottom: 8px;
}
.mobile-nav__links {
  list-style: none;
  padding: 0; margin: 0;
}
.mobile-nav__links a {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 0;
  border-bottom: 1px solid var(--color-bg-light);
  font-size: var(--fz-base);
  color: var(--color-text);
  text-decoration: none;
}
.mobile-nav__links a:hover { color: var(--color-primary); }
.mobile-nav__phone {
  padding: 16px;
  margin-top: auto;
}
.mobile-nav__phone a {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--color-primary);
  font-weight: 700;
  font-size: var(--fz-base);
  text-decoration: none;
}
.mobile-nav-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,.4);
  z-index: 999;
}
.mobile-nav-overlay--open { display: block; }

/* Burger button in header */
.header__burger {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 40px; height: 40px;
  background: none; border: none;
  cursor: pointer;
  padding: 6px;
  border-radius: 6px;
  transition: background .15s;
  flex-shrink: 0;
}
.header__burger:hover { background: var(--color-bg-light); }
.header__burger span {
  display: block;
  height: 2px; width: 100%;
  background: var(--color-text);
  border-radius: 2px;
  transition: transform .2s, opacity .2s;
}

/* ===== RESPONSIVE ===== */
@media (max-width: 1024px) {
  .hero__image      { width: 280px; flex-shrink: 0; }
  .products__grid   { grid-template-columns: repeat(3, 1fr); }
  .categories__grid { grid-template-columns: repeat(3, 1fr); }
  .advantages__grid { grid-template-columns: repeat(2, 1fr); }
  .footer__grid     { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 768px) {
  /* Topbar */
  .topbar__schedule { display: none; }
  .topbar__inner { justify-content: flex-end; }

  /* Header */
  .header__inner {
    height: 58px;
    padding: 0;
    flex-wrap: nowrap;
    gap: var(--gap-sm);
  }
  .header__burger { display: flex; }
  .search         { display: none; }
  .header__actions { gap: 4px; }
  .header__action[title="Обрані товари"],
  .header__action[title="Порівняти товари"] { display: none; }
  .header__action { font-size: 0; }
  .header__action .icon-wrap svg { width: 26px; height: 26px; }

  /* Navbar */
  .navbar__inner { justify-content: space-between; }
  .navbar__links { display: none; }

  /* Homepage */
  .hero__inner      { flex-direction: column; }
  .hero__image      { width: 100%; max-width: 340px; margin: 0 auto; }
  .hero__title      { font-size: 24px; }
  .hero__sub        { font-size: var(--fz-base); }
  .categories__grid { grid-template-columns: repeat(2, 1fr); }
  .products__grid   { grid-template-columns: repeat(2, 1fr); }
  .advantages__grid { grid-template-columns: 1fr; }
  .footer__grid     { grid-template-columns: 1fr 1fr; gap: var(--gap-lg); }
  .section__head    { flex-direction: column; align-items: flex-start; gap: 4px; }

  /* Mobile nav */
  .mobile-nav { display: flex; }

  /* List view card on mobile: 2 columns, no right actions column */
  .products__grid--list .product-card {
    grid-template-columns: 110px 1fr;
  }
  /* Hide right actions column, show price+btn in body */
  .products__grid--list .product-card__list-actions { display: none; }
  .products__grid--list .product-card__price-wrap--grid { display: block; }
  .products__grid--list .product-card__btn--grid { display: flex; }
}
@media (max-width: 480px) {
  .header__inner { height: 54px; }
  .logo { font-size: 20px; }

  .hero__title   { font-size: 22px; }
  .categories__grid { grid-template-columns: repeat(2, 1fr); }
  .products__grid   { grid-template-columns: repeat(2, 1fr); }
  .footer__grid     { grid-template-columns: 1fr; }

  /* List view: switch to single column on very small */
  .products__grid--list .product-card {
    grid-template-columns: 1fr;
  }
  .products__grid--list .product-card__img-wrap {
    height: 160px;
    border-radius: var(--radius-card) var(--radius-card) 0 0;
    border-right: none;
    border-bottom: 1px solid var(--color-border);
  }
}

/* ════════════════════════════════════════════════════════════════
   PRODUCT CARD — link variants (catalog/product pages)
═══════════════════════════════════════════════════════════════════ */
a.product-card__img-wrap { display: block; text-decoration: none; }
a.product-card__name     { text-decoration: none; color: var(--color-text); }
a.product-card__name:hover { color: var(--color-primary); }

/* ════════════════════════════════════════════════════════════════
   CATALOG PAGE
═══════════════════════════════════════════════════════════════════ */
.filters-toggle {
  display: none;
  align-items: center;
  gap: var(--gap-sm);
  background: var(--color-primary);
  color: #fff;
  border: none;
  border-radius: var(--radius-btn);
  padding: 10px var(--gap-md);
  font-size: var(--fz-sm);
  font-weight: 600;
  cursor: pointer;
  margin-bottom: var(--gap-md);
  width: 100%;
  justify-content: center;
}

.catalog-layout {
  display: grid;
  grid-template-columns: 260px 1fr;
  gap: var(--gap-lg);
  align-items: start;
}

.filters {
  background: var(--color-bg);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-card);
  padding: var(--gap-md);
  position: sticky;
  top: 16px;
}

.filters__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: var(--gap-md);
}

.filters__title {
  font-size: var(--fz-base);
  font-weight: 700;
  color: var(--color-text);
}

.filters__close-btn {
  display: none;
  width: 28px;
  height: 28px;
  font-size: 20px;
  line-height: 1;
  align-items: center;
  justify-content: center;
  color: var(--color-text-muted);
  border-radius: 4px;
  transition: background 200ms ease;
}

.filters__close-btn:hover { background: var(--color-bg-light); }

.filters__group {
  margin-bottom: var(--gap-md);
  padding-bottom: var(--gap-md);
  border-bottom: 1px solid var(--color-border);
}

.filters__group:last-of-type {
  margin-bottom: var(--gap-sm);
}

.filters__group-title {
  font-size: var(--fz-xs);
  font-weight: 700;
  color: var(--color-text-muted);
  text-transform: uppercase;
  letter-spacing: .06em;
  margin-bottom: var(--gap-sm);
}

.filters__list {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.filter-item {
  display: flex;
  align-items: center;
  gap: var(--gap-sm);
  font-size: var(--fz-sm);
  color: var(--color-text);
  cursor: pointer;
}

.filter-item input[type="checkbox"] {
  width: 15px;
  height: 15px;
  accent-color: var(--color-primary);
  cursor: pointer;
  flex-shrink: 0;
}

.price-range {
  display: flex;
  align-items: center;
  gap: var(--gap-sm);
}

.price-range__input {
  width: 100%;
  padding: 7px 10px;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-btn);
  font-size: var(--fz-sm);
  font-family: var(--font);
  color: var(--color-text);
  background: var(--color-bg-light);
  transition: border-color 200ms ease;
}

.price-range__input:focus { outline: none; border-color: var(--color-primary); }
.price-range__sep { color: var(--color-text-muted); font-size: var(--fz-sm); flex-shrink: 0; }

.sidebar-cats { display: flex; flex-direction: column; gap: 4px; }
.sidebar-cats__item a {
  display: block;
  padding: 6px 10px;
  border-radius: var(--radius-btn);
  font-size: var(--fz-sm);
  color: var(--color-text);
  text-decoration: none;
  transition: background 200ms ease, color 200ms ease;
}
.sidebar-cats__item a:hover { background: var(--color-bg-light); }
.sidebar-cats__item--active a { background: var(--color-primary); color: #fff; font-weight: 600; }

.filters__reset {
  width: 100%;
  padding: 9px;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-btn);
  background: transparent;
  color: var(--color-text-muted);
  font-size: var(--fz-sm);
  font-family: var(--font);
  cursor: pointer;
  transition: border-color 200ms ease, color 200ms ease;
}
.filters__reset:hover { border-color: var(--color-primary); color: var(--color-primary); }

.toolbar {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: var(--gap-sm);
  margin-bottom: var(--gap-md);
  padding: 10px var(--gap-md);
  background: var(--color-bg-light);
  border-radius: var(--radius-btn);
  border: 1px solid var(--color-border);
  flex-wrap: wrap;
  overflow: hidden;
}

.toolbar__count { font-size: var(--fz-sm); color: var(--color-text-muted); margin-right: auto; white-space: nowrap; }
.toolbar__count strong { color: var(--color-text); font-weight: 700; }

.toolbar__sort {
  display: flex;
  align-items: center;
  gap: var(--gap-sm);
  font-size: var(--fz-sm);
  color: var(--color-text-muted);
  flex-wrap: wrap;
}

.toolbar__select {
  padding: 6px 10px;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-btn);
  font-size: var(--fz-sm);
  font-family: var(--font);
  color: var(--color-text);
  background: var(--color-bg);
  cursor: pointer;
}
.toolbar__select:focus { outline: none; border-color: var(--color-primary); }

.toolbar__modes {
  display: flex;
  align-items: center;
  gap: 4px;
}

.toolbar__mode-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-btn);
  background: var(--color-bg);
  color: var(--color-text-muted);
  cursor: pointer;
  transition: border-color 150ms ease, color 150ms ease;
}
.toolbar__mode-btn:hover { border-color: var(--color-primary); color: var(--color-primary); }
.toolbar__mode-btn--active { border-color: var(--color-primary); color: var(--color-primary); background: var(--color-bg-light); }

/* Toolbar custom dropdown */
.th-dd__btn {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 7px 12px;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-btn);
  background: var(--color-bg);
  font-size: var(--fz-sm);
  font-family: var(--font);
  color: var(--color-text);
  cursor: pointer;
  outline: none;
  transition: border-color 150ms ease, background 150ms ease;
  white-space: nowrap;
  min-width: 120px;
  justify-content: space-between;
}
.th-dd__btn--narrow { min-width: 60px; }
.th-dd__btn:hover { border-color: var(--color-primary); background: var(--color-bg-light); }
.th-dd__btn svg { flex-shrink: 0; color: var(--color-text-muted); transition: transform 150ms ease; }

.th-dd__list {
  background: var(--color-bg);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-card);
  box-shadow: 0 4px 16px rgba(0,0,0,0.10);
  overflow: hidden;
  min-width: 160px;
}
.th-dd__list--teleport {
  position: fixed;
  z-index: 9999;
}

.th-dd__item {
  display: block;
  width: 100%;
  padding: 9px 16px;
  background: none;
  border: none;
  font-size: var(--fz-sm);
  font-family: var(--font);
  color: var(--color-text);
  text-align: left;
  cursor: pointer;
  white-space: nowrap;
  transition: background 120ms ease, color 120ms ease;
}
.th-dd__item:hover { background: var(--color-bg-light); color: var(--color-primary); }
.th-dd__item--active { color: var(--color-primary); font-weight: 600; background: var(--color-bg-light); }

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

.products__grid--list {
  grid-template-columns: 1fr;
  gap: var(--gap-sm);
}

/* LIST MODE — horizontal card */
.products__grid--list .product-card {
  display: grid;
  grid-template-columns: 160px 1fr 160px;
  grid-template-rows: 1fr;
  min-height: 130px;
  align-items: stretch;
}

.products__grid--list .product-card__img-wrap {
  height: 100%;
  min-height: 130px;
  aspect-ratio: unset;
  border-bottom: none;
  border-right: 1px solid var(--color-border);
  border-radius: var(--radius-card) 0 0 var(--radius-card);
  padding: var(--gap-sm);
}

.products__grid--list .product-card__img {
  height: 100%;
  object-fit: contain;
}

.products__grid--list .product-card__body {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 4px;
  padding: var(--gap-md);
}

.products__grid--list .product-card__name {
  font-size: var(--fz-base);
}

/* Hide list-only column by default */
.product-card__list-actions { display: none; }

/* LIST MODE right column (desktop) */
.products__grid--list .product-card__list-actions {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: var(--gap-sm);
  padding: var(--gap-md);
  border-left: 1px solid var(--color-border);
}

.products__grid--list .product-card__list-actions .product-card__btn {
  width: 100%;
  white-space: nowrap;
}

/* In list mode (desktop) — hide price+btn from body */
.products__grid--list .product-card__price-wrap--grid,
.products__grid--list .product-card__btn--grid { display: none; }

/* In grid mode — price+btn in body show normally */
.products__grid--catalog .product-card__price-wrap--grid { display: block; }
.products__grid--catalog .product-card__btn--grid { display: flex; }

.filters-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,.45);
  z-index: 200;
}
.filters-overlay--active { display: block; }

/* ════════════════════════════════════════════════════════════════
   PRODUCT DETAIL PAGE
═══════════════════════════════════════════════════════════════════ */
.product-detail {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--gap-xl);
  align-items: start;
}

.product-gallery__main {
  position: relative;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-card);
  overflow: hidden;
  aspect-ratio: 1;
  background: #f8f8f8;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: var(--gap-md);
}

.product-gallery__main img { width: 100%; height: 100%; object-fit: contain; display: block; }

/* Fullscreen image viewer (carousel) */
.product-viewer {
  position: fixed;
  inset: 0;
  z-index: 10000;
  display: none;
  align-items: center;
  justify-content: center;
  background: rgba(0, 0, 0, 0.9);
}
.product-viewer.is-open { display: flex; }
.product-viewer__stage {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 100%;
  padding: 64px 24px;
  box-sizing: border-box;
}
.product-viewer__img {
  max-width: 88vw;
  max-height: 84vh;
  object-fit: contain;
  background: #fff;
  border-radius: 8px;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.4);
}
.product-viewer__close {
  position: absolute;
  top: 18px;
  right: 24px;
  width: 44px;
  height: 44px;
  font-size: 32px;
  line-height: 1;
  color: #fff;
  background: rgba(255, 255, 255, 0.12);
  border: none;
  border-radius: 50%;
  cursor: pointer;
  z-index: 2;
  transition: background 200ms ease;
}
.product-viewer__close:hover { background: rgba(255, 255, 255, 0.25); }
.product-viewer__nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 52px;
  height: 52px;
  font-size: 36px;
  line-height: 1;
  color: #fff;
  background: rgba(255, 255, 255, 0.12);
  border: none;
  border-radius: 50%;
  cursor: pointer;
  z-index: 2;
  transition: background 200ms ease;
}
.product-viewer__nav:hover { background: rgba(255, 255, 255, 0.28); }
.product-viewer__nav--prev { left: 24px; }
.product-viewer__nav--next { right: 24px; }
.product-viewer__counter {
  position: absolute;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%);
  color: #fff;
  font-size: 14px;
  background: rgba(255, 255, 255, 0.12);
  padding: 6px 14px;
  border-radius: 20px;
}

@media (max-width: 480px) {
  .product-viewer__stage { padding: 56px 12px; }
  .product-viewer__nav { width: 42px; height: 42px; font-size: 28px; }
  .product-viewer__nav--prev { left: 10px; }
  .product-viewer__nav--next { right: 10px; }
}

.product-gallery__thumbs {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: var(--gap-sm);
  margin-top: var(--gap-sm);
}

.product-gallery__thumb {
  border: 2px solid var(--color-border);
  border-radius: var(--radius-btn);
  overflow: hidden;
  aspect-ratio: 1;
  cursor: pointer;
  background: #f8f8f8;
  padding: 4px;
  transition: border-color 200ms ease;
}

.product-gallery__thumb img { width: 100%; height: 100%; object-fit: contain; display: block; }
.product-gallery__thumb--active,
.product-gallery__thumb:hover { border-color: var(--color-primary); }

.product-info__status {
  font-size: var(--fz-xs);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .06em;
  color: #27ae60;
  margin-bottom: var(--gap-xs);
  display: block;
}

.product-info__brand {
  font-size: var(--fz-sm);
  color: var(--color-text-muted);
  margin-bottom: var(--gap-xs);
  display: block;
}

.product-info__title {
  font-size: var(--fz-lg);
  font-weight: 800;
  color: var(--color-text);
  line-height: 1.25;
  margin: 0 0 var(--gap-md);
}

.product-info__price {
  font-size: 28px;
  font-weight: 800;
  color: var(--color-primary);
  margin-bottom: var(--gap-md);
}

.product-specs {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-bottom: var(--gap-md);
  padding: var(--gap-md);
  background: var(--color-bg-light);
  border-radius: var(--radius-btn);
}

.product-spec { display: flex; justify-content: space-between; font-size: var(--fz-sm); gap: var(--gap-sm); }
.product-spec__label { color: var(--color-text-muted); }
.product-spec__value { font-weight: 600; color: var(--color-text); text-align: right; }

.product-buy {
  display: flex;
  gap: var(--gap-sm);
  align-items: center;
  margin-bottom: var(--gap-md);
}

.qty-selector {
  display: flex;
  align-items: center;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-btn);
  overflow: hidden;
  flex-shrink: 0;
}

.qty-selector__btn {
  width: 36px;
  height: 44px;
  border: none;
  background: var(--color-bg-light);
  color: var(--color-text);
  font-size: 18px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 200ms ease;
}
.qty-selector__btn:hover { background: var(--color-border); }

.qty-selector__input {
  width: 44px;
  height: 44px;
  border: none;
  border-left: 1px solid var(--color-border);
  border-right: 1px solid var(--color-border);
  text-align: center;
  font-size: var(--fz-base);
  font-family: var(--font);
  font-weight: 600;
  color: var(--color-text);
  -moz-appearance: textfield;
}
.qty-selector__input::-webkit-inner-spin-button,
.qty-selector__input::-webkit-outer-spin-button { -webkit-appearance: none; }
.qty-selector__input:focus { outline: none; }

#p-add-to-cart { flex: 1; height: 44px; font-size: var(--fz-base); font-weight: 700; }

.product-info__compare {
  display: flex;
  align-items: center;
  gap: var(--gap-sm);
  background: none;
  border: none;
  color: var(--color-text-muted);
  font-size: var(--fz-sm);
  font-family: var(--font);
  cursor: pointer;
  padding: 0;
  margin-bottom: var(--gap-md);
  transition: color 200ms ease;
}
.product-info__compare:hover { color: var(--color-primary); }

.product-delivery {
  border-top: 1px solid var(--color-border);
  margin-top: var(--gap-md);
  padding-top: var(--gap-md);
  display: flex;
  flex-direction: column;
  gap: var(--gap-sm);
}

.product-delivery__item {
  display: flex;
  align-items: center;
  gap: var(--gap-sm);
  font-size: var(--fz-sm);
  color: var(--color-text);
}
.product-delivery__item svg { color: var(--color-primary); flex-shrink: 0; }

/* ═══ TABS ═══ */
.tabs { margin-top: var(--gap-xl); }

.tabs__nav {
  display: flex;
  border-bottom: 2px solid var(--color-border);
}

.tabs__btn {
  padding: 12px var(--gap-md);
  background: none;
  border: none;
  border-bottom: 2px solid transparent;
  margin-bottom: -2px;
  font-size: var(--fz-sm);
  font-weight: 600;
  font-family: var(--font);
  color: var(--color-text-muted);
  cursor: pointer;
  white-space: nowrap;
  transition: color 200ms ease, border-color 200ms ease;
}
.tabs__btn:hover  { color: var(--color-text); }
.tabs__btn--active { color: var(--color-primary); border-bottom-color: var(--color-primary); }

.tabs__panel { display: none; padding: var(--gap-lg) 0; }
.tabs__panel--active { display: block; }
.tabs__panel p { font-size: var(--fz-sm); line-height: 1.7; color: var(--color-text); max-width: 720px; margin-bottom: var(--gap-md); }

.specs-table { width: 100%; border-collapse: collapse; font-size: var(--fz-sm); }
.specs-table tr:nth-child(even) { background: var(--color-bg-light); }
.specs-table td { padding: 10px var(--gap-md); border: 1px solid var(--color-border); vertical-align: top; }
.specs-table td:first-child { color: var(--color-text-muted); width: 40%; font-weight: 500; }
.specs-table td:last-child { font-weight: 600; color: var(--color-text); }

.related { margin-top: var(--gap-xl); }
.related__title { font-size: var(--fz-md); font-weight: 700; color: var(--color-text); margin: 0 0 var(--gap-md); }

/* ════════════════════════════════════════════════════════════════
   COMPARE TABLE
═══════════════════════════════════════════════════════════════════ */
.compare-wrapper { overflow-x: auto; }

.compare-table { width: 100%; border-collapse: collapse; min-width: 500px; }
.compare-table th,
.compare-table td { padding: var(--gap-md); border: 1px solid var(--color-border); text-align: left; font-size: var(--fz-sm); vertical-align: top; }
.compare-table th { background: var(--color-bg-light); font-weight: 600; }
.compare-table tr:nth-child(even) td { background: var(--color-bg-light); }
.compare-table__label { color: var(--color-text-muted); font-weight: 500; width: 160px; background: var(--color-bg-light) !important; }

.compare-table__product { display: flex; flex-direction: column; align-items: center; gap: var(--gap-sm); text-align: center; }
.compare-table__product img { width: 80px; height: 80px; object-fit: contain; }
.compare-table__name { font-weight: 600; color: var(--color-primary); text-decoration: none; font-size: var(--fz-sm); line-height: 1.3; }
.compare-table__name:hover { text-decoration: underline; }
.compare-table__remove { font-size: var(--fz-xs); padding: 4px 10px; }
.compare-table__actions { display: flex; flex-direction: column; gap: var(--gap-sm); align-items: flex-start; }

/* ════════════════════════════════════════════════════════════════
   RESPONSIVE — CATALOG + PRODUCT
═══════════════════════════════════════════════════════════════════ */
@media (max-width: 1024px) {
  .catalog-layout { grid-template-columns: 220px 1fr; }
  .products__grid--catalog { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 768px) {
  .filters-toggle { display: flex; }
  .filters__close-btn { display: flex; }

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

  .filters {
    position: fixed;
    top: 0;
    right: -100%;
    bottom: 0;
    width: 300px;
    z-index: 300;
    border-radius: 0;
    overflow-y: auto;
    transition: right 300ms ease;
  }
  .filters--open { right: 0; }

  .product-detail { grid-template-columns: 1fr; gap: var(--gap-md); }
  .products__grid--catalog { grid-template-columns: repeat(2, 1fr); }
  .product-gallery__thumbs { grid-template-columns: repeat(5, 1fr); }

  /* Mobile list: 2 cols, hide right actions, show price+btn in body */
  .products__grid--list .product-card { grid-template-columns: 120px 1fr; }
  .products__grid--list .product-card__list-actions { display: none; }
  .products__grid--list .product-card__price-wrap--grid { display: block; }
  .products__grid--list .product-card__btn--grid { display: flex; }
}

@media (max-width: 480px) {
  /* grid mode: 2 columns; list mode: 1 column */
  .products__grid--catalog { grid-template-columns: repeat(2, 1fr); }
  .products__grid--list    { grid-template-columns: 1fr; }
  .product-buy { flex-wrap: wrap; }
  #p-add-to-cart { flex: unset; width: 100%; }
  .tabs__btn { padding: 10px 12px; font-size: var(--fz-xs); }

  /* Toolbar mobile: count on full row, controls on second row */
  .toolbar { padding: 8px 10px; gap: 6px; }
  .toolbar__count { width: 100%; margin-right: 0; }
  .toolbar__sort { width: 100%; justify-content: flex-end; }
  .th-dropdown__btn { font-size: 12px; padding: 6px 10px; min-width: 0; }
  .th-dropdown__list { font-size: 12px; }
}

/* === CART === */

[hidden] { display: none !important; }

.cart-layout {
  display: grid;
  grid-template-columns: 1fr 320px;
  gap: var(--gap-lg);
  align-items: start;
  padding-top: var(--gap-lg);
  padding-bottom: var(--gap-xl);
  min-width: 0;
  width: 100%;
}

.cart-table {
  display: flex;
  flex-direction: column;
  gap: var(--gap-sm);
  min-width: 0;
  overflow: hidden;
}

.cart-row {
  display: grid;
  grid-template-columns: 80px 1fr auto auto auto auto;
  gap: var(--gap-md);
  align-items: center;
  padding: var(--gap-md);
  background: var(--color-bg);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-card);
  min-width: 0;
  max-width: 100%;
}

.cart-row__img {
  width: 80px;
  height: 80px;
  flex-shrink: 0;
  background: var(--color-bg-light);
  border-radius: var(--radius-btn);
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
}
.cart-row__img img { max-width: 100%; max-height: 100%; object-fit: contain; display: block; }

.cart-row__info {
  min-width: 0;
  overflow: hidden;
}

.cart-row__name {
  display: block;
  color: var(--color-text);
  font-weight: 700;
  font-size: var(--fz-base);
  text-decoration: none;
  margin-bottom: 4px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.cart-row__name:hover { color: var(--color-primary); }

.cart-row__brand { font-size: var(--fz-sm); color: var(--color-text-muted); }

.cart-row__price { font-size: var(--fz-base); color: var(--color-text); white-space: nowrap; }

.cart-row__sum {
  font-size: var(--fz-base);
  font-weight: 700;
  color: var(--color-primary);
  white-space: nowrap;
  min-width: 100px;
  text-align: right;
}

.cart-row__remove {
  width: 32px;
  height: 32px;
  border: none;
  background: transparent;
  font-size: 24px;
  line-height: 1;
  color: var(--color-text-muted);
  cursor: pointer;
  border-radius: var(--radius-btn);
  transition: background 200ms ease;
  display: flex;
  align-items: center;
  justify-content: center;
}
.cart-row__remove:hover { background: var(--color-bg-light); color: #c00; }

.cart-summary {
  position: sticky;
  top: var(--gap-md);
  padding: var(--gap-lg);
  background: var(--color-bg);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-card);
  display: flex;
  flex-direction: column;
  gap: var(--gap-sm);
}

.cart-summary__row {
  display: flex;
  justify-content: space-between;
  font-size: var(--fz-base);
  color: var(--color-text);
}

.cart-summary__total {
  font-size: var(--fz-md);
  font-weight: 700;
  padding-top: var(--gap-md);
  border-top: 1px solid var(--color-border);
}
.cart-summary__total span:last-child { color: var(--color-primary); font-size: var(--fz-lg); }

.cart-summary .btn--cta {
  margin-top: var(--gap-md);
  height: 48px;
  font-size: var(--fz-base);
  font-weight: 700;
  justify-content: center;
}

.cart-clear {
  background: transparent;
  border: none;
  color: var(--color-text-muted);
  font-size: var(--fz-sm);
  cursor: pointer;
  text-decoration: underline;
  padding: var(--gap-sm);
  font-family: var(--font);
}
.cart-clear:hover { color: #c00; }

@media (max-width: 1024px) {
  .cart-layout { grid-template-columns: 1fr 280px; }
}

@media (max-width: 768px) {
  .cart-layout {
    grid-template-columns: 1fr;
  }

  .cart-summary { position: static; }

  .cart-row {
    grid-template-columns: 72px 1fr auto;
    grid-template-areas:
      "img info remove"
      "img price price"
      "qty qty sum";
    gap: var(--gap-sm);
  }

  .cart-row__img    { grid-area: img; width: 72px; height: 72px; }
  .cart-row__info   { grid-area: info; min-width: 0; }
  .cart-row__remove { grid-area: remove; }
  .cart-row__price  { grid-area: price; font-size: var(--fz-sm); color: var(--color-text-muted); }
  .cart-row__qty    { grid-area: qty; }
  .cart-row__sum    { grid-area: sum; min-width: 0; }
  .cart-row__name   { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 100%; }
}

/* === CHECKOUT (old bagisto onepage — redirects to new checkout) === */

.checkout-form-cols {
  display: flex;
  flex-direction: column;
  gap: var(--gap-lg);
}

.form-block {
  padding: var(--gap-lg);
  background: var(--color-bg);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-card);
}

.form-block__title {
  font-size: var(--fz-md);
  font-weight: 700;
  margin-bottom: var(--gap-md);
  color: var(--color-text);
}

.form-group {
  margin-bottom: var(--gap-md);
}
.form-block .form-group:last-child {
  margin-bottom: 0;
}

.form-group__label {
  display: block;
  font-size: var(--fz-sm);
  font-weight: 700;
  margin-bottom: 4px;
  color: var(--color-text);
}

.form-group__input {
  display: block;
  width: 100%;
  height: 44px;
  padding: 0 14px;
  font-family: inherit;
  font-size: var(--fz-base);
  color: var(--color-text);
  background: var(--color-bg);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-btn);
  transition: border-color 200ms;
}
.form-group__input:focus {
  outline: none;
  border-color: var(--color-primary);
}

.form-group__textarea {
  height: auto;
  padding: 12px 14px;
  line-height: 1.5;
  resize: vertical;
  min-height: 80px;
}

.form-group__input--error {
  border-color: #c00;
}

.form-group__error {
  color: #c00;
  font-size: var(--fz-sm);
  margin-top: 4px;
}

.radio-group {
  display: flex;
  flex-direction: column;
  gap: var(--gap-sm);
}

.radio-item {
  display: flex;
  align-items: center;
  gap: var(--gap-sm);
  cursor: pointer;
  font-size: var(--fz-base);
  color: var(--color-text);
}

.radio-item input[type="radio"] {
  accent-color: var(--color-primary);
  width: 18px;
  height: 18px;
  margin: 0;
  cursor: pointer;
}

.address-fields {
  margin-top: var(--gap-md);
}

.checkout-summary {
  position: sticky;
  top: var(--gap-md);
  padding: var(--gap-lg);
  background: var(--color-bg);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-card);
  display: flex;
  flex-direction: column;
  gap: var(--gap-sm);
}

.checkout-summary__title {
  font-size: var(--fz-md);
  font-weight: 700;
  margin-bottom: var(--gap-sm);
  color: var(--color-text);
}

.checkout-summary__list {
  display: flex;
  flex-direction: column;
  gap: var(--gap-sm);
  padding-bottom: var(--gap-md);
  border-bottom: 1px solid var(--color-border);
}

.checkout-summary__item {
  display: grid;
  grid-template-columns: 1fr auto auto;
  gap: var(--gap-sm);
  align-items: baseline;
  font-size: var(--fz-sm);
}

.checkout-summary__item-name {
  color: var(--color-text);
  font-size: var(--fz-sm);
  line-height: 1.3;
}

.checkout-summary__item-qty {
  color: var(--color-text-muted);
  font-size: var(--fz-sm);
  white-space: nowrap;
}

.checkout-summary__item-sum {
  color: var(--color-text);
  font-weight: 700;
  font-size: var(--fz-sm);
  white-space: nowrap;
  text-align: right;
}

.checkout-summary__total {
  display: flex;
  justify-content: space-between;
  font-size: var(--fz-md);
  font-weight: 700;
  padding-top: var(--gap-sm);
}
.checkout-summary__total span:last-child {
  color: var(--color-primary);
  font-size: var(--fz-lg);
}

.checkout-summary .btn--cta {
  margin-top: var(--gap-sm);
  height: 48px;
  font-size: var(--fz-base);
  font-weight: 700;
}

.thank-you-wrap {
  padding: var(--gap-xl) 0;
}

.thank-you {
  max-width: 540px;
  margin: 0 auto;
  text-align: center;
  padding: var(--gap-xl);
  background: var(--color-bg);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-card);
}

.thank-you__icon {
  width: 64px;
  height: 64px;
  color: var(--color-primary);
  margin: 0 auto var(--gap-md);
  display: flex;
  align-items: center;
  justify-content: center;
}
.thank-you__icon svg {
  width: 100%;
  height: 100%;
}

.thank-you__title {
  font-size: var(--fz-xl);
  font-weight: 700;
  color: var(--color-text);
  margin-bottom: var(--gap-md);
}

.thank-you__order {
  font-size: var(--fz-lg);
  color: var(--color-primary);
  font-weight: 700;
  margin-bottom: var(--gap-md);
}

.thank-you__text {
  font-size: var(--fz-base);
  color: var(--color-text-muted);
  margin-bottom: var(--gap-lg);
  line-height: 1.5;
}

.thank-you .btn--cta {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 48px;
  padding: 0 var(--gap-lg);
}

@media (max-width: 1024px) {
  .checkout-layout { grid-template-columns: 1fr 280px; }
}

@media (max-width: 768px) {
  .checkout-layout { grid-template-columns: 1fr; }
  .checkout-summary { position: static; }
  .thank-you { padding: var(--gap-lg); }
}

/* === INFO PAGES === */

.info-page {
  padding: var(--gap-lg) 0 var(--gap-xl);
}

.info-section {
  margin-bottom: 40px;
}

.info-section h2 {
  font-size: var(--fz-lg);
  font-weight: 700;
  border-bottom: 1px solid var(--color-border);
  padding-bottom: 12px;
  margin-bottom: 20px;
  color: var(--color-text);
}

.info-section p {
  line-height: 1.7;
  margin-bottom: 12px;
  color: var(--color-text);
}

.info-section a {
  color: var(--color-primary);
  text-decoration: none;
}
.info-section a:hover {
  text-decoration: underline;
}

.info-list {
  list-style: none;
  padding-left: 0;
}
.info-list li {
  position: relative;
  padding-left: 24px;
  margin-bottom: 10px;
  line-height: 1.6;
  color: var(--color-text);
}
.info-list li::before {
  content: '';
  position: absolute;
  left: 0;
  top: 7px;
  width: 8px;
  height: 8px;
  background: var(--color-primary);
  border-radius: 1px;
}

.info-cta {
  background: var(--color-bg-light);
  padding: 32px;
  border-radius: var(--radius-card);
  text-align: center;
  margin-bottom: 40px;
}
.info-cta h2 {
  font-size: var(--fz-lg);
  font-weight: 700;
  color: var(--color-text);
  margin-bottom: 10px;
}
.info-cta p {
  color: var(--color-text-muted);
  margin-bottom: 0;
}

.info-cta__buttons {
  display: flex;
  gap: 12px;
  justify-content: center;
  margin-top: 20px;
  flex-wrap: wrap;
}

.info-contacts-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 40px;
}

.info-contacts-grid h2 {
  font-size: var(--fz-lg);
  font-weight: 700;
  border-bottom: 1px solid var(--color-border);
  padding-bottom: 12px;
  margin-bottom: 20px;
  color: var(--color-text);
}

.info-contacts {
  display: block;
}
.info-contacts dt {
  font-weight: 600;
  color: var(--color-text-muted);
  font-size: var(--fz-sm);
  margin-top: 16px;
}
.info-contacts dt:first-child {
  margin-top: 0;
}
.info-contacts dd {
  margin-left: 0;
  color: var(--color-text);
  margin-top: 4px;
  font-size: var(--fz-base);
}
.info-contacts a {
  color: var(--color-primary);
  text-decoration: none;
}
.info-contacts a:hover {
  text-decoration: underline;
}

.info-messenger {
  display: inline-block;
  padding: 6px 14px;
  border: 1px solid var(--color-primary);
  border-radius: 6px;
  margin-right: 8px;
  font-size: var(--fz-sm);
  color: var(--color-primary);
  text-decoration: none;
  transition: background 150ms, color 150ms;
}
.info-messenger:hover {
  background: var(--color-primary);
  color: #fff;
}

ol.info-list {
  counter-reset: step;
  padding-left: 0;
}
ol.info-list li {
  counter-increment: step;
  padding-left: 32px;
}
ol.info-list li::before {
  content: counter(step);
  background: var(--color-primary);
  color: #fff;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: var(--fz-xs);
  font-weight: 700;
  line-height: 1;
  top: 2px;
  left: 0;
}

@media (max-width: 768px) {
  .info-contacts-grid { grid-template-columns: 1fr; }
  .info-cta { padding: 24px 16px; }
}

/* === PRODUCT CARD ICONS === */
.product-card__actions {
  position: absolute;
  top: 12px;
  right: 12px;
  display: flex;
  flex-direction: column;
  gap: var(--gap-sm);
  z-index: 2;
  opacity: 0;
  transform: translateX(6px);
  transition: opacity 180ms ease, transform 180ms ease;
  pointer-events: none;
}
.product-card:hover .product-card__actions,
.product-card__actions:focus-within {
  opacity: 1;
  transform: translateX(0);
  pointer-events: auto;
}

.product-card__icon-btn {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: #fff;
  border: 1px solid var(--color-border);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  color: var(--color-text-muted);
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
  transition: color 150ms ease, background 150ms ease, border-color 150ms ease, transform 150ms ease;
  padding: 0;
}

.product-card__icon-btn:hover {
  background: var(--color-bg-light);
  transform: scale(1.05);
}

.product-card__icon-btn svg {
  display: block;
}

.product-card__fav.is-active {
  color: var(--color-cta);
  border-color: var(--color-cta);
}

.product-card__fav.is-active svg {
  fill: var(--color-cta);
}

#favorites-grid {
  display: grid !important;
  grid-template-columns: repeat(auto-fill, minmax(240px, 280px)) !important;
  gap: var(--gap-md);
  justify-content: start;
}

.product-card__compare.is-active {
  color: #fff;
  background: var(--color-primary);
  border-color: var(--color-primary);
}

@media (max-width: 768px) {
  .product-card__actions {
    top: 8px;
    right: 8px;
    gap: 6px;
    opacity: 1;
    transform: translateX(0);
    pointer-events: auto;
  }
  .product-card__icon-btn {
    width: 32px;
    height: 32px;
  }
  .product-card__icon-btn svg {
    width: 16px;
    height: 16px;
  }
}

/* === PRODUCT INFO ACTIONS === */
.product-info__actions {
  display: flex;
  gap: var(--gap-sm);
  margin-top: var(--gap-md);
  flex-wrap: wrap;
}

.product-info__action {
  display: inline-flex;
  align-items: center;
  gap: var(--gap-xs);
  padding: 10px 18px;
  background: #fff;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-btn);
  color: var(--color-text-muted);
  font-family: inherit;
  font-size: var(--fz-sm);
  font-weight: 600;
  cursor: pointer;
  transition: color 150ms ease, background 150ms ease, border-color 150ms ease;
}

.product-info__action:hover {
  background: var(--color-bg-light);
  color: var(--color-text);
}

.product-info__action svg {
  flex-shrink: 0;
  transition: fill 150ms ease;
}

.product-info__action--fav.is-active {
  color: var(--color-cta);
  border-color: var(--color-cta);
  background: rgba(245, 166, 35, 0.06);
}

.product-info__action--fav.is-active svg {
  fill: var(--color-cta);
}

.product-info__action--cmp.is-active {
  color: var(--color-primary);
  border-color: var(--color-primary);
  background: rgba(30, 95, 187, 0.06);
}

@media (max-width: 480px) {
  .product-info__actions {
    flex-direction: column;
    align-items: stretch;
  }
  .product-info__action {
    justify-content: center;
  }
}

/* ── Shimmer skeleton ── */
@keyframes shimmer-wave {
  0%   { background-position: -400px 0; }
  100% { background-position: 400px 0; }
}
.shimmer {
  background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
  background-size: 800px 100%;
  animation: shimmer-wave 1.4s infinite linear;
}

/* ── Catalog main area ── */
.catalog-main { flex: 1; min-width: 0; }

/* ── Load more ── */
.load-more-wrap {
  display: flex;
  justify-content: center;
  margin-top: 32px;
}
.btn--outline {
  background: transparent;
  border: 2px solid var(--color-primary);
  color: var(--color-primary);
  padding: 10px 32px;
  border-radius: 8px;
  font-size: var(--fz-sm);
  font-weight: 600;
  cursor: pointer;
  transition: background .2s, color .2s;
}
.btn--outline:hover { background: var(--color-primary); color: #fff; }
.btn--outline:disabled { opacity: .5; cursor: not-allowed; }

/* ── Out of stock status ── */
.product-card__status--out { color: #c0392b; }

/* ── Category description ── */
.category-description {
  margin-bottom: 24px;
  color: var(--color-text-secondary);
  font-size: var(--fz-sm);
  line-height: 1.6;
}

/* ── Product page extras ── */
.product-info__status--out { color: #c0392b; }

.product-info__short-desc {
  font-size: var(--fz-sm);
  color: var(--color-text-secondary);
  line-height: 1.6;
  margin: 12px 0 20px;
}

/* Price HTML from Bagisto */
.product-info__price .final-price {
  font-size: 2rem;
  font-weight: 800;
  color: var(--color-text);
  line-height: 1.1;
}

/* Tabs panels — controlled via JS class toggle */

/* ── Cart extras ── */
.cart-summary__title {
  font-size: var(--fz-md);
  font-weight: 700;
  margin-bottom: 16px;
  color: var(--color-text);
}

.cart-row__sku {
  font-size: var(--fz-xs);
  color: var(--color-text-muted);
  margin-top: 4px;
}

.cart-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 16px;
  margin-top: 8px;
  border-top: 1px solid var(--color-border);
}

.cart-continue {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: var(--fz-sm);
  color: var(--color-primary);
  text-decoration: none;
  font-weight: 600;
}
.cart-continue:hover { text-decoration: underline; }
.cart-continue svg { flex-shrink: 0; }

/* ===== DYNAMIC FILTERS (v-filters) ===== */
.th-filters {
  width: 100%;
}

.th-filters__header {
  display: flex;
  align-items: flex-end;
  justify-content: flex-end;
  margin-bottom: 8px;
}

.th-filters__header span {
  font-size: var(--fz-sm);
  font-weight: 700;
  color: var(--color-text-muted);
  text-transform: uppercase;
  letter-spacing: .06em;
}

.th-filters__clear {
  font-size: var(--fz-xs);
  color: var(--color-primary);
  background: none;
  border: none;
  cursor: pointer;
  padding: 0;
  text-decoration: underline;
}

.th-filter-group {
  border-bottom: 1px solid var(--color-border);
  margin-bottom: 4px;
}

.th-filter-group:last-child {
  border-bottom: none;
}

.th-filter-group__head {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: none;
  border: none;
  padding: 10px 0;
  font-size: var(--fz-sm);
  font-weight: 600;
  color: var(--color-text);
  cursor: pointer;
  text-align: left;
}

.th-filter-group__head svg {
  flex-shrink: 0;
  transition: transform 200ms ease;
  color: var(--color-text-muted);
}

.th-filter-group__head--open svg {
  transform: rotate(180deg);
}

.th-filter-group__body {
  padding-bottom: 10px;
}

.th-filter-options {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 4px;
  margin: 0;
  padding: 0;
}

.th-filter-option__label {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: var(--fz-sm);
  color: var(--color-text);
  cursor: pointer;
  padding: 3px 0;
  user-select: none;
}

.th-filter-option__label:hover {
  color: var(--color-primary);
}

.th-filter-option__check {
  appearance: none;
  -webkit-appearance: none;
  position: absolute;
  width: 0;
  height: 0;
  opacity: 0;
  pointer-events: none;
}

.th-filter-option__box {
  width: 16px;
  height: 16px;
  border: 2px solid var(--color-border);
  border-radius: 3px;
  flex-shrink: 0;
  display: inline-block;
  position: relative;
  transition: border-color 150ms ease, background 150ms ease;
}

.th-filter-option__label:hover .th-filter-option__box {
  border-color: var(--color-primary);
}

.th-filter-option__check:checked + .th-filter-option__box {
  background: var(--color-primary);
  border-color: var(--color-primary);
}

.th-filter-option__check:checked + .th-filter-option__box::after {
  content: '';
  position: absolute;
  left: 3px;
  top: 0px;
  width: 5px;
  height: 9px;
  border: 2px solid #fff;
  border-top: none;
  border-left: none;
  transform: rotate(45deg);
}

.th-filter-loadmore {
  margin-top: 8px;
  font-size: var(--fz-xs);
  color: var(--color-primary);
  background: none;
  border: 1px solid var(--color-primary);
  border-radius: 4px;
  padding: 4px 10px;
  cursor: pointer;
  transition: background 150ms ease, color 150ms ease;
}

.th-filter-loadmore:hover {
  background: var(--color-primary);
  color: #fff;
}

.th-filter-loadmore:disabled {
  opacity: .5;
  cursor: not-allowed;
}

.th-filter-empty {
  font-size: var(--fz-xs);
  color: var(--color-text-muted);
  padding: 6px 0;
}

/* ===== RANGE SLIDER ===== */
.th-range-slider {
  padding: 4px 0 8px;
}

.th-range-slider__label {
  display: flex;
  flex-direction: column;
  gap: 2px;
  font-size: var(--fz-xs);
  color: var(--color-text-muted);
  margin-bottom: 10px;
}

.th-range-slider__value {
  font-size: var(--fz-sm);
  font-weight: 600;
  color: var(--color-text);
  word-break: break-all;
}

.th-range-slider__track-wrap {
  position: relative;
  height: 36px;
  display: flex;
  align-items: center;
}

.th-range-slider__track {
  position: absolute;
  left: 0;
  right: 0;
  height: 4px;
  background: var(--color-border);
  border-radius: 2px;
}

.th-range-slider__progress {
  position: absolute;
  top: 0;
  height: 4px;
  background: var(--color-primary);
  border-radius: 2px;
}

.th-range-slider__input {
  position: absolute;
  left: 0;
  width: 100%;
  height: 4px;
  background: transparent;
  appearance: none;
  -webkit-appearance: none;
  pointer-events: none;
  outline: none;
}

.th-range-slider__input::-webkit-slider-thumb {
  appearance: none;
  -webkit-appearance: none;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: #fff;
  border: 2px solid var(--color-primary);
  box-shadow: 0 1px 4px rgba(0,0,0,.15);
  cursor: pointer;
  pointer-events: auto;
}

.th-range-slider__input::-moz-range-thumb {
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: #fff;
  border: 2px solid var(--color-primary);
  box-shadow: 0 1px 4px rgba(0,0,0,.15);
  cursor: pointer;
  pointer-events: auto;
}

/* ===== CHECKOUT ===== */
.checkout-layout {
  display: grid;
  grid-template-columns: 1fr 420px;
  gap: 32px;
  align-items: start;
}

.checkout-form-col {}

.checkout-summary-col {}

.checkout-section-title {
  font-size: var(--fz-lg);
  font-weight: 700;
  color: var(--color-text);
  margin-bottom: 20px;
}

.checkout-login-hint {
  font-size: var(--fz-sm);
  color: var(--color-text-muted);
  margin-top: 16px;
}

.checkout-login-hint a {
  color: var(--color-primary);
  text-decoration: underline;
}

.checkout-summary {
  background: var(--color-bg);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-card);
  padding: var(--gap-lg);
  position: sticky;
  top: 16px;
}

.checkout-items {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-bottom: 20px;
  padding-bottom: 20px;
  border-bottom: 1px solid var(--color-border);
}

.checkout-item {
  display: flex;
  gap: 12px;
  align-items: center;
}

.checkout-item__img {
  width: 60px;
  height: 60px;
  object-fit: contain;
  border-radius: 6px;
  border: 1px solid var(--color-border);
  flex-shrink: 0;
}

.checkout-item__info {
  flex: 1;
  min-width: 0;
}

.checkout-item__name {
  font-size: var(--fz-sm);
  font-weight: 600;
  color: var(--color-text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.checkout-item__qty {
  font-size: var(--fz-xs);
  color: var(--color-text-muted);
  margin-top: 2px;
}

.checkout-item__total {
  font-size: var(--fz-sm);
  font-weight: 700;
  color: var(--color-text);
  white-space: nowrap;
}

.checkout-totals {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-bottom: 20px;
}

.checkout-total-row {
  display: flex;
  justify-content: space-between;
  font-size: var(--fz-sm);
  color: var(--color-text-muted);
}

.checkout-total-row--grand {
  font-size: var(--fz-base);
  font-weight: 700;
  color: var(--color-text);
  padding-top: 8px;
  border-top: 1px solid var(--color-border);
}

.checkout-place-btn {
  width: 100%;
  font-size: var(--fz-base);
  padding: 14px;
}

/* ===== SUCCESS PAGE ===== */
.success-page {
  max-width: 520px;
  margin: 40px auto;
  text-align: center;
  padding: 48px var(--gap-lg);
  background: var(--color-bg);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-card);
}

.success-page__icon {
  color: #22c55e;
  margin-bottom: 20px;
}

.success-page__title {
  font-size: 24px;
  font-weight: 700;
  color: var(--color-text);
  margin-bottom: 12px;
}

.success-page__order {
  font-size: var(--fz-base);
  color: var(--color-text-muted);
  margin-bottom: 12px;
}

.success-page__order a {
  color: var(--color-primary);
  font-weight: 600;
}

.success-page__text {
  font-size: var(--fz-sm);
  color: var(--color-text-muted);
  margin-bottom: 28px;
  line-height: 1.6;
}

.success-page__actions {
  display: flex;
  gap: 12px;
  justify-content: center;
  flex-wrap: wrap;
}

/* ===== AUTH (sign-in / sign-up) ===== */
.auth-wrap {
  display: flex;
  justify-content: center;
  padding: 32px 0 48px;
}

.auth-card {
  width: 100%;
  max-width: 420px;
  background: var(--color-bg);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-card);
  padding: 36px 32px;
}

.auth-card__title {
  font-size: 22px;
  font-weight: 700;
  color: var(--color-text);
  margin-bottom: 24px;
  text-align: center;
}

.auth-field {
  margin-bottom: 16px;
}

.auth-field__label {
  display: block;
  font-size: var(--fz-sm);
  font-weight: 600;
  color: var(--color-text);
  margin-bottom: 6px;
}

.auth-field__input,
.auth-field input {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-btn);
  font-size: var(--fz-sm);
  font-family: var(--font);
  color: var(--color-text);
  background: var(--color-bg);
  transition: border-color 150ms ease;
}

.auth-field__input:focus,
.auth-field input:focus {
  outline: none;
  border-color: var(--color-primary);
}

.auth-card__actions {
  display: flex;
  justify-content: flex-end;
  margin-bottom: 16px;
}

.auth-card__forgot {
  font-size: var(--fz-xs);
  color: var(--color-primary);
  text-decoration: underline;
}

.auth-card__submit {
  width: 100%;
  margin-top: 8px;
  padding: 12px;
  font-size: var(--fz-base);
}

.auth-card__footer {
  text-align: center;
  font-size: var(--fz-sm);
  color: var(--color-text-muted);
  margin-top: 20px;
}

.auth-card__footer a {
  color: var(--color-primary);
  font-weight: 600;
  text-decoration: underline;
}

/* Checkout responsive */
@media (max-width: 1024px) {
  .checkout-layout { grid-template-columns: 1fr 340px; }
}
@media (max-width: 900px) {
  .checkout-layout {
    grid-template-columns: 1fr;
  }
  .checkout-summary {
    position: static;
  }
}
@media (max-width: 480px) {
  .checkout-section-title { font-size: var(--fz-base); }
}

/* ═══════════════════════════════════════════════
   CONTACT FORM
═══════════════════════════════════════════════ */
.contact-form__grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--gap-md);
}
@media (max-width: 768px) {
  .contact-form__grid { grid-template-columns: 1fr; }
}

/* ═══════════════════════════════════════════════
   ALERTS
═══════════════════════════════════════════════ */
.alert {
  padding: 12px 16px;
  border-radius: var(--radius-btn);
  margin-bottom: var(--gap-md);
  font-size: var(--fz-sm);
  font-weight: 500;
}
.alert--success {
  background: #ecfdf5;
  border: 1px solid #6ee7b7;
  color: #065f46;
}
.alert--error {
  background: #fef2f2;
  border: 1px solid #fca5a5;
  color: #991b1b;
}

/* ═══════════════════════════════════════════════
   ACCOUNT LAYOUT
═══════════════════════════════════════════════ */
.account-layout {
  display: grid;
  grid-template-columns: 240px 1fr;
  gap: var(--gap-lg);
  align-items: start;
  padding-bottom: var(--gap-xl);
}
.account-sidebar {
  background: var(--color-bg);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-card);
  overflow: hidden;
  position: sticky;
  top: 16px;
}
.account-sidebar__user {
  display: flex;
  align-items: center;
  gap: var(--gap-md);
  padding: var(--gap-md);
  border-bottom: 1px solid var(--color-border);
  background: var(--color-bg-light);
}
.account-sidebar__avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: var(--color-primary);
  color: #fff;
  font-weight: 700;
  font-size: var(--fz-base);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.account-sidebar__name {
  font-weight: 600;
  font-size: var(--fz-sm);
  color: var(--color-text);
}
.account-sidebar__email {
  font-size: var(--fz-xs);
  color: var(--color-text-muted);
  margin-top: 2px;
}
.account-nav { padding: 8px 0; }
.account-nav__link {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px var(--gap-md);
  font-size: var(--fz-sm);
  color: var(--color-text);
  transition: background .12s, color .12s;
}
.account-nav__link:hover { background: var(--color-bg-light); color: var(--color-primary); }
.account-nav__link--active { color: var(--color-primary); font-weight: 600; background: rgba(30,95,187,.06); }
.account-nav__link--danger { color: #c00; }
.account-nav__link--danger:hover { background: #fff0f0; color: #900; }
.account-nav__divider { height: 1px; background: var(--color-border); margin: 8px 0; }

.account-content {
  background: var(--color-bg);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-card);
  padding: var(--gap-lg);
}
.account-content__title {
  font-size: var(--fz-lg);
  font-weight: 700;
  margin-bottom: var(--gap-lg);
  padding-bottom: var(--gap-md);
  border-bottom: 1px solid var(--color-border);
}

/* Orders table */
.orders-table { width: 100%; border-collapse: collapse; font-size: var(--fz-sm); }
.orders-table th {
  text-align: left;
  padding: 10px var(--gap-md);
  background: var(--color-bg-light);
  border-bottom: 2px solid var(--color-border);
  font-weight: 600;
  color: var(--color-text-muted);
  white-space: nowrap;
}
.orders-table td {
  padding: 12px var(--gap-md);
  border-bottom: 1px solid var(--color-border);
  vertical-align: middle;
}
.orders-table tr:last-child td { border-bottom: none; }
.orders-table tr:hover td { background: var(--color-bg-light); }
.order-status {
  display: inline-block;
  padding: 3px 10px;
  border-radius: 20px;
  font-size: var(--fz-xs);
  font-weight: 600;
}
.order-status--pending    { background: #fef3c7; color: #92400e; }
.order-status--processing { background: #dbeafe; color: #1e40af; }
.order-status--completed  { background: #d1fae5; color: #065f46; }
.order-status--canceled   { background: #fee2e2; color: #991b1b; }

/* Profile form */
.profile-form { max-width: 560px; }
.profile-form__grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--gap-md);
}

@media (max-width: 900px) {
  .account-layout { grid-template-columns: 1fr; }
  .account-sidebar { position: static; }
}
@media (max-width: 640px) {
  .profile-form__grid { grid-template-columns: 1fr; }

  /* Orders table → scrollable on mobile */
  .account-content { padding: var(--gap-md); overflow-x: auto; }
  .orders-table { min-width: 480px; }

  /* Hide less important columns */
  .orders-table th:nth-child(4),
  .orders-table td:nth-child(4) { display: none; }
}
@media (max-width: 480px) {
  .orders-table th:nth-child(3),
  .orders-table td:nth-child(3) { display: none; }
}

/* CMS pages */
.cms-content { line-height: 1.8; font-size: var(--fz-base); }
.cms-content h1, .cms-content h2, .cms-content h3 { margin: var(--gap-lg) 0 var(--gap-md); font-weight: 700; }
.cms-content h1 { font-size: 1.75rem; }
.cms-content h2 { font-size: 1.375rem; }
.cms-content h3 { font-size: 1.125rem; }
.cms-content p { margin-bottom: var(--gap-md); }
.cms-content ul, .cms-content ol { margin: 0 0 var(--gap-md) var(--gap-lg); }
.cms-content li { margin-bottom: 6px; }
.cms-content a { color: var(--color-primary); }
.cms-content table { width: 100%; border-collapse: collapse; margin-bottom: var(--gap-md); }
.cms-content table th, .cms-content table td { padding: 8px 12px; border: 1px solid var(--color-border); }
.cms-content table th { background: var(--color-bg-light); font-weight: 600; }

/* Order view responsive */
@media (max-width: 640px) {
  .order-view-grid { grid-template-columns: 1fr !important; }
}

/* ════════════════════════════════════════════════════════════════
   PRODUCT PAGE — DESCRIPTION CONTENT
═══════════════════════════════════════════════════════════════════ */
.tabs__panel p {
  font-size: var(--fz-sm);
  line-height: 1.7;
  color: var(--color-text);
  max-width: 720px;
  margin-bottom: var(--gap-md);
}
.tabs__panel ul,
.tabs__panel ol {
  margin: 0 0 var(--gap-md) var(--gap-lg);
  padding: 0;
}
.tabs__panel li {
  font-size: var(--fz-sm);
  line-height: 1.7;
  color: var(--color-text);
  margin-bottom: 4px;
  list-style: disc;
}
.tabs__panel--active { display: block; }

/* Product info status — out of stock */
.product-info__status--out {
  color: #c0392b;
}

/* Hide blade-path dev tool widget in production-like view */
[data-blade-path] {
  outline: none !important;
}
.blade-path-label { display: none !important; }

/* ════════════════════════════════════════════════════════════════
   PRODUCT GALLERY — SCROLL FIX
═══════════════════════════════════════════════════════════════════ */
.product-gallery {
  min-width: 0;
  overflow: hidden;
}
.product-gallery__main {
  max-width: 100%;
}
.product-gallery__thumbs {
  max-width: 100%;
}

/* Product info — no overflow */
.product-info {
  min-width: 0;
}
