/* ═══════════════════════════════════════════════════════════════════
   DESIGN TOKENS
═══════════════════════════════════════════════════════════════════ */
:root {
  --color-bg:          #ffffff;
  --color-text:        #111111;
  --color-text-muted:  #6b6b6b;
  --color-border:      #e8e8e8;
  --color-card-bg:     #f5f5f0;
  --color-btn:         #111111;
  --color-btn-text:    #ffffff;
  --color-footer-bg:   #111111;
  --color-footer-text: #d4d4d4;
  --color-error:       #dc2626;
  --color-success:     #16a34a;

  --radius-sm:  4px;
  --radius-md:  8px;
  --radius-lg:  12px;
  --radius-pill: 999px;

  --shadow-card: 0 1px 3px rgba(0,0,0,.06), 0 1px 2px rgba(0,0,0,.04);
  --shadow-modal: 0 20px 60px rgba(0,0,0,.18);

  --header-h: 60px;
  --container: 1280px;
  --gap:       24px;

  --font: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --font-mono: 'SF Mono', SFMono-Regular, Consolas, monospace;
}

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

html { scroll-behavior: smooth; }
[hidden] { display: none !important; }

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

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

/* ═══════════════════════════════════════════════════════════════════
   LAYOUT
═══════════════════════════════════════════════════════════════════ */
.container {
  width: 100%;
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 var(--gap);
}

/* ═══════════════════════════════════════════════════════════════════
   HEADER
═══════════════════════════════════════════════════════════════════ */
.header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--color-bg);
  border-bottom: 1px solid var(--color-border);
}

.header__inner {
  display: grid;
  grid-template-columns: auto 1fr auto auto;
  align-items: center;
  gap: 16px;
  height: var(--header-h);
}
/* Страница товара — logo | nav | actions */
.header__inner--simple {
  grid-template-columns: auto 1fr auto;
}

/* Logo */
.header__logo {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 15px;
  font-weight: 600;
  letter-spacing: -.3px;
  white-space: nowrap;
}
.header__logo svg { flex-shrink: 0; }
.header__logo-img {
  height: 32px;
  width: auto;
  max-width: 140px;
  object-fit: contain;
  display: block;
}

/* Search */
.header__search {
  position: relative;
  width: 100%;
  max-width: 340px;
  justify-self: center;
}
.search-icon {
  position: absolute;
  left: 12px;
  top: 50%;
  transform: translateY(-50%);
  pointer-events: none;
}
.header__search input {
  width: 100%;
  height: 36px;
  padding: 0 12px 0 36px;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-pill);
  font-size: 13px;
  outline: none;
  transition: border-color .15s;
  background: #fafafa;
}
.header__search input:focus {
  border-color: #aaa;
  background: #fff;
}

/* Category nav */
.header__nav {
  display: flex;
  align-items: center;
  gap: 2px;
  overflow-x: auto;
  scrollbar-width: none;
}
.header__nav::-webkit-scrollbar { display: none; }

.nav-btn {
  padding: 5px 12px;
  border-radius: var(--radius-pill);
  font-size: 13px;
  font-weight: 500;
  color: var(--color-text-muted);
  white-space: nowrap;
  transition: color .15s, background .15s;
}
.nav-btn:hover  { color: var(--color-text); background: #f0f0f0; }
.nav-btn.active { color: var(--color-text); background: #ebebeb; }

/* Actions */
.header__actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.icon-btn {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: var(--radius-md);
  transition: background .15s;
}
.icon-btn:hover { background: #f0f0f0; }

.cart-badge {
  position: absolute;
  top: 2px;
  right: 2px;
  min-width: 16px;
  height: 16px;
  padding: 0 4px;
  border-radius: var(--radius-pill);
  background: var(--color-btn);
  color: var(--color-btn-text);
  font-size: 10px;
  font-weight: 600;
  line-height: 16px;
  text-align: center;
}
.cart-badge[data-count="0"] { display: none; }

/* Hamburger (mobile) */
.hamburger {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 36px;
  height: 36px;
  padding: 8px;
  border-radius: var(--radius-md);
  transition: background .15s;
}
.hamburger span {
  display: block;
  height: 1.5px;
  background: var(--color-text);
  border-radius: 2px;
  transition: transform .2s, opacity .2s;
}
.hamburger.open span:nth-child(1) { transform: translateY(6.5px) rotate(45deg); }
.hamburger.open span:nth-child(2) { opacity: 0; }
.hamburger.open span:nth-child(3) { transform: translateY(-6.5px) rotate(-45deg); }

/* Mobile nav drawer */
.mobile-nav {
  display: none;
  border-top: 1px solid var(--color-border);
  padding: 12px 0;
  background: var(--color-bg);
}
.mobile-nav.open { display: block; }

.mobile-search { max-width: 100%; margin-bottom: 12px; }

.mobile-cat-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

/* ═══════════════════════════════════════════════════════════════════
   MAIN
═══════════════════════════════════════════════════════════════════ */
main {
  min-height: calc(100vh - var(--header-h) - 280px);
  padding: 32px 0 64px;
}

/* ═══════════════════════════════════════════════════════════════════
   PRODUCTS GRID
═══════════════════════════════════════════════════════════════════ */
.products-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--gap);
}

/* ═══════════════════════════════════════════════════════════════════
   PRODUCT CARD
═══════════════════════════════════════════════════════════════════ */
.product-card {
  display: block;
  cursor: pointer;
  border-radius: var(--radius-md);
  overflow: hidden;
  transition: transform .2s ease, box-shadow .2s ease;
  text-decoration: none;
  color: inherit;
}
.product-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-card);
}

.product-card__img-wrap {
  position: relative;
  width: 100%;
  aspect-ratio: 1 / 1;
  background: var(--color-card-bg);
  overflow: hidden;
  border-radius: var(--radius-md);
}
.product-card__img-wrap img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform .3s ease;
}
.product-card:hover .product-card__img-wrap img {
  transform: scale(1.03);
}

/* Out of stock overlay */
.product-card__img-wrap .oos-badge {
  position: absolute;
  top: 10px;
  left: 10px;
  padding: 3px 8px;
  border-radius: var(--radius-pill);
  background: rgba(0,0,0,.55);
  color: #fff;
  font-size: 11px;
  font-weight: 500;
}

.product-card__body {
  padding: 10px 2px 4px;
}

.product-card__row {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 8px;
}

.product-card__name {
  font-size: 14px;
  font-weight: 500;
  line-height: 1.3;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  flex: 1;
}

.product-card__price-wrap {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  flex-shrink: 0;
}
.product-card__price {
  font-size: 14px;
  font-weight: 500;
  white-space: nowrap;
}
.product-card__old-price {
  font-size: 12px;
  color: var(--color-text-muted);
  text-decoration: line-through;
  white-space: nowrap;
}
.discount-badge {
  position: absolute;
  top: 10px;
  right: 10px;
  padding: 3px 7px;
  border-radius: var(--radius-pill);
  background: #e53e3e;
  color: #fff;
  font-size: 11px;
  font-weight: 600;
}

.product-card__category {
  display: block;
  margin-top: 3px;
  font-size: 12px;
  color: var(--color-text-muted);
}

/* Skeleton */
.product-card--skeleton .product-card__img-wrap {
  background: #ececec;
  animation: pulse 1.4s ease-in-out infinite;
}
.skeleton-line {
  height: 12px;
  border-radius: 4px;
  background: #ececec;
  animation: pulse 1.4s ease-in-out infinite;
  margin-top: 8px;
}
.skeleton-line.w60  { width: 60%; }
.skeleton-line.w70  { width: 70%; }
.skeleton-line.w50  { width: 50%; }
.skeleton-line.w30  { width: 30%; }
.skeleton-line.w25  { width: 25%; }
.skeleton-line.w35  { width: 35%; }

@keyframes pulse {
  0%, 100% { opacity: 1; }
  50%       { opacity: .45; }
}

/* ═══════════════════════════════════════════════════════════════════
   EMPTY STATE & ERROR
═══════════════════════════════════════════════════════════════════ */
.empty-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
  padding: 80px 0;
  color: var(--color-text-muted);
  font-size: 15px;
}

.error-banner {
  padding: 12px 16px;
  margin-bottom: 24px;
  border-radius: var(--radius-md);
  background: #fef2f2;
  border: 1px solid #fecaca;
  color: var(--color-error);
  font-size: 13px;
}

/* ═══════════════════════════════════════════════════════════════════
   BUTTONS
═══════════════════════════════════════════════════════════════════ */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  height: 44px;
  padding: 0 20px;
  border-radius: var(--radius-md);
  font-size: 14px;
  font-weight: 500;
  transition: opacity .15s, transform .1s;
  cursor: pointer;
}
.btn:active { transform: scale(.98); }

.btn-primary {
  background: var(--color-btn);
  color: var(--color-btn-text);
  border: none;
}
.btn-primary:hover { opacity: .88; }
.btn-primary:disabled { opacity: .45; cursor: not-allowed; }

.btn-outline {
  background: transparent;
  color: var(--color-text);
  border: 1px solid var(--color-border);
}
.btn-outline:hover { border-color: #aaa; }

.btn-whatsapp {
  background: #25D366;
  color: #fff;
  border: none;
}
.btn-whatsapp:hover   { background: #1ebe5d; }
.btn-whatsapp:active  { background: #128C7E; }
.btn-whatsapp:disabled { opacity: .5; cursor: not-allowed; }

.btn-ghost {
  background: transparent;
  color: var(--color-text-muted);
  border: 1px solid var(--color-border);
  padding: 8px 16px;
  border-radius: var(--radius-pill);
  font-size: 13px;
}
.btn-ghost:hover { color: var(--color-text); border-color: #aaa; }

.link-btn {
  background: none;
  border: none;
  color: var(--color-error);
  text-decoration: underline;
  cursor: pointer;
  font-size: inherit;
}

/* ═══════════════════════════════════════════════════════════════════
   CART DRAWER
═══════════════════════════════════════════════════════════════════ */
.cart-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,.4);
  z-index: 150;
  opacity: 0;
  transition: opacity .3s;
}
.cart-overlay.open { opacity: 1; }

.cart-drawer {
  position: fixed;
  top: 0;
  right: 0;
  bottom: 0;
  width: 380px;
  max-width: 100vw;
  background: #fff;
  z-index: 151;
  display: flex;
  flex-direction: column;
  transform: translateX(100%);
  transition: transform .3s ease;
  box-shadow: -4px 0 24px rgba(0,0,0,.08);
}
.cart-drawer.open { transform: translateX(0); }

.cart-drawer__header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 20px 20px 16px;
  border-bottom: 1px solid var(--color-border);
  flex-shrink: 0;
}
.cart-drawer__header h2 { font-size: 16px; font-weight: 600; }
.cart-drawer__count     { color: var(--color-text-muted); font-weight: 400; }
.cart-drawer__close {
  width: 32px;
  height: 32px;
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background .15s;
}
.cart-drawer__close:hover { background: #f0f0f0; }

.cart-drawer__body {
  flex: 1;
  overflow-y: auto;
  padding: 12px 0;
}

/* Empty state */
.cart-empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 12px;
  height: 100%;
  color: var(--color-text-muted);
  padding: 40px 20px;
}
.cart-empty p { font-size: 15px; }

/* Cart item */
.cart-item {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 12px 20px;
  border-bottom: 1px solid #f5f5f5;
}
.cart-item:last-child { border-bottom: none; }

.cart-item__img-wrap {
  width: 64px;
  height: 64px;
  border-radius: var(--radius-md);
  overflow: hidden;
  background: var(--color-card-bg);
  flex-shrink: 0;
}
.cart-item__img-wrap img { width: 100%; height: 100%; object-fit: cover; }
.cart-item__img-placeholder { width: 100%; height: 100%; background: #eee; }

.cart-item__info   { flex: 1; min-width: 0; }
.cart-item__name   { font-size: 13px; font-weight: 500; line-height: 1.3; margin-bottom: 4px; }
.cart-item__attrs  { display: flex; align-items: center; gap: 6px; margin-bottom: 6px; }
.cart-item__color-dot {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  border: 1px solid rgba(0,0,0,.1);
  flex-shrink: 0;
}
.cart-item__meta   { font-size: 11px; color: var(--color-text-muted); }
.cart-item__price  { font-size: 13px; font-weight: 600; }

.cart-item__controls {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 10px;
  flex-shrink: 0;
}
.qty-ctrl {
  display: flex;
  align-items: center;
  gap: 0;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  overflow: hidden;
}
.qty-btn {
  width: 28px;
  height: 28px;
  font-size: 16px;
  color: var(--color-text-muted);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background .15s, color .15s;
}
.qty-btn:hover { background: #f5f5f5; color: var(--color-text); }
.qty-val       { font-size: 13px; font-weight: 500; min-width: 24px; text-align: center; }

.cart-item__remove {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 24px;
  border-radius: 4px;
  transition: background .15s;
}
.cart-item__remove:hover { background: #fee2e2; }
.cart-item__remove:hover svg path { stroke: var(--color-error); }

/* Footer */
.cart-drawer__footer {
  border-top: 1px solid var(--color-border);
  padding: 16px 20px;
  flex-shrink: 0;
}
.cart-total {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 14px;
  font-size: 15px;
}
.cart-total__price { font-weight: 700; font-size: 18px; }

.cart-checkout-form { display: flex; flex-direction: column; gap: 10px; }
.field-like {
  width: 100%;
  height: 44px;
  padding: 0 14px;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  font-size: 14px;
  font-family: inherit;
  outline: none;
  transition: border-color .15s;
}
.field-like:focus { border-color: #aaa; }
.field-like.is-invalid { border-color: var(--color-error); }

/* Toast */
.toast {
  position: fixed;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%) translateY(20px);
  background: #111;
  color: #fff;
  padding: 10px 20px;
  border-radius: var(--radius-pill);
  font-size: 14px;
  font-weight: 500;
  opacity: 0;
  pointer-events: none;
  transition: opacity .25s, transform .25s;
  z-index: 200;
  white-space: nowrap;
}
.toast.visible {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

/* ═══════════════════════════════════════════════════════════════════
   FOOTER
═══════════════════════════════════════════════════════════════════ */
.footer {
  background: var(--color-footer-bg);
  color: var(--color-footer-text);
}

.footer__inner {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 48px;
  padding-top: 48px;
  padding-bottom: 32px;
}

.footer__logo {
  height: 28px;
  width: auto;
  object-fit: contain;
  margin-bottom: 12px;
  opacity: .7;
  filter: brightness(10);  /* SVG на тёмном фоне → белый */
}
.footer__tagline {
  font-size: 13px;
  line-height: 1.6;
  max-width: 220px;
  opacity: .7;
}

.footer__cols {
  display: flex;
  gap: 48px;
}

.footer__col h3 {
  font-size: 13px;
  font-weight: 600;
  color: #fff;
  margin-bottom: 12px;
}
.footer__col ul { display: flex; flex-direction: column; gap: 8px; }
.footer__col a  {
  font-size: 13px;
  color: var(--color-footer-text);
  opacity: .7;
  transition: opacity .15s;
}
.footer__col a:hover { opacity: 1; }

.footer__bottom {
  border-top: 1px solid rgba(255,255,255,.1);
}
.footer__bottom .container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-top: 16px;
  padding-bottom: 16px;
  gap: 16px;
}
.footer__bottom p {
  font-size: 12px;
  opacity: .5;
}
.footer__bottom nav {
  display: flex;
  gap: 16px;
}
.footer__bottom nav a {
  font-size: 12px;
  color: var(--color-footer-text);
  opacity: .5;
  transition: opacity .15s;
}
.footer__bottom nav a:hover { opacity: .8; }

/* ═══════════════════════════════════════════════════════════════════
   RESPONSIVE
═══════════════════════════════════════════════════════════════════ */
@media (max-width: 1024px) {
  .products-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

@media (max-width: 768px) {
  .header__inner {
    grid-template-columns: auto 1fr auto;
    gap: 10px;
  }
  .header__inner--simple {
    grid-template-columns: auto 1fr auto;
  }
  .header__search,
  .header__nav {
    display: none;
  }
  .header__logo-img {
    height: 28px;
    max-width: 110px;
  }
  .hamburger { display: flex; }

  .products-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 16px;
  }

  .footer__inner {
    grid-template-columns: 1fr;
    gap: 32px;
  }
  .footer__brand { display: none; }
  .footer__cols { gap: 32px; }
}

@media (max-width: 480px) {
  :root { --gap: 16px; }

  main { padding: 24px 0 48px; }

  .products-grid {
    grid-template-columns: 1fr 1fr;
    gap: 12px;
  }

  .product-card__name  { font-size: 13px; }
  .product-card__price { font-size: 13px; }

  .footer__bottom .container { flex-direction: column; align-items: flex-start; }
}

/* ═══════════════════════════════════════════════════════════════════
   PRODUCT PAGE
═══════════════════════════════════════════════════════════════════ */

.product-main {
  padding: 32px 0 64px;
}

/* ─── Layout ─────────────────────────────────────────────────────── */
.product-layout {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 48px;
  align-items: start;
}

/* ─── Carousel ───────────────────────────────────────────────────── */
.carousel { display: flex; flex-direction: column; gap: 10px; }

.carousel__main-wrap {
  position: relative;
  background: var(--color-card-bg);
  border-radius: var(--radius-lg);
  overflow: hidden;
  aspect-ratio: 1 / 1;
  user-select: none;
}
.carousel__main {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: opacity .2s;
}
.carousel__main.fade { opacity: 0; }

#imgPlaceholder {
  position: absolute;
  inset: 0;
  background: var(--color-card-bg);
  display: flex;
  align-items: center;
  justify-content: center;
}
#imgPlaceholder::after {
  content: '';
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: #ddd;
}

/* Arrows */
.carousel__arrow {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: rgba(255,255,255,.92);
  border: 1px solid var(--color-border);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  z-index: 2;
  box-shadow: 0 2px 8px rgba(0,0,0,.1);
  transition: background .15s, transform .15s;
}
.carousel__arrow:hover { background: #fff; transform: translateY(-50%) scale(1.05); }
.carousel__arrow--prev { left: 10px; }
.carousel__arrow--next { right: 10px; }

/* Thumbnails */
.carousel__thumbs {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  scrollbar-width: none;
  padding-bottom: 2px;
}
.carousel__thumbs::-webkit-scrollbar { display: none; }

.carousel__thumb {
  flex-shrink: 0;
  width: 64px;
  height: 64px;
  border-radius: var(--radius-md);
  overflow: hidden;
  cursor: pointer;
  border: 2px solid transparent;
  background: var(--color-card-bg);
  transition: border-color .15s;
}
.carousel__thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.carousel__thumb.active { border-color: var(--color-text); }
.carousel__thumb:hover:not(.active) { border-color: #ccc; }

/* ─── Info panel ─────────────────────────────────────────────────── */
.product-info {
  display: flex;
  flex-direction: column;
  gap: 0;
}

.product-info__category {
  font-size: 12px;
  color: var(--color-text-muted);
  text-transform: uppercase;
  letter-spacing: .06em;
  margin-bottom: 8px;
}

.product-info__name {
  font-size: 26px;
  font-weight: 600;
  line-height: 1.25;
  letter-spacing: -.4px;
  margin-bottom: 14px;
}

.product-info__price-row {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 24px;
}
.product-info__price {
  font-size: 22px;
  font-weight: 600;
}
.product-info__oos {
  font-size: 13px;
  color: var(--color-error);
  font-weight: 500;
}
.product-info__old-price {
  font-size: 16px;
  color: var(--color-text-muted);
  text-decoration: line-through;
}
.product-info__discount-badge {
  padding: 3px 10px;
  border-radius: var(--radius-pill);
  background: #e53e3e;
  color: #fff;
  font-size: 13px;
  font-weight: 600;
}

/* ─── Sizes ──────────────────────────────────────────────────────── */
.product-info__sizes,
.product-info__colors {
  margin-bottom: 20px;
  border-radius: var(--radius-md);
  padding: 8px;
  margin-left: -8px;
  transition: background .2s;
}
.product-info__label {
  font-size: 13px;
  color: var(--color-text-muted);
  margin-bottom: 10px;
}
.product-info__label strong { color: var(--color-text); }

.selection-error {
  background: #fff5f5;
  outline: 1.5px solid #fca5a5;
}
.selection-error .product-info__label::after {
  content: ' — выберите вариант';
  color: var(--color-error);
  font-weight: 500;
}

.size-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.size-btn {
  min-width: 44px;
  height: 36px;
  padding: 0 10px;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  font-size: 13px;
  font-weight: 500;
  background: var(--color-bg);
  color: var(--color-text);
  cursor: pointer;
  transition: border-color .15s, background .15s;
}
.size-btn:hover   { border-color: #aaa; }
.size-btn.active  { border-color: var(--color-text); background: var(--color-text); color: #fff; }
.size-btn:disabled { opacity: .35; cursor: not-allowed; }
.size-btn--unavail {
  text-decoration: line-through;
  color: var(--color-text-muted);
  border-color: var(--color-border);
  background: var(--color-card-bg);
}

/* ─── Colors ─────────────────────────────────────────────────────── */
.color-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.color-btn {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  border: 2px solid transparent;
  cursor: pointer;
  transition: transform .15s, box-shadow .15s;
  outline-offset: 3px;
}
.color-btn:hover  { transform: scale(1.12); }
.color-btn.active { box-shadow: 0 0 0 2px var(--color-bg), 0 0 0 4px var(--color-text); }


/* ─── Product actions ────────────────────────────────────────────── */
.product-actions {
  display: flex;
  gap: 10px;
  margin-top: 4px;
  margin-bottom: 16px;
}
.product-actions .buy-btn {
  flex: 1;
  height: 48px;
  font-size: 15px;
  font-weight: 600;
  gap: 10px;
}
.buy-now-btn {
  height: 48px;
  padding: 0 20px;
  font-size: 15px;
  gap: 8px;
  flex-shrink: 0;
}

/* ─── Buy form ───────────────────────────────────────────────────── */
.buy-form__input {
  width: 100%;
  height: 44px;
  padding: 0 14px;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  font-size: 14px;
  font-family: inherit;
  outline: none;
  transition: border-color .15s;
}
.buy-form__input:focus      { border-color: #aaa; }
.buy-form__input.is-invalid { border-color: var(--color-error); }
.buy-form__error {
  margin-top: 4px;
  font-size: 12px;
  color: var(--color-error);
}

/* ─── Delivery badges ────────────────────────────────────────────── */
.delivery-badges {
  display: flex;
  gap: 16px;
  margin-bottom: 24px;
}
.delivery-badge {
  display: flex;
  align-items: center;
  gap: 5px;
  font-size: 12px;
  color: var(--color-text-muted);
}

/* ─── Accordion ──────────────────────────────────────────────────── */
.accordion {
  border-top: 1px solid var(--color-border);
}
.accordion:last-child { border-bottom: 1px solid var(--color-border); }

.accordion__summary {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 14px 0;
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  list-style: none;
  user-select: none;
}
.accordion__summary::-webkit-details-marker { display: none; }
.accordion__summary::after {
  content: '+';
  font-size: 18px;
  font-weight: 300;
  color: var(--color-text-muted);
  transition: transform .2s;
}
details[open] .accordion__summary::after { transform: rotate(45deg); }

.accordion__body {
  padding-bottom: 16px;
  font-size: 13px;
  color: var(--color-text-muted);
  line-height: 1.7;
}
.product-info__desc { white-space: pre-wrap; }

/* ─── Back button ────────────────────────────────────────────────── */
.back-btn {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  color: var(--color-text-muted);
  text-decoration: none;
}
.back-btn:hover { color: var(--color-text); }

/* ─── Responsive (product page) ──────────────────────────────────── */
@media (max-width: 768px) {
  .product-layout {
    grid-template-columns: 1fr;
    gap: 24px;
  }
  .product-info__name { font-size: 22px; }
  .delivery-badges    { flex-direction: column; gap: 8px; }
}
