/* ═══════════════════════════════════════
   ESTILOS PARA PÁGINAS DE CATEGORÍA
   Con Cortantes Jugamos
═══════════════════════════════════════ */

@import url('../styles.css');

/* ═══════════════════════════════════════
   BREADCRUMB
═══════════════════════════════════════ */
.breadcrumb-container {
    background: var(--white);
    padding: 1rem 0;
    border-bottom: 1px solid var(--border);
}

.breadcrumb {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 1rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.9rem;
    flex-wrap: wrap;
}

.breadcrumb a {
    color: var(--hot-pink);
    text-decoration: none;
    transition: color 0.2s;
}

.breadcrumb a:hover {
    color: var(--magenta);
    text-decoration: underline;
}

.breadcrumb-separator {
    color: var(--text-muted);
}

.breadcrumb-current {
    color: var(--text);
    font-weight: 600;
}

/* ═══════════════════════════════════════
   CATEGORY HEADER
═══════════════════════════════════════ */
.category-header {
    background: linear-gradient(135deg, var(--hot-pink) 0%, var(--coral) 100%);
    padding: 2.5rem 1rem;
    text-align: center;
    color: var(--white);
}

.category-header h1 {
    font-family: 'Lilita One', cursive;
    font-size: 2.5rem;
    margin-bottom: 0.5rem;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.2);
}

.category-header .category-icon {
    font-size: 3rem;
    margin-bottom: 0.5rem;
    display: block;
}

.category-header p {
    font-size: 1.1rem;
    opacity: 0.95;
    max-width: 600px;
    margin: 0 auto;
}

/* ═══════════════════════════════════════
   SUBCATEGORY GRID
═══════════════════════════════════════ */
.subcategory-section {
    padding: 2rem 1rem;
    background: var(--bg);
}

.subcategory-grid {
    max-width: 1400px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 1.5rem;
}

.subcategory-card {
    background: var(--card-bg);
    border-radius: var(--radius);
    padding: 1.5rem;
    box-shadow: var(--shadow-md);
    cursor: pointer;
    transition: transform 0.2s, box-shadow 0.2s;
    border: 2px solid transparent;
    text-decoration: none;
    color: var(--text);
    display: block;
}

.subcategory-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
    border-color: var(--hot-pink);
}

.subcategory-card.active {
    border-color: var(--hot-pink);
    background: linear-gradient(135deg, #FFF0F7 0%, #FFE8F0 100%);
}

.subcategory-card-icon {
    font-size: 2.5rem;
    display: block;
    margin-bottom: 0.75rem;
    text-align: center;
}

.subcategory-card-title {
    font-family: 'Lilita One', cursive;
    font-size: 1.3rem;
    text-align: center;
    color: var(--deep);
    margin-bottom: 0.5rem;
}

.subcategory-card-count {
    text-align: center;
    color: var(--text-muted);
    font-size: 0.9rem;
}

/* ═══════════════════════════════════════
   THEME FILTERS (TAG PILLS)
═══════════════════════════════════════ */
.theme-filters-section {
    padding: 1.5rem 1rem;
    background: var(--white);
    border-bottom: 1px solid var(--border);
}

.theme-filters-container {
    max-width: 1400px;
    margin: 0 auto;
}

.theme-filters-title {
    font-size: 0.95rem;
    color: var(--text-muted);
    margin-bottom: 0.75rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.theme-filters {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.theme-pill {
    background: var(--bg);
    border: 2px solid var(--border);
    border-radius: var(--radius-pill);
    padding: 0.5rem 1rem;
    font-size: 0.9rem;
    cursor: pointer;
    transition: all 0.2s;
    color: var(--text);
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
}

.theme-pill:hover {
    border-color: var(--hot-pink);
    background: #FFF0F7;
    transform: translateY(-2px);
}

.theme-pill.active {
    background: var(--hot-pink);
    border-color: var(--hot-pink);
    color: var(--white);
}

.theme-pill .pill-icon {
    font-size: 1rem;
}

/* ═══════════════════════════════════════
   PRODUCTS GRID
═══════════════════════════════════════ */
.category-products-section {
    padding: 2rem 1rem 4rem;
    background: var(--bg);
}

.category-products-grid {
    max-width: 1400px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 1.5rem;
}

/* Reutilizar estilos de productos del index */
.product-card {
    background: var(--card-bg);
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: var(--shadow-md);
    transition: transform 0.2s, box-shadow 0.2s;
    position: relative;
}

.product-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
}

.product-card-image {
    width: 100%;
    height: 260px;
    object-fit: cover;
    background: #f8f8f8;
}

.product-card-body {
    padding: 1rem;
}

.product-card-title {
    font-family: 'Lilita One', cursive;
    font-size: 1.1rem;
    color: var(--deep);
    margin-bottom: 0.5rem;
    line-height: 1.3;
}

.product-card-price {
    font-size: 1.4rem;
    font-weight: 800;
    color: var(--hot-pink);
    margin-bottom: 0.75rem;
}

.product-card-price .old-price {
    font-size: 1rem;
    color: var(--text-muted);
    text-decoration: line-through;
    font-weight: 400;
    margin-left: 0.5rem;
}

.product-card-actions {
    display: flex;
    gap: 0.5rem;
}

.btn-add-cart {
    flex: 1;
    background: var(--hot-pink);
    color: var(--white);
    border: none;
    border-radius: var(--radius-sm);
    padding: 0.75rem 1rem;
    font-weight: 700;
    cursor: pointer;
    transition: background 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}

.btn-add-cart:hover {
    background: var(--magenta);
}

.btn-view-detail {
    background: var(--white);
    color: var(--hot-pink);
    border: 2px solid var(--hot-pink);
    border-radius: var(--radius-sm);
    padding: 0.75rem 1rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.2s;
}

.btn-view-detail:hover {
    background: var(--hot-pink);
    color: var(--white);
}

/* ═══════════════════════════════════════
   BADGES
═══════════════════════════════════════ */
.product-badge {
    position: absolute;
    top: 0.75rem;
    left: 0.75rem;
    background: var(--set-badge);
    color: var(--white);
    padding: 0.35rem 0.75rem;
    border-radius: var(--radius-pill);
    font-size: 0.8rem;
    font-weight: 700;
    z-index: 1;
}

.product-badge.discount {
    background: var(--set-discount);
}

.product-badge.low-stock {
    background: var(--coral);
}

/* ═══════════════════════════════════════
   LOADING STATE
═══════════════════════════════════════ */
.loading-container {
    text-align: center;
    padding: 4rem 1rem;
}

.loading-spinner {
    width: 50px;
    height: 50px;
    border: 4px solid var(--border);
    border-top-color: var(--hot-pink);
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 0 auto 1rem;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

.loading-text {
    color: var(--text-muted);
    font-size: 1.1rem;
}

/* ═══════════════════════════════════════
   EMPTY STATE
═══════════════════════════════════════ */
.empty-state {
    text-align: center;
    padding: 4rem 1rem;
    background: var(--white);
    border-radius: var(--radius);
    box-shadow: var(--shadow-md);
}

.empty-state-icon {
    font-size: 4rem;
    margin-bottom: 1rem;
    opacity: 0.5;
}

.empty-state-title {
    font-family: 'Lilita One', cursive;
    font-size: 1.5rem;
    color: var(--deep);
    margin-bottom: 0.5rem;
}

.empty-state-text {
    color: var(--text-muted);
    margin-bottom: 1.5rem;
}

.btn-back {
    display: inline-block;
    background: var(--hot-pink);
    color: var(--white);
    padding: 0.75rem 1.5rem;
    border-radius: var(--radius-pill);
    text-decoration: none;
    font-weight: 700;
    transition: background 0.2s;
}

.btn-back:hover {
    background: var(--magenta);
}

/* ═══════════════════════════════════════
   RESPONSIVE
═══════════════════════════════════════ */
@media (max-width: 768px) {
    .category-header h1 {
        font-size: 1.8rem;
    }

    .category-header .category-icon {
        font-size: 2rem;
    }

    .subcategory-grid {
        grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
        gap: 1rem;
    }

    .subcategory-card {
        padding: 1rem;
    }

    .subcategory-card-icon {
        font-size: 2rem;
    }

    .subcategory-card-title {
        font-size: 1rem;
    }

    .category-products-grid {
        grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
        gap: 1rem;
    }

    .product-card-image {
        height: 180px;
    }

    .breadcrumb {
        font-size: 0.8rem;
    }
}

/* ═══════════════════════════════════════
   SORT CONTROLS
═══════════════════════════════════════ */
.sort-controls {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
    flex-wrap: wrap;
    gap: 1rem;
}

.sort-controls-label {
    font-weight: 600;
    color: var(--text);
}

.sort-select {
    padding: 0.5rem 1rem;
    border: 2px solid var(--border);
    border-radius: var(--radius-sm);
    font-family: inherit;
    font-size: 0.95rem;
    cursor: pointer;
    background: var(--white);
    color: var(--text);
}

.sort-select:focus {
    outline: none;
    border-color: var(--hot-pink);
}

.products-count {
    color: var(--text-muted);
    font-size: 0.9rem;
}
