h1,
h2,
h3,
h4,
h5,
h6,
p,
a {
    font-family: 'Manrope', sans-serif;
}

button:hover {
  cursor: pointer;
}

.mobile-menu {
    position: fixed;
    top: 5rem; /* высота хэдера: py-4 + лого h-12 = 80px */
    left: 0;
    right: 0;
    z-index: 49;
    max-height: calc(100vh - 5rem);
    overflow-y: auto;
    background-color: #010717;
    color: #ffffff; /* ссылки наследуют белый, иначе чёрный текст теряется на тёмной панели */
    border-bottom: 1px solid #e5e5e5;
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.35);
    padding: 2rem 1rem;
}

.dropdown-enter-active,
.dropdown-leave-active {
    transition: opacity 0.1s ease-out, transform 0.1s ease-out;
}
.dropdown-enter-from,
.dropdown-leave-to {
    opacity: 0;
    transform: scale(0.9);
}

.mobile-menu ul {
    width: 100%;
    text-align: center;
}

.mobile-menu li {
    border-bottom: 1px solid #e0e0e0;
    padding-bottom: 1rem;
    padding-top: 1rem;
}

/* подпункты мобильного меню — отдельная слегка подсвеченная панель */
.mobile-dropdown-menu {
    background-color: rgba(255, 255, 255, 0.07);
    border-radius: 0.75rem;
    margin-top: 0.75rem;
    padding: 0.25rem 0.5rem;
}

.mobile-dropdown-menu li {
    border-bottom: none;
    border-top: 1px solid rgba(255, 255, 255, 0.12);
}

.mobile-dropdown-menu li:first-child {
    border-top: none;
}

.mobile-dropdown-menu li:last-child {
    padding-bottom: 0;
}

.mobile-dropdown-menu{
   margin-top: 12px;
}

/* .group:hover h3,
.group:hover p {
    color: #ffffff;
} */

@keyframes scaleUp {
    0% {
        transform: scale(1);
    }

    100% {
        transform: scale(1.2);
    }
}

.group-hover\:scale-120:hover {
    animation: scaleUp 0.3s forwards;
}

@keyframes slideDown {
    0% {
        transform: translateY(-20px);
        opacity: 0;
    }

    100% {
        transform: translateY(0);
        opacity: 1;
    }
}

.search-slide-down {
    animation: slideDown 0.3s forwards;
}

/* home page */
.main-slider {
    position: relative;
    width: 100%;
    overflow: hidden;
}

.main-slider .swiper-slide {
    position: relative;
    text-align: center;
}

.main-slider .swiper-slide img {
    width: 100%;
    height: auto;
    max-height: 800px;
    object-fit: cover;
}

@media(min-width:1400px){
    .main-slider .swiper-slide img {
        max-height: inherit;
    }
}

.main-slider .swiper-slide-content {
    position: absolute;
    bottom: 20%;
}

@media (max-width:640px) {
    .main-slider .swiper-slide-content{
        bottom: inherit;
        padding: 10px;
    }
}

.main-slider  .swiper-slide {
    padding: 0;
}

@media(min-width: 1400px) {
    .main-slider .swiper-slide-content {
        position: absolute;
        bottom: 20%;
        left: 10%;
        text-align: left;
    }
}

#product-slider .swiper-button-prev, #product-slider .swiper-button-next{
    color: #fff;
}

.brands-swiper-slider .swiper-button-prev, .brands-swiper-slider .swiper-button-next{
    color: #ff0042;
}

.brands-swiper-slider .swiper-button-next{
    right: 0;
}

.brands-swiper-slider .swiper-button-prev{
    left: 0;
}

.swiper {
    width: 100%;
    height: 100%;
}

.swiper-slide {
    text-align: center;
    font-size: 16px;
    background: #fff;
    display: flex;
    justify-content: center;
    align-items: center;
}

.swiper-slide img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

@media (min-width: 1024px) {
    .swiper-slide {
        padding: 25px;
    }
}

@media (max-width: 1023px) {

    .swiper-button-prev,
    .swiper-button-next {
        display: none;
    }
}

img.cursor-pointer:hover {
    opacity: 0.8;
}

/* single product tabs */
.tab {
    padding: 0.5rem 1rem;
    color: #010717; 
    border-bottom-width: 2px;
    border-color: transparent;
    font-size: 1rem;
    font-weight: 500; 
    cursor: pointer;
    transition: all 0.3s ease;
}
.tab:hover {
    color: #323232; 
    border-color: #ff0042; 
}
.tab.active {
    color: #ff0042;
    border-color: #ff0042;
}

/* на узких экранах вкладки товара — вертикальным списком,
   иначе пункты вылезают за край страницы */
@media (max-width: 639px) {
    [role="tablist"] {
        flex-direction: column;
        align-items: stretch;
        gap: 0.25rem;
    }

    /* space-x-4 внутри колонки сдвигал бы пункты вправо */
    [role="tablist"] > * + * {
        margin-left: 0;
    }

    [role="tablist"] .tab {
        width: 100%;
        text-align: left;
    }
}
.tab-content {
    display: none;
}
.tab-content:not(.hidden) {
    display: block;
}


.custom-checkbox {
    appearance: none;
    background-color: #fff;
    border: 1px solid #d1d5db;
    padding: 0.5rem;
    display: inline-block;
    position: relative;
    cursor: pointer;
    outline: none;
    width: 1.25rem;
    height: 1.25rem;
    border-radius: 0.25rem;
}

.custom-checkbox:checked {
    background-color: #ff0042;
    border-color: #ff0042;
}

/* product cards: whole card is a link, title keeps a fixed height */
.product-card {
    display: block;
    transition: box-shadow 0.3s ease, transform 0.3s ease;
}

.product-card:hover {
    box-shadow: 0 16px 28px -10px rgba(0, 0, 0, 0.2);
    transform: translateY(-3px);
}

.product-card .product-title {
    display: block;
    min-height: 3.5rem; /* reserves two lines so all cards in a row stay level */
    line-height: 1.75rem;
    overflow: hidden;
}


/* product gallery: frame thumbnails and the main photo so light product shots
   stay visible against the page background */
#main-image {
    border: 1px solid #E5E5E5;
    border-radius: 0.5rem;
}

img[onclick="changeImage(this)"] {
    border: 1px solid #E5E5E5;
    border-radius: 0.5rem;
    padding: 2px;
    background: #fff;
    transition: border-color 0.2s ease;
}

img[onclick="changeImage(this)"]:hover {
    border-color: #ff0042;
}

/* нижние юридические ссылки в футере: мельче, растянуты по ширине, с отступами */
.footer-legal {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    width: 100%;
    row-gap: 0.5rem; /* только вертикальный отступ для переносов на мобильных */
    font-size: 0.8rem;
}

/* уведомление «добавлено в корзину» */
#cart-toast {
    position: fixed;
    bottom: 1.5rem;
    right: 1.5rem;
    z-index: 100;
    background: #010717;
    color: #fff;
    padding: 0.75rem 1.25rem;
    border-radius: 9999px;
    box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.4);
    opacity: 0;
    transform: translateY(10px);
    pointer-events: none;
    transition: opacity 0.25s ease, transform 0.25s ease;
    max-width: 90vw;
}

#cart-toast.visible {
    opacity: 1;
    transform: translateY(0);
}

/* методы оплаты на странице оформления */
.payment-option {
    display: block;
    border: 2px solid #e5e5e5;
    border-radius: 0.75rem;
    padding: 1rem;
    cursor: pointer;
    transition: border-color 0.2s ease, background-color 0.2s ease;
}

.payment-option:hover {
    border-color: #ff0042;
}

input[name="payment-method"]:checked + .payment-option {
    border-color: #ff0042;
    background-color: #fff5f7;
}

/* оверлей «идёт оплата» */
#payment-overlay {
    position: fixed;
    inset: 0;
    z-index: 100;
    background: rgba(1, 7, 23, 0.7);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1rem;
}

#payment-overlay.hidden {
    display: none;
}

.payment-spinner {
    width: 3rem;
    height: 3rem;
    border: 4px solid rgba(255, 255, 255, 0.3);
    border-top-color: #fff;
    border-radius: 50%;
    animation: payment-spin 0.8s linear infinite;
    margin: 0 auto 1rem;
}

@keyframes payment-spin {
    to {
        transform: rotate(360deg);
    }
}

/* бейдж количества товаров — кружок в правом верхнем углу иконки корзины */
#cart-count-badge {
    position: absolute;
    top: -8px;
    right: -8px;
    width: 1.25rem;
    height: 1.25rem;
    border-radius: 50%;
    background: #ff0042;
    color: #fff;
    font-size: 0.7rem;
    font-weight: 700;
    line-height: 1.25rem;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 0 0 2px #1f2937; /* отделяет кружок от иконки */
}

/* модалка выбора размера */
#size-modal {
    position: fixed;
    inset: 0;
    z-index: 100;
    background: rgba(1, 7, 23, 0.7);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1rem;
}

#size-modal.hidden {
    display: none;
}

.size-modal-dialog {
    position: relative;
    background: #fff;
    border-radius: 0.75rem;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
    padding: 1.5rem;
    width: 100%;
    max-width: 26rem;
    max-height: 90vh;
    overflow-y: auto;
}

.size-modal-close {
    position: absolute;
    top: 0.5rem;
    right: 0.5rem;
    font-size: 1.5rem;
    line-height: 1;
    color: #6b7280;
    background: none;
    border: none;
    padding: 0.25rem 0.5rem;
}

.size-modal-close:hover {
    color: #010717;
}

.size-btn {
    min-width: 3rem;
    padding: 0.5rem 0.75rem;
    border: 1px solid #d1d5db;
    border-radius: 9999px;
    background: #fff;
    font-weight: 600;
    transition: border-color 0.2s ease, background-color 0.2s ease;
}

.size-btn:hover {
    border-color: #ff0042;
}

.size-btn.selected {
    border-color: #ff0042;
    background: #fff5f7;
    color: #ff0042;
}

/* недоступный размер в модалке */
.size-btn.size-btn-unavailable {
    border-color: #e5e5e5;
    color: #c0c0c0;
    text-decoration: line-through;
    cursor: not-allowed;
    background: #fafafa;
}

.size-btn.size-btn-unavailable:hover {
    border-color: #e5e5e5;
}

/* недоступная строка в таблице размеров */
.size-row-unavailable td {
    color: #c0c0c0;
}

.size-row-unavailable td:first-child {
    text-decoration: line-through;
}

/* сообщения промокода в корзине */
.promo-message {
    display: block;
    font-size: 0.85rem;
    margin-top: 0.5rem;
    min-height: 1.2rem;
}

.promo-message:empty {
    display: none;
}

.promo-success {
    color: #16a34a;
}

.promo-error {
    color: #dc2626;
}

/* блок «спасибо за подписку» с промокодом */
.subscribe-success .promo-code {
    display: inline-block;
    background: #fff;
    border: 2px dashed #16a34a;
    border-radius: 0.5rem;
    padding: 0.5rem 1.5rem;
}

/* степпер количества вместо кнопки «в корзину» */
.cart-stepper {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.25rem;
    border: 1px solid #ff0042;
    border-radius: 9999px;
    padding: 0.25rem 0.5rem;
    width: 100%;
}

.cart-stepper.hidden {
    display: none;
}

.cart-stepper-btn {
    width: 1.75rem;
    height: 1.75rem;
    border-radius: 50%;
    color: #ff0042;
    font-weight: 700;
    font-size: 1.1rem;
    line-height: 1;
    background: none;
    border: none;
    display: flex;
    align-items: center;
    justify-content: center;
}

.cart-stepper-btn:hover {
    background: #fff5f7;
}

.cart-stepper-qty {
    min-width: 1.5rem;
    text-align: center;
    font-weight: 700;
}

/* результаты живого поиска в хедере */
#search-field {
    width: min(760px, 90vw);
    max-width: none;
}

.search-results {
    background: #fff;
    border-radius: 0.5rem;
    box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.3);
    padding: 0.25rem;
    margin-top: 0.5rem;
}

.search-results.hidden {
    display: none;
}

.search-results a {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.5rem;
    border-radius: 0.375rem;
}

.search-results a:hover {
    background: #f3f4f6;
}

/* уведомление «отзыв опубликован» */
.review-toast {
    position: fixed;
    bottom: 1.5rem;
    left: 50%;
    transform: translateX(-50%);
    z-index: 100;
    background: #010717;
    color: #fff;
    padding: 0.75rem 1.25rem;
    border-radius: 9999px;
    box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.4);
}

/* старые страницы товаров мгновенно уводят на новые адреса */
.redirect-page {
    display: none;
}

/* кнопки «Очистить» и «В магазин» — одной строкой и одной высоты
   с полем промокода в том же ряду */
.cart-action-btn {
    white-space: nowrap;
    height: 42px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

/* поле промокода сжимается под узкий экран карточки:
   у <input> по умолчанию большой min-width, из-за которого
   вместе с кнопкой «Применить» оно вылезало за блок и создавало лишний скролл */
#promo-form {
    max-width: 100%;
}

#promo-input {
    width: auto;
    min-width: 0;
    flex: 1 1 6rem; /* растягивается, но готово сжаться до ~96px */
}

#promo-form button[type="submit"] {
    flex: 0 0 auto; /* кнопка не сжимается и не переносится */
}

/* второй слайд главного слайдера (мужская коллекция) — лёгкое затемнение */
.slide-men-darken img {
    filter: brightness(0.8);
}

/* слайды брендов кликабельны — ведут в магазин с фильтром по бренду */
.brands-slide {
    cursor: pointer;
    transition: background-color 0.2s ease;
}

.brands-slide:hover {
    background-color: #ececec;
}



/* «Разработано kwakio»: при наведении краснеет и текст, и логотип;
   сам логотип — две одноцветные картинки друг на друге */
.kwakio-link {
    transition: color 0.25s ease;
}

.kwakio-link:hover,
.kwakio-link:focus-visible {
    color: #ff0042;
}

.kwakio-logo {
    position: relative;
    display: inline-block;
    margin-left: 0.4rem;
    width: 72px;  /* оригинал 144×36, уменьшен в 2 раза */
    height: 18px;
}

.kwakio-logo img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    transition: opacity 0.25s ease;
}

.kwakio-logo img.kwakio-red {
    opacity: 0;
}

.kwakio-link:hover .kwakio-logo img.kwakio-red,
.kwakio-link:focus-visible .kwakio-logo img.kwakio-red {
    opacity: 1;
}

.kwakio-link:hover .kwakio-logo img.kwakio-text,
.kwakio-link:focus-visible .kwakio-logo img.kwakio-text {
    opacity: 0;
}

/* выпадающая мини-корзина в хэдере: было w-80 (320px), +50px */
.cart-dropdown {
    width: 370px;
}

/* кнопка «наверх»: появляется после прокрутки, только на мобильных и планшетах */
#scroll-to-top {
    position: fixed;
    right: 1rem;
    bottom: 1.25rem;
    z-index: 40;
    width: 2.75rem;
    height: 2.75rem;
    border: none;
    border-radius: 9999px;
    background-color: #ff0042;
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-shadow: 0 6px 16px rgba(1, 7, 23, 0.25);
    opacity: 0;
    transform: translateY(8px);
    transition: opacity 0.25s ease, transform 0.25s ease, background-color 0.2s ease;
    pointer-events: none;
}

#scroll-to-top.visible {
    opacity: 1;
    transform: translateY(0);
    pointer-events: auto;
}

#scroll-to-top:hover {
    background-color: #d60039;
}

@media (min-width: 1024px) {
    #scroll-to-top {
        display: none; /* на десктопе не нужна */
    }
}
