/**
 * F2P Design System layer — maps Make/OC classes to tokens.
 * @intent: Привести витрину к DS без ломания cart/badge/checkout.
 * @depends-on: f2p-tokens.css
 * @see: Design system brief 2026 §§2–15
 * @business-rule: Кнопки — auto-width (KZ длиннее RU); карточка — max 2 бейджа (Task15).
 */

/* ── 2. Typography ── */
body.f2p-make-chrome,
body.f2p-make-chrome *:not(.fa):not(.fa *):not([class*="fa-"]):not(.glyphicon) {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}

body.f2p-make-chrome {
  background-color: var(--f2p-bg);
  color: var(--f2p-text);
}

body.f2p-make-chrome .price,
body.f2p-make-chrome .product-price,
body.f2p-make-chrome .cart-total,
body.f2p-make-chrome [class*="price"] {
  font-feature-settings: "tnum" 1;
  font-variant-numeric: tabular-nums;
}

body.f2p-make-chrome .container {
  max-width: 1280px;
}

/* ── 3. Header / service bar ── */
body.f2p-make-chrome #top.f2p-service-bar,
body.f2p-make-chrome .f2p-service-bar {
  background-color: var(--f2p-brand2);
  color: rgba(255, 255, 255, 0.75);
  font-size: 12px;
  font-weight: 500;
  padding: 6px 0;
  border-bottom: 1px solid var(--f2p-brand3);
}

body.f2p-make-chrome .f2p-service-bar a {
  color: rgba(255, 255, 255, 0.75);
  text-decoration: none;
  transition: color 150ms;
}
body.f2p-make-chrome .f2p-service-bar a:hover {
  color: #fff;
}

/* WhatsApp accent next to phone */
body.f2p-make-chrome .f2p-service-bar a[href^="tel:"]::before {
  content: '';
  display: inline-block;
  width: 14px;
  height: 14px;
  margin-right: 5px;
  vertical-align: middle;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='%2325D366'%3E%3Cpath d='M17.472 14.382c-.297-.149-1.758-.867-2.03-.967-.273-.099-.471-.148-.67.15-.197.297-.767.966-.94 1.164-.173.199-.347.223-.644.075-.297-.15-1.255-.463-2.39-1.475-.883-.788-1.48-1.761-1.653-2.059-.173-.297-.018-.458.13-.606.134-.133.298-.347.446-.52.149-.174.198-.298.298-.497.099-.198.05-.371-.025-.52-.075-.149-.669-1.612-.916-2.207-.242-.579-.487-.5-.669-.51-.173-.008-.371-.01-.57-.01-.198 0-.52.074-.792.372-.272.297-1.04 1.016-1.04 2.479 0 1.462 1.065 2.875 1.213 3.074.149.198 2.096 3.2 5.077 4.487.709.306 1.262.489 1.694.625.712.227 1.36.195 1.871.118.571-.085 1.758-.719 2.006-1.413.248-.694.248-1.289.173-1.413-.074-.124-.272-.198-.57-.347z'/%3E%3Cpath d='M12 0C5.373 0 0 5.373 0 12c0 2.124.555 4.118 1.529 5.845L.057 23.012a.75.75 0 00.93.93l5.167-1.472A11.953 11.953 0 0012 24c6.627 0 12-5.373 12-12S18.627 0 12 0zm0 22c-1.956 0-3.786-.5-5.384-1.377l-.385-.22-3.995 1.138 1.138-3.995-.22-.385A9.951 9.951 0 012 12C2 6.477 6.477 2 12 2s10 4.477 10 10-4.477 10-10 10z'/%3E%3C/svg%3E")
    center / contain no-repeat;
}
body.f2p-make-chrome .f2p-service-bar a[href^="tel:"] .fa-phone {
  display: none;
}

body.f2p-make-chrome .f2p-make-header,
body.f2p-make-chrome header.f2p-site-header {
  background-color: var(--f2p-brand);
  border-bottom: 2px solid var(--f2p-brand2);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
}

body.f2p-make-chrome .f2p-make-header__nav a {
  color: rgba(255, 255, 255, 0.85);
  font-weight: 600;
  font-size: 14px;
  border-bottom: 2px solid transparent;
  transition: color 150ms, border-color 150ms, background 150ms;
}
body.f2p-make-chrome .f2p-make-header__nav a:hover {
  color: #fff;
  border-bottom-color: var(--f2p-accent);
  background: rgba(255, 255, 255, 0.06);
}

body.f2p-make-chrome .f2p-make-header__catalog {
  background-color: rgba(246, 139, 31, 0.15) !important;
  border-radius: var(--f2p-radius-sm);
  color: #fff !important;
  white-space: nowrap;
  width: auto !important;
  min-width: 100px;
}
body.f2p-make-chrome .f2p-make-header__catalog:hover {
  background-color: rgba(246, 139, 31, 0.25) !important;
}

body.f2p-make-chrome .f2p-header-bar__search #search input,
body.f2p-make-chrome #search input.form-control {
  height: 40px;
  border-radius: var(--f2p-radius-md);
  border: none;
  background: rgba(255, 255, 255, 0.12);
  color: #fff;
  font-size: 14px;
}
body.f2p-make-chrome #search input::placeholder {
  color: rgba(255, 255, 255, 0.45);
}
body.f2p-make-chrome #search input:focus {
  background: rgba(255, 255, 255, 0.18);
  outline: none;
  box-shadow: none;
}

body.f2p-make-chrome .f2p-make-header__icon {
  color: rgba(255, 255, 255, 0.75);
  font-size: 13px;
  font-weight: 600;
  border-radius: var(--f2p-radius-sm);
  white-space: nowrap;
}
body.f2p-make-chrome .f2p-make-header__icon:hover {
  color: #fff;
  background: rgba(255, 255, 255, 0.1);
}

body.f2p-make-chrome .f2p-header-cart-badge,
body.f2p-make-chrome #cart-total span.badge {
  background: var(--f2p-accent) !important;
  color: #fff !important;
  font-size: 10px;
  font-weight: 800;
  min-width: 18px;
  height: 18px;
  border-radius: 9px;
}

/* Lang switcher → accent active */
body.f2p-make-chrome .f2p-lang-seg,
body.f2p-make-chrome .f2p-service-bar__lang .btn-group {
  border-radius: 10px;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.2);
}
body.f2p-make-chrome .f2p-lang-seg__btn,
body.f2p-make-chrome .language-select {
  padding: 5px 12px !important;
  font-size: 11px !important;
  font-weight: 800 !important;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.6) !important;
  background: transparent !important;
  border: none !important;
}
body.f2p-make-chrome .f2p-lang-seg__btn[aria-pressed="true"],
body.f2p-make-chrome .f2p-lang-seg__btn.active,
body.f2p-make-chrome .f2p-lang-seg__btn:hover {
  background: var(--f2p-accent) !important;
  color: #fff !important;
}

/* ── 6. Buttons — auto-width ── */
body.f2p-make-chrome .f2p-btn,
body.f2p-make-chrome .f2p-btn-buy,
body.f2p-make-chrome .product-thumb .button-group button:first-child,
body.f2p-make-chrome button.btn-primary,
body.f2p-make-chrome #button-cart {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  width: auto !important;
  min-width: 100px;
  max-width: none;
  padding: 10px 20px !important;
  border-radius: var(--f2p-radius-md) !important;
  font-family: 'Inter', sans-serif;
  font-size: 14px;
  font-weight: 600 !important;
  line-height: 1.2;
  white-space: nowrap;
  border: 2px solid transparent;
  transition: all 150ms;
  cursor: pointer;
}

body.f2p-make-chrome .f2p-btn--primary,
body.f2p-make-chrome .f2p-btn-buy,
body.f2p-make-chrome .product-thumb .button-group button:first-child,
body.f2p-make-chrome button.btn-primary,
body.f2p-make-chrome #button-cart,
body.f2p-make-chrome .f2p-make-hero__cta--primary {
  background: var(--f2p-accent) !important;
  color: #fff !important;
  border-color: var(--f2p-accent) !important;
}
body.f2p-make-chrome .f2p-btn--primary:hover,
body.f2p-make-chrome .f2p-btn-buy:hover,
body.f2p-make-chrome .product-thumb .button-group button:first-child:hover,
body.f2p-make-chrome #button-cart:hover {
  background: var(--f2p-accent-hover) !important;
  border-color: var(--f2p-accent-hover) !important;
  box-shadow: 0 4px 12px rgba(246, 139, 31, 0.35);
  transform: translateY(-1px);
}

body.f2p-make-chrome .f2p-btn--secondary,
body.f2p-make-chrome .f2p-btn--outline {
  background: transparent !important;
  color: var(--f2p-brand) !important;
  border-color: var(--f2p-brand) !important;
}
body.f2p-make-chrome .f2p-btn--full {
  width: 100% !important;
}

/* ── 5. Product cards ── */
body.f2p-make-chrome .product-thumb,
body.f2p-make-chrome .product-thumb.f2p-make-card {
  display: flex;
  flex-direction: column;
  height: 100%;
  background: var(--f2p-card);
  border-radius: var(--f2p-radius-lg);
  border: 1px solid var(--f2p-border);
  overflow: hidden;
  box-shadow: none;
  transition: box-shadow 200ms, transform 200ms;
}
body.f2p-make-chrome .product-thumb:hover {
  box-shadow: var(--f2p-shadow-hover);
  transform: translateY(-2px);
}

body.f2p-make-chrome .product-thumb .image {
  aspect-ratio: 1 / 1;
  background: var(--f2p-brand-s);
  overflow: hidden;
  flex-shrink: 0;
}
body.f2p-make-chrome .product-thumb .image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 300ms;
}
body.f2p-make-chrome .product-thumb:hover .image img {
  transform: scale(1.03);
}
body.f2p-make-chrome .product-thumb .image img[src*="no_image"],
body.f2p-make-chrome .product-thumb .image img[src*="placeholder"] {
  object-fit: contain;
  padding: 20%;
  opacity: 0.4;
  filter: grayscale(1);
}

body.f2p-make-chrome .product-thumb .caption {
  display: flex;
  flex-direction: column;
  flex: 1;
  padding: 12px 14px 8px;
  gap: 6px;
}
body.f2p-make-chrome .product-thumb .caption h4 {
  font-size: 13px;
  font-weight: 600;
  line-height: 1.4;
  margin: 0;
  min-height: 0;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
body.f2p-make-chrome .product-thumb .caption h4 a {
  color: var(--f2p-text);
  text-decoration: none;
}
body.f2p-make-chrome .product-thumb .caption h4 a:hover {
  color: var(--f2p-brand);
}

body.f2p-make-chrome .product-thumb .price {
  font-size: 17px !important;
  font-weight: 800 !important;
  color: var(--f2p-brand) !important;
  margin: 0 !important;
}
body.f2p-make-chrome .product-thumb .price-new {
  color: var(--f2p-accent) !important;
  font-weight: 800;
}
body.f2p-make-chrome .product-thumb .price-old {
  font-size: 12px !important;
  font-weight: 500 !important;
  color: var(--f2p-text3) !important;
}
body.f2p-make-chrome .product-thumb .f2p-price-suffix,
body.f2p-make-chrome .f2p-price__unit,
body.f2p-make-chrome .product-thumb .f2p-buy-qty-hint {
  font-size: 11px;
  font-weight: 500;
  color: var(--f2p-text2);
}

body.f2p-make-chrome .product-thumb .button-group {
  margin-top: auto;
  border: none !important;
  background: transparent !important;
  padding: 0 14px 14px !important;
  display: flex;
}
body.f2p-make-chrome .product-thumb .button-group button:not(:first-child) {
  display: none; /* hide wishlist/compare in card footer — heart is on image */
}

body.f2p-make-chrome .f2p-product-wishlist {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.85);
  backdrop-filter: blur(4px);
  opacity: 0;
  transition: opacity 150ms, color 150ms;
}
body.f2p-make-chrome .product-thumb:hover .f2p-product-wishlist {
  opacity: 1;
}
body.f2p-make-chrome .f2p-product-wishlist:hover {
  color: var(--f2p-accent);
}

/* ── 14. Product grid ── */
body.f2p-make-chrome .f2p-product-grid:not(.f2p-make-row__track),
body.f2p-make-chrome .row.f2p-product-grid:not(.f2p-make-row__track) {
  display: grid !important;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
  margin: 0;
}
body.f2p-make-chrome .f2p-product-grid:not(.f2p-make-row__track) > .product-layout,
body.f2p-make-chrome .f2p-product-grid:not(.f2p-make-row__track) > [class*="col-"],
body.f2p-make-chrome .row.f2p-product-grid:not(.f2p-make-row__track) > .product-layout,
body.f2p-make-chrome .row.f2p-product-grid:not(.f2p-make-row__track) > [class*="col-"] {
  width: 100% !important;
  float: none !important;
  padding: 0 !important;
  margin: 0 !important;
}
@media (max-width: 1024px) {
  body.f2p-make-chrome .f2p-product-grid:not(.f2p-make-row__track) {
    grid-template-columns: repeat(3, 1fr);
  }
}
@media (max-width: 768px) {
  body.f2p-make-chrome .f2p-product-grid:not(.f2p-make-row__track) {
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
  }
}
@media (max-width: 360px) {
  body.f2p-make-chrome .f2p-product-grid:not(.f2p-make-row__track) {
    grid-template-columns: 1fr;
  }
}

/* ── 8–10. Home sections polish ── */
body.f2p-make-chrome .f2p-make-why {
  background: var(--f2p-brand-s);
  border-top: 1px solid var(--f2p-brand-s2);
  border-bottom: 1px solid var(--f2p-brand-s2);
}
body.f2p-make-chrome .f2p-make-cats__grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
  gap: 12px;
}
@media (max-width: 768px) {
  body.f2p-make-chrome .f2p-make-cats__grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}
@media (max-width: 480px) {
  body.f2p-make-chrome .f2p-make-cats__grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

/* ── 13. Mobile bottom nav ── */
@media (max-width: 767px) {
  body.f2p-make-chrome .f2p-make-header__nav,
  body.f2p-make-chrome .f2p-make-header__catalog,
  body.f2p-make-chrome .f2p-header-bar__search {
    display: none !important;
  }
  body.f2p-make-chrome {
    padding-bottom: calc(60px + env(safe-area-inset-bottom, 0px));
  }
  body.f2p-make-chrome .f2p-mobile-nav {
    display: flex !important;
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 100;
    background: #fff;
    border-top: 1px solid var(--f2p-border);
    padding-bottom: env(safe-area-inset-bottom, 0px);
    box-shadow: 0 -4px 16px rgba(0, 0, 0, 0.08);
  }
  body.f2p-make-chrome .f2p-mobile-nav__item {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 10px 4px;
    gap: 3px;
    font-size: 10px;
    font-weight: 600;
    color: var(--f2p-text3);
    text-decoration: none;
    position: relative;
  }
  body.f2p-make-chrome .f2p-mobile-nav__item.is-active {
    color: var(--f2p-brand);
  }
  body.f2p-make-chrome .f2p-mobile-nav__item.is-active::after {
    content: '';
    position: absolute;
    top: 0;
    left: 20%;
    right: 20%;
    height: 2px;
    background: var(--f2p-brand);
    border-radius: 0 0 2px 2px;
  }
  body.f2p-make-chrome .f2p-mobile-cart-badge {
    background: var(--f2p-accent) !important;
  }
}
@media (min-width: 768px) {
  body.f2p-make-chrome .f2p-mobile-nav {
    display: none !important;
  }
}

/* ── 12. Dev notice modal polish ── */
body.f2p-make-chrome .f2p-dev-notice-modal.is-open .f2p-dev-notice-modal__panel,
body.f2p-make-chrome .f2p-dev-notice-modal .f2p-dev-notice-modal__panel {
  border-radius: var(--f2p-radius-xl);
  max-width: 460px;
  overflow: hidden;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.2);
}
body.f2p-make-chrome .f2p-dev-notice-modal [data-f2p-dev-notice-dismiss] {
  width: 100%;
  min-width: 100px;
  background: var(--f2p-accent) !important;
  border-color: var(--f2p-accent) !important;
  color: #fff !important;
  border-radius: var(--f2p-radius-md) !important;
  font-weight: 600 !important;
  white-space: normal;
}

/* Badge overflow alias */
body.f2p-make-chrome .f2p-badge-more {
  background: rgba(0, 0, 0, 0.55);
  color: #fff;
  padding: 4px 8px;
  font-size: 10px;
  font-weight: 800;
  border-radius: 8px;
}

/* ── Task07 home rows + mobile polish ── */
body.f2p-make-chrome .f2p-make-row__cell .product-thumb {
  margin-bottom: 0;
}
body.f2p-make-chrome .f2p-make-weekly {
  border-radius: 20px;
}
@media (max-width: 767px) {
  body.f2p-make-chrome .f2p-make-hero__visual {
    margin-top: 8px;
  }
  body.f2p-make-chrome .f2p-make-trust__intro .f2p-make-section-head__title {
    font-size: 20px;
  }
  body.f2p-make-chrome .f2p-make-stats {
    margin-left: -4px;
    margin-right: -4px;
  }
  body.f2p-make-chrome .f2p-make-weekly {
    margin-left: 0;
    margin-right: 0;
  }
  body.f2p-make-chrome .f2p-mobile-nav__item i {
    font-size: 20px;
  }
}

/* PDP badge row */
body.f2p-make-chrome .f2p-badges-pdp {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin: 12px 0;
}
