/* =====================================================
   HEADER
===================================================== */

/* Верхняя полоса */
.header .upper__nav {
  background: var(--header-top-bg);
  padding: 8px 0;
}

.header .upper__nav .wrapper {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.upper__nav_left_list,
.upper__nav_middle_list {
  display: flex;
  gap: 26px;
  align-items: center;
}

.upper__nav_left_list li a,
.upper__nav_middle_list li a {
  font-family: var(--font-family);
  font-weight: 400;
  font-size: 12px;
  color: #fff;
}

.upper_nav_right {
  display: flex;
  align-items: center;
  gap: 7px;
}

a.upper__nav_right_chut {
  display: flex;
  justify-content: flex-start;
  align-items: center;
  gap: 6px;
  border-radius: 5px;
  width: 116px;
  height: 22px;
  background: var(--light-yellow);
  font-size: 8px;
  font-family: var(--font-family);
  font-weight: 400;
  color: #121212;
  padding-left: 6px;
}

a.upper__nav_right_whatsup {
  display: flex;
  color: #fff;
}

/* Основная навигация */
.main__nav {
  background: var(--header-main-bg);
  padding: 16px 0 0;
}

.global__nav {
  position: sticky;
  top: 0;
  left: 0;
  width: 100%;
  z-index: 100;
}

.middle__nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-bottom: 16px;
}

.middle__nav-div {
  display: flex;
  align-items: center;
}

/* Логотип */
.site-logo {
  display: flex;
  align-items: center;
  margin-right: 32px;
}

.site-logo img,
.custom-logo {
  max-height: 56px;
  width: auto;
  margin-right: 32px;
}

.site-logo__text {
  font-family: var(--second-family);
  font-weight: 700;
  font-size: 18px;
  color: var(--accent);
  white-space: nowrap;
}

/* Кнопка "Каталог" */
.btn__middle_nav {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 8px;
  font-family: var(--font-family);
  font-weight: 500;
  font-size: 14px;
  color: var(--brown);
  border-radius: 5px;
  width: 120px;
  height: 40px;
  background: var(--accent);
  cursor: pointer;
  margin-right: 10px;
  white-space: nowrap;
}

.btn__middle_nav:hover { opacity: 1; }

.catalog-icon { fill: var(--brown); }

/* Поисковая форма */
.search-form {
  position: relative;
  display: flex;
  align-items: center;
}

.search-form label { display: none; }

.search-field {
  border-radius: 5px;
  width: 480px;
  height: 40px;
  background: #fff;
  border: none;
  padding: 0 54px 0 90px;
  font-family: var(--font-family);
  font-size: 14px;
  color: var(--temnyy-tekst);
}

.search-field::placeholder { color: var(--seryy-tekst); }

.search-scope-btn {
  font-family: var(--font-family);
  font-weight: 500;
  font-size: 13px;
  color: var(--brown);
  border-radius: 5px;
  width: 74px;
  height: 31px;
  background: var(--bright-yellow);
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 4px;
  position: absolute;
  top: 4.5px;
  left: 5px;
  cursor: pointer;
  white-space: nowrap;
  border: none;
}

.search-submit {
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 5px;
  width: 46px;
  height: 40px;
  background: var(--accent);
  position: absolute;
  right: 0;
  top: 0;
  cursor: pointer;
  border: none;
  color: var(--brown);
}

/* Иконки пользователя */
.middle__nav_links {
  display: flex;
  gap: 18px;
  margin-left: 24px;
  align-items: center;
}

.middle_nav_link a.a-page {
  font-family: var(--font-family);
  font-weight: 500;
  font-size: 13px;
  color: #fff;
  display: flex;
  flex-direction: column-reverse;
  align-items: center;
  gap: 4px;
  padding: 8px 0;
  white-space: nowrap;
  position: relative;
}

/* Корзина */
.cart-icon-wrap {
  position: relative;
  display: inline-flex;
}

.cart-count {
  position: absolute;
  top: -6px;
  right: -8px;
  background: var(--dark-blue);
  color: #fff;
  font-size: 10px;
  font-weight: 700;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  line-height: 1;
}

/* Нижняя полоса навигации */
.bottom__nav {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 10px 0;
  flex-wrap: wrap;
  border-top: 1px solid rgba(255,255,255,0.08);
}

.bottom__nav_link,
.bottom__nav a {
  font-family: var(--font-family);
  font-weight: 500;
  font-size: 13px;
  color: var(--brown);
  border-radius: 5px;
  min-width: 80px;
  height: 36px;
  display: inline-flex;
  justify-content: flex-end;
  align-items: center;
  gap: 8px;
  padding: 0 12px;
  background: var(--accent);
  white-space: nowrap;
}

.bottom__nav_links {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}

.bottom__nav_links li a {
  font-family: var(--font-family);
  font-weight: 500;
  font-size: 13px;
  color: var(--brown);
  border-radius: 5px;
  height: 36px;
  display: inline-flex;
  align-items: center;
  padding: 0 12px;
  background: var(--accent);
  white-space: nowrap;
}

.bottom__nav_link--sale { flex-direction: row-reverse; }

/* Анимация блика */
@keyframes shine {
  0%   { left: -60%; opacity: 1; }
  100% { left: 120%; opacity: 0; }
}

@keyframes bg-shift {
  0%, 100% { background-position: 0% 50%; }
  50%       { background-position: 100% 50%; }
}

.anim {
  overflow: hidden;
  position: relative;
  background: linear-gradient(120deg, #ffc74e, #ffb83b, #ffd66a);
  background-size: 200% 200%;
  animation: bg-shift 6s ease-in-out infinite;
}

.anim::after {
  content: "";
  position: absolute;
  top: -50%;
  left: -60%;
  width: 60%;
  height: 200%;
  transform: skewX(-20deg);
  background: linear-gradient(90deg, transparent, rgba(255,255,255,.35), transparent);
  animation: shine 1.2s ease-in-out infinite;
}

/* Промо-баннер */
.header__promo { line-height: 0; }
.header__promo img { width: 100%; }
.header__promo-mobile { display: none; }


/* =====================================================
   СЕКЦИЯ: ПОПУЛЯРНЫЕ КАТЕГОРИИ
===================================================== */
.popular {
  padding: 80px 0;
}

h3.popular__title {
  font-family: var(--font-family);
  font-weight: 600;
  font-size: 24px;
  color: var(--temnyy-tekst);
  margin-bottom: 40px;
}

.popular__block {
  display: flex;
  gap: 16px;
  align-items: flex-start;
  justify-content: center;
}

.popular__item {
  position: relative;
  border-radius: 15px;
  overflow: hidden;
}

.popular__item img { display: block; }

h3.popular__item_title {
  font-family: var(--font-family);
  font-weight: 700;
  font-size: 32px;
  line-height: 1.2;
  text-transform: uppercase;
  text-align: center;
  color: #fff;
  position: absolute;
  top: 28px;
  width: 100%;
  text-shadow: 0 2px 8px rgba(0,0,0,.35);
}

.popular__btn {
  font-family: var(--font-family);
  font-weight: 600;
  font-size: 15px;
  color: var(--temnyy-tekst);
  border-radius: 9px;
  min-width: 160px;
  height: 40px;
  background: #fff;
  display: inline-flex;
  justify-content: center;
  align-items: center;
  position: absolute;
  bottom: 30px;
  left: 50%;
  transform: translateX(-50%);
}

.popular__item.popular__item_second {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  max-width: 570px;
  justify-content: space-between;
  align-items: flex-start;
}

a.popular__item_img {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  font-family: var(--font-family);
  font-weight: 600;
  font-size: 12px;
  color: #2d2d2d;
  text-align: center;
}

a.popular__item_img img {
  width: 174px;
  height: 156px;
  object-fit: cover;
  border-radius: 12px;
}

.popular__bottom {
  margin-top: 20px;
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
}

h3.popular__item_bottom_title { text-align: left; }

.popular__bottom_btn {
  left: 30px;
  transform: none;
  bottom: 160px;
}


/* =====================================================
   ОБЩИЕ СТИЛИ СЕКЦИЙ ТОВАРОВ
===================================================== */
.vitamins, .pink, .office, .gift, .awards, .child, .postcards, .kit {
  padding: 80px 0;
}

.section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 24px;
}

.section-header h2,
.section-header h3 {
  font-family: var(--font-family);
  font-weight: 600;
  font-size: 24px;
  color: #2d2d2d;
}

.section-header a {
  font-family: var(--font-family);
  font-weight: 500;
  font-size: 14px;
  color: var(--temnyy-tekst);
}

.section__block {
  display: flex;
  gap: 16px;
  align-items: flex-start;
}

.section__img-col {
  position: relative;
  flex-shrink: 0;
  border-radius: 15px;
  overflow: hidden;
  max-width: 260px;
}

.section__img-col img { display: block; width: 100%; }

.section__cat-title {
  font-family: var(--font-family);
  font-weight: 700;
  font-size: 28px;
  text-transform: uppercase;
  color: #fff;
  position: absolute;
  top: 24px;
  width: 100%;
  text-align: center;
  text-shadow: 0 2px 8px rgba(0,0,0,.35);
}

.vitamins__bottom_link {
  display: none;
  margin-top: 20px;
  font-family: var(--font-family);
  font-weight: 600;
  font-size: 15px;
  color: var(--brown);
  text-align: center;
}


/* =====================================================
   СЕТКА ТОВАРОВ
===================================================== */
.products-grid {
  display: grid;
  gap: 12px;
  flex: 1;
}

.products-grid.columns-4 { grid-template-columns: repeat(4, 1fr); }
.products-grid.columns-3 { grid-template-columns: repeat(3, 1fr); }
.products-grid.columns-2 { grid-template-columns: repeat(2, 1fr); }

/* Карточка товара */
.product-card {
  background: #fff;
  border-radius: 12px;
  overflow: hidden;
  position: relative;
  display: flex;
  flex-direction: column;
  border: 1px solid rgba(0,0,0,.06);
  transition: box-shadow 0.25s, transform 0.2s;
}

.product-card:hover {
  box-shadow: 0 6px 24px rgba(0,0,0,.1);
  transform: translateY(-2px);
}

.product-card__img-wrap {
  display: block;
  line-height: 0;
}

.product-card__img {
  width: 100%;
  aspect-ratio: 1;
  object-fit: contain;
  background: rgba(0,0,0,.025);
}

.product-card__body {
  padding: 10px;
  display: flex;
  flex-direction: column;
  flex: 1;
}

.product-card__price {
  margin-top: 6px;
  display: flex;
  gap: 8px;
  align-items: center;
}

.product-card__price .woocommerce-Price-amount {
  font-family: var(--font-family);
  font-weight: 700;
  font-size: 14px;
  color: var(--temnyy-tekst);
}

.product-card__price del .woocommerce-Price-amount {
  font-weight: 400;
  font-size: 12px;
  color: var(--seryy-tekst);
}

.product-card__title {
  font-family: var(--font-family);
  font-weight: 500;
  font-size: 12px;
  color: var(--temnyy-tekst);
  margin-top: 6px;
  line-height: 1.4;
  flex: 1;
}

.product-card__title a { color: inherit; }

.product-card__rating {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-top: 6px;
}

.product-card__rating .stars {
  display: flex;
  align-items: center;
  gap: 3px;
  font-size: 12px;
  font-weight: 600;
  color: var(--temnyy-tekst);
}

.product-card__rating .reviews {
  font-size: 11px;
  color: var(--dark-blue);
}

.product-card__badges {
  position: absolute;
  top: 8px;
  left: 8px;
  display: flex;
  flex-direction: column;
  gap: 4px;
  z-index: 2;
}

.badge {
  font-family: var(--font-family);
  font-weight: 700;
  font-size: 10px;
  padding: 2px 8px;
  border-radius: 4px;
  text-transform: uppercase;
  line-height: 1.6;
}

.badge--hit  { background: var(--red);    color: #fff; }
.badge--new  { background: var(--green);  color: var(--temnyy-tekst); }
.badge--sale { background: var(--orange); color: #fff; }

/* Кнопка в корзину */
.btn-cart {
  display: flex;
  justify-content: center;
  align-items: center;
  font-family: var(--font-family);
  font-weight: 600;
  font-size: 12px;
  color: var(--temnyy-tekst);
  background: var(--light-yellow);
  border-radius: 8px;
  padding: 0 10px;
  height: 32px;
  cursor: pointer;
  border: none;
  width: 100%;
  margin-top: 8px;
  text-align: center;
}

.btn-cart:hover {
  background: var(--bright-yellow);
  opacity: 1;
}


/* =====================================================
   ПРОМО БАННЕРЫ
===================================================== */
.promo_second { line-height: 0; }
.promo_second img { width: 100%; }
.promo_second-mobile { display: none; }


/* =====================================================
   ПРАЗДНИЧНЫЕ КАТЕГОРИИ
===================================================== */
.holiday {
  padding: 60px 0;
}

.main__holidays__block {
  display: flex;
  gap: 16px;
  justify-content: center;
}

.main__holidays_item {
  position: relative;
  flex: 1;
  border-radius: 15px;
  overflow: hidden;
  cursor: pointer;
}

.main__holidays_item img {
  width: 100%;
  display: block;
}

.main__holidays_title {
  font-family: var(--font-family);
  font-weight: 700;
  font-size: 20px;
  text-transform: uppercase;
  color: #fff;
  position: absolute;
  bottom: 50px;
  width: 100%;
  text-align: center;
  text-shadow: 0 2px 8px rgba(0,0,0,.35);
}

.main__holidays_btn {
  position: absolute;
  bottom: 12px;
  left: 50%;
  transform: translateX(-50%);
  font-family: var(--font-family);
  font-weight: 600;
  font-size: 14px;
  color: var(--temnyy-tekst);
  background: #fff;
  border-radius: 8px;
  padding: 6px 20px;
  white-space: nowrap;
}


/* =====================================================
   ОБЛАКО КАТЕГОРИЙ
===================================================== */
.category {
  padding: 40px 0;
  background: #f8f6f2;
}

.category__block {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.category__item {
  font-family: var(--font-family);
  font-weight: 500;
  font-size: 13px;
  color: var(--brown);
  border-radius: 20px;
  padding: 6px 16px;
  border: 1.5px solid var(--bright-yellow);
  background: transparent;
  transition: background 0.2s, color 0.2s;
}

.category__item:hover {
  background: var(--bright-yellow);
  color: var(--brown);
  opacity: 1;
}


/* =====================================================
   О КОМПАНИИ
===================================================== */
.original {
  padding: 80px 0;
}

.original__block {
  display: flex;
  gap: 48px;
  align-items: center;
}

.original__item { flex: 1; }

.original__item img { width: 100%; border-radius: 16px; }
.original__mobile { display: none; }

.original__title {
  font-family: var(--second-family);
  font-weight: 700;
  font-size: 28px;
  line-height: 1.3;
  color: var(--temnyy-tekst);
  margin-bottom: 20px;
}

.original__title span { color: var(--brown); }

.original__subtitle {
  font-family: var(--font-family);
  font-size: 14px;
  line-height: 1.7;
  color: var(--grey);
  margin-bottom: 16px;
}

.original__list { margin: 16px 0; }

.original__list_item {
  font-family: var(--font-family);
  font-size: 14px;
  color: var(--temnyy-tekst);
  padding: 6px 0 6px 20px;
  position: relative;
}

.original__list_item::before {
  content: "•";
  position: absolute;
  left: 4px;
  color: var(--brown);
  font-weight: 700;
}


/* =====================================================
   FOOTER
===================================================== */
.footer {
  background: var(--header-main-bg);
  padding: 60px 0 30px;
}

.footer__block {
  display: flex;
  gap: 32px;
  flex-wrap: wrap;
  justify-content: space-between;
  margin-bottom: 48px;
}

.footer__item { flex: 1; min-width: 160px; }

.footer__title {
  font-family: var(--font-family);
  font-weight: 700;
  font-size: 15px;
  color: var(--accent);
  margin-bottom: 16px;
}

.footer__list { display: flex; flex-direction: column; gap: 8px; }

.footer__list_item a {
  font-family: var(--font-family);
  font-size: 13px;
  color: rgba(255,255,255,0.7);
  line-height: 1.5;
}

.footer__list_item a:hover {
  color: #fff;
  opacity: 1;
}

a.footer__support {
  display: inline-block;
  font-family: var(--font-family);
  font-weight: 600;
  font-size: 13px;
  color: var(--brown);
  background: var(--accent);
  border-radius: 8px;
  padding: 8px 16px;
  margin-bottom: 16px;
}

.footer__text {
  font-family: var(--font-family);
  font-size: 12px;
  color: rgba(255,255,255,0.6);
  line-height: 1.7;
}

.footer__bottom {
  border-top: 1px solid rgba(255,255,255,0.1);
  padding-top: 20px;
  text-align: center;
}

.footer__copy {
  font-family: var(--font-family);
  font-size: 12px;
  color: rgba(255,255,255,0.4);
}


/* =====================================================
   АДАПТИВ
===================================================== */
@media (max-width: 1200px) {
  .search-field { width: 360px; }
}

@media (max-width: 1024px) {
  .middle__nav_links { gap: 12px; margin-left: 12px; }
  .search-field { width: 280px; }
  .products-grid.columns-4 { grid-template-columns: repeat(3, 1fr); }
}

@media (max-width: 900px) {
  .section__block { flex-direction: column; }
  .section__img-col { max-width: 100%; }
  .popular__block { flex-direction: column; align-items: center; }
  .popular__item.popular__item_second { max-width: 100%; }
  .original__block { flex-direction: column; }
  .products-grid.columns-4 { grid-template-columns: repeat(2, 1fr); }
  .main__holidays__block { flex-wrap: wrap; }
  .main__holidays_item { min-width: calc(50% - 8px); }
}

@media (max-width: 768px) {
  .upper__nav .upper_nav_middle { display: none; }
  .middle__nav_links { display: none; }
  .search-field { width: 220px; padding-left: 10px; }
  .search-scope-btn { display: none; }
  .bottom__nav { display: none; }

  .popular { padding: 40px 0; }
  .vitamins, .pink, .office, .gift { padding: 40px 0; }
  .holiday { padding: 30px 0; }
  .original { padding: 40px 0; }

  .header__promo-desktop { display: none; }
  .header__promo-mobile { display: block; }
  .promo_second-desktop { display: none; }
  .promo_second-mobile { display: block; }

  .footer__block { flex-direction: column; gap: 24px; }
}

@media (max-width: 480px) {
  .wrapper { padding: 0 12px; }
  .products-grid.columns-4,
  .products-grid.columns-3 { grid-template-columns: repeat(2, 1fr); }
  .popular__bottom { flex-direction: column; }
  .section-header { flex-direction: column; align-items: flex-start; gap: 8px; }
  .main__holidays__block { flex-direction: column; }
  .category__item { font-size: 12px; padding: 5px 12px; }
}


/* =====================================================
   WooCommerce: Дополнительные стили
===================================================== */
.woocommerce-content {
  padding: 40px 0;
}

.woocommerce ul.products {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
}

.woocommerce ul.products li.product {
  margin: 0;
  border-radius: 12px;
  overflow: hidden;
}

/* Страница одиночного товара */
.woocommerce div.product .product_title {
  font-family: var(--second-family);
  font-weight: 700;
  font-size: 26px;
  color: var(--temnyy-tekst);
  margin-bottom: 12px;
}

.woocommerce div.product p.price,
.woocommerce div.product span.price {
  font-family: var(--font-family);
  font-weight: 700;
  font-size: 24px;
  color: var(--temnyy-tekst);
}

.woocommerce div.product p.price del,
.woocommerce div.product span.price del {
  font-size: 18px;
  color: var(--seryy-tekst);
}

/* Уведомления */
.woocommerce-message,
.woocommerce-info {
  border-top-color: var(--accent);
  background: var(--light-yellow);
  font-family: var(--font-family);
}

.woocommerce-message::before,
.woocommerce-info::before {
  color: var(--brown);
}

.woocommerce-error {
  border-top-color: var(--red);
}

/* Хлебные крошки */
.woocommerce .woocommerce-breadcrumb {
  font-family: var(--font-family);
  font-size: 13px;
  color: var(--seryy-tekst);
  margin-bottom: 20px;
}

/* Корзина */
.woocommerce table.shop_table {
  font-family: var(--font-family);
  border-radius: 12px;
  overflow: hidden;
}

.woocommerce-cart .wc-proceed-to-checkout a.checkout-button {
  background: var(--brown);
  color: #fff;
  font-family: var(--font-family);
  font-weight: 700;
  font-size: 15px;
  border-radius: 9px;
  padding: 14px 32px;
}

/* Форма оформления заказа */
.woocommerce form .form-row label {
  font-family: var(--font-family);
  font-size: 13px;
  color: var(--temnyy-tekst);
}

.woocommerce form .form-row input.input-text,
.woocommerce form .form-row select {
  border-radius: 8px;
  border: 1.5px solid rgba(0,0,0,.15);
  font-family: var(--font-family);
  font-size: 14px;
  padding: 10px 12px;
  height: auto;
}

.woocommerce form .form-row input.input-text:focus,
.woocommerce form .form-row select:focus {
  border-color: var(--bright-yellow);
  box-shadow: 0 0 0 3px rgba(240, 197, 104, 0.2);
}

#place_order {
  background: var(--brown) !important;
  color: #fff !important;
  font-size: 16px !important;
  font-weight: 700 !important;
  border-radius: 9px !important;
  padding: 14px 32px !important;
  width: 100% !important;
}

/* =====================================================
   TOAST: "Добавлено в корзину"
===================================================== */
.fgramota-notice {
  position: fixed;
  bottom: 24px;
  right: 24px;
  background: var(--header-main-bg);
  color: #fff;
  font-family: var(--font-family);
  font-size: 14px;
  padding: 14px 20px;
  border-radius: 10px;
  box-shadow: 0 8px 24px rgba(0,0,0,.25);
  z-index: 9999;
  opacity: 0;
  transform: translateY(12px);
  transition: opacity 0.3s, transform 0.3s;
  max-width: 300px;
}

.fgramota-notice--visible {
  opacity: 1;
  transform: translateY(0);
}

.fgramota-notice a {
  color: var(--accent);
  font-weight: 600;
  margin-left: 6px;
}

/* =====================================================
   STICKY HEADER
===================================================== */
.global__nav--sticky {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  box-shadow: 0 4px 16px rgba(0,0,0,.25);
}

/* =====================================================
   ВИДЖЕТ ПОИСКА СТАНДАРТНЫЙ
===================================================== */
.widget_search .search-form {
  flex-direction: column;
  gap: 8px;
}

.widget_search .search-field {
  width: 100%;
  position: static;
  padding: 8px 12px;
  border-radius: 8px;
  border: 1.5px solid rgba(0,0,0,.15);
}

.widget_search .search-submit {
  position: static;
  width: 100%;
  border-radius: 8px;
  background: var(--accent);
}
