/* Extracted from views/partials/slider.php */
/* ========================= */
/* كسر عرض الحاوية */
/* ========================= */

.fullbleed-wrap {
    width: 100vw;
    position: relative;
    left: 50%;
    right: 50%;
    margin-left: -50vw;
    margin-right: -50vw;
    overflow-x: hidden;
}

/* ========================= */
/* HERO SLIDER */
/* ========================= */

.hero-slider {
    position: relative;
    width: 100%;
    margin: 0;
    aspect-ratio: 21 / 7;
    overflow: hidden;
    background: #0b0b10;
    isolation: isolate;
}

.hero-slider__track {
    position: relative;
    width: 100%;
    height: 100%;
}

.hero-slider__slide {
    position: absolute;
    inset: 0;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.9s ease;
}

.hero-slider__slide.is-active {
    opacity: 1;
    visibility: visible;
    z-index: 1;
}

.hero-slider__slide a {
    display: block;
    width: 100%;
    height: 100%;
}

.hero-slider__slide img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center center;
    display: block;
}

/* ========================= */
/* أسهم التنقل */
/* ========================= */

.hero-slider__nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    z-index: 2;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    border: none;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(10, 10, 14, 0.45);
    color: #fff;
    cursor: pointer;
    backdrop-filter: blur(2px);
    opacity: 0;
    transition: opacity 0.25s ease, background 0.2s ease;
}

.hero-slider:hover .hero-slider__nav,
.hero-slider__nav:focus-visible {
    opacity: 1;
}

.hero-slider__nav:hover {
    background: rgba(10, 10, 14, 0.7);
}

.hero-slider__nav--prev { left: 16px; }
.hero-slider__nav--next { right: 16px; }

/* ========================= */
/* شريط التقدّم */
/* ========================= */

.hero-slider__progress {
    position: absolute;
    left: 20px;
    right: 20px;
    bottom: 16px;
    z-index: 2;
    display: flex;
    gap: 6px;
}

.hero-slider__bar {
    flex: 1;
    height: 3px;
    border: none;
    border-radius: 2px;
    padding: 0;
    background: rgba(255, 255, 255, 0.35);
    cursor: pointer;
    overflow: hidden;
}

.hero-slider__bar-fill {
    display: block;
    height: 100%;
    width: 0%;
    background: #fff;
    border-radius: 2px;
}

.hero-slider__bar.is-active .hero-slider__bar-fill {
    animation: hero-slider-fill var(--autoplay-duration, 5500ms) linear forwards;
}

@keyframes hero-slider-fill {
    from { width: 0%; }
    to { width: 100%; }
}

.hero-slider.is-paused .hero-slider__bar.is-active .hero-slider__bar-fill {
    animation-play-state: paused;
}

@media (prefers-reduced-motion: reduce) {
    .hero-slider__slide { transition: opacity 0.2s linear; }
    .hero-slider__bar-fill { animation: none !important; width: 0 !important; }
}

/* ========================= */
/* ✅ بطاقة التصنيفات العائمة - مُعاد بناؤها */
/* ========================= */

.cat-floating {
    position: relative;
    z-index: 5;
    max-width: 1100px;
    margin: -46px auto 0;
    padding: 14px clamp(10px, 2.5vw, 24px);
    background: #fff;
    border-radius: 18px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.14);
}

.cat-circles {
    position: relative;
    display: flex;
    align-items: center;
    gap: 8px;
}

.cat-circles__track {
    flex: 1;
    display: flex;
    gap: 18px;
    overflow-x: auto;
    scroll-snap-type: x proximity;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    scroll-padding-inline: 4px;
}

.cat-circles__track::-webkit-scrollbar { display: none; }

/* ✅ جميع التصنيفات بنفس العرض */
.cat-circles__item {
    flex: 0 0 auto;
    width: calc((100% - 6 * 18px) / 7);
    max-width: 140px;
    min-width: 80px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    text-decoration: none;
    scroll-snap-align: start;
}

.cat-circles__circle {
    width: 100%;
    aspect-ratio: 1 / 1;
    border-radius: 50%;
    overflow: hidden;
    background: #f0f0f2;
    border: 1px solid rgba(0,0,0,0.06);
    display: block;
    transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.cat-circles__item:hover .cat-circles__circle {
    transform: translateY(-4px);
    box-shadow: 0 10px 22px rgba(0,0,0,0.12);
}

.cat-circles__circle img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.cat-circles__label {
    font-size: 13px;
    font-weight: 600;
    color: #222;
    text-align: center;
    line-height: 1.3;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 100%;
}

.cat-circles__nav {
    flex: 0 0 auto;
    width: 34px;
    height: 34px;
    border-radius: 50%;
    border: 1px solid rgba(0,0,0,0.1);
    background: #fff;
    color: #222;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: background 0.2s ease, transform 0.2s ease;
}

.cat-circles__nav:hover {
    background: #f2f2f4;
}

.cat-circles__nav:active {
    transform: scale(0.94);
}

/* ========================= */
/* RESPONSIVE */
/* ========================= */

@media (max-width: 992px) {
    .hero-slider {
        aspect-ratio: 16 / 8;
    }
    .cat-floating {
        margin-top: -36px;
        max-width: calc(100% - 20px);
        border-radius: 16px;
    }
    .cat-circles__item {
        width: calc((100% - 3 * 16px) / 4);
        max-width: 140px;
    }
    .cat-circles__track {
        gap: 16px;
    }
}

@media (max-width: 768px) {
    .hero-slider {
        aspect-ratio: 16 / 7.5;
    }
    .cat-circles__item {
        width: calc((100% - 3 * 14px) / 4);
        max-width: 120px;
    }
    .cat-circles__track {
        gap: 14px;
    }
}

@media (max-width: 600px) {
    .hero-slider {
        aspect-ratio: 16 / 6.5;
    }
    .hero-slider__nav {
        opacity: 1;
        width: 34px;
        height: 34px;
    }
    .hero-slider__progress {
        left: 12px;
        right: 12px;
        bottom: 10px;
    }
    .cat-floating {
        margin-top: -26px;
        padding: 10px clamp(8px, 3vw, 16px);
        border-radius: 14px;
    }
    .cat-circles__item {
        width: calc((100% - 3 * 12px) / 4);
        max-width: 110px;
    }
    .cat-circles__track {
        gap: 12px;
    }
    .cat-circles__label {
        font-size: 11px;
    }
    .cat-circles__nav {
        display: none;
    }
}

@media (max-width: 480px) {
    .hero-slider {
        aspect-ratio: 16 / 5.5;
    }
    .cat-circles__item {
        width: calc((100% - 3 * 10px) / 4);
        max-width: 95px;
    }
    .cat-circles__track {
        gap: 10px;
    }
    .cat-circles__label {
        font-size: 10px;
    }
    .cat-circles__circle {
        border-width: 2px;
    }
}

@media (max-width: 400px) {
    .hero-slider {
        aspect-ratio: 16 / 5;
    }
    .cat-circles__item {
        width: calc((100% - 3 * 8px) / 4);
        max-width: 80px;
    }
    .cat-circles__track {
        gap: 8px;
    }
    .cat-circles__label {
        font-size: 9px;
    }
}
