/* ── PAGE HERO ────────────────────────────────────── */
.page-hero {
    background: var(--blanco-color);
    border-bottom: 1px solid #E5E7EB;
    padding: 20px 0;
}

.page-hero-inner {
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 32px;
}

.breadcrumb {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
    color: #6B7280;
    margin-bottom: 6px;
}

.breadcrumb a {
    color: #6B7280;
    text-decoration: none;
    transition: color 180ms;
}

.breadcrumb a:hover { color: var(--secondary-color); }

.breadcrumb span { color: #9CA3AF; }

.page-hero-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    flex-wrap: wrap;
}

.page-hero-title {
    font-family: 'Rubik', sans-serif;
    font-size: 26px;
    font-weight: 700;
    color: #111827;
}

.btn-catalogo {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: var(--primary-color);
    color: #fff;
    font-size: 13px;
    font-weight: 600;
    padding: 10px 20px;
    border-radius: 6px;
    text-decoration: none;
    white-space: nowrap;
    transition: background 200ms;
}
.btn-catalogo:hover { background: var(--secondary-color); }

/* ── LAYOUT ───────────────────────────────────────── */
.productos-layout {
    max-width: 1280px;
    margin: 0 auto;
    padding: 32px 32px 64px;
    display: grid;
    grid-template-columns: 240px 1fr;
    gap: 32px;
    align-items: flex-start;
}

/* ── SIDEBAR ──────────────────────────────────────── */
.productos-sidebar {
    position: sticky;
    top: 20px;
}

.sidebar-widget {
    background: #fff;
    border: 1px solid #E5E7EB;
    border-radius: 12px;
    padding: 20px;
}

.sidebar-widget-title {
    font-family: 'Rubik', sans-serif;
    font-size: 14px;
    font-weight: 700;
    color: #111827;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 14px;
    padding-bottom: 10px;
    border-bottom: 1px solid #F3F4F6;
}

/* Category tree */
.cat-tree {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.cat-tree-all {
    display: block;
    padding: 8px 10px;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    color: #374151;
    text-decoration: none;
    transition: background 150ms, color 150ms;
}

.cat-tree-all:hover,
.cat-tree-all.active {
    background: #F3F0FF;
    color: var(--secondary-color);
}

.cat-tree-group { display: flex; flex-direction: column; }

.cat-tree-parent {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    padding: 8px 10px;
    border-radius: 8px;
    background: none;
    border: none;
    font-family: 'Nunito Sans', sans-serif;
    font-size: 14px;
    font-weight: 600;
    color: #374151;
    cursor: pointer;
    text-align: left;
    transition: background 150ms, color 150ms;
}

.cat-tree-parent:hover {
    background: #F9FAFB;
    color: #111827;
}

.cat-tree-parent.active {
    color: var(--secondary-color);
}

.cat-tree-parent svg {
    flex-shrink: 0;
    transition: transform 200ms;
    color: #9CA3AF;
}

.cat-tree-parent.open svg { transform: rotate(180deg); }

.cat-tree-children {
    list-style: none;
    display: none;
    flex-direction: column;
    gap: 1px;
    padding-left: 10px;
    margin-bottom: 4px;
}

.cat-tree-children.open { display: flex; }

.cat-tree-children a {
    display: block;
    padding: 6px 10px;
    border-radius: 6px;
    font-size: 13px;
    color: #6B7280;
    text-decoration: none;
    transition: background 150ms, color 150ms;
}

.cat-tree-children a:hover { background: #F9FAFB; color: #374151; }
.cat-tree-children a.active { color: var(--secondary-color); font-weight: 700; background: #F3F0FF; }

/* ── GRID AREA ────────────────────────────────────── */
.grid-topbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 20px;
    gap: 12px;
}

.grid-count {
    font-size: 14px;
    color: #6B7280;
    font-weight: 500;
}

.grid-sort {
    padding: 8px 14px;
    border: 1px solid #E5E7EB;
    border-radius: 8px;
    font-family: 'Nunito Sans', sans-serif;
    font-size: 13px;
    background: #fff;
    color: #374151;
    outline: none;
    cursor: pointer;
    transition: border 180ms;
}

.grid-sort:focus { border-color: var(--secondary-color); }

/* ── PRODUCT GRID ─────────────────────────────────── */
.productos-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
}

/* ── PRODUCT CARD ─────────────────────────────────── */
.prod-card {
    background: #fff;
    border: 1px solid #E5E7EB;
    border-radius: 14px;
    overflow: hidden;
    transition: box-shadow 220ms, transform 220ms;
    cursor: pointer;
}

.prod-card:hover {
    box-shadow: 0 8px 28px rgba(0,0,0,0.1);
    transform: translateY(-2px);
}

.prod-card-img-wrap {
    display: block;
    aspect-ratio: 1 / 1;
    overflow: hidden;
    background: #F9FAFB;
}

.prod-card-img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    transition: transform 300ms;
    mix-blend-mode: multiply;
    padding: 12px;
}

.prod-card:hover .prod-card-img { transform: scale(1.04); }

.prod-card-img-placeholder {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #F3F4F6;
    color: #D1D5DB;
    font-size: 48px;
}

.prod-card-body {
    padding: 14px 16px 16px;
}

.prod-cat-badge {
    display: inline-block;
    font-size: 11px;
    font-weight: 700;
    color: var(--secondary-color);
    background: #F3F0FF;
    border-radius: 20px;
    padding: 2px 10px;
    margin-bottom: 6px;
    text-transform: uppercase;
    letter-spacing: 0.3px;
}

.prod-card-name {
    font-family: 'Rubik', sans-serif;
    font-size: 15px;
    font-weight: 600;
    color: #111827;
    margin-bottom: 4px;
    line-height: 1.3;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.prod-card-price {
    font-size: 16px;
    font-weight: 700;
    color: #111827;
    margin-bottom: 10px;
    font-variant-numeric: tabular-nums;
}

/* Color dots (solo indicador en la card) */
.prod-card-dots {
    display: flex;
    align-items: center;
    gap: 5px;
    flex-wrap: wrap;
}

.prod-card-dot {
    display: inline-block;
    width: 14px;
    height: 14px;
    border-radius: 50%;
    border: 1.5px solid rgba(0,0,0,0.1);
    flex-shrink: 0;
}

.prod-card-dot-more {
    font-size: 11px;
    font-weight: 700;
    color: #6B7280;
}

/* ── SKELETON ─────────────────────────────────────── */
@keyframes shimmer {
    0%   { background-position: -800px 0; }
    100% { background-position: 800px 0; }
}

.prod-skeleton-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
}

.prod-skeleton-card {
    border-radius: 14px;
    aspect-ratio: 3 / 4;
    background: linear-gradient(90deg, #f0f0f0 25%, #e8e8e8 50%, #f0f0f0 75%);
    background-size: 800px 100%;
    animation: shimmer 1.4s infinite linear;
}

/* ── EMPTY STATE ──────────────────────────────────── */
.prod-empty {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 80px 24px;
    text-align: center;
    color: #9CA3AF;
    gap: 12px;
}

.prod-empty-title {
    font-family: 'Rubik', sans-serif;
    font-size: 18px;
    font-weight: 700;
    color: #374151;
}

.prod-empty-sub {
    font-size: 14px;
    color: #6B7280;
    max-width: 300px;
}

.prod-empty-btn {
    display: inline-block;
    margin-top: 8px;
    padding: 10px 22px;
    background: var(--secondary-color);
    color: #fff;
    border-radius: 8px;
    text-decoration: none;
    font-size: 14px;
    font-weight: 700;
    transition: background 180ms;
}

.prod-empty-btn:hover { background: var(--primary-color); }

/* ── MODAL DETALLE ────────────────────────────────── */
.detalle-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.5);
    z-index: 900;
    align-items: center;
    justify-content: center;
    padding: 20px;
    backdrop-filter: blur(3px);
}

.detalle-overlay.open { display: flex; }

.detalle-modal {
    background: #fff;
    border-radius: 20px;
    width: 100%;
    max-width: 860px;
    max-height: 90vh;
    overflow-y: auto;
    display: grid;
    grid-template-columns: 1fr 1fr;
    position: relative;
    box-shadow: 0 32px 80px rgba(0,0,0,0.2);
    animation: detalleIn 220ms ease-out;
}

@keyframes detalleIn {
    from { opacity: 0; transform: scale(0.96) translateY(16px); }
    to   { opacity: 1; transform: scale(1) translateY(0); }
}

.detalle-close {
    position: absolute;
    top: 16px;
    right: 16px;
    background: #F3F4F6;
    border: none;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    color: #374151;
    z-index: 10;
    transition: background 180ms;
}

.detalle-close:hover { background: #E5E7EB; }

.detalle-img-wrap {
    background: #F9FAFB;
    border-radius: 20px 0 0 20px;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 400px;
}

.detalle-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: opacity 250ms ease;
}

.detalle-img.fade { opacity: 0; }

.detalle-img-placeholder {
    font-size: 72px;
    color: #D1D5DB;
}

.detalle-info {
    padding: 36px 32px;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.detalle-cat {
    font-size: 12px;
    font-weight: 700;
    color: var(--secondary-color);
    background: #F3F0FF;
    border-radius: 20px;
    padding: 3px 12px;
    display: inline-block;
    align-self: flex-start;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.detalle-nombre {
    font-family: 'Rubik', sans-serif;
    font-size: 22px;
    font-weight: 700;
    color: #111827;
    line-height: 1.3;
}

.detalle-precio {
    font-size: 24px;
    font-weight: 700;
    color: #111827;
    font-variant-numeric: tabular-nums;
}

.detalle-desc {
    font-size: 14px;
    color: #6B7280;
    line-height: 1.7;
    flex: 1;
}

.detalle-colores-label {
    font-size: 13px;
    font-weight: 600;
    color: #374151;
    margin-bottom: 10px;
}

.detalle-colores {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.detalle-swatch {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    border: 2.5px solid transparent;
    outline: 2.5px solid transparent;
    cursor: pointer;
    transition: transform 150ms, outline 150ms;
    padding: 0;
    flex-shrink: 0;
}

.detalle-swatch:hover { transform: scale(1.15); }

.detalle-swatch.active {
    outline: 2.5px solid var(--secondary-color);
    outline-offset: 3px;
}

.detalle-cta {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    background: #25D366;
    color: #fff;
    border-radius: 10px;
    padding: 14px 20px;
    font-size: 15px;
    font-weight: 700;
    text-decoration: none;
    margin-top: 8px;
    transition: background 180ms, transform 100ms;
}

.detalle-cta:hover { background: #1ebe5d; }
.detalle-cta:active { transform: scale(0.98); }

/* ── PAGINACIÓN ───────────────────────────────────── */
.paginacion {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    margin-top: 40px;
    flex-wrap: wrap;
}

.pag-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 38px;
    height: 38px;
    padding: 0 6px;
    border-radius: 8px;
    border: 1px solid #E5E7EB;
    background: #fff;
    font-family: 'Nunito Sans', sans-serif;
    font-size: 14px;
    font-weight: 600;
    color: #374151;
    cursor: pointer;
    transition: background 150ms, border-color 150ms, color 150ms;
}

.pag-btn:hover:not(.disabled):not(.active) {
    background: #F3F0FF;
    border-color: var(--secondary-color);
    color: var(--secondary-color);
}

.pag-btn.active {
    background: var(--secondary-color);
    border-color: var(--secondary-color);
    color: #fff;
    cursor: default;
}

.pag-btn.disabled {
    opacity: 0.35;
    cursor: not-allowed;
}

.pag-ellipsis {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 38px;
    font-size: 15px;
    color: #9CA3AF;
    user-select: none;
}

/* ── RESPONSIVE ───────────────────────────────────── */
@media (max-width: 1024px) {
    .productos-grid { grid-template-columns: repeat(2, 1fr); }
    .prod-skeleton-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 768px) {
    .productos-layout {
        grid-template-columns: 1fr;
        padding: 20px 16px 48px;
    }
    .productos-sidebar { position: static; }

    /* Sidebar colapsable en mobile */
    .sidebar-widget-title {
        cursor: pointer;
        user-select: none;
        display: flex;
        align-items: center;
        justify-content: space-between;
    }
    .sidebar-widget-title::after {
        content: '';
        display: inline-block;
        width: 10px;
        height: 10px;
        border-right: 2px solid currentColor;
        border-bottom: 2px solid currentColor;
        transform: rotate(45deg);
        transition: transform 250ms;
        margin-top: -4px;
    }
    .sidebar-widget-title.open::after { transform: rotate(-135deg); margin-top: 4px; }
    .cat-tree { display: none; }
    .cat-tree.open { display: flex; }
    .productos-grid { grid-template-columns: repeat(2, 1fr); gap: 12px; }
    .prod-skeleton-grid { grid-template-columns: repeat(2, 1fr); gap: 12px; }

    .detalle-modal {
        grid-template-columns: 1fr;
        max-height: 95vh;
        border-radius: 16px;
    }
    .detalle-img-wrap {
        border-radius: 16px 16px 0 0;
        min-height: 260px;
        max-height: 300px;
    }
    .detalle-info { padding: 20px; }
}

/* ── OCULTAR PRECIO (reactivar quitando este bloque) ── */
.prod-card-price { display: none !important; }
