/* Все правки в стиле делать только тут */


/* Название маркетплейса */
.product__block-mp-item a .name-block {
    white-space: nowrap;
}

/* Цена — прижата к правому краю внутри строки, но не улетает */
.price-tag {
    white-space: nowrap;
    margin-left: auto;
}

/* Product card: shop price + two buttons */
.product__block-mp-desc--shop {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    width: 100%;
}

.product__block-mp-price .price-tag {
    margin-left: 0;
    font-size: 1.35rem;
    font-weight: 700;
    color: var(--bs-orange, #fe7e00);
}

.product__block-mp-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

/* Override generic .product__block-mp a marketplace link styles from styles.css */
.product__block-mp .product__block-mp-buttons a.shop {
    flex: 1 1 140px;
    width: auto;
    min-height: 44px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0;
    overflow: visible;
    text-decoration: none;
    border-radius: 999px;
    padding: 0.65rem 1.25rem;
    font-weight: 600;
    font-size: 0.9375rem;
    line-height: 1.25;
    border: 2px solid transparent;
    box-sizing: border-box;
    transition: background 0.2s ease, color 0.2s ease, border-color 0.2s ease, transform 0.2s ease;
}

.product__block-mp .product__block-mp-buttons a.shop::before,
.product__block-mp .product__block-mp-buttons a.shop::after,
.product__block-mp .product__block-mp-buttons a.shop span::before,
.product__block-mp .product__block-mp-buttons a.shop span::after {
    content: none !important;
    display: none !important;
    opacity: 0 !important;
}

.product__block-mp .product__block-mp-buttons a.shop span.name-block {
    font-size: inherit;
    font-weight: inherit;
    line-height: inherit;
    color: inherit;
    transition: none;
    white-space: nowrap;
}

.product__block-mp .product__block-mp-buttons a.shop-buy-now {
    background: linear-gradient(135deg, var(--bs-orange, #fe7e00) 0%, #e86a00 100%);
    color: #fff;
    border-color: var(--bs-orange, #fe7e00);
}

.product__block-mp .product__block-mp-buttons a.shop-add-cart {
    background: #fff;
    color: var(--bs-orange, #fe7e00);
    border-color: var(--bs-orange, #fe7e00);
}

.product__block-mp .product__block-mp-buttons a.shop-buy-now:not(.is-disabled):hover,
.product__block-mp .product__block-mp-buttons a.shop-buy-now:not(.is-disabled):hover span.name-block {
    color: #fff;
    background: linear-gradient(135deg, #e86a00 0%, #d45f00 100%);
    border-color: #e86a00;
    transform: translateY(-1px);
}

.product__block-mp .product__block-mp-buttons a.shop-add-cart:not(.is-disabled):hover,
.product__block-mp .product__block-mp-buttons a.shop-add-cart:not(.is-disabled):hover span.name-block {
    color: var(--bs-orange, #fe7e00);
    background: #fff5eb;
    border-color: #e86a00;
    transform: translateY(-1px);
}

.product__block-mp .product__block-mp-buttons a.shop.is-disabled {
    opacity: 1;
    pointer-events: none;
    cursor: not-allowed;
    transform: none;
}

.product__block-mp .product__block-mp-buttons a.shop-buy-now.is-disabled,
.product__block-mp .product__block-mp-buttons a.shop-buy-now.is-disabled span.name-block {
    background: #e9e9e9;
    color: #767676;
    border-color: #c8c8c8;
}

.product__block-mp .product__block-mp-buttons a.shop-add-cart.is-disabled,
.product__block-mp .product__block-mp-buttons a.shop-add-cart.is-disabled span.name-block {
    background: #fafafa;
    color: #767676;
    border-color: #c8c8c8;
}

/* Header cart icon */
.header__cart .header__cart,
.header__cart {
    display: flex;
    align-items: center;
}

.header__cart a {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    color: inherit;
    text-decoration: none;
}

.header__cart .icon-block {
    position: relative;
}

.header__cart .coll {
    position: absolute;
    top: -6px;
    right: -8px;
    min-width: 18px;
    height: 18px;
    padding: 0 4px;
    border-radius: 999px;
    background: var(--bs-orange, #fe7e00);
    color: #fff;
    font-size: 11px;
    line-height: 18px;
    text-align: center;
}

.header__cart .name-block {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
}

/* Cart / order pages */
.shop-cart-notice {
    margin: 0 0 1rem;
    padding: 0.75rem 1rem;
    background: #fff8e6;
    border: 1px solid rgba(0, 0, 0, 0.08);
    border-radius: 8px;
    color: #5a4a3a;
}

.shop-cart__list,
.shop-cart-page .shop-cart__list {
    list-style: none;
    margin: 0;
    padding: 0;
}

.shop-cart__list > .shop-cart__item {
    list-style: none;
}

.shop-cart__list > .shop-cart__item::marker {
    content: none;
}

.shop-cart__head {
    display: grid;
    grid-template-columns: 120px 1fr auto auto auto;
    gap: 1rem 1.25rem;
    padding: 0 0 0.5rem;
    font-size: 0.8125rem;
    font-weight: 600;
    color: #888;
    border-bottom: 1px solid rgba(0, 0, 0, 0.08);
}

.shop-cart__head-product {
    grid-column: 1 / 3;
}

.shop-cart__item {
    display: grid;
    grid-template-columns: 120px 1fr auto auto auto;
    gap: 1rem 1.25rem;
    align-items: center;
    padding: 1.25rem 0;
    border-bottom: 1px solid rgba(0, 0, 0, 0.08);
}

.shop-cart__item-image {
    width: 120px;
    height: 120px;
    border-radius: 12px;
    overflow: hidden;
    background: #f8f4f0;
    flex-shrink: 0;
}

.shop-cart__item-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.shop-cart__item-image a {
    display: block;
    width: 100%;
    height: 100%;
}

.shop-cart__item-body {
    min-width: 0;
}

.shop-cart__item-title a {
    color: inherit;
    text-decoration: none;
    font-weight: 600;
}

.shop-cart__item-title a:hover {
    color: var(--bs-orange, #fe7e00);
}

.shop-cart__item-price {
    font-size: 0.9375rem;
    color: #666;
    margin-top: 0.25rem;
}

.shop-cart-page .shop-cart__summary,
.shop-cart__summary {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    align-items: center;
    justify-content: space-between;
    margin-top: 1.5rem;
    padding-top: 1rem;
    border-top: 2px solid rgba(254, 126, 0, 0.15);
}

.shop-cart__actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    align-items: center;
    justify-content: space-between;
    margin-top: 1rem;
}

.shop-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 42px;
    padding: 0.6rem 1.2rem;
    border-radius: 999px;
    border: 0;
    text-decoration: none;
    cursor: pointer;
    font-weight: 600;
}

.shop-btn--primary {
    background: var(--bs-orange, #fe7e00);
    color: #fff;
}

.shop-btn--ghost {
    background: #f3f3f3;
    color: #333;
}

.shop-order-form {
    max-width: 560px;
    display: grid;
    gap: 1rem;
}

.shop-order-form__field label,
.shop-order-form__group legend {
    display: block;
    margin-bottom: 0.35rem;
    font-weight: 600;
}

.shop-order-form__field input[type="text"],
.shop-order-form__field input[type="email"] {
    width: 100%;
}

.shop-order-form__radio {
    display: flex;
    gap: 0.5rem;
    align-items: center;
    margin-bottom: 0.5rem;
}

/* Catalog: hover darker orange */
.catalog__item-buy-item a.shop::before {
    background: #e86a00;
}

@media (max-width: 767px) {
    .shop-cart__item {
        grid-template-columns: 1fr 1fr;
    }

    .product__block-mp .product__block-mp-buttons {
        flex-direction: column;
    }

    .product__block-mp .product__block-mp-buttons a.shop {
        flex: 1 1 100%;
        width: 100%;
    }
}

/* --- Commerce UI polish (cart / order / prices) --- */
.shop-price,
.shop-cart__total-value,
.shop-order-form__price {
    font-variant-numeric: tabular-nums;
}

.shop-cart-page,
.shop-order-page {
    padding: 0.5rem 0 2rem;
}

.shop-cart__item-title {
    font-weight: 600;
    font-size: 1.05rem;
    line-height: 1.35;
}

.shop-cart__item-options {
    font-size: 0.875rem;
    color: #666;
    grid-column: 1 / -1;
}

.shop-qty-stepper {
    display: inline-flex;
    align-items: center;
    border: 1px solid rgba(254, 126, 0, 0.35);
    border-radius: 999px;
    overflow: hidden;
    background: #fff;
}

.shop-qty-stepper__btn {
    width: 36px;
    height: 36px;
    border: 0;
    background: #fff5eb;
    color: var(--bs-orange, #fe7e00);
    font-size: 1.125rem;
    line-height: 1;
    cursor: pointer;
    transition: background 0.15s ease, color 0.15s ease;
}

.shop-qty-stepper__btn:hover {
    background: #ffe8d4;
}

.shop-qty-stepper__input {
    width: 2.75rem;
    border: 0;
    text-align: center;
    font-weight: 600;
    font-variant-numeric: tabular-nums;
    background: transparent;
    padding: 0.35rem 0;
}

.shop-icon-btn {
    width: 36px;
    height: 36px;
    border: 0;
    border-radius: 50%;
    background: #f5f5f5;
    color: #888;
    font-size: 1.25rem;
    line-height: 1;
    cursor: pointer;
    transition: background 0.15s ease, color 0.15s ease, transform 0.15s ease;
}

.shop-icon-btn:hover {
    background: #ffe8e8;
    color: #c0392b;
    transform: scale(1.05);
}

.shop-cart__empty {
    text-align: center;
    padding: 2.5rem 1rem;
    background: #fafafa;
    border-radius: 16px;
    border: 1px dashed rgba(0, 0, 0, 0.1);
}

.shop-cart__empty p {
    margin: 0 0 1rem;
    font-size: 1.05rem;
    color: #555;
}

.shop-btn {
    transition: background 0.2s ease, color 0.2s ease, border-color 0.2s ease, transform 0.15s ease, box-shadow 0.2s ease;
    border: 2px solid transparent;
    font-size: 0.9375rem;
}

.shop-btn:focus-visible {
    outline: 2px solid var(--bs-orange, #fe7e00);
    outline-offset: 2px;
}

.shop-btn--primary {
    background: linear-gradient(135deg, var(--bs-orange, #fe7e00) 0%, #e86a00 100%);
    border-color: var(--bs-orange, #fe7e00);
    color: #fff;
    box-shadow: 0 2px 8px rgba(254, 126, 0, 0.25);
}

.shop-btn--primary:hover {
    background: linear-gradient(135deg, #e86a00 0%, #d45f00 100%);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(254, 126, 0, 0.35);
    color: #fff;
}

.shop-btn--ghost {
    background: #fff;
    border-color: #ddd;
    color: #444;
}

.shop-btn--ghost:hover {
    background: #f8f8f8;
    border-color: #ccc;
    color: #222;
}

.shop-order-form__group {
    border: 0;
    margin: 0;
    padding: 0;
}

.shop-order-form__group legend {
    font-size: 1.05rem;
    font-weight: 700;
    margin-bottom: 0.75rem;
    padding: 0;
}

.shop-order-form__field input[type="text"],
.shop-order-form__field input[type="email"],
.shop-order-form__field input[type="tel"] {
    min-height: 44px;
    padding: 0.6rem 0.85rem;
    border: 1px solid #ddd;
    border-radius: 12px;
    font-size: 1rem;
    transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.shop-order-form__field input:focus {
    border-color: var(--bs-orange, #fe7e00);
    box-shadow: 0 0 0 3px rgba(254, 126, 0, 0.15);
    outline: none;
}

.shop-order-form__radio {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.5rem 0.75rem;
    padding: 0.85rem 1rem;
    margin-bottom: 0.5rem;
    border: 1px solid #e8e8e8;
    border-radius: 12px;
    cursor: pointer;
    transition: border-color 0.15s ease, background 0.15s ease, box-shadow 0.15s ease;
}

.shop-order-form__radio:has(input:checked) {
    border-color: var(--bs-orange, #fe7e00);
    background: #fff8f2;
    box-shadow: 0 0 0 1px rgba(254, 126, 0, 0.2);
}

.shop-order-form__radio input[type="radio"] {
    accent-color: var(--bs-orange, #fe7e00);
    width: 1.1rem;
    height: 1.1rem;
}

.shop-order-form__price {
    margin-left: auto;
    font-weight: 700;
    color: var(--bs-orange, #fe7e00);
}

.shop-order-form button.shop-btn--primary {
    width: 100%;
    max-width: 320px;
    margin-top: 0.5rem;
}

/* Commerce default delivery/payment rows (.panel) inside branded form */
.shop-order-form .panel {
    display: grid;
    gap: 0.65rem;
}

.shop-order-form .panel > p {
    font-weight: 700;
    margin: 0 0 0.25rem;
}

.shop-order-form .panel label {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1rem;
    border: 2px solid #eee;
    border-radius: 12px;
    cursor: pointer;
    transition: border-color 0.15s, background 0.15s;
}

.shop-order-form .panel label:has(input:checked) {
    border-color: var(--bs-orange, #fe7e00);
    background: #fff8f2;
}

.shop-order-form .panel input[type="radio"] {
    accent-color: var(--bs-orange, #fe7e00);
}

/* Catalog buy link — pill like product page */
.catalog__item-buy-item a.shop {
    border-radius: 999px;
    min-height: 44px;
    height: auto !important;
    padding: 0.5rem 1rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.35rem;
    background: linear-gradient(135deg, var(--bs-orange, #fe7e00) 0%, #e86a00 100%);
    transition: transform 0.15s ease, filter 0.15s ease;
}

.catalog__item-buy-item a.shop span.name-block {
    display: inline !important;
    position: static;
    z-index: 1;
    color: #fff;
    font-weight: 600;
    font-size: 0.8125rem;
    line-height: 1.25;
    white-space: nowrap;
}

.catalog__item-buy-item a.shop span.icon-block {
    display: none;
}

.catalog__item-buy-item a.shop:hover {
    transform: translateY(-1px);
    filter: brightness(1.05);
}

@media (max-width: 767.98px) {
    .catalog__item-buy-item a.shop {
        height: auto;
        min-height: 44px;
        padding: 0.5rem 1rem;
    }

    .catalog__item-buy-item a.shop span.name-block {
        display: inline !important;
        font-size: 0.8125rem;
    }
}

@media (max-width: 767px) {
    .shop-cart__item {
        grid-template-columns: 80px 1fr;
        grid-template-areas:
            "img body"
            "img qty"
            "total total"
            "remove remove";
    }

    .shop-cart__item-image {
        grid-area: img;
        width: 80px;
        height: 80px;
    }

    .shop-cart__item-body {
        grid-area: body;
    }

    .shop-cart__item-qty {
        grid-area: qty;
        justify-self: start;
    }

    .shop-cart__item-total {
        grid-area: total;
        font-weight: 700;
    }

    .shop-cart__item-remove {
        grid-area: remove;
        justify-self: end;
    }

    .shop-cart__summary {
        flex-direction: column;
        align-items: stretch;
    }

    .shop-cart__actions {
        flex-direction: column;
    }

    .shop-cart__actions .shop-btn {
        width: 100%;
        text-align: center;
    }
}
