/* Homepage visual system */
.home-hero {
    isolation: isolate;
    background: #18241d;
}

.hero-banner-frame {
    height: clamp(520px, 66vh, 690px);
    min-height: 520px;
    background: #18241d;
}

.home-hero__image {
    transform: scale(1.015);
    transition: transform 9s cubic-bezier(.2, .7, .2, 1);
}

.hero-swiper .swiper-slide-active .home-hero__image {
    transform: scale(1.08);
}

.home-hero__shade {
    background:
        linear-gradient(90deg, rgba(12, 22, 16, .9) 0%, rgba(12, 22, 16, .66) 43%, rgba(12, 22, 16, .16) 76%),
        linear-gradient(0deg, rgba(8, 15, 11, .38), transparent 55%);
}

[dir="rtl"] .home-hero__shade {
    background:
        linear-gradient(270deg, rgba(12, 22, 16, .9) 0%, rgba(12, 22, 16, .66) 43%, rgba(12, 22, 16, .16) 76%),
        linear-gradient(0deg, rgba(8, 15, 11, .38), transparent 55%);
}

.home-hero__content {
    padding: clamp(1.35rem, 3vw, 2.5rem);
    color: #fff;
    border: 1px solid rgba(255, 255, 255, .2);
    border-radius: 1.75rem;
    background: linear-gradient(135deg, rgba(18, 32, 24, .68), rgba(18, 32, 24, .35));
    box-shadow: 0 30px 80px rgba(0, 0, 0, .25);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
}

.home-hero__eyebrow {
    display: inline-flex;
    width: max-content;
    align-items: center;
    gap: .55rem;
    margin-bottom: 1.15rem;
    padding: .5rem .8rem;
    color: #fff7dc;
    font-size: .75rem;
    font-weight: 800;
    letter-spacing: .09em;
    text-transform: uppercase;
    border: 1px solid rgba(255, 255, 255, .2);
    border-radius: 999px;
    background: rgba(255, 255, 255, .12);
}

.home-hero__title {
    max-width: 15ch;
    margin: 0 0 1rem;
    color: #fff;
    font-size: clamp(2.4rem, 5.2vw, 4.75rem);
    font-weight: 800;
    line-height: 1.02;
    letter-spacing: -.045em;
    text-wrap: balance;
    text-shadow: 0 4px 24px rgba(0, 0, 0, .26);
}

.home-hero__description {
    max-width: 38rem;
    margin-bottom: 1.75rem;
    color: rgba(255, 255, 255, .88);
    font-size: clamp(1rem, 1.8vw, 1.25rem);
    line-height: 1.65;
}

.home-hero__cta,
.home-hero__secondary {
    display: inline-flex;
    min-height: 3.25rem;
    align-items: center;
    justify-content: center;
    gap: .7rem;
    padding: .85rem 1.3rem;
    font-weight: 800;
    border-radius: 999px;
    transition: transform .25s ease, box-shadow .25s ease, background-color .25s ease;
}

.home-hero__cta {
    color: #243a2d;
    background: #fff;
    box-shadow: 0 14px 35px rgba(0, 0, 0, .2);
}

.home-hero__secondary {
    color: #fff;
    border: 1px solid rgba(255, 255, 255, .42);
    background: rgba(255, 255, 255, .08);
}

.home-hero__cta:hover,
.home-hero__secondary:hover {
    transform: translateY(-3px);
    box-shadow: 0 18px 36px rgba(0, 0, 0, .24);
}

.home-hero__cta i {
    transition: transform .25s ease;
}

.home-hero__cta:hover i {
    transform: translateX(.25rem);
}

[dir="rtl"] .home-hero__cta:hover i {
    transform: translateX(-.25rem) scaleX(-1);
}

.home-hero--default {
    display: grid;
    min-height: clamp(530px, 68vh, 700px);
    place-items: center;
    padding: 5rem 0;
    background:
        radial-gradient(circle at 18% 22%, rgba(250, 204, 21, .28), transparent 30%),
        radial-gradient(circle at 82% 72%, rgba(16, 185, 129, .22), transparent 34%),
        linear-gradient(135deg, #172a20 0%, #75501e 54%, #bb7416 100%);
}

.home-hero__default-content {
    animation: homeHeroEnter .8s cubic-bezier(.2, .75, .25, 1) both;
}

.home-hero__title--default {
    max-width: 18ch;
    margin-inline: auto;
}

.hero-swiper.swiper-initialized .swiper-slide:not(.swiper-slide-active) .home-hero__content > * {
    opacity: 0;
    transform: translateY(1.1rem);
}

.hero-swiper.swiper-initialized .swiper-slide-active .home-hero__content > * {
    animation: homeHeroEnter .72s cubic-bezier(.2, .75, .25, 1) both;
}

.hero-swiper.swiper-initialized .swiper-slide-active .home-hero__content > :nth-child(2) {
    animation-delay: 100ms;
}

.hero-swiper.swiper-initialized .swiper-slide-active .home-hero__content > :nth-child(3) {
    animation-delay: 190ms;
}

.hero-swiper.swiper-initialized .swiper-slide-active .home-hero__content > :nth-child(4) {
    animation-delay: 280ms;
}

.home-categories {
    padding: clamp(4rem, 7vw, 7rem) 0;
}

.home-section-heading {
    max-width: 52rem;
    margin: 0 auto clamp(2rem, 4vw, 3.5rem);
}

.home-category-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: clamp(.85rem, 2vw, 1.5rem);
}

@media (min-width: 640px) {
    .home-category-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }
}

@media (min-width: 1024px) {
    .home-category-grid {
        grid-template-columns: repeat(4, minmax(0, 1fr));
    }
}

.home-category-card {
    position: relative;
    display: block;
    width: 100%;
    aspect-ratio: 4 / 5;
    overflow: hidden;
    color: #fff;
    border: 1px solid rgba(37, 52, 42, .12);
    border-radius: clamp(1.1rem, 2vw, 1.65rem);
    background: #243a2d;
    box-shadow: 0 16px 38px rgba(22, 35, 27, .13);
    transform: translateZ(0);
    transition: transform .45s cubic-bezier(.2, .75, .25, 1), box-shadow .45s ease;
}

.home-category-card__image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transform: scale(1.01);
    transition: transform .7s cubic-bezier(.2, .75, .25, 1), filter .45s ease;
}

.home-category-card__veil {
    position: absolute;
    inset: 0;
    background:
        linear-gradient(180deg, rgba(6, 15, 10, .06) 25%, rgba(6, 15, 10, .32) 58%, rgba(6, 15, 10, .94) 100%),
        radial-gradient(circle at 75% 10%, rgba(255, 255, 255, .2), transparent 30%);
}

.home-category-card__content {
    position: absolute;
    inset-inline: 1.15rem;
    bottom: 1.15rem;
    z-index: 2;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: .4rem;
    text-align: start;
}

.home-category-card__name {
    max-width: 100%;
    color: #fff;
    font-size: clamp(1.15rem, 2vw, 1.55rem);
    font-weight: 800;
    line-height: 1.15;
    letter-spacing: -.02em;
    text-shadow: 0 3px 18px rgba(0, 0, 0, .55);
}

.home-category-card__action {
    display: inline-flex;
    align-items: center;
    gap: .45rem;
    color: rgba(255, 255, 255, .82);
    font-size: .78rem;
    font-weight: 700;
    transform: translateY(.2rem);
    transition: color .3s ease, transform .3s ease;
}

.home-category-card__count {
    position: absolute;
    z-index: 2;
    inset-block-start: .9rem;
    inset-inline-end: .9rem;
    display: grid;
    min-width: 2.1rem;
    height: 2.1rem;
    padding: 0 .55rem;
    place-items: center;
    color: #263e30;
    font-size: .75rem;
    font-weight: 900;
    border: 1px solid rgba(255, 255, 255, .65);
    border-radius: 999px;
    background: rgba(255, 255, 255, .88);
    box-shadow: 0 8px 24px rgba(0, 0, 0, .16);
    backdrop-filter: blur(8px);
}

.home-category-card__shine {
    position: absolute;
    inset: -40%;
    z-index: 1;
    background: linear-gradient(110deg, transparent 42%, rgba(255, 255, 255, .2) 50%, transparent 58%);
    transform: translateX(-70%) rotate(8deg);
    transition: transform .8s ease;
}

.home-category-card:hover,
.home-category-card:focus-visible {
    transform: translateY(-8px);
    box-shadow: 0 26px 58px rgba(22, 35, 27, .23);
}

.home-category-card:hover .home-category-card__image,
.home-category-card:focus-visible .home-category-card__image {
    filter: saturate(1.08) contrast(1.03);
    transform: scale(1.09);
}

.home-category-card:hover .home-category-card__action,
.home-category-card:focus-visible .home-category-card__action {
    color: #fff;
    transform: translateY(0);
}

.home-category-card:hover .home-category-card__shine,
.home-category-card:focus-visible .home-category-card__shine {
    transform: translateX(70%) rotate(8deg);
}

.home-category-card:focus-visible,
.home-hero__cta:focus-visible,
.home-hero__secondary:focus-visible {
    outline: 3px solid #f4c45f;
    outline-offset: 4px;
}

.is-reveal-pending {
    opacity: 0;
    transform: translateY(1.5rem);
}

.is-reveal-visible {
    opacity: 1;
    transform: translateY(0);
    transition: opacity .65s ease calc(min(var(--reveal-order, 0), 6) * 70ms), transform .65s cubic-bezier(.2, .75, .25, 1) calc(min(var(--reveal-order, 0), 6) * 70ms);
}

@keyframes homeHeroEnter {
    from { opacity: 0; transform: translateY(1.5rem); }
    to { opacity: 1; transform: translateY(0); }
}

@media (max-width: 767px) {
    .hero-banner-frame {
        height: clamp(500px, 72svh, 620px);
        min-height: 500px;
    }

    .home-hero__content {
        padding: 1.25rem;
        border-radius: 1.25rem;
        background: linear-gradient(135deg, rgba(18, 32, 24, .48), rgba(18, 32, 24, .2));
        backdrop-filter: none;
        -webkit-backdrop-filter: none;
    }

    .home-hero__shade,
    [dir="rtl"] .home-hero__shade {
        background: linear-gradient(0deg, rgba(8, 15, 11, .42), rgba(8, 15, 11, .12));
    }

    .home-hero__title {
        font-size: clamp(2rem, 10vw, 3rem);
    }

    .home-hero--default {
        min-height: 600px;
        padding: 4.5rem 0;
    }

    .home-categories {
        padding: 3.5rem 0 4rem;
    }
}

/* Hero Swiper Buttons */
.hero-swiper .swiper-button-next,
.hero-swiper .swiper-button-prev {
    color: white;
    background: rgba(17, 29, 22, .5);
    width: 46px;
    height: 46px;
    border-radius: 50%;
    border: 1px solid rgba(255, 255, 255, .25);
    backdrop-filter: blur(10px);
    transition: all 0.3s ease;
}

.hero-swiper .swiper-button-next:hover,
.hero-swiper .swiper-button-prev:hover {
    background: rgba(255, 255, 255, .2);
    transform: scale(1.1);
}

.hero-swiper .swiper-button-next:after,
.hero-swiper .swiper-button-prev:after {
    font-size: 20px;
}

.hero-swiper .swiper-pagination-bullet {
    background: white;
    opacity: 0.5;
    width: 12px;
    height: 12px;
    transition: all 0.3s ease;
}

.hero-swiper .swiper-pagination-bullet-active {
    opacity: 1;
    width: 32px;
    border-radius: 6px;
}

.swiper-slide-active,
.swiper-slide-next,
.swiper-slide-prev {
    opacity: 1;
}

/* Bottom CTA banner: premium store colors with safe text contrast. */
.bottom-cta-banner {
    background: linear-gradient(135deg, #2a1b12 0%, #3d2b1f 45%, #b7791f 100%);
    background:
        radial-gradient(circle at 88% 12%,
            color-mix(in srgb, var(--primary-color, #b7791f) 34%, transparent) 0%,
            transparent 34%),
        radial-gradient(circle at 8% 90%,
            color-mix(in srgb, var(--primary-color, #b7791f) 22%, transparent) 0%,
            transparent 30%),
        linear-gradient(135deg,
            color-mix(in srgb, var(--secondary-color, #3d2b1f) 86%, #0f172a) 0%,
            color-mix(in srgb, var(--secondary-color, #3d2b1f) 70%, #0f172a) 48%,
            color-mix(in srgb, var(--primary-color, #b7791f) 78%, #3d2b1f) 100%);
}

.bottom-cta-content {
    position: relative;
    z-index: 1;
    isolation: isolate;
    background:
        linear-gradient(135deg,
            color-mix(in srgb, var(--secondary-color, #3d2b1f) 92%, #0f172a) 0%,
            color-mix(in srgb, var(--secondary-color, #3d2b1f) 78%, #0f172a) 62%,
            color-mix(in srgb, var(--primary-color, #b7791f) 36%, #3d2b1f) 100%);
}

.bottom-cta-content::before {
    content: "";
    position: absolute;
    inset: 0;
    z-index: -1;
    background:
        radial-gradient(circle at 90% 15%, rgba(183, 121, 31, 0.24), transparent 28%),
        linear-gradient(135deg, rgba(42, 27, 18, 0.94), rgba(61, 43, 31, 0.72));
}

.bottom-cta-title,
.bottom-cta-description {
    text-shadow: 0 2px 8px rgba(15, 23, 42, 0.45);
}

/* ============================================
   ANIMATIONS
   ============================================ */

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.animate-fade-in-up {
    animation: fadeInUp 0.8s ease-out;
}

.animation-delay-200 {
    animation-delay: 200ms;
}

.animation-delay-400 {
    animation-delay: 400ms;
}

/* ============================================
   LEAFLET MAP STYLES
   ============================================ */

#map {
    z-index: 1;
}

.leaflet-control-zoom {
    border: none !important;
    border-radius: 8px !important;
    overflow: hidden;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
}

.leaflet-control-zoom a {
    border-radius: 0 !important;
    width: 40px !important;
    height: 40px !important;
    line-height: 40px !important;
    transition: all 0.3s ease;
}

.leaflet-control-zoom a:hover {
    background: #059669 !important;
    color: white !important;
}

/* ============================================
   UTILITY CLASSES
   ============================================ */

.line-clamp-1 {
    display: -webkit-box;
    -webkit-line-clamp: 1;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.line-clamp-2 {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.line-clamp-3 {
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* Smooth transitions */
.transition-all {
    transition-property: all;
    transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1);
}

/* ============================================
   RESPONSIVE ADJUSTMENTS
   ============================================ */

/* Featured products: clean image-first cards with an always-visible cart action. */
.home-products-grid .card-product,
.home-products-grid .card-product:hover {
    background: transparent;
    border: 0 !important;
    box-shadow: none;
}

.home-products-grid .card-product .product-card-media {
    aspect-ratio: 1;
    border-radius: 0.875rem;
}

.home-products-grid .card-product > .pointer-events-none {
    display: none;
}

.home-products-grid .card-product .product-content {
    flex: 0 0 auto;
    min-height: 0;
    padding: 0.55rem 0.75rem 0;
}

.home-products-grid .card-product .product-content > div:first-child {
    min-height: 0;
    margin-bottom: 0.2rem;
}

.home-products-grid .card-product .product-content > div:first-child a {
    color: var(--primary-color, #B7791F);
    font-size: 0.68rem;
}

.home-products-grid .card-product h3 {
    min-height: 0;
    margin: 0 0 0.2rem;
    font-size: 1rem;
    font-weight: 500;
    line-height: 1.4;
}

.home-products-grid .card-product .product-card-price {
    min-height: 0;
}

.home-products-grid .card-product [data-card-final-price] {
    font-size: 1rem;
    font-weight: 500;
}

.home-products-grid .card-product .product-card-overlay-button {
    display: inline-flex;
    width: 3rem;
    height: 3rem;
    min-height: 3rem;
    max-width: none;
    padding: 0;
    background: #111;
    box-shadow: 0 5px 14px rgba(0, 0, 0, 0.25);
}

.home-products-grid .card-product .product-card-overlay-button:hover {
    background: #252525;
}

.home-products-grid .card-product .product-card-action-label {
    display: none;
}

.home-products-grid .card-product .product-card-overlay-button--disabled,
.home-products-grid .card-product .product-card-overlay-button--disabled:hover {
    background: #6b7280;
}

@media (max-width: 768px) {
    .hero-swiper .swiper-button-next,
    .hero-swiper .swiper-button-prev {
    display: none;
    }

    
    .hero-swiper .swiper-button-next:after,
    .hero-swiper .swiper-button-prev:after {
        font-size: 16px;
    }
}

/* Prevent layout shift during Swiper initialization */
.swiper-wrapper {
    height: auto;
}

/* Loading state for Swiper */
.swiper:not(.swiper-initialized) {
    overflow: hidden;
}

.swiper:not(.swiper-initialized) .swiper-wrapper {
    display: flex;
    flex-wrap: nowrap;
}

.swiper:not(.swiper-initialized) .swiper-slide {
    flex-shrink: 0;
    width: 100%;
}

@media (prefers-reduced-motion: reduce) {
    .home-hero__image,
    .home-category-card,
    .home-category-card__image,
    .home-category-card__action,
    .home-category-card__shine,
    .home-hero__cta,
    .home-hero__secondary,
    .home-hero__default-content,
    .home-hero .animate-bounce,
    .hero-swiper .home-hero__content > * {
        animation: none !important;
        scroll-behavior: auto !important;
        transition-duration: .01ms !important;
    }

    .is-reveal-pending,
    .is-reveal-visible {
        opacity: 1;
        transform: none;
    }
}
