/* Кастомные правки (не трогать main.min.css вёрстки) */

/* Сниппет Form оборачивает форму в <div class="ajax-form"> — в сетке корзины
   это ломает grid (форма должна быть прямым потомком .cart-wrap, span 4).
   display:contents убирает обёртку из раскладки, не трогая общий сниппет. */
.cart-wrap>.ajax-form {
    display: contents;
}

/* ===== Каталог: компактная корзина в карточке =====
   Светлый кружок (как .products-card-btn вёрстки) -> при добавлении компактный
   инлайн-степпер «- N +» той же высоты + маленький кружок «в корзину».
   Карточки остаются одной высоты, без громоздких пилюль. */
.products-card .products-card-group {
    flex-direction: row;
    align-items: center;
    gap: 12px;
}

.products-card .products-card-price {
    flex-grow: 1;
}

.products-card .product-cart {
    width: auto;
    flex-shrink: 0;
    flex-direction: row;
    align-items: center;
    gap: 8px;
}

.products-card .product-cart-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    min-height: 44px;
    padding: 0;
    gap: 0;
    border-radius: 50%;
    background-color: var(--dark-10);
    border: 1px solid transparent;
    color: var(--dark-100);
    transition: all .3s;
    cursor: pointer;
}

.products-card .product-cart-btn:hover {
    border-color: var(--dark-100);
}

.products-card .product-cart-btn>span {
    width: auto;
    height: auto;
    background: transparent;
    border-radius: 0;
    color: inherit;
}

.products-card .product-cart-btn>span svg {
    width: 22px;
    height: 22px;
}

/* активное состояние: степпер вместо кружка (та же высота 44) */
.products-card .product-cart.is-active .product-cart-btn {
    width: auto;
    border-radius: 24px;
    padding: 0 6px;
}

.products-card .product-cart-input-number {
    width: 104px;
    height: 44px;
    margin: 0;
}

.products-card .product-cart-input-number .input-number-control {
    background: transparent;
}

/* маленькая кнопка «перейти в корзину» — кружок, виден только когда товар в корзине */
.products-card .product-cart-link {
    display: none;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background-color: var(--dark-100);
    color: var(--white-100);
    border: 1px solid var(--dark-100);
    transition: all .3s;
    flex-shrink: 0;
}

.products-card .product-cart-link:hover {
    background-color: transparent;
    color: var(--dark-100);
}

.products-card .product-cart-link svg {
    width: 20px;
    height: 20px;
}

.products-card .product-cart.is-active .product-cart-link {
    display: flex;
}

/* ===== Страница «Спасибо за заказ» (документ checkout, id10) ===== */
.order-done {
    max-width: 600px;
    margin: 0 auto;
    text-align: center;
    padding: 40px 0 80px;
}

.order-done-icon {
    width: 88px;
    height: 88px;
    margin: 0 auto 28px;
    border-radius: 50%;
    background-color: var(--dark-100);
    color: var(--white-100);
    display: flex;
    align-items: center;
    justify-content: center;
}

.order-done-title {
    margin-bottom: 14px;
}

.order-done-text {
    font-size: 18px;
    line-height: 1.4;
    margin-bottom: 32px;
}

.order-done-buttons {
    display: flex;
    gap: 12px;
    justify-content: center;
    flex-wrap: wrap;
}

@media (max-width: 575px) {
    .order-done-buttons .order-done-btn {
        width: 100%;
        justify-content: center;
    }
}

/* ===== Date and Time Picker styling (fix for mobile and tablet calendar opening) ===== */
input[type="date"],
input[type="time"] {
    position: relative;
    -webkit-appearance: none;
    appearance: none;
}

/* Hide default formatting text when empty and not focused */
input[type="date"]:not(.has-value):not(:focus)::-webkit-datetime-edit,
input[type="time"]:not(.has-value):not(:focus)::-webkit-datetime-edit {
    color: transparent !important;
}

/* Custom placeholder inside native date/time fields */
input[type="date"]:not(.has-value):not(:focus)::before,
input[type="time"]:not(.has-value):not(:focus)::before {
    content: attr(placeholder);
    position: absolute;
    left: 20px; /* Align with standard input padding */
    top: 50%;
    transform: translateY(-50%);
    color: var(--white-60);
    font-size: 16px;
    font-family: var(--font-family-main);
    pointer-events: none;
}

/* Expand the native picker button to fill the entire input */
input[type="date"]::-webkit-calendar-picker-indicator,
input[type="time"]::-webkit-calendar-picker-indicator {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    margin: 0;
    padding: 0;
    opacity: 0;
    cursor: pointer;
    z-index: 2;
}