/* Cart Specific Styles */
.cart-top-nav {
    background: #232f3e;
    color: white;
    height: 15px;
    padding: 10px 0;
    font-size: 14px;
}

.cart-nav-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.home-link, .cart-icon {
    color: white;
    text-decoration: none;
    font-size: 14px;
}

.home-link:hover {
    text-decoration: underline;
}

.cart-main-container {
    background: #f7f7f7;
    min-height: calc(100vh - 75px);
    padding: 20px;
}

.cart-content-wrapper {
    max-width: 1200px;
    margin: 0 auto;
    background: white;
    border-radius: 8px;
    padding: 20px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

/* Header Section */
.cart-header {
    border-bottom: 1px solid #ddd;
    padding-bottom: 20px;
    margin-bottom: 20px;
}

.cart-title-section {
    margin-bottom: 15px;
}

.cart-title {
    font-size: 28px;
    color: #0f1111;
    margin: 0 0 10px 0;
    font-weight: 400;
}

.continue-shopping {
    color: #0066c0;
    text-decoration: none;
    font-size: 14px;
}

.continue-shopping:hover {
    color: #c45500;
    text-decoration: underline;
}

/* Shipping Progress */
.shipping-progress {
    display: flex;
    align-items: center;
    gap: 15px;
    background: #f0f2f2;
    padding: 12px 15px;
    border-radius: 4px;
}

.shipping-info {
    display: flex;
    align-items: center;
    gap: 8px;
    flex: 1;
}

.shipping-icon {
    font-size: 18px;
}

.shipping-text {
    font-size: 14px;
    color: #0f1111;
}

/* Two Column Layout */
.cart-two-column {
    display: flex;
    gap: 20px;
    position: relative;
}

.cart-items-column {
    flex: 3; /* 75% */
}

.order-summary-column {
    flex: 1; /* 25% */
    min-width: 300px;
}

/* Cart Item Card */
.cart-item-card {
    display: flex;
    gap: 20px;
    padding: 20px;
    border: 1px solid #ddd;
    border-radius: 4px;
    margin-bottom: 10px;
    background: white;
    transition: all 0.3s ease;
}

.cart-item-card:hover {
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.item-image {
    width: 120px;
    height: 120px;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.item-image img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
}

.item-details {
    flex: 1;
}

.product-title {
    color: #0066c0;
    font-size: 16px;
    font-weight: bold;
    text-decoration: none;
    display: block;
    margin-bottom: 8px;
}

.product-title:hover {
    color: #c45500;
    text-decoration: underline;
}

.stock-status, .shipping-info {
    display: flex;
    align-items: center;
    gap: 5px;
    margin-bottom: 5px;
}

.stock-icon {
    color: #007600;
    font-size: 14px;
}

.stock-text {
    color: #007600;
    font-size: 12px;
}

.shipping-icon-small {
    font-size: 12px;
}

.shipping-text-small {
    color: #565959;
    font-size: 12px;
}

.item-price {
    color: #b12704;
    font-size: 18px;
    font-weight: bold;
    margin: 10px 0;
}

/* Quantity Controls */
.quantity-controls {
    display: flex;
    align-items: center;
    gap: 5px;
    margin: 15px 0;
}

.quantity-btn {
    width: 28px;
    height: 28px;
    border-radius: 4px;
    border: 1px solid #d5d9d9;
    background: #f0f2f2;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    transition: all 0.2s;
}

.quantity-btn:hover {
    background: #e3e6e6;
}

.quantity-btn:focus {
    outline: 2px solid #0066c0;
    outline-offset: 2px;
}

.quantity-display {
    width: 40px;
    height: 28px;
    border: 1px solid #d5d9d9;
    border-radius: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
}

/* Item Actions */
.item-actions {
    margin-top: 15px;
    font-size: 14px;
}

.delete-link, .save-link {
    text-decoration: none;
    font-size: 14px;
}

.delete-link {
    color: #cc0c39;
}

.delete-link:hover {
    color: #a00d2e;
    text-decoration: underline;
}

.save-link {
    color: #0066c0;
}

.save-link:hover {
    color: #c45500;
    text-decoration: underline;
}

.action-separator {
    color: #ddd;
    margin: 0 8px;
}

/* Order Summary Box */
.order-summary-box {
    border: 1px solid #ddd;
    border-radius: 8px;
    padding: 20px;
    position: sticky;
    top: 20px;
    background: white;
}

.summary-title {
    font-size: 18px;
    font-weight: 400;
    margin: 0 0 20px 0;
    color: #0f1111;
}

.price-breakdown {
    margin-bottom: 20px;
}

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

.free-shipping {
    color: #007600;
}

.divider {
    height: 1px;
    background: #ddd;
    margin: 15px 0;
}

.total-row {
    font-weight: bold;
    font-size: 18px;
}

.total-price {
    color: #b12704;
    font-weight: bold;
}

/* Checkout Button */
.checkout-btn {
    width: 100%;
    padding: 10px;
    background: #ff9900;
    border: 1px solid #a88734;
    border-radius: 8px;
    color: #111;
    font-weight: bold;
    font-size: 16px;
    cursor: pointer;
    margin-bottom: 15px;
    transition: background 0.2s;
}

.checkout-btn:hover {
    background: #f0c14b;
}

.checkout-btn:focus {
    outline: 2px solid #0066c0;
    outline-offset: 2px;
}

.security-notice {
    text-align: center;
    font-size: 12px;
    color: #565959;
}

/* Saved for Later Section */
.saved-for-later-section {
    margin-top: 40px;
    border-top: 1px solid #ddd;
    padding-top: 20px;
}

.saved-title {
    font-size: 20px;
    font-weight: 400;
    margin: 0 0 20px 0;
    color: #0f1111;
}

.saved-items-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 15px;
}

.saved-item-card {
    border: 1px solid #ddd;
    border-radius: 4px;
    padding: 15px;
    display: flex;
    gap: 15px;
    background: white;
}

.saved-item-image {
    width: 80px;
    height: 80px;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.saved-item-image img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
}

.saved-item-details {
    flex: 1;
}

.saved-product-title {
    color: #0066c0;
    font-size: 14px;
    text-decoration: none;
    display: block;
    margin-bottom: 8px;
}

.saved-product-title:hover {
    color: #c45500;
    text-decoration: underline;
}

.saved-item-price {
    color: #b12704;
    font-size: 16px;
    font-weight: bold;
    margin: 10px 0;
}

.saved-item-actions {
    display: flex;
    gap: 15px;
    align-items: center;
}

.move-to-cart-btn {
    background: #0066c0;
    color: white;
    border: none;
    border-radius: 4px;
    padding: 8px 15px;
    font-size: 14px;
    cursor: pointer;
    text-decoration: none;
    transition: background 0.2s;
}

.move-to-cart-btn:hover {
    background: #0050a0;
    text-decoration: none;
}

.saved-delete-link {
    color: #cc0c39;
    text-decoration: none;
    font-size: 14px;
}

.saved-delete-link:hover {
    color: #a00d2e;
    text-decoration: underline;
}

/* Empty Cart State */
.empty-cart {
    text-align: center;
    padding: 60px 20px;
}

.empty-cart-icon {
    font-size: 48px;
    color: #ddd;
    margin-bottom: 20px;
}

.empty-cart-title {
    font-size: 24px;
    font-weight: 400;
    color: #0f1111;
    margin: 0 0 10px 0;
}

.empty-cart-description {
    color: #565959;
    margin: 0 0 30px 0;
    font-size: 16px;
}

.shop-now-btn {
    display: inline-block;
    padding: 12px 30px;
    background: #ff9900;
    border: 1px solid #a88734;
    border-radius: 8px;
    color: #111;
    font-weight: bold;
    font-size: 16px;
    text-decoration: none;
    transition: background 0.2s;
}

.shop-now-btn:hover {
    background: #f0c14b;
    text-decoration: none;
}

/* Responsive Design */
@media (max-width: 767px) {
    .cart-two-column {
        flex-direction: column;
    }

    .order-summary-column {
        order: -1; /* Move summary above cart items on mobile */
        min-width: 100%;
        margin-bottom: 20px;
    }

    .cart-item-card {
        flex-direction: column;
    }

    .item-image {
        width: 100%;
        height: auto;
        max-height: 200px;
    }

    .item-actions {
        display: flex;
        flex-direction: column;
        gap: 10px;
    }

    .action-separator {
        display: none;
    }

    .saved-items-grid {
        grid-template-columns: 1fr;
    }

    .saved-item-card {
        flex-direction: column;
    }

    .saved-item-image {
        width: 100%;
        height: auto;
        max-height: 150px;
    }

    .cart-main-container {
        padding: 10px;
    }

    .cart-content-wrapper {
        padding: 15px;
    }

    .cart-title {
        font-size: 24px;
    }
}

@media (min-width: 768px) and (max-width: 1024px) {
    .order-summary-column {
        min-width: 280px;
    }

    .saved-items-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* Tablet adjustments */
@media (max-width: 1024px) {
    .cart-nav-container,
    .cart-content-wrapper {
        padding: 0 15px;
    }
}

/* Accessibility - Focus Styles */
.quantity-btn:focus,
.checkout-btn:focus,
.move-to-cart-btn:focus,
.product-title:focus,
.delete-link:focus,
.save-link:focus {
    outline: 2px solid #0066c0;
    outline-offset: 2px;
}

/* Loading States */
.item-updating {
    opacity: 0.7;
    pointer-events: none;
}

.item-updating::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 20px;
    height: 20px;
    border: 2px solid #ddd;
    border-top-color: #0066c0;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    to { transform: translate(-50%, -50%) rotate(360deg); }
}

/* Print Styles */
@media print {
    .cart-top-nav,
    .continue-shopping,
    .quantity-controls,
    .item-actions,
    .checkout-btn,
    .saved-for-later-section,
    .security-notice {
        display: none !important;
    }

    .cart-main-container {
        background: white;
        padding: 0;
    }

    .cart-content-wrapper {
        box-shadow: none;
        border: none;
    }
}