/* ============================================ */
/* CLASE 1 - ESTILOS PERSONALIZADOS             */
/* Variables de color (tema principal)          */
/* ============================================ */

:root {
    /* Paleta de colores principal */
    --primary-color: #8B4513;      /* Marrón artesanal */
    --primary-dark: #5C2E0B;       /* Marrón oscuro */
    --primary-light: #D2691E;       /* Marrón claro */
    --accent-color: #E67E22;        /* Naranja cálido */
    --accent-hover: #D35400;        /* Naranja más intenso */
    --bg-light: #FFF8F0;            /* Crema cálido */
    --bg-white: #FFFFFF;
    --text-dark: #2C1810;           /* Texto principal */
    --text-muted: #6B4C3B;          /* Texto secundario */
    --success: #25D366;             /* Color WhatsApp */
    
    /* Tipografía */
    --font-primary: 'Inter', sans-serif;
    --font-display: 'Playfair Display', serif;
    
    /* Sombras */
    --shadow-sm: 0 2px 8px rgba(0,0,0,0.05);
    --shadow-md: 0 4px 12px rgba(0,0,0,0.1);
    --shadow-lg: 0 8px 24px rgba(0,0,0,0.12);
}

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

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

/* Tipografía */
h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-display);
    font-weight: 600;
}

.text-accent {
    color: var(--accent-color);
}

/* ============================================ */
/* NAVEGACIÓN                                   */
/* ============================================ */

#mainNav {
    background: rgba(255, 248, 240, 0.95);
    backdrop-filter: blur(10px);
    box-shadow: var(--shadow-sm);
    padding: 0.8rem 0;
    transition: all 0.3s ease;
}

.navbar-brand {
    font-family: var(--font-display);
    font-size: 1.6rem;
    font-weight: 700;
}

.brand-text {
    color: var(--primary-color);
}

.brand-text .text-accent {
    color: var(--accent-color);
}

.nav-link {
    font-weight: 500;
    color: var(--text-dark);
    transition: color 0.3s ease;
    margin: 0 0.5rem;
}

.nav-link:hover,
.nav-link.active {
    color: var(--accent-color);
}

/* Badge del carrito */
.cart-icon {
    position: relative;
}

.cart-badge {
    position: absolute;
    top: -5px;
    right: -10px;
    background: var(--accent-color);
    color: white;
    font-size: 0.7rem;
    font-weight: bold;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* ============================================ */
/* SECCIÓN HERO                                 */
/* ============================================ */

.hero-section {
    min-height: 80vh;
    display: flex;
    align-items: center;
    padding: 4rem 0;
    background: linear-gradient(135deg, var(--bg-light) 0%, #FFF 100%);
}

.hero-content h1 {
    font-size: 3.5rem;
    line-height: 1.2;
    margin-bottom: 1.5rem;
}

.btn-primary {
    background: var(--primary-color);
    border-color: var(--primary-color);
    padding: 0.8rem 2rem;
    font-weight: 500;
    transition: all 0.3s ease;
}

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

.btn-outline-light {
    border: 2px solid var(--primary-color);
    color: var(--primary-color);
}

.btn-outline-light:hover {
    background: var(--primary-color);
    border-color: var(--primary-color);
    color: white;
}

.btn-whatsapp {
    background: var(--success);
    color: white;
    font-weight: 600;
    padding: 0.8rem 2rem;
    border-radius: 50px;
    transition: all 0.3s ease;
}

.btn-whatsapp:hover {
    background: #128C7E;
    color: white;
    transform: scale(1.02);
    box-shadow: var(--shadow-md);
}

/* ============================================ */
/* TARJETAS DE PRODUCTOS (CARDS)                */
/* ============================================ */

.product-card {
    background: var(--bg-white);
    border-radius: 20px;
    overflow: hidden;
    transition: all 0.3s ease;
    box-shadow: var(--shadow-sm);
    height: 100%;
    cursor: pointer;
}

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

.product-image {
    width: 100%;
    height: 200px;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.product-card:hover .product-image {
    transform: scale(1.05);
}

.product-body {
    padding: 1.25rem;
}

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

.product-description {
    font-size: 0.85rem;
    color: var(--text-muted);
    margin-bottom: 1rem;
    min-height: 60px;
}

.product-price {
    font-size: 1.3rem;
    font-weight: 700;
    color: var(--accent-color);
    margin-bottom: 1rem;
}

.product-price small {
    font-size: 0.75rem;
    font-weight: normal;
    color: var(--text-muted);
}

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

.btn-add-cart {
    flex: 1;
    background: var(--primary-color);
    color: white;
    border: none;
    padding: 0.5rem;
    border-radius: 10px;
    font-weight: 500;
    transition: all 0.3s ease;
}

.btn-add-cart:hover {
    background: var(--primary-dark);
}

.btn-quantity {
    width: 36px;
    height: 36px;
    border-radius: 10px;
    border: 1px solid #ddd;
    background: white;
    font-weight: bold;
}

/* ============================================ */
/* CATEGORÍAS (FILTROS)                         */
/* ============================================ */

.category-btn {
    background: white;
    border: 2px solid var(--primary-light);
    padding: 0.7rem 1.5rem;
    border-radius: 50px;
    font-weight: 500;
    color: var(--text-dark);
    transition: all 0.3s ease;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}

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

.category-btn i {
    font-size: 1.1rem;
}

/* ============================================ */
/* BUSCADOR                                     */
/* ============================================ */

.search-box {
    position: relative;
}

.search-box i {
    position: absolute;
    left: 15px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-muted);
}

.search-box input {
    padding-left: 40px;
    border-radius: 50px;
    border: 1px solid #ddd;
    height: 48px;
}

/* ============================================ */
/* SECCIÓN NOSOTROS                             */
/* ============================================ */

.about-section {
    padding: 5rem 0;
    background: white;
}

.feature-box {
    text-align: center;
    padding: 1.5rem;
    background: var(--bg-light);
    border-radius: 15px;
    transition: all 0.3s ease;
}

.feature-box i {
    font-size: 2rem;
    color: var(--accent-color);
    margin-bottom: 1rem;
}

.feature-box h5 {
    font-size: 1rem;
    margin-bottom: 0;
}

/* ============================================ */
/* CONTACTO                                     */
/* ============================================ */

.contact-section {
    padding: 5rem 0;
    background: var(--bg-light);
}

.contact-info {
    background: white;
    border-radius: 20px;
    padding: 2rem;
}

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

.info-item i {
    font-size: 1.5rem;
    color: var(--accent-color);
    width: 40px;
    text-align: center;
}

.info-item h6 {
    margin-bottom: 0.2rem;
    font-size: 0.9rem;
}

.info-item p {
    margin-bottom: 0;
    color: var(--text-muted);
    font-size: 0.9rem;
}

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

.footer {
    background: var(--text-dark);
    color: #ccc;
    padding: 4rem 0 2rem;
}

.footer h5 {
    color: white;
    margin-bottom: 1.2rem;
    font-size: 1.1rem;
}

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

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

.footer-links a {
    color: #ccc;
    text-decoration: none;
    transition: color 0.3s ease;
}

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

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

.social-links a {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    background: rgba(255,255,255,0.1);
    border-radius: 50%;
    color: white;
    transition: all 0.3s ease;
}

.social-links a:hover {
    background: var(--accent-color);
    transform: translateY(-3px);
}

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

@media (max-width: 768px) {
    .hero-section {
        min-height: auto;
        text-align: center;
        padding: 3rem 0;
    }
    
    .hero-content h1 {
        font-size: 2.2rem;
    }
    
    .section-title {
        font-size: 1.8rem;
    }
    
    .product-card {
        margin-bottom: 1rem;
    }
    
    .category-btn {
        padding: 0.5rem 1rem;
        font-size: 0.85rem;
    }
}

/* ============================================ */
/* ANIMACIONES                                  */
/* ============================================ */

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

.product-card {
    animation: fadeInUp 0.5s ease forwards;
}

/* ============================================ */
/* ESTILOS DEL CARRITO (Offcanvas)              */
/* ============================================ */

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

.cart-item-info {
    display: flex;
    gap: 0.75rem;
}

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

.cart-item-title {
    font-size: 0.95rem;
    font-weight: 600;
    margin-bottom: 0.25rem;
}

.cart-item-price {
    font-size: 0.8rem;
    color: var(--text-muted);
}

.cart-item-controls {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.5rem;
}

.quantity-control {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    background: #f5f5f5;
    border-radius: 30px;
    padding: 0.25rem;
}

.qty-btn {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    border: none;
    background: white;
    cursor: pointer;
    transition: all 0.2s ease;
}

.qty-btn:hover {
    background: var(--accent-color);
    color: white;
}

.qty-value {
    min-width: 30px;
    text-align: center;
    font-weight: 600;
}

.cart-item-subtotal {
    font-weight: 700;
    color: var(--accent-color);
    min-width: 70px;
    text-align: right;
}

.cart-item-remove {
    background: none;
    border: none;
    color: #dc3545;
    cursor: pointer;
    transition: all 0.2s ease;
}

.cart-item-remove:hover {
    transform: scale(1.1);
}

/* ============================================ */
/* NOTIFICACIONES TOAST                         */
/* ============================================ */

.toast-notification {
    position: fixed;
    bottom: 20px;
    right: 20px;
    z-index: 9999;
    background: white;
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.15);
    transform: translateX(400px);
    transition: transform 0.3s ease;
    max-width: 320px;
}

.toast-notification.show {
    transform: translateX(0);
}

.toast-content {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 20px;
}

.toast-notification.success .toast-content {
    border-left: 4px solid #28a745;
}

.toast-notification.success i {
    color: #28a745;
}

.toast-notification.warning .toast-content {
    border-left: 4px solid #ffc107;
}

.toast-notification.warning i {
    color: #ffc107;
}

/* ============================================ */
/* ANIMACIÓN DEL CARRITO                        */
/* ============================================ */

.cart-animation {
    animation: cartShake 0.5s ease;
}

@keyframes cartShake {
    0%, 100% { transform: translateX(0); }
    25% { transform: translateX(-5px); }
    75% { transform: translateX(5px); }
}

/* ============================================ */
/* BADGE DE PRODUCTO DESTACADO                  */
/* ============================================ */

.product-image-wrapper {
    position: relative;
    overflow: hidden;
}

.product-badge {
    position: absolute;
    top: 10px;
    right: 10px;
    background: var(--accent-color);
    color: white;
    padding: 4px 10px;
    border-radius: 20px;
    font-size: 0.7rem;
    font-weight: 600;
    z-index: 1;
}

/* ============================================ */
/* ESTILOS DEL PANEL ADMIN                      */
/* ============================================ */

.admin-category {
    margin-bottom: 2rem;
    border: 1px solid #eee;
    border-radius: 12px;
    overflow: hidden;
}

.admin-category-title {
    background: #f8f9fa;
    padding: 0.75rem 1rem;
    margin: 0;
    font-size: 1rem;
    border-bottom: 1px solid #eee;
}

.admin-price-input {
    font-weight: 600;
    color: var(--accent-color);
}

.admin-notifications {
    margin-bottom: 1rem;
}

/* ============================================ */
/* SECCIÓN DE CONTACTO MEJORADA                 */
/* ============================================ */

.contact-section {
    background: linear-gradient(135deg, var(--bg-light) 0%, #fff 100%);
}

.btn-whatsapp {
    background: #25D366;
    color: white;
    border: none;
    border-radius: 50px;
    padding: 12px 30px;
    font-weight: 600;
    transition: all 0.3s ease;
}

.btn-whatsapp:hover {
    background: #128C7E;
    transform: scale(1.02);
    box-shadow: 0 4px 15px rgba(37, 211, 102, 0.3);
}

/* Placeholders elegantes para imágenes */
.product-image {
    width: 100%;
    height: 200px;
    object-fit: cover;
    transition: transform 0.3s ease;
    background: linear-gradient(135deg, #f5f5f5 0%, #e0e0e0 100%);
}

.product-image[src=""] {
    opacity: 0.6;
}

/* Efecto de carga lazy */
.product-image[lazy=loading] {
    filter: blur(5px);
}

.product-image[lazy=loaded] {
    filter: blur(0);
    transition: filter 0.3s ease;
}

/* ============================================ */
/* TARJETAS DE PROMOCIONES                      */
/* ============================================ */

.promo-card {
    background: white;
    border-radius: 20px;
    overflow: hidden;
    box-shadow: var(--shadow-md);
    transition: all 0.3s ease;
    position: relative;
}

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

.promo-badge {
    position: absolute;
    top: 15px;
    right: 15px;
    background: var(--brand-secondary);
    color: white;
    padding: 5px 12px;
    border-radius: 20px;
    font-weight: bold;
    font-size: 0.9rem;
    z-index: 1;
    box-shadow: 0 2px 5px rgba(0,0,0,0.2);
}

.promo-image {
    width: 100%;
    height: 180px;
    object-fit: cover;
}

.promo-body {
    padding: 1.5rem;
}

.promo-title {
    font-size: 1.2rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
    color: var(--brand-primary);
}

.promo-description {
    color: var(--text-secondary);
    font-size: 0.9rem;
    margin-bottom: 1rem;
}

.promo-code {
    background: #f5f5f5;
    padding: 0.5rem;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 1rem;
}

.promo-code span {
    font-size: 0.8rem;
    color: var(--text-secondary);
}

.promo-code strong {
    font-family: monospace;
    font-size: 1rem;
    color: var(--brand-secondary);
}

.btn-copy-code {
    background: none;
    border: none;
    color: var(--brand-primary);
    cursor: pointer;
    transition: color 0.3s ease;
}

.btn-copy-code:hover {
    color: var(--brand-secondary);
}

.promo-vigencia {
    font-size: 0.8rem;
    color: var(--text-secondary);
    margin-bottom: 1rem;
}

.btn-promo {
    width: 100%;
    background: var(--gradient-primary);
    color: white;
    border: none;
    padding: 0.7rem;
    border-radius: 10px;
    font-weight: 600;
    transition: all 0.3s ease;
}

.btn-promo:hover {
    transform: scale(1.02);
    box-shadow: var(--shadow-md);
}

/* ============================================ */
/* TESTIMONIOS DE CLIENTES                      */
/* ============================================ */

.testimonios-section {
    background: var(--bg-secondary);
}

.testimonios-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 2rem;
}

.testimonio-card {
    background: white;
    border-radius: 20px;
    padding: 1.5rem;
    box-shadow: var(--shadow-sm);
    transition: all 0.3s ease;
}

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

.testimonio-header {
    display: flex;
    gap: 1rem;
    margin-bottom: 1rem;
}

.testimonio-avatar {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    overflow: hidden;
    background: var(--brand-primary-light);
}

.testimonio-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.testimonio-info h4 {
    font-size: 1.1rem;
    margin-bottom: 0.25rem;
}

.testimonio-ubicacion {
    font-size: 0.8rem;
    color: var(--text-secondary);
    margin-bottom: 0.25rem;
}

.testimonio-rating {
    color: #FFD700;
    font-size: 0.9rem;
    letter-spacing: 2px;
}

.testimonio-body {
    position: relative;
    margin: 1rem 0;
    padding: 0 1rem;
}

.testimonio-quote {
    position: absolute;
    top: -10px;
    left: -10px;
    font-size: 2rem;
    color: var(--brand-primary-light);
    opacity: 0.3;
}

.testimonio-body p {
    font-style: italic;
    line-height: 1.6;
    color: var(--text-primary);
}

.testimonio-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 1rem;
    padding-top: 1rem;
    border-top: 1px solid #eee;
    font-size: 0.8rem;
}

.producto-mencionado {
    background: var(--bg-primary);
    padding: 0.25rem 0.75rem;
    border-radius: 20px;
    color: var(--brand-primary);
}

.testimonio-fecha {
    color: var(--text-secondary);
}

@media (max-width: 768px) {
    .testimonios-grid {
        grid-template-columns: 1fr;
    }
}

/* ============================================ */
/* MAPA Y UBICACIÓN                             */
/* ============================================ */

.map-container {
    border-radius: 20px;
    overflow: hidden;
    box-shadow: var(--shadow-md);
    transition: all 0.3s ease;
}

.map-container:hover {
    transform: scale(1.02);
    box-shadow: var(--shadow-lg);
}

.map-container iframe {
    width: 100%;
    height: 350px;
    border: none;
}