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

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    color: #333;
}

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

header {
    background: white;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    margin-bottom: 30px;
    padding: 20px 0;
}

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

.header-content {
    display: flex;
    align-items: center;
    gap: 15px;
}

.logo {
    width: 80px;
    height: 80px;
    object-fit: contain;
    flex-shrink: 0;
    border-radius: 15px;
}

.header-text {
    flex: 1;
}

header h1 {
    color: #764ba2;
    font-size: 2em;
    margin: 0 0 5px 0;
}

.tagline {
    color: #666;
    font-size: 1em;
    margin: 0;
}

.cart-button {
    position: absolute;
    top: 50%;
    right: 20px;
    transform: translateY(-50%);
    background: #667eea;
    color: white;
    border: none;
    padding: 12px 24px;
    border-radius: 25px;
    cursor: pointer;
    font-size: 1em;
    font-weight: bold;
    transition: all 0.3s;
}

.cart-button:hover {
    background: #764ba2;
    transform: scale(1.05);
}

main {
    background: white;
    border-radius: 15px;
    padding: 30px;
    box-shadow: 0 5px 20px rgba(0,0,0,0.1);
    min-height: 500px;
}

h2 {
    color: #764ba2;
    margin-bottom: 25px;
    font-size: 2em;
}

.products-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 25px;
    margin-bottom: 30px;
}

.product-card {
    background: #f8f9fa;
    border-radius: 12px;
    padding: 20px;
    transition: all 0.3s;
    cursor: pointer;
    border: 2px solid transparent;
}

.product-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 20px rgba(102, 126, 234, 0.3);
    border-color: #667eea;
}

.product-image {
    width: 100%;
    height: 200px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
    margin-bottom: 15px;
    background: white;
    overflow: hidden;
}

.product-image img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    padding: 1px;
}

.product-emoji {
    font-size: 120px;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
}

.product-name {
    font-size: 1.3em;
    color: #333;
    margin-bottom: 8px;
    font-weight: bold;
}

.product-description {
    color: #666;
    margin-bottom: 12px;
    font-size: 0.95em;
    line-height: 1.4;
}

.product-price {
    font-size: 1.5em;
    color: #667eea;
    font-weight: bold;
    margin-bottom: 15px;
}

.product-stock {
    font-size: 0.9em;
    color: #999;
    margin-bottom: 12px;
}

.stock-low {
    color: #e74c3c;
    font-weight: bold;
}

.btn-add-cart {
    width: 100%;
    background: #667eea;
    color: white;
    border: none;
    padding: 12px;
    border-radius: 8px;
    cursor: pointer;
    font-size: 1em;
    font-weight: bold;
    transition: all 0.3s;
}

.btn-add-cart:hover {
    background: #764ba2;
}

.btn-add-cart:disabled {
    background: #ccc;
    cursor: not-allowed;
}

.cart-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px;
    background: #f8f9fa;
    border-radius: 8px;
    margin-bottom: 12px;
}

.cart-item-info {
    flex: 1;
}

.cart-item-name {
    font-weight: bold;
    margin-bottom: 5px;
}

.cart-item-price {
    color: #667eea;
    font-weight: bold;
}

.btn-remove {
    background: #e74c3c;
    color: white;
    border: none;
    padding: 8px 16px;
    border-radius: 5px;
    cursor: pointer;
    transition: all 0.3s;
}

.btn-remove:hover {
    background: #c0392b;
}

.cart-total {
    text-align: right;
    margin: 25px 0;
    padding: 20px;
    background: #f8f9fa;
    border-radius: 8px;
}

.cart-total h3 {
    color: #764ba2;
    font-size: 1.8em;
}

.checkout-form {
    margin-top: 30px;
}

.checkout-form h3 {
    margin-bottom: 20px;
    color: #764ba2;
}

.checkout-form input {
    width: 100%;
    padding: 12px;
    margin-bottom: 15px;
    border: 2px solid #ddd;
    border-radius: 8px;
    font-size: 1em;
}

.checkout-form input:focus {
    outline: none;
    border-color: #667eea;
}

.btn-primary {
    background: #667eea;
    color: white;
    border: none;
    padding: 15px 30px;
    border-radius: 8px;
    cursor: pointer;
    font-size: 1.1em;
    font-weight: bold;
    margin-right: 10px;
    transition: all 0.3s;
}

.btn-primary:hover {
    background: #764ba2;
    transform: scale(1.02);
}

.btn-secondary {
    background: #95a5a6;
    color: white;
    border: none;
    padding: 15px 30px;
    border-radius: 8px;
    cursor: pointer;
    font-size: 1.1em;
    font-weight: bold;
    transition: all 0.3s;
}

.btn-secondary:hover {
    background: #7f8c8d;
}

.success-message {
    text-align: center;
    padding: 50px;
}

.success-message h2 {
    color: #27ae60;
    margin-bottom: 20px;
    font-size: 2.5em;
}

.success-message p {
    font-size: 1.2em;
    margin-bottom: 15px;
    color: #666;
}

.hidden {
    display: none;
}

.loading {
    text-align: center;
    padding: 50px;
    font-size: 1.3em;
    color: #666;
}

footer {
    text-align: center;
    padding: 30px;
    color: white;
    margin-top: 30px;
}

footer p {
    margin-bottom: 10px;
}

.tech-stack {
    font-size: 0.9em;
    opacity: 0.9;
}

@media (max-width: 768px) {
    .products-grid {
        grid-template-columns: 1fr;
    }
    
    header h1 {
        font-size: 1.5em;
    }
    
    .logo {
        width: 70px;
        height: 70px;
    }
    
    .cart-button {
        position: static;
        display: block;
        margin: 15px auto 0;
        transform: none;
    }
    
    .header-content {
        margin-bottom: 10px;
    }
}
