/* ===== VILLA STRONG GYM - MARKET CSS ===== */
:root {
    --dark-navy: #0D1B2A;
    --navy: #1A2535;
    --blue-electric: #1E90FF;
    --orange: #FF6B2B;
    --gold: #F5C842;
    --white: #FFFFFF;
    --light-gray: #F4F6F8;
    --text-muted: #8A95A3;
    --gradient-accent: linear-gradient(90deg, #FF6B2B, #F5C842);
    --font-display: 'Bebas Neue', sans-serif;
    --font-body: 'Roboto', sans-serif;
    --shadow-card: 0 4px 20px rgba(0,0,0,0.10);
    --shadow-hover: 0 12px 40px rgba(0,0,0,0.18);
    --radius: 12px;
    --radius-sm: 6px;
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body { font-family: var(--font-body); background: var(--light-gray); color: var(--dark-navy); overflow-x: hidden; }
img { max-width: 100%; height: auto; display: block; }
a { text-decoration: none; color: inherit; }
ul { list-style: none; }

/* WHATSAPP */
.whatsapp-btn {
    position: fixed; bottom: 28px; right: 28px; z-index: 9999;
    background: #25D366; color: var(--white); width: 60px; height: 60px;
    border-radius: 50%; display: flex; align-items: center; justify-content: center;
    font-size: 28px; box-shadow: 0 4px 20px rgba(37,211,102,0.5);
    transition: var(--transition); animation: waFloat 3s ease-in-out infinite;
}
.whatsapp-btn:hover { transform: scale(1.12); animation: none; }
.whatsapp-tooltip {
    position: absolute; right: 70px; background: var(--dark-navy); color: var(--white);
    padding: 6px 14px; border-radius: 20px; font-size: 13px; font-weight: 600;
    white-space: nowrap; opacity: 0; pointer-events: none; transition: opacity 0.3s;
}
.whatsapp-btn:hover .whatsapp-tooltip { opacity: 1; }
@keyframes waFloat { 0%,100%{transform:translateY(0)}50%{transform:translateY(-6px)} }

/* NAVBAR */
.navbar {
    position: sticky; top: 0; z-index: 1000;
    background: rgba(13,27,42,0.97);
    backdrop-filter: blur(12px);
    box-shadow: 0 4px 24px rgba(0,0,0,0.3);
}
.nav-container {
    max-width: 1280px; margin: 0 auto; padding: 0 24px;
    display: flex; align-items: center; justify-content: space-between; height: 72px; gap: 16px;
}
.nav-logo { display: flex; align-items: center; gap: 12px; }
.logo-img { height: 48px; width: 48px; border-radius: 50%; object-fit: cover; border: 2px solid var(--orange); }
.brand-name { font-family: var(--font-display); font-size: 20px; color: var(--white); letter-spacing: 0.1em; }
.nav-menu { display: flex; align-items: center; gap: 4px; margin-left: auto; }
.nav-link {
    color: rgba(255,255,255,0.75); font-size: 12px; font-weight: 600;
    letter-spacing: 0.08em; text-transform: uppercase; padding: 8px 12px;
    border-radius: var(--radius-sm); transition: var(--transition);
}
.nav-link:hover, .nav-link.active { color: var(--white); }
.nav-link.active { color: var(--orange); }
.nav-asociados {
    background: var(--gradient-accent); color: var(--dark-navy) !important;
    border-radius: 24px; padding: 8px 16px; font-weight: 700;
    display: flex; align-items: center; gap: 6px;
}
.cart-btn {
    position: relative; background: rgba(255,107,43,0.15);
    border: 1px solid rgba(255,107,43,0.3); color: var(--white);
    width: 44px; height: 44px; border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    font-size: 18px; cursor: pointer; transition: var(--transition); flex-shrink: 0;
}
.cart-btn:hover { background: var(--orange); border-color: var(--orange); }
.cart-count {
    position: absolute; top: -4px; right: -4px;
    background: var(--gradient-accent); color: var(--dark-navy);
    width: 20px; height: 20px; border-radius: 50%;
    font-size: 11px; font-weight: 800;
    display: flex; align-items: center; justify-content: center;
}
.nav-toggle { display: none; flex-direction: column; gap: 5px; background: none; border: none; cursor: pointer; padding: 6px; }
.nav-toggle span { display: block; width: 26px; height: 2px; background: var(--white); border-radius: 2px; transition: var(--transition); }

/* MARKET HERO */
.market-hero {
    position: relative; padding: 64px 0 48px;
    background: var(--dark-navy); overflow: hidden;
}
.market-hero-bg {
    position: absolute; inset: 0;
    background: url('https://images.unsplash.com/photo-1534438327276-14e5300c3a48?w=1400&q=70') center/cover;
    opacity: 0.12;
}
.market-hero-overlay {
    position: absolute; inset: 0;
    background: linear-gradient(90deg, var(--dark-navy) 40%, transparent);
}
.market-hero-content { position: relative; z-index: 2; }
.hero-breadcrumb {
    display: flex; align-items: center; gap: 8px;
    color: rgba(255,255,255,0.45); font-size: 13px; margin-bottom: 16px;
}
.hero-breadcrumb a { color: rgba(255,255,255,0.45); transition: var(--transition); }
.hero-breadcrumb a:hover { color: var(--orange); }
.hero-breadcrumb i { font-size: 10px; }
.market-hero-content h1 {
    font-family: var(--font-display); font-size: clamp(36px,6vw,72px);
    color: var(--white); line-height: 1; margin-bottom: 12px;
}
.accent { color: var(--orange); }
.market-hero-content p { color: rgba(255,255,255,0.55); font-size: 14px; letter-spacing: 0.1em; }

/* MARKET LAYOUT */
.market-main { padding: 40px 0 80px; }
.market-layout { display: grid; grid-template-columns: 260px 1fr; gap: 32px; align-items: start; }

/* SIDEBAR */
.market-sidebar {
    background: var(--white); border-radius: var(--radius);
    padding: 24px; box-shadow: var(--shadow-card);
    position: sticky; top: 88px;
}
.sidebar-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 24px; }
.sidebar-header h3 { font-size: 16px; font-weight: 700; display: flex; align-items: center; gap: 8px; color: var(--dark-navy); }
.sidebar-header i { color: var(--orange); }
.clear-filters {
    font-size: 12px; color: var(--orange); font-weight: 600;
    cursor: pointer; background: none; border: none; text-decoration: underline;
}
.filter-group { margin-bottom: 28px; padding-bottom: 24px; border-bottom: 1px solid #EEF2F6; }
.filter-group:last-child { border-bottom: none; margin-bottom: 0; padding-bottom: 0; }
.filter-group h4 { font-size: 13px; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; color: var(--dark-navy); margin-bottom: 14px; }
.filter-check { display: flex; align-items: center; gap: 10px; cursor: pointer; padding: 6px 0; font-size: 14px; color: #4A5568; }
.filter-check input[type="checkbox"] { accent-color: var(--orange); width: 16px; height: 16px; cursor: pointer; }
.filter-check:hover { color: var(--orange); }
.price-range input[type="range"] { width: 100%; accent-color: var(--orange); margin-bottom: 8px; }
.price-labels { display: flex; justify-content: space-between; font-size: 13px; color: var(--text-muted); font-weight: 600; }
.sort-select {
    width: 100%; padding: 10px 14px; border: 1px solid #DDE3EC;
    border-radius: var(--radius-sm); font-family: var(--font-body); font-size: 14px;
    color: var(--dark-navy); background: var(--white); cursor: pointer; outline: none;
}
.sort-select:focus { border-color: var(--orange); }

/* PRODUCTS AREA */
.market-topbar {
    display: flex; align-items: center; gap: 16px; margin-bottom: 20px; flex-wrap: wrap;
}
.search-wrap {
    position: relative; flex: 1; min-width: 200px;
}
.search-wrap i { position: absolute; left: 14px; top: 50%; transform: translateY(-50%); color: var(--text-muted); font-size: 15px; }
.search-wrap input {
    width: 100%; padding: 12px 14px 12px 40px;
    border: 1px solid #DDE3EC; border-radius: 32px;
    font-family: var(--font-body); font-size: 14px; outline: none; background: var(--white);
    transition: var(--transition);
}
.search-wrap input:focus { border-color: var(--orange); box-shadow: 0 0 0 3px rgba(255,107,43,0.1); }
.results-count { font-size: 13px; color: var(--text-muted); white-space: nowrap; }
.filter-toggle-mobile { display: none; }

/* CATEGORY PILLS */
.category-pills { display: flex; gap: 10px; margin-bottom: 28px; flex-wrap: wrap; }
.pill {
    display: inline-flex; align-items: center; gap: 6px;
    padding: 8px 18px; border-radius: 24px;
    font-size: 13px; font-weight: 600; cursor: pointer;
    background: var(--white); border: 2px solid #DDE3EC; color: #4A5568;
    transition: var(--transition);
}
.pill:hover { border-color: var(--orange); color: var(--orange); }
.pill.active { background: var(--gradient-accent); border-color: transparent; color: var(--dark-navy); }

/* PRODUCTS GRID */
.products-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.product-card {
    background: var(--white); border-radius: var(--radius);
    box-shadow: var(--shadow-card); overflow: hidden;
    transition: var(--transition); cursor: pointer;
    border: 1px solid rgba(0,0,0,0.04);
}
.product-card:hover { transform: translateY(-6px); box-shadow: var(--shadow-hover); }
.product-img-wrap { position: relative; overflow: hidden; height: 200px; background: #F8F9FA; }
.product-img-wrap img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.4s ease; }
.product-card:hover .product-img-wrap img { transform: scale(1.06); }
.product-badge {
    position: absolute; top: 10px; left: 10px;
    background: var(--gradient-accent); color: var(--dark-navy);
    font-size: 10px; font-weight: 800; letter-spacing: 0.1em;
    padding: 4px 10px; border-radius: 12px;
}
.product-badge.new { background: linear-gradient(90deg, #22C55E, #16A34A); color: var(--white); }
.product-badge.discount { background: linear-gradient(90deg, #EF4444, #DC2626); color: var(--white); }
.product-wishlist {
    position: absolute; top: 10px; right: 10px;
    width: 34px; height: 34px; border-radius: 50%;
    background: rgba(255,255,255,0.9); display: flex; align-items: center; justify-content: center;
    cursor: pointer; transition: var(--transition); border: none; font-size: 15px; color: var(--text-muted);
}
.product-wishlist:hover, .product-wishlist.active { color: #EF4444; background: var(--white); }
.product-body { padding: 16px 18px 20px; }
.product-cat { font-size: 10px; font-weight: 700; letter-spacing: 0.15em; color: var(--orange); text-transform: uppercase; margin-bottom: 6px; }
.product-name { font-size: 15px; font-weight: 700; color: var(--dark-navy); margin-bottom: 6px; line-height: 1.3; }
.product-brand { font-size: 12px; color: var(--text-muted); margin-bottom: 10px; }
.product-rating { display: flex; align-items: center; gap: 4px; margin-bottom: 12px; }
.product-rating .stars { color: var(--gold); font-size: 12px; }
.product-rating span { font-size: 12px; color: var(--text-muted); }
.product-footer { display: flex; align-items: center; justify-content: space-between; }
.product-price { display: flex; flex-direction: column; }
.price-current { font-family: var(--font-display); font-size: 24px; color: var(--dark-navy); line-height: 1; }
.price-original { font-size: 12px; color: var(--text-muted); text-decoration: line-through; }
.add-to-cart {
    width: 40px; height: 40px; border-radius: 50%;
    background: var(--gradient-accent); border: none; cursor: pointer;
    display: flex; align-items: center; justify-content: center;
    font-size: 16px; color: var(--dark-navy); transition: var(--transition);
}
.add-to-cart:hover { transform: scale(1.12); box-shadow: 0 4px 16px rgba(255,107,43,0.4); }

/* EMPTY STATE */
.empty-state { text-align: center; padding: 80px 24px; }
.empty-state i { font-size: 56px; color: #DDE3EC; margin-bottom: 16px; }
.empty-state h3 { font-size: 20px; font-weight: 700; margin-bottom: 8px; }
.empty-state p { color: var(--text-muted); margin-bottom: 24px; }
.btn-primary {
    display: inline-flex; align-items: center; gap: 8px;
    background: var(--gradient-accent); color: var(--dark-navy);
    font-weight: 800; font-size: 13px; letter-spacing: 0.1em; text-transform: uppercase;
    padding: 14px 28px; border-radius: 32px; transition: var(--transition); cursor: pointer; border: none;
}
.btn-primary:hover { transform: translateY(-2px); box-shadow: 0 8px 24px rgba(255,107,43,0.35); }
.btn-primary.full-width { width: 100%; justify-content: center; }

/* CART PANEL */
.cart-backdrop {
    position: fixed; inset: 0; z-index: 1800;
    background: rgba(0,0,0,0.5); backdrop-filter: blur(4px);
    opacity: 0; pointer-events: none; transition: opacity 0.3s;
}
.cart-backdrop.visible { opacity: 1; pointer-events: all; }
.cart-panel {
    position: fixed; top: 0; right: 0; bottom: 0; z-index: 1900;
    width: 380px; max-width: 100vw;
    background: var(--white); box-shadow: -8px 0 40px rgba(0,0,0,0.2);
    display: flex; flex-direction: column;
    transform: translateX(100%); transition: transform 0.35s cubic-bezier(0.4, 0, 0.2, 1);
}
    .cart-panel.open {
    transform: translateX(0);
    z-index: 10000;
 }
.cart-panel-header {
    display: flex; justify-content: space-between; align-items: center;
    padding: 24px; border-bottom: 1px solid #EEF2F6;
    background: var(--dark-navy);
}
.cart-panel-header h3 { color: var(--white); font-size: 18px; font-weight: 700; display: flex; align-items: center; gap: 10px; }
.cart-panel-header i { color: var(--orange); }
.cart-close { background: none; border: none; color: rgba(255,255,255,0.6); font-size: 20px; cursor: pointer; transition: var(--transition); }
.cart-close:hover { color: var(--white); }
.cart-items { flex: 1; overflow-y: auto; padding: 16px; }
.cart-empty { display: flex; flex-direction: column; align-items: center; justify-content: center; height: 200px; gap: 12px; color: var(--text-muted); }
.cart-empty i { font-size: 48px; color: #DDE3EC; }
.cart-item {
    display: flex; gap: 12px; padding: 14px 0;
    border-bottom: 1px solid #EEF2F6; align-items: flex-start;
}
.cart-item-img { width: 64px; height: 64px; border-radius: var(--radius-sm); overflow: hidden; flex-shrink: 0; }
.cart-item-img img { width: 100%; height: 100%; object-fit: cover; }
.cart-item-info { flex: 1; }
.cart-item-name { font-size: 14px; font-weight: 600; margin-bottom: 4px; }
.cart-item-price { font-size: 13px; color: var(--orange); font-weight: 700; }
.cart-item-controls { display: flex; align-items: center; gap: 8px; margin-top: 8px; }
.qty-btn {
    width: 26px; height: 26px; border-radius: 50%;
    border: 1px solid #DDE3EC; background: none; cursor: pointer;
    font-size: 14px; display: flex; align-items: center; justify-content: center;
    transition: var(--transition);
}
.qty-btn:hover { background: var(--orange); border-color: var(--orange); color: var(--white); }
.qty-num { font-size: 14px; font-weight: 700; min-width: 20px; text-align: center; }
.cart-item-remove { background: none; border: none; color: #EF4444; cursor: pointer; font-size: 16px; margin-left: auto; }
.cart-footer { padding: 20px; border-top: 1px solid #EEF2F6; background: #FAFBFC; }
.cart-subtotal, .cart-igv, .cart-shipping, .cart-total {
    display: flex; justify-content: space-between; margin-bottom: 8px; font-size: 13px; color: #4A5568;
}
.cart-igv { color: var(--text-muted); }
.cart-total { font-weight: 800; font-size: 17px; color: var(--dark-navy); border-top: 2px solid #EEF2F6; padding-top: 10px; margin-top: 6px; }
.shipping-free { color: #22C55E; font-weight: 700; }
.cart-item-subtotal { font-size: 13px; font-weight: 700; color: var(--dark-navy); white-space: nowrap; align-self: center; margin: 0 6px; }

/* PRODUCT MODAL */
.modal-backdrop {
    position: fixed; inset: 0; z-index: 2000;
    background: rgba(0,0,0,0.7); backdrop-filter: blur(6px);
    opacity: 0; pointer-events: none; transition: opacity 0.3s;
}
.modal-backdrop.visible { opacity: 1; pointer-events: all; }
.product-modal {
    position: fixed; top: 50%; left: 50%; z-index: 2100;
    transform: translate(-50%, -50%) scale(0.9);
    background: var(--white); border-radius: var(--radius);
    width: 90%; max-width: 760px; max-height: 90vh; overflow-y: auto;
    opacity: 0; pointer-events: none; transition: all 0.3s cubic-bezier(0.4,0,0.2,1);
    box-shadow: 0 24px 80px rgba(0,0,0,0.3);
}
.product-modal.open { opacity: 1; pointer-events: all; transform: translate(-50%,-50%) scale(1); }
.modal-close {
    position: absolute; top: 16px; right: 16px; z-index: 10;
    width: 36px; height: 36px; border-radius: 50%;
    background: rgba(0,0,0,0.1); border: none; cursor: pointer;
    font-size: 16px; display: flex; align-items: center; justify-content: center;
    transition: var(--transition);
}
.modal-close:hover { background: #EF4444; color: var(--white); }
.modal-body { display: grid; grid-template-columns: 1fr 1fr; }
.modal-img { height: 360px; overflow: hidden; border-radius: var(--radius) 0 0 var(--radius); }
.modal-img img { width: 100%; height: 100%; object-fit: cover; }
.modal-info { padding: 32px; }
.modal-cat { font-size: 11px; font-weight: 700; letter-spacing: 0.15em; color: var(--orange); text-transform: uppercase; margin-bottom: 8px; }
.modal-name { font-size: 22px; font-weight: 800; color: var(--dark-navy); margin-bottom: 6px; }
.modal-brand { font-size: 13px; color: var(--text-muted); margin-bottom: 12px; }
.modal-rating { display: flex; align-items: center; gap: 6px; margin-bottom: 16px; }
.modal-rating .stars { color: var(--gold); }
.modal-desc { font-size: 14px; color: #4A5568; line-height: 1.7; margin-bottom: 20px; }
.modal-price-row { display: flex; align-items: baseline; gap: 12px; margin-bottom: 24px; }
.modal-price { font-family: var(--font-display); font-size: 36px; color: var(--dark-navy); }
.modal-price-old { font-size: 16px; color: var(--text-muted); text-decoration: line-through; }
.modal-qty { display: flex; align-items: center; gap: 16px; margin-bottom: 20px; }
.modal-qty label { font-size: 13px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.08em; }
.modal-qty-controls { display: flex; align-items: center; gap: 12px; border: 1px solid #DDE3EC; border-radius: 24px; padding: 4px 12px; }
.modal-qty-controls button { background: none; border: none; cursor: pointer; font-size: 18px; color: var(--dark-navy); transition: var(--transition); }
.modal-qty-controls button:hover { color: var(--orange); }
.modal-qty-num { font-size: 16px; font-weight: 700; min-width: 24px; text-align: center; }
.modal-add-btn { width: 100%; }

/* FOOTER MINI */
.footer-mini { background: var(--dark-navy); padding: 20px 0; }
.footer-mini-content {
    display: flex; align-items: center; justify-content: space-between;
    flex-wrap: wrap; gap: 12px;
}
.footer-mini p { color: rgba(255,255,255,0.35); font-size: 12px; }
.footer-legal { display: flex; align-items: center; gap: 12px; }
.footer-legal a { color: rgba(255,255,255,0.4); font-size: 12px; transition: var(--transition); }
.footer-legal a:hover { color: var(--orange); }
.footer-legal span { color: rgba(255,255,255,0.15); }

/* REVEAL */
.product-card { opacity: 0; transform: translateY(20px); transition: opacity 0.4s ease, transform 0.4s ease, box-shadow 0.3s, transform 0.3s; }
.product-card.visible { opacity: 1; transform: translateY(0); }
.product-card.visible:hover { transform: translateY(-6px); }

/* RESPONSIVE */
@media(max-width:1024px){
    .market-layout { grid-template-columns: 1fr; }
    .market-sidebar { position: static; display: none; }
    .market-sidebar.mobile-open { display: block; }
    .filter-toggle-mobile {
        display: inline-flex; align-items: center; gap: 6px;
        padding: 10px 18px; background: var(--dark-navy); color: var(--white);
        border: none; border-radius: 24px; font-size: 13px; font-weight: 600; cursor: pointer;
    }
    .products-grid { grid-template-columns: repeat(2,1fr); }
}
@media(max-width:768px){
    .nav-toggle { display: flex; }
    .nav-menu {
        position: fixed; top: 72px; left: 0; right: 0;
        background: rgba(13,27,42,0.98); flex-direction: column;
        padding: 24px; gap: 4px;
        transform: translateY(-100%); opacity: 0; pointer-events: none; transition: var(--transition);
    }
    .nav-menu.open { transform: translateY(0); opacity: 1; pointer-events: all; }
    .brand-name { display: none; }
    .modal-body { grid-template-columns: 1fr; }
    .modal-img { border-radius: var(--radius) var(--radius) 0 0; height: 240px; }
}
@media(max-width:480px){
    .products-grid { grid-template-columns: 1fr; }
    .cart-panel { width: 100%; }
    .footer-mini-content { flex-direction: column; text-align: center; }
}
@media(max-width:120px){
    html { font-size: 9px; }
    .nav-container { height: 48px; padding: 0 4px; }
    .logo-img { height: 32px; width: 32px; }
    .market-main { padding: 16px 0 40px; }
    .container { padding: 0 4px; }
    .whatsapp-btn { width: 32px; height: 32px; font-size: 14px; bottom: 6px; right: 6px; }
}