/* === Cart Page Styles === */

/* СБРОС СТИЛЕЙ WOOCOMMERCE ДЛЯ КОРЗИНЫ */
.woocommerce-cart .container {
    display: grid !important;
    grid-template-columns: 280px 1fr 280px;
    gap: 30px !important;
    max-width: 1400px !important;
    margin: 20px auto !important;
    padding: 0 5% !important;
    /* width: 100% !important; */
}

.woocommerce-cart .main-content {
    grid-column: 2 !important;
}

.woocommerce-cart .sidebar-left {
    grid-column: 1 !important;
}

.woocommerce-cart .sidebar-right {
    grid-column: 3 !important;
}

/* Убедимся что сайдбары видны */
.woocommerce-cart .sidebar-left,
.woocommerce-cart .sidebar-right {
    display: block !important;
    visibility: visible !important;
    opacity: 1 !important;
}

/* СТИЛИ КОРЗИНЫ */
.cart-items-section h2,
.cart-totals-section h2,
.empty-cart-section h2 {
    text-align: center;
    margin-bottom: 30px;
    color: #2c3e50;
    font-family: 'PT Serif', 'Georgia', serif;
    font-weight: 600;
}

.empty-cart-section {
    text-align: center;
    padding: 60px 20px;
}

.empty-cart-content {
    background: white;
    padding: 40px;
    border-radius: 10px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.08);
    border: 1px solid #e5e7eb;
}

.empty-icon {
    font-size: 4em;
    margin-bottom: 20px;
    color: #8b4513;
}

.empty-cart-section p {
    font-size: 1.2em;
    color: #666;
    margin-bottom: 30px;
    font-family: 'Roboto', 'Arial', sans-serif;
}

.cart-items-list {
    display: flex;
    flex-direction: column;
    gap: 20px;
    margin-bottom: 30px;
}

.cart-item {
    display: grid;
    grid-template-columns: 120px 1fr auto;
    gap: 20px;
    background: white;
    padding: 25px;
    border-radius: 10px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.08);
    align-items: start;
    border: 1px solid #e5e7eb;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.cart-item:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(0,0,0,0.12);
}

.item-image img {
    width: 100px;
    height: 100px;
    object-fit: cover;
    border-radius: 8px;
    border: 2px solid #f1f2f6;
}

.item-details {
    flex: 1;
}

.item-title {
    margin: 0 0 10px 0;
    font-size: 1.2em;
    color: #2c3e50;
    font-family: 'PT Serif', 'Georgia', serif;
}

.item-title a {
    color: #2c3e50;
    text-decoration: none;
    transition: color 0.3s ease;
}

.item-title a:hover {
    color: #8b4513;
}

.item-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 10px;
}

.meta-item {
    background: #f8f9fa;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 0.9em;
    color: #666;
    border: 1px solid #e5e7eb;
    font-family: 'Roboto', 'Arial', sans-serif;
}

.item-price-mobile {
    display: none;
    font-weight: 600;
    color: #2c3e50;
    margin-top: 10px;
    font-family: 'Roboto', 'Arial', sans-serif;
}

.item-controls {
    display: flex;
    flex-direction: column;
    gap: 15px;
    min-width: 200px;
}

.quantity-control {
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.quantity-control label {
    font-size: 0.9em;
    color: #666;
    font-weight: 500;
    font-family: 'Roboto', 'Arial', sans-serif;
}

.quantity .qty {
    width: 80px;
    text-align: center;
    padding: 8px;
    border: 1px solid #d1d5db;
    border-radius: 4px;
    font-size: 14px;
    font-family: 'Roboto', 'Arial', sans-serif;
    transition: border-color 0.3s ease;
}

.quantity .qty:focus {
    outline: none;
    border-color: #8b4513;
    box-shadow: 0 0 0 2px rgba(139, 69, 19, 0.1);
}

.item-price,
.item-subtotal {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 0;
    border-bottom: 1px solid #f1f2f6;
    font-family: 'Roboto', 'Arial', sans-serif;
}

.price-label,
.subtotal-label {
    font-size: 0.9em;
    color: #666;
}

.price-value,
.subtotal-value {
    font-weight: 600;
    color: #2c3e50;
}

.item-remove {
    text-align: right;
}

.remove-item {
    color: #c0392b;
    text-decoration: none;
    font-size: 0.9em;
    font-weight: 500;
    font-family: 'Roboto', 'Arial', sans-serif;
    transition: color 0.3s ease;
}

.remove-item:hover {
    text-decoration: underline;
    color: #a33225;
}

.cart-actions {
    background: white;
    padding: 25px;
    border-radius: 10px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.08);
    margin-bottom: 30px;
    border: 1px solid #e5e7eb;
}

.coupon-section {
    display: flex;
    gap: 15px;
    align-items: end;
    margin-bottom: 20px;
}

.coupon-section .form-group {
    flex: 1;
    margin-bottom: 0;
}

.coupon-input {
    width: 100%;
    padding: 12px;
    border: 1px solid #d1d5db;
    border-radius: 4px;
    font-size: 16px;
    font-family: 'Roboto', 'Arial', sans-serif;
    transition: border-color 0.3s ease;
    box-sizing: border-box;
}

.coupon-input:focus {
    outline: none;
    border-color: #8b4513;
    box-shadow: 0 0 0 2px rgba(139, 69, 19, 0.1);
}

.cart-buttons {
    display: flex;
    gap: 15px;
    justify-content: space-between;
}

.submit-btn {
    padding: 12px 30px;
    border: none;
    border-radius: 5px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    text-decoration: none;
    text-align: center;
    transition: all 0.3s ease;
    display: inline-block;
    font-family: 'PT Serif', 'Georgia', serif;
}

.submit-btn:not(.outline):not(.secondary) {
    background-color: #8b4513;
    color: white;
}

.submit-btn:not(.outline):not(.secondary):hover {
    background-color: #6b3410;
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(139, 69, 19, 0.3);
}

.submit-btn.outline {
    background: transparent;
    color: #8b4513;
    border: 2px solid #8b4513;
}

.submit-btn.outline:hover {
    background: #8b4513;
    color: white;
    transform: translateY(-2px);
}

.submit-btn.secondary {
    background: #6b7280;
    color: white;
}

.submit-btn.secondary:hover {
    background: #4b5563;
    transform: translateY(-2px);
}

.submit-btn.large {
    padding: 15px;
    font-size: 18px;
    width: 100%;
}

.cart-totals {
    background: white;
    padding: 30px;
    border-radius: 10px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.08);
    border: 1px solid #e5e7eb;
}

.simple-totals {
    margin-bottom: 25px;
}

.total-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 0;
    border-bottom: 1px solid #f1f2f6;
    font-family: 'Roboto', 'Arial', sans-serif;
}

.total-row:last-child {
    border-bottom: none;
}

.total-label {
    color: #666;
}

.total-value {
    font-weight: 600;
    color: #2c3e50;
}

.final-total {
    background: #f8f9fa;
    margin: 15px -30px;
    padding: 15px 30px;
    font-size: 1.2em;
    font-weight: 700;
    color: #8b4513;
    border-top: 1px solid #e5e7eb;
    border-bottom: 1px solid #e5e7eb;
}

.checkout-action {
    text-align: center;
}

.checkout-action .continue-shopping-btn {
    display: block;
    width: 100%;
    margin-top: 10px;
    padding: 13px 15px;
    font-size: 15px;
    font-weight: 600;
    text-align: center;
    text-decoration: none;
    border-radius: 10px;
    background: #fff;
    color: #8b4513;
    border: 1px solid #d0d5dd;
    box-sizing: border-box;
    transition: background-color .18s ease, border-color .18s ease, color .18s ease;
}
.checkout-action .continue-shopping-btn:hover {
    background: #fbf6f1;
    border-color: #8b4513;
    color: #653210;
}

.total-row.shipping-row .shipping-hint {
    color: #888;
    font-weight: 400;
    font-style: italic;
    font-size: 0.9em;
}

/* СИЛОВОЕ ЦЕНТРИРОВАНИЕ ФУТЕРА */
footer .container[style*="grid-template-columns:1fr"] {
    display: flex !important;
    justify-content: center !important;
    align-items: center !important;
    text-align: center !important;
    margin: 0 auto !important;
    width: 100% !important;
}

footer .container[style*="grid-template-columns:1fr"] p {
    text-align: center !important;
    margin: 0 auto !important;
    width: 100% !important;
}

/* Убираем любой inline стиль который мешает */
.woocommerce-cart .site-footer [style] {
    display: flex !important;
    justify-content: center !important;
}

/* === Responsive Design === */

@media (max-width: 1024px) {
    .woocommerce-cart .container {
        grid-template-columns: 1fr !important;
    }
    
    .woocommerce-cart .main-content {
        grid-column: 1 !important;
    }
    
    .woocommerce-cart .sidebar-left,
    .woocommerce-cart .sidebar-right {
        display: none !important;
    }
}

@media (max-width: 768px) {
    .cart-item {
        grid-template-columns: 80px 1fr;
        gap: 15px;
    }
    
    .item-controls {
        grid-column: 1 / -1;
        flex-direction: row;
        flex-wrap: wrap;
        justify-content: space-between;
        align-items: center;
        border-top: 1px solid #f1f2f6;
        padding-top: 15px;
        margin-top: 15px;
    }
    
    .item-price-mobile {
        display: block;
    }
    
    .item-price {
        display: none;
    }
    
    .cart-actions {
        padding: 20px;
    }
    
    .coupon-section {
        flex-direction: column;
        align-items: stretch;
    }
    
    .cart-buttons {
        flex-direction: column;
    }
    
    .item-image img {
        width: 70px;
        height: 70px;
    }
    
    .empty-cart-content {
        padding: 30px 20px;
    }
    
    .empty-icon {
        font-size: 3em;
    }
}

@media (max-width: 480px) {
    .cart-item {
        padding: 15px;
    }
    
    .item-controls {
        flex-direction: column;
        align-items: stretch;
        gap: 10px;
    }
    
    .quantity-control {
        flex-direction: row;
        justify-content: space-between;
        align-items: center;
    }
    
    .item-remove {
        text-align: center;
    }
    
    .cart-totals {
        padding: 20px;
    }
    
    .final-total {
        margin: 15px -20px;
        padding: 15px 20px;
    }
    
    .submit-btn {
        padding: 10px 20px;
        font-size: 14px;
    }
}

/* Additional Cart Improvements */
/* .woocommerce-cart .card {
    background: transparent !important;
    box-shadow: none !important;
    border: none !important;
    padding: 0 !important;
} */

.woocommerce-cart .main-content .card .woocommerce {
    width: 100%;
    max-width: 100%;
    overflow: hidden;
}

/* Continue Shopping Link */
.continue-shopping {
    text-align: center;
    margin-top: 30px;
    padding-top: 20px;
    border-top: 1px solid #e5e7eb;
}

.continue-shopping a {
    color: #8b4513;
    text-decoration: none;
    font-weight: 600;
    font-family: 'PT Serif', 'Georgia', serif;
    transition: color 0.3s ease;
}

.continue-shopping a:hover {
    color: #6b3410;
    text-decoration: underline;
}