/* Base & Reset */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}
#tr-popup,
.tr-popup {
  display: none !important;
  visibility: hidden !important;
  height: 0 !important;
  width: 0 !important;
  overflow: hidden !important;
  position: absolute !important;
  top: -9999px !important;
  left: -9999px !important;
}
body {
  font-family: sans-serif;
  background: linear-gradient(rgba(240, 248, 255, 0.85), rgba(240, 248, 255, 0.85)),
    url('../../images/bckgrnd.jpeg') no-repeat center center fixed;
  background-size: cover;
  color: #333;
  line-height: 1.5;
  min-height: 100vh;

}

a {
  text-decoration: none;
  color: inherit;
}

html,
body {
  height: 100%;
}

html {
  scroll-behavior: smooth;
}

.page-wrapper {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

main {
  flex: 1 0 auto;
  /* Это ключевая строка */
}

main>*:last-child {
  margin-bottom: 0 !important;
}

/* Header & Navigation */
header {
  background: #0a2540;
  padding: 0rem;
  position: sticky;
  top: 0;
  /* Прижимаем к верху */
  left: 0;
  right: 0;
  width: 100%;
  z-index: 1000;
  /* Чтобы header был поверх других элементов */
  box-shadow: 0 10px 10px rgba(0, 0, 0, 0.5);
  /* Тень для красоты */
  margin-bottom: 10px;
}

.login-link {
  position: absolute;
  right: 20px;
  top: 50%;
  transform: translateY(-50%);
  font-weight: bold;
  flex-direction: column;
  text-align: right;
  font-size: clamp(10px, 1.2vw, 18px);
}

.login-link a:hover {
  text-decoration: underline;
}

/* Footer */
footer {
  background: #0a2540;
  color: #fff;
  text-align: center;
  padding: 1rem;
  flex-shrink: 0;
}
footer a {
  transition: transform 0.2s ease; /* Плавный переход */
  display: inline-block; /* Чтобы transform работал */
  font-weight: 100;
  font-size: 20px;
}

footer a:hover {
  transform: translateX(5px); /* Сдвиг вправо на 5px */
}
/* Container */

.container {
  max-width: 1200px;
  padding-left: 1rem;
  padding-right: 1rem;
  margin-left: auto;
  margin-right: auto;
}

/* Product Grid */
.products {
  display: grid;
  gap: 1.5rem;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
}

/* Filters and Controls */
.controls {
  display: flex;
  flex-wrap: wrap;
  gap: 15px;
  align-items: center;
  margin-bottom: 15px;
  background-color: rgba(255, 255, 255, 0.85);
  border-radius: 10px;
  padding: 20px;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
  backdrop-filter: blur(5px);
}

.controls select,
.controls input[type="checkbox"]+label {
  cursor: pointer;
}

/* Sidebar and Layout */
.catalog-layout {
  display: flex;
  gap: 20px;
  max-width: 1200px;
  margin: 0 auto 4rem;
}

.sidebar {
  width: 200px;
  background-color: #f4f4f4;
  padding: 10px;
  border-radius: 8px;
}

.sidebar h3 {
  margin-bottom: 10px;
}

.sidebar ul {
  list-style: none;
  padding-left: 0;
}

.sidebar li {
  cursor: pointer;
  padding: 8px 6px;
  border-radius: 5px;
}

.sidebar li:hover,
.sidebar li.active {
  background-color: #ccc;
  font-weight: bold;
}

.container,
.cart-container,
.products {
  background-color: rgba(255, 255, 255, 0.85);
  border-radius: 10px;
  padding: 20px;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
  margin-bottom: 20px;
  backdrop-filter: blur(5px);
}




#authModal {
  z-index: 10000;
}

#productModal {
  z-index: 9000;
}



/* Анимация товара в корзину */
@keyframes slideDown {
  from {
    transform: translateY(-50px);
    opacity: 0;
  }

  to {
    transform: translateY(0);
    opacity: 1;
  }
}

.highlight {
  background-color: #ffeb3b;
  padding: 2px 0;
  border-radius: 3px;
}

.sort-wrapper {
  display: flex;
  align-items: center;
  gap: 8px;
  font-family: sans-serif;
  font-size: 14px;
  margin: 1em 0;
}

.sort-select {
  padding: 6px 10px;
  font-size: 14px;
  border: 1px solid #ccc;
  border-radius: 6px;
  background-color: #fff;
  transition: border-color 0.3s;
}

.search-filter {
  padding: 8px 12px;
  border: 1px solid #ddd;
  border-radius: 4px;
  min-width: 200px;
}

/* Стили для модального окна товара */
#productModalContent {
  display: flex;
  flex-wrap: wrap;
  gap: 20px;
}

.product-modal-image {
  flex: 1;
  min-width: 300px;
}

.product-modal-image img {
  width: 100%;
  max-height: 400px;
  object-fit: contain;
}

.product-modal-info {
  flex: 2;
  min-width: 300px;
}

.product-modal-info h2 {
  color: #0a2540;
  margin-bottom: 15px;
}

/* Добавляем стили для ссылки на корзину */
.cart-link {
  margin-left: 15px;
  color: white;
  text-decoration: none;
  position: relative;
  display: inline-flex;
  align-items: center;
}

.cart-link:hover {
  text-decoration: underline;
}

/* Стили для слайдера */
.featured-products {
  margin: 5px;
  padding: 10px;
  background-color: rgba(255, 255, 255, 0.85);
  border-radius: 10px;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
  overflow: hidden;
}

.slider-wrapper {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  margin: 0 auto;
  width: 100%;
}

.products-slider {
  width: calc(100% - 100px);
  /* Оставляем место для кнопок */
  overflow: hidden;
  margin: 0 auto;
}

.slider-container {
  display: flex;
  transition: transform 0.5s ease;
  will-change: transform;
  gap: 20px;
  padding: 10px 0;
}

.slider-product {
  flex: 0 0 auto;
  width: 250px;
  background: #fff;
  border-radius: 8px;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
  padding: 15px;
  text-align: center;
  transition: transform 0.3s ease;
}

.slider-product:hover {
  transform: translateY(-5px);
}

.slider-product img {
  width: 100%;
  height: 150px;
  object-fit: contain;
  margin-bottom: 10px;
}

.slider-product h3 {
  font-size: 16px;
  margin-bottom: 8px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.slider-product .price {
  font-weight: bold;
  color: #0a2540;
  font-size: 18px;
  margin-bottom: 10px;
}

.slider-btn {
  background: #0a2540;
  color: white;
  border: none;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  cursor: pointer;
  font-size: 18px;
  z-index: 1;
  transition: all 0.3s ease;
  display: flex;
  align-items: center;
  justify-content: center;
}

.slider-btn:hover {
  background: #014d75;
}

.slider-btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.pagination {
  margin-top: 20px;
  text-align: center;
  margin-bottom: 20px;
}

.pagination button {
  margin: 0 4px;
  padding: 5px 10px;
  border: none;
  background: #f0f0f0;
  cursor: pointer;
  border-radius: 5px;
}

.pagination button.active-page {
  background-color: #0a2540;
  color: white;
  font-weight: bold;
}

/* Мобильный верх */
.navbar-mobile-header {
  display: none;
}

/* Меню (по умолчанию для десктопа) */
/* Центрирование меню на десктопе */
.navbar {
  display: flex;
  flex-direction: column;
  background: #0a2540;
  padding: 10px 20px;
  color: white;

}

/* Центрирование самого меню */
.navbar-menu {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: clamp(40px, 5vw, 80px);
  list-style: none;
  padding: 0px;
  margin: clamp(5px, 2vw, 10px); 0;
}

/* Ссылки меню */
.navbar-menu li a {
  color: white;
  text-decoration: none;
  font-weight: bold;
  font-size: clamp(14px, 1.5vw, 20px);
  transition: transform 0.2s ease, font-size 0.2s ease;
}

/* Ховер-эффект: немного увеличивается и приподнимается */
.navbar li:hover {
  transform: translateY(+7px) scale(1.2);
}

/* Активная ссылка */
.navbar-menu li a.active {
  font-size: clamp(18px, 1.5vw, 24px);
  text-decoration: underline;
}

.mobile-menu .menu-columns {
  display: none;
}

.quantity-input {
  width: 60px;
  padding: 5px;
  text-align: center;
  border: 1px solid #ddd;
  border-radius: 4px;
}

.cart-notification {
  position: fixed;
  bottom: 20px;
  right: 20px;
  background-color: #0a2540;
  color: white;
  padding: 15px 20px;
  border-radius: 5px;
  box-shadow: 0 3px 10px rgba(0, 0, 0, 0.2);
  z-index: 1000;
  transition: opacity 0.5s;
}

.fade-out {
  opacity: 0;
}

input[type=number]::-webkit-outer-spin-button,
input[type=number]::-webkit-inner-spin-button {
  -webkit-appearance: none;
  margin: 0;
}

/* Убрать стрелки в Firefox */
input[type=number] {
  -moz-appearance: textfield;
}

@media (max-width: 1024px) {
  footer {
    display: none !important;
  }

  .catalog-layout {
    margin-top: 17px;
  }

  .container {
    margin-top: 17px !important;
  }

  .top-header {
    display: none !important;
  }

  header div img {
    display: none !important;
  }
}

.top-header {
  background-color: #0a2540;
  padding: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: clamp(30px, 4vw, 100px);
  font-size: clamp(14px, 1.5vw, 20px);
  flex-wrap: wrap;
}


.top-header a {
  color: white;
  text-decoration: none;
}

.top-header a:hover {
  transform: scale(1.05);
}

.product-card-New {
  display: flex;
  align-items: flex-start;
  gap: 16px;
  border: 2px solid #ddd;
  border-radius: 4px;
  cursor: pointer;
  padding: 5px 5px 5px 5px;
  background-color: #ffffff;
}

mark {
  background-color: yellow;
  color: black;
  padding: 0 2px;
  border-radius: 2px;
}

.product-card-New:hover {
  transform: scale(1.02);
}

.product-img-New {
  width: 100px;
  height: 100px;
  object-fit: cover;
  border-radius: 4px;
  flex-shrink: 0;
  border: 2px solid #000000;
}

.product-info-New {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex: 1;
}

.product-title-New {
  margin: 0;
  font-size: 16px;
  flex: 1;
  text-align: left;
}

.product-details-New {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 4px;
  min-width: 180px;
}

.product-leftover-New {
  color: green;
}

.product-leftover-New.red {
  color: red;
}

.product-controls-New {
  display: flex;
  align-items: center;
  gap: 8px;
}

/* Всплывающее сообщение */
.toast-message {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  color: #0a2540 ;
  background-color: white;
  padding: 24px;
  border: 1px solid #1d043f;
  border-radius: 8px;
  font-size: 25px;
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.2);
  opacity: 0;
  transition: opacity 0.3s ease;
  display: none;
  z-index: 999999;
  flex-direction: column;
  /* по умолчанию скрыто */
}

.toast-message.show {
  display: block;
  opacity: 3;
}

.copy-btn {
  background: none;
  border: none;
  cursor: pointer;
  width: 24px;
  height: 24px;
  padding: 0;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform 0.2s ease;
}

.copy-btn svg rect {
  stroke-width: 2;
  fill: none;
  rx: 2;
  ry: 2;
  transition: stroke 0.3s ease;
}

.copy-btn:hover {
  transform: scale(1.2);
}

.floating-cart {
  display: none;
  position:absolute;
}

.ripple-button {
  position: relative;
  overflow: hidden;
  z-index: 0;
}

.ripple-button::after {
  content: "";
  position: absolute;
  border-radius: 50%;
  transform: scale(0);
  background: rgba(255, 255, 255, 0.5);
  animation: none;
  pointer-events: none;
}

@keyframes ripple {
  to {
    transform: scale(4);
    opacity: 0;
  }
}

.bright-button {
  background-color: white;
  color: #0a2540;
  border: 2px;
  padding: clamp(6px, 1.5vw, 8px) clamp(8px, 1.5vw, 12px);
  border-radius: 6px;
  cursor: pointer;
  font-size: clamp(14px, 1.5vw, 20px) !important;
  border-width: 2px;
  border-style: solid;
  border-color: #0a2540;
  margin: 3px 3px 3px 3px;
}

.bright-button:hover {
  background-color: #1a3a5a;
  color: white;
  border-width: 2px;
  border-style: solid;
  border-color: white;
}

.bright-button:disabled {
  background-color: #cccccc;
  cursor: not-allowed;
}

.dark-button {
  background-color: #0a2540 !important;
  color: white !important;
  border: 2px solid #0a2540;
  padding: clamp(6px, 1.5vw, 8px) clamp(8px, 1.5vw, 12px);
  border-radius: 6px;
  cursor: pointer;
  font-size: clamp(14px, 1.5vw, 20px) !important;
  margin: 3px 3px 3px 3px;
}

.dark-button:hover {
  background-color: #1a3a5a;
  color: white;
  border: 2px solid #1a3a5a;
}

.dark-button:disabled {
  background-color: #cccccc;
  cursor: not-allowed;
}

.bright-button-small {
  background-color: white;
  color: #0a2540;
  border: 1px;
  padding: 5px 8px;
  border-radius: 3px;
  cursor: pointer;
  font-size: 12px;
  border-width: 1px;
  border-style: solid;
  border-color: #0a2540;
  margin: 3px 3px 3px 3px;
}

.bright-button-small:hover {
  background-color: #1a3a5a;
  color: white;
  border-width: 1px;
  border-style: solid;
  border-color: white;
}

.bright-button-small:disabled {
  background-color: #cccccc;
  cursor: not-allowed;
}

.dark-button-small {
  background-color: #0a2540;
  color: white;
  border: 1px solid #0a2540;
  padding: 5px 8px;
  border-radius: 4px;
  cursor: pointer;
  font-size: 12px;
  margin: 3px 3px 3px 3px;
}

.dark-button-small:hover {
  background-color: #1a3a5a;
  color: white;
  border: 1px solid #1a3a5a;
}

.dark-button-small:disabled {
  background-color: #cccccc;
  cursor: not-allowed;
}

.reset-button {
  all: unset;
  /* <-- главное свойство */
  display: inline-block;
  /* нужно вернуть базовые свойства */
  cursor: pointer;
}

@keyframes shake {
  0% { transform: translate(0); }
  25% { transform: translate(-3px, 0); }
  50% { transform: translate(3px, 0); }
  75% { transform: translate(-3px, 0); }
  100% { transform: translate(0); }
}

.shake-on-hover:hover {
  animation: shake 0.4s;
}

.link-text {
  font-weight: bold;
}

.link-text:hover {
  text-decoration: underline;
}

.cookie-banner {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  background: #222;
  color: #fff;
  padding: 1rem;
  font-size: 0.9rem;
  display: none;
  justify-content: space-between;
  align-items: center;
  z-index: 9999;
}

.cookie-banner p {
  margin: 0;
}

.cookie-banner a {
  color: #4da6ff;
  text-decoration: underline;
}

.cookie-banner button {
  background-color: #4da6ff;
  color: white;
  border: none;
  padding: 6px 12px;
  cursor: pointer;
  border-radius: 4px;
}

.cookie-banner button:hover {
  background-color: #3399ff;
}