/*
 * Estilos Principales del Sitio Web
 * Planos de Muebles de Melamina
 * Creado por MiniMax Agent
 */

/* Variables CSS globales */
:root {
    --primary-color: #6c5ce7;
    --secondary-color: #a29bfe;
    --success-color: #00b894;
    --warning-color: #fdcb6e;
    --danger-color: #e17055;
    --info-color: #74b9ff;
    --dark-color: #2d3436;
    --light-color: #f8f9fa;
    --gray-color: #636e72;
    --white: #ffffff;
    --black: #000000;
    
    --font-primary: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    --font-heading: 'Montserrat', 'Segoe UI', sans-serif;
    
    --border-radius: 8px;
    --border-radius-lg: 12px;
    --box-shadow: 0 4px 6px rgba(0, 0, 0, 0.07);
    --box-shadow-lg: 0 10px 25px rgba(0, 0, 0, 0.1);
    --transition: all 0.3s ease;
    
    --header-height: 70px;
    --section-padding: 80px 0;
}

/* Reset y base */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-primary);
    line-height: 1.6;
    color: var(--dark-color);
    background-color: var(--white);
}

/* Tipografía */
h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-heading);
    font-weight: 600;
    line-height: 1.2;
    margin-bottom: 1rem;
}

.section-title {
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 1rem;
    color: var(--dark-color);
}

.section-subtitle {
    font-size: 1.125rem;
    color: var(--gray-color);
    margin-bottom: 2rem;
}

/* Utilidades */
.text-primary { color: var(--primary-color) !important; }
.text-secondary { color: var(--secondary-color) !important; }
.text-success { color: var(--success-color) !important; }
.text-warning { color: var(--warning-color) !important; }
.text-danger { color: var(--danger-color) !important; }
.text-info { color: var(--info-color) !important; }

.bg-primary { background-color: var(--primary-color) !important; }
.bg-light { background-color: var(--light-color) !important; }

/* Header Principal */
.main-header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
    box-shadow: var(--box-shadow);
    height: var(--header-height);
}

.navbar {
    height: var(--header-height);
    padding: 0;
}

.navbar-brand {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--white) !important;
    text-decoration: none;
}

.navbar-brand:hover {
    color: var(--warning-color) !important;
}

.navbar-nav .nav-link {
    color: rgba(255, 255, 255, 0.9) !important;
    font-weight: 500;
    margin: 0 0.5rem;
    padding: 0.5rem 1rem !important;
    border-radius: var(--border-radius);
    transition: var(--transition);
}

.navbar-nav .nav-link:hover,
.navbar-nav .nav-link.active {
    background-color: rgba(255, 255, 255, 0.1);
    color: var(--white) !important;
}

/* Botón del carrito */
.navbar-nav .btn-outline-light {
    position: relative;
    padding: 0.5rem 1rem !important;
    min-width: 50px;
    text-align: center;
}

.cart-count {
    position: absolute;
    top: -8px;
    right: -8px;
    background-color: var(--danger-color);
    color: var(--white);
    border-radius: 50%;
    width: 20px;
    height: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.75rem;
    font-weight: 600;
    z-index: 10;
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0% { transform: scale(1); }
    50% { transform: scale(1.1); }
    100% { transform: scale(1); }
}

/* Hero Section */
.hero-section {
    position: relative;
    min-height: 100vh;
    display: flex;
    align-items: center;
    overflow: hidden;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

.hero-background {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 1;
}

.hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.4);
}

.hero-pattern {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-image: 
        radial-gradient(circle at 25% 25%, rgba(255, 255, 255, 0.1) 0%, transparent 50%),
        radial-gradient(circle at 75% 75%, rgba(255, 255, 255, 0.05) 0%, transparent 50%);
    background-size: 100px 100px;
}

.hero-content {
    position: relative;
    z-index: 2;
    color: var(--white);
}

.hero-title {
    font-size: 3.5rem;
    font-weight: 800;
    line-height: 1.1;
    margin-bottom: 1.5rem;
}

.hero-description {
    font-size: 1.25rem;
    margin-bottom: 2rem;
    opacity: 0.9;
}

.hero-features {
    display: flex;
    flex-wrap: wrap;
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.feature-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: rgba(255, 255, 255, 0.9);
}

.feature-item i {
    color: var(--warning-color);
    font-size: 1.25rem;
}

.hero-actions {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
}

/* Hero Visual */
.hero-visual {
    position: relative;
    z-index: 2;
}

.model-showcase {
    position: relative;
    height: 400px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: var(--border-radius-lg);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    display: flex;
    align-items: center;
    justify-content: center;
}

.model-placeholder {
    text-align: center;
    color: var(--white);
}

.model-icon {
    font-size: 4rem;
    color: var(--warning-color);
    margin-bottom: 1rem;
}

.floating-elements {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
}

.floating-card {
    position: absolute;
    background: rgba(255, 255, 255, 0.9);
    color: var(--dark-color);
    padding: 1rem;
    border-radius: var(--border-radius);
    box-shadow: var(--box-shadow-lg);
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.875rem;
    font-weight: 500;
    animation: float 6s ease-in-out infinite;
}

.floating-card:nth-child(1) {
    top: 20%;
    left: -10%;
    animation-delay: 0s;
}

.floating-card:nth-child(2) {
    top: 50%;
    right: -10%;
    animation-delay: 2s;
}

.floating-card:nth-child(3) {
    bottom: 20%;
    left: -10%;
    animation-delay: 4s;
}

.floating-card i {
    color: var(--primary-color);
}

@keyframes float {
    0%, 100% { transform: translateY(0px); }
    50% { transform: translateY(-20px); }
}

/* Secciones */
section {
    padding: var(--section-padding);
}

.section-header {
    margin-bottom: 3rem;
}

/* Productos Destacados */
.featured-section {
    background: var(--white);
}

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

.product-card {
    background: var(--white);
    border-radius: var(--border-radius-lg);
    box-shadow: var(--box-shadow);
    overflow: hidden;
    transition: var(--transition);
    cursor: pointer;
    position: relative;
}

.product-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--box-shadow-lg);
}

.product-image {
    width: 100%;
    height: 250px;
    object-fit: cover;
    background-color: var(--light-color);
}

.product-content {
    padding: 1.5rem;
}

.product-title {
    font-size: 1.25rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
    color: var(--dark-color);
}

.product-description {
    color: var(--gray-color);
    margin-bottom: 1rem;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.product-meta {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 1rem;
}

.product-price {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--success-color);
}

.product-difficulty {
    padding: 0.25rem 0.75rem;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 500;
    text-transform: uppercase;
}

.difficulty-fácil {
    background-color: var(--success-color);
    color: var(--white);
}

.difficulty-intermedio {
    background-color: var(--warning-color);
    color: var(--dark-color);
}

.difficulty-avanzado {
    background-color: var(--danger-color);
    color: var(--white);
}

.product-actions {
    display: flex;
    gap: 0.5rem;
}

.btn-product {
    flex: 1;
    padding: 0.75rem;
    border: none;
    border-radius: var(--border-radius);
    font-weight: 500;
    transition: var(--transition);
    cursor: pointer;
    text-decoration: none;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}

.btn-view-3d {
    background-color: var(--primary-color);
    color: var(--white);
}

.btn-view-3d:hover {
    background-color: #5a4fcf;
    color: var(--white);
}

.btn-add-cart {
    background-color: var(--success-color);
    color: var(--white);
}

.btn-add-cart:hover {
    background-color: #00a085;
    color: var(--white);
}

/* Categorías */
.categories-section {
    background-color: var(--light-color);
}

.category-card {
    background: var(--white);
    border-radius: var(--border-radius-lg);
    box-shadow: var(--box-shadow);
    overflow: hidden;
    transition: var(--transition);
    cursor: pointer;
    height: 100%;
}

.category-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--box-shadow-lg);
}

.category-image {
    width: 100%;
    height: 200px;
    object-fit: cover;
    background-color: var(--light-color);
}

.category-content {
    padding: 1.5rem;
    text-align: center;
}

.category-title {
    font-size: 1.25rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
    color: var(--dark-color);
}

.category-count {
    color: var(--gray-color);
    font-size: 0.875rem;
}

/* Filtros de productos */
.products-filters {
    background: var(--white);
    padding: 1.5rem;
    border-radius: var(--border-radius-lg);
    box-shadow: var(--box-shadow);
    margin-bottom: 2rem;
}

.search-box {
    position: relative;
}

.search-icon {
    position: absolute;
    right: 0.75rem;
    top: 50%;
    transform: translateY(-50%);
    color: var(--gray-color);
    pointer-events: none;
}

/* Carrito de compras */
.cart-modal {
    position: fixed;
    top: 0;
    right: -400px;
    width: 400px;
    height: 100vh;
    background: var(--white);
    box-shadow: -5px 0 20px rgba(0, 0, 0, 0.1);
    z-index: 1050;
    transition: var(--transition);
    display: flex;
    flex-direction: column;
}

.cart-modal.open {
    right: 0;
}

.cart-content {
    display: flex;
    flex-direction: column;
    height: 100%;
}

.cart-header {
    padding: 1.5rem;
    border-bottom: 1px solid #dee2e6;
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: var(--primary-color);
    color: var(--white);
}

.cart-close {
    background: none;
    border: none;
    color: var(--white);
    font-size: 1.25rem;
    cursor: pointer;
    padding: 0.5rem;
    border-radius: var(--border-radius);
    transition: var(--transition);
}

.cart-close:hover {
    background-color: rgba(255, 255, 255, 0.1);
}

.cart-body {
    flex: 1;
    overflow-y: auto;
    padding: 1rem;
}

.cart-item {
    display: flex;
    gap: 1rem;
    padding: 1rem 0;
    border-bottom: 1px solid #dee2e6;
}

.cart-item-image {
    width: 60px;
    height: 60px;
    border-radius: var(--border-radius);
    object-fit: cover;
    background-color: var(--light-color);
}

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

.cart-item-title {
    font-weight: 600;
    margin-bottom: 0.25rem;
    color: var(--dark-color);
}

.cart-item-price {
    color: var(--success-color);
    font-weight: 600;
    margin-bottom: 0.5rem;
}

.cart-item-quantity {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.quantity-btn {
    width: 30px;
    height: 30px;
    border: 1px solid #dee2e6;
    background: var(--white);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: var(--transition);
}

.quantity-btn:hover {
    background-color: var(--light-color);
}

.empty-cart {
    text-align: center;
    padding: 2rem;
    color: var(--gray-color);
}

.empty-cart i {
    font-size: 3rem;
    margin-bottom: 1rem;
    color: var(--primary-color);
}

.cart-footer {
    padding: 1.5rem;
    border-top: 1px solid #dee2e6;
    background: var(--light-color);
}

.cart-total {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--dark-color);
}

.cart-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: 1040;
    opacity: 0;
    visibility: hidden;
    transition: var(--transition);
}

.cart-overlay.show {
    opacity: 1;
    visibility: visible;
}

/* Footer */
.footer {
    padding: 3rem 0 1rem;
    border-top: 1px solid #dee2e6;
}

.footer-brand h5 {
    color: var(--white);
    margin-bottom: 1rem;
}

.footer-links {
    list-style: none;
    padding: 0;
}

.footer-links li {
    margin-bottom: 0.5rem;
}

.footer-links a {
    color: var(--gray-color);
    text-decoration: none;
    transition: var(--transition);
}

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

.social-links {
    display: flex;
    gap: 1rem;
    margin-bottom: 1rem;
}

.social-link {
    width: 40px;
    height: 40px;
    background: var(--primary-color);
    color: var(--white);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    transition: var(--transition);
}

.social-link:hover {
    background: var(--secondary-color);
    color: var(--white);
    transform: translateY(-2px);
}

.footer-divider {
    border-color: #dee2e6;
    margin: 2rem 0 1rem;
}

.footer-legal {
    display: flex;
    gap: 1rem;
    justify-content: flex-end;
}

.footer-legal a {
    color: var(--gray-color);
    text-decoration: none;
    font-size: 0.875rem;
    transition: var(--transition);
}

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

.copyright {
    color: var(--gray-color);
    font-size: 0.875rem;
}

/* Contacto */
.contact-section {
    background: linear-gradient(135deg, var(--dark-color) 0%, #1a1a1a 100%);
}

.contact-item {
    text-align: center;
    padding: 2rem 1rem;
}

.contact-item i {
    font-size: 2.5rem;
    color: var(--primary-color);
    margin-bottom: 1rem;
}

.contact-item h5 {
    color: var(--white);
    margin-bottom: 0.5rem;
}

.contact-item p {
    color: var(--gray-color);
    margin: 0;
}

/* Responsive */
@media (max-width: 768px) {
    :root {
        --section-padding: 60px 0;
        --header-height: 60px;
    }
    
    .hero-title {
        font-size: 2.5rem;
    }
    
    .section-title {
        font-size: 2rem;
    }
    
    .hero-features {
        flex-direction: column;
        gap: 1rem;
    }
    
    .hero-actions {
        flex-direction: column;
    }
    
    .products-grid {
        grid-template-columns: 1fr;
    }
    
    .cart-modal {
        width: 100%;
        right: -100%;
    }
    
    .floating-card {
        position: relative;
        margin-bottom: 1rem;
        transform: none !important;
        animation: none !important;
    }
    
    .floating-elements {
        position: static;
    }
    
    .model-showcase {
        height: 300px;
    }
}

@media (max-width: 576px) {
    .hero-title {
        font-size: 2rem;
    }
    
    .section-title {
        font-size: 1.75rem;
    }
    
    .hero-description {
        font-size: 1rem;
    }
    
    .floating-card {
        display: none;
    }
}

/* Animaciones */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.fade-in-up {
    animation: fadeInUp 0.6s ease-out;
}

/* Loading spinner */
.loading-spinner {
    padding: 3rem;
}

.spinner-border {
    width: 3rem;
    height: 3rem;
}

/* Paginación */
.pagination {
    gap: 0.25rem;
}

.page-link {
    border: 1px solid #dee2e6;
    color: var(--primary-color);
    padding: 0.5rem 0.75rem;
    border-radius: var(--border-radius);
    text-decoration: none;
    transition: var(--transition);
}

.page-link:hover {
    background-color: var(--primary-color);
    border-color: var(--primary-color);
    color: var(--white);
}

.page-item.active .page-link {
    background-color: var(--primary-color);
    border-color: var(--primary-color);
}

/* Utilidades adicionales */
.min-vh-75 {
    min-height: 75vh;
}

.text-white {
    color: var(--white) !important;
}

.text-light {
    color: var(--light-color) !important;
}

/* Estados hover para tarjetas */
.category-card:hover,
.product-card:hover {
    transform: translateY(-5px);
}

/* Focus states */
.btn:focus,
.form-control:focus,
.form-select:focus {
    box-shadow: 0 0 0 0.2rem rgba(108, 92, 231, 0.25);
    border-color: var(--primary-color);
}