* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Arial', sans-serif;
    line-height: 1.6;
    color: #333;
    background-color: #f4f4f4;
}

.container {
    width: 90%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 15px;
}

/* Header */
header {
    background-color: #2c3e50;
    color: white;
    padding: 1rem 0;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}

header h1 {
    display: inline-block;
    margin-right: 2rem;
}

nav ul {
    list-style: none;
    display: inline-block;
}

nav ul li {
    display: inline-block;
    margin-right: 1rem;
}

nav ul li a {
    color: white;
    text-decoration: none;
    padding: 0.5rem 1rem;
    border-radius: 4px;
    transition: background-color 0.3s;
}

nav ul li a:hover {
    background-color: #34495e;
}

/* Main Content */
main {
    padding: 2rem 0;
    min-height: calc(100vh - 200px);
}

/* Hero Section */
.hero {
    text-align: center;
    padding: 3rem 0;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border-radius: 10px;
    margin-bottom: 2rem;
}

.hero h2 {
    font-size: 2.5rem;
    margin-bottom: 1rem;
}

.hero p {
    font-size: 1.2rem;
    margin-bottom: 2rem;
}

/* Buttons */
.btn {
    display: inline-block;
    background-color: #3498db;
    color: white;
    padding: 0.8rem 1.5rem;
    text-decoration: none;
    border-radius: 5px;
    border: none;
    cursor: pointer;
    transition: background-color 0.3s;
    font-size: 1rem;
}

.btn:hover {
    background-color: #2980b9;
}

.btn-primary {
    background-color: #27ae60;
}

.btn-primary:hover {
    background-color: #219a52;
}

.btn-eliminar {
    background-color: #e74c3c;
    color: white;
    padding: 0.3rem 0.8rem;
    text-decoration: none;
    border-radius: 3px;
    font-size: 0.9rem;
}

.btn-eliminar:hover {
    background-color: #c0392b;
}

.btn-agregar {
    background-color: #f39c12;
    color: white;
    padding: 0.5rem 1rem;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    transition: background-color 0.3s;
}

.btn-agregar:hover {
    background-color: #e67e22;
}

/* Product Grid */
.grid-productos {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 1.5rem;
    margin-top: 1.5rem;
}

.producto-card {
    background: white;
    padding: 1.5rem;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    transition: transform 0.3s, box-shadow 0.3s;
}

.producto-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 5px 15px rgba(0,0,0,0.2);
}

.producto-card h3 {
    color: #2c3e50;
    margin-bottom: 0.5rem;
}

.precio {
    font-size: 1.5rem;
    font-weight: bold;
    color: #27ae60;
    margin: 0.5rem 0;
}

.categoria {
    font-style: italic;
    color: #7f8c8d;
    margin-bottom: 0.5rem;
}

.stock {
    color: #95a5a6;
    font-size: 0.9rem;
}

/* Auth Forms */
.auth-form {
    max-width: 500px;
    margin: 0 auto;
    background: white;
    padding: 2rem;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.auth-form h2 {
    text-align: center;
    margin-bottom: 1.5rem;
    color: #2c3e50;
}

.form-group {
    margin-bottom: 1rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: bold;
}

.form-group input,
.form-group textarea,
.form-group select {
    width: 100%;
    padding: 0.8rem;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 1rem;
}

.form-group textarea {
    height: 100px;
    resize: vertical;
}

/* Messages */
.error {
    background-color: #e74c3c;
    color: white;
    padding: 1rem;
    border-radius: 4px;
    margin-bottom: 1rem;
}

.success {
    background-color: #27ae60;
    color: white;
    padding: 1rem;
    border-radius: 4px;
    margin-bottom: 1rem;
}

/* Cart Table */
.carrito-table {
    width: 100%;
    border-collapse: collapse;
    background: white;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.carrito-table th,
.carrito-table td {
    padding: 1rem;
    text-align: left;
    border-bottom: 1px solid #ecf0f1;
}

.carrito-table th {
    background-color: #34495e;
    color: white;
}

.carrito-table input[type="number"] {
    width: 70px;
    padding: 0.3rem;
}

.carrito-actions {
    margin-top: 1.5rem;
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
}

/* Order Summary */
.resumen-pedido {
    background: white;
    padding: 2rem;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.resumen-pedido pre {
    background: #f8f9fa;
    padding: 1rem;
    border-radius: 4px;
    border: 1px solid #e9ecef;
    margin: 1rem 0;
    white-space: pre-wrap;
    font-family: inherit;
}

/* Footer */
footer {
    background-color: #34495e;
    color: white;
    text-align: center;
    padding: 1rem 0;
    margin-top: 2rem;
}

/* Responsive */
@media (max-width: 768px) {
    header h1 {
        display: block;
        margin-bottom: 1rem;
    }
    
    nav ul {
        display: block;
    }
    
    nav ul li {
        display: block;
        margin-bottom: 0.5rem;
    }
    
    .grid-productos {
        grid-template-columns: 1fr;
    }
    
    .carrito-table {
        display: block;
        overflow-x: auto;
    }
    
    .carrito-actions {
        flex-direction: column;
    }
}
