:root {
    --primary-green: #28b526;
    --dark-green: #1f941f;
    --light-green: #37c837;
    --neon-green: #32d92e;
    --bg-primary: #0d0d0d;
    --bg-secondary: #141414;
    --bg-tertiary: #1e1e1e;
    --card-bg: #161616;
    --card-bg-hover: #1c1c1c;
    --text-primary: #f9fafb;
    --text-secondary: #d1d5db;
    --text-muted: #9ca3af;
    --border: #252525;
    --border-hover: #333;
    --accent: var(--primary-green);
    --warning: #f59e0b;
    --error: #ef4444;
    --shadow: 0 2px 8px rgba(0, 0, 0, 0.4);
    --shadow-lg: 0 12px 40px rgba(0, 0, 0, 0.5);
    --shadow-green: 0 8px 30px rgba(40, 181, 38, 0.15);
    --glass-bg: rgba(22, 22, 22, 0.7);
    --glass-border: rgba(255, 255, 255, 0.06);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Poppins', sans-serif;
    background: var(--bg-primary);
    color: var(--text-primary);
    overflow-x: hidden;
    padding-top: 0;
}

/* ===== PAGE HERO HEADER ===== */
.page-hero {
    position: relative;
    padding: 8rem 0 8rem;
    background: var(--bg-primary);
    overflow: hidden;
    text-align: left;
    margin: 80px 0 0;
    min-height: 380px;
}

.page-hero-bg {
    position: absolute;
    inset: 0;
    background: var(--bg-primary) url('https://i.imgur.com/GGpRNSf.jpeg') center/cover no-repeat;
    background-size: cover;
    background-position: center;
    filter: brightness(0.4);
}

.page-hero .hero-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(to bottom, rgba(10,10,10,0) 0%, rgba(10,10,10,0.45) 58%, rgba(13,13,13,0.95) 100%);
    z-index: 1;
    pointer-events: none;
}

.page-hero-content {
    position: relative;
    z-index: 2;
}

.page-title {
    font-size: 2.2rem;
    font-weight: 800;
    color: #fff;
    margin-bottom: 0.3rem;
    letter-spacing: -0.01em;
    line-height: 1.15;
}

.page-title .highlight {
    background: linear-gradient(135deg, var(--primary-green), var(--light-green));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.page-subtitle {
    color: rgba(255,255,255,0.55);
    font-size: 0.95rem;
    font-style: italic;
    font-weight: 400;
    margin: 0;
}

/* ===== MAIN LAYOUT ===== */
.catalog-layout {
    display: grid;
    grid-template-columns: 1fr 280px;
    gap: 2rem;
    align-items: start;
}

.catalog-main {
    min-width: 0;
}

/* ===== FILTERS SIDEBAR ===== */
.filters-sidebar {
    position: sticky;
    top: 100px;
    background: var(--glass-bg);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid var(--glass-border);
    border-radius: 16px;
    padding: 1.5rem;
    box-shadow: var(--shadow);
}

.filters-sidebar::before {
    content: '';
    position: absolute;
    top: 0;
    left: 15%;
    right: 15%;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(40, 181, 38, 0.2), transparent);
    border-radius: 1px;
}

.filters-sidebar-title {
    font-size: 0.85rem;
    font-weight: 700;
    color: var(--text-primary);
    text-transform: uppercase;
    letter-spacing: 0.06em;
    margin-bottom: 1.25rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.filters-sidebar-title i {
    color: var(--primary-green);
    font-size: 0.8rem;
}

.filter-group {
    margin-bottom: 1.25rem;
}

.filter-group:last-of-type {
    margin-bottom: 1rem;
}

.filter-group-label {
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.06em;
    margin-bottom: 0.5rem;
    display: block;
}

.search-container {
    position: relative;
}

.search-input {
    width: 100%;
    background: var(--bg-primary);
    border: 1px solid var(--border);
    border-radius: 10px;
    padding: 0.7rem 1rem 0.7rem 2.75rem;
    color: var(--text-primary);
    font-family: 'Poppins', sans-serif;
    font-size: 0.9rem;
    transition: all 0.3s ease;
}

.search-input:focus {
    outline: none;
    border-color: var(--primary-green);
    box-shadow: 0 0 0 3px rgba(40, 181, 38, 0.1);
    background: var(--bg-secondary);
}

.search-input::placeholder {
    color: var(--text-muted);
}

.search-icon {
    position: absolute;
    left: 0.9rem;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-muted);
    font-size: 0.95rem;
    transition: color 0.3s ease;
}

.search-container:focus-within .search-icon {
    color: var(--primary-green);
}

.filter-select {
    width: 100%;
    background: var(--bg-primary);
    border: 1px solid var(--border);
    border-radius: 10px;
    padding: 0.7rem 1rem;
    color: var(--text-primary);
    font-family: 'Poppins', sans-serif;
    font-size: 0.85rem;
    transition: all 0.3s ease;
    cursor: pointer;
    appearance: none;
    -webkit-appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%239ca3af' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 0.8rem center;
    padding-right: 2.2rem;
}

.filter-select option {
    background: var(--bg-primary);
    color: var(--text-primary);
}

.filter-select:focus {
    outline: none;
    border-color: var(--primary-green);
    box-shadow: 0 0 0 3px rgba(40, 181, 38, 0.1);
}

/* ===== CATEGORY TABS ===== */
.category-tabs {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}
.cat-tab {
    background: transparent;
    border: 1px solid var(--border);
    color: var(--text-muted);
    padding: 0.4rem 0.8rem;
    border-radius: 8px;
    font-size: 0.8rem;
    cursor: pointer;
    transition: all 0.2s ease;
}
.cat-tab:hover {
    border-color: var(--primary-green);
    color: var(--primary-green);
}
.cat-tab.active {
    background: var(--primary-green);
    color: #000;
    border-color: var(--primary-green);
    font-weight: 600;
}

/* ===== PRICE RANGE SLIDER ===== */
.price-slider-container {
    padding: 0.5rem 0;
}

.price-values {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
    font-size: 0.85rem;
}

.price-value {
    background: var(--bg-primary);
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 0.4rem 0.8rem;
    color: var(--primary-green);
    font-weight: 600;
    min-width: 70px;
    text-align: center;
}

.price-slider-wrapper {
    position: relative;
    height: 40px;
    display: flex;
    align-items: center;
}

.price-slider-track {
    position: absolute;
    width: 100%;
    height: 4px;
    background: var(--border);
    border-radius: 2px;
}

.price-slider-range {
    position: absolute;
    height: 4px;
    background: linear-gradient(90deg, var(--primary-green), var(--light-green));
    border-radius: 2px;
}

.price-slider {
    position: absolute;
    width: 100%;
    height: 4px;
    -webkit-appearance: none;
    appearance: none;
    background: transparent;
    pointer-events: none;
    z-index: 2;
}

.price-slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: var(--primary-green);
    border: 3px solid var(--bg-secondary);
    cursor: pointer;
    pointer-events: auto;
    transition: all 0.2s ease;
    box-shadow: 0 2px 8px rgba(40, 181, 38, 0.3);
}

.price-slider::-webkit-slider-thumb:hover {
    background: var(--light-green);
    transform: scale(1.15);
    box-shadow: 0 4px 12px rgba(40, 181, 38, 0.5);
}

.price-slider::-webkit-slider-thumb:active {
    transform: scale(1.05);
}

.price-slider::-moz-range-thumb {
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: var(--primary-green);
    border: 3px solid var(--bg-secondary);
    cursor: pointer;
    pointer-events: auto;
    transition: all 0.2s ease;
    box-shadow: 0 2px 8px rgba(40, 181, 38, 0.3);
}

.price-slider::-moz-range-thumb:hover {
    background: var(--light-green);
    transform: scale(1.15);
    box-shadow: 0 4px 12px rgba(40, 181, 38, 0.5);
}

.price-slider::-moz-range-thumb:active {
    transform: scale(1.05);
}

.price-slider:focus {
    outline: none;
}

.clear-filters-btn {
    width: 100%;
    background: transparent;
    border: 1px solid var(--border);
    border-radius: 10px;
    padding: 0.6rem 1rem;
    color: var(--text-muted);
    font-family: 'Poppins', sans-serif;
    font-size: 0.85rem;
    cursor: pointer;
    transition: all 0.3s ease;
    white-space: nowrap;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.4rem;
}

.clear-filters-btn:hover {
    background: rgba(239, 68, 68, 0.1);
    border-color: var(--error);
    color: var(--error);
}

.active-filters {
    display: flex;
    gap: 0.4rem;
    flex-wrap: wrap;
    margin-top: 0.75rem;
}

.active-filters:empty {
    display: none;
}

.filter-tag {
    background: rgba(40, 181, 38, 0.15);
    border: 1px solid rgba(40, 181, 38, 0.3);
    color: var(--primary-green);
    padding: 0.3rem 0.75rem;
    border-radius: 20px;
    font-size: 0.78rem;
    font-weight: 500;
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    transition: all 0.2s ease;
}

.filter-tag:hover {
    background: rgba(40, 181, 38, 0.25);
}

.filter-tag-remove {
    background: none;
    border: none;
    color: var(--primary-green);
    cursor: pointer;
    padding: 0;
    border-radius: 50%;
    width: 16px;
    height: 16px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 0.65rem;
    transition: all 0.2s ease;
}

.filter-tag-remove:hover {
    background: rgba(255, 255, 255, 0.1);
}

/* ===== RESULTS INFO BAR ===== */
.results-info {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.75rem 1.25rem;
    margin-bottom: 1.5rem;
    border-radius: 10px;
    background: var(--bg-secondary);
    border: 1px solid var(--border);
    font-size: 0.875rem;
    color: var(--text-muted);
}

.results-info .result-count {
    font-weight: 600;
    color: var(--primary-green);
}

.results-info .view-toggle {
    display: flex;
    gap: 0.25rem;
}

.results-info .view-toggle button {
    background: transparent;
    border: 1px solid var(--border);
    color: var(--text-muted);
    width: 32px;
    height: 32px;
    border-radius: 6px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
    font-size: 0.8rem;
}

.results-info .view-toggle button.active,
.results-info .view-toggle button:hover {
    background: rgba(40, 181, 38, 0.15);
    border-color: var(--primary-green);
    color: var(--primary-green);
}

/* ===== PRODUCTS GRID ===== */
.products-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1.5rem;
    margin-bottom: 3rem;
}

.products-grid.list-view {
    grid-template-columns: 1fr;
    gap: 1rem;
}

.products-grid.list-view .product-card {
    display: grid;
    grid-template-columns: 220px 1fr;
}

.products-grid.list-view .product-image {
    height: 100%;
    min-height: 160px;
    border-radius: 14px 0 0 14px;
}

.products-grid.list-view .product-content {
    display: flex;
    flex-direction: column;
    justify-content: center;
}

/* ===== PRODUCT CARD ===== */
/* PRODUCT CARD — overlay tile style */
.product-card {
    position: relative;
    border-radius: 12px;
    overflow: hidden;
    aspect-ratio: 16/10;
    background: var(--card-bg);
    border: 1px solid var(--border);
    cursor: pointer;
    opacity: 0;
    transform: scale(0.96);
    transition: opacity 0.35s ease, transform 0.35s ease, box-shadow 0.3s ease, border-color 0.3s ease;
}
.product-card.visible { opacity: 1; transform: scale(1); }
.product-card:hover { border-color: rgba(40,181,38,.45); box-shadow: 0 12px 40px rgba(0,0,0,.6), 0 0 0 1px rgba(40,181,38,.2); }

.card-img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: contain;
    object-position: center;
    transition: transform 0.5s ease;
}
.product-card:hover .card-img { transform: scale(1.04); }

.card-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(to bottom, rgba(0,0,0,0) 0%, rgba(0,0,0,.1) 40%, rgba(0,0,0,.75) 72%, rgba(0,0,0,.95) 100%);
    transition: background 0.3s;
}
.product-card:hover .card-overlay {
    background: linear-gradient(to bottom, rgba(0,0,0,0) 0%, rgba(0,0,0,.15) 35%, rgba(0,0,0,.82) 68%, rgba(0,0,0,.97) 100%);
}

.card-badge { position: absolute; top: .65rem; right: .65rem; font-size: .65rem; font-weight: 700; text-transform: uppercase; letter-spacing: .05em; padding: .2rem .55rem; border-radius: 6px; backdrop-filter: blur(6px); z-index: 3; }
.card-badge.free { background: rgba(40,181,38,.25); border: 1px solid rgba(40,181,38,.5); color: var(--primary-green); }
.card-badge.plan { background: rgba(168,85,247,.2); border: 1px solid rgba(168,85,247,.45); color: #c084fc; }
.card-category { position: absolute; top: .65rem; left: .65rem; font-size: .6rem; font-weight: 600; text-transform: uppercase; letter-spacing: .06em; padding: .18rem .5rem; border-radius: 5px; background: rgba(0,0,0,.55); border: 1px solid rgba(255,255,255,.08); color: rgba(255,255,255,.55); backdrop-filter: blur(4px); z-index: 3; }

.card-body { position: absolute; bottom: 0; left: 0; right: 0; padding: .9rem 1rem; z-index: 4; }
.card-title { font-size: .9rem; font-weight: 700; color: #fff; line-height: 1.3; margin-bottom: .4rem; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.card-desc { font-size: .72rem; color: rgba(255,255,255,.55); line-height: 1.45; margin-bottom: .65rem; max-height: 3rem; overflow: hidden; opacity: 1; }
.card-price-row { display: flex; align-items: center; justify-content: space-between; gap: .5rem; }
.card-price { font-size: 1.1rem; font-weight: 800; color: #fff; line-height: 1; }
.card-price.free-price { color: var(--primary-green); font-size: 1rem; }

.card-actions { display: flex; gap: .4rem; margin-top: .65rem; max-height: 3rem; overflow: hidden; opacity: 1; }
.card-btn-view { flex: 1; display: flex; align-items: center; justify-content: center; gap: .3rem; padding: .45rem .6rem; background: rgba(255,255,255,.1); border: 1px solid rgba(255,255,255,.15); border-radius: 8px; color: rgba(255,255,255,.85); font-size: .76rem; font-weight: 600; transition: all .2s; text-decoration: none; }
.card-btn-view:hover { background: rgba(255,255,255,.18); color: #fff; }
.card-btn-cart { flex: 1.4; display: flex; align-items: center; justify-content: center; gap: .3rem; padding: .45rem .6rem; background: var(--primary-green); border: none; border-radius: 8px; color: #000; font-size: .76rem; font-weight: 700; transition: background .2s, transform .15s; text-decoration: none; }
.card-btn-cart:hover { background: var(--light-green); color: #000; transform: translateY(-1px); }

.card-placeholder { position: absolute; inset: 0; background: linear-gradient(135deg, var(--bg-secondary) 0%, var(--bg-tertiary) 100%); display: flex; align-items: center; justify-content: center; }
.card-placeholder i { font-size: 3rem; color: var(--text-muted); opacity: .3; }

/* ===== EMPTY STATE ===== */
.empty-state {
    text-align: center;
    padding: 5rem 2rem;
    color: var(--text-muted);
}

.empty-state-icon {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    background: rgba(40, 181, 38, 0.08);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 1.5rem;
}

.empty-state-icon i {
    font-size: 2rem;
    color: var(--primary-green);
    opacity: 0.7;
}

.empty-state h5 {
    color: var(--text-secondary);
    margin-bottom: 0.75rem;
    font-weight: 700;
    font-size: 1.15rem;
}

.empty-state p {
    font-size: 0.9rem;
    margin-bottom: 1.5rem;
    max-width: 400px;
    margin-left: auto;
    margin-right: auto;
}

.btn-primary {
    background: var(--primary-green);
    color: white;
    border: none;
    border-radius: 8px;
    padding: 0.75rem 1.5rem;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    box-shadow: 0 4px 15px rgba(40, 181, 38, 0.25);
}

.btn-primary:hover {
    background: var(--dark-green);
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 6px 25px rgba(40, 181, 38, 0.35);
}

/* ===== SCROLL TO TOP ===== */
.scroll-top {
    position: fixed;
    right: 1.5rem;
    bottom: 1.5rem;
    width: 44px;
    height: 44px;
    border-radius: 12px;
    border: 1px solid var(--border);
    background: var(--card-bg);
    backdrop-filter: blur(10px);
    color: var(--text-muted);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    opacity: 0;
    visibility: hidden;
    transform: translateY(10px);
    transition: all 0.3s ease;
    z-index: 1200;
    font-size: 0.9rem;
}

.scroll-top:hover {
    background: var(--primary-green);
    color: white;
    border-color: var(--primary-green);
}

.scroll-top.show {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

/* ===== FOOTER ===== */
.page-footer {
    text-align: center;
    padding: 2.5rem 0;
    margin-top: 2rem;
    border-top: 1px solid var(--border);
    color: var(--text-muted);
    font-size: 0.8rem;
}

.page-footer a {
    color: var(--primary-green);
    text-decoration: none;
    transition: color 0.2s ease;
}

.page-footer a:hover {
    color: var(--light-green);
}

/* ===== RESPONSIVE ===== */
@media (max-width: 1400px) {
    .products-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 1100px) {
    .products-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 992px) {
    .catalog-layout {
        grid-template-columns: 1fr;
    }

    .filters-sidebar {
        position: static;
        order: -1;
    }

    .filter-groups-row {
        display: grid;
        grid-template-columns: 1fr 1fr;
        gap: 0.75rem;
    }

    .filter-group {
        margin-bottom: 0;
    }

    .filter-group.search-group {
        grid-column: 1 / -1;
    }
}

@media (max-width: 768px) {
    .page-hero {
        padding: 7rem 0 2.5rem;
    }

    .page-hero {
        padding: 4.5rem 0 2rem;
        margin: 80px 1rem 0;
    }

    .page-title {
        font-size: 1.8rem;
    }

    .page-subtitle {
        font-size: 1rem;
    }

    .page-stats {
        gap: 1.5rem;
    }

    .page-stat-number {
        font-size: 1.4rem;
    }

    .filter-groups-row {
        grid-template-columns: 1fr;
    }

    .products-grid {
        grid-template-columns: 1fr;
        gap: 1.25rem;
    }

    .products-grid.list-view .product-card {
        grid-template-columns: 1fr;
    }

    .products-grid.list-view .product-image {
        height: 200px;
        border-radius: 14px 14px 0 0;
    }

    .product-footer {
        flex-direction: column;
        align-items: stretch;
        gap: 0.75rem;
    }

    .product-actions {
        justify-content: stretch;
    }

    .product-actions a {
        flex: 1;
        justify-content: center;
    }

    .results-info {
        flex-direction: column;
        gap: 0.5rem;
        text-align: center;
    }
}

@media (max-width: 480px) {
    .page-stats {
        flex-direction: column;
        gap: 0.75rem;
    }

    .page-hero-badge {
        font-size: 0.7rem;
    }
}

/* ===== CARRITO ===== */

/* Botón flotante */
.cart-float-btn {
    position: fixed;
    bottom: 1.75rem;
    left: 1.75rem;
    width: 52px;
    height: 52px;
    background: #32d92e;
    border: none;
    border-radius: 50%;
    color: #000;
    font-size: 1.15rem;
    cursor: pointer;
    z-index: 1050;
    box-shadow: 0 4px 16px rgba(50,217,46,0.4);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s, transform 0.2s;
}
.cart-float-btn:hover { background: #28b526; transform: scale(1.07); }

.cart-float-badge {
    position: absolute;
    top: -4px;
    right: -4px;
    background: #ef4444;
    color: #fff;
    border-radius: 50%;
    width: 20px;
    height: 20px;
    font-size: 0.7rem;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 2px solid #0f0f0f;
    opacity: 0;
    transform: scale(0);
    transition: all 0.2s;
}
.cart-float-badge.visible { opacity: 1; transform: scale(1); }

/* Botón en cards */
.card-btn-addcart {
    flex: 1.4;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.3rem;
    padding: 0.45rem 0.6rem;
    background: var(--primary-green);
    border: none;
    border-radius: 8px;
    color: #000;
    font-size: 0.76rem;
    font-weight: 700;
    cursor: pointer;
    transition: background .2s, transform .15s;
    text-decoration: none;
}
.card-btn-addcart:hover { background: var(--light-green); color: #000; transform: translateY(-1px); }
.card-btn-addcart.in-cart { background: rgba(50,217,46,0.22); border: 1px solid #32d92e; color: #32d92e; }
