/* 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-color: #f8f9fa;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Header Styles */
.header {
    background: #fff;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    position: sticky;
    top: 0;
    z-index: 1000;
}

.header-content {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1rem 0;
}

.logo a {
    display: flex;
    align-items: center;
    text-decoration: none;
    color: #2c3e50;
    font-size: 1.5rem;
    font-weight: bold;
}

.logo i {
    margin-right: 10px;
    color: #e74c3c;
}

.main-nav ul {
    display: flex;
    list-style: none;
    gap: 2rem;
}

.main-nav a {
    text-decoration: none;
    color: #333;
    font-weight: 500;
    transition: color 0.3s;
}

.main-nav a:hover {
    color: #e74c3c;
}

.header-actions {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.search-form {
    display: flex;
    align-items: center;
    background: #f1f3f4;
    border-radius: 25px;
    padding: 0.5rem 1rem;
}

.search-form input {
    border: none;
    background: transparent;
    outline: none;
    padding: 0.25rem;
    width: 250px;
}

.search-form button {
    background: none;
    border: none;
    cursor: pointer;
    color: #666;
}

.cart-link {
    position: relative;
    color: #333;
    font-size: 1.2rem;
    text-decoration: none;
}

.cart-count {
    position: absolute;
    top: -8px;
    right: -8px;
    background: #e74c3c;
    color: white;
    border-radius: 50%;
    width: 20px;
    height: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.8rem;
}

/* Hero Section */
.hero {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 4rem 0;
    display: flex;
    align-items: center;
    min-height: 500px;
}

.hero-content {
    flex: 1;
    padding: 2rem;
}

.hero-content h1 {
    font-size: 3rem;
    margin-bottom: 1rem;
    font-weight: 700;
}

.hero-content p {
    font-size: 1.2rem;
    margin-bottom: 2rem;
    opacity: 0.9;
}

.hero-image {
    flex: 1;
    text-align: center;
}

.hero-image img {
    max-width: 100%;
    height: auto;
    border-radius: 10px;
}

/* Buttons */
.btn {
    display: inline-block;
    padding: 0.75rem 1.5rem;
    border: none;
    border-radius: 5px;
    text-decoration: none;
    text-align: center;
    cursor: pointer;
    font-weight: 500;
    transition: all 0.3s;
}

.btn-primary {
    background: #e74c3c;
    color: white;
}

.btn-primary:hover {
    background: #c0392b;
    transform: translateY(-2px);
}

.btn-secondary {
    background: #95a5a6;
    color: white;
}

.btn-secondary:hover {
    background: #7f8c8d;
}

.btn-danger {
    background: #e74c3c;
    color: white;
}

.btn-large {
    padding: 1rem 2rem;
    font-size: 1.1rem;
}

.btn-disabled {
    background: #bdc3c7;
    color: #7f8c8d;
    cursor: not-allowed;
}

/* Product Grid */
.products-section {
    padding: 3rem 0;
}

.filters-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
    padding-bottom: 1rem;
    border-bottom: 2px solid #eee;
}

.filters {
    display: flex;
    gap: 1rem;
}

.filters select {
    padding: 0.5rem;
    border: 1px solid #ddd;
    border-radius: 5px;
    background: white;
}

.products-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 2rem;
    margin-bottom: 3rem;
}

.product-card {
    background: white;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
    transition: transform 0.3s, box-shadow 0.3s;
}

.product-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 25px rgba(0,0,0,0.15);
}

.product-image {
    position: relative;
    height: 250px;
    overflow: hidden;
}

.product-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.placeholder-img {
    background: #f1f3f4;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #666;
}

.featured-badge,
.stock-badge {
    position: absolute;
    top: 10px;
    right: 10px;
    background: #e74c3c;
    color: white;
    padding: 0.25rem 0.5rem;
    border-radius: 3px;
    font-size: 0.8rem;
}

.stock-badge.low-stock {
    background: #f39c12;
}

.stock-badge.out-of-stock {
    background: #95a5a6;
}

.product-info {
    padding: 1.5rem;
}

.product-info h3 {
    font-size: 1.1rem;
    margin-bottom: 0.5rem;
    color: #2c3e50;
}

.product-brand {
    color: #7f8c8d;
    font-size: 0.9rem;
    margin-bottom: 0.5rem;
}

.product-category {
    color: #95a5a6;
    font-size: 0.8rem;
    text-transform: uppercase;
    margin-bottom: 0.5rem;
}

.product-price {
    font-size: 1.3rem;
    font-weight: bold;
    color: #e74c3c;
    margin-bottom: 1rem;
}

.product-actions {
    display: flex;
    gap: 0.5rem;
}

.add-to-cart-form {
    flex: 1;
}

.add-to-cart-form button {
    width: 100%;
}

/* Product Detail Page */
.breadcrumb {
    padding: 1rem 0;
    color: #666;
}

.breadcrumb a {
    color: #e74c3c;
    text-decoration: none;
}

.breadcrumb span {
    margin: 0 0.5rem;
}

.product-detail {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 3rem;
    margin: 2rem 0;
    background: white;
    padding: 2rem;
    border-radius: 10px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
}

.main-image img {
    width: 100%;
    height: auto;
    border-radius: 10px;
}

.product-info h1 {
    font-size: 2rem;
    margin-bottom: 1rem;
    color: #2c3e50;
}

.product-price .price {
    font-size: 2rem;
    font-weight: bold;
    color: #e74c3c;
}

.stock-info {
    margin: 1rem 0;
}

.in-stock {
    color: #27ae60;
}

.low-stock {
    color: #f39c12;
}

.out-of-stock {
    color: #e74c3c;
}

.add-to-cart {
    margin: 2rem 0;
}

.quantity-selector {
    margin-bottom: 1rem;
}

.quantity-selector label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 500;
}

.quantity-selector input {
    width: 80px;
    padding: 0.5rem;
    border: 1px solid #ddd;
    border-radius: 5px;
}

.product-features {
    margin-top: 2rem;
}

.product-features ul {
    list-style: none;
}

.product-features li {
    padding: 0.5rem 0;
    border-bottom: 1px solid #eee;
}

/* Product Tabs */
.product-tabs {
    margin: 3rem 0;
    background: white;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
}

.tab-buttons {
    display: flex;
    background: #f8f9fa;
}

.tab-button {
    flex: 1;
    padding: 1rem;
    border: none;
    background: transparent;
    cursor: pointer;
    font-weight: 500;
    transition: background 0.3s;
}

.tab-button.active {
    background: white;
    color: #e74c3c;
}

.tab-content {
    padding: 2rem;
}

.tab-pane {
    display: none;
}

.tab-pane.active {
    display: block;
}

.specifications-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1rem;
}

.spec-item {
    display: flex;
    justify-content: space-between;
    padding: 0.5rem;
    background: #f8f9fa;
    border-radius: 5px;
}

.spec-label {
    font-weight: 500;
}

/* Cart Page */
.cart-page {
    padding: 2rem 0;
}

.cart-content {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 3rem;
}

.cart-item {
    display: grid;
    grid-template-columns: 100px 1fr auto auto auto;
    gap: 1rem;
    padding: 1.5rem;
    background: white;
    border-radius: 10px;
    margin-bottom: 1rem;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    align-items: center;
}

.item-image img {
    width: 100px;
    height: 100px;
    object-fit: cover;
    border-radius: 5px;
}

.item-details h3 {
    font-size: 1.1rem;
    margin-bottom: 0.5rem;
}

.item-brand {
    color: #666;
    font-size: 0.9rem;
}

.item-price {
    font-weight: bold;
    color: #e74c3c;
}

.quantity-controls {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.quantity-controls button {
    width: 30px;
    height: 30px;
    border: 1px solid #ddd;
    background: white;
    cursor: pointer;
    border-radius: 3px;
}

.quantity-controls input {
    width: 60px;
    text-align: center;
    border: 1px solid #ddd;
    padding: 0.25rem;
    border-radius: 3px;
}

.item-total {
    font-weight: bold;
    font-size: 1.1rem;
    color: #e74c3c;
}

.summary-card {
    background: white;
    padding: 2rem;
    border-radius: 10px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
    margin-bottom: 2rem;
}

.summary-line {
    display: flex;
    justify-content: space-between;
    padding: 0.5rem 0;
    border-bottom: 1px solid #eee;
}

.summary-line.total {
    font-weight: bold;
    font-size: 1.2rem;
    border-bottom: none;
    margin-top: 1rem;
    padding-top: 1rem;
    border-top: 2px solid #eee;
}

.checkout-actions {
    margin-top: 2rem;
}

.checkout-actions .btn {
    width: 100%;
    margin-bottom: 1rem;
}

.payment-info {
    background: white;
    padding: 1.5rem;
    border-radius: 10px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
}

.payment-methods {
    display: flex;
    gap: 1rem;
    margin: 1rem 0;
    font-size: 1.5rem;
}

.security-info {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: #27ae60;
    margin-top: 1rem;
}

.empty-cart {
    text-align: center;
    padding: 4rem 2rem;
    background: white;
    border-radius: 10px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
}

.empty-cart-icon {
    font-size: 4rem;
    color: #bdc3c7;
    margin-bottom: 2rem;
}

/* Footer */
.footer {
    background: #2c3e50;
    color: white;
    padding: 3rem 0 1rem;
    margin-top: 4rem;
}

.footer-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
    margin-bottom: 2rem;
}

.footer-section h3,
.footer-section h4 {
    margin-bottom: 1rem;
    color: #ecf0f1;
}

.footer-section ul {
    list-style: none;
}

.footer-section li {
    margin-bottom: 0.5rem;
}

.footer-section a {
    color: #bdc3c7;
    text-decoration: none;
    transition: color 0.3s;
}

.footer-section a:hover {
    color: #e74c3c;
}

.social-links {
    display: flex;
    gap: 1rem;
    margin-top: 1rem;
}

.social-links a {
    width: 40px;
    height: 40px;
    background: #34495e;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.3s;
}

.social-links a:hover {
    background: #e74c3c;
}

.security-badges {
    display: flex;
    gap: 1rem;
    font-size: 1.5rem;
    color: #bdc3c7;
}

.footer-bottom {
    text-align: center;
    padding-top: 2rem;
    border-top: 1px solid #34495e;
    color: #bdc3c7;
}

/* Alerts */
.alert {
    padding: 1rem;
    margin: 1rem 0;
    border-radius: 5px;
    border-left: 4px solid;
}

.alert-success {
    background: #d4edda;
    color: #155724;
    border-color: #27ae60;
}

.alert-error {
    background: #f8d7da;
    color: #721c24;
    border-color: #e74c3c;
}

/* Featured Products Section */
.featured-products {
    padding: 3rem 0;
    background: white;
}

.featured-products h2 {
    text-align: center;
    margin-bottom: 3rem;
    font-size: 2.5rem;
    color: #2c3e50;
}

/* No Products Message */
.no-products {
    grid-column: 1 / -1;
    text-align: center;
    padding: 3rem;
    color: #666;
}

/* Pagination */
.pagination-wrapper {
    display: flex;
    justify-content: center;
    margin-top: 2rem;
}

/* Responsive Design */
@media (max-width: 768px) {
    .header-content {
        flex-direction: column;
        gap: 1rem;
    }
    
    .main-nav ul {
        flex-wrap: wrap;
        gap: 1rem;
    }
    
    .search-form input {
        width: 200px;
    }
    
    .hero {
        flex-direction: column;
        text-align: center;
    }
    
    .hero-content h1 {
        font-size: 2rem;
    }
    
    .products-grid {
        grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
        gap: 1rem;
    }
    
    .product-detail {
        grid-template-columns: 1fr;
        gap: 2rem;
    }
    
    .cart-content {
        grid-template-columns: 1fr;
    }
    
    .cart-item {
        grid-template-columns: 80px 1fr;
        gap: 1rem;
    }
    
    .item-quantity,
    .item-total,
    .item-actions {
        grid-column: 1 / -1;
        justify-self: start;
    }
    
    .filters-bar {
        flex-direction: column;
        gap: 1rem;
        align-items: flex-start;
    }
    
    .footer-content {
        grid-template-columns: 1fr;
        gap: 2rem;
    }
}
