/* ============================================================
   checkout-guest.css — Guest checkout UI & checkout redesign
   ============================================================ */

/* ---- Variabile ---- */
:root {
    --co-accent:      #e8222a;
    --co-accent-dark: #c41c23;
    --co-cta:         #2563eb;
    --co-cta-dark:    #1a4fc4;
    --co-bg:          #f7f8fa;
    --co-card:        #ffffff;
    --co-border:      #e2e5ea;
    --co-text:        #1a1a2e;
    --co-muted:       #6b7280;
    --co-radius:      12px;
    --co-shadow:      0 2px 12px rgba(0,0,0,.08);
    --co-shadow-hover:0 6px 24px rgba(0,0,0,.14);
    --co-transition:  .2s ease;
}

/* ================================================================
   CHECKOUT GATE — selectorul dual din pagina coșului
   ================================================================ */
.checkout-gate {
    margin: 28px auto;
    max-width: 680px;
    padding: 0 12px;
}

.checkout-gate__heading {
    text-align: center;
    font-size: 18px;
    font-weight: 600;
    color: var(--co-text);
    margin-bottom: 20px;
}

.checkout-gate__cards {
    display: flex;
    gap: 16px;
    align-items: flex-start;
}

@media (max-width: 600px) {
    .checkout-gate__cards {
        flex-direction: column;
    }
}

.checkout-gate__card {
    flex: 1;
    background: var(--co-card);
    border: 2px solid var(--co-cta);
    border-radius: var(--co-radius);
    padding: 20px;
    cursor: pointer;
    transition: border-color var(--co-transition), box-shadow var(--co-transition);
}

.checkout-gate__card:hover {
    border-color: var(--co-cta-dark);
    box-shadow: var(--co-shadow-hover);
}

.checkout-gate__card--login {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.checkout-gate__card-header {
    display: flex;
    align-items: flex-start;
    gap: 14px;
    margin-bottom: 16px;
}

.checkout-gate__icon {
    font-size: 28px;
    line-height: 1;
    flex-shrink: 0;
}

.checkout-gate__title {
    font-size: 16px;
    font-weight: 700;
    color: var(--co-text);
    margin-bottom: 4px;
}

.checkout-gate__desc {
    font-size: 13px;
    color: var(--co-muted);
}

/* Câmpurile din cardul guest */
.checkout-gate__fields {
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.checkout-gate__field-wrap {
    position: relative;
}

.checkout-gate__input {
    width: 100%;
    padding: 12px 14px 10px;
    border: 1.5px solid var(--co-border);
    border-radius: 8px;
    font-size: 15px;
    color: var(--co-text);
    background: var(--co-bg);
    outline: none;
    transition: border-color var(--co-transition);
    box-sizing: border-box;
}

.checkout-gate__input:focus {
    border-color: var(--co-accent);
    background: #fff;
}

.checkout-gate__label {
    display: none; /* floating label — ascuns în gate, vizibil în formular */
}

.checkout-gate__field-error {
    font-size: 12px;
    color: var(--co-accent);
    min-height: 16px;
    display: block;
}

/* Butoane */
.checkout-gate__btn {
    width: 100%;
    padding: 13px 20px;
    border: none;
    border-radius: 8px;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: background var(--co-transition), transform .1s;
    margin-top: 4px;
}

.checkout-gate__btn:active {
    transform: scale(.98);
}

.checkout-gate__btn--primary {
    background: var(--co-cta);
    color: #fff;
}

.checkout-gate__btn--primary:hover {
    background: var(--co-cta-dark);
}

.checkout-gate__btn--secondary {
    background: transparent;
    color: var(--co-accent);
    border: 2px solid var(--co-accent);
    margin-top: 12px;
}

.checkout-gate__btn--secondary:hover {
    background: var(--co-accent);
    color: #fff;
}

/* Divider */
.checkout-gate__divider {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    padding: 0 4px;
}

.checkout-gate__divider span {
    font-size: 13px;
    color: var(--co-muted);
    background: #fff;
    padding: 4px 6px;
    border: 1px solid var(--co-border);
    border-radius: 50%;
}

@media (max-width: 600px) {
    .checkout-gate__divider {
        flex-direction: row;
        width: 100%;
    }
    .checkout-gate__divider::before,
    .checkout-gate__divider::after {
        content: '';
        flex: 1;
        height: 1px;
        background: var(--co-border);
        margin: 0 8px;
    }
}


/* ================================================================
   PROGRESS STEPPER
   ================================================================ */
.co-stepper {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px 16px 8px;
    gap: 0;
    max-width: 480px;
    margin: 0 auto;
}

.co-stepper__item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    flex-shrink: 0;
}

.co-stepper__num {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    border: 2px solid var(--co-border);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 13px;
    font-weight: 700;
    color: var(--co-muted);
    background: #fff;
    transition: all var(--co-transition);
}

.co-stepper__label {
    font-size: 11px;
    color: var(--co-muted);
    white-space: nowrap;
}

.co-stepper__item--done .co-stepper__num {
    background: #e6f7ee;
    border-color: #27ae60;
    color: #27ae60;
}

.co-stepper__item--active .co-stepper__num {
    background: var(--co-accent);
    border-color: var(--co-accent);
    color: #fff;
}

.co-stepper__item--active .co-stepper__label {
    color: var(--co-accent);
    font-weight: 600;
}

.co-stepper__line {
    flex: 1;
    height: 2px;
    background: var(--co-border);
    margin: 0 6px;
    margin-bottom: 18px;
}


/* ================================================================
   FORMULAR CHECKOUT (shopCartOrder)
   ================================================================ */

/* Banner oaspete */
.co-guest-banner {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    background: #fff8e1;
    border: 1px solid #ffe082;
    border-radius: 8px;
    padding: 12px 16px;
    font-size: 13px;
    color: #5d4037;
    margin-bottom: 20px;
}

.co-guest-banner__icon {
    font-size: 18px;
    flex-shrink: 0;
    margin-top: 1px;
}

.co-form {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.co-section {
    background: var(--co-card);
    border: 1px solid var(--co-border);
    border-radius: var(--co-radius);
    padding: 20px 24px;
    box-shadow: var(--co-shadow);
}

.co-section__title {
    font-size: 15px;
    font-weight: 700;
    color: var(--co-text);
    margin: 0 0 16px;
    padding-bottom: 10px;
    border-bottom: 1px solid var(--co-border);
}

.co-section__fields {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
}

@media (max-width: 600px) {
    .co-section__fields {
        grid-template-columns: 1fr;
    }
    .co-section {
        padding: 16px;
    }
}

/* Floating label */
.co-field-wrap {
    position: relative;
}

.co-field-wrap--full {
    grid-column: 1 / -1;
}

.co-input,
.co-select,
.co-textarea {
    width: 100%;
    padding: 20px 14px 8px;
    border: 1.5px solid var(--co-border);
    border-radius: 8px;
    font-size: 15px;
    color: var(--co-text);
    background: var(--co-bg);
    outline: none;
    transition: border-color var(--co-transition), background var(--co-transition);
    box-sizing: border-box;
    appearance: none;
}

.co-select {
    padding-top: 20px;
    padding-bottom: 8px;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath fill='%236b7280' d='M1 1l5 5 5-5'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 12px center;
    padding-right: 36px;
}

.co-textarea {
    resize: vertical;
    min-height: 80px;
}

.co-input:focus,
.co-select:focus,
.co-textarea:focus {
    border-color: var(--co-accent);
    background: #fff;
}

.co-label {
    position: absolute;
    left: 14px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 15px;
    color: var(--co-muted);
    pointer-events: none;
    transition: all .15s ease;
    background: transparent;
}

.co-label--select,
.co-label--textarea {
    top: 14px;
    transform: none;
    font-size: 11px;
    color: var(--co-muted);
}

/* Label flotantă: se ridică când câmpul e focusat sau completat */
.co-input:focus ~ .co-label,
.co-input--filled ~ .co-label,
.co-input:not(:placeholder-shown) ~ .co-label {
    top: 8px;
    transform: none;
    font-size: 11px;
    color: var(--co-accent);
}

.co-textarea:focus ~ .co-label--textarea,
.co-textarea:not(:placeholder-shown) ~ .co-label--textarea {
    color: var(--co-accent);
}

/* Opțiuni livrare (radio stilizat) */
.co-delivery-option {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px 16px;
    border: 1.5px solid var(--co-border);
    border-radius: 8px;
    cursor: pointer;
    margin-bottom: 10px;
    transition: border-color var(--co-transition), background var(--co-transition);
    font-size: 15px;
    font-weight: 500;
    color: var(--co-text);
    background: var(--co-bg);
}

.co-delivery-option input[type="radio"] {
    accent-color: var(--co-accent);
    width: 18px;
    height: 18px;
    flex-shrink: 0;
}

.co-delivery-option--active {
    border-color: var(--co-accent);
    background: #fff5f5;
}

.co-delivery-option__icon {
    font-size: 20px;
}

.co-delivery-detail {
    padding: 0 8px 10px 8px;
}


/* ================================================================
   PAGINA DE MULȚUMIRE — redesign complet
   ================================================================ */

.thanks-wrap {
    max-width: 600px;
    margin: 32px auto 56px;
    padding: 0 16px;
    display: flex;
    flex-direction: column;
    gap: 20px;
}

/* Hero */
.thanks-hero {
    text-align: center;
    background: var(--co-card);
    border: 1px solid var(--co-border);
    border-radius: var(--co-radius);
    padding: 40px 32px 32px;
    box-shadow: var(--co-shadow);
}

.thanks-hero__check {
    width: 64px;
    height: 64px;
    border-radius: 50%;
    background: #e6f7ee;
    border: 3px solid #27ae60;
    color: #27ae60;
    font-size: 28px;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 20px;
}

.thanks-hero__title {
    font-size: 22px;
    font-weight: 700;
    color: var(--co-text);
    margin: 0 0 10px;
}

.thanks-hero__sub {
    font-size: 15px;
    color: var(--co-muted);
    margin: 0 0 20px;
    line-height: 1.5;
}

.thanks-order-badge {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    background: #f7f8fa;
    border: 1px solid var(--co-border);
    border-radius: 8px;
    padding: 10px 20px;
    margin-bottom: 14px;
}

.thanks-order-badge__label {
    font-size: 12px;
    color: var(--co-muted);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: .05em;
}

.thanks-order-badge__num {
    font-size: 20px;
    font-weight: 700;
    color: var(--co-accent);
}

.thanks-email-note {
    font-size: 13px;
    color: var(--co-muted);
    margin: 0;
}

/* Ce urmează */
.thanks-next {
    background: var(--co-card);
    border: 1px solid var(--co-border);
    border-radius: var(--co-radius);
    padding: 24px 28px;
    box-shadow: var(--co-shadow);
}

.thanks-next__title {
    font-size: 15px;
    font-weight: 700;
    color: var(--co-text);
    margin: 0 0 18px;
    padding-bottom: 12px;
    border-bottom: 1px solid var(--co-border);
}

.thanks-next__steps {
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.thanks-next__step {
    display: flex;
    align-items: flex-start;
    gap: 14px;
    font-size: 14px;
    color: var(--co-text);
    line-height: 1.5;
}

.thanks-next__icon {
    font-size: 20px;
    flex-shrink: 0;
    margin-top: 1px;
}

.thanks-next__pending {
    font-size: 14px;
    color: var(--co-muted);
    margin: 0 0 14px;
    line-height: 1.5;
}

/* Buton continuare */
.thanks-actions {
    text-align: center;
}

.thanks-btn-home {
    display: inline-block;
    padding: 13px 36px;
    background: var(--co-accent);
    color: #fff;
    border-radius: 8px;
    font-size: 15px;
    font-weight: 600;
    text-decoration: none;
    transition: background var(--co-transition), transform .1s;
}

.thanks-btn-home:hover  { background: var(--co-accent-dark); color: #fff; text-decoration: none; }
.thanks-btn-home:active { transform: scale(.98); }

/* Hint înregistrare — discret */
.thanks-register-hint {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    background: #f7f8fa;
    border: 1px dashed var(--co-border);
    border-radius: 8px;
    padding: 14px 18px;
    flex-wrap: wrap;
}

.thanks-register-hint__text {
    font-size: 13px;
    color: var(--co-muted);
    line-height: 1.4;
    flex: 1;
    min-width: 160px;
}

.thanks-register-hint__btn {
    background: transparent;
    border: 1.5px solid var(--co-border);
    color: var(--co-muted);
    border-radius: 6px;
    padding: 7px 16px;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    white-space: nowrap;
    transition: border-color var(--co-transition), color var(--co-transition);
    flex-shrink: 0;
}

.thanks-register-hint__btn:hover {
    border-color: var(--co-accent);
    color: var(--co-accent);
}

@media (max-width: 480px) {
    .thanks-wrap { margin: 16px auto 40px; padding: 0 10px; }
    .thanks-hero { padding: 28px 18px 22px; }
    .thanks-hero__title { font-size: 18px; }
    .thanks-next { padding: 18px 16px; }
    .thanks-order-badge { padding: 8px 14px; }
    .thanks-order-badge__num { font-size: 17px; }
    .thanks-register-hint { flex-direction: column; align-items: flex-start; gap: 10px; }
}

/* ================================================================
   PAGINA DE MULȚUMIRE — card înregistrare guest (vechi, păstrat)
   ================================================================ */
.co-thanks-register {
    margin: 28px auto;
    max-width: 440px;
    background: linear-gradient(135deg, #fff5f5 0%, #fff 100%);
    border: 2px solid #fecaca;
    border-radius: var(--co-radius);
    padding: 28px 32px;
    text-align: center;
    box-shadow: var(--co-shadow);
}

.co-thanks-register__icon {
    font-size: 40px;
    margin-bottom: 12px;
}

.co-thanks-register__title {
    font-size: 17px;
    font-weight: 700;
    color: var(--co-text);
    margin: 0 0 16px;
}

.co-thanks-register__list {
    list-style: none;
    padding: 0;
    margin: 0 0 22px;
    text-align: left;
    display: inline-block;
}

.co-thanks-register__list li {
    font-size: 14px;
    color: var(--co-muted);
    padding: 4px 0;
}

.co-thanks-register__list li::before {
    color: #27ae60;
    font-weight: 700;
    margin-right: 6px;
}

.co-thanks-register__btn {
    background: var(--co-accent);
    color: #fff;
    border: none;
    border-radius: 8px;
    padding: 13px 32px;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: background var(--co-transition), transform .1s;
}

.co-thanks-register__btn:hover {
    background: var(--co-accent-dark);
}

.co-thanks-register__btn:active {
    transform: scale(.97);
}


/* ================================================================
   CART — layout 2 coloane
   ================================================================ */

.sc-layout {
    display: flex;
    gap: 28px;
    align-items: flex-start;
    padding-bottom: 48px;
}

.sc-main {
    flex: 2;
    min-width: 0;
}

.sc-sidebar {
    flex: 1;
    position: sticky;
    top: 16px;
    max-width: 320px;
    min-width: 260px;
    display: flex;
    flex-direction: column;
    gap: 14px;
}

@media (max-width: 860px) {
    .sc-layout {
        flex-direction: column;
    }
    .sc-sidebar {
        position: static;
        max-width: 100%;
        min-width: 0;
        width: 100%;
    }
}

/* Card generic sidebar */
.sc-card {
    background: var(--co-card);
    border: 1px solid var(--co-border);
    border-radius: var(--co-radius);
    padding: 18px 20px;
    box-shadow: var(--co-shadow);
}

.sc-card__title {
    font-size: 11px;
    font-weight: 700;
    color: var(--co-muted);
    text-transform: uppercase;
    letter-spacing: .07em;
    margin-bottom: 14px;
    padding-bottom: 10px;
    border-bottom: 1px solid var(--co-border);
}

/* Rânduri sumar */
.sc-sum-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 5px 0;
    font-size: 14px;
    color: var(--co-text);
}

.sc-sum-row--discount {
    color: #27ae60;
    font-size: 13px;
}

.sc-sum-row--grand {
    font-size: 17px;
    font-weight: 700;
    padding-top: 10px;
    margin-top: 6px;
    border-top: 2px solid var(--co-border);
}

.sc-sum-row__label { flex: 1; }
.sc-sum-row__value { font-weight: 600; white-space: nowrap; }
.sc-sum-row--grand .sc-sum-row__value { color: var(--co-accent); }

/* Buton checkout */
.sc-btn-checkout {
    width: 100%;
    padding: 15px 20px;
    background: var(--co-cta);
    color: #fff;
    border: none;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 700;
    cursor: pointer;
    transition: background var(--co-transition), transform .1s;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.sc-btn-checkout:hover  { background: var(--co-cta-dark); }
.sc-btn-checkout:active { transform: scale(.98); }
.sc-btn-checkout__arrow { font-size: 18px; }

/* Cashback */
.sc-cashback-amount {
    font-size: 24px;
    font-weight: 700;
    color: var(--co-accent);
    margin-bottom: 2px;
}

.sc-cashback-desc {
    font-size: 12px;
    color: var(--co-muted);
    margin-bottom: 12px;
}

.sc-cashback-check {
    display: flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
    font-size: 13px;
    color: var(--co-text);
}

.sc-cashback-check input[type="checkbox"] {
    width: 18px;
    height: 18px;
    accent-color: var(--co-accent);
    flex-shrink: 0;
    cursor: pointer;
}

/* Cashback promo (oaspeți) */
.sc-card--promo .sc-card__title { color: #d97706; }
.sc-promo-text {
    font-size: 13px;
    color: var(--co-muted);
    line-height: 1.5;
}

/* Card credit */
.sc-card--credit { padding: 12px 16px; }

/* Banner utilizator autentificat */
.sc-user-banner {
    display: flex;
    align-items: center;
    gap: 12px;
    background: #f0faf5;
    border: 1px solid #b7e4cc;
    border-radius: var(--co-radius);
    padding: 12px 16px;
    margin-bottom: 20px;
}

.sc-user-banner__icon { font-size: 24px; }

.sc-user-banner__name {
    font-size: 14px;
    font-weight: 600;
    color: var(--co-text);
}

.sc-user-banner__sub {
    font-size: 12px;
    color: var(--co-muted);
}

/* Secțiune gate autentificare */
.sc-gate-wrap {
    margin-bottom: 20px;
}

.sc-gate-wrap .checkout-gate {
    margin: 0;
    max-width: 100%;
}

/* Card lista produse */
.sc-products-card {
    background: var(--co-card);
    border: 1px solid var(--co-border);
    border-radius: var(--co-radius);
    box-shadow: var(--co-shadow);
    overflow: hidden;
}

.sc-section-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px 16px;
    border-bottom: 2px solid var(--co-border);
}

.sc-section-title {
    font-size: 15px;
    font-weight: 700;
    color: var(--co-text);
    margin: 0;
}

.sc-badge {
    background: var(--co-accent);
    color: #fff;
    border-radius: 12px;
    padding: 2px 10px;
    font-size: 12px;
    font-weight: 700;
}

/* Antet coloane */
.sc-items-header {
    display: flex;
    align-items: center;
    padding: 8px 16px;
    background: #f7f8fa;
    border-bottom: 1px solid var(--co-border);
    font-size: 11px;
    color: var(--co-muted);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: .05em;
    gap: 10px;
}

.sc-ih__img   { width: 56px; flex-shrink: 0; }
.sc-ih__title { flex: 1; }
.sc-ih__price { width: 72px; text-align: right; }
.sc-ih__qty   { width: 52px; text-align: center; }
.sc-ih__total { width: 80px; text-align: right; }
.sc-ih__del   { width: 36px; }

@media (max-width: 600px) {
    .sc-items-header { display: none; }
}

/* Lista produse — override table-row */
.sc-items-list .Content_ShopCart_ItemRow {
    display: flex !important;
    align-items: center;
    gap: 10px;
    padding: 10px 16px;
    border-bottom: 1px solid var(--co-border);
}

.sc-items-list .Content_ShopCart_ItemRow:last-child {
    border-bottom: none;
}

.sc-items-list .Content_ShopCart_CheckBlock {
    display: flex !important;
    flex-shrink: 0;
}

.sc-items-list .Content_ShopCart_GoodsIDBlock {
    display: none !important;
}

.sc-items-list .Content_ShopCart_ImageBlock {
    display: flex !important;
    width: 56px;
    height: 56px;
    flex-shrink: 0;
    align-items: center;
    justify-content: center;
    background: #f7f8fa;
    border-radius: 6px;
    overflow: hidden;
}

.sc-item__img {
    max-width: 54px;
    max-height: 54px;
    object-fit: contain;
}

.sc-items-list .Content_ShopCart_TitleBlock {
    display: flex !important;
    flex: 1;
    min-width: 0;
}

.sc-items-list .Content_ShopCart_TitleBlock a {
    font-size: 13px;
    line-height: 1.4;
    color: var(--co-text);
    text-decoration: none;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.sc-items-list .Content_ShopCart_TitleBlock a:hover {
    color: var(--co-accent);
}

.sc-items-list .Content_ShopCart_PriceBlock {
    display: flex !important;
    font-size: 12px;
    color: var(--co-muted);
    white-space: nowrap;
    flex-shrink: 0;
    width: 72px;
    justify-content: flex-end;
}

.sc-items-list .Content_ShopCart_QtyBlock {
    display: flex !important;
    flex-shrink: 0;
    width: 52px;
    justify-content: center;
}

.sc-items-list .Content_ShopCart_QtyBlock input {
    width: 48px;
    text-align: center;
    border: 1.5px solid var(--co-border);
    border-radius: 6px;
    padding: 4px 4px;
    font-size: 14px;
    font-weight: 600;
    outline: none;
    background: var(--co-bg);
}

.sc-items-list .Content_ShopCart_QtyBlock input:focus {
    border-color: var(--co-accent);
    background: #fff;
}

.sc-items-list .Content_ShopCart_TotalBlock {
    display: flex !important;
    font-size: 14px;
    font-weight: 700;
    color: var(--co-text);
    white-space: nowrap;
    flex-shrink: 0;
    width: 80px;
    justify-content: flex-end;
}

.sc-items-list .Content_ShopCart_RemoveBlock {
    display: flex !important;
    flex-shrink: 0;
    width: 36px;
    justify-content: center;
}

/* Cos gol */
.sc-empty {
    text-align: center;
    padding: 60px 20px;
    color: var(--co-muted);
}

.sc-empty i {
    font-size: 52px;
    display: block;
    margin-bottom: 16px;
    color: #dde0e6;
}

.sc-empty p {
    font-size: 16px;
    margin: 0;
}

/* Stări de eroare validare */
.co-input[error="1"],
.co-select[error="1"],
.co-textarea[error="1"] {
    border-color: var(--co-accent) !important;
    background: #fff5f5 !important;
}

.co-label[error="1"] {
    color: var(--co-accent) !important;
}

/* Mobile ≤540px: ascunde prețul unitar */
@media (max-width: 540px) {
    .sc-items-list .Content_ShopCart_PriceBlock { display: none !important; }
    .sc-items-list .Content_ShopCart_ItemRow { padding: 10px 10px; gap: 8px; }
}

/* Mobile ≤480px: layout grid 2 rânduri — evită overflow-ul orizontal */
@media (max-width: 480px) {
    .sc-items-list .Content_ShopCart_CheckBlock { display: none !important; }
    .sc-items-list .Content_ShopCart_PriceBlock  { display: none !important; }

    .sc-items-list .Content_ShopCart_ItemRow {
        display: grid !important;
        grid-template-columns: 48px 1fr auto;
        grid-template-rows: auto auto;
        column-gap: 8px;
        row-gap: 4px;
        padding: 10px 10px;
        align-items: center;
    }

    /* Imagine — span pe ambele rânduri */
    .sc-items-list .Content_ShopCart_ImageBlock {
        grid-column: 1;
        grid-row: 1 / 3;
        width: 48px !important;
        height: 48px !important;
        align-self: start;
    }
    .sc-item__img { max-width: 46px; max-height: 46px; }

    /* Titlu — rândul 1, coloana 2 */
    .sc-items-list .Content_ShopCart_TitleBlock {
        grid-column: 2;
        grid-row: 1;
    }
    .sc-items-list .Content_ShopCart_TitleBlock a {
        font-size: 12px;
        -webkit-line-clamp: 2;
    }

    /* Buton ştergere — rândul 1, coloana 3 */
    .sc-items-list .Content_ShopCart_RemoveBlock {
        grid-column: 3;
        grid-row: 1;
        width: 28px !important;
        align-self: start;
    }

    /* Cantitate — rândul 2, coloana 2 */
    .sc-items-list .Content_ShopCart_QtyBlock {
        grid-column: 2;
        grid-row: 2;
        width: 44px !important;
        justify-content: flex-start;
    }
    .sc-items-list .Content_ShopCart_QtyBlock input {
        width: 40px;
        font-size: 13px;
        padding: 3px 4px;
    }

    /* Total — rândul 2, coloana 3 */
    .sc-items-list .Content_ShopCart_TotalBlock {
        grid-column: 3;
        grid-row: 2;
        width: auto !important;
        font-size: 13px;
        justify-content: flex-end;
        white-space: nowrap;
    }
}

/* ============================================================
   Cart Popup (hover on cart icon, desktop only)
   ============================================================ */
.cart-popup-wrap {
    position: relative;
}

/* invisible bridge so popup doesn't close on gap between icon and panel */
.cart-popup-wrap::after {
    content: '';
    position: absolute;
    top: 100%;
    left: -16px;
    right: -16px;
    height: 10px;
    pointer-events: auto;
}

.cart-popup {
    display: none;
    position: absolute;
    top: calc(100% + 10px);
    right: -8px;
    width: 360px;
    background: #fff;
    border-radius: var(--co-radius, 12px);
    box-shadow: 0 4px 28px rgba(0,0,0,.16);
    border: 1px solid var(--co-border, #e2e5ea);
    z-index: 1060;
    pointer-events: auto;
}

/* small arrow */
.cart-popup::before {
    content: '';
    position: absolute;
    top: -7px;
    right: 24px;
    width: 14px;
    height: 14px;
    background: #fff;
    border-left: 1px solid var(--co-border, #e2e5ea);
    border-top: 1px solid var(--co-border, #e2e5ea);
    transform: rotate(45deg);
}

.cart-popup-wrap:hover .cart-popup,
.cart-popup-wrap:focus-within .cart-popup {
    display: block;
}

.cart-popup__header {
    padding: 12px 16px 10px;
    font-weight: 600;
    font-size: 13px;
    color: var(--co-text, #1a1a2e);
    border-bottom: 1px solid var(--co-border, #e2e5ea);
    letter-spacing: .01em;
}

.cart-popup__body {
    max-height: 290px;
    overflow-y: auto;
    overscroll-behavior: contain;
}

.cart-popup__item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 14px;
    transition: background .15s;
}

.cart-popup__item:hover {
    background: var(--co-bg, #f7f8fa);
}

.cart-popup__item-img {
    width: 46px;
    height: 46px;
    object-fit: contain;
    flex-shrink: 0;
    border-radius: 6px;
    border: 1px solid var(--co-border, #e2e5ea);
    background: #fff;
}

.cart-popup__item-info {
    flex: 1;
    min-width: 0;
}

.cart-popup__item-title {
    font-size: 12px;
    line-height: 1.35;
    color: var(--co-text, #1a1a2e);
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.cart-popup__item-meta {
    font-size: 11px;
    color: var(--co-muted, #6b7280);
    margin-top: 2px;
}

.cart-popup__item-total {
    font-size: 13px;
    font-weight: 600;
    color: var(--co-text, #1a1a2e);
    white-space: nowrap;
    flex-shrink: 0;
}

.cart-popup__empty {
    padding: 28px 16px;
    text-align: center;
    color: var(--co-muted, #6b7280);
    font-size: 13px;
}

.cart-popup__footer {
    padding: 10px 14px;
    border-top: 1px solid var(--co-border, #e2e5ea);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
}

.cart-popup__total {
    font-size: 14px;
    font-weight: 700;
    color: var(--co-text, #1a1a2e);
    white-space: nowrap;
}

.cart-popup__total span:first-child {
    font-weight: 400;
    color: var(--co-muted, #6b7280);
    margin-right: 4px;
}

.cart-popup__btn {
    display: inline-block;
    background: var(--co-cta, #2563eb);
    color: #fff !important;
    border-radius: 8px;
    padding: 7px 16px;
    font-size: 12px;
    font-weight: 600;
    text-decoration: none !important;
    transition: background .2s;
    white-space: nowrap;
    flex-shrink: 0;
}

.cart-popup__btn:hover {
    background: var(--co-cta-dark, #1a4fc4);
}

/* hide popup on mobile/tablet — cart goes to full cart page directly */
@media (max-width: 991px) {
    .cart-popup { display: none !important; }
}
