* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: Arial, sans-serif;
    line-height: 1.6;
    color: #333;
    background: #fff;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Header */
.site-header {
    background: #fff;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
    padding: 1rem 0;
}

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

.mobile-menu {
    display: contents;
}

.logo a {
    display: flex;
    align-items: center;
}

.logo img {
    height: 50px;
    width: auto;
}

.main-nav {
    display: flex;
    gap: 2rem;
    align-items: center;
}

.main-nav a {
    color: #333;
    text-decoration: none;
    font-weight: 500;
    padding: 0.5rem 1rem;
    border-radius: 4px;
    transition: all 0.3s;
}

.main-nav a:hover {
    background: #f3e8ff;
    color: #7c3aed;
}

.header-actions {
    display: flex;
    gap: 1rem;
    align-items: center;
}

.header-actions a {
    color: #333;
    text-decoration: none;
    padding: 0.5rem 1rem;
    border-radius: 4px;
    transition: all 0.3s;
}

.header-actions a:hover {
    background: #7c3aed;
    color: white;
}

.search-form {
    display: flex;
}

.search-form input {
    padding: 0.5rem;
    border: 1px solid #ddd;
    border-radius: 4px 0 0 4px;
}

.search-form button {
    padding: 0.5rem 1rem;
    background: #7c3aed;
    color: white;
    border: none;
    border-radius: 0 4px 4px 0;
    cursor: pointer;
}

.cart-link {
    padding: 0.5rem 1rem;
    background: #7c3aed;
    color: #fff !important;
    text-decoration: none;
    border-radius: 4px;
}

.cart-link:hover {
    background: #6d28d9 !important;
    color: #fff !important;
}

.mobile-menu-toggle {
    display: none;
    flex-direction: column;
    gap: 4px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 0.5rem;
}

.mobile-menu-toggle span {
    width: 25px;
    height: 3px;
    background: #333;
    transition: all 0.3s;
}

.mobile-menu-toggle.active span:nth-child(1) {
    transform: rotate(45deg) translate(5px, 5px);
}

.mobile-menu-toggle.active span:nth-child(2) {
    opacity: 0;
}

.mobile-menu-toggle.active span:nth-child(3) {
    transform: rotate(-45deg) translate(7px, -6px);
}

/* Main content wrapper */
main {
    flex: 1;
}

/* Buttons */
.btn {
    display: inline-block;
    padding: 0.75rem 1.5rem;
    background: #7c3aed;
    color: white;
    text-decoration: none;
    border: none;
    border-radius: 4px;
    cursor: pointer;
}

.btn:hover {
    background: #6d28d9;
}

.btn-primary {
    background: #7c3aed;
}

.btn-secondary {
    background: #666;
}

.btn-danger {
    background: #f44336;
}

.btn-sm {
    padding: 0.5rem 1rem;
    font-size: 0.9rem;
}

.btn-link {
    background: none;
    color: #7c3aed;
    border: none;
    cursor: pointer;
    text-decoration: underline;
}

/* Hero */
.hero {
    text-align: center;
    padding: 3rem 0;
    background: white;
    margin: 2rem 0;
    border-radius: 8px;
}

.hero h1 {
    font-size: 2.5rem;
    margin-bottom: 1rem;
    color: #7c3aed;
}

/* Product Grid */
.product-grid, .category-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 2rem;
    margin: 2rem 0;
}

.product-card, .category-card {
    background: white;
    padding: 1.5rem;
    border-radius: 8px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
    text-align: center;
}

.product-card img {
    max-width: 100%;
    height: 200px;
    object-fit: cover;
    border-radius: 4px;
}

.product-card h3 {
    margin: 1rem 0 0.5rem;
}

.price {
    font-size: 1.5rem;
    color: #7c3aed;
    font-weight: bold;
    margin: 0.5rem 0;
}

/* Forms */
.auth-form, .profile-form, .admin-form {
    max-width: 500px;
    margin: 2rem auto;
    background: white;
    padding: 2rem;
    border-radius: 8px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}

.form-group {
    margin-bottom: 1.5rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: bold;
}

.form-group input, .form-group select, .form-group textarea {
    width: 100%;
    padding: 0.75rem;
    border: 1px solid #ddd;
    border-radius: 4px;
}

.error {
    color: #f44336;
    font-size: 0.9rem;
    margin-top: 0.25rem;
}

/* Alerts */
.alert {
    padding: 1rem;
    margin: 1rem 0;
    border-radius: 4px;
}

.alert-success {
    background: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.alert-error {
    background: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

/* Tables */
table {
    width: 100%;
    background: white;
    border-collapse: collapse;
    margin: 1rem 0;
}

table th, table td {
    padding: 1rem;
    text-align: left;
    border-bottom: 1px solid #ddd;
}

table th {
    background: #f5f5f5;
    font-weight: bold;
}

/* Cart */
.cart-table {
    background: white;
    padding: 1rem;
    border-radius: 8px;
}

.cart-summary {
    background: white;
    padding: 2rem;
    margin: 2rem 0;
    border-radius: 8px;
    text-align: right;
}

/* Checkout */
.checkout-container {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 2rem;
    margin: 2rem 0;
}

.order-summary {
    background: white;
    padding: 2rem;
    border-radius: 8px;
    height: fit-content;
}

/* Account */
.account-menu {
    display: flex;
    gap: 1rem;
    margin: 2rem 0;
}

/* Footer */
.site-footer {
    background: #f8f9fa;
    color: #333;
    padding: 3rem 0 1rem;
    margin-top: auto;
}

.footer-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 2rem;
    margin-bottom: 2rem;
}

.footer-section h3, .footer-section h4 {
    margin-bottom: 1rem;
}

.footer-logo {
    height: 40px;
    width: auto;
    margin-bottom: 0.5rem;
}

.footer-section ul {
    list-style: none;
}

.footer-section a {
    color: #7c3aed;
    text-decoration: none;
}

.footer-bottom {
    text-align: center;
    padding-top: 2rem;
    border-top: 1px solid #ddd;
}

/* Responsive */
@media (max-width: 768px) {
    .mobile-menu-toggle {
        display: flex;
    }
    
    .header-content {
        flex-wrap: nowrap;
        position: relative;
    }
    
    .mobile-menu {
        display: none;
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        background: #fff;
        width: 100%;
        box-shadow: 0 2px 5px rgba(0,0,0,0.1);
        z-index: 100;
    }
    
    .mobile-menu.active {
        display: block;
    }
    
    .main-nav {
        flex-direction: column;
        gap: 0;
    }
    
    .main-nav a {
        width: 100%;
        border-radius: 0;
        border-bottom: 1px solid #eee;
        text-align: center;
    }
    
    .header-actions {
        flex-direction: column;
        padding: 1rem;
        gap: 0.5rem;
    }
    
    .search-form {
        width: 100%;
    }
    
    .search-form input {
        flex: 1;
    }
    
    .hero h1 {
        font-size: 1.8rem;
    }
    
    .checkout-container {
        grid-template-columns: 1fr;
    }
    
    .product-grid, .category-grid {
        grid-template-columns: 1fr;
    }
    
    .account-menu {
        flex-direction: column;
    }
    
    table {
        font-size: 0.9rem;
    }
    
    table th, table td {
        padding: 0.5rem;
    }
}
