@import url('https://fonts.googleapis.com/css2?family=Oswald:wght@700&display=swap');
@font-face {
  font-family: 'alphabet-minus-eighty.dirty';
  src: url('../fonts/alphabet-minus-eighty.dirty.ttf') format('opentype');
  font-weight: normal;
  font-style: normal;
  font-display: swap;
}

body {
  font-family: 'Nunito', sans-serif;
  color: #333;
  background: #ffffff;
  display: flex;
  flex-direction: column;
}

a {
  color: #C64138;
  text-decoration: none;
  transition: color 0.2s ease-in-out;
}
a:hover {
  color: #a7322b;
}
.c-category.parallax {
    padding-top: 50px;
}
.header {
  position: fixed;
  top: 0;
  width: 100%;
  z-index: 1000;
}

.page-container {
  display: flex;
  flex-grow: 1;
  background-color: #fcfafa;
  padding: 3rem 10rem 3rem 10rem;
}
.row {
    flex-wrap: wrap;
    margin-top: calc(-1 * var(--bs-gutter-y));
    margin-right: calc(-.5 * var(--bs-gutter-x));
    margin-left: calc(-.5 * var(--bs-gutter-x));
    justify-content: flex-end;
}
.filter-form {
  max-width: 1000px;
  padding: 0 20px;
}

.p-products {
  display: flex;
  flex-direction: column;
  width: 100%;
}



.category-and-title {
  padding: 0 10rem;
}

.category-title {
  font-size: 5rem;
  font-weight: 700;
  letter-spacing: 0.4rem;
  color: white;
  text-transform: uppercase;
  margin: 0px 160px 0px 160px;
}

.subcategory-navigation {
  font-size: 1rem;
padding-bottom: 20px;
  margin-left: 160px;
  color: #555;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.subcategory-navigation a {
  padding: 4px 10px;
  border: 1px solid #ddd;
  border-radius: 5px;
  background-color: #fff;
}
.subcategory-navigation a:hover {
  background-color: #eaeaea;
}

.product-list {
  display: flex;
  flex-wrap: wrap;
justify-content: center;
  gap: 10px 60px;
  margin: 0 0 30px 15px;
}


.mt-2 {
    margin-left: 40px;
    margin-bottom: 20px;
}
div.product-card {
  display: grid;
  grid-template-columns: 2fr 2fr;
  gap: 20px;
  width: 600px;
  height: 300px;
  padding-left: 20px;
  align-items: center;
  background-color: #ffffff;
  border: 1px solid #e6e2e2;
  border-radius: 5px;
  transition: transform 0.3s, box-shadow 0.3s;
}
.product-card:hover {
  transform: translateY(-2px);
}

.product-card img {
  width: 320px;
  height: auto;
  object-fit: cover;
  margin-bottom: 5px;
}

.product-info {
  padding: 10px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

p.product-name {
  margin: 0 0 5px 0;
  font-size: 1.5rem;
  font-weight: 600;
  color: #2c3e50;
  text-align: center;
}

.product-price {
  font-size: 0.9rem;
  color: #640c1a;
  font-weight: bold;
  text-align: center;
  margin-bottom: 10px;
}

.buy-block {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 10px;
}

.add-to-cart {
  padding: 10px 18px;
  background-color: #ebe8e8;
  color: #343131;
  border: none;
  border-radius: 6px;
  font-weight: bold;
  cursor: pointer;
  height: 40px;
  white-space: nowrap;
  transition: background-color 0.3s;
}
.add-to-cart:hover {
  background-color: #db4c42;
  color: #ebe8e8;
}

.quantity-wrapper {
  display: flex;
  align-items: center;
  border: 1px solid #ccc;
  border-radius: 6px;
  overflow: hidden;
  background-color: #fff;
  height: 40px;
}

.quantity-input {
  width: 60px;
  border: none;
  text-align: center;
  font-size: 15px;
  outline: none;
}

.kg-label {
  padding: 0 10px;
  font-size: 15px;
  color: #555;
  border-left: 1px solid #ccc;
  height: 100%;
  display: flex;
  align-items: center;
}

.add-to-cart-container {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
}

div.otstup {
    margin-top: 80px;
}

/* Pagination */
nav.pagination-container {
  margin-top: 20px;
  margin-bottom: 50px;
}
.pagination {
  display: flex;
  justify-content: center;
  list-style: none;
  padding: 0;
  margin: 0;
}
.pagination .page-item {
  margin: 0 5px;
}
.pagination .page-item.active .page-link {
  background: #C64138;
  color: white;
}
.pagination .page-link {
  padding: 5px 10px;
  text-decoration: none;
  color: #C64138;
  border: 1px solid #C64138;
  border-radius: 5px;
  transition: background 0.3s, color 0.3s;
}
.pagination .page-link:hover {
  background: #C64138;
  color: white;
}


.category-and-title {
  padding: 0 10rem;
}


.subcategory-navigation a {
  padding: 4px 10px;
  border: 1px solid #ddd;
  border-radius: 5px;
  background-color: #fff;
}
.subcategory-navigation a:hover {
  background-color: #eaeaea;
}

/* Паралакс */
.c-category {
    position: relative;
    overflow: hidden;
    min-height: 240px; /* можешь сделать больше/меньше */
}


.c-category .parallax-bg {
    position: absolute;
    inset: 0;
    background-image: url('../images/parallax-bg.png');  /* или .png, если надо */
    background-size: cover;
    background-position: center center;
    z-index: 1;
    will-change: background-position;
    transition: background-position 0.2s;
}
.c-category .parallax-fg {
    position: absolute;
    inset: 0;
    background-size: cover;
    background-position: center center;
    opacity: 1;
    z-index: 2;
    pointer-events: none;
    will-change: background-position;
    transition: background-position 0.2s;
}

.c-category.parallax-fg-chick .parallax-fg    { background-image: url('../images/parallax-fg-chick.png'); }
.c-category.parallax-fg-cow .parallax-fg      { background-image: url('../images/parallax-fg-cow.png'); }
.c-category.parallax-fg-pork .parallax-fg     { background-image: url('../images/parallax-fg-pork.png'); }
.c-category.parallax-fg-ind .parallax-fg      { background-image: url('../images/parallax-fg-ind.png'); }
.c-category.parallax-fg-napiv .parallax-fg    { background-image: url('../images/parallax-fg-napiv.png'); }
.c-category.parallax-fg-tush .parallax-fg     { background-image: url('../images/parallax-fg-tush.png'); }
.c-category.parallax-fg-cowb .parallax-fg     { background-image: url('../images/parallax-fg-cowb.png'); }
.c-category.parallax-fg-farsh .parallax-fg    { background-image: url('../images/parallax-fg-farsh.png'); }
.c-category.parallax-fg-default .parallax-fg  { background-image: url('../images/parallax-fg-default.png'); }


.c-category > :not(.parallax-bg):not(.parallax-fg) {
    position: relative;
    z-index: 3;
}


/* ------------ */




/* Cart Notification */
.cart-notification {
  position: fixed;
  bottom: 20px;
  right: 20px;
  background-color: #4CAF50;
  color: white;
  padding: 15px 20px;
  border-radius: 4px;
  box-shadow: 0 4px 8px rgba(0,0,0,0.1);
  z-index: 10000;
  animation: slideIn 0.3s ease-out;
  display: flex;
  align-items: center;
}
.cart-notification.fade-out {
  animation: fadeOut 0.3s ease-in;
}
.notification-content {
  display: flex;
  align-items: center;
  gap: 10px;
}
.notification-content i {
  font-size: 1.2rem;
}
@keyframes slideIn {
  from { transform: translateY(100px); opacity: 0; }
  to { transform: translateY(0); opacity: 1; }
}
@keyframes fadeOut {
  from { opacity: 1; }
  to { opacity: 0; }
}

/* ====== Адаптация под телефоны ====== */
@media (max-width: 768px) {
  body {
    padding-top: 70px; /* чтобы контент не перекрывался хедером */
  }

  div.otstup {
    margin-top: 60px;
  }

  .left-column {
    display: none;
  }

  .page-container {
    flex-direction: column;
    padding: 0 15px;
  }

  /* Заголовок и категория */
  .category-and-title {
    padding: 0 12px;
    text-align: center;
  }

  .category-title {
    font-size: clamp(1.6rem, 4.5vw + 0.5rem, 2.6rem);
    letter-spacing: 0.15rem;
    margin: 8px 0 12px 0;
    line-height: 1.1;
    word-break: break-word;
  }

  /* Подкатегории */
  .subcategory-navigation {
    font-size: 0.95rem;
    text-align: center;
    margin: 6px 0 14px 0;
    gap: 8px;
    justify-content: center;
    padding-bottom: 10px;
    flex-wrap: wrap;
  }

  .subcategory-navigation a {
    display: inline-block;
    padding: 6px 10px;
    border-radius: 6px;
    margin: 3px;
  }

  .filter-form {
    padding: 0 10px;
    margin-top: 20px;
  }

  /* Список товаров */
  .product-list {
    flex-direction: column;
    gap: 20px;
    margin: 0;
  }

  div.product-card {
    display: flex;
    flex-direction: column;
    width: 100%;
    height: auto;
    padding: 12px;
    gap: 12px;
  }

  .product-card img {
    width: 100%;
    height: auto;
    border-radius: 5px;
  }

  .product-info {
    padding: 0;
    gap: 8px;
  }

  p.product-name {
    font-size: 1.2rem;
    margin-bottom: 5px;
  }

  .product-price {
    font-size: 1rem;
    margin-bottom: 5px;
  }

  .buy-block {
    flex-direction: column;
    align-items: stretch;
    gap: 10px;
  }

  .quantity-wrapper,
  .add-to-cart {
    width: 100%;
    justify-content: center;
  }

  /* Пагинация */
  .pagination .page-link {
    padding: 8px 12px;
    font-size: 14px;
  }

  /* Уведомление корзины */
  .cart-notification {
    right: 10px;
    bottom: 10px;
    width: 90%;
    left: 5%;
  }

  /* Мобильный каталог */
  .mobile-catalog-fixed {
    position: fixed;
    top: 70px;
    left: 0;
    right: 0;
    z-index: 999;
    background: #fff;
  }

  #mobileCatalog {
    border: none !important;
    padding: 0;
  }

  .mobile-catalog-content {
    max-height: 60vh;
    overflow-y: auto;
    border: 1px solid #ddd;
    border-radius: 8px;
    padding: 10px;
  }

  .mobile-catalog-content h3 {
    display: none;
  }

  .mobile-catalog-content .category {
    width: 100%;
    max-width: 300px;
    text-align: left;
    font-size: 17px;
    font-weight: 600;
    background: #f8f8f8;
  }

  .mobile-catalog-content .subcategory-list {
    width: 100%;
    max-width: 300px;
  }

  .mobile-catalog-content .subcategory-list a {
    font-size: 16px;
    display: block;
    padding: 8px 12px;
    text-align: left;
  }

  /* Параллакс */
  .c-category {
    min-height: 180px;
  }

  .c-category.parallax {
    padding-top: 70px;
  }

  .c-category .parallax-fg {
    display: none !important; /* убираем foreground для мобилок */
  }

  .c-category .parallax-bg {
    background-attachment: scroll;
    transition: none;
    background-position: center top;
  }
}

/* ====== Очень маленькие экраны (до 480px) ====== */
@media (max-width: 480px) {
  .category-title {
    margin: 10px auto;   /* центрируем */
    text-align: center;  /* текст в центре */
    display: block;      /* гарантируем блочное поведение */

  .subcategory-navigation {
    font-size: 0.9rem;
    gap: 6px;
  }

  .subcategory-navigation a {
    padding: 5px 9px;
    font-size: 14px;
  }

  .c-category {
    min-height: 160px;
  }

  .c-category.parallax {
    padding-top: 60px;
  }
}
