/* ============================================
   MATERIAL DESIGN 3 - PRODUCTOS DS
   ============================================ */

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

/* Variables de Color - Material Design 3 */
:root {
    --primary: #22c55e;
    --primary-dark: #16a34a;
    --primary-light: #86efac;
    --secondary: #f59e0b;
    --tertiary: #06b6d4;
    --error: #dc2626;
    --error-light: #fee2e2;
    --surface: #ffffff;
    --surface-dim: #f3f4f6;
    --surface-container: #eeeff3;
    --on-surface: #1f2937;
    --on-surface-variant: #6b7280;
    --outline: #d1d5db;
    
    --shadow-1: 0 1px 2px rgba(0, 0, 0, 0.3);
    --shadow-2: 0 3px 6px rgba(0, 0, 0, 0.15);
    --shadow-3: 0 10px 20px rgba(0, 0, 0, 0.1);
    --shadow-4: 0 15px 35px rgba(0, 0, 0, 0.2);
    
    --radius-small: 8px;
    --radius-medium: 12px;
    --radius-large: 16px;
    --radius-extra-large: 28px;
    
    --transition: all 0.3s cubic-bezier(0.2, 0, 0, 1);
}

/* Tipografía */
body {
    font-family: 'Roboto', sans-serif;
    color: var(--on-surface);
    background-color: var(--surface);
    line-height: 1.6;
    font-size: 1rem;
    font-weight: 400;
}

h1, h2, h3, h4, h5, h6 {
    font-weight: 500;
    line-height: 1.2;
}

h1 {
    font-size: 2.5rem;
    font-weight: 700;
}

h2 {
    font-size: 2rem;
    font-weight: 600;
}

h3 {
    font-size: 1.5rem;
    font-weight: 600;
}

p {
    color: var(--on-surface-variant);
}

a {
    color: var(--primary);
    text-decoration: none;
    transition: var(--transition);
}

a:hover {
    color: var(--primary-dark);
}

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

/* ============================================
   HEADER Y NAVEGACIÓN
   ============================================ */

.header {
    background: var(--surface);
    box-shadow: var(--shadow-1);
    position: sticky;
    top: 0;
    z-index: 100;
}

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

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

.logo-icon {
    width: 50px;
    height: 50px;
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
    color: white;
    border-radius: var(--radius-medium);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 1.3rem;
    box-shadow: var(--shadow-2);
}

.logo-text h1 {
    font-size: 1.5rem;
    margin: 0;
    color: var(--on-surface);
}

.logo-text p {
    font-size: 0.8rem;
    margin: 0;
}

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

.nav-link {
    font-weight: 500;
    padding: 0.5rem 0;
    border-bottom: 2px solid transparent;
    transition: var(--transition);
    color: var(--on-surface-variant);
}

.nav-link:hover,
.nav-link.active {
    color: var(--primary);
    border-bottom-color: var(--primary);
}

/* ============================================
   HERO SECTION
   ============================================ */

.hero {
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
    color: white;
    padding: 5rem 0;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: radial-gradient(circle at 20% 50%, rgba(255, 255, 255, 0.1) 0%, transparent 50%),
                radial-gradient(circle at 80% 80%, rgba(255, 255, 255, 0.1) 0%, transparent 50%);
    pointer-events: none;
}

.hero-content {
    position: relative;
    z-index: 2;
}

.hero h2 {
    font-size: 2.5rem;
    margin-bottom: 1rem;
    line-height: 1.3;
}

.hero p {
    font-size: 1.1rem;
    margin-bottom: 2rem;
    color: rgba(255, 255, 255, 0.95);
}

/* ============================================
   BOTONES
   ============================================ */

.btn {
    padding: 0.75rem 1.5rem;
    border: none;
    border-radius: var(--radius-medium);
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    display: inline-block;
    text-align: center;
    font-family: 'Roboto', sans-serif;
}

.btn-primary {
    background: var(--primary);
    color: white;
    box-shadow: var(--shadow-2);
}

.btn-primary:hover {
    background: var(--primary-dark);
    box-shadow: var(--shadow-3);
    transform: translateY(-2px);
}

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

.btn-large {
    padding: 1rem 2rem;
    font-size: 1.1rem;
    width: 100%;
}

/* ============================================
   SECCIÓN ABOUT
   ============================================ */

.about {
    padding: 4rem 0;
    background: var(--surface-dim);
}

.about-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
    margin-top: 2rem;
}

.about-card {
    background: var(--surface);
    padding: 2rem;
    border-radius: var(--radius-large);
    text-align: center;
    box-shadow: var(--shadow-1);
    transition: var(--transition);
}

.about-card:hover {
    box-shadow: var(--shadow-3);
    transform: translateY(-4px);
}

.about-icon {
    font-size: 3rem;
    margin-bottom: 1rem;
}

.about-card h3 {
    color: var(--on-surface);
    margin-bottom: 0.5rem;
}

.about-card p {
    color: var(--on-surface-variant);
    font-size: 0.95rem;
}

/* ============================================
   SECCIÓN CATÁLOGO
   ============================================ */

.section-title {
    text-align: center;
    margin-bottom: 2rem;
    font-size: 2rem;
}

.catalogo {
    padding: 4rem 0;
}

/* Filtros */
.filtros {
    display: flex;
    gap: 1rem;
    justify-content: center;
    flex-wrap: wrap;
    margin-bottom: 3rem;
}

.filter-btn {
    padding: 0.7rem 1.5rem;
    border: 2px solid var(--outline);
    background: transparent;
    border-radius: var(--radius-extra-large);
    font-weight: 500;
    cursor: pointer;
    transition: var(--transition);
    color: var(--on-surface-variant);
}

.filter-btn:hover,
.filter-btn.active {
    background: var(--primary);
    color: white;
    border-color: var(--primary);
}

/* Grid de Productos */
.productos-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 2rem;
}

.producto-card {
    background: var(--surface);
    border-radius: var(--radius-large);
    overflow: hidden;
    box-shadow: var(--shadow-2);
    transition: var(--transition);
    display: flex;
    flex-direction: column;
    opacity: 1;
    animation: fadeIn 0.3s ease-in;
}

.producto-card:hover {
    box-shadow: var(--shadow-3);
    transform: translateY(-8px);
}

.producto-card.hidden {
    display: none;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.producto-imagen {
    width: 100%;
    height: 180px;
    overflow: hidden;
    background: var(--surface-dim);
}

.producto-imagen img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: var(--transition);
}

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

.producto-info {
    padding: 1.5rem;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
}

.producto-categoria {
    display: inline-block;
    background: var(--primary-light);
    color: var(--primary-dark);
    padding: 0.3rem 0.8rem;
    border-radius: var(--radius-small);
    font-size: 0.75rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
    width: fit-content;
}

.producto-info h3 {
    font-size: 1rem;
    margin-bottom: 0.5rem;
    line-height: 1.3;
}

.producto-tamaño {
    font-size: 0.9rem;
    color: var(--on-surface-variant);
    margin-bottom: 0.3rem;
}

.producto-codigo {
    font-size: 0.8rem;
    color: var(--on-surface-variant);
    margin-bottom: 1rem;
    flex-grow: 1;
}

/* ============================================
   FORMULARIO
   ============================================ */

.formulario-section {
    padding: 4rem 0;
    background: linear-gradient(135deg, var(--surface-dim) 0%, var(--surface-container) 100%);
}

.formulario-wrapper {
    background: var(--surface);
    padding: 3rem;
    border-radius: var(--radius-large);
    box-shadow: var(--shadow-2);
    max-width: 600px;
    margin: 0 auto;
}

.formulario-titulo {
    text-align: center;
    margin-bottom: 2rem;
}

.formulario-titulo h2 {
    margin-bottom: 0.5rem;
}

.alert {
    padding: 1rem;
    border-radius: var(--radius-medium);
    margin-bottom: 1.5rem;
}

.alert-success {
    background: #dcfce7;
    color: #166534;
    border-left: 4px solid var(--primary);
}

.alert-error {
    background: var(--error-light);
    color: #991b1b;
    border-left: 4px solid var(--error);
}

/* Formulario */
.formulario {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

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

.form-group {
    display: flex;
    flex-direction: column;
}

.form-group.full {
    grid-column: 1 / -1;
}

.form-group label {
    font-weight: 500;
    margin-bottom: 0.5rem;
    color: var(--on-surface);
}

.form-group input,
.form-group select,
.form-group textarea {
    padding: 0.75rem 1rem;
    border: 2px solid var(--outline);
    border-radius: var(--radius-medium);
    font-family: 'Roboto', sans-serif;
    font-size: 1rem;
    transition: var(--transition);
    color: var(--on-surface);
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(34, 197, 94, 0.1);
    background: var(--surface);
}

.form-group textarea {
    resize: vertical;
    font-size: 0.95rem;
}

/* ============================================
   FOOTER
   ============================================ */

.footer {
    background: var(--on-surface);
    color: white;
    padding: 3rem 0 1rem;
    margin-top: 4rem;
}

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

.footer-section h4 {
    margin-bottom: 1rem;
    color: var(--primary-light);
}

.footer-section p {
    margin-bottom: 0.5rem;
    color: rgba(255, 255, 255, 0.8);
}

.footer-section a {
    color: var(--primary-light);
}

.footer-section a:hover {
    color: var(--primary);
}

.footer-bottom {
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    padding-top: 1rem;
    text-align: center;
    color: rgba(255, 255, 255, 0.6);
}

/* ============================================
   RESPONSIVE DESIGN
   ============================================ */

@media (max-width: 768px) {
    .header-content {
        flex-direction: column;
        gap: 1.5rem;
    }

    .nav {
        gap: 1rem;
        justify-content: center;
    }

    .hero h2 {
        font-size: 2rem;
    }

    .productos-grid {
        grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
        gap: 1.5rem;
    }

    .formulario-wrapper {
        padding: 1.5rem;
    }

    .form-row {
        grid-template-columns: 1fr;
    }

    .filtros {
        gap: 0.5rem;
        font-size: 0.9rem;
    }

    .filter-btn {
        padding: 0.5rem 1rem;
    }
}

@media (max-width: 480px) {
    .logo-text h1 {
        font-size: 1.2rem;
    }

    .nav {
        flex-direction: column;
        gap: 0.5rem;
    }

    .hero h2 {
        font-size: 1.5rem;
    }

    .hero p {
        font-size: 0.95rem;
    }

    .section-title {
        font-size: 1.5rem;
    }

    .productos-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}
