/* =========================================================
   Cart + floating contacts
   ========================================================= */

:root {
  --cart-wa: #25D366;
  --cart-wa-dark: #128C7E;
  --cart-tg: #229ED9;
  --cart-tg-dark: #1B7DAB;
  --cart-shadow: 0 24px 60px rgba(11, 27, 48, 0.28);
}

/* ---------- header cart icon ---------- */
.cart-btn {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  border-radius: var(--radius-pill);
  background: var(--color-primary);
  color: #fff;
  border: none;
  cursor: pointer;
  transition: background 0.18s ease, transform 0.18s ease, box-shadow 0.18s ease;
  box-shadow: 0 8px 20px rgba(224, 162, 63, 0.25);
  margin-left: 8px;
}
.cart-btn:hover { background: var(--color-primary-hover); transform: translateY(-1px); }
.cart-btn:active { transform: translateY(0); }
.cart-btn svg { width: 22px; height: 22px; }

.cart-btn__badge {
  position: absolute;
  top: -4px;
  right: -4px;
  min-width: 20px;
  height: 20px;
  padding: 0 6px;
  border-radius: var(--radius-pill);
  background: var(--color-secondary);
  color: #fff;
  font-size: 11px;
  font-weight: 700;
  line-height: 20px;
  text-align: center;
  font-family: var(--font-family-mono);
  border: 2px solid #fff;
  pointer-events: none;
}
.cart-btn__badge.is-empty { opacity: 0; transform: scale(0.6); }

/* ---------- floating contacts FAB ---------- */
.fab-stack {
  position: fixed;
  right: 18px;
  bottom: 18px;
  z-index: 80;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.fab {
  width: 52px;
  height: 52px;
  border-radius: var(--radius-pill);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  text-decoration: none;
  box-shadow: 0 10px 24px rgba(11, 27, 48, 0.22);
  transition: transform 0.18s ease, box-shadow 0.18s ease, background 0.18s ease;
}
.fab:hover { transform: translateY(-2px) scale(1.04); box-shadow: 0 14px 28px rgba(11, 27, 48, 0.3); }
.fab svg { width: 26px; height: 26px; }
.fab--wa { background: var(--cart-wa); }
.fab--wa:hover { background: var(--cart-wa-dark); }
.fab--tg { background: var(--cart-tg); }
.fab--tg:hover { background: var(--cart-tg-dark); }
.fab--phone { background: var(--color-secondary); }
.fab--phone:hover { background: var(--color-secondary-medium); }

@media (max-width: 600px) {
  .fab-stack { right: 12px; bottom: 12px; gap: 8px; }
  .fab { width: 46px; height: 46px; }
  .fab svg { width: 22px; height: 22px; }
}

/* ---------- product card quick-add ---------- */
.product-card { position: relative; }
.product-card__media { position: relative; }
.add-to-cart-quick {
  position: absolute;
  left: 12px;
  bottom: 12px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 14px 8px 10px;
  border-radius: var(--radius-pill);
  background: rgba(255, 255, 255, 0.96);
  color: var(--color-secondary);
  border: none;
  font-family: var(--font-family-base);
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  backdrop-filter: blur(6px);
  box-shadow: 0 4px 12px rgba(11, 27, 48, 0.15);
  opacity: 0;
  transform: translateY(6px);
  transition: opacity 0.2s ease, transform 0.2s ease, background 0.2s ease, color 0.2s ease;
  z-index: 2;
}
.add-to-cart-quick svg { width: 16px; height: 16px; }
.product-card:hover .add-to-cart-quick,
.add-to-cart-quick:focus-visible { opacity: 1; transform: translateY(0); }
.add-to-cart-quick:hover { background: var(--color-primary); color: #fff; }
.add-to-cart-quick.is-added { background: #1d8a4a; color: #fff; opacity: 1; transform: translateY(0); }

@media (max-width: 768px) {
  .add-to-cart-quick { opacity: 1; transform: translateY(0); }
}

/* ---------- product detail "add to cart" button (secondary style) ---------- */
.btn--secondary {
  background: var(--color-secondary);
  color: #fff;
  border: 1px solid var(--color-secondary);
}
.btn--secondary:hover { background: var(--color-secondary-medium); color: #fff; }
.add-to-cart-main {
  display: inline-flex !important;
  align-items: center;
  justify-content: center;
  gap: 10px;
  margin-top: 10px;
}
.add-to-cart-main svg { width: 20px; height: 20px; }
.add-to-cart-main.is-added { background: #1d8a4a; border-color: #1d8a4a; }

/* ---------- drawer ---------- */
.cart-drawer {
  position: fixed;
  inset: 0;
  z-index: 1000;
  pointer-events: none;
}
.cart-drawer.is-open { pointer-events: auto; }

.cart-drawer__overlay {
  position: absolute;
  inset: 0;
  background: rgba(11, 27, 48, 0.55);
  opacity: 0;
  transition: opacity 0.25s ease;
}
.cart-drawer.is-open .cart-drawer__overlay { opacity: 1; }

.cart-drawer__panel {
  position: absolute;
  top: 0;
  right: 0;
  bottom: 0;
  width: min(460px, 100%);
  background: #fff;
  display: flex;
  flex-direction: column;
  transform: translateX(100%);
  transition: transform 0.3s cubic-bezier(0.22, 0.61, 0.36, 1);
  box-shadow: var(--cart-shadow);
}
.cart-drawer.is-open .cart-drawer__panel { transform: translateX(0); }

.cart-drawer__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 22px 24px;
  border-bottom: 1px solid var(--color-border);
  flex-shrink: 0;
}
.cart-drawer__title {
  margin: 0;
  font-size: 22px;
  font-weight: 700;
  font-family: var(--font-family-base);
  color: var(--color-secondary);
  letter-spacing: -0.01em;
}
.cart-drawer__close {
  width: 36px;
  height: 36px;
  border-radius: var(--radius-pill);
  background: var(--color-bg-light);
  color: var(--color-secondary);
  border: none;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: background 0.18s ease, color 0.18s ease;
}
.cart-drawer__close:hover { background: var(--color-secondary); color: #fff; }
.cart-drawer__close svg { width: 18px; height: 18px; }

.cart-drawer__body {
  flex: 1;
  overflow-y: auto;
  padding: 18px 24px;
  -webkit-overflow-scrolling: touch;
}

.cart-drawer__foot {
  flex-shrink: 0;
  padding: 18px 24px 22px;
  border-top: 1px solid var(--color-border);
  background: #fafafa;
}

/* ---------- empty state ---------- */
.cart-empty {
  text-align: center;
  padding: 36px 12px;
  color: var(--color-text-muted);
}
.cart-empty__icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 72px;
  height: 72px;
  border-radius: var(--radius-pill);
  background: var(--color-primary-light);
  color: var(--color-primary-alt);
  margin: 0 auto 16px;
}
.cart-empty__icon svg { width: 32px; height: 32px; }
.cart-empty__title {
  font-size: 18px;
  font-weight: 700;
  color: var(--color-secondary);
  margin: 0 0 6px;
}
.cart-empty__sub { font-size: 14px; margin: 0 0 18px; line-height: 1.5; }

/* ---------- cart list ---------- */
.cart-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 16px;
}
.cart-item {
  display: grid;
  grid-template-columns: 72px 1fr auto;
  gap: 14px;
  padding: 14px;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  background: #fff;
  position: relative;
  transition: border-color 0.18s ease, box-shadow 0.18s ease;
}
.cart-item:hover { border-color: var(--color-primary); box-shadow: 0 4px 14px rgba(224, 162, 63, 0.1); }
.cart-item__media {
  width: 72px;
  height: 72px;
  border-radius: var(--radius-sm);
  overflow: hidden;
  background: var(--color-bg-light);
}
.cart-item__media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.cart-item__placeholder {
  width: 100%;
  height: 100%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--color-text-light);
}
.cart-item__placeholder svg { width: 28px; height: 28px; }
.cart-item__body {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.cart-item__title {
  font-size: 14px;
  font-weight: 600;
  color: var(--color-secondary);
  text-decoration: none;
  line-height: 1.35;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.cart-item__title:hover { color: var(--color-primary-alt); }
.cart-item__meta {
  font-size: 12px;
  color: var(--color-text-muted);
  font-family: var(--font-family-mono);
  display: flex;
  gap: 4px;
  flex-wrap: wrap;
}
.cart-item__row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-top: 4px;
}
.cart-item__price {
  font-size: 15px;
  font-weight: 700;
  color: var(--color-secondary);
  font-family: var(--font-family-mono);
}

.cart-qty {
  display: inline-flex;
  align-items: center;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-pill);
  background: #fff;
  overflow: hidden;
}
.cart-qty__btn {
  width: 28px;
  height: 28px;
  border: none;
  background: transparent;
  color: var(--color-secondary);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: background 0.18s ease, color 0.18s ease;
}
.cart-qty__btn:hover { background: var(--color-primary); color: #fff; }
.cart-qty__btn svg { width: 14px; height: 14px; }
.cart-qty__val {
  min-width: 28px;
  text-align: center;
  font-size: 14px;
  font-weight: 600;
  font-family: var(--font-family-mono);
  color: var(--color-secondary);
}

.cart-item__remove {
  position: absolute;
  top: 8px;
  right: 8px;
  width: 28px;
  height: 28px;
  border: none;
  background: transparent;
  color: var(--color-text-light);
  border-radius: var(--radius-pill);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: background 0.18s ease, color 0.18s ease;
}
.cart-item__remove:hover { background: #fce4e4; color: #c0392b; }
.cart-item__remove svg { width: 15px; height: 15px; }

/* ---------- footer ---------- */
.cart-total {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 14px;
}
.cart-total__label {
  font-size: 14px;
  color: var(--color-text-muted);
  font-weight: 500;
}
.cart-total__sum {
  font-size: 22px;
  font-weight: 700;
  color: var(--color-secondary);
  font-family: var(--font-family-mono);
}
.cart-foot__hint {
  font-size: 13px;
  color: var(--color-text-muted);
  margin: 0 0 14px;
  line-height: 1.45;
}
.cart-foot__actions {
  display: grid;
  gap: 10px;
  margin-bottom: 12px;
}
.cart-send {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 14px 18px;
  border-radius: var(--radius-md);
  border: none;
  font-family: var(--font-family-base);
  font-size: 15px;
  font-weight: 600;
  color: #fff;
  cursor: pointer;
  transition: transform 0.18s ease, box-shadow 0.18s ease, background 0.18s ease;
  text-decoration: none;
}
.cart-send svg { width: 20px; height: 20px; flex-shrink: 0; }
.cart-send:hover { transform: translateY(-1px); box-shadow: 0 10px 22px rgba(11, 27, 48, 0.18); }
.cart-send--wa { background: var(--cart-wa); }
.cart-send--wa:hover { background: var(--cart-wa-dark); }
.cart-send--tg { background: var(--cart-tg); }
.cart-send--tg:hover { background: var(--cart-tg-dark); }

.cart-clear {
  display: block;
  width: 100%;
  background: transparent;
  border: none;
  color: var(--color-text-muted);
  font-size: 13px;
  cursor: pointer;
  padding: 6px;
  margin-bottom: 8px;
  text-decoration: underline;
  text-underline-offset: 3px;
}
.cart-clear:hover { color: #c0392b; }

.cart-foot__legal {
  font-size: 11px;
  color: var(--color-text-light);
  text-align: center;
  margin: 0;
  line-height: 1.4;
}
.cart-foot__legal a { color: var(--color-text-muted); }

/* ---------- toast ---------- */
.cart-toast {
  position: fixed;
  left: 50%;
  bottom: 28px;
  transform: translate(-50%, 12px);
  background: var(--color-secondary);
  color: #fff;
  padding: 12px 18px;
  border-radius: var(--radius-md);
  font-size: 14px;
  max-width: 90vw;
  box-shadow: 0 14px 32px rgba(11, 27, 48, 0.28);
  z-index: 1100;
  opacity: 0;
  pointer-events: none;
  transition: transform 0.25s ease, opacity 0.25s ease;
}
.cart-toast.is-visible {
  opacity: 1;
  transform: translate(-50%, 0);
}

@media (max-width: 480px) {
  .cart-drawer__panel { width: 100%; }
  .cart-drawer__head, .cart-drawer__body, .cart-drawer__foot { padding-left: 16px; padding-right: 16px; }
  .cart-item { grid-template-columns: 60px 1fr auto; gap: 10px; padding: 10px; }
  .cart-item__media { width: 60px; height: 60px; }
}

/* =========================================================
   Mobile burger + nav drawer
   ========================================================= */
.burger-btn {
  display: none;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  border-radius: var(--radius-pill);
  background: rgba(255, 255, 255, 0.08);
  color: #fff;
  border: 1px solid rgba(255, 255, 255, 0.12);
  cursor: pointer;
  transition: background 0.18s ease, border-color 0.18s ease;
}
.burger-btn:hover { background: rgba(255, 255, 255, 0.14); border-color: rgba(255, 255, 255, 0.2); }
.burger-btn svg { width: 22px; height: 22px; }

@media (max-width: 860px) {
  .burger-btn { display: inline-flex; }
}

.mobile-nav {
  position: fixed;
  inset: 0;
  z-index: 1100;
  pointer-events: none;
  display: block;
}
.mobile-nav.is-open { pointer-events: auto; }

.mobile-nav__overlay {
  position: absolute;
  inset: 0;
  background: rgba(8, 18, 34, 0.6);
  opacity: 0;
  transition: opacity 0.25s ease;
}
.mobile-nav.is-open .mobile-nav__overlay { opacity: 1; }

.mobile-nav__panel {
  position: absolute;
  top: 0;
  right: 0;
  bottom: 0;
  width: min(360px, 92vw);
  background: var(--color-secondary-dark, #0B1B30);
  color: #fff;
  display: flex;
  flex-direction: column;
  transform: translateX(100%);
  transition: transform 0.3s cubic-bezier(0.22, 0.61, 0.36, 1);
  box-shadow: -16px 0 40px rgba(0, 0, 0, 0.45);
}
.mobile-nav.is-open .mobile-nav__panel { transform: translateX(0); }

.mobile-nav__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px 20px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  flex-shrink: 0;
}
.mobile-nav__title {
  font-family: var(--font-family-mono);
  font-size: 12px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.55);
}
.mobile-nav__close {
  width: 36px;
  height: 36px;
  border-radius: var(--radius-pill);
  background: rgba(255, 255, 255, 0.06);
  color: #fff;
  border: none;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: background 0.18s ease;
}
.mobile-nav__close:hover { background: rgba(255, 255, 255, 0.14); }
.mobile-nav__close svg { width: 18px; height: 18px; }

.mobile-nav__list {
  display: flex;
  flex-direction: column;
  padding: 12px 12px 18px;
  gap: 2px;
  flex: 1;
  overflow-y: auto;
}
.mobile-nav__link {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 16px 16px;
  border-radius: var(--radius-md);
  color: #fff;
  font-size: 17px;
  font-weight: 600;
  text-decoration: none;
  transition: background 0.18s ease, color 0.18s ease;
}
.mobile-nav__link svg {
  width: 18px;
  height: 18px;
  color: rgba(255, 255, 255, 0.45);
  flex-shrink: 0;
  transition: transform 0.18s ease, color 0.18s ease;
}
.mobile-nav__link:hover {
  background: rgba(255, 255, 255, 0.06);
  color: var(--color-primary, #E0A23F);
}
.mobile-nav__link:hover svg { color: var(--color-primary, #E0A23F); transform: translateX(2px); }
.mobile-nav__link.is-active {
  background: rgba(224, 162, 63, 0.14);
  color: var(--color-primary, #E0A23F);
}
.mobile-nav__link.is-active svg { color: var(--color-primary, #E0A23F); }

.mobile-nav__contacts {
  padding: 16px 16px 22px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  display: flex;
  flex-direction: column;
  gap: 12px;
  flex-shrink: 0;
}
.mobile-nav__phone {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 14px 16px;
  border-radius: var(--radius-md);
  background: var(--color-primary, #E0A23F);
  color: var(--color-secondary-dark, #0B1B30);
  font-weight: 700;
  font-size: 16px;
  text-decoration: none;
  transition: background 0.18s ease;
}
.mobile-nav__phone:hover { background: var(--color-primary-hover, #F5B656); color: var(--color-secondary-dark, #0B1B30); }
.mobile-nav__phone svg { width: 18px; height: 18px; }

.mobile-nav__msgr {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}
.mobile-nav__msgr-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 10px;
  border-radius: var(--radius-md);
  color: #fff;
  font-weight: 600;
  font-size: 14px;
  text-decoration: none;
  transition: opacity 0.18s ease;
}
.mobile-nav__msgr-btn:hover { opacity: 0.88; color: #fff; }
.mobile-nav__msgr-btn svg { width: 18px; height: 18px; }
.mobile-nav__msgr-btn--wa { background: var(--cart-wa, #25D366); }
.mobile-nav__msgr-btn--tg { background: var(--cart-tg, #229ED9); }
