/* =============================================================================
 * VIKEO — Кастомная корзина (cart.css)
 * Двухколоночная сетка на desktop, одна колонка на mobile.
 * ============================================================================= */

.vikeo-cart {
    padding: 8px 0 80px;
    width:   100%;
}
/* Контейнер корзины — без собственной max-width, наследует ширину родительского main (1440px) */
.vikeo-cart__container {
    width: 100%;
}
.vikeo-cart__title {
    font-size:   24px;
    font-weight: 700;
    color:       #111827;
    margin:      0 0 20px;
}
.vikeo-cart__counter {
    color:       #6b7280;
    font-weight: 500;
    font-size:   16px;
    margin-left: 8px;
}

/* Сетка: 1 колонка на mobile, 2 колонки на desktop */
.vikeo-cart__grid {
    display:               grid;
    grid-template-columns: 1fr;
    gap:                   20px;
}

/* Список позиций */
.vikeo-cart__items {
    list-style: none;
    margin:     0;
    padding:    0;
    display:    flex;
    flex-direction: column;
    gap:        12px;
}
.vikeo-cart__item {
    display:                grid;
    grid-template-columns:  72px 1fr auto;
    grid-template-areas:
        "thumb info  remove"
        "thumb qty   total";
    gap:                    8px 12px;
    align-items:            center;
    background:             #ffffff;
    border:                 1px solid #e5e7eb;
    border-radius:          16px;
    padding:                12px;
}
.vikeo-cart__item-thumb {
    grid-area:     thumb;
    width:         72px;
    height:        72px;
    border-radius: 12px;
    overflow:      hidden;
    background:    #f3f4f6;
    display:       block;
}
.vikeo-cart__item-thumb img {
    width: 100%; height: 100%; object-fit: cover; display: block;
}
.vikeo-cart__item-info {
    grid-area: info;
    min-width: 0;
}
.vikeo-cart__item-name {
    display:         block;
    font-size:       14px;
    font-weight:     500;
    color:           #111827;
    text-decoration: none;
    line-height:     1.3;
    overflow:        hidden;
    display:         -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}
.vikeo-cart__item-name:hover { color: #e12028; }
.vikeo-cart__item-price {
    color:     #6b7280;
    font-size: 13px;
    margin-top: 2px;
}
/* Плашка доставки в стиле кнопки каталога (.product-card__cart-btn) */
.vikeo-cart__item-delivery {
    display:         inline-flex;
    align-items:     center;
    gap:             6px;
    margin-top:      8px;
    padding:         6px 12px;
    background:      var(--pg-btn-bg, #7b2cf5);
    color:           #ffffff;
    font-size:       12px;
    font-weight:     600;
    border-radius:   9999px;
    width:           fit-content;
}
.vikeo-cart__item-delivery svg { flex-shrink: 0; stroke-width: 2.2; }

/* Контроль количества */
.vikeo-cart__item-qty {
    grid-area:     qty;
    display:       inline-flex;
    align-items:   center;
    gap:           4px;
    background:    #f3f4f6;
    border-radius: 9999px;
    padding:       4px;
    width:         fit-content;
}
.vikeo-cart__qty-btn {
    width:         28px;
    height:        28px;
    border:        none;
    background:    #ffffff;
    color:         #111827;
    font-size:     16px;
    font-weight:   600;
    border-radius: 9999px;
    cursor:        pointer;
    line-height:   1;
    transition:    background-color .15s;
}
.vikeo-cart__qty-btn:hover:not(:disabled) { background: #e5e7eb; }
.vikeo-cart__qty-btn:disabled { opacity: .4; cursor: not-allowed; }
.vikeo-cart__qty-input {
    width:           40px;
    height:          28px;
    border:          none;
    background:      transparent;
    text-align:      center;
    font-size:       14px;
    font-weight:     600;
    color:           #111827;
    -moz-appearance: textfield;
}
.vikeo-cart__qty-input::-webkit-outer-spin-button,
.vikeo-cart__qty-input::-webkit-inner-spin-button {
    -webkit-appearance: none; margin: 0;
}

/* Сумма строки */
.vikeo-cart__item-total {
    grid-area:    total;
    font-size:    16px;
    font-weight:  700;
    color:        #111827;
    text-align:   right;
    white-space:  nowrap;
}

/* Кнопка удаления */
.vikeo-cart__item-remove {
    grid-area:        remove;
    width:            32px;
    height:           32px;
    border:           none;
    background:       transparent;
    color:            #9ca3af;
    cursor:           pointer;
    border-radius:    9999px;
    display:          inline-flex;
    align-items:      center;
    justify-content:  center;
    transition:       color .15s, background-color .15s;
}
.vikeo-cart__item-remove:hover { color: #e12028; background: #fee2e2; }

/* Пустое состояние — без рамки/фона, иконка + заголовок + подзаголовок + красная кнопка */
.vikeo-cart__empty {
    list-style:      none;
    display:         flex;
    flex-direction:  column;
    align-items:     center;
    justify-content: center;
    padding:         48px 16px 32px;
    text-align:      center;
}
.vikeo-cart__empty-icon {
    width: 96px; height: 96px;
    display: flex; align-items: center; justify-content: center;
    margin-bottom: 16px;
}
.vikeo-cart__empty-icon svg { width: 100%; height: 100%; display: block; }
.vikeo-cart__empty-title {
    margin:      0 0 6px;
    color:       #111827;
    font-size:   18px;
    font-weight: 700;
}
.vikeo-cart__empty-text {
    margin:    0 0 20px;
    color:     #9ca3af;
    font-size: 15px;
    line-height: 1.4;
}
.vikeo-cart__empty-btn {
    display:         inline-flex;
    align-items:     center;
    justify-content: center;
    height:          44px;
    padding:         0 28px;
    background:      #e12028;
    color:           #ffffff;
    font-weight:     600;
    font-size:       15px;
    border:          0;
    border-radius:   9999px;
    cursor:          pointer;
    text-decoration: none;
    transition:      background-color .15s, transform .1s;
    -webkit-tap-highlight-color: transparent;
}
.vikeo-cart__empty-btn:hover  { background: #c81b22; }
.vikeo-cart__empty-btn:active { transform: scale(.98); }
@media (min-width: 768px) {
    .vikeo-cart__empty       { padding: 64px 16px 48px; }
    .vikeo-cart__empty-title { font-size: 20px; }
}

/* ── Сайдбар итогов ─────────────────────────────────────────────────── */
.vikeo-cart__totals {
    background:    #ffffff;
    border:        1px solid #e5e7eb;
    border-radius: 16px;
    padding:       20px;
    display:       flex;
    flex-direction: column;
    gap:           12px;
}
.vikeo-cart__totals-title {
    font-size:   16px;
    font-weight: 700;
    color:       #111827;
    margin:      0 0 4px;
}
.vikeo-cart__totals-row {
    display:         flex;
    justify-content: space-between;
    align-items:     baseline;
    font-size:       14px;
    color:           #6b7280;
}
.vikeo-cart__totals-row--final {
    border-top:    1px solid #e5e7eb;
    padding-top:   12px;
    margin-top:    4px;
    font-size:     18px;
    color:         #111827;
    font-weight:   700;
}
.vikeo-cart__totals-value { font-weight: 600; color: #111827; }
.vikeo-cart__totals-row--final .vikeo-cart__totals-value { font-weight: 700; }
.vikeo-cart__checkout-btn {
    display:         inline-flex;
    align-items:     center;
    justify-content: center;
    height:          48px;
    background:      #e12028;
    color:           #ffffff;
    font-weight:     600;
    font-size:       15px;
    border-radius:   9999px;
    text-decoration: none;
    transition:      background-color .15s;
    margin-top:      8px;
}
.vikeo-cart__checkout-btn:hover { background: #c81b22; }

/* Desktop: 2 колонки, sticky сайдбар */
@media (min-width: 1024px) {
    .vikeo-cart                { padding: 16px 0 80px; }
    .vikeo-cart__title         { font-size: 28px; margin-bottom: 24px; }
    .vikeo-cart__grid          { grid-template-columns: 1fr 360px; gap: 32px; align-items: start; }
    .vikeo-cart__item          {
        grid-template-columns: 96px 1fr 140px 120px 32px;
        grid-template-areas:   "thumb info qty total remove";
        padding:               16px;
    }
    .vikeo-cart__item-thumb    { width: 96px; height: 96px; }
    .vikeo-cart__item-name     { font-size: 15px; }
    .vikeo-cart__totals        { position: sticky; top: 16px; }
}
