/* Reset and Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1.6;
    color: #333;
    background: #f8f9fa;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Header Styles */
.header {
    background: white;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    position: sticky;
    top: 0;
    z-index: 1000;
}

.header-top {
    background: #C42D2D;
    color: white;
    padding: 10px 0;
    font-size: 0.9em;
}

.header-main {
    padding: 15px 0;
}

.header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo h1 {
    color: #C42D2D;
    font-size: 24px;
}

.nav-menu {
    display: flex;
    list-style: none;
    gap: 30px;
}

.nav-menu a {
    text-decoration: none;
    color: #333;
    font-weight: 500;
    transition: color 0.3s;
}

.nav-menu a:hover {
    color: #C42D2D;
}

.header-actions {
    display: flex;
    align-items: center;
    gap: 20px;
}

.cart-icon, .account-icon {
    position: relative;
    cursor: pointer;
}

.cart-count {
    position: absolute;
    top: -8px;
    right: -8px;
    background: #C42D2D;
    color: white;
    border-radius: 50%;
    width: 20px;
    height: 20px;
    font-size: 0.8em;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Cart Styles */
.cart-sidebar {
    position: fixed;
    top: 0;
    right: -400px;
    width: 400px;
    height: 100vh;
    background: white;
    box-shadow: -2px 0 10px rgba(0,0,0,0.1);
    transition: right 0.3s ease;
    z-index: 1001;
    padding: 20px;
    overflow-y: auto;
}

.cart-sidebar.active {
    right: 0;
}

.cart-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    padding-bottom: 10px;
    border-bottom: 1px solid #eee;
}

.close-cart {
    background: none;
    border: none;
    font-size: 24px;
    cursor: pointer;
    color: #666;
}

.cart-items {
    margin-bottom: 20px;
}

.cart-item {
    display: flex;
    gap: 15px;
    padding: 15px 0;
    border-bottom: 1px solid #eee;
}

.cart-item-image {
    width: 80px;
    height: 80px;
    object-fit: cover;
    border-radius: 4px;
}

.cart-item-details {
    flex: 1;
}

.cart-item-name {
    font-weight: 600;
    margin-bottom: 5px;
}

.cart-item-price {
    color: #C42D2D;
    font-weight: bold;
}

.cart-item-quantity {
    display: flex;
    align-items: center;
    gap: 10px;
    margin: 10px 0;
}

.quantity-btn {
    width: 30px;
    height: 30px;
    border: 1px solid #ddd;
    background: white;
    cursor: pointer;
    border-radius: 4px;
}

.quantity-input {
    width: 50px;
    text-align: center;
    border: 1px solid #ddd;
    padding: 5px;
    border-radius: 4px;
}

.remove-item {
    color: #dc3545;
    background: none;
    border: none;
    cursor: pointer;
    font-size: 0.9em;
}

.cart-total {
    border-top: 2px solid #eee;
    padding-top: 15px;
    margin-bottom: 20px;
}

.cart-total-row {
    display: flex;
    justify-content: space-between;
    margin-bottom: 10px;
}

.cart-grand-total {
    font-size: 1.2em;
    font-weight: bold;
    color: #C42D2D;
}

.checkout-btn {
    width: 100%;
    padding: 12px;
    background: #C42D2D;
    color: white;
    border: none;
    border-radius: 4px;
    font-size: 16px;
    cursor: pointer;
    transition: background 0.3s;
}

.checkout-btn:hover {
    background: #9A2323;
}

.cart-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.5);
    z-index: 1000;
    display: none;
}

.cart-overlay.active {
    display: block;
}

/* Product Grid */
.products-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 30px;
    margin: 40px 0;
}

.product-card {
    background: white;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    transition: transform 0.3s, box-shadow 0.3s;
}

.product-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 5px 20px rgba(0,0,0,0.15);
}

.product-image {
    width: 100%;
    height: 200px;
    object-fit: cover;
}

.product-info {
    padding: 20px;
}

.product-name {
    font-size: 1.1em;
    font-weight: 600;
    margin-bottom: 10px;
}

.product-price {
    color: #C42D2D;
    font-weight: bold;
    font-size: 1.2em;
    margin-bottom: 15px;
}

.sale-price {
    color: #dc3545;
    text-decoration: line-through;
    margin-right: 10px;
    font-size: 1em;
}

.add-to-cart-btn {
    width: 100%;
    padding: 10px;
    background: #2D4B8C;
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    transition: background 0.3s;
}

.add-to-cart-btn:hover {
    background: #1e3261;
}

/* Checkout Styles */
.checkout-container {
    max-width: 1000px;
    margin: 40px auto;
    padding: 0 20px;
}

.checkout-steps {
    display: flex;
    justify-content: center;
    margin-bottom: 40px;
}

.step {
    padding: 10px 20px;
    background: #eee;
    margin: 0 10px;
    border-radius: 20px;
}

.step.active {
    background: #C42D2D;
    color: white;
}

.checkout-form {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 40px;
}

.form-section {
    background: white;
    padding: 30px;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.shipping-terms {
    background: #f8f9fa;
    padding: 20px;
    border-radius: 8px;
    margin: 20px 0;
    border-left: 4px solid #C42D2D;
}

.shipping-terms h4 {
    color: #C42D2D;
    margin-bottom: 10px;
}

.terms-list {
    list-style: none;
}

.terms-list li {
    margin-bottom: 8px;
    padding-left: 20px;
    position: relative;
}

.terms-list li:before {
    content: "•";
    color: #C42D2D;
    position: absolute;
    left: 0;
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 5px;
    font-weight: 500;
}

.form-group input, .form-group select, .form-group textarea {
    width: 100%;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 16px;
}

.agree-terms {
    display: flex;
    align-items: center;
    gap: 10px;
    margin: 20px 0;
}

/* Buttons */
.btn {
    display: inline-block;
    padding: 12px 24px;
    background: #C42D2D;
    color: white;
    text-decoration: none;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 16px;
    transition: background 0.3s;
}

.btn:hover {
    background: #9A2323;
}

.btn-secondary {
    background: #6c757d;
}

.btn-secondary:hover {
    background: #545b62;
}

/* Messages */
.success-message {
    background: #d4edda;
    color: #155724;
    padding: 12px;
    border-radius: 4px;
    margin: 20px 0;
    border: 1px solid #c3e6cb;
}

.error-message {
    background: #f8d7da;
    color: #721c24;
    padding: 12px;
    border-radius: 4px;
    margin: 20px 0;
    border: 1px solid #f5c6cb;
}

/* Responsive */
@media (max-width: 768px) {
    .header-content {
        flex-direction: column;
        gap: 15px;
    }
    
    .nav-menu {
        gap: 15px;
    }
    
    .cart-sidebar {
        width: 100%;
        right: -100%;
    }
    
    .products-grid {
        grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
        gap: 20px;
    }
    
    .checkout-form {
        grid-template-columns: 1fr;
        gap: 20px;
    }
}