/* 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: #f5f5f5;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Header Styles */
.top-bar {
    background: #2c3e50;
    color: #fff;
    padding: 8px 0;
    font-size: 14px;
}

.top-bar-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.contact-info span {
    margin-right: 20px;
}

.top-links a {
    color: #fff;
    text-decoration: none;
    margin-left: 15px;
}

.main-header {
    background: #fff;
    padding: 20px 0;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}

.header-content {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 30px;
}

.logo h1 {
    color: #f57224;
    font-size: 32px;
}

.logo a {
    text-decoration: none;
}

.search-bar {
    flex: 1;
    max-width: 600px;
}

.search-bar form {
    display: flex;
}

.search-bar input {
    flex: 1;
    padding: 12px 15px;
    border: 2px solid #ddd;
    border-radius: 4px 0 0 4px;
    font-size: 15px;
}

.search-bar button {
    padding: 12px 25px;
    background: #f57224;
    color: #fff;
    border: none;
    border-radius: 0 4px 4px 0;
    cursor: pointer;
    font-size: 16px;
}

.cart-btn {
    display: flex;
    align-items: center;
    gap: 8px;
    text-decoration: none;
    color: #333;
    position: relative;
    padding: 8px 15px;
    border: 2px solid #ddd;
    border-radius: 4px;
}

.cart-count {
    background: #f57224;
    color: #fff;
    border-radius: 50%;
    padding: 2px 8px;
    font-size: 12px;
    font-weight: bold;
}

/* Navigation */
.main-nav {
    background: #34495e;
}

.nav-menu {
    list-style: none;
    display: flex;
    padding: 0;
}

.nav-menu li a {
    display: block;
    color: #fff;
    text-decoration: none;
    padding: 15px 20px;
    transition: background 0.3s;
}

.nav-menu li a:hover,
.nav-menu li a.active {
    background: #2c3e50;
}

/* Hero Banner */
.hero-banner {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: #fff;
    padding: 80px 0;
    text-align: center;
}

.banner-content h2 {
    font-size: 48px;
    margin-bottom: 15px;
}

.banner-content p {
    font-size: 20px;
    margin-bottom: 30px;
}

/* Buttons */
.btn {
    display: inline-block;
    padding: 12px 30px;
    text-decoration: none;
    border-radius: 4px;
    cursor: pointer;
    border: none;
    font-size: 16px;
    transition: all 0.3s;
}

.btn-primary {
    background: #f57224;
    color: #fff;
}

.btn-primary:hover {
    background: #d65a0f;
}

.btn-secondary {
    background: #6c757d;
    color: #fff;
}

.btn-add-cart {
    width: 100%;
    background: #27ae60;
    color: #fff;
}

.btn-add-cart:hover {
    background: #229954;
}

.btn-disabled {
    width: 100%;
    background: #999;
    color: #fff;
    cursor: not-allowed;
}

.btn-large {
    padding: 15px 40px;
    font-size: 18px;
}

.btn-block {
    display: block;
    width: 100%;
    text-align: center;
    margin-bottom: 10px;
}

/* Sections */
.section-title {
    font-size: 36px;
    text-align: center;
    margin: 50px 0 30px;
    color: #2c3e50;
}

/* Categories Grid */
.categories-section {
    padding: 40px 0;
    background: #fff;
}

.categories-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 25px;
    margin-top: 30px;
}

.category-card {
    background: #f8f9fa;
    padding: 30px;
    border-radius: 8px;
    text-align: center;
    text-decoration: none;
    color: #333;
    transition: transform 0.3s, box-shadow 0.3s;
}

.category-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 5px 20px rgba(0,0,0,0.1);
}

.category-icon {
    font-size: 48px;
    color: #f57224;
    margin-bottom: 15px;
}

/* Products Grid */
.products-section {
    padding: 40px 0;
}

.products-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 25px;
    margin-top: 30px;
}

.product-card {
    background: #fff;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    transition: transform 0.3s, box-shadow 0.3s;
}

.product-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 5px 15px rgba(0,0,0,0.2);
}

.product-image {
    position: relative;
    overflow: hidden;
    height: 250px;
}

.product-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.badge {
    position: absolute;
    top: 10px;
    right: 10px;
    padding: 5px 12px;
    border-radius: 4px;
    font-size: 12px;
    font-weight: bold;
}

.sale-badge {
    background: #e74c3c;
    color: #fff;
}

.stock-badge {
    background: #95a5a6;
    color: #fff;
}

.product-info {
    padding: 15px;
}

.product-category {
    color: #7f8c8d;
    font-size: 13px;
    text-transform: uppercase;
}

.product-title {
    margin: 10px 0;
    font-size: 16px;
}

.product-title a {
    text-decoration: none;
    color: #333;
}

.product-title a:hover {
    color: #f57224;
}

.product-price {
    margin: 15px 0;
}

.price-current, .price-sale {
    font-size: 22px;
    font-weight: bold;
    color: #f57224;
}

.price-regular {
    font-size: 16px;
    color: #999;
    text-decoration: line-through;
    margin-left: 10px;
}

/* Product Detail */
.breadcrumb {
    background: #fff;
    padding: 15px 0;
    border-bottom: 1px solid #ddd;
}

.breadcrumb a {
    color: #f57224;
    text-decoration: none;
}

.product-detail {
    padding: 40px 0;
    background: #fff;
}

.product-detail-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 50px;
    margin-bottom: 50px;
}

.main-image img {
    width: 100%;
    border-radius: 8px;
}

.product-details h1 {
    font-size: 32px;
    margin-bottom: 15px;
}

.product-meta {
    display: flex;
    gap: 20px;
    margin-bottom: 20px;
    color: #666;
}

.product-price-section {
    margin: 30px 0;
}

.price-row {
    display: flex;
    align-items: center;
    gap: 15px;
}

.discount-badge {
    background: #e74c3c;
    color: #fff;
    padding: 5px 10px;
    border-radius: 4px;
    font-size: 14px;
}

.stock-status {
    margin: 20px 0;
    font-size: 16px;
}

.in-stock {
    color: #27ae60;
}

.out-stock {
    color: #e74c3c;
}

.product-description {
    margin: 30px 0;
}

.product-description h3 {
    margin-bottom: 15px;
}

.product-actions {
    display: flex;
    gap: 20px;
    align-items: center;
    margin-top: 30px;
}

.quantity-selector {
    display: flex;
    border: 2px solid #ddd;
    border-radius: 4px;
    overflow: hidden;
}

.quantity-selector button {
    padding: 10px 20px;
    background: #f8f9fa;
    border: none;
    cursor: pointer;
    font-size: 18px;
}

.quantity-selector button:hover {
    background: #e9ecef;
}

.quantity-selector input {
    width: 60px;
    text-align: center;
    border: none;
    border-left: 1px solid #ddd;
    border-right: 1px solid #ddd;
    font-size: 16px;
}

/* Cart Page */
.cart-section {
    padding: 40px 0;
}

.cart-grid {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 30px;
    margin-top: 30px;
}

.cart-item {
    display: grid;
    grid-template-columns: 100px 2fr 150px 120px 50px;
    gap: 20px;
    align-items: center;
    background: #fff;
    padding: 20px;
    margin-bottom: 15px;
    border-radius: 8px;
}

.item-image img {
    width: 100%;
    border-radius: 4px;
}

.item-details h3 {
    font-size: 18px;
    margin-bottom: 10px;
}

.item-quantity {
    display: flex;
    border: 2px solid #ddd;
    border-radius: 4px;
    overflow: hidden;
}

.item-quantity button {
    padding: 8px 15px;
    background: #f8f9fa;
    border: none;
    cursor: pointer;
}

.item-quantity input {
    width: 50px;
    text-align: center;
    border: none;
    border-left: 1px solid #ddd;
    border-right: 1px solid #ddd;
}

.btn-remove {
    background: #e74c3c;
    color: #fff;
    border: none;
    padding: 8px 12px;
    border-radius: 4px;
    cursor: pointer;
}

.cart-summary {
    background: #fff;
    padding: 25px;
    border-radius: 8px;
    height: fit-content;
}

.cart-summary h3 {
    margin-bottom: 20px;
}

.summary-row {
    display: flex;
    justify-content: space-between;
    padding: 10px 0;
    border-bottom: 1px solid #eee;
}

.summary-row.total {
    font-size: 20px;
    font-weight: bold;
    border-top: 2px solid #333;
    border-bottom: none;
    margin-top: 10px;
}

.empty-cart {
    text-align: center;
    padding: 100px 20px;
    background: #fff;
    border-radius: 8px;
}

.empty-cart i {
    font-size: 80px;
    color: #ddd;
    margin-bottom: 20px;
}

/* Checkout */
.checkout-section {
    padding: 40px 0;
}

.checkout-grid {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 30px;
    margin-top: 30px;
}

.checkout-form {
    background: #fff;
    padding: 30px;
    border-radius: 8px;
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 500;
}

.form-group input,
.form-group textarea,
.form-group select {
    width: 100%;
    padding: 12px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 15px;
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}

.order-summary {
    background: #fff;
    padding: 25px;
    border-radius: 8px;
    height: fit-content;
}

.summary-items {
    margin-bottom: 20px;
}

.summary-item {
    display: flex;
    justify-content: space-between;
    padding: 10px 0;
    border-bottom: 1px solid #eee;
}

/* Footer */
.footer {
    background: #2c3e50;
    color: #fff;
    padding: 40px 0 20px;
    margin-top: 50px;
}

.footer-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 30px;
    margin-bottom: 30px;
}

.footer-col h4 {
    margin-bottom: 15px;
}

.footer-col ul {
    list-style: none;
}

.footer-col ul li {
    margin-bottom: 10px;
}

.footer-col a {
    color: #bdc3c7;
    text-decoration: none;
}

.footer-col a:hover {
    color: #f57224;
}

.footer-bottom {
    text-align: center;
    padding-top: 20px;
    border-top: 1px solid #34495e;
}

/* Alerts */
.alert {
    padding: 15px;
    border-radius: 4px;
    margin-bottom: 20px;
}

.alert-error {
    background: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

.alert-success {
    background: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

/* Responsive */
@media (max-width: 768px) {
    .header-content {
        flex-direction: column;
    }
    
    .nav-menu {
        flex-direction: column;
    }
    
    .products-grid {
        grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    }
    
    .product-detail-grid,
    .cart-grid,
    .checkout-grid {
        grid-template-columns: 1fr;
    }
    
    .cart-item {
        grid-template-columns: 80px 1fr;
        grid-template-rows: auto auto auto;
    }
}

.page-title {
    font-size: 32px;
    margin-bottom: 20px;
}

.no-products {
    text-align: center;
    padding: 50px;
    background: #fff;
    border-radius: 8px;
}

.stock-warning {
    color: #e74c3c;
    font-size: 14px;
    margin-top: 5px;
}
