:root {
    --primary-color: #E30613;
    --primary-hover: #c40510;
    --bg-dark: #121212;
    --bg-card: #1a1a1a;
    --bg-card-light: #2a2a2a;
    --text-white: #ffffff;
    --text-gray: #b0b0b0;
    --text-dim: #888888;
    --header-height: 70px;
    --category-bar-height: 50px;
    --shadow-soft: 0 4px 15px rgba(0, 0, 0, 0.3);
    --border-soft: 1px solid rgba(255, 255, 255, 0.1);
}

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

body {
    background-color: var(--bg-dark);
    color: var(--text-white);
    margin: 0;
    padding: 0;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    padding-top: calc(var(--header-height) + var(--category-bar-height));
}

/* --- Header MalPrecio --- */
.mp-header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: var(--header-height);
    background: #111;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 24px;
    z-index: 1000;
    border-bottom: 1px solid #333;
}

.mp-logo {
    display: flex;
    align-items: center;
    text-decoration: none;
}

.mp-logo-img {
    height: 45px;
    width: auto;
    object-fit: contain;
    transition: transform 0.3s ease, filter 0.3s ease;
}

.mp-logo:hover .mp-logo-img {
    transform: scale(1.05);
    filter: brightness(1.1);
}

.mp-search-container {
    flex: 1;
    max-width: 600px;
    margin: 0 40px;
    position: relative;
    display: flex;
}

.mp-search-input {
    width: 100%;
    height: 44px;
    border-radius: 22px 0 0 22px;
    border: 1px solid #444;
    background: #fff;
    padding: 0 20px;
    font-size: 1rem;
    color: #333;
    outline: none;
}

.mp-search-btn {
    height: 44px;
    padding: 0 20px;
    background: var(--primary-color);
    color: white;
    border: none;
    border-radius: 0 22px 22px 0;
    cursor: pointer;
    transition: background 0.3s;
}

.mp-search-btn:hover {
    background: var(--primary-hover);
}

.mp-header-actions {
    display: flex;
    align-items: center;
    gap: 20px;
}

.btn-publish {
    background: var(--primary-color);
    color: white;
    padding: 10px 20px;
    border-radius: 20px;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: all 0.3s;
}

.btn-publish:hover {
    background: var(--primary-hover);
    transform: translateY(-2px);
}

.mp-user-profile {
    display: flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
}

.mp-user-avatar {
    width: 38px;
    height: 38px;
    border-radius: 50%;
    border: 2px solid #444;
}

/* --- Category Bar --- */
.mp-category-bar {
    position: fixed;
    top: var(--header-height);
    left: 0;
    right: 0;
    height: var(--category-bar-height);
    background: var(--primary-color);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 999;
    overflow-x: auto;
    overflow-y: hidden;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
}

.mp-category-bar::-webkit-scrollbar {
    display: none;
}

.mp-category-list {
    display: flex;
    list-style: none;
    margin: 0;
    padding: 0 16px;
    gap: 20px;
    white-space: nowrap;
    flex-shrink: 0;
}

.mp-category-item a {
    color: white;
    font-weight: 600;
    font-size: 0.95rem;
    text-transform: uppercase;
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 5px 10px;
    border-radius: 4px;
    transition: background 0.3s;
    white-space: nowrap;
}

.mp-category-item a:hover {
    background: rgba(255, 255, 255, 0.1);
}

/* --- Social Proof Grid ("La comunidad está hablando") --- */
.social-proof-section {
    background: rgba(30, 35, 60, 0.4);
    border-radius: 16px;
    padding: 30px;
    margin: 40px 0;
    border: 1px solid rgba(255, 255, 255, 0.05);
}

.social-proof-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 25px;
}

.social-proof-title {
    font-size: 1.4rem;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 12px;
}

.live-badge {
    background: var(--primary-color);
    color: white;
    font-size: 0.7rem;
    padding: 3px 8px;
    border-radius: 10px;
    font-weight: 900;
    display: flex;
    align-items: center;
    gap: 4px;
}

.live-badge::before {
    content: '';
    width: 8px;
    height: 8px;
    background: white;
    border-radius: 50%;
    animation: pulse 1.5s infinite;
}

@keyframes pulse {
    0% {
        transform: scale(0.95);
        opacity: 0.7;
    }

    50% {
        transform: scale(1.1);
        opacity: 1;
    }

    100% {
        transform: scale(0.95);
        opacity: 0.7;
    }
}

.social-proof-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 15px;
}

.social-card {
    background: rgba(45, 52, 80, 0.4);
    border-radius: 12px;
    padding: 20px;
    border: 1px solid rgba(255, 255, 255, 0.05);
    transition: transform 0.3s;
}

.social-card:hover {
    transform: translateY(-5px);
    background: rgba(45, 52, 80, 0.6);
}

.social-user {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 12px;
}

.social-avatar {
    width: 32px;
    height: 32px;
    border-radius: 50%;
}

.social-name {
    font-weight: 600;
    font-size: 0.9rem;
}

.social-time {
    color: var(--text-dim);
    font-size: 0.75rem;
}

.social-comment {
    font-size: 0.9rem;
    font-style: italic;
    color: var(--text-gray);
    margin-bottom: 15px;
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.social-target {
    font-size: 0.8rem;
    color: var(--primary-color);
    font-weight: 600;
    text-decoration: none;
    display: block;
    transition: opacity 0.2s;
}

.social-target:hover {
    opacity: 0.8;
    text-decoration: underline;
}

/* --- Chollos Grid & Cards Overrides --- */
.chollos-layout {
    display: grid;
    grid-template-columns: 280px 1fr;
    gap: 30px;
    padding: 0 24px;
}

.mp-card {
    background: var(--bg-card);
    border-radius: 12px;
    overflow: hidden;
    border: 1px solid #333;
    transition: all 0.3s;
}

.mp-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
    border-color: var(--primary-color);
}

.mp-card-img-container {
    background: #fff;
    padding: 20px;
    position: relative;
    aspect-ratio: 1;
}

.mp-card-img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.mp-card-discount {
    position: absolute;
    top: 10px;
    right: 10px;
    background: var(--primary-color);
    color: white;
    padding: 5px 10px;
    border-radius: 6px;
    font-weight: 900;
    font-size: 0.9rem;
}

.mp-card-content {
    padding: 20px;
}

/* --- Footer --- */
.mp-footer {
    background: #0a0a0a;
    padding: 80px 40px;
    margin-top: 80px;
    border-top: 1px solid #222;
}

.mp-footer-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 40px;
    max-width: 1400px;
    margin: 0 auto;
}

.footer-col h4 {
    color: white;
    margin-bottom: 25px;
    font-size: 1.1rem;
    text-transform: uppercase;
    letter-spacing: 1px;
}

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

.footer-links li {
    margin-bottom: 12px;
}

.footer-links a {
    color: var(--text-dim);
    transition: color 0.3s;
}

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

/* Mobile Adjustments */
@media (max-width: 992px) {
    .chollos-layout {
        grid-template-columns: 1fr;
    }

    .mp-search-container {
        display: none;
    }

    .social-proof-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .mp-footer {
        padding: 40px 20px 100px;
        /* More bottom padding for mobile nav */
        margin-top: 40px;
    }

    .mp-footer-grid {
        grid-template-columns: 1fr 1fr;
    }

    .mp-header {
        padding: 0 12px;
    }

    .mp-category-bar {
        justify-content: flex-start;
    }

    .mp-category-list {
        gap: 8px;
        padding: 0 10px;
    }

    .mp-category-item a {
        font-size: 0.8rem;
        padding: 4px 8px;
        gap: 4px;
    }
}

@media (max-width: 600px) {
    .mp-footer-grid {
        grid-template-columns: 1fr;
        text-align: center;
    }

    .footer-col {
        margin-bottom: 30px;
    }
}

/* --- Fixed Mobile Bottom Nav --- */
.mp-mobile-nav {
    display: none;
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    width: 100%;
    height: 64px;
    background: #111;
    border-top: 1px solid #333;
    z-index: 2000;
    justify-content: space-around;
    align-items: center;
    padding: 0 4px;
    padding-bottom: env(safe-area-inset-bottom);
    box-sizing: border-box;
}

@media (max-width: 768px) {
    .mp-mobile-nav {
        display: flex;
    }

    body {
        padding-bottom: 70px;
    }
}

.mp-nav-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    color: #888;
    font-size: 0.65rem;
    gap: 3px;
    flex: 1;
    min-width: 0;
    padding: 6px 2px;
    text-align: center;
}

.mp-nav-item span {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 100%;
    display: block;
    font-size: 0.65rem;
}

.mp-nav-item i {
    font-size: 1.2rem;
}

.mp-nav-item.active,
.mp-nav-item:hover {
    color: var(--primary-color);
}

.mp-nav-item.publish {
    position: relative;
    top: -12px;
    background: var(--primary-color);
    width: 52px;
    height: 52px;
    min-width: 52px;
    border-radius: 50%;
    color: white;
    display: flex;
    justify-content: center;
    align-items: center;
    box-shadow: 0 4px 15px rgba(227, 6, 19, 0.4);
    border: 3px solid #111;
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    flex: none;
}

.mp-nav-item.publish i {
    font-size: 1.5rem;
    margin-left: 2px;
}

.mp-nav-item.publish.active {
    background: #fff;
    color: var(--primary-color);
    box-shadow: 0 0 20px rgba(255, 255, 255, 0.3);
}

.mp-nav-item.publish:active {
    transform: scale(0.9);
}

/* --- Telegram Nav Item --- */
.mp-nav-item.telegram {
    color: #0088cc;
}

.mp-nav-item.telegram:hover {
    color: #006da3;
}

.mp-nav-item.telegram i {
    font-size: 1.4rem;
}

/* --- Footer Telegram CTA --- */
.footer-telegram-cta .telegram-cta-card {
    background: linear-gradient(135deg, rgba(0, 136, 204, 0.15), rgba(0, 136, 204, 0.05));
    border: 1px solid rgba(0, 136, 204, 0.3);
    border-radius: 16px;
    padding: 30px 25px;
    text-align: center;
}

.footer-telegram-cta .telegram-cta-icon {
    width: 60px;
    height: 60px;
    background: linear-gradient(135deg, #0088cc, #0066aa);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 15px;
    font-size: 1.8rem;
    color: #fff;
    box-shadow: 0 4px 20px rgba(0, 136, 204, 0.3);
}

.footer-telegram-cta .telegram-cta-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: linear-gradient(135deg, #0088cc, #0066aa);
    color: #fff;
    padding: 12px 24px;
    border-radius: 25px;
    text-decoration: none;
    font-weight: 700;
    font-size: 0.95rem;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(0, 136, 204, 0.3);
}

.footer-telegram-cta .telegram-cta-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 25px rgba(0, 136, 204, 0.5);
    color: #fff;
    text-decoration: none;
}

@media (max-width: 600px) {
    .footer-telegram-cta .telegram-cta-card {
        padding: 25px 20px;
    }
}

/* --- Telegram Header Button (Desktop) --- */
.btn-telegram-header {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: #0088cc;
    color: white !important;
    padding: 8px 16px;
    border-radius: 20px;
    font-weight: 700;
    font-size: 0.9rem;
    text-decoration: none !important;
    transition: all 0.3s;
    box-shadow: 0 4px 10px rgba(0, 136, 204, 0.2);
    margin-right: 15px;
}

.btn-telegram-header:hover {
    background: #006da3;
    transform: translateY(-2px);
    box-shadow: 0 6px 15px rgba(0, 136, 204, 0.4);
}

@media (max-width: 992px) {
    .btn-telegram-header {
        display: none;
    }
}

/* --- VIP Telegram Card (Grid) --- */
.chollo-vip-card {
    background: linear-gradient(145deg, #1e233c, #111) !important;
    border: 2px solid #0088cc !important;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    padding: 30px 20px !important;
    min-height: 400px;
    box-shadow: 0 0 20px rgba(0, 136, 204, 0.2) !important;
}

.vip-icon {
    font-size: 3rem;
    color: #0088cc;
    margin-bottom: 20px;
    animation: float 3s ease-in-out infinite;
}

.vip-title {
    font-size: 1.4rem;
    font-weight: 900;
    color: #fff;
    margin-bottom: 10px;
    line-height: 1.2;
}

.vip-text {
    font-size: 0.95rem;
    color: var(--text-gray);
    margin-bottom: 25px;
}

.vip-btn {
    background: #0088cc;
    color: white !important;
    padding: 12px 24px;
    border-radius: 25px;
    font-weight: 800;
    text-decoration: none !important;
    transition: all 0.3s;
    display: inline-flex;
    align-items: center;
    gap: 10px;
}

.vip-btn:hover {
    background: #006da3;
    transform: scale(1.05);
}

@keyframes float {

    0%,
    100% {
        transform: translateY(0);
    }

    50% {
        transform: translateY(-10px);
    }
}

/* --- Floating Telegram Widget --- */
.tg-floating-widget {
    position: fixed;
    bottom: 25px;
    right: 25px;
    z-index: 1000;
    display: flex;
    align-items: center;
    background: #0088cc;
    color: white;
    padding: 12px 20px;
    border-radius: 40px;
    text-decoration: none !important;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.4);
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.tg-floating-widget:hover {
    transform: scale(1.1) rotate(2deg);
    background: #006da3;
    color: white;
}

.tg-floating-icon {
    font-size: 1.5rem;
    margin-right: 12px;
}

.tg-floating-text {
    font-weight: 800;
    font-size: 0.9rem;
    display: flex;
    flex-direction: column;
}

.tg-floating-subtext {
    font-size: 0.7rem;
    opacity: 0.8;
    font-weight: 400;
}

@media (max-width: 768px) {
    .tg-floating-widget {
        bottom: 85px;
        /* Above mobile nav */
        right: 15px;
        padding: 10px 15px;
    }

    .tg-floating-text {
        display: none;
    }

    .tg-floating-icon {
        margin-right: 0;
    }
}