/* Modern Cart Page Styles */

/* Base Styles */
.cart-page-wrapper {
    min-height: calc(100vh - 200px);
    background-color: #f9fafb;
}

/* Container Styles */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1rem;
}

/* Header Styles */
.cart-header {
    margin-bottom: 2rem;
}

.cart-header h1 {
    font-size: 2rem;
    font-weight: 700;
    color: #111827;
    margin: 0;
}

.breadcrumb {
    font-size: 0.875rem;
    color: #6b7280;
}

.breadcrumb a {
    color: #6b7280;
    text-decoration: none;
    transition: color 0.2s;
}

.breadcrumb a:hover {
    color: #374151;
}

/* Grid Layout */
.cart-content {
    display: grid;
    gap: 2rem;
}

@media (min-width: 1024px) {
    .cart-content {
        grid-template-columns: 2fr 1fr;
    }
}

/* Cart Items Styles */
.cart-items {
    background: white;
    border-radius: 0.5rem;
    box-shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.1);
    border: 1px solid #e5e7eb;
    overflow: hidden;
}

.cart-items-header {
    background-color: #f9fafb;
    padding: 1rem 1.5rem;
    border-bottom: 1px solid #e5e7eb;
}

.cart-items-header .grid {
    display: grid;
    grid-template-columns: 6fr 2fr 2fr 2fr;
    gap: 1rem;
    align-items: center;
}

.cart-items-header div {
    font-size: 0.875rem;
    font-weight: 500;
    color: #374151;
}

.cart-item {
    border-bottom: 1px solid #f3f4f6;
    padding: 1.5rem;
    transition: all 0.3s ease;
}

.cart-item:hover {
    background-color: #f9fafb;
    transform: translateY(-1px);
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
}

.cart-item .grid {
    display: grid;
    grid-template-columns: 6fr 2fr 2fr 2fr;
    gap: 1rem;
    align-items: center;
}

.cart-item .product-info {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.cart-item .product-image {
    flex-shrink: 0;
    width: 4rem;
    height: 4rem;
    background-color: #e5e7eb;
    border-radius: 0.5rem;
    overflow: hidden;
}

.cart-item .product-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.cart-item .product-details {
    flex: 1;
    min-width: 0;
}

.cart-item .product-title {
    font-size: 1.125rem;
    font-weight: 500;
    color: #111827;
    margin: 0 0 0.5rem 0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.cart-item .product-title a {
    color: inherit;
    text-decoration: none;
    transition: color 0.2s;
}

.cart-item .product-title a:hover {
    color: #2563eb;
}

.cart-item .product-meta {
    font-size: 0.875rem;
    color: #6b7280;
    margin-bottom: 0.5rem;
}

.cart-item .remove-mobile {
    margin-top: 0.5rem;
}

.cart-item .remove-mobile a {
    color: #ef4444;
    font-size: 0.875rem;
    font-weight: 500;
    text-decoration: none;
}

.cart-item .remove-mobile a:hover {
    color: #dc2626;
}

.cart-item .price,
.cart-item .total {
    text-align: center;
    font-size: 1.125rem;
    font-weight: 500;
    color: #111827;
}

.cart-item .total {
    text-align: right;
    font-weight: 600;
}

.cart-item .quantity {
    text-align: center;
}

.cart-item .remove-desktop {
    margin-top: 0.5rem;
    text-align: right;
}

.cart-item .remove-desktop a {
    display: inline-flex;
    align-items: center;
    color: #ef4444;
    font-size: 0.875rem;
    font-weight: 500;
    text-decoration: none;
}

.cart-item .remove-desktop a:hover {
    color: #dc2626;
}

.cart-item .remove-desktop svg {
    width: 1rem;
    height: 1rem;
    margin-right: 0.25rem;
}

/* Quantity Input */
.quantity input[type="number"] {
    width: 5rem;
    padding: 0.5rem 0.75rem;
    border: 1px solid #d1d5db;
    border-radius: 0.5rem;
    text-align: center;
    font-size: 0.875rem;
    transition: border-color 0.2s, box-shadow 0.2s;
}

.quantity input[type="number"]:focus {
    outline: none;
    border-color: #2563eb;
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

/* Cart Actions */
.cart-actions {
    background-color: #f9fafb;
    padding: 1rem 1.5rem;
    border-top: 1px solid #e5e7eb;
}

.cart-actions .flex {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

@media (min-width: 640px) {
    .cart-actions .flex {
        flex-direction: row;
        align-items: center;
        justify-content: space-between;
    }
}

.cart-actions .actions-left {
    display: flex;
    align-items: center;
    gap: 1rem;
    flex-wrap: wrap;
}

.update-cart-btn,
.apply-coupon-btn {
    background-color: #4b5563;
    color: white;
    padding: 0.5rem 1rem;
    border-radius: 0.5rem;
    font-weight: 500;
    border: none;
    cursor: pointer;
    transition: background-color 0.2s;
}

.update-cart-btn:hover {
    background-color: #374151;
}

.apply-coupon-btn {
    background-color: #2563eb;
}

.apply-coupon-btn:hover {
    background-color: #1d4ed8;
}

.coupon-section {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.coupon-input {
    padding: 0.5rem 0.75rem;
    border: 1px solid #d1d5db;
    border-radius: 0.5rem;
    font-size: 0.875rem;
    transition: border-color 0.2s, box-shadow 0.2s;
}

.coupon-input:focus {
    outline: none;
    border-color: #2563eb;
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

.continue-shopping-btn {
    display: inline-flex;
    align-items: center;
    color: #2563eb;
    font-weight: 500;
    text-decoration: none;
    transition: color 0.2s;
}

.continue-shopping-btn:hover {
    color: #1d4ed8;
}

.continue-shopping-btn svg {
    width: 1rem;
    height: 1rem;
    margin-right: 0.5rem;
}

/* Cart Summary */
.cart-summary {
    background: white;
    border-radius: 0.5rem;
    box-shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.1);
    border: 1px solid #e5e7eb;
    position: sticky;
    top: 2rem;
}

.summary-header {
    background-color: #f9fafb;
    padding: 1rem 1.5rem;
    border-bottom: 1px solid #e5e7eb;
}

.summary-header h2 {
    font-size: 1.125rem;
    font-weight: 600;
    color: #111827;
    margin: 0;
}

.summary-content {
    padding: 1.5rem;
}

.cart-totals {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.cart-totals .flex {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.cart-totals .flex span:first-child {
    color: #6b7280;
}

.cart-totals .flex span:last-child {
    font-weight: 500;
    color: #111827;
}

.total-section {
    padding-top: 1rem;
    border-top: 1px solid #e5e7eb;
}

.total-section .flex span:first-child {
    font-size: 1.125rem;
    font-weight: 600;
    color: #111827;
}

.total-section .flex span:last-child {
    font-size: 1.25rem;
    font-weight: 700;
    color: #111827;
}

.checkout-section {
    margin-top: 1.5rem;
}

.checkout-btn {
    display: block;
    width: 100%;
    background-color: #2563eb;
    color: white;
    text-align: center;
    padding: 0.75rem 1.5rem;
    border-radius: 0.5rem;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.2s;
}

.checkout-btn:hover {
    background-color: #1d4ed8;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(37, 99, 235, 0.3);
}

.payment-methods {
    margin-top: 1rem;
    text-align: center;
}

.payment-methods p {
    font-size: 0.875rem;
    color: #6b7280;
    margin: 0 0 0.5rem 0;
}

.payment-methods .flex {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 0.5rem;
}

.payment-methods img {
    height: 1.5rem;
}

.security-badge {
    margin-top: 1.5rem;
    text-align: center;
}

.security-badge .flex {
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.875rem;
    color: #6b7280;
}

.security-badge svg {
    width: 1rem;
    height: 1rem;
    margin-right: 0.25rem;
    color: #10b981;
}

/* Empty Cart */
.empty-cart {
    text-align: center;
    padding: 4rem 0;
}

.empty-cart-icon {
    margin-bottom: 1.5rem;
}

.empty-cart-icon svg {
    width: 6rem;
    height: 6rem;
    margin: 0 auto;
    color: #d1d5db;
}

.empty-cart h2 {
    font-size: 1.5rem;
    font-weight: 600;
    color: #374151;
    margin: 0 0 1rem 0;
}

.empty-cart p {
    color: #6b7280;
    margin: 0 0 2rem 0;
}

.empty-cart a {
    display: inline-flex;
    align-items: center;
    padding: 0.75rem 1.5rem;
    background-color: #2563eb;
    color: white;
    font-weight: 500;
    border-radius: 0.5rem;
    text-decoration: none;
    transition: background-color 0.2s;
}

.empty-cart a:hover {
    background-color: #1d4ed8;
}

.empty-cart a svg {
    width: 1.25rem;
    height: 1.25rem;
    margin-right: 0.5rem;
}

/* Animations */
.cart-item.removing {
    opacity: 0;
    transform: translateX(-100%);
}

/* Loading states */
.update-cart-btn:disabled,
.apply-coupon-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

/* Messages */
.woocommerce-message,
.woocommerce-error,
.woocommerce-info {
    padding: 1rem;
    border-radius: 0.5rem;
    margin-bottom: 1.5rem;
}

.woocommerce-message {
    background-color: #f0fdf4;
    border: 1px solid #bbf7d0;
    color: #166534;
}

.woocommerce-error {
    background-color: #fef2f2;
    border: 1px solid #fecaca;
    color: #dc2626;
}

.woocommerce-info {
    background-color: #eff6ff;
    border: 1px solid #bfdbfe;
    color: #1d4ed8;
}

/* Responsive Design */
@media (max-width: 768px) {
    .cart-items-header {
        display: none;
    }
    
    .cart-item .grid {
        display: block;
    }
    
    .cart-item .product-info,
    .cart-item .price,
    .cart-item .quantity,
    .cart-item .total {
        margin-bottom: 1rem;
    }
    
    .cart-item .price::before {
        content: "Price: ";
        font-weight: 500;
        color: #6b7280;
    }
    
    .cart-item .quantity::before {
        content: "Quantity: ";
        font-weight: 500;
        color: #6b7280;
        display: block;
        margin-bottom: 0.5rem;
    }
    
    .cart-item .total::before {
        content: "Total: ";
        font-weight: 500;
        color: #6b7280;
    }
    
    .cart-item .price,
    .cart-item .quantity,
    .cart-item .total {
        text-align: left;
    }
    
    .cart-item .remove-desktop {
        display: none;
    }
    
    .cart-summary {
        position: static;
    }
}

@media (min-width: 769px) {
    .cart-item .remove-mobile {
        display: none;
    }
}

/* Print Styles */
@media print {
    .cart-actions,
    .checkout-section,
    .continue-shopping-btn,
    .remove-desktop,
    .remove-mobile {
        display: none !important;
    }
}