/* Home page: hero background photos (fade) + "À la une" and categories strips that scroll on their own.
   Behaviour in assets/js/home-strips.js. Brand: navy #1B3A5F, orange #E85D04. */

/* ---------- Hero background ---------- */
.hero-section.has-bg { position: relative; overflow: hidden; background: #0B1A2D; }
.hero-section.has-bg .hero-orb,
.hero-section.has-bg .hero-kitchen { display: none; }
.hero-bg { position: absolute; inset: 0; z-index: 0; pointer-events: none; }
.hero-bg-slide {
    position: absolute; inset: 0; background-size: cover; background-position: center right;
    opacity: 0; transition: opacity 1.8s ease-in-out; will-change: opacity;
}
.hero-bg-slide.is-on { opacity: 1; }
/* Navy veil: darker on the text side so white text keeps a contrast above 7:1 whatever the photo */
.hero-bg::after {
    content: ""; position: absolute; inset: 0;
    background: linear-gradient(90deg, rgba(11, 26, 45, .93) 0%, rgba(11, 26, 45, .82) 42%, rgba(11, 26, 45, .5) 100%);
}
html[dir="rtl"] .hero-bg::after {
    background: linear-gradient(270deg, rgba(11, 26, 45, .93) 0%, rgba(11, 26, 45, .82) 42%, rgba(11, 26, 45, .5) 100%);
}
/* Arabic: the text sits on the right, so mirror the photos to bring the equipment to the free left side */
@media (min-width: 768px) {
    html[dir="rtl"] .hero-bg-slide { transform: scaleX(-1); }
}
@media (max-width: 767.98px) {
    .hero-bg-slide { background-position: center; }
    .hero-bg::after, html[dir="rtl"] .hero-bg::after { background: rgba(11, 26, 45, .8); }
}
.hero-section.has-bg .hero-inner { position: relative; z-index: 1; }

/* ---------- Strips ---------- */
.hm-strip { padding: 1.75rem 0 .5rem; background: #fff; }
.hm-strip + .hm-strip { padding-top: .25rem; }
.hm-strip-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 1rem; margin-bottom: .9rem; }
.hm-strip-title { margin: 0; font-family: var(--hm-display, Manrope, sans-serif); font-weight: 800; font-size: 1.25rem; color: #1B3A5F; }
html[dir="rtl"] .hm-strip-title { font-family: 'Cairo', sans-serif; }
.hm-strip-title i { color: #E85D04; margin-inline-end: .35rem; }
.hm-strip-all { display: inline-flex; align-items: center; gap: .35rem; padding: .4rem .85rem; border-radius: 999px; border: 1px solid rgba(27, 58, 95, .2); color: #1B3A5F; font-size: .85rem; font-weight: 700; text-decoration: none; white-space: nowrap; }
.hm-strip-all:hover { background: #1B3A5F; border-color: #1B3A5F; color: #fff; }

/* The track always runs left to right internally (simpler, smooth loop); cards keep the page direction */
.hm-strip-track {
    display: flex; gap: .85rem; overflow-x: auto; overscroll-behavior-x: contain; scrollbar-width: none;
    padding: .25rem .25rem 1rem; cursor: grab; -webkit-overflow-scrolling: touch; touch-action: pan-x pan-y;
}
.hm-strip-track::-webkit-scrollbar { display: none; }
.hm-strip-track.is-dragging { cursor: grabbing; user-select: none; }
.hm-strip-track.is-dragging a { pointer-events: none; }

/* "À la une": portrait cards, about half the screen width on a phone */
.hm-fcard {
    flex: 0 0 clamp(150px, 46vw, 230px); display: flex; flex-direction: column; overflow: hidden;
    border-radius: 16px; background: #fff; color: #1B3A5F; text-decoration: none;
    border: 1px solid rgba(27, 58, 95, .1); box-shadow: 0 10px 24px -18px rgba(11, 26, 45, .55);
    transition: transform .25s ease, box-shadow .25s ease;
}
.hm-fcard:hover { transform: translateY(-3px); box-shadow: 0 18px 30px -18px rgba(11, 26, 45, .6); color: #1B3A5F; }
.hm-fcard-img { aspect-ratio: 4 / 5; background: linear-gradient(180deg, #fff, #EEF2F7); }
.hm-fcard-img img { width: 100%; height: 100%; object-fit: contain; padding: .6rem; }
.hm-fcard-body { display: flex; flex-direction: column; gap: .3rem; padding: .65rem .75rem .8rem; flex: 1; }
.hm-fcard-name { font-size: .85rem; font-weight: 700; line-height: 1.3; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.hm-fcard-price { margin-top: auto; font-weight: 800; color: #E85D04; font-size: .95rem; }

/* Categories: same strip, smaller cards */
.hm-ccard {
    flex: 0 0 clamp(118px, 34vw, 165px); display: flex; flex-direction: column; overflow: hidden;
    border-radius: 14px; background: #F5F7FA; color: #1B3A5F; text-decoration: none; border: 1px solid rgba(27, 58, 95, .08);
    transition: transform .25s ease, background-color .25s ease;
}
.hm-ccard:hover { transform: translateY(-3px); background: #fff; color: #1B3A5F; }
.hm-ccard-img { aspect-ratio: 4 / 3; display: grid; place-items: center; background: #E9EEF5; overflow: hidden; }
.hm-ccard-img img { width: 100%; height: 100%; object-fit: cover; }
.hm-ccard-img i { font-size: 1.8rem; color: #1B3A5F; }
.hm-ccard-name { padding: .5rem .6rem .1rem; font-size: .8rem; font-weight: 700; line-height: 1.25; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.hm-ccard-count { padding: 0 .6rem .55rem; font-size: .72rem; color: #E85D04; font-weight: 700; }

@media (prefers-reduced-motion: reduce) {
    .hero-bg-slide { transition: none; }
    .hm-fcard, .hm-ccard { transition: none; }
}
