/* public/css/cart.css */

.cart-page {
    text-align: center;
    width: 100%;
    max-width: 1200px;
    /* Ограничим ширину, чтобы не разлеталось на 1920px */
    margin: 50px auto;
    padding: 0 20px;
    position: relative;
    font-family: 'Helvetica', 'Arial', sans-serif;
    min-height: 80vh;
}

h1 {
    font-size: 28px;
    font-weight: 700;
    margin-bottom: 30px;
    text-transform: uppercase;
}

/* --- СЕТКА ТОВАРОВ И ИТОГА --- */
.cart-layout {
    display: flex;
    flex-direction: column;
    gap: 40px;
}

@media(min-width: 1024px) {
    .cart-layout {
        flex-direction: row;
        align-items: flex-start;
    }
}

/* Товары */
.cart-items-column {
    flex: 1;
    width: 100%;
}

.cart-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 0;
    border-bottom: 1px solid #ccc;
}

.cart-item:first-child {
    border-top: 1px solid #ccc;
}

.cart-item-image {
    width: 85px;
    min-width: 85px;
    height: 110px;
    object-fit: cover;
    margin-right: 20px;
}

.cart-item-info {
    display: flex;
}

.cart-item-actions {
    display: contents;
}

.cart-item-info1 {
    display: flex;
    flex-direction: column;
    min-width: 220px;
    text-align: left;
    margin: 0px 35px;
}

.cart-item-info1 p {
    margin: 3px 0;
}

.cart-item-info1 a {
    text-decoration: none;
    color: #000;
    font-weight: 700;
    font-size: 16px;
}

.cart-item-info1-color {
    color: #777;
    font-size: 13px;
}

.cart-item-quantity {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    max-width: 30px;
    min-width: 30px;
    text-align: center;
    margin: 0px 50px 0px 0px;
}

.cart-item-quantity button {
    background: transparent;
    border: none;
    font-size: 20px;
    cursor: pointer;
    padding: 0 10px;
}

.cart-item-quantity span {
    font-size: 16px;
    font-weight: bold;
    width: 20px;
    text-align: center;
}

.product-price-center {
    align-items: center;
    display: flex;
    min-width: 220px;
    padding: 0px 50px 0px 30px;
}

.product-new-price1 {
    display: block;
    font-weight: 700;
    color: #000;
    font-size: 16px;
}

.product-new-price1.discounted {
    color: #d32f2f;
}

.product-old-price1 {
    text-decoration: line-through;
    color: #999;
    font-size: 13px;
    margin-left: 5px;
}

.remove-item {
    background: transparent;
    border: none;
    cursor: pointer;
    padding: 5px;
    margin-left: 10px;
}

/* Сайдбар (Итог) */
.cart-order-details1 {
    width: 100%;
    max-width: 350px;
}

.cart-order-details {
    align-content: center;
    align-items: center;
    background-color: #fcfcfc;
    display: flex;
    flex-direction: column;
    justify-content: center;
    margin-left: 35px;
    min-width: 215px;
    padding: 50px 35px;
}

.cart-order-details h2 {
    margin-top: 0;
    font-size: 20px;
    font-weight: bold;
    text-transform: uppercase;
    margin-bottom: 20px;
}

.cart-order-details-price {
    border-top: 1px solid #ccc;
    padding: 15px 0;
}

.cart-order-details-price1 {
    font-size: 12px;
    color: #666;
    text-transform: uppercase;
    margin-bottom: 5px;
}

#total-price-display {
    font-size: 22px;
    font-weight: bold;
    color: #000;
    margin: 0;
}

.cart-order-details-input {
    width: 100%;
    padding: 10px;
    border: 1px solid #ccc;
    margin-bottom: 10px;
    box-sizing: border-box;
}

.cart-order-details button {
    width: 100%;
    background: #000;
    color: #fff;
    border: none;
    padding: 12px;
    font-weight: bold;
    text-transform: uppercase;
    cursor: pointer;
}

.cart-order-details button:hover {
    background: #333;
}

/* =========================================
   ОФОРМЛЕНИЕ ЗАКАЗА (3 КОЛОНКИ)
   ========================================= */
.cart-summary {
    width: 100%;
    margin-top: 60px;
    border: 1px solid #ccc;
    padding: 40px;
    box-sizing: border-box;
    text-align: left;
}

.cart-summary h3 {
    text-align: center;
    font-size: 24px;
    font-weight: bold;
    margin-bottom: 50px;
    text-transform: uppercase;
}

/* СЕТКА GRID - РОВНО 3 КОЛОНКИ */
.checkout-grid {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    /* Три равные колонки */
    gap: 40px;
    /* Отступ между колонками */
    align-items: start;
}

.checkout-col h4 {
    font-size: 16px;
    font-weight: 700;
    margin-bottom: 25px;
    text-transform: uppercase;
    color: #000;
    display: flex;
    align-items: center;
    gap: 8px;
}

/* Поля ввода (Input) */
.form-group {
    margin-bottom: 25px;
    position: relative;
}

.form-input {
    width: 100%;
    padding: 10px 0;
    border: none;
    border-bottom: 1px solid #ccc;
    background: transparent;
    font-size: 14px;
    color: #000;
    outline: none;
    border-radius: 0;
    font-family: inherit;
}

.form-input:focus {
    border-bottom-color: #000;
}

.form-input::placeholder {
    color: #999;
}

/* --- КАСТОМНЫЙ SELECT (ВЫПАДАЮЩИЙ СПИСОК) --- */
.custom-select-wrapper {
    position: relative;
    width: 100%;
    margin-bottom: 25px;
    font-family: inherit;
}

.custom-select-wrapper select {
    display: none;
}

/* Скрываем нативный селект */

/* Заголовок селекта (то, что видит юзер) */
.select-selected {
    background-color: transparent;
    border-bottom: 1px solid #ccc;
    padding: 10px 0;
    cursor: pointer;
    font-size: 14px;
    color: #000;
    position: relative;
}

/* Стрелочка */
.select-selected:after {
    content: "";
    position: absolute;
    top: 45%;
    right: 5px;
    width: 6px;
    height: 6px;
    border-right: 1px solid #000;
    border-bottom: 1px solid #000;
    transform: rotate(45deg) translateY(-50%);
    transition: transform 0.2s;
}

.select-selected.select-arrow-active:after {
    transform: rotate(225deg) translateY(-50%);
    top: 50%;
}

/* Если disabled */
.select-selected.select-disabled {
    color: #999;
    border-bottom: 1px solid #e0e0e0;
    cursor: default;
}

.select-selected.select-disabled:after {
    border-color: #ccc;
}

/* Выпадающий список (Контейнер) */
.select-items {
    position: absolute;
    background-color: #fff;
    top: 100%;
    left: 0;
    right: 0;
    z-index: 999;
    border: 1px solid #e0e0e0;
    border-top: none;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
    max-height: 250px;
    overflow-y: auto;
}


.select-hide {
    display: none;
}

/* Пункты списка */
.select-items div {
    color: #000;
    padding: 12px 15px;
    cursor: pointer;
    border-bottom: 1px solid #f9f9f9;
    font-size: 14px;
}

.select-items div:hover,
.same-as-selected {
    background-color: #f0f0f0;
}

/* --- РАДИО КНОПКИ --- */
.radio-container {
    display: flex;
    align-items: center;
    position: relative;
    padding-left: 30px;
    margin-bottom: 15px;
    cursor: pointer;
    font-size: 14px;
    user-select: none;
}

.radio-container input {
    position: absolute;
    opacity: 0;
    cursor: pointer;
}

.checkmark {
    position: absolute;
    top: 0;
    left: 0;
    height: 18px;
    width: 18px;
    background-color: #fff;
    border: 1px solid #ccc;
    border-radius: 50%;
}

.radio-container:hover input~.checkmark {
    background-color: #eee;
}

.radio-container input:checked~.checkmark {
    background-color: #000;
    border-color: #000;
}

.checkmark:after {
    content: "";
    position: absolute;
    display: none;
}

.radio-container input:checked~.checkmark:after {
    display: block;
}

.radio-container .checkmark:after {
    top: 5px;
    left: 5px;
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: white;
}

/* Комментарий и Кнопка */
.order-comments textarea {
    width: 100%;
    background-color: transparent;
    border: none;
    border-bottom: 1px solid #ccc;
    resize: none;
    outline: none;
    padding: 10px 0;
    font-family: inherit;
}

.submit-wrap {
    text-align: center;
    margin-top: 40px;
}

.submit-btn {
    background: #000;
    color: #fff;
    padding: 15px 40px;
    border: none;
    font-weight: bold;
    font-size: 14px;
    text-transform: uppercase;
    cursor: pointer;
    letter-spacing: 1px;
}

.submit-btn:hover {
    background: #333;
}

/* Пустая корзина */
.empty-cart-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 60vh;
}

.empty-cart-icon {
    width: 80px;
    height: 80px;
    opacity: 0.3;
    margin-bottom: 20px;
}

.go-to-catalog-button {
    background: #000;
    color: #fff;
    padding: 12px 30px;
    text-decoration: none;
    text-transform: uppercase;
    font-weight: bold;
    margin-top: 15px;
}

/* Модалка */
.modal-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 2000;
    justify-content: center;
    align-items: center;
}

.modal-window {
    background: #fff;
    padding: 40px;
    width: 90%;
    max-width: 400px;
    text-align: center;
}

.modal-btn {
    background: #000;
    color: #fff;
    border: none;
    padding: 5px 20px;
    font-weight: bold;
    text-transform: uppercase;
    cursor: pointer;
    margin-top: 20px;
}

/* Поле ввода, которое выглядит как селект */
input.select-selected {
    padding: 12px 15px;
    width: 100%;
    font-size: 14px;
    cursor: text;
    border-radius: 4px;
    outline: none;

    /* Стрелочка справа */
    background-image: url("data:image/svg+xml;charset=US-ASCII,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20width%3D%22292.4%22%20height%3D%22292.4%22%3E%3Cpath%20fill%3D%22%23000000%22%20d%3D%22M287%2069.4a17.6%2017.6%200%200%200-13-5.4H18.4c-5%200-9.3%201.8-12.9%205.4A17.6%2017.6%200%200%200%200%2082.2c0%205%201.8%209.3%205.4%2012.9l128%20127.9c3.6%203.6%207.8%205.4%2012.8%205.4s9.2-1.8%2012.8-5.4L287%2095c3.5-3.5%205.4-7.8%205.4-12.8%200-5-1.9-9.2-5.5-12.8z%22%2F%3E%3C%2Fsvg%3E");
    background-repeat: no-repeat;
    background-position: right 15px center;
    background-size: 10px;
}

/* Когда список открыт */
input.select-selected.active {
    border-bottom-left-radius: 0;
    border-bottom-right-radius: 0;
    border-color: #000;
}

/* Выпадающий список */
.select-items {
    position: absolute;
    background-color: #fff;
    border: 1px solid #ddd;
    border-top: none;
    z-index: 99;
    top: 100%;
    left: 0;
    right: 0;
    max-height: 250px;
    /* Ограничение высоты */
    overflow-y: auto;
    /* Скролл */
    border-bottom-left-radius: 4px;
    border-bottom-right-radius: 4px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

/* Скрытый список */
.select-hide {
    display: none;
}

/* Пункты списка */
.select-items div {
    padding: 10px 15px;
    cursor: pointer;
    border-bottom: 1px solid #f1f1f1;
    font-size: 14px;
}

.select-items div:hover,
.same-as-selected {
    background-color: #f1f1f1;
}

/* Если селект выключен */
input.select-selected:disabled {
    background-color: #f9f9f9;
    cursor: not-allowed;
    opacity: 0.7;
}

/* АДАПТИВ */
@media (max-width: 1024px) {
    .checkout-grid {
        grid-template-columns: 1fr;
        gap: 30px;
    }

    .cart-layout {
        flex-direction: column;
    }

    .cart-order-details1 {
        max-width: 85%;
        margin: 0 auto;
    }
}

@media screen and (max-width: 1024px) {

    input[type="text"],
    input[type="email"],
    input[type="tel"],
    input[type="number"],
    input[type="password"],
    input[type="search"],
    textarea,
    select {
        font-size: 16px !important;
        /* Магическое число для iOS */
        transform: scale(1);
        /* Иногда помогает предотвратить микро-зум */
    }
}

/* Общие стили для мобильных устройств */
@media (max-width: 1024px) {
    .cart-page {
        margin: 90px auto;
        padding: 0 15px;
    }

    .cart-layout {
        flex-direction: column;
        width: 100%;
    }

    .cart-item {
        display: grid;
        grid-template-columns: 80px 1fr;
        gap: 15px;
        padding: 15px 0;
        border-bottom: 1px solid #e0e0e0;
        position: relative;
        width: 100%;
    }

    .quantity-display {
        margin: 0 10px;
        font-size: 16px;
    }

    .cart-item-image {
        width: 80px;
        height: 100px;
        object-fit: cover;
    }

    .cart-item-name {
        font-size: 16px;
        font-weight: bold;
        margin-bottom: 5px;
    }

    .cart-item-price {
        font-size: 16px;
        font-weight: bold;
        margin-top: 5px;
    }

    .cart-item-old-price {
        font-size: 12px;
        color: #999;
        text-decoration: line-through;
        margin-left: 5px;
    }


    .cart-item-info {
        font-size: 12px;
        color: #666;
        margin-bottom: 5px;
        display: flex;
        justify-content: space-around;
    }

    .cart-item-info1 {
        margin: 10px 0;
        min-width: 115px;
        max-width: 130px;
    }

    .product-price-center {
        padding: 10px 0;
        min-width: 65px;
        justify-content: center;
        flex-direction: column;
    }

    .cart-item-quantity {
        justify-content: space-between;
        width: 100%;
        margin: 10px 0;
        align-items: center;
    }

    .product-new-price1 {
        font-size: 14px;
    }

    .product-new-price1.discounted {
        color: rgb(235, 0, 28);
    }

    .product-old-price1 {
        font-size: 12px;
    }

    .product-price-center1 {
        flex-direction: column;
    }

    .cart-order-details {
        margin-left: 0;
        margin-top: 20px;
        padding: 20px;
    }

    .cart-summary {
        padding: 15px;
    }

    .order-details-columns {
        flex-direction: column;
    }

    .order-column {
        margin: 10px 0;
    }

    .comment-box {
        width: 100%;
    }

    .cart-order-details-input {
        margin: 20px 0px 10px 0px;
        padding: 10px;
        border: 1px solid #ccc;
        outline: none;
        font-size: 16px;
        /* Фиксированный размер шрифта */
        width: calc(100% - 22px);
        /* Учитываем border и padding */
        transition: none;
        /* Отключаем все анимации */
        -webkit-appearance: none;
        /* Отключаем стандартные стили для iOS */
        -moz-appearance: none;
        appearance: none;
    }

    .cart-order-details-input:focus {
        border: 1px solid #888;
        /* Немного темнее граница при фокусе */
        box-shadow: none;
        /* Убираем тень при фокусе */
    }

    /* Убедимся, что кнопка применения промокода также не меняет размер */
    .cart-order-details button {
        font-size: 16px;
        /* Фиксированный размер шрифта */
        transition: background-color 0.3s ease;
        /* Только анимация цвета фона */
    }

    .cart-order-details-input,
    .cart-order-details button {
        width: 100%;
        box-sizing: border-box;
    }

    .order-column input[type="text"] {
        font-size: 16px;
        /* Гарантируем, что размер шрифта не меняется на мобильных */
    }
}

/* Стили для планшетов */
@media (min-width: 769px) and (max-width: 1024px) {
    .cart-layout {
        align-items: center;
    }

    .cart-order-details-input,
    .cart-order-details button {
        width: 45%;
        box-sizing: border-box;
    }


    .cart-item-image {
        margin-right: 20px;
    }

    .cart-items-column {
        width: 85%;
        display: flex;
        flex-direction: column;
        align-items: center;
        margin: 0 auto;
    }

    .cart-item {
        margin: 0 auto;
        align-items: center;
    }

    .cart-item-info1 {
        min-width: 150px;
    }

    .product-price-center {
        padding: 0 20px;
        min-width: 150px;
    }
}

/* ==========================================================================
   FINAL ADAPTIVE (iPhone SE + Staff Style)
   ========================================================================== */

/* -------------------------------------------------------------------------
   1. МОБИЛЬНЫЙ ВЕРТИКАЛЬНЫЙ (Portrait) - < 640px
   Стиль: Как на скрине Staff (Вертикальный +/-, Мусорка справа)
   ------------------------------------------------------------------------- */
@media screen and (max-width: 640px) {

    /* Отступы страницы */
    .cart-page {
        margin: 20px auto 50px;
        padding: 0 15px;
        width: 100%;
        box-sizing: border-box;
    }

    .cart-layout {
        display: flex;
        flex-direction: column;
        gap: 20px;
    }

    /* --- КАРТОЧКА ТОВАРА (NEW MOBILE FLEXBOX DESIGN) --- */
    .cart-item {
        display: flex;
        padding: 20px 0;
        border-bottom: 1px solid #f3f4f6;
        align-items: stretch;
        position: relative;
        gap: 16px;
        width: 100%;
        text-align: left;
    }

    /* Картинка слева */
    .cart-item-image {
        width: 80px;
        height: 112px;
        border-radius: 4px;
        flex-shrink: 0;
        object-fit: cover;
        margin: 0;
        background-color: #f9fafb;
        box-shadow: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    }

    /* Правый контейнер (ИНФО) */
    .cart-item-info {
        display: flex;
        flex-direction: column;
        flex: 1;
        min-width: 0;
        margin: 0;
        padding-right: 24px;
        justify-content: flex-start;
    }

    /* 1. ТЕКСТ (Название, размер) на всю ширину верхнего ряда */
    .cart-item-info1 {
        display: flex;
        flex-direction: column;
        flex: 0 0 auto;
        width: 100%;
        padding-right: 0;
        margin: 0 0 12px 0;
        align-self: flex-start;
        max-width: max-content;
    }

    .cart-item-info1 a {
        font-size: 14px;
        font-weight: 700;
        line-height: 1.25;
        display: block;
        margin-bottom: 4px;
        color: #111827;
        text-align: left;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
    }

    .cart-item-info1 p,
    .cart-item-info1-color {
        display: block;
        margin: 2px 0;
        font-size: 12px;
        color: #6b7280;
        text-align: left;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
    }

    /* NEW WRAPPER FOR QUANTITY AND PRICE */
    .cart-item-actions {
        display: flex;
        flex-direction: row;
        justify-content: space-between;
        align-items: center;
        width: 100%;
        margin-top: auto;
    }

    /* 2. КОЛИЧЕСТВО (ГОРИЗОНТАЛЬНО) снизу слева */
    .cart-item-quantity {
        display: flex !important;
        flex-direction: row !important;
        align-items: center !important;
        justify-content: flex-start !important;
        background: transparent !important;
        border: none !important;
        border-radius: 0 !important;
        width: auto !important;
        height: auto !important;
        padding: 0 !important;
        gap: 1.5rem;
        margin: 0 !important;
        box-shadow: none !important;
    }

    .cart-item-quantity button {
        width: 36px !important;
        height: 36px !important;
        background: transparent !important;
        border: none !important;
        box-shadow: none !important;
        font-size: 18px !important;
        color: #4b5563 !important;
        display: flex !important;
        align-items: center !important;
        justify-content: center !important;
        cursor: pointer !important;
        padding: 0 !important;
        margin: 0 !important;
        border-radius: 4px !important;
        transition: background-color 0.15s, color 0.15s !important;
    }

    .cart-item-quantity button:hover {
        background-color: #e5e7eb !important;
        color: #000 !important;
    }

    .cart-item-quantity span {
        width: 32px !important;
        text-align: center !important;
        font-size: 14px !important;
        font-weight: 700 !important;
        color: #111827 !important;
        user-select: none;
        margin: 0 !important;
        padding: 0 !important;
        display: inline-block !important;
    }

    /* 3. ЦЕНА снизу справа */
    .product-price-center {
        display: flex;
        flex-direction: column;
        justify-content: flex-end;
        align-items: flex-end;
        text-align: right;
        padding: 0;
        margin: 0;
        min-width: 0;
    }

    .product-new-price1 {
        font-size: 15px;
        font-weight: 900;
        color: #111827;
        display: block;
        line-height: 1.25;
    }

    .product-new-price1.discounted {
        color: #e11d48;
    }

    .product-old-price1 {
        font-size: 12px;
        color: #9ca3af;
        text-decoration: line-through;
        margin-top: 2px;
        margin-left: 0;
    }

    /* 4. МУСОРКА Абсолютно справа вверху */
    .remove-item {
        position: absolute;
        top: 16px;
        right: 0;
        background: transparent;
        border: none;
        padding: 4px;
        margin: 0;
        display: flex;
        align-items: center;
        justify-content: center;
        color: #d1d5db;
        transition: color 0.15s;
        cursor: pointer;
        z-index: 10;
    }

    .remove-item svg {
        width: 20px;
        height: 20px;
        fill: none;
        stroke: currentColor;
    }

    .remove-item:hover {
        color: #ef4444;
    }

    /* Оформление заказа (1 колонка) */
    .checkout-grid {
        display: grid;
        grid-template-columns: 1fr;
        gap: 30px;
    }

    .cart-items-column,
    .cart-order-details1,
    .cart-order-details {
        width: 100%;
        box-sizing: border-box;
    }

    .cart-order-details {
        padding: 20px;
    }

    .submit-btn {
        width: 100%;
        padding: 18px;
    }
}

/* -------------------------------------------------------------------------
   2. ЛАНДШАФТ И ПЛАНШЕТЫ (> 640px)
   Стиль: Горизонтальный (как на старом сайте)
   ------------------------------------------------------------------------- */
@media screen and (min-width: 641px) and (max-width: 1024px) {

    .cart-page {
        margin: 30px auto;
        padding: 0 20px;
    }

    .cart-layout {
        display: flex;
        flex-direction: column;
        gap: 30px;
    }

    .cart-item {
        display: grid;
        /* Жесткая строка: Фото | Инфо | Кол-во | Цена | Мусорка */
        grid-template-columns: 90px 1fr 110px 100px 40px;
        gap: 20px;
        align-items: center;
        padding: 20px 0;
        border-bottom: 1px solid #e0e0e0;
    }

    .cart-item-image {
        width: 90px;
        height: 110px;
        object-fit: cover;
        margin: 0;
    }

    .cart-item-info {
        display: contents;
        /* Разворачиваем детей в сетку родителя */
    }

    /* Текст */
    .cart-item-info1 {
        margin: 0;
        text-align: left;
    }

    .cart-item-info1 a {
        font-size: 16px;
        margin-bottom: 5px;
        display: block;
    }

    /* Кол-во (Горизонтально) */
    .cart-item-quantity {
        display: flex;
        flex-direction: row !important;
        align-items: center;
        justify-content: space-between;
        border-radius: 4px;
        height: 40px;
        width: 100%;
        margin: 0;
        padding: 0 5px;
    }

    .cart-item-quantity button {
        font-size: 20px;
        height: 100%;
        display: flex;
        align-items: center;
    }

    /* Цена */
    .product-price-center {
        display: flex;
        flex-direction: column;
        align-items: center;
        padding: 0;
        margin: 0;
    }

    .product-new-price1 {
        font-size: 16px;
        color: #000;
        font-weight: 700;
    }

    /* Мусорка */
    .remove-item {
        margin: 0;
        display: flex;
        justify-content: center;
    }

    .checkout-grid {
        grid-template-columns: 1fr 1fr;
        gap: 30px;
    }
}

/* =========================================
   STREET SEARCH DROPDOWN STYLES
   ========================================= */

/* Container for the courier input */
#courier-block {
    position: relative;
}

/* The Dropdown List itself */
#streets-dropdown {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    z-index: 9999;
    /* Very high z-index to sit on top of everything */
    background-color: #fff;
    border: 1px solid #000;
    /* Black border to match your design */
    border-top: none;
    max-height: 250px;
    overflow-y: auto;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.15);
}

/* Items inside the dropdown */
#streets-dropdown div {
    padding: 12px 15px;
    cursor: pointer;
    font-size: 14px;
    color: #000;
    border-bottom: 1px solid #f1f1f1;
    background-color: #fff;
    text-align: left;
    /* Ensure text aligns left */
}

/* Hover effect */
#streets-dropdown div:hover {
    background-color: #f0f0f0;
}

/* Ensure the hidden class works with high specificity */
.select-hide {
    display: none !important;
}

/* Optional: Loading state style if you want to add it later */
.street-loading {
    color: #999;
    font-style: italic;
    padding: 10px;
}

/* =========================================================================
   CHECKOUT PAGE (STEP 2 — /checkout)
   ========================================================================= */

.checkout-page h1 {
    text-align: left;
    font-size: 24px;
    margin-bottom: 25px;
}

/* Мини-превью товаров */
.checkout-mini-items {
    display: flex;
    gap: 15px;
    overflow-x: auto;
    padding-bottom: 15px;
    margin-bottom: 30px;
    border-bottom: 1px solid #eaeaea;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: thin;
}

.checkout-mini-items::-webkit-scrollbar {
    height: 4px;
}

.checkout-mini-items::-webkit-scrollbar-thumb {
    background: #ccc;
    border-radius: 2px;
}

.checkout-mini-item {
    display: flex;
    align-items: center;
    gap: 10px;
    min-width: 200px;
    flex-shrink: 0;
    padding: 8px 12px;
    background: #fafafa;
    border: 1px solid #f0f0f0;
    border-radius: 8px;
    transition: border-color 0.2s;
    text-align: left;
}

.checkout-mini-item:hover {
    border-color: #ddd;
}

.checkout-mini-img {
    width: 50px;
    height: 60px;
    object-fit: cover;
    border-radius: 4px;
    flex-shrink: 0;
}

.checkout-mini-info {
    display: flex;
    flex-direction: column;
    gap: 2px;
    min-width: 0;
}

.checkout-mini-name {
    font-size: 12px;
    font-weight: 600;
    color: #000;
    overflow: hidden;
    text-overflow: ellipsis;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    max-width: 160px;
}

.checkout-mini-meta {
    font-size: 10px;
    color: #999;
    white-space: nowrap;
}

.checkout-mini-preorder {
    font-size: 9px;
    font-weight: 700;
    color: #1565c0;
    background: #e3f2fd;
    padding: 1px 6px;
    border-radius: 3px;
    display: inline-block;
    width: fit-content;
}

/* Layout: форма + сайдбар */
.checkout-layout {
    display: flex;
    gap: 40px;
    align-items: flex-start;
}

.checkout-form-column {
    flex: 1;
    min-width: 0;
}

.checkout-sidebar-column {
    width: 340px;
    flex-shrink: 0;
}

/* Секції форми */
.checkout-section {
    margin-bottom: 30px;
    padding-bottom: 25px;
    border-bottom: 1px solid #f0f0f0;
}

.checkout-section:last-of-type {
    border-bottom: none;
}

.checkout-section-title {
    font-size: 14px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    gap: 10px;
    color: #000;
}

.checkout-step-number {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    background: #000;
    color: #fff;
    border-radius: 50%;
    font-size: 13px;
    font-weight: 700;
    flex-shrink: 0;
}

.checkout-fields {
    display: flex;
    flex-direction: column;
    gap: 0;
}

/* Delivery toggle */
.delivery-destination-toggle {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-bottom: 20px;
}

.delivery-destination-toggle .radio-container {
    font-weight: 600;
    margin: 0;
}

/* Payment opts */
.checkout-payment-option {
    margin-bottom: 12px;
}

/* Select width on checkout (not full-width) */
.checkout-select {
    max-width: 500px;
}

/* Sidebar */
.checkout-sidebar {
    position: sticky;
    top: 120px;
    background: #fafafa;
    padding: 25px;
    border: 1px solid #eaeaea;
    border-radius: 8px;
}

.checkout-sidebar-rows {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.checkout-sidebar-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 13px;
    color: #555;
}

.checkout-submit-btn {
    width: 100%;
    background: #000;
    color: #fff;
    padding: 16px;
    border: none;
    font-size: 14px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    cursor: pointer;
    border-radius: 4px;
    transition: background 0.2s;
}

.checkout-submit-btn:hover {
    background: #333;
}

/* Мобільна кнопка (дублікат) */
.checkout-submit-mobile {
    display: none;
}

/* Country dropdown */
.country-dropdown {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: #fff;
    border: 1px solid #e0e0e0;
    border-top: none;
    max-height: 220px;
    overflow-y: auto;
    z-index: 1000;
    border-radius: 0 0 6px 6px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.country-option {
    padding: 10px 15px;
    cursor: pointer;
    font-size: 14px;
    border-bottom: 1px solid #f5f5f5;
    transition: background 0.15s;
}

.country-option:hover {
    background: #f0f0f0;
}

/* Loading dots animation */
.loading-dots::after {
    content: '';
    animation: loadingDots 1.5s infinite;
}

@keyframes loadingDots {
    0% {
        content: '.';
    }

    33% {
        content: '..';
    }

    66% {
        content: '...';
    }
}

/* =========================================================================
   CHECKOUT MOBILE
   ========================================================================= */
@media (max-width: 768px) {
    .checkout-layout {
        flex-direction: column;
    }

    .checkout-sidebar-column {
        width: 100%;
        order: 2;
    }

    .checkout-form-column {
        order: 1;
    }

    .checkout-sidebar {
        bottom: 0;
        left: 0;
        right: 0;
        top: auto;
        border-radius: 12px 12px 0 0;
        box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.1);
        padding: 15px 20px;
        background: #fff;
    }

    .checkout-sidebar h3,
    .checkout-sidebar-rows,
    .checkout-sidebar>div:not(:last-child):not(style) {
        /* hide rows on mobile, show only total + button */
    }

    .checkout-sidebar .checkout-submit-btn {
        margin-top: 0;
    }

    .checkout-submit-mobile {
        display: none;
    }

    .checkout-mini-item {
        min-width: 160px;
    }

    .checkout-mini-name {
        max-width: 100px;
    }

    /* Padding at the bottom so content doesn't hide behind sticky bar */
    .checkout-page {
        padding-bottom: 100px;
    }
}

@media (min-width: 769px) and (max-width: 1024px) {
    .checkout-sidebar-column {
        width: 300px;
    }
}