/* =========================
   💻 SMALL DESKTOP (до 1400px)
   ========================= */
@media (max-width: 1400px) {

  .series-grid,
  .body-grid,
  .category-grid {
    grid-template-columns: repeat(5, 1fr);
  }

  .category-card .category-overlay span {
    font-size: 10px;
  }

  .hero-title {
    font-size: 48px;
  }

}


/* =========================
   💻 TABLET LANDSCAPE (до 1024px)
   ========================= */
@media (max-width: 1024px) {

  /* GRID */
  .series-grid,
  .body-grid {
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
  }

  .category-grid {
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
    padding-left: 10px;
  }

  /* HERO */
  .hero-title {
    font-size: 44px;
    letter-spacing: 2px;
  }

  .hero-content {
    margin-top: -80px;
  }

  .hero-bg {
    position: fixed;
    inset: 0;
    background: linear-gradient(to bottom, rgba(0,0,0,0.5), var(--bg-dark)), url('/static/img/herohero.jpg');
    background-size: cover;      /* растягиваем */
    background-position: center; /* центрируем */
    background-repeat: no-repeat;/* без повторов */
    z-index: -1; /* уводим под контент */
  }

  .series-background {
    background: linear-gradient(to bottom,rgba(0,0,0,0.5), var(--bg-dark)), url('/static/img/herohero.jpg');
  }

  /* HEADER */
  .search-box {
    max-width: 400px;
  }

  /* PRODUCT */
  #product-list {
    grid-template-columns: repeat(2, 1fr);
  }

    .info {
    grid-template-columns: repeat(2, 1fr);
  }

  .info-block--big {
    grid-column: span 2;
  }

}


/* =========================
   📱 TABLET PORTRAIT (до 768px)
   ========================= */
@media (max-width: 768px) {

  .hero-bg {
    position: fixed;
    inset: 0;
    background: linear-gradient(to bottom, rgba(0,0,0,0.5), var(--bg-dark)), url('/static/img/herohero.jpg');
    background-size: cover;      /* растягиваем */
    background-position: center; /* центрируем */
    background-repeat: no-repeat;/* без повторов */
    z-index: -1; /* уводим под контент */
  }

  .series-background {
    background: linear-gradient(to bottom,rgba(0,0,0,0.5), var(--bg-dark)), url('/static/img/herohero.jpg');
  }

  /* ===== HEADER ===== */
  .header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    gap: 10px;
  }

  .header-center {
    width: 100%;
  }

  .search-box {
    max-width: 100%;
  }

  .category-card .category-overlay span {
    font-size: 10px;
  }

  /* ===== GRID ===== */
  .series-grid,
  .body-grid,
  .category-grid {
    grid-template-columns: repeat(3, 1fr);
    gap: 15px;
    padding: 0 15px;
  }

  /* ===== HERO ===== */
  .hero {
    justify-content: center;
    align-items: center;
    text-align: center;
  }

  .hero-title {
    font-size: 32px;
    letter-spacing: 1px;
  }

  .hero-content p {
    font-size: 14px;
  }

  .hero-bg {
    transform: none; /* убираем mouse эффект */
    background-attachment: scroll;
  }

  /* ===== TEXT ===== */
  .page-title {
    font-size: 28px;
  }

  /* ===== PRODUCT ===== */
  #product-list {
    grid-template-columns: repeat(2, 1fr);
  }

  .name { font-size: 14px; }
  .description { font-size: 13px; }
  .price { font-size: 16px; }

  /* ===== IMAGE ===== */
  .image-wrapper img {
    transform: scale(1);
  }

  /* ===== MODAL ===== */
  .modal-content {
    width: 95%;
    height: auto;
  }

  .modal-gallery img {
    width: 100%;
    height: auto;
  }

    .info {
    grid-template-columns: 1fr;
  }

  .info-block--big {
    grid-column: span 1;
  }

  .container-grid {
    padding: 40px 15px;
  }

  .info-block {
    padding: 20px;
  }

  .info-block h3 {
    font-size: 18px;
  }

  .info-block p {
    font-size: 13px;
  }

  /* CART */
  .cart-link {
    width:auto;
    height: 52px;
  }

   /* BUTTONS */
  .catalog-button,
  .button {
    width: 100%;
    text-align: center;
  }

  .qty {
    font-size: 12px;
  }

}


/* =========================
   📱 MOBILE (до 480px)
   ========================= */
@media (max-width: 480px) {

  .hero-bg {
    position: fixed;
    inset: 0;
    background: linear-gradient(to bottom, rgba(0,0,0,0.5), var(--bg-dark)), url('/static/img/herohero.jpg');
    background-size: cover;      /* растягиваем */
    background-position: center; /* центрируем */
    background-repeat: no-repeat;/* без повторов */
    z-index: -1; /* уводим под контент */
  }

  .series-background {
    background: linear-gradient(to bottom,rgba(0,0,0,0.5), var(--bg-dark)), url('/static/img/herohero.jpg');

  }

  /* HEADER */
  .header {
    padding: 10px;
  }

  .logo {
    font-size: 18px;
  }

  /* SEARCH */
  .search-box input {
    padding: 10px;
    font-size: 14px;
  }

  .series-grid,
  .body-grid,
  .category-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
    padding: 0 15px;
    font-size: 6px;
  }
  
  /* CARDS */
  .series-card,
  .body-card,
  .category-card {
    font-size: 6px;
  }

  .category-card .category-overlay span {
  font-size: 8px;
  font-weight: regular;
  text-transform: uppercase;
  letter-spacing: 1px;
  text-shadow: 1px 1px 4px rgba(0, 0, 0, 0.8);
}

  /* TEXT */
  .series-overlay span {
    font-size: 32px;
  }

  .body-overlay span {
    font-size: 18px;
  }

  /* HERO */
  .hero-title {
    font-size: 48px;
  }

  .hero-content p {
    font-size: 23px;
  }

  /* CART */
  .cart-link {
    width:auto;
    height: 52px;
  }

  /* BUTTONS */
  .catalog-button,
  .button {
    width: 100%;
    text-align: center;
  }

  .image-wrapper {
    width: 100%;
  }

  .card-body {
    background: white;
    padding: 8px;
    display: flex;
    flex-direction: column;
    font-size: 6px;
    font-weight: 500;
    color: #000000;
    flex-grow: 1;
  }

  .cart-icon-button {
    font-size: 10px;
    text-decoration: none;
    position: relative;
    align-self: flex-end;
  }

  .name {
    font-weight: 500;
    font-size: 14px;
    margin-bottom: 1px;
    line-height: 1.1;
  }

  .price {
    font-size: 12px;
    font-weight: bold;
    color: #f00000;
  }

  .quantity {
    font-size: 13px;
    color: #888;
    margin-bottom: 2px;
  }

  .description {
    font-size: 10px;
    color: #000000;
    flex-grow: 1;
    margin-bottom: 2px;
  }

  .image-wrapper img {
    width: auto;
    height: auto;
    transition: transform 0.3s ease;
    transform: scale(0.12);        /* ← начальный масштаб */
  }

  .image-wrapper img:hover {
    transform: none;
  }

  .container h1 {
    font-size: 15px;
    color: white;
  }

  .card-body .sku {
    font-size: 10px;
  }

  .card-body .oem {
    font-size: 10px;
  }

  .card-body .subtotal {
    font-size: 10px;
    font-weight: bold;
    color: #d10000;
  }

  .qty {
    font-size: 12px;
  }
}


/* =========================
   📱 EXTRA SMALL (до 360px)
   ========================= */
@media (max-width: 360px) {

  .hero-title {
    font-size: 20px;
  }

  .page-title {
    font-size: 22px;
  }

  .series-overlay span {
    font-size: 26px;
  }

}