/* ========================================
   CategoryShowcase + SubCategoryCarousel
   AGENT_GUIDE: colores y estructura exacta
   ======================================== */

/* Variables (alineadas con AGENT_GUIDE) */
.category-showcase {
    --cs-card-w: 280px;
    --cs-gap: 16px;
    --cs-step: 296px; /* CARD_W + GAP */
    --cs-gold: #C9A84C;
    --cs-gold-light: #F0C040;
    --cs-border: #e5e5e5;
    --cs-bg-nav: #ffffff;
    --cs-bg-fade: #ffffff;
}

/* Nav sticky */
.category-showcase-nav {
    position: sticky;
    top: 72px;
    z-index: 40;
    background-color: var(--cs-bg-nav);
    border-bottom: 1px solid #e5e5e5;
    border-top: 1px solid #e5e5e5;
}

.category-showcase-nav-inner {
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 16px;
    display: flex;
    align-items: center;
    overflow-x: auto;
    scrollbar-width: none;
}

.category-showcase-nav-inner::-webkit-scrollbar {
    display: none;
}

.category-showcase-tab {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 16px 24px;
    font-size: 0.7rem;
    text-transform: uppercase;
    white-space: nowrap;
    flex-shrink: 0;
    background: transparent;
    border: none;
    border-bottom: 2px solid transparent;
    transition: all 0.3s ease;
}

.category-showcase-tab.active {
    border-bottom-color: var(--cs-gold);
    color: var(--cs-gold);
}

.category-showcase-tab .category-tab-number {
    transition: color 0.3s;
}

.category-showcase-tab.active .category-tab-number {
    color: rgba(201, 168, 76, 0.7);
}

/* Sección */
.category-section {
    padding: 64px 0;
}

.category-section-inner {
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 16px;
}

.category-section-header {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    margin-bottom: 32px;
    flex-wrap: wrap;
    gap: 16px;
}

.category-eyebrow {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 8px;
}

.category-eyebrow-text {
    letter-spacing: 0.25em;
}

.category-header-right {
    display: flex;
    align-items: center;
    gap: 12px;
}

.category-ver-todo:hover {
    background: var(--cs-gold) !important;
    color: #0a0a0a !important;
    border-color: var(--cs-gold) !important;
}

/* ─── SubCategoryCarousel ─── */
.subcategory-carousel {
    position: relative;
    user-select: none;
}

.subcategory-carousel .carousel-track {
    display: flex;
    gap: var(--cs-gap);
    overflow-x: auto;
    scrollbar-width: none;
    -ms-overflow-style: none;
    padding-bottom: 8px;
    cursor: grab;
    -webkit-overflow-scrolling: touch;
}

.subcategory-carousel .carousel-track::-webkit-scrollbar {
    display: none;
}

.subcategory-carousel .carousel-track.is-dragging {
    cursor: grabbing;
}

.subcategory-carousel .carousel-track.is-dragging a {
    pointer-events: none;
}

/* Fade en bordes */
.carousel-fade {
    position: absolute;
    top: 0;
    bottom: 28px;
    width: 80px;
    z-index: 10;
    pointer-events: none;
    transition: opacity 0.3s ease;
}

.carousel-fade-left {
    left: 0;
    background: linear-gradient(to right, #ffffff 10%, transparent);
}

.carousel-fade-right {
    right: 0;
    background: linear-gradient(to left, #ffffff 10%, transparent);
}

/* Flechas */
.carousel-arrow {
    position: absolute;
    top: 45%;
    transform: translateY(-50%) scale(0.7);
    z-index: 20;
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: rgba(8, 8, 8, 0.9);
    border: 1.5px solid rgba(201, 168, 76, 0.75);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-shadow: 0 6px 30px rgba(0, 0, 0, 0.7);
    transition: opacity 0.25s ease, transform 0.25s ease, background-color 0.2s ease;
    opacity: 0;
    pointer-events: none;
}

.subcategory-carousel:hover .carousel-arrow.visible {
    opacity: 1;
    transform: translateY(-50%) scale(1);
    pointer-events: auto;
}

.carousel-arrow:hover {
    background-color: rgba(201, 168, 76, 0.18);
}

.carousel-arrow-prev {
    left: 10px;
}

.carousel-arrow-next {
    right: 10px;
}

/* Subcategory card */
.subcategory-card {
    display: block;
}

.subcategory-card:hover .subcategory-card-img {
    transform: scale(1.1);
}

.subcategory-card:hover .subcategory-card-border-hover {
    opacity: 1;
}

.subcategory-card:hover .subcategory-card-shimmer {
    opacity: 1;
}

.subcategory-card:hover .subcategory-card-arrow {
    transform: scale(1.1);
}

/* Dots */
.carousel-dots {
    display: flex;
    justify-content: center;
    gap: 6px;
    margin-top: 12px;
}

.carousel-dot {
    width: 6px;
    height: 3px;
    border-radius: 2px;
    background-color: rgba(0, 0, 0, 0.2);
    border: none;
    padding: 0;
    cursor: pointer;
    transition: width 0.35s ease, background-color 0.35s ease;
}

.carousel-dot.active {
    width: 22px;
    background-color: var(--cs-gold);
}

@media (max-width: 768px) {
    .category-showcase-nav {
        top: 60px;
    }
    
    .category-section-header {
        flex-direction: column;
        align-items: flex-start;
    }
}
