/* ===== БАЗОВЫЕ НАСТРОЙКИ ===== */
* {
    box-sizing: border-box;
}

body {
    font-family: 'Arial', sans-serif;
    margin: 0;
    padding: 0;
    background-color: #f8f9fa;
    color: #333;
    font-size: 16px;
    line-height: 1.5;
}

/* ===== HEADER ===== */
.header {
    background-color: #007bff;
    color: white;
    padding: 15px;
    position: relative;
}

.logo {
    max-width: 200px;
    height: auto;
    margin: 0 auto ё;
    margin-right: 12px;
    background: #fff;
    border-radius: 15px;
    margin-top: 12px;
}

.header .banner {
    width: 100%;
    max-width: 600px;
    height: auto;
    margin: 0px auto;
}

.header .cart-link {
    color: white;
    text-decoration: none;
    position: static;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: rgba(255,255,255,0.2);
    padding: 10px 16px;
    border-radius: 5px;
    font-size: 16px;
    margin-top: 10px;
    transition: 0.3s all ease;
}

.header .cart-link:hover {
    background: #0056b3;
}

.header i.fas.fa-shopping-cart {
    font-size: 20px;
    padding-right: 0;
}

/* ===== PRODUCT GRID ===== */
.product-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
    gap: 15px;
    padding: 15px;
}

.product-card {
    background: white;
    border: 1px solid #ddd;
    border-radius: 8px;
    padding: 12px;
    text-align: center;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
    transition: 0.3s all ease;
    display: flex;
    flex-direction: column;
    min-height: 320px; /* Фиксированная высота для одинакового размера */
    justify-content: space-between; /* Распределение элементов по вертикали */
}

.product-card:hover {
    background: #fdfeeb;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}

.product-card img {
    width: 100%;
    height: 150px;
    object-fit: cover;
    border-radius: 5px;
    margin-bottom: 10px;
}

.product-card h3 {
    margin: 8px 0;
    font-size: 1.1em;
    line-height: 1.3;
    flex-grow: 1;
}

.product-card p {
    font-size: 1.2em;
    font-weight: bold;
    color: #007bff;
    margin: 5px 0;
}

/* ===== PRODUCT ACTIONS (QUANTITY & BUTTON) ===== */
.product-actions {
    display: flex;
    gap: 8px;
    width: 100%;
    margin-top: 8px;
}

.quantity-control {
    width: 100%;
    margin: 0;
}

.quantity-control label {
    display: block;
    text-align: left;
    font-size: 14px;
    margin-bottom: 4px;
    width: 100%;
}

.quantity-control input {
    width: 100%;
    padding: 8px 12px;
    font-size: 16px;
    border: 1px solid #ced4da;
    border-radius: 4px;
    height: auto;
}

/* ===== BUTTONS ===== */
.product-card button,
.btn,
#place-order {
    background-color: #28a745;
    color: white;
    border: none;
    padding: 10px 16px;
    border-radius: 5px;
    cursor: pointer;
    font-size: 22px;
    transition: 0.3s all ease;
    width: 100%;
    min-height: 44px;
}

.product-card button:hover,
.btn:hover,
#place-order:hover {
    background-color: #218838;
}

button#calc-shipping,
#place-order {
    width: auto;
    margin: 10px auto !important;
    padding: 14px;
    font-size: 16px;
    float: right;
    font-size: 21px;
}

/* ===== CHECKOUT ===== */
.checkout-container {
    display: flex;
    flex-wrap: wrap;
    max-width: 97%;
    margin: 15px auto;
    background: white;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.order-summary {
    flex: 1;
    min-width: 280px;
    padding: 15px;
    background-color: #f8f9fa;
    border-right: 1px solid #dee2e6;
}

.order-summary ul {
    list-style: none;
    padding: 0;
    margin: 0;
    display: table;
    width: 100%;
}

.order-summary li {
    padding: 10px 0;
    border-bottom: 1px dashed #dee2e6;
    font-size: 14px;
}

#checkoutForm {
    flex: 2;
    min-width: 300px;
    padding: 15px;
}

#checkoutForm input:not([type="checkbox"]):not([type="radio"]),
#checkoutForm select,
#checkoutForm textarea {
    width: 100%;
    padding: 12px;
    margin: 6px 0;
    border: 1px solid #ced4da;
    border-radius: 4px;
    font-size: 16px;
    min-height: 44px;
}

#checkoutForm h3 {
    margin: 15px 0 10px;
    color: #007bff;
    font-size: 1.3em;
}

/* ===== CART & UTILS ===== */
button.remove-item {
    float: right;
    background: #92121e;
    color: #fff;
    padding: 6px 12px;
    border: none;
    border-radius: 6px;
    font-size: 17px;
    min-height: 36px;
}

#order-result {
    margin-top: 0px;
    padding: 0px;
    border-radius: 5px;
    width: 100%;
    margin-bottom: 0px;
    font-size: 14px;
}

.success, .error, .info {
    padding: 12px 15px;
    border-radius: 5px;
    margin: 10px 0;
}

.success { background-color: #d4edda; color: #155724; border: 1px solid #c3e6cb; }
.error { background-color: #f8d7da; color: #721c24; border: 1px solid #f5c6cb; }
.info { background-color: #d1ecf1; color: #0c5460; border: 1px solid #bee5eb; }

/* ===== LOADING ANIMATION ===== */
#calc-shipping.loading,
#place-order.loading {
    background: linear-gradient(45deg, #4facfe, #ffd000, #4facfe);
    background-size: 200% 200%;
    animation: gradient 2s ease infinite;
    color: white;
    border: none;
    cursor: wait;
    opacity: 1;
    font-size: 22px;
}

@keyframes gradient {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

/* ===== EMPTY CART ===== */
#empty-cart-message {
    background-color: #f8f9fa;
    padding: 25px 15px;
    border-radius: 8px;
    text-align: center;
    margin: 20px;
}

#empty-cart-message a {
    color: #007bff;
    text-decoration: none;
    font-weight: bold;
}

/* ===== MEDIA QUERIES ===== */

/* 📱 Mobile: до 768px */
@media (max-width: 768px) {
    .header {
        padding: 12px;
    }
    
    .header img[src*="logo"] {
        max-width: 180px;
    }
    
    .header .banner {
        max-width: 100%;
        height: auto;
    }
    
    .product-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 12px;
        padding: 10px;
    }
    
    .product-card img {
        height: 120px;
    }
    
    .product-card h3 {
        font-size: 0.95em;
    }
    
    .checkout-container {
        flex-direction: column;
        margin: 10px;
    }
    
    .order-summary {
        border-right: none;
        border-bottom: 1px solid #dee2e6;
    }
    
    #checkoutForm {
        min-width: 100%;
    }
}

/* 📱 Small Mobile: до 480px */
@media (max-width: 480px) {
    body {
        font-size: 15px;
    }
    
    .header {
        padding: 10px;
    }
    
    .header img[src*="logo"] {
        max-width: 150px;
    }
    
    .header .cart-link {
        font-size: 14px;
        padding: 8px 12px;
        width: 100%;
        justify-content: center;
    }
    
    .product-grid {
        grid-template-columns: 1fr;
        padding: 8px;
    }
    
    .product-card {
        padding: 10px;
    }
    
    .product-card img {
        height: 180px;
    }
    
    .product-card h3 {
        font-size: 1.1em;
    }
    
    .product-card p {
        font-size: 1.3em;
    }
    
    .quantity-control input,
    #checkoutForm input:not([type="checkbox"]):not([type="radio"]),
    button {
        font-size: 16px;
        padding: 12px;
        min-height: 48px;
    }
    
    button.remove-item {
        width: 100%;
        float: none;
        margin-top: 5px;
    }
    
    .order-summary,
    #checkoutForm {
        padding: 12px;
    }
    
    #order-result {
        font-size: 13px;
        padding: 10px;
    }
    
    /* Вертикальное расположение на маленьких экранах */
    .product-actions {
        flex-direction: column;
    }
    
    .quantity-control,
    .product-card button {
        width: 100%;
        flex: none;
    }
}

/* 🖥️ Desktop: от 1024px */
@media (min-width: 1024px) {
    .product-grid {
        grid-template-columns: repeat(4, 1fr);
        padding: 25px;
        gap: 20px;
    }
    
    .product-card img {
        height: 200px;
    }
    
    .header {
        padding: 6px;
    }
    
    .header .cart-link {
        position: absolute;
        right: 20px;
        top: 20px;
        margin-top: 0;
        font-size: 23px;
    }
}

/* ♿ Accessibility: focus states */
button:focus,
input:focus,
a:focus {
    outline: 2px solid #007bff;
    outline-offset: 2px;
}

/* ===== ОБНОВЛЕННЫЕ СТИЛИ ДЛЯ ПОЛЯ КОЛИЧЕСТВА И КНОПКИ ===== */
/* Основные стили для нижней части карточки */
.product-actions {
    display: flex;
    gap: 8px;
    width: 100%;
    margin-top: 8px;
}

.quantity-control,
.product-card button {
    flex: 1;
    width: 100%;
}


.success a {
    text-decoration: none;
    float: right;
    width: auto;
}

.success {
    display: table;
    width: 100%;
}

.subtotal, .total{
    display : none;
}

.header h1 {
    display: block;
    margin: 16px;
    font-weight: 100;
}

img.logo {
    float: left;
}

div#shipping-breakdown {
    overflow-y: scroll;
    max-height: 39vh;
    width: 100%;
}

form#checkoutForm {
    max-width: 50%;
}

i.fa-solid.fa-circle-minus {
    margin-right: 6px;
}

/* 1. Базовый сброс, чтобы padding не ломал ширину */
* {
    box-sizing: border-box;
}

/* 2. Контейнер формы */
#checkoutForm {
    display: flex;
    flex-wrap: wrap; /* Разрешает элементам переноситься на новую строку */
    gap: 20px;       /* Отступ между колонками и сообщением */
    max-width: 1200px;
    margin: 0 auto;
}

/* 3. Сообщение о пустой корзине (всегда 100%) */
#empty-cart-message {
    width: 100%;
    background: #f8d7da;
    color: #721c24;
    padding: 15px;
    border-radius: 5px;
    margin-bottom: 10px;
}

/* 4. Колонки (Desktop: по 50%) */
.col2 {
    width: calc(50% - 15px);      /* Занимают половину экрана */
    display: flex;
    flex-direction: row-reverse; /* Выстраиваем инпуты внутри колонки вертикально */
    gap: 15px;       /* Отступ между полями ввода */
    align-content: center;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-evenly;
}

/* 5. Стили для полей ввода */
.col2 input, 
.col2 h3 {
    width: 100%;     /* Инпуты растягиваются на всю ширину колонки */
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 16px;
}

.col2 h3 {
    margin: 0 0 10px 0;
    padding: 0;
    border: none;
    font-size: 1.2rem;
}

a.cart-link.cart-log {
    margin-right: 269px;
}
 
/* 6. Адаптивность (Mobile: 100%) */
@media (max-width: 768px) {
    .col2 {
        width: 100%; /* На узких экранах колонки становятся во всю ширину */
    }
}

a.cart-link.cart-rate {
    right: 412px;
}

/* ===== БАЗОВЫЕ НАСТРОЙКИ ===== */
* {
    box-sizing: border-box;
}

body {
    font-family: 'Arial', sans-serif;
    margin: 0;
    padding: 0;
    background-color: #f8f9fa;
    color: #333;
    font-size: 16px;
    line-height: 1.5;
}

/* ===== HEADER ===== */
.header {
    background-color: #007bff;
    color: white;
    padding: 15px;
    position: relative;
}

.logo {
    max-width: 200px;
    height: auto;
    margin: 0 auto;
    margin-right: 12px;
    background: #fff;
    padding: 5px 11px;
    border-radius: 15px;
    margin-top: 12px;
}

.header .banner {
    width: 100%;
    max-width: 600px;
    height: auto;
    margin: 0px auto;
}

.header .cart-link {
    color: white;
    text-decoration: none;
    position: static;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: rgba(255,255,255,0.2);
    padding: 10px 16px;
    border-radius: 5px;
    font-size: 16px;
    margin-top: 10px;
    transition: 0.3s all ease;
}

.header .cart-link:hover {
    background: #0056b3;
}

.header i.fas.fa-shopping-cart {
    font-size: 20px;
    padding-right: 0;
}

/* ===== PRODUCT GRID ===== */
.product-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
    gap: 15px;
    padding: 15px;
}

.product-card {
    background: white;
    border: 1px solid #ddd;
    border-radius: 8px;
    padding: 12px;
    text-align: center;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
    transition: 0.3s all ease;
    display: flex;
    flex-direction: column;
    min-height: 320px;
    justify-content: space-between;
}

.product-card:hover {
    background: #fdfeeb;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}

.product-card img {
    width: 100%;
    height: 150px;
    object-fit: cover;
    border-radius: 5px;
    margin-bottom: 10px;
}

.product-card h3 {
    margin: 8px 0;
    font-size: 1.1em;
    line-height: 1.3;
    flex-grow: 1;
}

.product-card p {
    font-size: 1.2em;
    font-weight: bold;
    color: #007bff;
    margin: 5px 0;
}

/* ===== PRODUCT ACTIONS (QUANTITY & BUTTON) ===== */
.product-actions {
    display: flex;
    gap: 8px;
    width: 100%;
    margin-top: 8px;
}

.quantity-control {
    width: 100%;
    margin: 0;
}

.quantity-control label {
    display: block;
    text-align: left;
    font-size: 14px;
    margin-bottom: 4px;
    width: 100%;
}

.quantity-control input {
    width: 100%;
    padding: 8px 12px;
    font-size: 16px;
    border: 1px solid #ced4da;
    border-radius: 4px;
    height: auto;
}

/* ===== BUTTONS ===== */
.product-card button,
.btn,
#place-order {
    background-color: #28a745;
    color: white;
    border: none;
    padding: 10px 16px;
    border-radius: 5px;
    cursor: pointer;
    font-size: 22px;
    transition: 0.3s all ease;
    width: 100%;
    min-height: 44px;
}

.product-card button:hover,
.btn:hover,
#place-order:hover {
    background-color: #218838;
}

button#calc-shipping,
#place-order {
    width: auto;
    margin: 10px auto !important;
    padding: 14px;
    font-size: 16px;
    float: right;
    font-size: 21px;
}

/* ===== CHECKOUT ===== */
.checkout-container {
    display: flex;
    flex-wrap: wrap;
    max-width: 97%;
    margin: 15px auto;
    background: white;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.order-summary {
    flex: 1;
    min-width: 280px;
    padding: 15px;
    background-color: #f8f9fa;
    border-right: 1px solid #dee2e6;
}

.order-summary ul {
    list-style: none;
    padding: 0;
    margin: 0;
    display: table;
    width: 100%;
}

.order-summary li {
    padding: 10px 0;
    border-bottom: 1px dashed #dee2e6;
    font-size: 14px;
}

#checkoutForm {
    flex: 2;
    min-width: 300px;
    padding: 15px;
}

#checkoutForm input:not([type="checkbox"]):not([type="radio"]),
#checkoutForm select,
#checkoutForm textarea {
    width: 100%;
    padding: 12px;
    margin: 6px 0;
    border: 1px solid #ced4da;
    border-radius: 4px;
    font-size: 16px;
    min-height: 44px;
}

#checkoutForm h3 {
    margin: 15px 0 10px;
    color: #007bff;
    font-size: 1.3em;
}

/* ===== CART & UTILS ===== */
button.remove-item {
    float: right;
    background: #92121e;
    color: #fff;
    padding: 6px 12px;
    border: none;
    border-radius: 6px;
    font-size: 17px;
    min-height: 36px;
}

#order-result {
    margin-top: 0px;
    padding: 0px;
    border-radius: 5px;
    width: 100%;
    margin-bottom: 0px;
    font-size: 14px;
}

.success, .error, .info {
    padding: 12px 15px;
    border-radius: 5px;
    margin: 10px 0;
}

.success { background-color: #d4edda; color: #155724; border: 1px solid #c3e6cb; }
.error { background-color: #f8d7da; color: #721c24; border: 1px solid #f5c6cb; }
.info { background-color: #d1ecf1; color: #0c5460; border: 1px solid #bee5eb; }

/* ===== LOADING ANIMATION ===== */
#calc-shipping.loading,
#place-order.loading {
    background: linear-gradient(45deg, #4facfe, #ffd000, #4facfe);
    background-size: 200% 200%;
    animation: gradient 2s ease infinite;
    color: white;
    border: none;
    cursor: wait;
    opacity: 1;
    font-size: 22px;
}

@keyframes gradient {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

/* ===== EMPTY CART ===== */
#empty-cart-message {
    background-color: #f8f9fa;
    padding: 25px 15px;
    border-radius: 8px;
    text-align: center;
    margin: 20px;
}

#empty-cart-message a {
    color: #007bff;
    text-decoration: none;
    font-weight: bold;
}

/* ===== MEDIA QUERIES ===== */

/* 📱 Mobile: до 768px */
@media (max-width: 768px) {
    .header {
        padding: 12px;
    }
    
    .header img[src*="logo"] {
        max-width: 180px;
    }
    
    .header .banner {
        max-width: 100%;
        height: auto;
    }
    
    .product-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 12px;
        padding: 10px;
    }
    
    .product-card img {
        height: 120px;
    }
    
    .product-card h3 {
        font-size: 0.95em;
    }
    
    .checkout-container {
        flex-direction: column;
        margin: 10px;
    }
    
    .order-summary {
        border-right: none;
        border-bottom: 1px solid #dee2e6;
    }
    
    #checkoutForm {
        min-width: 100%;
    }
}

/* 📱 Small Mobile: до 480px */
@media (max-width: 480px) {
    body {
        font-size: 15px;
    }
    
    .header {
        padding: 10px;
    }
    
    .header img[src*="logo"] {
        max-width: 150px;
    }
    
    .header .cart-link {
        font-size: 14px;
        padding: 8px 12px;
        width: 100%;
        justify-content: center;
    }
    
    .product-grid {
        grid-template-columns: 1fr;
        padding: 8px;
    }
    
    .product-card {
        padding: 10px;
    }
    
    .product-card img {
        height: 180px;
    }
    
    .product-card h3 {
        font-size: 1.1em;
    }
    
    .product-card p {
        font-size: 1.3em;
    }
    
    .quantity-control input,
    #checkoutForm input:not([type="checkbox"]):not([type="radio"]),
    button {
        font-size: 16px;
        padding: 12px;
        min-height: 48px;
    }
    
    button.remove-item {
        width: 100%;
        float: none;
        margin-top: 5px;
    }
    
    .order-summary,
    #checkoutForm {
        padding: 12px;
    }
    
    #order-result {
        font-size: 13px;
        padding: 10px;
    }
    
    /* Вертикальное расположение на маленьких экранах */
    .product-actions {
        flex-direction: column;
    }
    
    .quantity-control,
    .product-card button {
        width: 100%;
        flex: none;
    }
}

/* 🖥️ Desktop: от 1024px */
@media (min-width: 1024px) {
    .product-grid {
        grid-template-columns: repeat(4, 1fr);
        padding: 25px;
        gap: 20px;
    }
    
    .product-card img {
        height: 200px;
    }
    
    .header {
        padding: 6px;
    }
    
    .header .cart-link {
        position: absolute;
        right: 20px;
        top: 20px;
        margin-top: 0;
        font-size: 23px;
    }
}

/* ♿ Accessibility: focus states */
button:focus,
input:focus,
a:focus {
    outline: 2px solid #007bff;
    outline-offset: 2px;
}

/* ===== ОБНОВЛЕННЫЕ СТИЛИ ДЛЯ ПОЛЯ КОЛИЧЕСТВА И КНОПКИ ===== */
/* Основные стили для нижней части карточки */
.product-actions {
    display: flex;
    gap: 8px;
    width: 100%;
    margin-top: 8px;
}

.quantity-control,
.product-card button {
    flex: 1;
    width: 100%;
}


.success a {
    text-decoration: none;
    float: right;
    width: auto;
}

.success {
    display: table;
    width: 100%;
}

.subtotal, .total{
    display : none;
}

.header h1 {
    display: block;
    margin: 16px;
    font-weight: 100;
}

img.logo {
    float: left;
}

div#shipping-breakdown {
    overflow-y: auto;
    max-height: 39vh;
    width: 100%;
    overflow-x: hidden;
}

form#checkoutForm {
    max-width: 50%;
}

i.fa-solid.fa-circle-minus {
    margin-right: 6px;
}

/* 1. Базовый сброс, чтобы padding не ломал ширину */
* {
    box-sizing: border-box;
}

/* 2. Контейнер формы */
#checkoutForm {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    max-width: 1200px;
    margin: 0 auto;
}

/* 3. Сообщение о пустой корзине (всегда 100%) */
#empty-cart-message {
    width: 100%;
    background: #f8d7da;
    color: #721c24;
    padding: 15px;
    border-radius: 5px;
    margin-bottom: 10px;
}

/* 4. Колонки (Desktop: по 50%) */
.col2 {
    width: calc(50% - 15px);
    display: flex;
    flex-direction: row-reverse;
    gap: 15px;
    align-content: center;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-evenly;
}

/* 5. Стили для полей ввода */
.col2 input, 
.col2 h3 {
    width: 100%;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 16px;
}

.col2 h3 {
    margin: 0 0 10px 0;
    padding: 0;
    border: none;
    font-size: 1.2rem;
}

a.cart-link.cart-log {
    margin-right: 269px;
}
 
/* 6. Адаптивность (Mobile: 100%) */
@media (max-width: 768px) {
    .col2 {
        width: 100%;
    }
}

a.cart-link.cart-rate {
    right: 412px;
}

/* ===== НОВЫЕ СТИЛИ ДЛЯ ВАРИАНТОВ ДОСТАВКИ ===== */
.shipping-options {
    margin: 15px 0;
    background: white;
    border-radius: 8px;
    border: 1px solid #dee2e6;
    overflow: hidden;
}

.shipping-option {
    border-bottom: 1px solid #e9ecef;
    padding: 12px 15px;
    transition: background 0.2s;
}

.shipping-option:last-child {
    border-bottom: none;
}

.shipping-option:hover {
    background: #f1f5f9;
}

.shipping-option label {
    display: flex;
    align-items: center;
    gap: 15px;
    cursor: pointer;
    flex-wrap: wrap;
}

.shipping-option input[type="radio"] {
    width: auto;
    margin: 0;
    accent-color: #0073aa;
    transform: scale(1.1);
    flex: 0 0 auto;
}

.service-name {
    font-weight: 600;
    color: #005a87;
    min-width: 150px;
}

.account {
    color: #6c757d;
    font-size: 0.9rem;
    min-width: 100px;
}

.cost {
    font-weight: 700;
    color: #28a745;
    min-width: 120px;
    text-align: right;
}

.delivery {
    color: #495057;
    font-size: 0.9rem;
    min-width: 80px;
}

/* Адаптивность для вариантов доставки */
@media (max-width: 700px) {
    .shipping-option label {
        flex-direction: column;
        align-items: flex-start;
        gap: 5px;
    }
    
    .service-name, .account, .cost, .delivery {
        min-width: auto;
        text-align: left;
    }
}

/* ===== ОТЛАДОЧНЫЙ БЛОК ===== */
.debug-section {
    margin-top: 30px;
    padding: 15px;
    border: 2px dashed #ff9800;
    background-color: #fff3e0;
    border-radius: 8px;
    width: 100%;
}

.debug-section h3 {
    color: #e65100;
    margin-top: 0;
}

.debug-section .note {
    font-size: 0.9em;
    color: #666;
    margin-bottom: 10px;
}

.debug-fields {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.debug-fields input {
    flex: 1 1 150px;
    padding: 8px;
    border: 1px solid #ccc;
    border-radius: 4px;
}

/* ===== КОРРЕКТИРОВКА КНОПОК ===== */
#calc-shipping {
    background: #0073aa;
    color: white;
    border: none;
    border-radius: 8px;
    padding: 12px 20px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    width: 100%;
    margin: 15px 0;
    transition: background 0.2s;
}

#calc-shipping:hover {
    background: #005a87;
}

.place-order {
    background: #28a745;
    color: white;
    border: none;
    border-radius: 8px;
    padding: 14px 20px;
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    width: 100%;
    margin-top: 20px;
    transition: background 0.2s;
}

.place-order:hover {
    background: #218838;
}

/* ===== ИТОГОВАЯ СУММА ===== */
.total {
    font-size: 1.3rem;
    margin-top: 15px;
    text-align: right;
    border-top: 2px solid #dee2e6;
    padding-top: 15px;
}

/* ===== СТИЛИ ДЛЯ РАЗБИВКИ ПОСЫЛОК ===== */
#shipping-breakdown {
    overflow-y: auto;
    max-height: 39vh;
    width: 100%;
    margin-top: 15px;
    padding: 10px;
    background: #f8f9fa;
    border-radius: 6px;
    font-size: 0.9rem;
}

#shipping-breakdown ul {
    margin: 5px 0 0 20px;
    padding: 0;
}

/* ===== УЛУЧШЕНИЯ ДЛЯ КОЛОНОК ФОРМЫ ===== */
form#checkoutForm {
    max-width: 50%;
}

@media (max-width: 768px) {
    form#checkoutForm {
        max-width: 100%;
    }
}

/* Корректировка ссылок в шапке */
a.cart-link.cart-log {
    margin-right: 269px;
}

a.cart-link.cart-rate {
    right: 412px;
}

/* Анимация загрузки */
#calc-shipping.loading,
#place-order.loading {
    background: linear-gradient(45deg, #4facfe, #ffd000, #4facfe);
    background-size: 200% 200%;
    animation: gradient 2s ease infinite;
    color: white;
    cursor: wait;
}

@keyframes gradient {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}
