:root {
  --red: #e31e24;
  --red-hover: #ff3030;
  --blue: #264796;
  --blue-hover: #1c3a7a;
  --dark: #1a1a1a;
  --header: #2b2b2b;
  --muted: #666;
  --bg: #f4f3f3;
  --white: #fff;
  --radius: 10px;
  --radius-sm: 5px;
  --font: "Roboto", Arial, sans-serif;
  --max: 1200px;
  --header-h: 64px;
  --safe-bottom: env(safe-area-inset-bottom, 0px);
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

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

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
}

body {
  margin: 0;
  font-family: var(--font);
  color: var(--dark);
  background: var(--white);
  line-height: 1.5;
  overflow-x: hidden;
}


img {
  max-width: 100%;
  height: auto;
  display: block;
}

a {
  color: inherit;
  text-decoration: none;
}

button {
  font-family: inherit;
}

.container {
  width: min(100% - 32px, var(--max));
  margin-inline: auto;
}


/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 52px;
  padding: 14px 36px;
  border-radius: var(--radius-sm);
  font-family: var(--font);
  font-size: 16px;
  font-weight: 500;
  border: 2px solid transparent;
  cursor: pointer;
  transition: background 0.2s, color 0.2s, border-color 0.2s, transform 0.15s;
  appearance: none;
  text-decoration: none;
  -webkit-tap-highlight-color: transparent;
}

.btn:hover {
  transform: translateY(-1px);
}


.btn-red {
  background: var(--red);
  color: var(--white);
  border-radius: var(--radius);
}

.btn-red:hover {
  background: var(--red-hover);
}


/* Sections */
.section {
  padding: 72px 0;
}

.section-muted {
  background: var(--bg);
}

.section-title {
  margin: 0 0 48px;
  text-align: center;
  font-size: clamp(26px, 4vw, 36px);
  font-weight: 500;
}


/* Offers / categories */
.offers-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
}

.offer-card {
  position: relative;
  aspect-ratio: 1;
  min-height: 0;
  border-radius: 10px;
  overflow: hidden;
  color: var(--white);
  display: grid;
  place-items: center;
  text-align: center;
  padding: 16px 12px;
  background-size: cover;
  background-position: center;
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.offer-card::before {
  content: "";
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.55);
  transition: background 0.25s;
}

.offer-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 28px rgba(0, 0, 0, 0.18);
}

.offer-card:hover::before {
  background: rgba(227, 30, 36, 0.45);
}

.offer-card.is-selected {
  outline: 3px solid var(--red);
  outline-offset: 3px;
}

.offer-card.is-selected::before {
  background: rgba(227, 30, 36, 0.5);
}

.offer-card span {
  position: relative;
  z-index: 1;
  font-size: clamp(14px, 1.5vw, 18px);
  font-weight: 500;
  line-height: 1.3;
}


/* CTA bar */
.cta-bar {
  background: var(--white);
  border-top: 1px solid #e8e8e8;
  border-bottom: 1px solid #e8e8e8;
  padding: 28px 0;
}

.cta-bar-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  flex-wrap: wrap;
}

.cta-bar p {
  margin: 0;
  font-size: 18px;
  max-width: 640px;
}

.cta-bar a.phone {
  color: var(--red);
  font-weight: 600;
  white-space: nowrap;
}

/* Catalog page */
.page-hero {
  position: relative;
  background: var(--header);
  color: var(--white);
  padding: 72px 0 64px;
  text-align: center;
  overflow: hidden;
}

.page-hero--slideshow {
  min-height: 320px;
  display: grid;
  place-items: center;
  background: #111;
}

.hero-slideshow {
  position: absolute;
  inset: 0;
  z-index: 0;
}

.hero-slideshow__slide {
  position: absolute;
  inset: 0;
  background-position: center;
  background-size: cover;
  background-repeat: no-repeat;
  opacity: 0;
  transform: scale(1.04);
  transition: opacity 1.1s ease, transform 6s ease;
}

.hero-slideshow__slide.is-active {
  opacity: 1;
  transform: scale(1);
}

.page-hero__overlay {
  position: absolute;
  inset: 0;
  z-index: 1;
  background: linear-gradient(rgba(0, 0, 0, 0.55), rgba(0, 0, 0, 0.62));
  pointer-events: none;
}

.page-hero__content {
  position: relative;
  z-index: 2;
}

.page-hero h1 {
  margin: 0 0 12px;
  font-size: clamp(28px, 4vw, 42px);
  font-weight: 600;
  color: var(--red);
}

.page-hero p {
  margin: 0 auto;
  max-width: 520px;
  opacity: 0.92;
  font-size: 16px;
  color: #fff;
}

.catalog-section .section-title {
  margin-bottom: 36px;
}

.products-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}

.product-card {
  background: var(--white);
  border-radius: 12px;
  padding: 24px;
  display: flex;
  flex-direction: column;
  gap: 14px;
  transition: box-shadow 0.2s, transform 0.2s;
}

.product-card[hidden],
.product-card.is-filtered-out {
  display: none !important;
}

.product-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.08);
}

.product-card .thumb {
  height: 180px;
  display: grid;
  place-items: center;
  background: #fafafa;
  border-radius: 8px;
  position: relative;
  text-decoration: none;
  color: inherit;
}

.product-card .thumb img {
  max-height: 150px;
  object-fit: contain;
}

.product-card h3 {
  margin: 0;
  font-size: 18px;
  font-weight: 600;
}

.product-card__title-btn {
  display: block;
  width: 100%;
  margin: 0;
  padding: 0;
  border: 0;
  background: none;
  font: inherit;
  font-size: inherit;
  font-weight: inherit;
  color: inherit;
  text-align: left;
  cursor: pointer;
}

.product-card__title-btn:hover,
.product-card__title-btn:focus-visible {
  color: var(--red);
}

.product-card__price {
  margin: 8px 0 0 !important;
  font-size: 16px !important;
  font-weight: 700 !important;
  color: var(--dark) !important;
  flex: 0 !important;
  display: -webkit-box;
  -webkit-line-clamp: unset !important;
  overflow: visible !important;
}

.product-card__price-hint {
  display: block;
  margin-top: 2px;
  font-size: 12px;
  font-weight: 400;
  color: var(--muted);
}

.product-card p {
  margin: 0;
  flex: 0 0 auto;
  font-size: 14px;
  color: var(--muted);
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.product-card .btn {
  min-height: 44px;
  padding: 10px 20px;
  font-size: 15px;
  align-self: stretch;
}

.category-anchor {
  scroll-margin-top: calc(var(--header-h) + 16px);
}

.products-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 8px;
}

.section-title-left {
  text-align: left;
  margin-bottom: 6px;
}

.products-count {
  margin: 0 0 20px;
  color: var(--muted);
  font-size: 14px;
}

.chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 28px;
}

.chip {
  appearance: none;
  border: 1px solid #d8d8d8;
  background: var(--white);
  color: var(--dark);
  border-radius: 999px;
  padding: 10px 16px;
  font-family: var(--font);
  font-size: 14px;
  cursor: pointer;
  transition: background 0.2s, color 0.2s, border-color 0.2s;
  -webkit-tap-highlight-color: transparent;
  white-space: nowrap;
}

.chip:hover {
  border-color: var(--red);
  color: var(--red);
}

.chip.is-active {
  background: var(--red);
  border-color: var(--red);
  color: var(--white);
}

.empty-state {
  text-align: center;
  padding: 48px 20px;
  background: var(--white);
  border-radius: 12px;
}

.empty-state p {
  margin: 0 0 10px;
  color: var(--muted);
}

.empty-state .btn {
  margin-top: 16px;
}

/* Mobile bottom call bar */
.mobile-bar {
  display: none;
}

/* Modal */
.modal[hidden] {
  display: none !important;
}

.modal {
  position: fixed;
  inset: 0;
  z-index: 200;
  display: grid;
  place-items: center;
  padding: 20px;
}

.modal__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.55);
}

.modal__dialog {
  position: relative;
  z-index: 1;
  width: min(100%, 440px);
  max-height: min(92vh, 720px);
  overflow-y: auto;
  background: var(--white);
  border-radius: 12px;
  padding: 28px 24px 24px;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.25);
  animation: fadeUp 0.25s ease;
  -webkit-overflow-scrolling: touch;
}

.modal__close {
  position: absolute;
  top: 8px;
  right: 10px;
  width: 44px;
  height: 44px;
  border: 0;
  background: transparent;
  font-size: 28px;
  line-height: 1;
  color: #999;
  cursor: pointer;
}

.modal__dialog h3 {
  margin: 0 0 8px;
  font-size: 22px;
  font-weight: 600;
  padding-right: 36px;
}

.modal__product {
  margin: 0 0 20px;
  color: var(--red);
  font-weight: 500;
}

.modal__form {
  display: grid;
  gap: 14px;
}

.modal__form label {
  display: grid;
  gap: 6px;
  font-size: 14px;
}

.modal__form span {
  color: var(--muted);
}

.modal__form input,
.modal__form textarea {
  width: 100%;
  border: 1px solid #ddd;
  border-radius: 8px;
  padding: 14px;
  font: inherit;
  font-size: 16px; /* prevents iOS zoom */
  outline: none;
  transition: border-color 0.2s;
}

.modal__form input:focus,
.modal__form textarea:focus {
  border-color: var(--red);
}

.modal__check {
  grid-template-columns: auto 1fr !important;
  align-items: start;
  gap: 10px !important;
}

.modal__check input {
  width: auto;
  margin-top: 3px;
}

.modal__success {
  text-align: center;
  padding: 12px 0 4px;
}

.modal__success p {
  margin: 0 0 20px;
  color: var(--muted);
}

.modal__success a {
  color: var(--red);
  font-weight: 600;
}

.modal__error {
  text-align: center;
  padding: 12px 0 4px;
  color: #8b1a1a;
}

.modal__error a {
  color: var(--red);
  font-weight: 600;
}


/* Cart badges */
.cart-badge {
  position: absolute;
  top: -2px;
  right: -2px;
  min-width: 18px;
  height: 18px;
  padding: 0 5px;
  border-radius: 999px;
  background: var(--red);
  color: #fff;
  font-size: 11px;
  font-weight: 700;
  display: grid;
  place-items: center;
  line-height: 1;
}

.cart-badge--inline {
  position: static;
  display: inline-grid;
  margin-left: 6px;
  min-width: 18px;
  height: 18px;
}

.cart-badge[hidden] {
  display: none !important;
}

.btn-cart {
  background: var(--red);
  color: #fff;
  border-radius: var(--radius);
  min-height: 44px;
  padding: 10px 18px;
  width: 100%;
  font-weight: 600;
}

.btn-cart:hover {
  background: var(--red-hover);
}

.btn-ghost {
  background: transparent;
  color: var(--dark);
  border: 1px solid #ddd;
  border-radius: var(--radius);
  min-height: 44px;
  width: 100%;
}

.btn-linkish {
  background: transparent;
  color: var(--muted);
  border: 0;
  min-height: auto;
  padding: 8px 0 0;
  font-size: 14px;
  width: auto;
  text-decoration: underline;
  text-underline-offset: 3px;
}

.btn-linkish:hover {
  color: var(--red);
  transform: none;
}

.cart-actions {
  width: 100%;
}

.product-card__actions {
  display: flex;
  flex-direction: column;
  gap: 4px;
  width: 100%;
  align-items: stretch;
}

.qty-control {
  display: grid;
  grid-template-columns: 44px 1fr 44px;
  align-items: center;
  width: 100%;
  min-height: 44px;
  border-radius: var(--radius);
  background: #f3f3f3;
  overflow: hidden;
}

.qty-btn {
  height: 44px;
  border: 0;
  background: transparent;
  font-size: 22px;
  cursor: pointer;
  color: var(--dark);
  -webkit-tap-highlight-color: transparent;
}

.qty-btn:active {
  background: #e8e8e8;
}

.qty-value {
  text-align: center;
  font-weight: 700;
  font-size: 16px;
}

.cart-toast {
  position: fixed;
  left: 50%;
  bottom: 96px;
  transform: translateX(-50%) translateY(12px);
  background: #222;
  color: #fff;
  padding: 12px 18px;
  border-radius: 10px;
  font-size: 14px;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s, transform 0.2s;
  z-index: 300;
  white-space: nowrap;
  cursor: pointer;
}

.cart-toast.is-show {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
  pointer-events: auto;
}

.btn-cart-bar {
  background: #222;
  color: #fff;
  border-radius: var(--radius);
  position: relative;
}

@media (max-width: 760px) {

  .cart-toast {
    bottom: 88px;
    max-width: calc(100% - 24px);
    white-space: normal;
    text-align: center;
  }

  .mobile-bar {
    display: flex;
  }

  .mobile-bar .btn {
    flex: 1;
    min-width: 0;
    font-size: 12px;
    padding: 10px 6px;
  }
}

/* Footer */
.site-footer {
  background: var(--dark);
  color: rgba(255, 255, 255, 0.85);
  padding: 48px 0 calc(28px + var(--safe-bottom));
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.2fr 1fr 1fr;
  gap: 32px;
  margin-bottom: 32px;
}

.site-footer h4 {
  margin: 0 0 14px;
  color: var(--white);
  font-size: 16px;
}

.site-footer p,
.site-footer a {
  font-size: 14px;
  margin: 0 0 8px;
}

.site-footer a:hover {
  color: var(--red);
}

.footer-bottom {
  border-top: 1px solid rgba(255, 255, 255, 0.12);
  padding-top: 20px;
  font-size: 13px;
  opacity: 0.7;
}

@keyframes fadeUp {
  from {
    opacity: 0;
    transform: translateY(18px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes slideSheet {
  from {
    transform: translateY(24px);
    opacity: 0;
  }
  to {
    transform: translateY(0);
    opacity: 1;
  }
}

/* Tablet */
@media (max-width: 960px) {
  .offers-grid {
    grid-template-columns: repeat(2, 1fr);
  }

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

  .footer-grid {
    grid-template-columns: 1fr 1fr;
  }
}

/* Phone */
@media (max-width: 760px) {

  :root {
    --header-h: 60px;
  }

  .container {
    width: min(100% - 24px, var(--max));
  }


  .cta-bar .btn,
  .empty-state .btn {
    width: 100%;
  }

  .section {
    padding: 48px 0;
  }

  .section-title {
    margin-bottom: 28px;
  }

  .offers-grid {
    grid-template-columns: 1fr 1fr;
    gap: 10px;
  }

  .offer-card {
    aspect-ratio: 1 / 1.05;
    border-radius: 8px;
    padding: 12px 8px;
  }

  .offer-card span {
    font-size: 13px;
  }

  .offer-card:hover,
  .product-card:hover {
    transform: none;
    box-shadow: none;
  }

  .cta-bar {
    padding: 24px 0;
  }

  .cta-bar-inner {
    flex-direction: column;
    text-align: center;
    gap: 16px;
  }

  .cta-bar p {
    font-size: 16px;
  }

  .page-hero {
    padding: 56px 0 48px;
    min-height: 240px;
  }

  .page-hero--slideshow {
    min-height: 240px;
  }

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

  .product-card {
    padding: 18px;
  }

  .product-card .thumb {
    height: 160px;
  }

  .chips {
    flex-wrap: nowrap;
    overflow-x: auto;
    gap: 8px;
    margin: 0 -12px 24px;
    padding: 2px 12px 10px;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
  }

  .chips::-webkit-scrollbar {
    display: none;
  }

  .chip {
    flex: 0 0 auto;
    padding: 10px 14px;
    font-size: 13px;
  }

  .section-title-left {
    font-size: 24px;
  }

  .footer-grid {
    grid-template-columns: 1fr;
    gap: 24px;
  }

  .site-footer {
    padding-bottom: calc(88px + var(--safe-bottom));
  }

  .modal {
    padding: 0;
    align-items: end;
  }

  .modal__dialog {
    width: 100%;
    max-width: none;
    border-radius: 16px 16px 0 0;
    padding: 24px 20px calc(24px + var(--safe-bottom));
    animation: slideSheet 0.28s ease;
  }

  .modal__form .btn {
    width: 100%;
  }

  .mobile-bar {
    display: flex;
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 90;
    gap: 8px;
    padding: 10px 12px calc(10px + var(--safe-bottom));
    background: rgba(255, 255, 255, 0.96);
    backdrop-filter: blur(10px);
    border-top: 1px solid #e8e8e8;
    box-shadow: 0 -6px 20px rgba(0, 0, 0, 0.08);
  }

  .mobile-bar .btn {
    flex: 1;
    min-height: 48px;
    padding: 12px 10px;
    font-size: 14px;
    width: auto;
  }

  .mobile-bar .btn-call {
    background: #1f7a3f;
    color: #fff;
    border-radius: var(--radius);
  }

}

@media (max-width: 380px) {
  .offer-card span {
    font-size: 12px;
  }

  .mobile-bar .btn {
    font-size: 13px;
    padding: 12px 6px;
  }
}

@media (hover: none) {
  .btn:hover,
  .offer-card:hover,
  .product-card:hover {
    transform: none;
  }
}

