/* ============================================================
   BeeBeauty — ЄДИНИЙ файл анімацій
   Всі transition / transform / animation тільки тут
   ============================================================ */

/* ----------------------------------------------------------
   1. КАРТКИ ТОВАРІВ (.bee-product-card)
   ---------------------------------------------------------- */
.bee-product-card {
  transition: transform 0.28s ease, box-shadow 0.28s ease, border-color 0.28s ease;
}

.bee-product-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 14px 40px rgba(43, 33, 28, 0.13);
  border-color: #CDB79E;
}

/* Zoom фото */
.bee-product-card__img {
  transition: transform 0.42s ease;
}

.bee-product-card:hover .bee-product-card__img {
  transform: scale(1.07);
}

/* Кнопка "До кошика" */
.bee-product-card__btn {
  transition: background 0.22s ease, color 0.22s ease;
}

/* ----------------------------------------------------------
   2. СТАНДАРТНІ WC КАРТКИ (каталог, схожі товари)
   ---------------------------------------------------------- */

/* Контейнер для фото — обрізаємо zoom */
ul.products li.product a:first-child {
  display: block;
  overflow: hidden;
  line-height: 0;
}

ul.products li.product {
  transition: box-shadow 0.28s ease;
}

ul.products li.product:hover {
  box-shadow: 0 14px 40px rgba(43, 33, 28, 0.13);
}

/* Zoom тільки на фото, картка не рухається */
ul.products li.product img {
  transition: transform 0.42s ease;
  display: block;
  width: 100%;
}

ul.products li.product:hover img {
  transform: scale(1.07);
}

/* ----------------------------------------------------------
   3. КАРТКИ ВАРІАЦІЙ (.bee-var-card)
   ---------------------------------------------------------- */
.bee-var-card {
  transition: transform 0.25s ease, box-shadow 0.25s ease, border-color 0.25s ease;
}

.bee-var-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 28px rgba(43, 33, 28, 0.10);
  border-color: #CDB79E;
}

/* ----------------------------------------------------------
   4. КНОПКИ (загальне)
   ---------------------------------------------------------- */
.bee-b2b__btn {
  transition: background 0.25s ease, border-color 0.25s ease;
}

.bee-slider__arrow {
  transition: background 0.2s ease;
}

.bee-slider__dot {
  transition: background 0.2s ease, transform 0.2s ease;
}

/* Мікро-анімація кліку */
.bee-clicked {
  transform: scale(0.93) !important;
  transition: transform 0.1s ease !important;
}

/* ----------------------------------------------------------
   5. СЕКЦІЇ — scroll-reveal (JS додає .bee-reveal і .bee-visible)
   ---------------------------------------------------------- */
.bee-reveal {
  opacity: 0;
  transform: translateY(32px);
  transition: opacity 0.65s ease, transform 0.65s ease;
}

.bee-reveal.bee-visible {
  opacity: 1;
  transform: translateY(0);
}

/* Картки — каскадна поява */
.bee-reveal-card {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.5s ease, transform 0.5s ease;
}

.bee-reveal-card.bee-visible {
  opacity: 1;
  transform: translateY(0);
}

@keyframes bee-fadein {
  from { opacity: 0; transform: translateY(18px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* ----------------------------------------------------------
   6. ГАЛЕРЕЯ ТОВАРУ — zoom при hover
   ---------------------------------------------------------- */
.woocommerce-product-gallery__wrapper {
  overflow: hidden;
  border-radius: 6px;
}

.woocommerce-product-gallery__image {
  overflow: hidden;
}

.woocommerce-product-gallery__image img {
  transition: transform 0.5s ease !important;
  display: block;
  width: 100%;
}

.woocommerce-product-gallery__image:hover img {
  transform: scale(1.08) !important;
  cursor: zoom-in;
}

/* ----------------------------------------------------------
   8. ХЕДЕР
   ---------------------------------------------------------- */
.bee-header__bar {
  transition: box-shadow 0.3s ease, background 0.3s ease;
}

.bee-nav > ul > li > a,
.bee-account-btn,
.bee-icon-btn,
.bee-phone {
  transition: color 0.2s ease, opacity 0.2s ease;
}

/* ----------------------------------------------------------
   7. ФУТЕР
   ---------------------------------------------------------- */
.bee-footer__menu li a,
.bee-footer__contacts a,
.bee-footer__msg,
.bee-footer__dev a {
  transition: color 0.2s ease, opacity 0.2s ease;
}

/* ----------------------------------------------------------
   8. ПОСИЛАННЯ
   ---------------------------------------------------------- */
a { transition: color 0.2s ease; }

/* ----------------------------------------------------------
   ХОВАЄМО стандартний бейдж "Розпродаж!"
   ---------------------------------------------------------- */
.woocommerce-badge,
.onsale {
  display: none !important;
}

/* Ховаємо бейдж «Зберегти» в блоковому кошику */
.wc-block-components-sale-badge,
.wc-block-components-product-badge {
  display: none !important;
}

/* Ховаємо метадані товару в кошику */
.wc-block-components-product-metadata__description {
  display: none !important;
}

/* Ціна внизу колонки на мобайлі */
@media (max-width: 768px) {
  .wc-block-cart-item__total {
    display: flex !important;
    flex-direction: column !important;
    justify-content: flex-end !important;
    height: 100% !important;
  }

  .wc-block-cart-item__total-price-and-sale-badge-wrapper {
    margin-top: auto !important;
  }
}


/* Порядок рядків у підсумку замовлення на мобайлі
   Проміжний підсумок → Загалом → Доставка
---------------------------------------------------------- */
@media (max-width: 768px) {
  .woocommerce-checkout-review-order-table tfoot {
    display: flex !important;
    flex-direction: column !important;
  }

  .woocommerce-checkout-review-order-table tfoot tr {
    display: flex !important;
    justify-content: space-between !important;
    padding: 6px 0 !important;
  }

  .woocommerce-checkout-review-order-table tfoot tr.cart-subtotal {
    display: none !important;
  }

  .woocommerce-checkout-review-order-table tfoot tr.order-total {
    order: 2 !important;
  }

  .woocommerce-checkout-review-order-table tfoot tr.woocommerce-shipping-totals {
    order: 3 !important;
  }
}

/* Ціна — по правому краю на checkout (тільки мобайл) */
@media (max-width: 768px) {
    .woocommerce-checkout .woocommerce-Price-amount.amount {
        float: right;
    }

    .woocommerce-checkout-review-order-table tr.order-total td {
        text-align: right;
    }
}

/* Ховаємо оригінальний рядок доставки в таблиці (він дублюється через JS-блок) */
.woocommerce-checkout-review-order-table tr.woocommerce-shipping-totals {
    display: none !important;
}

/* ----------------------------------------------------------
   CHECKOUT — Блок вибору перевізника (винесений перед полями адреси)
   ---------------------------------------------------------- */
.bee-shipping-method-box {
    background: #FDFBF9;
    border: 1px solid #F0EAE4;
    border-radius: 8px;
    padding: 16px 20px;
    margin-bottom: 20px;
}

.bee-shipping-method-box .woocommerce-shipping-methods {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    gap: 20px;
    flex-wrap: wrap;
}

.bee-shipping-method-box .woocommerce-shipping-methods li {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
    color: #2B211C;
}

.bee-shipping-method-box label {
    cursor: pointer;
    font-weight: 500;
}

/* ----------------------------------------------------------
   CHECKOUT — Двоколонковий макет → одноколонковий
   col-1 (платіжні дані) зверху, col-2 (доставка на іншу адресу) знизу
   ---------------------------------------------------------- */
.woocommerce-checkout .col2-set {
    display: block !important;
    float: none !important;
    width: 100% !important;
}

.woocommerce-checkout .col2-set .col-1,
.woocommerce-checkout .col2-set .col-2 {
    float: none !important;
    width: 100% !important;
    margin-right: 0 !important;
}

/* «Доставити на іншу адресу?» — відступ від полів вище */
.woocommerce-checkout .col2-set .col-2 {
    margin-top: 24px;
}

/* ----------------------------------------------------------
   FOCUS — замінюємо фіолетовий Storefront на наш стиль
   ---------------------------------------------------------- */
a:focus,
button:focus,
input:focus,
textarea:focus,
select:focus,
.bee-product-card:focus {
  outline: 2px solid #CDB79E !important;
  outline-offset: 2px;
}

/* Картки — без outline при кліці мишкою (тільки клавіатура) */
a:focus:not(:focus-visible),
button:focus:not(:focus-visible),
.bee-product-card:focus:not(:focus-visible) {
  outline: none !important;
}

/* ----------------------------------------------------------
   ВИМКНУТИ якщо користувач проти анімацій
   ---------------------------------------------------------- */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}
