.admin-bar .header {
    top: 32px;
}

@media screen and (max-width: 782px) {
    .admin-bar .header {
        top: 46px;
    }
}

/* Toast notifications (reusable) */
.toast-container {
    position: fixed;
    bottom: 24px;
    right: 24px;
    z-index: 99999;
    display: flex;
    flex-direction: column-reverse;
    gap: 10px;
    pointer-events: none;
}
.toast {
    display: flex;
    align-items: center;
    gap: 12px;
    background: #fff;
    color: #282321;
    padding: 14px 20px;
    border-radius: 8px;
    box-shadow: 0 8px 32px rgba(0,0,0,0.12);
    font-size: 14px;
    line-height: 1.4;
    max-width: 380px;
    pointer-events: auto;
    transform: translateX(120%);
    opacity: 0;
    transition: transform 0.35s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.35s ease;
}
.toast.is-visible {
    transform: translateX(0);
    opacity: 1;
}
.toast.is-hiding {
    transform: translateX(120%);
    opacity: 0;
}
.toast__icon {
    flex-shrink: 0;
    width: 20px;
    height: 20px;
}
.toast__icon svg {
    width: 20px;
    height: 20px;
}
.toast__text {
    flex: 1;
}
.toast__close {
    flex-shrink: 0;
    width: 20px;
    height: 20px;
    cursor: pointer;
    opacity: 0.5;
    transition: opacity 0.2s;
    background: none;
    border: none;
    padding: 0;
    color: inherit;
}
.toast__close:hover {
    opacity: 1;
}
.toast--success .toast__icon { color: #2b4747; }
.toast--info .toast__icon { color: #282321; }

@media (max-width: 480px) {
    .toast-container {
        right: 12px;
        left: 12px;
        bottom: 16px;
    }
    .toast {
        max-width: 100%;
    }
}

/* Header basket badge */
.header__navigation-button_basket {
    position: relative;
}
.header__basket-count {
    position: absolute;
    top: 0px;
    right: 0px;
    background: #282321;
    color: #fff;
    font-size: 10px;
    min-width: 15px;
    height: 15px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    line-height: 1;
    padding: 0 3px;
}

/* Header favorites badge */
.header__favorites-btn {
    position: relative;
}

.header__favorites-count {
    position: absolute;
    top: 0px;
    right: 0px;
    background: #282321;
    color: #fff;
    font-size: 10px;
    min-width: 15px;
    height: 15px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    line-height: 1;
    padding: 0 3px;
}

/* Heart tooltip */
.catalog-items__like[data-tooltip]:hover::after,
.product__like[data-tooltip]:hover::after {
    content: attr(data-tooltip);
    position: absolute;
    bottom: 100%;
    left: 50%;
    transform: translateX(-50%);
    margin-bottom: 4px;
    background: #282321;
    color: #fff;
    padding: 2px 8px;
    border-radius: 3px;
    font-size: 11px;
    white-space: nowrap;
    pointer-events: none;
    z-index: 10;
}

/* Card wrapper — needed for absolute heart positioning */
.catalog-items__slide {
    position: relative;
}

/* Catalog empty state */
.catalog-without {
    display: none;
}
.catalog.catalog-items.is-empty {
    display: none;
}
.catalog-without.is-visible {
    display: block;
}

/* ===== Checkout ===== */
.checkout {
    padding: 0 0 120px;
}
.checkout__container {
    display: grid;
    grid-template-columns: 1fr 440px;
    gap: 80px;
    align-items: start;
}
.checkout__title {
    font-size: 28px;
    font-weight: 300;
    margin-bottom: 32px;
}
.checkout__form {
    display: flex;
    flex-direction: column;
    gap: 24px;
}
.checkout__row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 24px;
}
.checkout__field {
    display: flex;
    flex-direction: column;
    gap: 8px;
}
.checkout__label {
    font-size: 14px;
    color: #75706d;
}
.checkout__label--required::after {
    content: " *";
    color: #c73b3b;
}
.checkout__input,
.checkout__select {
    width: 100%;
    padding: 14px 16px;
    border: 1px solid #e0e0e0;
    font-size: 16px;
    background: #fff;
    color: #282321;
    transition: border-color .3s ease-in-out;
}
.checkout__input:focus,
.checkout__select:focus {
    border-color: #2b4747;
}
.checkout__select {
    appearance: none;
    -webkit-appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' fill='none'%3E%3Cpath stroke='%23282321' stroke-linecap='square' d='M3.333 6 8 10.667 12.667 6'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 16px center;
    padding-right: 48px;
}
.checkout__textarea {
    width: 100%;
    min-height: 120px;
    padding: 14px 16px;
    border: 1px solid #e0e0e0;
    font-size: 16px;
    background: #fff;
    color: #282321;
    resize: vertical;
    transition: border-color .3s ease-in-out;
}
.checkout__textarea:focus {
    border-color: #2b4747;
}
.checkout__sidebar {
    position: sticky;
    top: 140px;
    background: #fff;
}
.checkout__sidebar-title {
    font-size: 22px;
    font-weight: 300;
    margin-bottom: 24px;
}
.checkout__items {
    display: flex;
    flex-direction: column;
}
.checkout__item {
    display: flex;
    flex-direction: row;
    gap: 16px;
    padding: 16px 0;
}
.checkout__item:first-child {
    padding-top: 0;
}
.checkout__item + .checkout__item {
    border-top: 1px solid #f5f5f5;
}
.checkout__item-image {
    width: 80px;
    height: 96px;
    flex-shrink: 0;
    background: #f5f5f5;
    overflow: hidden;
}
.checkout__item-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}
.checkout__item-info {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 6px;
    min-width: 0;
}
.checkout__item-title {
    font-size: 14px;
    font-weight: 400;
    color: #282321;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}
.checkout__item-meta {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 13px;
    color: #75706d;
}
.checkout__item-color {
    display: flex;
    align-items: center;
    gap: 6px;
}
.checkout__item-color span:first-child {
    display: block;
    width: 14px;
    height: 14px;
    border-radius: 50%;
    border: 1px solid #e0e0e0;
    flex-shrink: 0;
}
.checkout__item-price {
    font-size: 15px;
    font-weight: 500;
    margin-top: auto;
}
.checkout__divider {
    border: none;
    border-top: 1px solid #e0e0e0;
    margin: 20px 0;
}
.checkout__totals {
    display: flex;
    flex-direction: column;
    gap: 12px;
}
.checkout__total-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 15px;
}
.checkout__total-row--main {
    font-size: 18px;
    font-weight: 600;
}
.checkout__payments {
    margin-top: 24px;
    display: flex;
    flex-direction: column;
    gap: 12px;
}
.checkout__payments-title {
    font-size: 15px;
    font-weight: 500;
    margin-bottom: 4px;
}
.checkout__payment {
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 12px;
    padding: 14px 16px;
    border: 1px solid #e0e0e0;
    cursor: pointer;
    transition: border-color .3s ease-in-out;
    font-size: 14px;
}
.checkout__payment:hover {
    border-color: #2b4747;
}
.checkout__payment--active {
    border-color: #2b4747;
    background: rgba(43,71,71,.04);
}
.checkout__payment-radio {
    width: 18px;
    height: 18px;
    border-radius: 50%;
    border: 1px solid #bdbdbd;
    flex-shrink: 0;
    position: relative;
}
.checkout__payment--active .checkout__payment-radio {
    border-color: #2b4747;
}
.checkout__payment--active .checkout__payment-radio::after {
    content: "";
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: #2b4747;
}
.checkout__payment-icon {
    flex-shrink: 0;
    width: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
}
.checkout__payment-icon svg,
.checkout__payment-icon img {
    width: 32px;
    height: auto;
}
.checkout__payment-note {
    font-size: 13px;
    color: #75706d;
    line-height: 1.4;
}
.checkout__submit {
    display: flex;
    justify-content: center;
    align-items: center;
    width: 100%;
    padding: 16px 32px;
    background: #2b4747;
    color: #fff;
    font-size: 16px;
    margin-top: 24px;
    transition: opacity .3s ease-in-out;
    cursor: pointer;
}
.checkout__submit:hover {
    opacity: .85;
}
.checkout__agree {
    font-size: 12px;
    color: #75706d;
    margin-top: 16px;
    line-height: 1.5;
}
.checkout__agree a {
    text-decoration: underline;
    color: #282321;
}
.checkout__empty {
    font-size: 16px;
    color: #75706d;
    padding: 24px 0;
}
.checkout__empty a {
    text-decoration: underline;
    color: #282321;
}

/* Checkout address block spacing */
#checkout-address-block {
    display: flex;
    flex-direction: column;
    gap: 24px;
}
#checkout-address-block .checkout__row {
    gap: 24px;
}

/* Checkout success modal */
.checkout-success-overlay {
    position: fixed;
    inset: 0;
    z-index: 10000;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}
.checkout-success-overlay.active {
    opacity: 1;
    visibility: visible;
}
.checkout-success-modal {
    background: #fff;
    border-radius: 16px;
    padding: 48px 40px 40px;
    max-width: 480px;
    width: calc(100% - 48px);
    text-align: center;
    position: relative;
    transform: translateY(20px);
    transition: transform 0.3s ease;
}
.checkout-success-overlay.active .checkout-success-modal {
    transform: translateY(0);
}
.checkout-success-close {
    position: absolute;
    top: 16px;
    right: 16px;
    width: 24px;
    height: 24px;
    cursor: pointer;
    opacity: 0.5;
    transition: opacity 0.2s;
}
.checkout-success-close:hover {
    opacity: 1;
}
.checkout-success-icon {
    margin-bottom: 24px;
}
.checkout-success-message {
    font-size: 20px;
    font-weight: 500;
    color: #282321;
    margin-bottom: 8px;
}
.checkout-success-sub {
    font-size: 15px;
    color: #75706d;
    margin-bottom: 32px;
}
.checkout-success-btn {
    display: inline-flex;
    padding: 14px 40px;
    background: #2b4747;
    color: #fff;
    font-size: 15px;
    font-weight: 500;
    border: none;
    cursor: pointer;
    transition: opacity 0.2s;
}
.checkout-success-btn:hover {
    opacity: 0.85;
}

@media (max-width: 960px) {
    .checkout__container {
        grid-template-columns: 1fr;
        gap: 48px;
    }
    .checkout__sidebar {
        position: static;
    }
    .checkout__row {
        grid-template-columns: 1fr;
        gap: 24px;
    }
}
.catalog-items__gallery {   
    aspect-ratio: 400 / 550;
}
.catalog__selected {
    margin-bottom: 20px;
}

/* 404 page */
.catalog-notfound {
    padding: 80px 0 clamp(80px, 40px + 8vw, 160px);
}
.catalog-notfound__content {
    max-width: 520px;
}
.catalog-notfound__text {
    font-size: clamp(16px, 15px + 0.2vw, 18px);
    color: #75706d;
    line-height: 1.6;
    margin-bottom: 32px;
}
.catalog-notfound__links {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    max-width: 440px;
    gap: 16px;
}
.catalog-notfound__link {
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 16px 32px;
    font-size: 15px;
    text-decoration: none;
}
.catalog-notfound__link_green {
    color: #fff;
    background: #2b4747;
}
.catalog-notfound__link_grey {
    color: #282321;
    background: #f5f5f5;
}
@media (max-width: 480px) {
    .catalog-notfound__links {
        grid-template-columns: 1fr;
        gap: 8px;
    }
}

/* Header type switcher (Женское / Мужское) */
.header__type a {
    color: inherit;
    text-decoration: none;
}
.header__type.is-inactive {
    opacity: .55;
    border-bottom-color: transparent;
}
.header__type.is-inactive:hover {
    opacity: 1;
}

/* Selected filters: chips + reset */
.catalog__selected {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    align-items: center;
    margin-top: 16px;
}
.catalog__selected-item {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 6px 14px;
    border: 1px solid #282321;
    border-radius: 100px;
    background: #fff;
    font-size: 13px;
    color: #282321;
    cursor: pointer;
    transition: background .2s, color .2s;
}
.catalog__selected-item span {
    font-size: 16px;
    line-height: 1;
}
.catalog__selected-item:hover {
    background: #282321;
    color: #fff;
}
.catalog__selected-reset {
    border: none;
    background: none;
    padding: 6px 0;
    font-size: 13px;
    color: #75706d;
    cursor: pointer;
    text-decoration: underline;
}
.catalog__selected-reset:hover {
    color: #282321;
}

/* Filters modal close (mobile) */
.catalog__filters-close {
    display: none;
}
@media (max-width: 960px) {
    .catalog__filters-wrapper .catalog__filters {
        position: relative;
    }
    .catalog__filters-close {
        display: flex;
        align-items: center;
        justify-content: center;
        position: absolute;
        top: 14px;
        right: 16px;
        width: 32px;
        height: 32px;
        background: none;
        border: none;
        padding: 0;
        cursor: pointer;
        z-index: 10;
    }
}

/* Mobile menu close button */
.header__mobile-menu-close {
    display: none;
}
@media (max-width: 960px) {
    .header__mobile-menu-close {
        display: flex;
        align-items: center;
        justify-content: center;
        position: absolute;
        top: 16px;
        right: 16px;
        width: 32px;
        height: 32px;
        background: none;
        border: none;
        padding: 0;
        cursor: pointer;
        z-index: 10;
    }
}

/* Sort dropdown close button (mobile) */
.catalog__sort-close {
    display: none;
}
@media (max-width: 960px) {
    .catalog__sort-close {
        display: flex;
        align-items: center;
        justify-content: center;
        position: absolute;
        top: 8px;
        right: 8px;
        width: 32px;
        height: 32px;
        background: none;
        border: none;
        padding: 0;
        cursor: pointer;
        z-index: 10;
    }
}