/*
 * Barista en Casa — Marketplace CSS
 * Paleta café: espresso brown + caramel amber
 */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&family=Poppins:wght@600;700;800;900&display=swap');

:root {
    --mk-primary:       #5C2D0A;
    --mk-primary-hover: #4A2308;
    --mk-secondary:     #A0522D;
    --mk-accent:        #C87941;
    --mk-dark:          #1C0F08;
    --mk-light:         #FBF5EB;
    --mk-success:       #3D7A3C;
    --mk-warning:       #f59e0b;
    --mk-danger:        #ef4444;
    --mk-text:          #4b3728;
    --mk-shadow-sm:     0 1px 3px rgba(0,0,0,0.1);
    --mk-shadow-md:     0 4px 6px -1px rgba(0,0,0,0.1), 0 2px 4px -1px rgba(0,0,0,0.06);
    --mk-shadow-hover:  0 10px 30px rgba(92,45,10,0.18);
    --mk-radius:        12px;
    --mk-transition:    all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    --star-gold:        #f59e0b;
}

html, body { overflow-x: hidden; max-width: 100%; }

body.marketplace-body {
    font-family: 'Inter', sans-serif;
    color: var(--mk-text);
    background: white;
    margin: 0; padding: 0; line-height: 1.6;
}
h1,h2,h3,h4,h5,h6 { font-family: 'Poppins', sans-serif; color: #1C0F08; line-height: 1.2; }

.mk-container { max-width: 1400px; margin: 0 auto; padding: 0 20px; }

/* UTILITIES */
.d-flex { display: flex; }
.align-center { align-items: center; }
.justify-between { justify-content: space-between; }
.justify-center { justify-content: center; }
.gap-2 { gap: 0.5rem; }
.gap-3 { gap: 1rem; }
.gap-4 { gap: 1.5rem; }
.flex-1 { flex: 1; }
.text-center { text-align: center; }
.text-white { color: white; }
.text-gray-500 { color: #6b7280; }
.text-primary { color: var(--mk-primary); }
.text-danger { color: var(--mk-danger); }
.text-success { color: var(--mk-success); }
.fw-bold { font-weight: 700; }
.fs-xs { font-size: 0.75rem; }
.fs-sm { font-size: 0.85rem; }
.fs-md { font-size: 1rem; }
.fs-lg { font-size: 1.15rem; }
.uppercase { text-transform: uppercase; }
.mt-1 { margin-top: 0.25rem; }
.mt-2 { margin-top: 0.5rem; }
.mt-3 { margin-top: 1rem; }
.mt-4 { margin-top: 1.5rem; }
.mt-5 { margin-top: 3rem; }
.mb-0 { margin-bottom: 0; }
.mb-2 { margin-bottom: 0.5rem; }
.mb-3 { margin-bottom: 1rem; }
.mb-4 { margin-bottom: 1.5rem; }
.py-4 { padding-top: 1.5rem; padding-bottom: 1.5rem; }
.py-5 { padding-top: 3rem; padding-bottom: 3rem; }
.mx-4 { margin-left: 1.5rem; margin-right: 1.5rem; }
.ml-3 { margin-left: 1rem; }
.ml-4 { margin-left: 1.5rem; }
.w-100 { width: 100%; }
.max-w-md { max-width: 32rem; }
.mx-auto { margin-left: auto; margin-right: auto; }
.border-top { border-top: 1px solid #e5e7eb; }
.border-gray-700 { border-color: #374151; }
ul { list-style: none; padding: 0; margin: 0; }
a { text-decoration: none; color: inherit; }

/* BOTONES */
.btn-primary-large {
    background: linear-gradient(135deg, var(--mk-primary), var(--mk-secondary));
    color: white; padding: 16px 32px; border-radius: 8px;
    font-weight: 700; font-size: 1.05rem; transition: var(--mk-transition);
    border: none; cursor: pointer; display: inline-block;
}
.btn-primary-large:hover { transform: translateY(-2px); box-shadow: 0 10px 20px rgba(92,45,10,0.3); color: white; }
.btn-outline-large {
    background: transparent; border: 2px solid var(--mk-primary);
    color: var(--mk-primary); padding: 12px 32px; border-radius: 8px;
    font-weight: 700; transition: var(--mk-transition); cursor: pointer; display: inline-block;
}
.btn-outline-large:hover { background: var(--mk-primary); color: white; }
.btn-dark-large {
    background: var(--mk-dark); color: white; padding: 0 32px; height: 56px;
    border-radius: 8px; font-weight: 700; border: none; cursor: pointer;
}
.btn-dark-large:hover { background: #2C1A0E; }

/* INPUTS */
.mk-input-large {
    height: 56px; border-radius: 8px; border: 1px solid #e5e7eb;
    padding: 0 20px; font-size: 1rem; outline: none; background: white;
}
.mk-input-large:focus { border-color: var(--mk-primary); box-shadow: 0 0 0 3px rgba(92,45,10,0.15); }

/* TOPBAR */
.mk-topbar {
    background: var(--mk-dark); color: #d6c5b5; height: 40px;
    font-size: 13px; display: flex; align-items: center;
    position: sticky; top: 0; z-index: 1001;
}
.text-success { color: #6fcf6f !important; }

/* HEADER */
#mk-mobile-menu-btn { display: none; }
#mk-mobile-nav { display: none; }
#mk-mobile-nav-overlay { display: none; }

.mk-header-main {
    background: rgba(255,255,255,0.93);
    backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
    border-bottom: 1px solid rgba(229,213,200,0.6);
    padding: 1rem 0; position: sticky; top: 40px; z-index: 1000;
    box-shadow: 0 4px 20px rgba(92,45,10,0.06);
}

.mk-logo a { text-decoration: none; }
.mk-logo h2 { font-size: 1.6rem; }

.mk-search-wrapper { position: relative; }
.mk-search-form {
    display: flex; background: white; border: 2px solid #e8d5c4;
    border-radius: 10px; overflow: hidden; transition: var(--mk-transition);
}
.mk-search-form:focus-within { border-color: var(--mk-accent); box-shadow: 0 0 0 3px rgba(200,121,65,0.15); }
.search-category-dropdown { border-right: 1px solid #e8d5c4; }
.mk-cat-select {
    height: 48px; padding: 0 12px; border: none; background: #FBF5EB;
    font-size: 0.875rem; color: #5C2D0A; cursor: pointer; outline: none;
    font-family: 'Inter', sans-serif; min-width: 140px;
}
.marketplace-search {
    flex: 1; padding: 0 16px; border: none; font-size: 0.95rem;
    background: white; outline: none; color: #333;
}
.search-btn {
    background: var(--mk-primary); color: white; border: none;
    padding: 0 20px; cursor: pointer; transition: var(--mk-transition);
}
.search-btn:hover { background: var(--mk-primary-hover); }

/* Autocomplete */
.search-autocomplete {
    display: none; position: absolute; top: calc(100% + 6px); left: 0; right: 0;
    background: white; border: 1px solid #e8d5c4; border-radius: 10px;
    box-shadow: var(--mk-shadow-hover); z-index: 999; overflow: hidden;
}
.search-autocomplete.active { display: block; }
.autocomplete-item {
    display: flex; align-items: center; gap: 12px; padding: 10px 16px;
    cursor: pointer; transition: background .15s; border-bottom: 1px solid #f5ece3;
}
.autocomplete-item:last-child { border-bottom: none; }
.autocomplete-item:hover { background: #FBF5EB; }
.autocomplete-item img { width: 40px; height: 40px; object-fit: cover; border-radius: 6px; }
.autocomplete-item-no-img { width: 40px; height: 40px; background: #f5ece3; border-radius: 6px; display: flex; align-items: center; justify-content: center; font-size: 1.2rem; }
.autocomplete-item-info { flex: 1; min-width: 0; }
.autocomplete-item-title { font-size: 0.875rem; font-weight: 600; color: #1C0F08; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.autocomplete-item-cat { font-size: 0.75rem; color: #9ca3af; }
.autocomplete-item-type { font-size: 0.7rem; font-weight: 700; color: var(--mk-primary); background: #FBF5EB; padding: 2px 8px; border-radius: 4px; white-space: nowrap; }

/* Utils */
.mk-header-utils { display: flex; }
.util-item { display: flex; flex-direction: column; align-items: center; cursor: pointer; position: relative; color: #5C2D0A; }
.util-item:hover { color: var(--mk-accent); }
.compare-badge { position: absolute; top: -4px; right: -4px; background: var(--mk-danger); color: white; border-radius: 50%; width: 18px; height: 18px; font-size: 10px; font-weight: 700; display: flex; align-items: center; justify-content: center; }
.util-text { color: #9ca3af; font-size: 0.7rem; }

/* NAV BAR */
.mk-nav-bar {
    background: white; border-bottom: 1px solid #f0e6da; position: relative;
    box-shadow: 0 2px 4px rgba(92,45,10,0.04); z-index: 9000;
}
.mk-nav-bar .mk-container { height: 48px; }
.megamenu-trigger {
    background: var(--mk-primary); color: white; padding: 0 16px; height: 100%;
    cursor: pointer; font-weight: 600; font-size: 0.875rem;
    transition: var(--mk-transition); min-width: 140px;
}
.megamenu-trigger:hover { background: var(--mk-primary-hover); }
.mk-nav-links { display: flex; height: 100%; margin: 0; padding: 0; }
.mk-nav-links li { display: flex; align-items: center; }
.mk-nav-links a {
    font-size: 0.875rem; font-weight: 600; color: #4b3728; padding: 0 12px;
    height: 100%; display: flex; align-items: center; transition: var(--mk-transition);
    border-bottom: 2px solid transparent;
}
.mk-nav-links a:hover { color: var(--mk-primary); border-bottom-color: var(--mk-primary); }

/* MEGAMENU */
.megamenu {
    display: none; position: absolute; top: 100%; left: 0; right: 0;
    background: white; border-top: 2px solid #f0e6da;
    box-shadow: 0 16px 40px rgba(92,45,10,0.14); z-index: 9999;
}
.mk-nav-bar:hover .megamenu { display: block; }
.megamenu .mk-container {
    display: flex; gap: 0; padding: 0;
    min-height: 380px; align-items: stretch;
}
.megamenu__categories {
    width: 210px; background: #FBF5EB; border-right: 1px solid #f0e6da;
    padding: 12px 0; flex-shrink: 0; align-self: stretch;
}
.megamenu__category-item {
    display: flex; align-items: center; gap: 8px; padding: 10px 16px;
    font-size: 0.875rem; font-weight: 500; color: #4b3728; cursor: pointer;
    transition: background .15s; text-decoration: none;
}
.megamenu__category-item:hover, .megamenu__category-item.active { background: white; color: var(--mk-primary); font-weight: 600; }
.megamenu__ver-todo {
    display: block; padding: 10px 16px; font-size: 0.8rem;
    color: var(--mk-accent); font-weight: 600; margin-top: 4px; text-decoration: none;
    border-top: 1px solid #f0e6da; margin-top: 8px;
}
.megamenu__panels { flex: 1; padding: 20px; background: #fff; align-self: stretch; }
.megamenu__panel { display: none; grid-template-columns: repeat(4, 1fr); gap: 12px; }
.megamenu__panel.active { display: grid; }
.subcat-card {
    display: flex; flex-direction: column; gap: 8px; padding: 12px;
    border-radius: 8px; border: 1px solid #f0e6da; background: #fafaf9;
    text-decoration: none; transition: var(--mk-transition); color: #4b3728;
}
.subcat-card:hover { border-color: var(--mk-accent); background: #FBF5EB; transform: translateY(-2px); }
.subcat-card img { width: 100%; height: 80px; object-fit: cover; border-radius: 6px; }
.subcat-card span { font-size: 0.8rem; font-weight: 600; text-align: center; }

/* MOBILE NAV */
@media (max-width: 768px) {
    .mk-topbar { display: none; }
    .mk-header-main { top: 0; }
    .mk-logo h2 { font-size: 1.2rem; white-space: nowrap; }
    .mk-nav-bar { display: none; }

    /* Contenedor header: asegurar que el hamburger nunca se corte */
    .mk-header-main .mk-container { flex-wrap: nowrap; padding: 0 12px; }
    .mk-logo { flex-shrink: 0; }
    .mk-search-wrapper { flex: 1 1 0; min-width: 0; margin: 0 8px !important; }
    .mk-search-wrapper .mx-4 { margin: 0 !important; }
    /* Ocultar dropdown de categoría en móvil para ganar espacio */
    .search-category-dropdown { display: none; }
    .marketplace-search { min-width: 0; width: 100%; }

    #mk-mobile-menu-btn {
        display: flex; flex-direction: column; gap: 5px; background: none;
        border: none; padding: 6px; cursor: pointer; z-index: 1002;
        flex-shrink: 0; margin-left: 4px;
    }
    .mk-hbg-bar { display: block; width: 22px; height: 2px; background: var(--mk-dark); border-radius: 2px; transition: var(--mk-transition); }
    #mk-mobile-menu-btn[aria-expanded="true"] .mk-hbg-bar:nth-child(1) { transform: rotate(45deg) translate(5px,5px); }
    #mk-mobile-menu-btn[aria-expanded="true"] .mk-hbg-bar:nth-child(2) { opacity: 0; }
    #mk-mobile-menu-btn[aria-expanded="true"] .mk-hbg-bar:nth-child(3) { transform: rotate(-45deg) translate(5px,-5px); }

    #mk-mobile-nav {
        display: block; position: fixed; top: 0; left: -280px; width: 280px; height: 100vh;
        background: white; z-index: 10001; overflow-y: auto;
        box-shadow: 4px 0 20px rgba(0,0,0,.15); transition: left .3s ease;
    }
    #mk-mobile-nav.open { left: 0; }
    #mk-mobile-nav-overlay {
        display: block; position: fixed; inset: 0; background: rgba(0,0,0,.5);
        z-index: 10000; opacity: 0; pointer-events: none; transition: opacity .3s;
    }
    #mk-mobile-nav-overlay.open { opacity: 1; pointer-events: all; }
    .mk-mobile-nav-inner { padding: 60px 20px 20px; }
    .mk-mobile-nav-section a { display: flex; align-items: center; gap: 8px; padding: 10px 0; font-size: .9rem; font-weight: 500; color: #4b3728; border-bottom: 1px solid #f5ece3; }
    .mk-mobile-nav-label { display: block; font-size: .7rem; font-weight: 700; text-transform: uppercase; letter-spacing: .08em; color: #9ca3af; margin-bottom: 4px; margin-top: 8px; }
    .mk-mobile-nav-divider { height: 1px; background: #f0e6da; margin: 12px 0; }
    .mk-header-utils { display: none !important; }
    .mk-search-wrapper .mx-4 { margin: 0 8px; }
    .megamenu { display: none !important; }
}

/* MAIN CONTENT */
.mk-main-content { background: #faf8f5; min-height: 60vh; }

/* HERO */
.mk-hero-section { background: linear-gradient(135deg, #1C0F08 0%, #3D1F0D 60%, #5C2D0A 100%); padding: 48px 0; }
.mk-hero-grid { display: grid; grid-template-columns: 1fr 320px; gap: 32px; align-items: start; }
.mk-hero-main { background: rgba(255,255,255,0.05); border: 1px solid rgba(255,255,255,0.1); border-radius: 16px; padding: 32px; }
.hero-content-wrap { display: flex; gap: 24px; align-items: center; }
.hero-text-side { flex: 1; }
.hero-image-side { width: 220px; flex-shrink: 0; }
.hero-img { width: 100%; border-radius: 12px; object-fit: cover; max-height: 240px; }
.badge-editors-choice { background: var(--mk-accent); color: white; font-size: 0.7rem; font-weight: 700; padding: 4px 10px; border-radius: 4px; text-transform: uppercase; letter-spacing: .05em; }
.hero-product-title { color: white; font-size: 1.8rem; font-weight: 800; margin: 0; }
.hero-rating { color: white; }
.hero-rating .stars { color: var(--star-gold); font-size: 1.1rem; }
.hero-rating .number { font-size: 1.4rem; font-weight: 800; }
.hero-product-desc { color: rgba(255,255,255,0.8); font-size: 0.95rem; margin: 12px 0; }
.hero-cat-tag { display: inline-block; background: rgba(200,121,65,0.25); color: #f5c9a0; font-size: 0.75rem; font-weight: 700; padding: 3px 10px; border-radius: 4px; text-transform: uppercase; }
.hero-cta-row { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; }
.btn-amazon-sm { color: var(--mk-accent); font-size: 0.875rem; font-weight: 600; text-decoration: none; }
.btn-amazon-sm:hover { color: #e8943a; }

.mk-hero-sidebar { background: rgba(255,255,255,0.05); border: 1px solid rgba(255,255,255,0.1); border-radius: 16px; padding: 20px; }
.sidebar-title { color: rgba(255,255,255,0.6); font-size: 0.75rem; font-weight: 700; text-transform: uppercase; letter-spacing: .08em; margin-bottom: 16px; }
.sidebar-review-card { display: flex; gap: 12px; align-items: center; padding: 10px 0; border-bottom: 1px solid rgba(255,255,255,0.08); text-decoration: none; }
.sidebar-review-card:last-child { border-bottom: none; padding-bottom: 0; }
.sidebar-review-card:hover { opacity: 0.85; }
.sidebar-review-img { width: 56px; height: 56px; border-radius: 8px; overflow: hidden; flex-shrink: 0; }
.sidebar-review-img img { width: 100%; height: 100%; object-fit: cover; }
.sidebar-no-img { width: 56px; height: 56px; background: rgba(200,121,65,0.2); border-radius: 8px; display: flex; align-items: center; justify-content: center; font-size: 1.5rem; }
.sidebar-review-content h4 { color: white; font-size: 0.8rem; font-weight: 600; margin: 0 0 4px; }
.sidebar-stars { color: var(--star-gold); font-size: 0.75rem; }
.sidebar-stars span { color: rgba(255,255,255,0.7); margin-left: 4px; }

.hero-empty-state { padding: 80px 20px; }

/* SEARCH FILTERS */
.mk-search-filters-section { background: white; padding: 16px 0; border-bottom: 1px solid #f0e6da; position: sticky; top: 128px; z-index: 995; }
.search-filter-bar { display: flex; gap: 16px; align-items: center; flex-wrap: wrap; }
.filter-pills { display: flex; gap: 8px; flex-wrap: wrap; flex: 1; }
.filter-pill {
    background: #FBF5EB; border: 1px solid #e8d5c4; color: #5C2D0A;
    padding: 6px 14px; border-radius: 20px; font-size: 0.8rem; font-weight: 600;
    cursor: pointer; transition: var(--mk-transition); white-space: nowrap;
}
.filter-pill:hover, .filter-pill.active { background: var(--mk-primary); color: white; border-color: var(--mk-primary); }
.mk-select-sm { padding: 6px 12px; border: 1px solid #e8d5c4; border-radius: 8px; font-size: 0.8rem; color: #5C2D0A; background: white; cursor: pointer; }

/* PRODUCTOS GRID */
.mk-products-section { padding: 48px 0; }
.section-title { font-size: 1.5rem; font-weight: 800; color: #1C0F08; margin: 0; }
.count-badge { background: #FBF5EB; color: #5C2D0A; font-size: 0.8rem; font-weight: 700; padding: 4px 12px; border-radius: 20px; border: 1px solid #e8d5c4; }
.section-header { margin-bottom: 24px; }
.see-all-link { font-size: 0.875rem; font-weight: 600; color: var(--mk-primary); text-decoration: none; }
.see-all-link:hover { color: var(--mk-accent); }

.products-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }

.product-card {
    background: white; border-radius: var(--mk-radius); overflow: hidden;
    border: 1px solid #f0e6da; transition: var(--mk-transition);
    display: flex; flex-direction: column;
}
.product-card:hover { transform: translateY(-4px); box-shadow: var(--mk-shadow-hover); border-color: #e8d5c4; }
.product-card__image-link { display: block; }
.product-card__image {
    position: relative; overflow: hidden; height: 200px;
    background: #FBF5EB;
}
.product-card__image img { width: 100%; height: 100%; object-fit: contain; padding: 12px; transition: transform .4s; }
.product-card:hover .product-card__image img { transform: scale(1.04); }
.product-card__no-img { height: 100%; display: flex; align-items: center; justify-content: center; font-size: 3rem; }
.product-card__badge-analysis {
    position: absolute; top: 10px; left: 10px; background: var(--mk-primary);
    color: white; font-size: 0.65rem; font-weight: 700; padding: 3px 8px; border-radius: 4px; text-transform: uppercase;
}
.product-card__badge-rating {
    position: absolute; top: 10px; right: 10px; background: white;
    color: #1C0F08; font-size: 0.8rem; font-weight: 800; padding: 4px 8px; border-radius: 6px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.12);
}
.product-card__content { padding: 16px; display: flex; flex-direction: column; flex: 1; }
.product-card__category { font-size: 0.7rem; font-weight: 700; color: var(--mk-accent); text-transform: uppercase; letter-spacing: .06em; margin-bottom: 6px; }
.product-card__title { font-size: 0.95rem; font-weight: 700; color: #1C0F08; margin: 0 0 8px; line-height: 1.3; }
.product-card__rating { display: flex; align-items: center; gap: 6px; margin-bottom: 8px; }
.product-card__stars { color: var(--star-gold); font-size: 0.9rem; }
.product-card__features { margin: 8px 0; list-style: none; padding: 0; }
.product-card__features li { font-size: 0.78rem; color: #6b7280; padding: 2px 0; display: flex; align-items: center; gap: 6px; }
.product-card__features li::before { content: '✓'; color: var(--mk-success); font-weight: 700; }
.product-card__meta { color: #9ca3af; margin-top: auto; }
.product-card__cta {
    display: block; background: var(--mk-primary); color: white; text-align: center;
    padding: 10px; border-radius: 8px; font-size: 0.78rem; font-weight: 700;
    margin-top: 12px; transition: var(--mk-transition); text-decoration: none;
}
.product-card__cta:hover { background: var(--mk-primary-hover); color: white; }
.product-card__utils { display: flex; justify-content: space-between; align-items: center; }
.product-card__utils a { color: #9ca3af; font-size: 0.78rem; text-decoration: none; display: flex; align-items: center; gap: 4px; }
.product-card__utils a:hover { color: var(--mk-primary); }
.btn-compare { background: none; border: none; color: #9ca3af; font-size: 0.78rem; cursor: pointer; display: flex; align-items: center; gap: 4px; padding: 0; }
.btn-compare:hover { color: var(--mk-accent); }

/* COMPARATIVAS */
.mk-comparativas-section { padding: 48px 0; background: white; }
.comparativas-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; }
.comp-card { border-radius: var(--mk-radius); overflow: hidden; border: 1px solid #f0e6da; background: #faf8f5; transition: var(--mk-transition); }
.comp-card:hover { transform: translateY(-3px); box-shadow: var(--mk-shadow-hover); }
.comp-card__link { text-decoration: none; display: block; }
.comp-card__image { height: 140px; overflow: hidden; }
.comp-card__image img { width: 100%; height: 100%; object-fit: cover; transition: transform .4s; }
.comp-card:hover .comp-card__image img { transform: scale(1.05); }
.comp-card__content { padding: 14px; }
.comp-card__cat { font-size: 0.65rem; font-weight: 700; color: var(--mk-accent); text-transform: uppercase; letter-spacing: .06em; }
.comp-card__title { font-size: 0.9rem; font-weight: 700; color: #1C0F08; margin: 6px 0; line-height: 1.3; }
.comp-card__cta { font-size: 0.8rem; font-weight: 600; color: var(--mk-primary); }

/* VS */
.mk-vs-section { padding: 48px 0; background: #FBF5EB; }
.vs-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; }
.vs-card { background: white; border-radius: var(--mk-radius); border: 1px solid #f0e6da; overflow: hidden; transition: var(--mk-transition); }
.vs-card:hover { transform: translateY(-3px); box-shadow: var(--mk-shadow-hover); }
.vs-card__link { text-decoration: none; display: block; padding: 20px; }
.vs-badge-label { display: inline-block; background: var(--mk-primary); color: white; font-size: 0.7rem; font-weight: 900; padding: 2px 10px; border-radius: 4px; margin-bottom: 8px; letter-spacing: .08em; }
.vs-card__title { font-size: 0.9rem; font-weight: 700; color: #1C0F08; margin: 0 0 8px; line-height: 1.3; }
.vs-card__cat { display: block; font-size: 0.75rem; color: #9ca3af; margin-bottom: 10px; }
.vs-card__cta { font-size: 0.8rem; font-weight: 600; color: var(--mk-primary); }

/* PROBLEMAS */
.mk-problems-section { padding: 48px 0; background: white; }
.problems-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.problem-card {
    display: flex; align-items: center; gap: 14px; padding: 16px 20px;
    background: #faf8f5; border: 1px solid #f0e6da; border-radius: var(--mk-radius);
    text-decoration: none; transition: var(--mk-transition);
}
.problem-card:hover { border-color: var(--mk-accent); background: #FBF5EB; transform: translateX(4px); }
.problem-card__icon { font-size: 1.5rem; flex-shrink: 0; }
.problem-card__content { flex: 1; min-width: 0; }
.problem-card__content h3 { font-size: 0.875rem; font-weight: 600; color: #1C0F08; margin: 0 0 2px; }
.problem-card__cat { font-size: 0.72rem; color: #9ca3af; }
.problem-card__arrow { color: #9ca3af; flex-shrink: 0; }
.problem-card:hover .problem-card__arrow { color: var(--mk-primary); }

/* CATEGORÍAS */
.mk-categories-section { padding: 60px 0; background: #FBF5EB; }
.categories-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; }
.cat-card {
    background: white; border-radius: var(--mk-radius); padding: 28px 20px;
    text-align: center; text-decoration: none; border: 2px solid #f0e6da;
    transition: var(--mk-transition); display: flex; flex-direction: column; align-items: center; gap: 8px;
}
.cat-card:hover { border-color: var(--cat-color, var(--mk-primary)); transform: translateY(-4px); box-shadow: var(--mk-shadow-hover); }
.cat-card__icon { font-size: 2.5rem; }
.cat-card h3 { font-size: 0.95rem; font-weight: 700; color: #1C0F08; margin: 0; }
.cat-card__count { font-size: 0.78rem; color: #9ca3af; }
.cat-card:hover h3 { color: var(--cat-color, var(--mk-primary)); }

/* BLOG */
.mk-blog-section { padding: 60px 0; background: white; }
.blog-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 28px; }
.blog-card { border-radius: var(--mk-radius); overflow: hidden; border: 1px solid #f0e6da; background: #faf8f5; transition: var(--mk-transition); }
.blog-card:hover { transform: translateY(-3px); box-shadow: var(--mk-shadow-hover); }
.blog-card__image { display: block; overflow: hidden; height: 180px; }
.blog-card__image img { width: 100%; height: 100%; object-fit: cover; transition: transform .4s; }
.blog-card:hover .blog-card__image img { transform: scale(1.04); }
.blog-card__content { padding: 18px; }
.blog-card__cat { font-size: 0.7rem; font-weight: 700; color: var(--mk-accent); text-transform: uppercase; letter-spacing: .06em; display: block; margin-bottom: 6px; }
.blog-card__content h3 { font-size: 1rem; font-weight: 700; color: #1C0F08; margin: 0 0 8px; line-height: 1.4; }
.blog-card__content h3 a { color: inherit; text-decoration: none; }
.blog-card__content h3 a:hover { color: var(--mk-primary); }
.blog-card__content p { font-size: 0.85rem; color: #6b7280; margin: 0 0 12px; }
.blog-card__date { font-size: 0.75rem; color: #9ca3af; }

/* NEWSLETTER */
.mk-newsletter-section {
    background: linear-gradient(135deg, #1C0F08 0%, #3D1F0D 100%);
    padding: 80px 20px;
}
.mk-newsletter-form { max-width: 520px; margin: 0 auto; }

/* FOOTER */
.mk-footer { background: #1C0F08; color: #d6c5b5; padding: 60px 0 0; }
.mk-footer-grid { display: grid; grid-template-columns: 2fr 1fr 1fr 1fr; gap: 40px; }
.footer-logo { font-size: 1.6rem; font-weight: 900; color: white; margin: 0; }
.footer-logo span { color: var(--mk-accent); }
.footer-col p { font-size: 0.875rem; color: #9ca3af; line-height: 1.7; }
.footer-col h4 { font-size: 0.875rem; font-weight: 700; color: white; text-transform: uppercase; letter-spacing: .08em; margin-bottom: 16px; }
.footer-col ul li { margin-bottom: 10px; }
.footer-col ul a { font-size: 0.875rem; color: #9ca3af; transition: color .2s; }
.footer-col ul a:hover { color: var(--mk-accent); }
.mk-footer-middle { padding: 24px 0; color: #6b7280; border-color: #2C1A0E !important; }
.mk-footer-bottom { padding: 20px 0 40px; color: #6b7280; border-color: #2C1A0E !important; }
.legal-links a { color: #9ca3af; font-size: 0.8rem; text-decoration: none; }
.legal-links a:hover { color: var(--mk-accent); }
.social-icons a { color: #6b7280; transition: color .2s; }
.social-icons a:hover { color: var(--mk-accent); }

/* BLOG CTAs */
.bic-blog-cta {
    background: var(--mk-light); border: 2px solid #e8d5c4; border-radius: 14px;
    padding: 20px 22px; margin: 36px 0; clear: both;
}
.bic-blog-cta__label {
    font-size: .7rem; font-weight: 800; text-transform: uppercase; letter-spacing: .1em;
    color: var(--mk-accent); margin: 0 0 14px;
}
.bic-blog-cta__grid { display: grid; grid-template-columns: repeat(2,1fr); gap: 14px; }
.bic-blog-cta__card {
    background: white; border-radius: 10px; border: 1px solid #f0e6da;
    padding: 14px; display: flex; flex-direction: column; gap: 8px;
    transition: box-shadow .2s, transform .2s;
}
.bic-blog-cta__card:hover { box-shadow: 0 6px 20px rgba(92,45,10,.12); transform: translateY(-2px); }
.bic-blog-cta__card img { width: 100%; height: 90px; object-fit: contain; border-radius: 6px; }
.bic-blog-cta__info { display: flex; flex-direction: column; gap: 4px; flex: 1; }
.bic-blog-cta__name { font-size: .8rem; font-weight: 700; color: var(--mk-dark); line-height: 1.3; }
.bic-blog-cta__stars { font-size: .75rem; color: var(--mk-accent); }
.bic-blog-cta__feat { font-size: .72rem; color: #6b7280; }
.bic-blog-cta__btn {
    display: block; text-align: center; background: var(--mk-primary); color: white;
    border-radius: 6px; padding: 7px; font-size: .78rem; font-weight: 700; margin-top: auto;
    transition: background .15s;
}
.bic-blog-cta__card:hover .bic-blog-cta__btn { background: var(--mk-primary-hover); }
.bic-blog-cta__amazon {
    display: block; text-align: center; margin-top: 14px; font-size: .82rem;
    font-weight: 700; color: var(--mk-accent); text-decoration: underline;
    text-underline-offset: 2px;
}
.bic-blog-cta__btn {
    display: block; text-align: center; background: var(--mk-primary); color: white !important;
    border-radius: 6px; padding: 9px; font-size: .82rem; font-weight: 700; margin-top: auto;
    text-decoration: none; transition: background .15s;
}
.bic-blog-cta__btn:hover { background: var(--mk-primary-hover); color: white !important; }
@media (max-width: 560px) {
    .bic-blog-cta__grid { grid-template-columns: 1fr; }
}

/* LEGAL PAGES */
.legal-content {
    max-width: 760px; margin: 0 auto;
    font-family: 'Inter', sans-serif; font-size: 1rem; line-height: 1.85; color: #374151;
}
.legal-content h2 {
    font-family: 'Poppins', sans-serif; font-size: 1.3rem; font-weight: 800;
    color: #1C0F08; margin: 48px 0 14px; padding-bottom: 10px;
    border-bottom: 2px solid #f0e6da;
}
.legal-content h3 {
    font-family: 'Poppins', sans-serif; font-size: 1.05rem; font-weight: 700;
    color: #2C1A0E; margin: 32px 0 10px;
}
.legal-content p { margin: 0 0 18px; }
.legal-content ul, .legal-content ol { padding-left: 24px; margin: 0 0 18px; }
.legal-content li { margin-bottom: 8px; }
.legal-content a { color: var(--mk-accent); text-decoration: underline; text-underline-offset: 2px; }
.legal-content a:hover { color: var(--mk-primary); }
.legal-content strong { color: #1C0F08; font-weight: 700; }
.legal-content blockquote {
    border-left: 4px solid var(--mk-accent); background: #FBF5EB;
    padding: 16px 20px; margin: 24px 0; border-radius: 0 8px 8px 0;
    font-style: italic; color: #4b3728;
}
.legal-content table { width: 100%; border-collapse: collapse; margin: 24px 0; font-size: .9rem; }
.legal-content th { background: var(--mk-primary); color: white; padding: 10px 14px; text-align: left; }
.legal-content td { padding: 9px 14px; border-bottom: 1px solid #f0e6da; }
.legal-content tr:nth-child(even) td { background: #FBF5EB; }

/* COMPARADOR TRAY */
#tr-compare-tray {
    position: fixed; bottom: -80px; left: 50%; transform: translateX(-50%);
    z-index: 9998; background: white; border-radius: 12px 12px 0 0;
    box-shadow: 0 -4px 20px rgba(92,45,10,0.15); padding: 16px 24px;
    display: flex; align-items: center; justify-content: space-between;
    width: calc(100% - 48px); max-width: 860px; transition: bottom .4s cubic-bezier(.34,1.56,.64,1);
    border-top: 3px solid var(--mk-primary);
}
#tr-compare-tray.open { bottom: 0; }
.tr-cmp-inner { display: flex; align-items: center; justify-content: space-between; width: 100%; gap: 16px; }
.tr-cmp-title { font-size: 0.875rem; font-weight: 700; color: #1C0F08; display: flex; align-items: center; gap: 6px; }
.tr-cmp-slots { display: flex; gap: 8px; margin-left: 12px; }
.tr-cmp-slot { width: 56px; height: 56px; border: 2px dashed #e8d5c4; border-radius: 8px; overflow: hidden; }
.tr-cmp-slot img { width: 100%; height: 100%; object-fit: cover; }
.tr-cmp-slot.filled { border-style: solid; border-color: var(--mk-primary); }
.tr-cmp-actions { display: flex; gap: 8px; }
#tr-cmp-clear { background: none; border: 1px solid #e8d5c4; padding: 8px 16px; border-radius: 8px; font-size: 0.8rem; cursor: pointer; color: #6b7280; }
#tr-cmp-go { background: var(--mk-primary); color: white; border: none; padding: 8px 20px; border-radius: 8px; font-size: 0.85rem; font-weight: 700; cursor: pointer; }
#tr-cmp-go:hover { background: var(--mk-primary-hover); }

/* MODAL COMPARATIVA */
#tr-compare-modal { display: none; position: fixed; inset: 0; z-index: 10000; }
#tr-compare-modal.open { display: block; }
.tr-cm-backdrop { position: absolute; inset: 0; background: rgba(0,0,0,.6); }
.tr-cm-box { position: absolute; top: 50%; left: 50%; transform: translate(-50%,-50%); background: white; border-radius: 16px; padding: 32px; width: 90%; max-width: 900px; max-height: 85vh; overflow-y: auto; }
.tr-cm-close { position: absolute; top: 12px; right: 16px; background: none; border: none; font-size: 1.2rem; cursor: pointer; color: #9ca3af; }
.tr-cm-heading { font-size: 1.3rem; font-weight: 800; color: #1C0F08; margin-bottom: 20px; }
.tr-cm-table { display: grid; gap: 16px; }

/* AMAZON CTA BOX */
.amz-cta-box {
    border: 2px solid #e8d5c4; border-radius: 14px; padding: 24px; margin: 32px 0;
    background: #FBF5EB; position: relative;
}
.amz-cta__badge {
    position: absolute; top: -12px; left: 20px; background: var(--mk-primary);
    color: white; font-size: 0.7rem; font-weight: 700; padding: 3px 12px; border-radius: 4px; text-transform: uppercase;
}
.amz-cta__inner { display: flex; gap: 24px; align-items: flex-start; }
.amz-cta__img-wrap { flex-shrink: 0; width: 160px; }
.amz-cta__img-wrap img { width: 100%; border-radius: 8px; object-fit: contain; max-height: 180px; }
.amz-cta__content { flex: 1; }
.amz-cta__nombre { font-size: 1.1rem; font-weight: 700; color: #1C0F08; margin: 0 0 8px; }
.amz-cta__rating { display: flex; align-items: center; gap: 8px; margin-bottom: 12px; }
.amz-cta__stars { display: flex; }
.amz-cta__rating-num { font-weight: 700; color: #1C0F08; }
.amz-cta__votos { font-size: 0.8rem; color: #9ca3af; }
.amz-cta__features { list-style: none; padding: 0; margin: 0 0 16px; }
.amz-cta__features li { display: flex; align-items: center; gap: 6px; font-size: 0.875rem; color: #4b3728; padding: 3px 0; }
.amz-cta__btn {
    display: inline-flex; align-items: center; gap: 8px;
    background: linear-gradient(135deg, var(--mk-primary), var(--mk-secondary));
    color: white; padding: 12px 24px; border-radius: 8px; font-weight: 700;
    font-size: 0.95rem; text-decoration: none; transition: var(--mk-transition);
}
.amz-cta__btn:hover { transform: translateY(-1px); box-shadow: 0 8px 20px rgba(92,45,10,0.3); color: white; }
.amz-cta__trust { display: flex; gap: 16px; margin-top: 10px; }
.amz-cta__trust-item { font-size: 0.78rem; color: #6b7280; display: flex; align-items: center; gap: 4px; }
.amz-cta__updated { font-size: 0.72rem; color: #9ca3af; margin: 8px 0 0; display: flex; align-items: center; gap: 4px; }

/* RESPONSIVE */
@media (max-width: 1024px) {
    .mk-hero-grid { grid-template-columns: 1fr; }
    .mk-hero-sidebar { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }
    .sidebar-title { grid-column: 1/-1; }
    .comparativas-grid { grid-template-columns: repeat(2, 1fr); }
    .vs-grid { grid-template-columns: repeat(2, 1fr); }
    .categories-grid { grid-template-columns: repeat(4, 1fr); }
}

@media (max-width: 768px) {
    .products-grid { grid-template-columns: repeat(2, 1fr); }
    .comparativas-grid { grid-template-columns: 1fr 1fr; }
    .vs-grid { grid-template-columns: 1fr 1fr; }
    .problems-grid { grid-template-columns: 1fr; }
    .categories-grid { grid-template-columns: repeat(2, 1fr); }
    .blog-grid { grid-template-columns: 1fr; }
    .mk-footer-grid { grid-template-columns: 1fr 1fr; gap: 32px; }
    .hero-content-wrap { flex-direction: column; }
    .hero-image-side { width: 100%; }
    .mk-hero-sidebar { grid-template-columns: 1fr; }
    .amz-cta__inner { flex-direction: column; }
    .amz-cta__img-wrap { width: 100%; text-align: center; }
}

@media (max-width: 480px) {
    .products-grid { grid-template-columns: 1fr; }
    .comparativas-grid { grid-template-columns: 1fr; }
    .vs-grid { grid-template-columns: 1fr; }
    .categories-grid { grid-template-columns: repeat(2, 1fr); }
    .mk-footer-grid { grid-template-columns: 1fr; }
    .filter-pills { gap: 6px; }
    .filter-pill { font-size: 0.72rem; padding: 5px 10px; }
}
