/* =============================================
   D LIFE Ecommerce — CSS Principal
   Farmacia verde profesional, diseño moderno
   ============================================= */

/* Variables CSS dinámicas (sobrescritas por PHP desde DB) */
:root {
    --primary:      #0B6E4F;
    --primary-dark: #0a5e43;
    --primary-light:#3BC59D;
    --secondary:    #1F2937;
    --accent:       #3BC59D;
    --background:   #F8FAFC;
    --surface:      #ffffff;
    --text-main:    #1e293b;
    --text-muted:   #64748b;
    --border:       #e2e8f0;
    --success:      #10b981;
    --warning:      #f59e0b;
    --danger:       #ef4444;
    --radius:       12px;
    --radius-sm:    8px;
    --shadow-sm:    0 1px 3px rgba(0,0,0,0.06), 0 1px 2px rgba(0,0,0,0.04);
    --shadow-md:    0 4px 12px rgba(0,0,0,0.08);
    --shadow-lg:    0 10px 30px rgba(0,0,0,0.1);
    --transition:   all 0.25s ease;
    --font-main:    'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}

/* ==================== RESET & BASE ==================== */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; font-size: 16px; }

body {
    font-family: var(--font-main);
    background-color: var(--background);
    color: var(--text-main);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; height: auto; }
a   { color: var(--primary); text-decoration: none; transition: var(--transition); }
a:hover { color: var(--primary-dark); }

/* ==================== HEADER ==================== */
.site-header {
    position: sticky; top: 0; z-index: 1000;
    background: var(--surface);
    border-bottom: 1px solid var(--border);
    box-shadow: var(--shadow-sm);
}
.topbar {
    background: var(--primary);
    color: rgba(255,255,255,0.85);
    font-size: 0.8rem;
    padding: 6px 0;
}
.topbar a { color: rgba(255,255,255,0.85); }
.topbar a:hover { color: #fff; }

.navbar-brand { display: flex; align-items: center; gap: 12px; }
.navbar-brand .brand-logo { height: 44px; object-fit: contain; }
.navbar-brand .brand-name {
    font-size: 1.15rem; font-weight: 700;
    color: var(--text-main); line-height: 1.2;
}
.navbar-brand .brand-name span { color: var(--primary); }
.navbar-brand .brand-tagline { font-size: 0.72rem; color: var(--text-muted); }

.navbar .nav-link {
    font-size: 0.88rem; font-weight: 500;
    color: var(--text-main) !important;
    padding: 8px 12px !important;
    border-radius: var(--radius-sm);
    transition: var(--transition);
}
.navbar .nav-link:hover, .navbar .nav-link.active { color: var(--primary) !important; background: var(--primary-light); }

/* BUSCADOR */
.search-form { flex: 1; max-width: 520px; }
.search-input {
    border: 1.5px solid var(--border); border-radius: 50px;
    padding: 10px 20px; font-size: 0.9rem;
    transition: var(--transition);
}
.search-input:focus { border-color: var(--primary); box-shadow: 0 0 0 3px var(--primary-light); outline: none; }
.search-btn {
    background: var(--buttons, var(--primary)); color: #fff; border: none;
    padding: 10px 20px; border-radius: 0 50px 50px 0;
    font-size: 0.9rem; cursor: pointer; transition: var(--transition);
    margin-left: -1px;
}
.search-btn:hover { background: var(--buttons_hover, var(--buttons-hover, var(--primary-dark))) !important; }

/* Carrito e íconos nav */
.nav-icon-btn {
    position: relative; display: flex; align-items: center; justify-content: center;
    width: 40px; height: 40px; border-radius: 50%;
    color: var(--text-main); transition: var(--transition);
    background: transparent; border: none; cursor: pointer;
}
.nav-icon-btn:hover { background: var(--background); color: var(--primary); }
.nav-icon-btn .badge-count {
    position: absolute; top: -4px; right: -4px;
    background: var(--primary); color: #fff;
    font-size: 0.65rem; font-weight: 700;
    width: 18px; height: 18px; border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
}

/* ==================== HERO BANNER ==================== */
.hero-section {
    background: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 100%);
    color: #fff; padding: 80px 0 70px; position: relative; overflow: hidden;
}
.hero-section::before {
    content: ''; position: absolute; top: -30%; right: -10%; width: 500px; height: 500px;
    background: rgba(255,255,255,0.05); border-radius: 50%;
}
.hero-section::after {
    content: ''; position: absolute; bottom: -40%; left: -5%; width: 400px; height: 400px;
    background: rgba(255,255,255,0.04); border-radius: 50%;
}
.hero-title    { font-size: clamp(1.8rem, 4vw, 2.8rem); font-weight: 800; line-height: 1.15; }
.hero-subtitle { font-size: clamp(1rem, 2vw, 1.2rem); opacity: 0.85; margin: 16px 0 28px; }
.hero-badge {
    display: inline-flex; align-items: center; gap: 6px;
    background: rgba(255,255,255,0.15); backdrop-filter: blur(10px);
    border: 1px solid rgba(255,255,255,0.2);
    color: #fff; padding: 6px 16px; border-radius: 50px;
    font-size: 0.82rem; font-weight: 600; margin-bottom: 20px;
}
.hero-pill {
    background: rgba(255,255,255,0.12); border-radius: 50px;
    display: inline-flex; align-items: center; gap: 8px;
    padding: 4px 16px 4px 4px; font-size: 0.85rem;
}
.hero-pill .icon-wrap {
    width: 32px; height: 32px; background: rgba(255,255,255,0.2);
    border-radius: 50%; display: flex; align-items: center; justify-content: center;
}

/* ==================== SECCIONES ==================== */
.section-header { margin-bottom: 36px; }
.section-label {
    display: inline-block; background: var(--primary-light);
    color: var(--primary); font-size: 0.78rem; font-weight: 700;
    letter-spacing: 1.5px; text-transform: uppercase;
    padding: 4px 16px; border-radius: 50px; margin-bottom: 10px;
}
.section-title { font-size: clamp(1.4rem, 3vw, 1.9rem); font-weight: 700; color: var(--text-main); }
.section-subtitle { color: var(--text-muted); font-size: 0.95rem; max-width: 560px; }

.py-section { padding: 64px 0; }
.py-section-sm { padding: 48px 0; }

/* ==================== TARJETAS DE PRODUCTO ==================== */
.product-card {
    background: var(--surface); border-radius: var(--radius);
    overflow: hidden; transition: var(--transition);
    box-shadow: var(--shadow-sm); border: 1px solid var(--border);
    height: 100%; display: flex; flex-direction: column;
    position: relative; min-width: 0;
}
.product-card:hover {
    transform: translateY(-4px); box-shadow: var(--shadow-lg);
    border-color: var(--primary);
}

.btn-fav-toggle {
    position: absolute; top: 8px; right: 8px; z-index: 10;
    width: 32px; height: 32px; border-radius: 50%;
    background: rgba(255,255,255,0.92); border: 1px solid rgba(0,0,0,0.06);
    display: flex; align-items: center; justify-content: center;
    cursor: pointer; transition: all 0.2s ease;
    box-shadow: 0 2px 6px rgba(0,0,0,0.1); padding: 0;
}
.btn-fav-toggle:hover {
    transform: scale(1.1); background: #ffffff;
    box-shadow: 0 3px 8px rgba(0,0,0,0.15);
}
.btn-fav-toggle i { font-size: 0.92rem; line-height: 1; }

.product-card-img {
    aspect-ratio: 1 / 1; overflow: hidden;
    background: #f8fafc;
    display: flex; align-items: center; justify-content: center;
    position: relative; padding: 12px;
}
.product-card-img img {
    width: 100%; height: 100%; object-fit: contain;
    transition: transform 0.35s ease;
}
.product-card:hover .product-card-img img { transform: scale(1.06); }

.product-card-body { padding: 12px 14px 6px; flex: 1 1 auto; display: flex; flex-direction: column; min-width: 0; }
.product-brand  { font-size: 0.72rem; color: var(--text-muted); text-transform: uppercase; font-weight: 600; letter-spacing: 0.5px; margin-bottom: 2px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.product-name   { font-size: 0.88rem; font-weight: 600; color: var(--text-main); margin: 2px 0 6px; line-height: 1.35; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; min-height: 2.7em; }
.product-name:hover { color: var(--primary); }
.product-price  { font-size: 1.15rem; font-weight: 700; color: var(--primary); line-height: 1.2; }
.product-price-old { font-size: 0.80rem; text-decoration: line-through; color: var(--text-muted); margin-bottom: 1px; }

.product-card-footer {
    padding: 8px 14px 14px; margin-top: auto;
    display: flex; align-items: center; gap: 6px;
    width: 100%; box-sizing: border-box;
}

.btn-card-action {
    display: inline-flex; align-items: center; justify-content: center; gap: 4px;
    height: 34px; line-height: 1; font-size: 0.78rem; font-weight: 600;
    text-decoration: none !important; border-radius: var(--radius-sm, 8px);
    padding: 0 8px; transition: all 0.2s ease; cursor: pointer;
    white-space: nowrap; min-width: 0; box-sizing: border-box;
}
.btn-card-action i { font-size: 0.84rem; flex-shrink: 0; }
.btn-card-action .btn-text { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.btn-card-view {
    flex: 1 1 0;
    background: rgba(11, 110, 79, 0.08);
    border: 1px solid rgba(11, 110, 79, 0.25);
    color: var(--primary, #0B6E4F);
}
.btn-card-view:hover {
    background: var(--primary, #0B6E4F);
    border-color: var(--primary, #0B6E4F);
    color: #ffffff;
}

.btn-card-add {
    flex: 1.2 1 0;
    background: var(--primary, #0B6E4F);
    border: 1px solid var(--primary, #0B6E4F);
    color: #ffffff;
}
.btn-card-add:hover {
    background: var(--primary-dark, #07523a);
    border-color: var(--primary-dark, #07523a);
    color: #ffffff; transform: translateY(-1px);
}

.btn-card-out {
    flex: 1 1 0;
    background: #f1f5f9;
    border: 1px solid #e2e8f0;
    color: #94a3b8;
    cursor: not-allowed; opacity: 0.85;
}

.badge-out {
    display: inline-flex; align-items: center; gap: 4px;
    background: rgba(239,68,68,0.12); color: #dc2626;
    border: 1px solid rgba(239,68,68,0.25);
    padding: 3px 8px; border-radius: 50px;
    font-size: 0.72rem; font-weight: 600; line-height: 1.2;
    max-width: 100%; white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.badge-avail {
    display: inline-flex; align-items: center; gap: 4px;
    background: rgba(16,185,129,0.12); color: #059669;
    border: 1px solid rgba(16,185,129,0.25);
    padding: 3px 8px; border-radius: 50px;
    font-size: 0.72rem; font-weight: 600; line-height: 1.2;
    max-width: 100%; white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.badge-sale {
    position: absolute; top: 8px; left: 8px; z-index: 10;
    background: var(--danger, #dc2626); color: #fff;
    padding: 3px 8px; border-radius: 6px; font-size: 0.70rem; font-weight: 700;
    line-height: 1.2; box-shadow: 0 2px 4px rgba(0,0,0,0.15);
}

/* ==================== CATEGORÍAS ==================== */
.category-card {
    background: var(--surface); border-radius: var(--radius);
    border: 1.5px solid var(--border); padding: 20px;
    text-align: center; transition: var(--transition);
    cursor: pointer; display: block; color: var(--text-main);
    box-shadow: var(--shadow-sm);
}
.category-card:hover {
    border-color: var(--primary); background: var(--primary-light);
    transform: translateY(-3px); box-shadow: var(--shadow-md); color: var(--primary);
}
.category-icon {
    width: 52px; height: 52px; border-radius: 14px;
    background: var(--primary-light); color: var(--primary);
    display: flex; align-items: center; justify-content: center;
    font-size: 1.5rem; margin: 0 auto 12px;
    transition: var(--transition);
}
.category-icon.category-has-img {
    background: transparent !important;
    overflow: hidden;
    padding: 0;
}
.cat-thumb-img {
    width: 100%; height: 100%; object-fit: cover;
    border-radius: 14px; display: block;
    transition: transform 0.3s ease;
}
.category-card:hover .cat-thumb-img { transform: scale(1.08); }
.category-card:hover .category-icon:not(.category-has-img) { background: var(--primary); color: #fff; }
.category-name  { font-size: 0.88rem; font-weight: 600; }
.category-count { font-size: 0.75rem; color: var(--text-muted); margin-top: 4px; }

/* ==================== BOTONES ==================== */
.btn-primary-dlife {
    background: var(--buttons, var(--primary));
    color: #fff; border: none; border-radius: 50px;
    padding: 12px 28px; font-size: 0.9rem; font-weight: 600;
    cursor: pointer; transition: var(--transition);
    display: inline-flex; align-items: center; gap: 8px;
}
.btn-primary-dlife:hover {
    background: var(--buttons_hover, var(--buttons-hover, var(--primary-dark))) !important;
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(var(--primary-rgb, 11,110,79),0.3);
    opacity: 0.95; color: #fff;
}

.btn-outline-dlife {
    background: transparent; color: var(--primary);
    border: 2px solid var(--primary); border-radius: 50px;
    padding: 10px 24px; font-size: 0.9rem; font-weight: 600;
    cursor: pointer; transition: var(--transition);
    display: inline-flex; align-items: center; gap: 8px;
}
.btn-outline-dlife:hover {
    background: var(--buttons_hover, var(--primary));
    border-color: var(--buttons_hover, var(--primary));
    color: #fff; transform: translateY(-2px);
}

/* ==================== BENEFICIOS ==================== */
.benefit-item {
    display: flex; align-items: flex-start; gap: 16px;
    padding: 20px; background: var(--surface); border-radius: var(--radius);
    border: 1px solid var(--border); transition: var(--transition);
}
.benefit-item:hover { box-shadow: var(--shadow-md); border-color: rgba(var(--primary-rgb, 11,110,79),0.15); }
.benefit-icon {
    width: 48px; height: 48px; border-radius: 12px; flex-shrink: 0;
    background: var(--primary-light); color: var(--primary);
    display: flex; align-items: center; justify-content: center; font-size: 1.3rem;
}
.benefit-title   { font-weight: 600; font-size: 0.95rem; margin-bottom: 4px; }
.benefit-desc    { font-size: 0.83rem; color: var(--text-muted); }

/* ==================== TESTIMONIOS ==================== */
.testimonial-card {
    background: var(--surface); border-radius: var(--radius);
    padding: 28px; border: 1px solid var(--border);
    box-shadow: var(--shadow-sm); transition: var(--transition);
}
.testimonial-card:hover { box-shadow: var(--shadow-md); }
.testimonial-quote { font-size: 2.5rem; color: var(--primary); line-height: 0; opacity: 0.3; margin-bottom: 12px; }
.testimonial-text  { font-size: 0.9rem; color: var(--text-main); line-height: 1.7; font-style: italic; }
.testimonial-author { display: flex; align-items: center; gap: 12px; margin-top: 20px; }
.testimonial-avatar {
    width: 44px; height: 44px; border-radius: 50%;
    background: var(--primary); color: #fff;
    display: flex; align-items: center; justify-content: center;
    font-weight: 700; font-size: 1rem; overflow: hidden;
}
.testimonial-name { font-weight: 600; font-size: 0.88rem; }
.testimonial-role { font-size: 0.78rem; color: var(--text-muted); }
.star-rating { color: #fbbf24; font-size: 0.85rem; }

/* ==================== ACCORDION FAQ ==================== */
.faq-accordion .accordion-button {
    font-size: 0.92rem; font-weight: 600; color: var(--text-main);
    background: var(--surface); border-radius: var(--radius-sm) !important;
}
.faq-accordion .accordion-button:not(.collapsed) { color: var(--primary); background: var(--primary-light); }
.faq-accordion .accordion-button:focus { box-shadow: none; }
.faq-accordion .accordion-button::after { filter: none; }
.faq-accordion .accordion-item { border: 1px solid var(--border); border-radius: var(--radius-sm) !important; margin-bottom: 8px; overflow: hidden; }
.faq-accordion .accordion-body { font-size: 0.88rem; color: var(--text-muted); }

/* ==================== NEWSLETTER ==================== */
.newsletter-section {
    background: linear-gradient(135deg, var(--footer_bg, var(--footer-bg, var(--secondary))) 0%, var(--secondary-dark, #111827) 100%);
    color: #fff; padding: 60px 0;
}
.newsletter-form { max-width: 480px; margin: 24px auto 0; }
.newsletter-input {
    border: none; border-radius: 50px 0 0 50px;
    padding: 13px 20px; font-size: 0.9rem;
    flex: 1; outline: none;
}
.newsletter-btn {
    background: var(--buttons, var(--primary)); color: #fff; border: none;
    border-radius: 0 50px 50px 0; padding: 13px 24px;
    font-weight: 600; font-size: 0.9rem; cursor: pointer; transition: var(--transition);
}
.newsletter-btn:hover { background: var(--buttons_hover, var(--buttons-hover, var(--primary-dark))) !important; }

/* ==================== FOOTER ==================== */
.site-footer {
    background: var(--footer_bg, var(--footer-bg, var(--secondary))) !important;
    color: var(--footer_text, var(--footer-text, rgba(255,255,255,0.85))) !important;
    padding: 56px 0 28px;
}
.site-footer p, .site-footer span, .site-footer div, .site-footer li, .site-footer small {
    color: var(--footer_text, var(--footer-text, rgba(255,255,255,0.85)));
}
.footer-brand { margin-bottom: 20px; }
.footer-brand .brand-name { color: var(--footer_text, var(--footer-text, #ffffff)); font-size: 1.1rem; font-weight: 700; }
.footer-brand .tagline    { font-size: 0.82rem; opacity: 0.8; color: var(--footer_text, var(--footer-text, rgba(255,255,255,0.75))); margin-top: 4px; }
.footer-title { color: var(--footer_text, var(--footer-text, #ffffff)); font-size: 0.85rem; font-weight: 700; letter-spacing: 1px; text-transform: uppercase; margin-bottom: 16px; }
.footer-links { list-style: none; }
.footer-links li { margin-bottom: 10px; }
.footer-links a { color: var(--footer_text, var(--footer-text, rgba(255,255,255,0.85))); font-size: 0.87rem; opacity: 0.85; transition: var(--transition); }
.footer-links a:hover { color: var(--accent, #ffffff); opacity: 1; }
.footer-whatsapp-link { color: var(--footer_text, var(--footer-text, rgba(255,255,255,0.85))) !important; opacity: 0.9; transition: var(--transition); }
.footer-whatsapp-link:hover { color: var(--accent, #ffffff) !important; opacity: 1; }
.footer-social { display: flex; gap: 8px; margin-top: 16px; }
.social-btn {
    width: 36px; height: 36px; border-radius: 8px;
    background: rgba(255,255,255,0.1); color: var(--footer_text, var(--footer-text, rgba(255,255,255,0.85)));
    display: flex; align-items: center; justify-content: center;
    font-size: 0.9rem; transition: var(--transition);
}
.social-btn:hover { background: var(--primary); color: #fff; }
.footer-bottom { border-top: 1px solid rgba(255,255,255,0.15); padding-top: 20px; margin-top: 40px; font-size: 0.8rem; color: var(--footer_text, var(--footer-text, rgba(255,255,255,0.75))); }
.footer-legal a { color: var(--footer_text, var(--footer-text, rgba(255,255,255,0.75))); opacity: 0.8; }
.footer-legal a:hover { color: var(--accent, #ffffff); opacity: 1; }

/* ==================== SIDEBAR FILTROS ==================== */
.filter-sidebar { position: sticky; top: 80px; }
.filter-group { margin-bottom: 24px; }
.filter-title { font-size: 0.82rem; font-weight: 700; text-transform: uppercase; color: var(--text-muted); letter-spacing: 1px; margin-bottom: 12px; }
.filter-item { display: flex; justify-content: space-between; align-items: center; padding: 6px 0; }
.filter-item label { font-size: 0.87rem; cursor: pointer; display: flex; align-items: center; gap: 8px; }
.filter-count { font-size: 0.75rem; color: var(--text-muted); background: var(--background); padding: 1px 8px; border-radius: 20px; }

/* ==================== DETALLE PRODUCTO ==================== */
.product-detail-img { border-radius: var(--radius); overflow: hidden; background: #f8fafc; }
.product-detail-price { font-size: 2rem; font-weight: 800; color: var(--primary); }
.product-detail-old   { font-size: 1rem; text-decoration: line-through; color: var(--text-muted); }
.product-qty { display: flex; align-items: center; gap: 0; }
.qty-btn {
    width: 36px; height: 36px; background: var(--background); border: 1px solid var(--border);
    display: flex; align-items: center; justify-content: center; cursor: pointer;
    font-size: 1rem; transition: var(--transition); user-select: none;
}
.qty-btn:hover { background: var(--primary); color: #fff; border-color: var(--primary); }
.qty-input {
    width: 56px; height: 36px; text-align: center; border: 1px solid var(--border);
    border-left: none; border-right: none; font-size: 0.95rem; font-weight: 600;
}
.product-tabs .nav-link { font-size: 0.9rem; font-weight: 500; color: var(--text-muted); }
.product-tabs .nav-link.active { color: var(--primary); }

/* ==================== BUSCADOR RESULTADOS ==================== */
.search-result-header { font-size: 0.88rem; color: var(--text-muted); }
.search-result-header strong { color: var(--text-main); }

/* ==================== BREADCRUMB ==================== */
.breadcrumb { font-size: 0.82rem; }
.breadcrumb-item + .breadcrumb-item::before { color: var(--text-muted); }

/* ==================== AVISO FARMACIA ==================== */
.pharmacy-disclaimer {
    background: rgba(245,158,11,0.08); border: 1px solid rgba(245,158,11,0.2);
    border-radius: var(--radius-sm); padding: 12px 16px;
    font-size: 0.82rem; color: #92400e;
    display: flex; align-items: flex-start; gap: 10px;
}

/* ==================== RESPONSIVE ==================== */
@media (max-width: 575px) {
    .hero-section { padding: 50px 0 40px; }
    .py-section { padding: 36px 0; }
    .py-section-sm { padding: 28px 0; }

    /* Tarjetas de Producto en Pantallas Pequeñas */
    .product-card {
        border-radius: calc(var(--radius, 12px) - 2px);
    }
    .product-card-img {
        aspect-ratio: 1 / 1;
        padding: 8px;
    }
    .product-card-body {
        padding: 8px 8px 4px;
    }
    .product-brand {
        font-size: 0.65rem;
        letter-spacing: 0.3px;
        margin-bottom: 2px;
    }
    .product-name {
        font-size: 0.78rem;
        line-height: 1.28;
        min-height: 2.56em;
        margin: 2px 0 4px;
        -webkit-line-clamp: 2;
    }
    .product-price {
        font-size: 1.02rem;
    }
    .product-price-old {
        font-size: 0.72rem;
    }
    .badge-out,
    .badge-avail {
        font-size: 0.66rem;
        padding: 2px 6px;
        gap: 3px;
    }
    .badge-sale {
        top: 6px; left: 6px;
        font-size: 0.64rem;
        padding: 2px 6px;
    }
    .btn-fav-toggle {
        width: 28px; height: 28px;
        top: 8px; right: 8px;
    }
    .btn-fav-toggle i {
        font-size: 0.80rem;
    }
    .product-card-footer {
        padding: 4px 6px 8px;
        gap: 4px;
    }
    .btn-card-action {
        height: 30px;
        padding: 0 4px;
        font-size: 0.72rem;
        gap: 3px;
    }
    .btn-card-action i {
        font-size: 0.76rem;
    }
    .btn-card-action .btn-text {
        font-size: 0.70rem;
    }
}

@media (max-width: 370px) {
    .product-card-body {
        padding: 6px 6px 4px;
    }
    .product-name {
        font-size: 0.74rem;
    }
    .product-price {
        font-size: 0.94rem;
    }
    .product-card-footer {
        padding: 3px 4px 6px;
        gap: 3px;
    }
    .btn-card-action {
        height: 28px;
        padding: 0 2px;
        font-size: 0.68rem;
    }
    .btn-card-action .btn-text {
        font-size: 0.66rem;
    }
}

@media (max-width: 991px) {
    .search-form { max-width: 100%; order: 3; }
    .site-header .navbar { flex-wrap: wrap; }
}

/* ==================== LAZY LOADING ==================== */
img[loading="lazy"] { opacity: 0; transition: opacity 0.4s; }
img[loading="lazy"].loaded { opacity: 1; }

/* ==================== ANIMACIONES ==================== */
@keyframes fadeUp {
    from { opacity: 0; transform: translateY(20px); }
    to   { opacity: 1; transform: translateY(0); }
}
.animate-fadeUp { animation: fadeUp 0.5s ease forwards; }

@keyframes pulse-green {
    0%, 100% { box-shadow: 0 0 0 0 rgba(11,110,79,0.3); }
    50%       { box-shadow: 0 0 0 8px rgba(11,110,79,0); }
}
.pulse-cta { animation: pulse-green 2.5s infinite; }

/* CLASSIC THEME HERO CAROUSEL SLIDER */
.classic-hero-slider {
    position: relative;
    background: #0f172a;
    overflow: hidden;
}
.classic-hero-slider .carousel-item {
    height: 460px;
    background-color: #0f172a;
    position: relative;
}
.classic-hero-slider .carousel-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    filter: brightness(0.88);
}
.classic-hero-slider .carousel-caption {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    display: flex;
    align-items: center;
    justify-content: flex-start;
    padding: 0 8%;
    background: linear-gradient(90deg, rgba(0,0,0,0.70) 0%, rgba(0,0,0,0.35) 55%, rgba(0,0,0,0.05) 100%);
    text-align: left;
}
.classic-hero-slider .caption-content {
    max-width: 650px;
}
.classic-hero-slider .carousel-control-prev,
.classic-hero-slider .carousel-control-next {
    width: 48px;
    height: 48px;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(255,255,255,0.25);
    backdrop-filter: blur(8px);
    border-radius: 50%;
    margin: 0 20px;
    opacity: 0;
    transition: all 0.3s ease;
    border: 1px solid rgba(255,255,255,0.3);
}
.classic-hero-slider:hover .carousel-control-prev,
.classic-hero-slider:hover .carousel-control-next {
    opacity: 1;
}
.classic-hero-slider .carousel-control-prev:hover,
.classic-hero-slider .carousel-control-next:hover {
    background: rgba(255,255,255,0.6);
    color: #111;
}
.classic-hero-slider .carousel-indicators {
    margin-bottom: 18px;
}
.classic-hero-slider .carousel-indicators button {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background-color: rgba(255,255,255,0.5);
    margin: 0 5px;
    border: none;
    transition: all 0.25s ease;
}
.classic-hero-slider .carousel-indicators button.active {
    width: 28px;
    border-radius: 10px;
    background-color: var(--primary, #0B6E4F);
}
@media (max-width: 767px) {
    .classic-hero-slider .carousel-item {
        height: 320px;
    }
    .classic-hero-slider .carousel-caption {
        padding: 0 20px;
        background: linear-gradient(0deg, rgba(0,0,0,0.85) 0%, rgba(0,0,0,0.3) 100%);
        align-items: flex-end;
        padding-bottom: 35px;
    }
    .classic-hero-slider .caption-content h1 {
        font-size: 1.35rem !important;
    }
    .classic-hero-slider .caption-content p {
        font-size: 0.82rem !important;
        display: -webkit-box;
        -webkit-line-clamp: 2;
        -webkit-box-orient: vertical;
        overflow: hidden;
    }
}

/* FLOATING CONTACT CHAT CONTAINER (WhatsApp & Messenger) */
.floating-contact-container {
    position: fixed;
    bottom: 110px;
    right: 28px;
    display: flex;
    flex-direction: column-reverse;
    align-items: center;
    gap: 14px;
    z-index: 1030;
}

.whatsapp-float, .messenger-float {
    position: relative;
    background-color: #25d366;
    color: #fff;
    border-radius: 50px;
    text-align: center;
    font-size: 28px;
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.22);
    display: flex;
    align-items: center;
    justify-content: center;
    width: 58px;
    height: 58px;
    transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
    text-decoration: none !important;
}

.messenger-float {
    background: linear-gradient(135deg, #00B2FF 0%, #006AFF 50%, #8A2BE2 100%);
    box-shadow: 0 4px 14px rgba(0, 106, 255, 0.35);
}

.whatsapp-float:hover {
    background-color: #20ba5a;
    color: #fff;
    transform: scale(1.1);
    box-shadow: 0 6px 18px rgba(37, 211, 102, 0.45);
}

.messenger-float:hover {
    background: linear-gradient(135deg, #00C6FF 0%, #0072FF 50%, #9B51E0 100%);
    color: #fff;
    transform: scale(1.1);
    box-shadow: 0 6px 18px rgba(0, 106, 255, 0.55);
}

.whatsapp-float i, .messenger-float i {
    line-height: 1;
}

.whatsapp-float::before, .messenger-float::before {
    content: '';
    position: absolute;
    width: 100%;
    height: 100%;
    border-radius: 50%;
    opacity: 0.6;
    z-index: -1;
}

.whatsapp-float::before {
    background-color: #25d366;
    animation: whatsapp-pulse 2.2s infinite;
}

.messenger-float::before {
    background: linear-gradient(135deg, #00B2FF, #006AFF);
    animation: messenger-pulse 2.4s infinite;
}

@keyframes whatsapp-pulse {
    0% { transform: scale(1); opacity: 0.6; }
    100% { transform: scale(1.55); opacity: 0; }
}

@keyframes messenger-pulse {
    0% { transform: scale(1); opacity: 0.6; }
    100% { transform: scale(1.55); opacity: 0; }
}

.whatsapp-tooltip, .messenger-tooltip {
    position: absolute;
    right: 74px;
    background-color: #1e293b;
    color: #fff;
    padding: 8px 14px;
    border-radius: 10px;
    font-size: 0.82rem;
    font-weight: 600;
    white-space: nowrap;
    opacity: 0;
    visibility: hidden;
    transition: all 0.25s ease;
    box-shadow: 0 4px 14px rgba(0,0,0,0.18);
    pointer-events: none;
}

.whatsapp-tooltip::after, .messenger-tooltip::after {
    content: '';
    position: absolute;
    top: 50%;
    right: -6px;
    transform: translateY(-50%);
    border-width: 6px 0 6px 6px;
    border-style: solid;
    border-color: transparent transparent transparent #1e293b;
}

.whatsapp-float:hover .whatsapp-tooltip,
.messenger-float:hover .messenger-tooltip {
    opacity: 1;
    visibility: visible;
    right: 68px;
}

@media (max-width: 767px) {
    .floating-contact-container {
        bottom: 90px;
        right: 16px;
        gap: 10px;
    }
    .whatsapp-float, .messenger-float {
        width: 48px;
        height: 48px;
        font-size: 24px;
    }
    .whatsapp-tooltip, .messenger-tooltip {
        display: none;
    }
}

#backToTop {
    position: fixed;
    bottom: 24px;
    right: 24px;
    z-index: 1020;
    width: 42px;
    height: 42px;
    border-radius: 50%;
    background: var(--primary, #0B6E4F);
    color: #ffffff;
    border: none;
    box-shadow: 0 4px 12px rgba(0,0,0,0.2);
    cursor: pointer;
    display: none;
    align-items: center;
    justify-content: center;
    font-size: 1.05rem;
    transition: all 0.25s ease;
}
#backToTop:hover {
    background: var(--primary-dark, #07523a);
    transform: translateY(-2px);
}
@media (max-width: 767px) {
    #backToTop {
        bottom: 18px;
        right: 14px;
        width: 38px;
        height: 38px;
        font-size: 0.95rem;
    }
}

/* ==================== CARRITO & CHECKOUT ADICIONALES ==================== */
#cartOffcanvas {
    width: 380px;
    max-width: 100vw;
    z-index: 1045;
}
.offcanvas {
    border-top-left-radius: 16px;
    border-bottom-left-radius: 16px;
    box-shadow: var(--shadow-lg);
}
.offcanvas-header {
    background: var(--background);
}
#cartItemsList {
    overflow-x: hidden !important;
    overflow-y: auto !important;
}
#cartItemsList::-webkit-scrollbar {
    width: 5px;
}
#cartItemsList::-webkit-scrollbar-track {
    background: #f1f5f9;
}
#cartItemsList::-webkit-scrollbar-thumb {
    background: #cbd5e1;
    border-radius: 4px;
}
#cartItemsList::-webkit-scrollbar-thumb:hover {
    background: #94a3b8;
}
.offcanvas .btn-close:focus {
    box-shadow: none;
}
.qty-btn {
    border: 1px solid var(--border);
    background: #fff;
    color: var(--text-main);
    transition: var(--transition);
}
.qty-btn:hover {
    background: var(--background);
}
.qty-input {
    border-top: 1px solid var(--border);
    border-bottom: 1px solid var(--border);
    border-left: none;
    border-right: none;
    text-align: center;
}
/* Breadcrumbs custom */
.breadcrumb-item a {
    color: var(--text-muted);
    font-size: 0.88rem;
    font-weight: 500;
}
.breadcrumb-item a:hover {
    color: var(--primary);
}
.breadcrumb-item.active {
    font-size: 0.88rem;
    font-weight: 600;
    color: var(--text-main);
}

/* ==================== PAGINACIÓN ADAPTABLE ==================== */
.pagination {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    margin-bottom: 0.5rem;
}
.pagination .page-item .page-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 38px;
    height: 38px;
    padding: 0 14px;
    font-size: 0.88rem;
    font-weight: 600;
    color: var(--text-main, #1e293b);
    background-color: #ffffff;
    border: 1px solid var(--border, #e2e8f0);
    border-radius: var(--radius-sm, 8px) !important;
    box-shadow: 0 1px 2px rgba(0,0,0,0.04);
    transition: all 0.2s ease;
    text-decoration: none;
}
.pagination .page-item .page-link:hover {
    color: var(--primary, #0B6E4F);
    background-color: rgba(11, 110, 79, 0.08);
    border-color: var(--primary, #0B6E4F);
    transform: translateY(-1px);
}
.pagination .page-item.active .page-link {
    color: #ffffff !important;
    background-color: var(--primary, #0B6E4F) !important;
    border-color: var(--primary, #0B6E4F) !important;
    box-shadow: 0 2px 8px rgba(11, 110, 79, 0.28);
    font-weight: 700;
}
.pagination .page-item.disabled .page-link {
    color: var(--text-muted, #64748b);
    background-color: #f8fafc;
    border-color: var(--border, #e2e8f0);
    opacity: 0.7;
    cursor: not-allowed;
    box-shadow: none;
    transform: none;
}

