/* ==============================================================
   PDX BUSINESS FRAMEWORK — Design System
   LinkedIn-inspired 3-column layout
   Proveedores de América — Ecosistema B2B
   ============================================================== */

:root {
    --pdx-primary: #0a66c2;
    --pdx-primary-dark: #004182;
    --pdx-secondary: #13c296;
    --pdx-accent: #f59e0b;
    --pdx-dark: #1b1f23;
    --pdx-text: #334155;
    --pdx-text-light: #64748b;
    --pdx-light-bg: #ffffff;
    --pdx-card-bg: #ffffff;
    --pdx-border: #e8e6e1;
    --pdx-topbar-bg: #edf0f3;
    --pdx-radius: 10px;
    --pdx-radius-sm: 6px;
}

* { box-sizing: border-box; }

body {
    font-family: 'DM Sans', -apple-system, BlinkMacSystemFont, sans-serif;
    color: var(--pdx-text);
    background: var(--pdx-light-bg);
    -webkit-font-smoothing: antialiased;
    margin: 0;
}

h1,h2,h3,h4,h5,h6 {
    font-family: 'Plus Jakarta Sans', sans-serif;
    font-weight: 700;
    color: var(--pdx-dark);
    margin: 0;
}

a { text-decoration: none; color: var(--pdx-primary); transition: all 0.2s; }
a:hover { color: var(--pdx-primary-dark); }
img { max-width: 100%; }

/* ===== TOPBAR — Gris Claro (LinkedIn-style) ===== */
.topbar {
    background: var(--pdx-topbar-bg);
    border-bottom: 1px solid var(--pdx-border);
    position: sticky;
    top: 0;
    z-index: 1030;
}

.topbar-inner {
    max-width: 1128px;
    margin: 0 auto;
    padding: 0 16px;
    display: flex;
    align-items: center;
    height: 52px;
    gap: 8px;
}

.topbar-brand {
    display: flex;
    align-items: center;
    gap: 8px;
    text-decoration: none;
    flex-shrink: 0;
}

.topbar-brand img {
    height: 36px;
    object-fit: contain;
}

.topbar-search {
    flex: 1;
    max-width: 360px;
    position: relative;
}

.topbar-search input {
    width: 100%;
    background: #fff;
    border: 1px solid var(--pdx-border);
    border-radius: 6px;
    padding: 7px 12px 7px 36px;
    font-size: 0.88rem;
    color: var(--pdx-text);
    outline: none;
    transition: border-color 0.2s, box-shadow 0.2s;
}

.topbar-search input:focus {
    border-color: var(--pdx-primary);
    box-shadow: 0 0 0 3px rgba(10,102,194,0.12);
}

.topbar-search i {
    position: absolute;
    left: 12px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--pdx-text-light);
    font-size: 0.85rem;
}

.topbar-nav {
    display: flex;
    align-items: center;
    gap: 4px;
    margin-left: auto;
}

.topbar-nav-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 4px 12px;
    font-size: 0.7rem;
    color: var(--pdx-text-light);
    text-decoration: none;
    border-radius: 4px;
    transition: color 0.2s;
    white-space: nowrap;
}

.topbar-nav-item i { font-size: 1.15rem; margin-bottom: 2px; }
.topbar-nav-item:hover { color: var(--pdx-dark); }
.topbar-nav-item.active { color: var(--pdx-dark); border-bottom: 2px solid var(--pdx-dark); }
.cart-badge { position:absolute; top:2px; right:2px; background:#dc3545; color:#fff; font-size:0.6rem; font-weight:700; width:18px; height:18px; border-radius:50%; display:flex; align-items:center; justify-content:center; line-height:1; }

/* ===== 3-COLUMN LAYOUT ===== */
.main-container {
    max-width: 1128px;
    margin: 0 auto;
    padding: 20px 16px;
}

.main-layout {
    display: grid;
    grid-template-columns: 200px 1fr 280px;
    gap: 16px;
    align-items: start;
}
.left-sidebar { min-width: 0; }

.center-content { min-width: 0; overflow: hidden; }
.right-sidebar { position: sticky; top: 72px; max-height: calc(100vh - 80px); overflow-y: auto; scrollbar-width: thin; scrollbar-color: #c1c1c1 transparent; }
.right-sidebar::-webkit-scrollbar { width: 4px; }
.right-sidebar::-webkit-scrollbar-thumb { background: #c1c1c1; border-radius: 4px; }


/* ===== CARDS BASE ===== */
.card-box {
    background: var(--pdx-card-bg);
    border: 1px solid var(--pdx-border);
    border-radius: var(--pdx-radius);
    overflow: hidden;
    margin-bottom: 8px;
}

.card-box-header {
    padding: 14px 16px 10px;
    font-size: 0.92rem;
    font-weight: 700;
    color: var(--pdx-dark);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.card-box-header a { font-size: 0.78rem; font-weight: 600; }
.card-box-body { padding: 0 16px 14px; }

/* ===== LEFT SIDEBAR — Profile + Ecosystem Nav ===== */
.profile-card { text-align: center; }

.profile-card-cover {
    height: 56px;
    background: linear-gradient(135deg, var(--pdx-primary) 0%, #0077b5 60%, var(--pdx-secondary) 100%);
    border-radius: var(--pdx-radius) var(--pdx-radius) 0 0;
}

.profile-card-avatar {
    width: 64px;
    height: 64px;
    border-radius: 50%;
    border: 3px solid #fff;
    margin-top: -32px;
    background: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-left: auto;
    margin-right: auto;
    font-size: 1.5rem;
    color: var(--pdx-primary);
}

.profile-card-name { font-size: 0.95rem; font-weight: 700; margin-top: 8px; }
.profile-card-role { font-size: 0.78rem; color: var(--pdx-text-light); margin-top: 2px; }

.profile-card-stats {
    display: flex;
    justify-content: space-around;
    padding: 12px 8px;
    margin-top: 10px;
    border-top: 1px solid var(--pdx-border);
}

.profile-stat { text-align: center; }
.profile-stat-number { font-family: 'Plus Jakarta Sans'; font-weight: 800; font-size: 1rem; color: var(--pdx-primary); }
.profile-stat-label { font-size: 0.65rem; color: var(--pdx-text-light); text-transform: uppercase; letter-spacing: 0.03em; }

/* Ecosystem Navigation */
.sidebar-heading {
    padding: 12px 16px 6px;
    font-size: 0.68rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--pdx-text-light);
}

.eco-nav-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 9px 16px;
    color: var(--pdx-text);
    font-size: 0.85rem;
    font-weight: 500;
    transition: all 0.15s;
}

.eco-nav-item:hover { background: rgba(10,102,194,0.05); color: var(--pdx-primary); }
.eco-nav-item i { width: 20px; text-align: center; color: var(--pdx-text-light); font-size: 0.95rem; }
.eco-nav-item:hover i { color: var(--pdx-primary); }

.eco-nav-badge {
    margin-left: auto;
    background: var(--pdx-accent);
    color: #fff;
    font-size: 0.65rem;
    font-weight: 700;
    padding: 2px 6px;
    border-radius: 8px;
}

/* PDA Branding */
.pda-brand {
    padding: 12px 16px;
    text-align: center;
    border-top: 1px solid var(--pdx-border);
}

.pda-brand-name {
    font-family: 'Plus Jakarta Sans';
    font-size: 0.72rem;
    font-weight: 700;
    color: var(--pdx-text-light);
    text-transform: uppercase;
    letter-spacing: 0.06em;
}

.pda-brand-sub {
    font-size: 0.65rem;
    color: var(--pdx-text-light);
    margin-top: 2px;
}

/* ===== HERO CAROUSEL ===== */
.hero-carousel {
    border-radius: var(--pdx-radius);
    overflow: hidden;
    margin-bottom: 8px;
}

.hero-slide {
    position: relative;
    padding: 30px 28px;
    height: 160px;
    display: flex;
    align-items: center;
    overflow: hidden;
}

.hero-slide-1 { background: linear-gradient(135deg, #0a66c2 0%, #004182 100%); }
.hero-slide-2 { background: linear-gradient(135deg, #13c296 0%, #0a8a6a 100%); }
.hero-slide-3 { background: linear-gradient(135deg, #7c3aed 0%, #4c1d95 100%); }

.hero-slide-content { position: relative; z-index: 2; color: #fff; max-width: 65%; }
.hero-slide-badge { font-size: 0.65rem; text-transform: uppercase; letter-spacing: 0.1em; opacity: 0.85; margin-bottom: 6px; }
.hero-slide-title { font-family: 'Plus Jakarta Sans'; font-size: 1.25rem; font-weight: 800; color: #fff; margin-bottom: 6px; line-height: 1.2; }
.hero-slide-desc { font-size: 0.82rem; opacity: 0.9; line-height: 1.4; }

.hero-slide-btn {
    display: inline-block;
    margin-top: 10px;
    background: rgba(255,255,255,0.2);
    color: #fff;
    padding: 6px 16px;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 600;
    backdrop-filter: blur(4px);
    transition: background 0.2s;
}
.hero-slide-btn:hover { background: rgba(255,255,255,0.35); color: #fff; }

.hero-slide-icon {
    position: absolute;
    right: 20px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 4rem;
    color: rgba(255,255,255,0.12);
}

/* ===== FRAMEWORK STATS BAR ===== */
.framework-bar {
    display: flex;
    justify-content: space-between;
    padding: 12px 16px;
    gap: 8px;
}

.framework-stat {
    text-align: center;
    flex: 1;
}

.framework-stat-icon { font-size: 0.9rem; color: var(--pdx-primary); margin-bottom: 2px; }
.framework-stat-number { font-family: 'Plus Jakarta Sans'; font-weight: 800; font-size: 0.95rem; color: var(--pdx-dark); }
.framework-stat-label { font-size: 0.6rem; color: var(--pdx-text-light); text-transform: uppercase; letter-spacing: 0.03em; }

/* ===== CATEGORY CHIPS ===== */
.category-chips {
    display: flex;
    gap: 6px;
    overflow-x: auto;
    padding: 10px 16px;
    scrollbar-width: none;
    -ms-overflow-style: none;
}

.category-chips::-webkit-scrollbar { display: none; }

.cat-chip {
    flex-shrink: 0;
    padding: 5px 14px;
    border-radius: 16px;
    font-size: 0.78rem;
    font-weight: 600;
    background: #f1f5f9;
    color: var(--pdx-text-light);
    cursor: pointer;
    transition: all 0.2s;
    text-decoration: none;
}

.cat-chip:hover { background: #e2e8f0; color: var(--pdx-dark); }
.cat-chip.active { background: var(--pdx-primary); color: #fff; }

/* ===== PRODUCT GRID ===== */
.product-grid-title {
    font-size: 0.92rem;
    font-weight: 700;
    color: var(--pdx-dark);
    margin-bottom: 12px;
}

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

.product-card {
    background: var(--pdx-card-bg);
    border: 1px solid var(--pdx-border);
    border-radius: var(--pdx-radius);
    overflow: hidden;
    transition: transform 0.2s, box-shadow 0.2s;
    display: flex;
    flex-direction: column;
}

.product-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 16px rgba(0,0,0,0.1);
}

.product-card-img {
    display: block;
    height: 150px;
    background: #ffffff;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    padding: 8px;
}

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

.product-card-body {
    padding: 10px 12px 6px;
    flex: 1;
}

.product-company {
    font-size: 0.72rem;
    font-weight: 600;
    color: var(--pdx-dark);
    
    letter-spacing: 0.02em;
}

.product-name {
    font-size: 0.88rem;
    font-weight: 600;
    color: var(--pdx-dark);
    margin-top: 3px;
    line-height: 1.25;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.product-name a { color: var(--pdx-primary); }
.product-name a:hover { color: var(--pdx-primary-dark); }

.product-location {
    display: flex;
    align-items: center;
    gap: 4px;
    margin-top: 4px;
    font-size: 0.7rem;
    color: var(--pdx-text-light);
}

.flag-micro { width: 14px; height: 10px; border-radius: 1px; }

.product-card-footer {
    padding: 8px 12px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-top: 1px solid var(--pdx-border);
}

.product-price {
    font-family: 'Plus Jakarta Sans';
    font-weight: 800;
    font-size: 0.95rem;
    color: #dc3545;
}

.product-card-footer .btn {
    font-size: 0.72rem;
    padding: 4px 10px;
}

/* ===== RIGHT SIDEBAR ===== */
.sidebar-card { margin-bottom: 8px; }

/* Cupones */
.coupon-item {
    display: flex;
    gap: 10px;
    padding: 10px 0;
    border-bottom: 1px solid var(--pdx-border);
}

.coupon-item:last-child { border-bottom: none; }

.coupon-badge {
    background: linear-gradient(135deg, var(--pdx-accent), #d97706);
    color: #fff;
    padding: 6px 10px;
    border-radius: var(--pdx-radius-sm);
    font-family: 'Plus Jakarta Sans';
    font-weight: 800;
    font-size: 0.85rem;
    white-space: nowrap;
    align-self: flex-start;
}

.coupon-info { flex: 1; }
.coupon-company { font-size: 0.78rem; font-weight: 600; color: var(--pdx-dark); }
.coupon-desc { font-size: 0.72rem; color: var(--pdx-text-light); margin-top: 2px; }
.coupon-expiry { font-size: 0.65rem; color: var(--pdx-accent); font-weight: 600; margin-top: 3px; }

/* Networking */
.networking-event {
    display: flex;
    gap: 12px;
    padding: 10px 0;
    border-bottom: 1px solid var(--pdx-border);
}

.networking-event:last-child { border-bottom: none; }

.event-date-box {
    background: var(--pdx-primary);
    color: #fff;
    text-align: center;
    padding: 6px 10px;
    border-radius: var(--pdx-radius-sm);
    min-width: 48px;
    align-self: flex-start;
}

.event-date-month { font-size: 0.6rem; text-transform: uppercase; letter-spacing: 0.08em; }
.event-date-day { font-family: 'Plus Jakarta Sans'; font-weight: 800; font-size: 1.2rem; line-height: 1; }

.event-info { flex: 1; }
.event-title { font-size: 0.82rem; font-weight: 600; color: var(--pdx-dark); }
.event-desc { font-size: 0.72rem; color: var(--pdx-text-light); margin-top: 2px; }

/* Ranking */
.ranking-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 0;
    border-bottom: 1px solid var(--pdx-border);
}

.ranking-item:last-child { border-bottom: none; }

.ranking-position {
    font-family: 'Plus Jakarta Sans';
    font-weight: 800;
    font-size: 0.9rem;
    color: var(--pdx-primary);
    width: 22px;
    text-align: center;
}

.ranking-company { font-size: 0.8rem; font-weight: 600; color: var(--pdx-dark); flex: 1; }
.ranking-score { font-size: 0.72rem; font-weight: 700; color: var(--pdx-secondary); }

/* Country Selector */
.country-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    padding: 8px 0;
}

.country-chip {
    display: flex;
    align-items: center;
    gap: 4px;
    padding: 4px 10px;
    border-radius: 16px;
    font-size: 0.72rem;
    font-weight: 500;
    background: #f1f5f9;
    color: var(--pdx-text-light);
    transition: all 0.2s;
}

.country-chip:hover { background: var(--pdx-primary); color: #fff; }
.country-chip.active { background: var(--pdx-primary); color: #fff; }
.country-chip img { width: 14px; height: 10px; border-radius: 1px; }

/* ===== FOOTER ===== */
.pdx-footer {
    background: var(--pdx-dark);
    color: #94a3b8;
    margin-top: 40px;
    padding: 32px 0 16px;
}

.pdx-footer h6 { color: #e2e8f0; font-size: 0.88rem; margin-bottom: 12px; }
.pdx-footer a { color: #94a3b8; font-size: 0.82rem; }
.pdx-footer a:hover { color: var(--pdx-primary); }
.footer-bottom { border-top: 1px solid #334155; padding-top: 16px; margin-top: 24px; }

/* ===== PAGINATION ===== */
.pdx-pagination {
    display: flex;
    justify-content: center;
    gap: 4px;
    margin-top: 20px;
}

.pdx-pagination a, .pdx-pagination span {
    padding: 6px 12px;
    border-radius: var(--pdx-radius-sm);
    font-size: 0.82rem;
    font-weight: 600;
}

.pdx-pagination a {
    background: var(--pdx-card-bg);
    border: 1px solid var(--pdx-border);
    color: var(--pdx-text);
}

.pdx-pagination a:hover { background: var(--pdx-primary); color: #fff; border-color: var(--pdx-primary); }
.pdx-pagination .current { background: var(--pdx-primary); color: #fff; border: 1px solid var(--pdx-primary); }

/* ===== RESPONSIVE ===== */
@media (max-width: 1200px) {
    .main-layout { grid-template-columns: 180px 1fr 260px; gap: 12px; }
}
@media (max-width: 1024px) {
    .main-layout { grid-template-columns: 160px 1fr 240px; gap: 10px; }
    .left-sidebar { font-size: 0.9em; }
}
@media (max-width: 900px) {
    .main-layout { grid-template-columns: 1fr 260px; }
    .left-sidebar { display: none; }
}
@media (max-width: 768px) {    .main-layout { grid-template-columns: 1fr; }
    .left-sidebar { display: block; order: 3; position: static; }
    .center-content { order: 1; }
    .right-sidebar { order: 2; position: static; }
    .product-grid { grid-template-columns: repeat(2, 1fr); }
    .topbar-nav-item span { display: none; }
    .topbar-search { max-width: 200px; }
    .hero-slide-content { max-width: 85%; }
    .hero-slide-title { font-size: 1rem; }
}

@media (max-width: 480px) {
    .product-grid { grid-template-columns: 1fr 1fr; gap: 8px; }
    .product-card-img { height: 120px; }
    .framework-bar { flex-wrap: wrap; }
    .framework-stat { flex: 0 0 48%; }
}

/* ===== MOBILE NAV (Bottom) ===== */
.mobile-nav {
    display: none;
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: #fff;
    border-top: 1px solid var(--pdx-border);
    z-index: 1030;
    padding: 6px 0;
}

@media (max-width: 768px) {
    .mobile-nav { display: flex; justify-content: space-around; }
    body { padding-bottom: 60px; }
}

.mobile-nav a {
    display: flex;
    flex-direction: column;
    align-items: center;
    font-size: 0.65rem;
    color: var(--pdx-text-light);
    padding: 4px 8px;
}

.mobile-nav a i { font-size: 1.1rem; margin-bottom: 2px; }
.mobile-nav a.active { color: var(--pdx-primary); }

/* ===== PRODUCT DETAIL PAGE ===== */
.product-detail-gallery img.main-image {
    width: 100%;
    max-height: 420px;
    object-fit: contain;
    background: #fff;
    border: 1px solid var(--pdx-border);
    border-radius: var(--pdx-radius);
}

.gallery-thumbs {
    display: flex;
    gap: 8px;
    margin-top: 10px;
}

.gallery-thumb {
    width: 70px;
    height: 70px;
    object-fit: cover;
    border: 2px solid var(--pdx-border);
    border-radius: var(--pdx-radius-sm);
    cursor: pointer;
    transition: border-color 0.2s;
}

.gallery-thumb:hover, .gallery-thumb.active { border-color: var(--pdx-primary); }

.product-detail-title {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--pdx-dark);
    line-height: 1.3;
}

.product-detail-price {
    font-family: 'Plus Jakarta Sans';
    font-weight: 800;
    font-size: 1.4rem;
    color: #dc3545;
}

.condition-badge {
    display: inline-block;
    background: var(--pdx-accent);
    color: #fff;
    padding: 4px 12px;
    border-radius: 4px;
    font-size: 0.8rem;
    font-weight: 700;
}

/* ===== MOBILE RESPONSIVE FIX ===== */
@media (max-width: 768px) {
    .topbar-inner {
        height: 48px;
        padding: 0 10px;
        gap: 6px;
    }
    .topbar-brand img {
        height: 28px;
    }
    .topbar-search {
        max-width: 140px;
        flex: 1;
    }
    .topbar-search input {
        padding: 5px 8px 5px 30px;
        font-size: 0.8rem;
    }
    .topbar-nav {
        display: none;
    }
    .profile-header__info {
        padding-top: 8px;
    }
    .profile-header__avatar {
        width: 72px;
        height: 72px;
    }
    .profile-header__name {
        font-size: 1.15rem;
        color: #1e293b;
    }
}
@media (max-width: 480px) {
    .topbar-brand img {
        height: 24px;
    }
    .topbar-search {
        max-width: 120px;
    }
    .topbar-search input {
        font-size: 0.75rem;
        padding: 4px 6px 4px 26px;
    }
}