/* Cart Page Styles */

/* Reset and base styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html, body {
    font-family: 'Arial', sans-serif;
    background-color: #f5f5f5;
    line-height: 1.6;
    color: #333;
    min-height: 100vh;
}

body {
    display: flex;
    flex-direction: column;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

.main-content {
    background: #f5f5f5;
    min-height: calc(100vh - 200px);
    padding: 0;
}

/* Breadcrumb Section */
.breadcrumb-section {
    background: #f8f9fa;
    padding: 1rem 0;
    margin-bottom: 2rem;
    border-bottom: 1px solid #e9ecef;
}

.breadcrumb-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

.breadcrumb {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.9rem;
    color: #666;
    margin: 0;
    padding: 0;
}

.breadcrumb-link {
    color: #007bff;
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 0.25rem;
    transition: color 0.3s ease;
}

.breadcrumb-link:hover {
    color: #0056b3;
    text-decoration: underline;
}

.breadcrumb-link i {
    font-size: 0.8rem;
}

.breadcrumb-separator {
    color: #6c757d;
    margin: 0 0.25rem;
}

.breadcrumb-current {
    color: #6c757d;
    font-weight: 500;
}

.page-header {
    margin-bottom: 2rem;
    padding-bottom: 1rem;
    border-bottom: 2px solid #e9ecef;
}

.page-header h1 {
    margin: 0;
    color: #333;
    font-size: 2rem;
}

/* Empty Cart */
.empty-cart {
    text-align: center;
    padding: 4rem 2rem;
    background: #f8f9fa;
    border-radius: 10px;
    margin: 2rem 0;
}

.empty-cart-icon {
    font-size: 4rem;
    color: #ccc;
    margin-bottom: 1rem;
}

.empty-cart h2 {
    margin: 0 0 1rem 0;
    color: #666;
}

.empty-cart p {
    margin: 0 0 2rem 0;
    color: #888;
}

/* Cart Layout */
.cart-layout {
    display: grid;
    grid-template-columns: 1fr 350px;
    gap: 2rem;
    margin-top: 2rem;
}

@media (max-width: 968px) {
    .cart-layout {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }
}

/* Cart Items Section */
.cart-items-section {
    background: white;
    border-radius: 10px;
    padding: 1.5rem;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.cart-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid #e9ecef;
}

.cart-header h2 {
    margin: 0;
    color: #333;
    font-size: 1.5rem;
}

/* Cart Item */
.cart-item {
    display: grid;
    grid-template-columns: 80px 1fr auto auto auto;
    gap: 1rem;
    align-items: center;
    padding: 1.5rem 0;
    border-bottom: 1px solid #f0f0f0;
}

.cart-item:last-child {
    border-bottom: none;
}

@media (max-width: 768px) {
    .cart-item {
        grid-template-columns: 1fr;
        gap: 1rem;
        text-align: center;
    }
}

.item-image {
    width: 80px;
    height: 80px;
    border-radius: 8px;
    overflow: hidden;
    background: #f8f9fa;
}

.item-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.item-details {
    min-width: 0;
}

.item-name {
    margin: 0 0 0.5rem 0;
    font-size: 1.1rem;
    font-weight: 600;
}

.item-name a {
    color: #333;
    text-decoration: none;
}

.item-name a:hover {
    color: #007bff;
}

.item-brand {
    color: #666;
    font-size: 0.9rem;
    margin-bottom: 0.5rem;
}

.price-section {
    margin-top: 0.5rem;
}

.discount-info {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 0.25rem;
}

.discount-badge {
    background: #dc3545;
    color: white;
    padding: 0.125rem 0.375rem;
    border-radius: 4px;
    font-size: 0.75rem;
    font-weight: 600;
}

.offer-name {
    background: #28a745;
    color: white;
    padding: 0.125rem 0.375rem;
    border-radius: 4px;
    font-size: 0.75rem;
    font-weight: 500;
}

.price-display {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.original-price {
    color: #999;
    text-decoration: line-through;
    font-size: 0.9rem;
}

.final-price {
    color: #dc3545;
    font-weight: 600;
    font-size: 1.1rem;
}

/* Quantity Section */
.item-quantity {
    text-align: center;
}

.item-quantity label {
    display: block;
    margin-bottom: 0.25rem;
    font-size: 0.9rem;
    color: #666;
}

.quantity-controls {
    display: flex;
    align-items: center;
    border: 1px solid #ddd;
    border-radius: 6px;
    overflow: hidden;
    background: white;
}

.qty-btn {
    background: #f8f9fa;
    border: none;
    padding: 0.5rem 0.75rem;
    cursor: pointer;
    color: #666;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 35px;
}

.qty-btn:hover {
    background: #e9ecef;
    color: #333;
}

.qty-btn:active {
    transform: scale(0.95);
}

.quantity-input {
    border: none;
    width: 60px;
    padding: 0.5rem;
    text-align: center;
    font-size: 1rem;
    background: white;
}

.quantity-input:focus {
    outline: none;
    background: #f8f9fa;
}

/* Item Total */
.item-total {
    text-align: right;
    min-width: 120px;
}

.line-total {
    font-weight: 600;
    font-size: 1.1rem;
    color: #333;
}

.line-savings {
    color: #28a745;
    font-size: 0.85rem;
    margin-top: 0.25rem;
}

/* Item Actions */
.item-actions {
    text-align: center;
}

.btn-remove {
    background: #dc3545;
    color: white;
    border: none;
    padding: 0.5rem;
    border-radius: 50%;
    cursor: pointer;
    font-size: 0.9rem;
    transition: all 0.3s ease;
}

.btn-remove:hover {
    background: #c82333;
    transform: scale(1.1);
}

/* Cart Actions */
.cart-actions {
    display: flex;
    gap: 1rem;
    justify-content: space-between;
    margin-top: 2rem;
    padding-top: 1.5rem;
    border-top: 1px solid #e9ecef;
}

@media (max-width: 768px) {
    .cart-actions {
        flex-direction: column;
    }
}

/* Cart Summary Section */
.cart-summary-section {
    position: sticky;
    top: 2rem;
    height: fit-content;
}

.cart-summary {
    background: white;
    border-radius: 10px;
    padding: 1.5rem;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.cart-summary h3 {
    margin: 0 0 1.5rem 0;
    color: #333;
    font-size: 1.3rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid #e9ecef;
}

.summary-line {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.75rem;
    padding: 0.5rem 0;
}

.summary-line.savings {
    color: #28a745;
    font-weight: 500;
}

.summary-line.coupon-discount {
    color: #007bff;
    font-weight: 500;
}

/* Coupon Section */
.coupon-section {
    margin: 1.5rem 0;
    padding: 1.5rem 0;
    border-top: 1px solid #e9ecef;
    border-bottom: 1px solid #e9ecef;
}

.coupon-section h4 {
    margin: 0 0 1rem 0;
    color: #333;
    font-size: 1.1rem;
}

.applied-coupon {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    background: #e8f5e8;
    padding: 1rem;
    border-radius: 8px;
    border: 1px solid #28a745;
    margin-bottom: 1rem;
}

.coupon-info {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
    flex: 1;
}

.coupon-code {
    font-weight: 600;
    color: #28a745;
    font-size: 1rem;
}

.coupon-desc {
    color: #666;
    font-size: 0.85rem;
}

.remove-coupon {
    background: none;
    border: none;
    color: #666;
    cursor: pointer;
    padding: 0.25rem;
    border-radius: 4px;
    transition: all 0.3s ease;
    margin-left: 1rem;
}

.remove-coupon:hover {
    color: #dc3545;
    background: rgba(220,53,69,0.1);
}

.coupon-form {
    margin-top: 1rem;
}

.coupon-input-group {
    display: flex;
    gap: 0.5rem;
    margin-bottom: 0.5rem;
}

.coupon-input {
    flex: 1;
    padding: 0.75rem;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 1rem;
}

.coupon-input:focus {
    outline: none;
    border-color: #007bff;
    box-shadow: 0 0 0 2px rgba(0,123,255,0.25);
}

.coupon-error {
    color: #dc3545;
    font-size: 0.9rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-top: 0.5rem;
}

/* Summary Total */
.summary-total {
    margin-top: 1.5rem;
    padding-top: 1.5rem;
    border-top: 2px solid #e9ecef;
}

.total-line {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.5rem;
}

.total-line span:first-child {
    font-size: 1.1rem;
    font-weight: 600;
    color: #333;
}

.total-amount {
    font-size: 1.5rem;
    font-weight: 700;
    color: #007bff;
}

.total-savings {
    color: #28a745;
    font-weight: 500;
    text-align: right;
    font-size: 0.9rem;
}

/* Checkout Section */
.checkout-section {
    margin-top: 2rem;
    text-align: center;
}

.checkout-btn {
    width: 100%;
    padding: 1rem;
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: 1rem;
}

.security-info {
    color: #666;
    font-size: 0.9rem;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}

.security-info i {
    color: #28a745;
}

/* Button Styles */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1.5rem;
    border: none;
    border-radius: 5px;
    text-decoration: none;
    font-size: 1rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    text-align: center;
    justify-content: center;
}

.btn-primary {
    background: #007bff;
    color: white;
}

.btn-primary:hover {
    background: #0056b3;
    transform: translateY(-1px);
}

.btn-secondary {
    background: #6c757d;
    color: white;
}

.btn-secondary:hover {
    background: #545b62;
}

.btn-outline {
    background: transparent;
    color: #6c757d;
    border: 1px solid #6c757d;
}

.btn-outline:hover {
    background: #6c757d;
    color: white;
}

.btn-sm {
    padding: 0.375rem 0.75rem;
    font-size: 0.875rem;
}

.btn-large {
    padding: 1rem 2rem;
    font-size: 1.1rem;
}

/* Alert Messages */
.alert {
    padding: 1rem 1.5rem;
    margin-bottom: 1.5rem;
    border-radius: 8px;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-weight: 500;
}

.alert-success {
    background: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.alert-error {
    background: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

.alert i {
    font-size: 1.1rem;
}

/* Footer Styles */
.footer {
    background: #8a1b16;
    color: white;
    padding: 3rem 0 1rem;
    margin-top: auto;
}

.footer-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
    margin-bottom: 2rem;
}

.footer-section h4 {
    margin-bottom: 1rem;
    color: #ffd700;
    font-size: 1.1rem;
}

.footer-section p {
    margin-bottom: 0.5rem;
    line-height: 1.6;
    color: #bdc3c7;
}

.footer-section ul {
    list-style: none;
}

.footer-section ul li {
    margin-bottom: 0.5rem;
}

.footer-section ul li a {
    color: #bdc3c7;
    text-decoration: none;
    transition: color 0.3s;
}

.footer-section ul li a:hover {
    color: #ffd700;
}

.footer-bottom {
    text-align: center;
    padding-top: 1rem;
    border-top: 1px solid #34495e;
    color: #95a5a6;
    font-size: 0.9rem;
}

/* Mobile Responsive */
@media (max-width: 768px) {
    .container {
        padding: 0 1rem;
    }
    
    .page-header h1 {
        font-size: 1.5rem;
    }
    
    .cart-item {
        padding: 1rem 0;
    }
    
    .item-image {
        width: 60px;
        height: 60px;
    }
    
    .cart-summary {
        padding: 1rem;
    }
    
    .coupon-input-group {
        flex-direction: column;
    }
    
    .total-amount {
        font-size: 1.3rem;
    }
}
