/* Modern E-commerce Store 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 */
.header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 1rem 2rem;
    position: fixed;
    width: 100%;
    top: 0;
    z-index: 1000;
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-shadow: 0 2px 20px rgba(0,0,0,0.1);
}

.logo {
    font-size: 1.5rem;
    font-weight: bold;
}

nav {
    display: flex;
    gap: 2rem;
}

nav a {
    color: white;
    text-decoration: none;
    font-weight: 500;
    transition: opacity 0.3s;
}

nav a:hover {
    opacity: 0.8;
}

.cart-icon {
    position: relative;
    cursor: pointer;
    font-size: 1.3rem;
    padding: 0.5rem;
    transition: transform 0.3s;
}

.cart-icon:hover {
    transform: scale(1.1);
}

.cart-count {
    position: absolute;
    top: -5px;
    right: -5px;
    background: #ff4757;
    color: white;
    border-radius: 50%;
    width: 20px;
    height: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.8rem;
    font-weight: bold;
}

/* Hero Section */
.hero {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    text-align: center;
    padding: 8rem 2rem 4rem;
    margin-top: 70px;
}

.hero h1 {
    font-size: 3rem;
    margin-bottom: 1rem;
    font-weight: 700;
}

.hero p {
    font-size: 1.3rem;
    margin-bottom: 2rem;
    opacity: 0.9;
}

.cta-button {
    display: inline-block;
    background: #ff4757;
    color: white;
    padding: 15px 30px;
    text-decoration: none;
    border-radius: 25px;
    font-size: 1.1rem;
    font-weight: 600;
    transition: all 0.3s;
}

.cta-button:hover {
    background: #ff3838;
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(255, 71, 87, 0.4);
}

/* Products Section */
.products {
    padding: 4rem 2rem;
}

.products h2 {
    text-align: center;
    font-size: 2.5rem;
    margin-bottom: 3rem;
    color: #333;
}

.products-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    max-width: 1200px;
    margin: 0 auto;
}

.product-card {
    background: white;
    border-radius: 15px;
    overflow: hidden;
    box-shadow: 0 5px 20px rgba(0,0,0,0.1);
    transition: transform 0.3s, box-shadow 0.3s;
    cursor: pointer;
}

.product-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(0,0,0,0.2);
}

.product-image {
    height: 250px;
    background-size: cover;
    background-position: center;
    position: relative;
}

.product-info {
    padding: 1.5rem;
}

.product-name {
    font-size: 1.3rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
    color: #333;
}

.product-description {
    color: #666;
    margin-bottom: 1rem;
    line-height: 1.5;
}

.product-price {
    font-size: 1.5rem;
    font-weight: 700;
    color: #ff4757;
    margin-bottom: 0.5rem;
}

.product-stock {
    font-size: 0.9rem;
    color: #666;
    margin-bottom: 1rem;
}

.product-actions {
    display: flex;
    gap: 1rem;
}

.btn-add-cart {
    flex: 1;
    background: #2ed573;
    color: white;
    padding: 12px 20px;
    border: none;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.3s;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}

.btn-add-cart:hover:not(:disabled) {
    background: #26d465;
}

.btn-add-cart:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* Footer */
.footer {
    background: #333;
    color: white;
    text-align: center;
    padding: 3rem 2rem;
}

.footer-content {
    max-width: 1200px;
    margin: 0 auto;
}

.social-icons {
    display: flex;
    justify-content: center;
    gap: 1rem;
    margin-bottom: 1rem;
}

.social-icons a {
    color: white;
    font-size: 1.5rem;
    transition: color 0.3s;
}

.social-icons a:hover {
    color: #667eea;
}

.admin-link {
    margin-top: 1rem;
}

.admin-link a {
    color: #667eea;
    text-decoration: none;
    font-weight: 600;
}

.admin-link a:hover {
    text-decoration: underline;
}

/* Loading */
.loading {
    text-align: center;
    padding: 3rem;
    color: #666;
    font-size: 1.1rem;
}

/* Out of Stock */
.out-of-stock {
    position: absolute;
    top: 10px;
    right: 10px;
    background: rgba(255, 71, 87, 0.9);
    color: white;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 0.8rem;
    font-weight: 600;
}

/* Responsive Design */
@media (max-width: 768px) {
    .header {
        padding: 1rem;
        flex-direction: column;
        gap: 1rem;
    }
    
    nav {
        gap: 1rem;
    }
    
    .hero h1 {
        font-size: 2rem;
    }
    
    .hero {
        padding: 6rem 1rem 3rem;
    }
    
    .products {
        padding: 3rem 1rem;
    }
    
    .products-grid {
        grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
        gap: 1rem;
    }
}

@media (max-width: 480px) {
    .hero h1 {
        font-size: 1.5rem;
    }
    
    .hero p {
        font-size: 1rem;
    }
    
    .products h2 {
        font-size: 2rem;
    }
    
    .products-grid {
        grid-template-columns: 1fr;
    }
}

/* Smooth Scrolling */
html {
    scroll-behavior: smooth;
}

/* Admin Styles */
.admin-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 2rem;
    background: #f8f9fa;
    min-height: 100vh;
}

.admin-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
    padding: 1.5rem;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 15px;
    color: white;
}

.admin-header h1 {
    font-size: 2rem;
    font-weight: 700;
}

.back-link {
    color: white;
    text-decoration: none;
    padding: 0.5rem 1rem;
    border: 2px solid white;
    border-radius: 8px;
    transition: all 0.3s;
}

.back-link:hover {
    background: white;
    color: #667eea;
}

.admin-content {
    background: white;
    padding: 2rem;
    border-radius: 15px;
    box-shadow: 0 5px 20px rgba(0,0,0,0.1);
    margin-bottom: 2rem;
}

.admin-content h2 {
    font-size: 1.8rem;
    margin-bottom: 1rem;
    color: #333;
}

.admin-content p {
    color: #666;
    margin-bottom: 2rem;
}

.admin-cards {
    display: grid;
    gap: 1.5rem;
}

.order-card {
    background: #f8f9fa;
    padding: 1.5rem;
    border-radius: 10px;
    border-left: 4px solid #667eea;
    transition: transform 0.3s;
}

.order-card:hover {
    transform: translateX(5px);
}

.order-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
}

.order-id {
    font-weight: 600;
    color: #333;
}

.order-date {
    color: #666;
    font-size: 0.9rem;
}

.order-customer {
    margin-bottom: 1rem;
}

.order-customer h4 {
    color: #333;
    margin-bottom: 0.5rem;
}

.order-items {
    margin-bottom: 1rem;
}

.order-item {
    display: flex;
    justify-content: space-between;
    padding: 0.5rem 0;
    border-bottom: 1px solid #eee;
}

.order-total {
    font-size: 1.2rem;
    font-weight: 700;
    color: #ff4757;
    text-align: right;
}

.admin-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1.5rem;
}

.stat-card {
    background: white;
    padding: 2rem;
    border-radius: 15px;
    box-shadow: 0 5px 20px rgba(0,0,0,0.1);
    text-align: center;
}

.stat-card h3 {
    color: #666;
    margin-bottom: 1rem;
    font-size: 1rem;
}

.stat-number {
    font-size: 2.5rem;
    font-weight: 700;
    color: #667eea;
}

.loading {
    text-align: center;
    padding: 2rem;
    color: #666;
}

/* Admin Responsive */
@media (max-width: 768px) {
    .admin-container {
        padding: 1rem;
    }
    
    .admin-header {
        flex-direction: column;
        gap: 1rem;
        text-align: center;
    }
    
    .admin-content {
        padding: 1.5rem;
    }
    
    .order-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.5rem;
    }
    
    .order-item {
        flex-direction: column;
        gap: 0.25rem;
    }
    
    .stat-card {
        padding: 1.5rem;
    }
    
    .stat-number {
        font-size: 2rem;
    }
}
