/* ── Корзина ────────────────────────────────────────── */
.cart-counter { display: inline-flex; align-items: center; justify-content: center; font-weight: bold; }
.cart-counter--has { width: 20px; height: 20px; border-radius: 50%; font-size: 11px; line-height: 1; }

/* Toast-уведомление */
.cart-toast { position: fixed; bottom: -100px; left: 50%; transform: translateX(-50%); background-color: #333; color: white; padding: 16px 24px; border-radius: 4px; display: flex; align-items: center; gap: 12px; z-index: 1000; transition: bottom 0.3s ease; box-shadow: 0 4px 12px rgba(0,0,0,0.15); }
.cart-toast--visible { bottom: 20px; }
.cart-toast__link { color: var(--color-accent); text-decoration: none; font-weight: bold; white-space: nowrap; }
.cart-toast__link:hover { text-decoration: underline; }

/* Страница корзины */
.cart-page { padding: 40px 0; min-height: 60vh; }
.page-h1 { font-size: 32px; margin-bottom: 32px; font-weight: bold; }
.cart-wrapper { display: grid; grid-template-columns: 1fr 350px; gap: 32px; }
@media (max-width: 768px) { .cart-wrapper { grid-template-columns: 1fr; } }

/* Таблица */
.cart-table-wrap { background: white; border-radius: 8px; border: 1px solid #e0e0e0; overflow-x: auto; }
.cart-empty { padding: 40px 20px; text-align: center; color: #666; }
.cart-empty p { margin-bottom: 20px; font-size: 16px; }
.cart-table { width: 100%; border-collapse: collapse; }
.cart-table th, .cart-table td { padding: 16px; text-align: left; border-bottom: 1px solid #f0f0f0; }
.cart-table th { background-color: #f9f9f9; font-weight: bold; color: #333; font-size: 14px; }
.cart-table tbody tr:hover { background-color: #fafafa; }
.cart-td-name { font-weight: 500; }
.cart-td-price { white-space: nowrap; }
.cart-td-qty { white-space: nowrap; }
.cart-td-total { font-weight: bold; }
.cart-td-del { text-align: center; }
.cart-remove { background: none; border: none; color: #999; cursor: pointer; font-size: 18px; padding: 4px 8px; transition: color 0.2s; }
.cart-remove:hover { color: #d32f2f; }

/* Количество */
.qty-wrap { display: flex; align-items: center; border: 1px solid #ddd; border-radius: 4px; width: fit-content; }
.qty-btn { background: none; border: none; width: 32px; height: 32px; display: flex; align-items: center; justify-content: center; cursor: pointer; color: #666; transition: background-color 0.2s; }
.qty-btn:hover { background-color: #f0f0f0; }
.qty-input { border: none; width: 50px; text-align: center; font-size: 14px; padding: 0; }
.qty-input:focus { outline: none; }

/* Цена по запросу */
.price--request { color: #ff9800; font-weight: 500; }

/* Боковая колонка */
.cart-summary { background: white; border-radius: 8px; border: 1px solid #e0e0e0; padding: 20px; height: fit-content; position: sticky; top: 20px; }
.cart-summary__header { border-bottom: 1px solid #f0f0f0; padding-bottom: 12px; margin-bottom: 12px; }
.cart-summary__header h2 { font-size: 18px; margin: 0; }
.cart-summary__body { margin-bottom: 20px; }
.cart-summary__row { display: flex; justify-content: space-between; margin-bottom: 8px; font-size: 14px; }
.cart-summary__label { color: #666; }
.cart-summary__value { font-weight: bold; }
.cart-summary__footer { display: flex; flex-direction: column; gap: 8px; }

/* Кнопки */
.btn { display: inline-block; padding: 12px 16px; text-decoration: none; border-radius: 4px; border: none; cursor: pointer; font-size: 14px; font-weight: 500; transition: all 0.2s; text-align: center; }
.btn--primary { background-color: #2196f3; color: white; }
.btn--primary:hover { background-color: #1976d2; }
.btn--secondary { background-color: #f5f5f5; color: #333; border: 1px solid #ddd; }
.btn--secondary:hover { background-color: #e8e8e8; }
.btn--lg { padding: 14px 20px; font-size: 16px; width: 100%; }

/* Оформление заказа */
.checkout-page { padding: 40px 0; min-height: 60vh; }
.checkout-wrapper { display: grid; grid-template-columns: 1fr 350px; gap: 32px; }
@media (max-width: 768px) { .checkout-wrapper { grid-template-columns: 1fr; } }
.checkout-form { background: white; border-radius: 8px; border: 1px solid #e0e0e0; padding: 24px; }
.checkout-form fieldset { border: none; padding: 0 0 20px 0; margin: 0 0 20px 0; border-bottom: 1px solid #f0f0f0; }
.checkout-form fieldset:last-of-type { border-bottom: none; margin-bottom: 0; padding-bottom: 0; }
.checkout-form legend { font-weight: bold; font-size: 16px; margin-bottom: 16px; }
.form-group { margin-bottom: 16px; }
.form-group label { display: block; margin-bottom: 6px; font-weight: 500; font-size: 14px; }
.form-control { width: 100%; padding: 10px 12px; border: 1px solid #ddd; border-radius: 4px; font-size: 14px; font-family: inherit; }
.form-control:focus { outline: none; border-color: #2196f3; box-shadow: 0 0 0 2px rgba(33, 150, 243, 0.1); }
.form-checkbox { display: flex; align-items: flex-start; gap: 8px; }
.form-checkbox input[type="checkbox"] { margin-top: 4px; cursor: pointer; }
.form-checkbox label { margin: 0; font-weight: normal; }
.form-checkbox label a { color: #2196f3; text-decoration: none; }
.form-checkbox label a:hover { text-decoration: underline; }
.checkout-actions { display: flex; flex-direction: column; gap: 8px; margin-top: 24px; }
.checkout-summary { background: white; border-radius: 8px; border: 1px solid #e0e0e0; padding: 20px; height: fit-content; position: sticky; top: 20px; }
.checkout-summary h2 { font-size: 16px; margin-bottom: 16px; border-bottom: 1px solid #f0f0f0; padding-bottom: 12px; }
.checkout-items { margin-bottom: 16px; }
.checkout-item { display: flex; justify-content: space-between; font-size: 13px; margin-bottom: 8px; padding-bottom: 8px; border-bottom: 1px solid #f0f0f0; }
.checkout-item:last-child { border-bottom: none; }
.checkout-item-name { flex: 1; margin-right: 8px; }
.checkout-item-qty { white-space: nowrap; color: #999; }
.checkout-item-price { white-space: nowrap; font-weight: bold; }
.checkout-total { display: flex; justify-content: space-between; padding: 12px 0; border-top: 2px solid #f0f0f0; font-size: 16px; font-weight: bold; margin-bottom: 16px; }
.checkout-note { font-size: 12px; color: #999; margin: 0; }

/* Уведомления */
.alert { padding: 16px; border-radius: 4px; margin-bottom: 24px; }
.alert--error { background-color: #ffebee; color: #c62828; border: 1px solid #ef5350; }
.alert ul { margin: 0; padding-left: 20px; }
.alert li { margin-bottom: 4px; }

/* Страница успеха */
.order-success-page { padding: 40px 0; min-height: 60vh; }
.order-success { text-align: center; background: white; border-radius: 8px; border: 1px solid #e0e0e0; padding: 40px 20px; }
.order-success__icon { font-size: 64px; color: #4caf50; margin-bottom: 20px; }
.order-success__message { font-size: 16px; color: #666; margin-bottom: 32px; max-width: 600px; margin-left: auto; margin-right: auto; }
.order-details { background-color: #f9f9f9; padding: 20px; border-radius: 4px; margin: 32px 0; text-align: left; max-width: 600px; margin-left: auto; margin-right: auto; }
.order-detail-row { display: flex; justify-content: space-between; padding: 8px 0; border-bottom: 1px solid #e0e0e0; font-size: 14px; }
.order-detail-row:last-child { border-bottom: none; }
.order-detail-label { font-weight: bold; color: #666; }
.order-detail-value { text-align: right; font-weight: 500; }
.order-items { max-width: 600px; margin: 32px auto; text-align: left; }
.order-items h2 { font-size: 18px; margin-bottom: 16px; }
.order-items-list { list-style: none; padding: 0; margin: 0; }
.order-item { display: flex; justify-content: space-between; padding: 12px 0; border-bottom: 1px solid #f0f0f0; font-size: 14px; }
.order-item:last-child { border-bottom: none; }
.order-item-name { flex: 1; }
.order-item-qty { margin: 0 16px; color: #999; }
.order-item-price { font-weight: bold; text-align: right; min-width: 100px; }
.order-actions { display: flex; gap: 12px; justify-content: center; margin-top: 32px; }
@media (max-width: 480px) { .order-actions { flex-direction: column; } .order-actions .btn { width: 100%; } }
.order-error { text-align: center; padding: 40px 20px; }
.order-error p { color: #666; margin-bottom: 24px; }
