/* Корзина */
.cart-container {
    padding: 20px;
}

.delivery-card {
    background: var(--surface);
    border-radius: 14px;
    padding: 14px 16px;
    margin-bottom: 12px;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.2);
    border: 1px solid var(--border);
    display: flex;
    justify-content: space-between;
    align-items: center;
    animation: fadeIn 0.3s;
}

.delivery-info {
    display: flex;
    align-items: center;
    gap: 12px;
    flex: 1;
}

.delivery-icon {
    width: 24px;
    height: 24px;
    color: var(--primary);
    flex-shrink: 0;
}

.delivery-icon svg {
    width: 100%;
    height: 100%;
}

.delivery-text {
    flex: 1;
}

.delivery-title {
    font-weight: 600;
    font-size: 16px;
    margin-bottom: 4px;
}

.delivery-subtitle {
    font-size: 12px;
    color: var(--text-secondary);
}

.delivery-select-wrapper {
    position: relative;
    min-width: 180px;
}

.delivery-select {
    width: 100%;
    padding: 10px 40px 10px 16px;
    border: 1px solid var(--border);
    border-radius: 12px;
    background: var(--surface-elevated);
    color: var(--text);
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%23C084FC' d='M6 9L1 4h10z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 16px center;
}

.delivery-select:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(var(--primary-rgb, 147, 51, 234), 0.2), 0 0 15px rgba(var(--primary-rgb, 147, 51, 234), 0.1);
}

.delivery-select:hover {
    border-color: var(--primary);
}

.cart-item {
    background: var(--surface);
    border-radius: 14px;
    padding: 14px;
    margin-bottom: 12px;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.2);
    border: 1px solid var(--border);
    animation: fadeIn 0.3s;
    position: relative;
}

.cart-item-remove {
    position: absolute;
    top: 15px;
    right: 15px;
    width: 28px;
    height: 28px;
    border: none;
    background: var(--background);
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    color: var(--text-secondary);
    transition: all 0.2s;
}

.cart-item-remove:active {
    transform: scale(0.9);
    background: var(--error);
    color: white;
}

.cart-item-content {
    display: flex;
    gap: 15px;
}

.cart-item-image-wrap {
    width: 80px;
    height: 80px;
    flex-shrink: 0;
    border-radius: 12px;
    background: var(--background);
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
}

.cart-item-image {
    width: 100%;
    height: 100%;
    object-fit: contain;
    object-position: center;
}

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

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

.cart-item-details {
    font-size: 13px;
    color: var(--text-secondary);
    margin-bottom: 8px;
    line-height: 1.5;
}

.cart-item-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 10px;
}

.cart-item-price {
    font-size: 18px;
    font-weight: 700;
    color: var(--text);
}

.cart-quantity-control {
    display: flex;
    align-items: center;
    gap: 12px;
}

.cart-quantity-btn {
    width: 32px;
    height: 32px;
    border: 1px solid var(--border);
    background: var(--surface-elevated);
    color: var(--text);
    border-radius: 8px;
    font-size: 20px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
}

.cart-quantity-btn:active {
    transform: scale(0.9);
    background: var(--background);
}

.cart-quantity-value {
    font-size: 16px;
    font-weight: 600;
    min-width: 24px;
    text-align: center;
}

.order-summary {
    background: var(--surface);
    border-radius: 14px;
    padding: 18px;
    margin-top: 16px;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.2);
    border: 1px solid var(--border);
    animation: fadeIn 0.3s;
}

.cart-promo-block {
    margin-bottom: 14px;
}

.cart-promo-note {
    margin: 0 0 8px;
    font-size: 11px;
    line-height: 1.4;
    color: var(--text-secondary);
}

.cart-promo-field.checkout-promo-field {
    margin-bottom: 0;
}

.cart-promo-card.checkout-promo-card-applied {
    margin-bottom: 0;
}

.cart-promo-block .checkout-promo-error {
    margin-top: 8px;
}

.summary-row {
    display: flex;
    justify-content: space-between;
    margin-bottom: 12px;
    font-size: 14px;
}

.summary-row.discount {
    color: #ffc107;
    font-size: 13px;
}

.summary-row.discount span:last-child {
    font-weight: 600;
}

.referral-applied-banner {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 12px;
    margin-bottom: 12px;
    border-radius: 10px;
    background: rgba(255, 193, 7, 0.12);
    border: 1px solid rgba(255, 193, 7, 0.35);
    font-size: 13px;
    color: #ffc107;
    font-weight: 600;
}

.referral-applied-banner-warn {
    background: rgba(255, 90, 95, 0.08);
    border-color: rgba(255, 90, 95, 0.3);
    color: #ff8a8d;
    font-weight: 500;
}

.referral-applied-icon {
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: rgba(255, 193, 7, 0.25);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 11px;
    flex-shrink: 0;
}

.referral-applied-hint {
    font-size: 11px;
    color: var(--text-secondary);
    margin: -4px 0 12px;
    line-height: 1.4;
}

.summary-row.total {
    font-size: 18px;
    font-weight: 700;
    padding-top: 12px;
    border-top: 1px solid var(--border);
    margin-top: 12px;
    margin-bottom: 0;
}

.checkout-btn {
    width: 100%;
    padding: 16px;
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
    color: white;
    border: none;
    border-radius: 16px;
    font-size: 16px;
    font-weight: 700;
    margin-top: 20px;
    cursor: pointer;
    transition: all 0.3s;
    box-shadow: var(--neon-glow);
    border: 1px solid rgba(var(--primary-rgb, 147, 51, 234), 0.3);
}

.checkout-btn:hover {
    box-shadow: var(--neon-glow-strong);
    transform: translateY(-1px);
}

.checkout-btn:active {
    transform: scale(0.98);
    box-shadow: 0 2px 8px rgba(var(--primary-rgb, 147, 51, 234), 0.3);
}

.checkout-btn:disabled {
    opacity: 0.55;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

.cart-variant-alert {
    margin-bottom: 14px;
    padding: 12px 14px;
    border-radius: 14px;
    background: rgba(251, 191, 36, 0.12);
    border: 1px solid rgba(251, 191, 36, 0.28);
}

.cart-variant-alert-title {
    font-size: 14px;
    font-weight: 700;
    color: #fcd34d;
    margin-bottom: 4px;
}

.cart-variant-alert-text {
    font-size: 13px;
    color: rgba(253, 230, 138, 0.9);
    line-height: 1.4;
}

.cart-item-invalid {
    border-color: rgba(251, 191, 36, 0.45);
    box-shadow: inset 0 0 0 1px rgba(251, 191, 36, 0.2);
}

.cart-item-variant-missing {
    color: #fcd34d;
    font-weight: 600;
}

.cart-item-fix-btn {
    margin-top: 8px;
    padding: 8px 12px;
    border: none;
    border-radius: 10px;
    background: rgba(251, 191, 36, 0.16);
    color: #fde68a;
    font-size: 12px;
    font-weight: 700;
    cursor: pointer;
}

.cart-checkout-hint {
    margin-top: 10px;
    text-align: center;
    font-size: 12px;
    color: #fcd34d;
}
