/* ===================================
   VARIABLES CSS - M&F TOYS
   Distribuidora Mayorista de Juguetes
   =================================== */

:root {
    /* Colores principales */
    --primary-color: #FFD60A;
    --primary-dark: #FFC300;
    --secondary-color: #2064b3;
    --secondary-dark: #1c58a0;
    --accent-color: #FF6B35;
    
    /* Colores de estado */
    --success-color: #28a745;
    --danger-color: #dc3545;
    --warning-color: #ffc107;
    --info-color: #17a2b8;
    
    /* Grises */
    --dark: #2c3e50;
    --gray-dark: #495057;
    --gray: #6c757d;
    --gray-light: #e9ecef;
    --light: #f8f9fa;
    --white: #ffffff;
    
    /* Sombras */
    --shadow-sm: 0 2px 4px rgba(0,0,0,0.1);
    --shadow-md: 0 4px 12px rgba(0,0,0,0.15);
    --shadow-lg: 0 8px 24px rgba(0,0,0,0.2);
    
    /* Espaciado */
    --spacing-xs: 0.5rem;
    --spacing-sm: 1rem;
    --spacing-md: 2rem;
    --spacing-lg: 4rem;
    --spacing-xl: 6rem;
    
    /* Border radius */
    --radius-sm: 4px;
    --radius-md: 8px;
    --radius-lg: 12px;
    --radius-xl: 20px;
    --radius-pill: 50px;
    
    /* Transiciones */
    --transition-fast: 0.2s ease;
    --transition-normal: 0.3s ease;
    --transition-slow: 0.5s ease;
}

/* ===================================
   RESET Y ESTILOS BASE
   =================================== */

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    line-height: 1.6;
    color: var(--dark);
    background-color: var(--white);
}

h1, h2, h3, h4, h5, h6 {
    font-weight: 700;
    line-height: 1.2;
    margin-bottom: 1rem;
}

a {
    text-decoration: none;
    color: inherit;
    transition: var(--transition-normal);
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

/* ===================================
   UTILIDADES
   =================================== */

.container-custom {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1rem;
}

.text-primary { color: var(--primary-color) !important; }
.text-secondary { color: var(--secondary-color) !important; }
.text-accent { color: var(--accent-color) !important; }

.bg-primary { background-color: var(--primary-color) !important; }
.bg-secondary { background-color: var(--secondary-color) !important; }
.bg-light { background-color: var(--light) !important; }
.bg-dark { background-color: var(--dark) !important; }

/* ===================================
   BOTONES
   =================================== */

.btn-custom {
    display: inline-block;
    padding: 0.75rem 1.5rem;
    font-weight: 600;
    text-align: center;
    border-radius: var(--radius-pill);
    border: 2px solid transparent;
    cursor: pointer;
    transition: var(--transition-normal);
    font-size: 1rem;
}

.btn-primary {
    background-color: var(--secondary-color);
    color: var(--white);
    border-color: var(--secondary-color);
}

.btn-primary:hover {
    background-color: var(--secondary-dark);
    border-color: var(--secondary-dark);
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.btn-outline-primary {
    background-color: transparent;
    color: var(--secondary-color);
    border-color: var(--secondary-color);
}

.btn-outline-primary:hover {
    background-color: var(--secondary-color);
    color: var(--white);
}

.btn-accent {
    background-color: var(--accent-color);
    color: var(--white);
    border-color: var(--accent-color);
}

.btn-accent:hover {
    background-color: #ff5520;
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.btn-lg {
    padding: 1rem 2rem;
    font-size: 1.1rem;
}

.btn-sm {
    padding: 0.5rem 1rem;
    font-size: 0.9rem;
}

/* ===================================
   SECCIONES
   =================================== */

.section {
    padding: var(--spacing-lg) 0;
}

.section-title {
    font-size: 2.5rem;
    font-weight: 800;
    text-align: center;
    margin-bottom: var(--spacing-md);
    color: var(--dark);
}

.section-subtitle {
    font-size: 1.2rem;
    text-align: center;
    color: var(--gray);
    margin-bottom: var(--spacing-lg);
    max-width: 700px;
    margin-left: auto;
    margin-right: auto;
}

/* ===================================
   TARJETAS DE PRODUCTO
   =================================== */

.product-card {
    background: var(--white);
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow-sm);
    transition: var(--transition-normal);
    height: 100%;
    display: flex;
    flex-direction: column;
}

.product-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-lg);
}

.product-card-image {
    position: relative;
    width: 100%;
    height: 220px;
    overflow: hidden;
    background-color: var(--light);
}

.product-card-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: var(--transition-slow);
}

/* For grid-5 specifically, prefer contain to avoid cropping */
.product-grid-4 .product-card-image img {
    object-fit: contain;
    padding: 1rem; /* give some breathing room */
}

.product-card:hover .product-card-image img {
    transform: scale(1.1);
}

.product-badge {
    position: absolute;
    top: 10px;
    right: 10px;
    background-color: var(--accent-color);
    color: var(--white);
    padding: 0.3rem 0.8rem;
    border-radius: var(--radius-pill);
    font-size: 0.8rem;
    font-weight: 600;
    text-transform: uppercase;
}

.product-card-body {
    padding: 1.5rem;
    flex: 1;
    display: flex;
    flex-direction: column;
}

.product-card-title {
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
    color: var(--dark);
    flex: 1;
}

.product-card-price {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--secondary-color);
    margin-bottom: 1rem;
}

.product-card-footer {
    padding: 0 1.5rem 1.5rem;
}

/* ===================================
   BADGES E ICONOS
   =================================== */

.badge-custom {
    display: inline-block;
    padding: 0.4rem 1rem;
    border-radius: var(--radius-pill);
    font-size: 0.9rem;
    font-weight: 600;
}

.badge-success {
    background-color: var(--success-color);
    color: var(--white);
}

.badge-warning {
    background-color: var(--warning-color);
    color: var(--dark);
}

.icon-box {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    margin: 0 auto 1rem;
}

.icon-box-primary {
    background-color: rgba(32, 100, 179, 0.1);
    color: var(--secondary-color);
}

.icon-box-accent {
    background-color: rgba(255, 107, 53, 0.1);
    color: var(--accent-color);
}

/* ===================================
   PRODUCTOS - GRID DE 5 COLUMNAS
   =================================== */

.product-grid-4 .product-card {
    margin-bottom: 1.5rem;
    min-height: 420px;
}

.product-card-image {
    height: 200px; /* Slightly smaller to allow more space for title and metas */
}

.product-card-title {
    font-size: 1rem;
    font-weight: 600;
    margin-bottom: 0.25rem;
    min-height: 3em; /* keep two lines height */
}

.product-card-subtitle {
    font-size: 0.9rem;
    color: var(--gray);
    margin-bottom: 0.5rem;
}

.product-card-price {
    font-size: 1.35rem;
    font-weight: 800;
    color: var(--secondary-color);
    margin-bottom: 0.25rem;
}

.product-card-meta {
    font-size: 0.9rem;
    color: var(--success-color);
    font-weight: 700;
    margin-bottom: 0.25rem;
}

.product-card-shipping {
    font-size: 0.85rem;
    color: var(--success-color);
    font-weight: 600;
    display: inline-block;
    background: rgba(40,167,69,0.08);
    padding: 0.25rem 0.5rem;
    border-radius: 999px;
    margin-top: 0.25rem;
}

.product-card-footer .btn-custom {
    padding: 0.6rem 0.75rem;
    font-size: 0.9rem;
}

@media (min-width: 1200px) {
    .product-card-image {
        height: 220px;
    }
}

@media (min-width: 992px) {
    .product-grid-4 .col-lg-3 {
        flex: 0 0 25%;
        max-width: 25%;
    }
}

@media (max-width: 768px) {
    .section {
        padding: var(--spacing-md) 0;
    }
    
    .section-title {
        font-size: 2rem;
    }
    
    .section-subtitle {
        font-size: 1rem;
    }
    
    .btn-lg {
        padding: 0.875rem 1.5rem;
        font-size: 1rem;
    }
}

@media (max-width: 576px) {
    .section-title {
        font-size: 1.75rem;
    }
    
    .product-card-image {
        height: 180px;
    }
}

/* ===================================
   FOOTER - PIE DE PÁGINA FUTURISTA
   =================================== */

.futuristic-footer {
    background: linear-gradient(135deg, #2c3e50 0%, #1a1a2e 100%);
    color: var(--white);
    padding: var(--spacing-xl) 0 var(--spacing-md) 0;
    margin-top: 0;
    position: relative;
    overflow: hidden;
}

.futuristic-footer::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, rgba(255,214,10,0.8), rgba(32,100,179,0.8), rgba(255,107,53,0.8));
}

.footer-logo {
    font-size: 2rem;
    font-weight: 900;
    color: #FFD60A;
    margin-bottom: var(--spacing-sm);
    letter-spacing: 2px;
    text-shadow: 0 2px 4px rgba(0,0,0,0.2);
}

.footer-description {
    color: rgba(255,255,255,0.8);
    line-height: 1.6;
    margin-bottom: var(--spacing-md);
    font-size: 0.95rem;
}

.social-icons {
    display: flex;
    gap: var(--spacing-sm);
}

.social-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    background: rgba(255,255,255,0.1);
    color: var(--white);
    border-radius: 50%;
    transition: var(--transition-normal);
    text-decoration: none;
    font-size: 1.1rem;
}

.social-icon:hover {
    background: #FFD60A;
    color: #2c3e50;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(255, 214, 10, 0.4);
}

.footer-links h5 {
    color: #FFD60A;
    font-weight: 700;
    margin-bottom: var(--spacing-sm);
    font-size: 1.1rem;
    position: relative;
    padding-bottom: 8px;
}

.footer-links h5::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 40px;
    height: 2px;
    background: linear-gradient(90deg, #FFD60A, transparent);
}

.footer-links ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.footer-links li {
    margin-bottom: 0.5rem;
}

.footer-links a {
    color: rgba(255,255,255,0.85);
    text-decoration: none;
    transition: var(--transition-fast);
    font-size: 0.9rem;
}

.footer-links a:hover {
    color: #FFD60A;
    padding-left: 5px;
}

.footer-links li i {
    color: #FFD60A;
    margin-right: 0.5rem;
    width: 16px;
}

.footer-bottom {
    border-top: 1px solid rgba(255,255,255,0.15);
    padding-top: var(--spacing-md);
    margin-top: var(--spacing-lg);
    text-align: center;
    color: rgba(255,255,255,0.7);
    font-size: 0.85rem;
}

.footer-bottom .text-danger {
    color: #FF6B35 !important;
}

@media (max-width: 768px) {
    .futuristic-footer {
        padding: var(--spacing-lg) 0 var(--spacing-sm) 0;
    }
    
    .footer-logo {
        font-size: 1.75rem;
    }
    
    .social-icons {
        justify-content: center;
        margin-top: var(--spacing-sm);
    }
    
    .footer-links {
        text-align: center;
        margin-bottom: var(--spacing-md);
    }
    
    .footer-bottom {
        font-size: 0.8rem;
    }
}
