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

:root {
    --primary: #0f172a;
    --primary-light: #1e293b;
    --accent: #3b82f6;
    --text-dark: #0f172a;
    --text-light: #64748b;
    --border: #e2e8f0;
    --bg-light: #f8fafc;
    --success: #10b981;
    --danger: #ef4444;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Inter', 'Segoe UI', Roboto, sans-serif;
    background: #ffffff;
    color: var(--text-dark);
    line-height: 1.6;
    font-size: 16px;
}

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

/* Header Mobile First */
header {
    background: #ffffff;
    border-bottom: 1px solid var(--border);
    padding: 1rem 0;
    position: sticky;
    top: 0;
    z-index: 100;
    backdrop-filter: blur(10px);
    background: rgba(255, 255, 255, 0.95);
}

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

.logo {
    font-size: 1.4rem;
    font-weight: 800;
    color: var(--text-dark);
    text-decoration: none;
    letter-spacing: -0.04em;
}

.nav-links {
    display: flex;
    gap: 1.5rem;
    align-items: center;
}

.nav-links a {
    color: var(--text-light);
    text-decoration: none;
    font-weight: 500;
    font-size: 0.95rem;
    transition: color 0.2s;
}

.nav-links a:hover {
    color: var(--text-dark);
}

.cart-icon {
    position: relative;
    background: white;
    color: var(--text-dark);
    padding: 0.65rem 1.2rem;
    border: 1.5px solid var(--border);
    border-radius: 10px;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-weight: 600;
}

.cart-icon:hover {
    border-color: var(--text-dark);
    background: var(--bg-light);
    color: var(--text-dark);
    transform: translateY(-1px);
}

.cart-count {
    background: var(--text-dark);
    color: white;
    border-radius: 12px;
    min-width: 22px;
    height: 22px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 0.75rem;
    font-weight: 700;
    padding: 0 7px;
    margin-left: 4px;
}

/* Hero minimalista */
.hero {
    background: #ffffff;
    padding: 3rem 0 2.5rem;
    border-bottom: 1px solid var(--border);
}

.hero h1 {
    font-size: 2rem;
    font-weight: 900;
    margin-bottom: 0.5rem;
    letter-spacing: -0.03em;
    color: var(--text-dark);
}

.hero p {
    font-size: 1.05rem;
    color: var(--text-light);
    font-weight: 400;
}

/* Categorías Mobile First */
.categorias {
    display: flex;
    gap: 0.75rem;
    margin: 2rem 0;
    overflow-x: auto;
    padding-bottom: 0.5rem;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
}

.categorias::-webkit-scrollbar {
    display: none;
}

.categoria-btn {
    padding: 0.7rem 1.4rem;
    border: 1.5px solid var(--border);
    background: white;
    border-radius: 12px;
    cursor: pointer;
    white-space: nowrap;
    font-weight: 600;
    color: var(--text-light);
    transition: all 0.2s;
    font-size: 0.9rem;
}

.categoria-btn:hover {
    border-color: var(--text-dark);
    color: var(--text-dark);
}

.categoria-btn.active {
    background: var(--text-dark);
    color: white;
    border-color: var(--text-dark);
}

/* Grid Productos Mobile First */
.productos-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
    gap: 1.25rem;
    margin-bottom: 3rem;
}

.producto-card {
    background: white;
    border: 1px solid var(--border);
    border-radius: 12px;
    overflow: hidden;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    cursor: pointer;
}

.producto-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 20px rgba(15, 23, 42, 0.08);
    border-color: var(--text-light);
}

.producto-imagen {
    width: 100%;
    aspect-ratio: 1;
    background: var(--bg-light);
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    position: relative;
}

.producto-imagen img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s;
}

.producto-card:hover .producto-imagen img {
    transform: scale(1.04);
}

.producto-imagen-icon {
    font-size: 3rem;
}

.producto-info {
    padding: 1rem;
}

.producto-nombre {
    font-size: 0.95rem;
    font-weight: 700;
    color: var(--text-dark);
    margin-bottom: 0.4rem;
    line-height: 1.3;
}

.producto-descripcion {
    font-size: 0.8rem;
    color: var(--text-light);
    margin-bottom: 0.75rem;
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.producto-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 0.5rem;
}

.producto-precio {
    font-size: 1.15rem;
    font-weight: 900;
    color: var(--text-dark);
    letter-spacing: -0.02em;
}

.btn-ver {
    background: var(--text-dark);
    color: white;
    border: none;
    padding: 0.5rem 0.9rem;
    border-radius: 8px;
    cursor: pointer;
    font-weight: 600;
    font-size: 0.8rem;
    transition: all 0.2s;
}

.btn-ver:hover {
    background: var(--primary-light);
}

.btn-agregar {
    background: var(--text-dark);
    color: white;
    border: none;
    padding: 0.6rem 1.1rem;
    border-radius: 10px;
    cursor: pointer;
    font-weight: 700;
    font-size: 0.8rem;
    transition: all 0.2s;
}

.btn-agregar:hover {
    background: var(--primary-light);
    transform: translateY(-1px);
}

/* Detalle de Producto */
.detalle-container {
    max-width: 1000px;
    margin: 2rem auto;
}

.detalle-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 2rem;
    margin-bottom: 2rem;
}

.galeria-principal {
    width: 100%;
    aspect-ratio: 1;
    background: var(--bg-light);
    border-radius: 16px;
    overflow: hidden;
    border: 1px solid var(--border);
}

.galeria-principal img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.detalle-info h1 {
    font-size: 1.75rem;
    font-weight: 900;
    margin-bottom: 1rem;
    letter-spacing: -0.03em;
}

.detalle-precio {
    font-size: 2.25rem;
    font-weight: 900;
    color: var(--text-dark);
    margin-bottom: 1.5rem;
    letter-spacing: -0.02em;
}

.detalle-descripcion {
    color: var(--text-light);
    line-height: 1.8;
    margin-bottom: 1.5rem;
}

.stock-info {
    background: var(--bg-light);
    padding: 1rem;
    border-radius: 12px;
    margin-bottom: 1.5rem;
    border: 1px solid var(--border);
}

.cantidad-selector {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.cantidad-selector label {
    font-weight: 600;
}

.cantidad-selector input {
    width: 80px;
    padding: 0.7rem;
    border: 1.5px solid var(--border);
    border-radius: 10px;
    font-size: 1rem;
    font-weight: 600;
}

/* Carrito */
.carrito-container {
    max-width: 900px;
    margin: 2rem auto;
}

.carrito-item {
    background: white;
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 1.25rem;
    margin-bottom: 1rem;
    display: flex;
    gap: 1rem;
}

.carrito-item-imagen {
    width: 80px;
    height: 80px;
    background: var(--bg-light);
    border-radius: 10px;
    flex-shrink: 0;
    overflow: hidden;
    border: 1px solid var(--border);
}

.carrito-item-imagen img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

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

.carrito-item-info h3 {
    font-size: 1rem;
    margin-bottom: 0.3rem;
    font-weight: 700;
}

.carrito-item-info p {
    color: var(--text-light);
    font-size: 0.85rem;
}

.carrito-item-precio {
    font-size: 1.3rem;
    font-weight: 900;
    color: var(--text-dark);
    text-align: right;
}

.carrito-total {
    background: var(--bg-light);
    border: 1.5px solid var(--border);
    border-radius: 12px;
    padding: 1.5rem;
    margin-top: 1.5rem;
}

.total-monto {
    font-size: 2.25rem;
    font-weight: 900;
    color: var(--text-dark);
    margin: 1rem 0;
    letter-spacing: -0.02em;
}

/* Formularios */
.checkout-form {
    background: white;
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 1.5rem;
    margin-top: 1.5rem;
}

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

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 600;
    color: var(--text-dark);
    font-size: 0.9rem;
}

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 0.8rem;
    border: 1.5px solid var(--border);
    border-radius: 10px;
    font-size: 1rem;
    transition: border-color 0.2s;
    font-family: inherit;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--text-dark);
}

.btn-primary {
    background: var(--text-dark);
    color: white;
    border: none;
    padding: 1rem 2rem;
    border-radius: 12px;
    font-size: 1rem;
    font-weight: 700;
    cursor: pointer;
    width: 100%;
    transition: all 0.2s;
}

.btn-primary:hover {
    background: var(--primary-light);
    transform: translateY(-1px);
}

.btn-secondary {
    background: white;
    color: var(--text-dark);
    border: 1.5px solid var(--border);
    padding: 0.8rem 1.5rem;
    border-radius: 10px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
}

.btn-secondary:hover {
    border-color: var(--text-dark);
}

/* Mensajes */
.mensaje {
    padding: 1rem;
    border-radius: 12px;
    margin-bottom: 1.5rem;
    font-weight: 500;
}

.mensaje-exito {
    background: #d1fae5;
    color: #065f46;
    border: 1.5px solid #6ee7b7;
}

.mensaje-error {
    background: #fee2e2;
    color: #991b1b;
    border: 1.5px solid #fca5a5;
}

/* Footer */
footer {
    background: var(--bg-light);
    border-top: 1px solid var(--border);
    padding: 2.5rem 0;
    margin-top: 4rem;
    text-align: center;
    color: var(--text-light);
    font-size: 0.9rem;
}

/* Tablet */
@media (min-width: 640px) {
    .productos-grid {
        grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
        gap: 1.5rem;
    }
    
    .hero h1 {
        font-size: 2.5rem;
    }
    
    .detalle-grid {
        grid-template-columns: 1fr 1fr;
    }
    
    .carrito-item {
        padding: 1.5rem;
    }
}

/* Desktop */
@media (min-width: 1024px) {
    .container {
        padding: 0 2rem;
    }
    
    .productos-grid {
        grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
        gap: 2rem;
    }
    
    .hero {
        padding: 4rem 0 3rem;
    }
    
    .hero h1 {
        font-size: 3rem;
    }
    
    .producto-nombre {
        font-size: 1.05rem;
    }
    
    .producto-descripcion {
        font-size: 0.9rem;
    }
}
