body {
  background: #f0f0f0;
  font-family: Arial, Helvetica, sans-serif;
}

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

/* theme */

.theme-9a {
  background-color: #09a;
  color: #fff !important;
}

.theme,
.theme-89 {
  background-color: #089;
  color: #fff !important;
}

.theme-78 {
  background-color: #078;
  color: #fff !important;
}

.theme-67 {
  background-color: #067;
  color: #fff !important;
}

.theme-56 {
  background-color: #056;
  color: #fff !important;
}

.theme-45 {
  background-color: #045;
  color: #fff !important;
}

.theme-34 {
  background-color: #034;
  color: #fff !important;
}

.theme-23 {
  background-color: #023;
  color: #fff !important;
}

.theme-12 {
  background-color: #012;
  color: #fff !important;
}

.main {
  background: #f0f0f0;
}

.fa-phone-square {
  color: #ccc;
  text-shadow: black 1px 1px 1px;
}

header {
  color: #ccc;
  background-color: #023;
  text-shadow: black 1px 1px 1px;
}

header .image {
  max-width: 120px;
  filter: drop-shadow(1px 1px 1px black);
}

.headbig {
  display: flex;
  justify-content: space-between;
  align-items: center;
  background-image: linear-gradient(#034, #023, #034);
  padding: 8px;
  font-size: clamp(1.25rem, 2vw, 1.5rem);
}


/* .headbig {
    font-size: small !important;
  } */



.headbig img {
  max-width: 32px;
  height: auto;
  filter: drop-shadow(1px 1px 1px black);
  margin: 0 8px;
}



.headbig .hide-small {
  text-align: right;
}

.headsmall {
  display: flex;
  justify-content: space-between;
  align-items: center;

  color: #ccc;
  background-image: linear-gradient(#034, #023, #034);
}

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

.headsmall i .fa .fa-bars {
  padding-left: 16px !important;
}

.headbottom {
  display: flex;
  justify-content: space-between;
  align-items: center;
  width: 100%;
  color: #089;
  padding: 0 8px;
  background-image: linear-gradient(#034, #023, #034);
  font-family: 'Audiowide', cursive;
}

.headbottom .button {
  border: #067 1px solid;
  border-radius: 25%;
  margin-bottom: 8px;
}

.headbottom .flex {
  gap: 12px;
  flex-direction: row-reverse
}

.icon {
  transition: all 0.3s ease;
}

.headbig a {
  text-decoration: none;
}

.headbig a:hover {
  color: aqua;
}

/* aqua */
.icon:hover {
  filter: invert(0.5) sepia(1) saturate(5) hue-rotate(135deg);
}

/*------ Банер ---------------------*/
.banner {
  padding: 12px 8px;

}

.banner_ {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  text-align: center;
  padding-left: 8px;
  background-image: linear-gradient(#ccc, #eee, #ccc);

}

.banner_ h1 {
  margin: 0;
  font-size: clamp(1.5rem, 2vw, 2rem);
  font-family: 'Audiowide', cursive;
  text-shadow: white 1px 1px 1px;
  color: #000;
}

.banner_ h2 {
  margin: 0;
  font-size: clamp(1.25rem, 2vw, 1.5rem);
  font-family: 'Audiowide', cursive;
  text-shadow: white 1px 1px 1px;
  color: #000;
}

/* ------------------------------*/

.sidebar {
  z-index: 3;
  background-color: #f0f0f0 !important;
}

.sidebar-top {
  display: flex;
  justify-content: center;
  place-items: center;
  height: 48px;
  background-image: linear-gradient(#034, #023, #034);
  color: #ccc;
  text-shadow: black 1px 1px 1px;
  justify-content: space-between;
  gap: 6px;
  padding: 8px 0;
}

.sidebar-top button {
  width: 25%
}

.sidebar-top button:hover {
  color: aqua;
}

.flex-catalog {
  display: flex;
  font-size: 22px;
  font-weight: 600 !important;
  background: #ccc;
}

/* ------------------------------*/
#nav01,
#nav02,
#nav03,
#nav04 {
  margin: 0 4px;
  display: block;
}

#nav01 a,
#nav02 a,
#nav03 a,
#nav04 a {
  padding-left: 6px;
}

#nav01 .fa,
#nav02 .fa,
#nav03 .fa,
#nav04 .fa {
  font-size: 32px;
  color: #045;
  padding: 0;
}

#nav01 .flex button,
#nav02 p,
#nav03 p,
#nav04 p {
  font-size: 22px;
  color: #000;
  background-color: #ccc !important;
  margin: 4px 0 0 0;
  padding-left: 4px;
  text-shadow: #fff 1px 1px 1px;
  font-weight: 600;
  font-family: 'Audiowide', cursive;
}

#nav01 .flex .btn:hover {
  color: aqua;
  background: #056 !important;
  text-shadow: black 1px 1px 1px;
}

.baritem .bar-item {
  color: #f0f0f0;
  margin: 4px 0;
  background-color: #067;
  padding-left: 12px;
  padding-right: 8px;
}

/* content */
h3.span #cina {
  float: right;
}

.image {
  filter: drop-shadow(8px 8px 10px black);
}

/* Стилі для кнопки прокрутки наверх */
#scrollToTopBtn {
  display: none;
  position: fixed;
  /*  позіція знизу */
  bottom: 42px;
  right: 8px;
  z-index: 1;
  border: none;
  outline: none;
  background-color: #0893;
  /* Змінено на колір теми */
  color: white;
  cursor: pointer;
  padding: 15px;
  border-radius: 25%;
  width: 50px;
  height: 50px;
  font-size: 18px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
  transition: all 0.3s ease;
  border: 1px solid #067;
}

#scrollToTopBtn:hover {
  background-color: #0348;
  transform: translateY(-3px);
  box-shadow: 0 6px 15px rgba(0, 0, 0, 0.4);
}

@media (max-width: 600px) {
  #scrollToTopBtn {
    bottom: 8px;
    right: 9px;
  }
}


/* Індикатор офлайн */
#offlineIndicator {
  display: none;
  z-index: 1001;
}

/* Категорії */
.category-filters {
  display: flex;
  justify-content: center;
  gap: 10px;
  margin: 20px 0;
  flex-wrap: wrap;
}

.category-btn {
  padding: 8px 16px;
  border: 1px solid black;
  background: #089;
  color: white;
  cursor: pointer;
  transition: all 0.3s;
}

.category-btn:hover,
.category-btn.active {
  background: #ccc;
  color: black;
}

/* Рейтинг */
.stars {
  display: flex;
  gap: 2px;
  margin-right: 8px;
}

.star {
  font-size: 18px;
  color: #aaa;
  position: relative;
}

.star.filled {
  color: #ffc107;
}

.star.half-filled {
  position: relative;
  color: #aaa;
}

.star.half-filled::before {
  content: "★";
  position: absolute;
  left: 0;
  top: 0;
  width: 50%;
  color: #ffc107;
  overflow: hidden;
}

.rating-value {
  font-weight: bold;
  color: #ffc107;
  margin-right: 5px;
}

.reviews-count {
  color: #666;
  font-size: 14px;
}

/* Пошук */

.search-results-info {
  text-align: center;
  margin: 10px 0;
  color: #666;
  font-style: italic;
  font-size: 18px;
}

.no-results {
  text-align: center;
  padding: 50px;
  color: #999;
  font-size: 18px;
  width: 100%;
}

/* -КОШИК- */
.cart-total {
  font-size: 20px;
  font-weight: bold;
  text-align: right;
  padding: 10px;
  margin-top: 15px;
  border-bottom: 2px solid #023
}

.cart-buttons {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 2px;
  padding: 16px 4px;
}

.cart-count {
  background-color: red;
  border-radius: 50%;
  padding: 1px 3px;
  margin-top: 2px;
  margin-right: 2px;
}

#cartCount {
  font-size: 10px;
}

.cart-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px;
  border-bottom: 1px solid #ccc;
}

.cart-item-name {
  flex: 2;
}

.cart-item-price {
  flex: 1;
  text-align: right;
  font-weight: bold;
}

.cart-item-remove {
  flex: 0;
  margin-left: 10px;
  color: red;
  cursor: pointer;
  font-weight: bold;
  font-size: 20px;
}

/* Доставка та оплата */
#orderTotal {
  font-weight: bold;
  text-align: right;
  margin-top: 10px;
}

.order-summary {
  background: #cef;
  padding: 10px;
  border-radius: 4px;
  margin-bottom: 20px;
}

/* ========== АДАПТИВНІСТЬ КАРТОК ========== */
.row-padding {
  display: flex;
  flex-wrap: wrap;
}

.thr_d {
  box-sizing: border-box !important;
  float: left !important;
  margin-bottom: 16px;
}

/* 4 колонки  */
@media (min-width:1025px) {
  main {
    margin-left: 260px !important;
  }

  .sidebar {
    width: 260px !important;
  }

  .thr_d {
    width: 25% !important;
    padding: 0 4px !important;
  }

  .product-name {
    font-size: 20px !important;
  }

  .product-price {
    font-size: 20px !important;
  }

  .product-description {
    font-size: 12px !important;
  }

  .product-buttons {
    margin-bottom: 15px
  }

  .product-rating {
    font-size: 16px !important;
  }

  .product-buttons button {
    text-align: center;
    margin-inline: 1%;
    width: 47%;
    height: 50px;
    font-size: 14px !important;
  }
}

/* 3 колонки */
@media (max-width:1024px) {
  main {
    margin-left: 240px !important;
  }

  .sidebar {
    width: 240px !important;
  }

  .thr_d {
    width: 33.333% !important;
    padding: 0 4px !important;
  }

  .product-name {
    font-size: 20px !important;
  }

  .product-price {
    font-size: 20px !important;
  }

  .product-description {
    font-size: 12px !important;
  }

  .product-buttons {
    margin-bottom: 15px
  }

  .product-rating {
    font-size: 16px !important;
  }

  .product-buttons button {
    text-align: center;
    margin-inline: 1%;
    width: 47%;
    height: 50px;
    font-size: 14px !important;
  }
}

/* 2 колонки */
@media (max-width:992px) and (min-width:601px) {
  .sidebar {
    height: auto;
    width: 35% !important;
  }

  .thr_d {
    width: 50% !important;
    padding: 0 8px !important;
  }

  .product-price {
    font-size: 24px !important;
  }

  .product-name {
    font-size: 24px !important;
  }

  .product-description {
    font-size: 16px !important;
  }

  .product-rating {
    font-size: 20px !important;
  }

  .product-buttons {
    margin-bottom: 15px
  }

  .product-buttons button {
    text-align: center;
    margin-inline: 1%;
    width: 47%;
    height: 60px;
    font-size: 18px !important;
  }
}

/* 1 колонка */
@media (max-width: 600px) {

  .sidebar {
    height: auto;
    width: 70% !important;
  }

  .row-padding {
    padding: 0 2px
  }

  .thr_d {
    width: 100% !important;
  }

  .product-price {
    font-size: 26px !important;
  }

  .product-name {
    font-size: 24px !important;
  }

  .product-description {
    font-size: 16px !important;
  }

  .product-rating {
    font-size: 20px !important;
  }

  .product-buttons {
    margin-bottom: 15px
  }

  .product-buttons button {
    text-align: center;
    margin-inline: 1%;
    width: 47%;
    height: 60px;
    font-size: 18px !important;
  }
}

/* Карта товару */
.product-card {
  display: grid;
  grid-template-columns: repeat(1, 1fr);
  grid-template-rows: auto auto auto auto auto auto;
  box-shadow: 0 4px 10px 0 rgba(0, 0, 0, 0.2), 0 4px 20px 0 rgba(0, 0, 0, 0.19)
}

.product-name {
  /* 1. Центрування вмісту */
  display: flex;
  justify-content: center;
  /* Центр по горизонталі */
  align-items: center;
  /* Центр по вертикалі */
  text-align: center;
  /* 2. Резервування місця під 2 рядки */
  /* 1.2 * 2 рядки = 2.4em */
  line-height: 1.2;
  height: 2.8em;
  /* 3. Стилі */
  text-shadow: black 1px 1px 1px;
  color: white;
  background: #067;
  font-weight: bold;
  /* 4. Щоб min-height не ігнорувався в деяких браузерах */
  box-sizing: border-box;
}

.product-price {
  display: flex;
  justify-content: center;
  place-items: center;
  font-size: 22px;
  font-weight: bold;
  color: #089;
  padding: 8px 4px;
  text-shadow: white 1px 1px 1px;
  box-shadow: 0 2px 5px 0 rgba(0, 0, 0, 0.16), 0 2px 10px 0 rgba(0, 0, 0, 0.12);
}

.product-description {
  display: flex;
  justify-content: center;
  align-items: center;
  text-align: center;
  /* Резервування місця під 3 рядки */
  line-height: 1.2;
  height: 3.6em;
  color: #666;
  box-sizing: border-box;
}

.product-rating {
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 10px 0;
}

.product-buttons {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  box-shadow: 0 2px 5px 0 rgba(0, 0, 0, 0.16), 0 2px 10px 0 rgba(0, 0, 0, 0.12);
}

.product-buttons button {
  border: 1px solid aqua;
  background: #034;
  color: lightgray;
  text-shadow: black 1px 1px 1px;
  text-align: center;
}

/* footer */
footer {
  background: #034;
  padding: 0;
  grid-template-columns: auto auto auto;
}

footer .komcat span {
  color: #ccc;
  text-shadow: black 1px 1px 1px;
  font-family: 'Audiowide', cursive !important;
  text-shadow: black 1px 1px 1px;
  font-size: clamp(1.25rem, 2vw, 1.5rem);
  display: flex;
  align-items: center;
  justify-content: center;
}

.flex-komcat {
  display: flex;
  align-items: center;
  justify-content: left;
}

.komcat-ltd {
  display: grid;
  grid-template-columns: repeat(1, 1fr);
  grid-template-rows: repeat(3, 1fr);
  gap: 0px;
}

.flex-ofline {
  align-items: center;
  justify-content: center;
}

.ltd1 {
  color: #056;
  display: flex;
  align-items: center;
  justify-content: center;
}

.ltd1 span {
  margin-bottom: -16px;
  text-shadow: black 1px 1px 1px;
}

.ltd2 {
  color: #ccc;
  font-size: clamp(1.5rem, 2vw, 1.25rem);
  display: flex;
  align-items: center;
  justify-content: center;
}

.ltd3 {
  color: #056;
  display: flex;
  align-items: center;
  justify-content: center;
}

.ltd3 span {
  margin-top: -16px;
  text-shadow: black 1px 1px 1px;
}

.feed_back {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  grid-template-rows: repeat(3, 1fr);
}

.flex1 {
  grid-column: span 2 / span 2;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: clamp(.8rem, 2vw, 1rem);
  color: #ccc;
  font-style: italic;
  margin-bottom: -16px;
  text-shadow: black 1px 1px 1px;
}

.flex2 {
  grid-row-start: 2;
  display: flex;
  align-items: center;
  justify-content: right;
  margin: 0 2px;
}

.flex3 {
  grid-row-start: 2;
  display: flex;
  align-items: center;
  justify-content: left;
  margin: 0 2px;
}

.flex2 button,
.flex3 button {
  border: #089 1px solid;
  border-radius: 25%;
}

.flex4 {
  grid-column: span 2 / span 2;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: clamp(.8rem, 2vw, 1rem);
  color: #ccc;
  font-style: italic;
  margin-top: -16px;
  text-shadow: black 1px 1px 1px;
}

@media (max-width: 600px) {
  .flex3 {
    justify-content: right !important;
    padding-right: 4px;
  }

  .flex4 {
    display: none;
  }

  /* footer #scrollToTopBtn {
    display: none !important;
  } */
}

/* footer end */

.komcat {
  font-family: 'Audiowide', cursive;
  text-shadow: black 1px 1px 1px;
}

.headsmall .komcat {
  font-size: 24px;
}

/* Модальні вікна Телеграм Email */
#feedbackModal_email .modal-content {
  max-width: 500px;
}

#feedbackForm .col {
  width: 100%;
}

#feedbackName {
  width: 100%;
}

#feedbackEmail {
  width: 100%;
}

#feedbackMessage {
  width: 100%;
  resize: vertical;
}

#feedbackStatus {
  display: none;
  margin-bottom: 15px;
  padding: 10px;
  border-radius: 5px;
}

.flex-out {
  gap: 10px;
  justify-content: center;
}

#feedbackModal_email p {
  margin-top: 15px;
  color: #666;
}

#feedbackSuccess {
  display: none;
}

/* CALC */
#calc-data img {
  max-width: 330px;
  height: auto;
  padding: 20px;
}

/* PRICE */
.price-img img {
  max-width: 330px;
  height: auto;
  padding: 20px;
}

/* ========= ДОДАТКОВІ СТИЛІ ДЛЯ ПРОКРУТКИ МЕНЮ НА МАЛИХ ЕКРАНАХ ========= */
@media (max-width: 992px) {
  .sidebar {
    overflow-y: auto;
    overflow-x: hidden;
    max-height: 100vh;
    -webkit-overflow-scrolling: touch;
    /* плавний скрол на iOS */
  }

  /* Забезпечуємо, щоб внутрішній контент не обрізався */
  .sidebar .bar-block {
    padding-bottom: 20px;
  }

  /* Для зручності – трохи збільшуємо область кліку */
  .sidebar .baritem button {
    white-space: normal;
    word-break: break-word;
    text-align: left;
    padding: 12px 16px;
  }

  /* Заголовок "КАЛЬКУЛЯТОРИ" теж має бути видимим */
  .flex-catalog {
    position: sticky;
    top: 0;
    background-color: inherit;
    z-index: 10;
    padding: 8px 0;
    background: #f1f1f1;
  }

  /* Опціонально: фон для кращої читабельності під час прокрутки */
  .sidebar {
    background-color: #f1f1f1;
  }
}

/* Для дуже маленьких висот (наприклад, ландшафтна орієнтація) */
@media (max-height: 500px) and (max-width: 768px) {
  .sidebar {
    max-height: 100vh;
  }

  .baritem button {
    padding: 8px 12px;
    font-size: 14px;
  }
}

/* Стилізація скролбару для кращого вигляду (опціонально) */
.sidebar::-webkit-scrollbar {
  width: 6px;
}

.sidebar::-webkit-scrollbar-track {
  background: #e0e0e0;
  border-radius: 4px;
}

.sidebar::-webkit-scrollbar-thumb {
  background: #888;
  border-radius: 4px;
}

.sidebar::-webkit-scrollbar-thumb:hover {
  background: #555;
}