/* ==========================================================================
   Khadrah Storefront Theme — warm luxe fashion
   Fonts loaded via <link> in app.blade.php (no @import — prevents FOUC)
   ========================================================================== */

:root {
    --heading-font: 'Syne', 'Manrope', system-ui, sans-serif;
    --body-font: 'Manrope', system-ui, sans-serif;
    --khadrah-ink: 24 22% 10%;
    --khadrah-mist: 36 24% 97%;
    --khadrah-paper: 40 33% 99%;
    --khadrah-line: 32 14% 86%;
    --khadrah-gold: 36 42% 58%;
    --khadrah-ease: cubic-bezier(0.22, 1, 0.36, 1);
    --khadrah-ease-out: cubic-bezier(0.16, 1, 0.3, 1);
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--body-font);
    color: hsl(var(--body-color));
    -webkit-font-smoothing: antialiased;
    background-color: hsl(var(--khadrah-mist));
}

h1, h2, h3, h4, h5, h6,
.product-title,
.section-title,
.boutique-hero-slide__title,
.featured-categories-modern__heading,
.khadrah-section__title {
    font-family: var(--heading-font);
    letter-spacing: -0.03em;
    color: hsl(var(--khadrah-ink));
}

/* --------------------------------------------------------------------------
   Preloader
   -------------------------------------------------------------------------- */
.preloader {
    background:
        radial-gradient(ellipse 60% 50% at 50% 40%, hsl(var(--base) / 0.14), transparent 70%),
        hsl(var(--khadrah-mist)) !important;
}

.preloader img {
    animation: khadrah-breathe 1.4s var(--khadrah-ease) infinite alternate;
}

@keyframes khadrah-breathe {
    from { transform: scale(0.94); opacity: 0.85; }
    to { transform: scale(1); opacity: 1; }
}

/* --------------------------------------------------------------------------
   Header — ink nav, crimson accents (not full-bar brand flood)
   -------------------------------------------------------------------------- */
.header-area {
    background: hsl(var(--khadrah-paper));
    border-bottom: 1px solid hsl(var(--khadrah-line) / 0.85);
}

.header-middle {
    padding-top: 0.65rem;
    padding-bottom: 0.65rem;
}

.header-bottom,
.header-bottom-wrapper {
    background: hsl(var(--khadrah-ink)) !important;
}

/* Warm gold accent for interactive chrome */
.view-category .menu-category-btn,
.btn--base,
.header-bottom .ecommerce__is,
.header-bottom .cart-icon-design .ecommerce__is {
    background: hsl(var(--base)) !important;
}

.header-bottom .menu li a,
.header-bottom .ecommerce__text,
.header-bottom .user-account span {
    color: hsl(0 0% 100% / 0.88) !important;
    font-family: var(--body-font);
    font-weight: 500;
    letter-spacing: 0.02em;
    text-transform: none;
    transition: color 0.25s var(--khadrah-ease);
}

.header-bottom .menu li a:hover,
.header-bottom .menu li a.active {
    color: #fff !important;
}

.header-bottom .menu li a {
    position: relative;
}

.header-bottom .menu li a::after {
    content: '';
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0.35rem;
    height: 2px;
    background: hsl(var(--base));
    transform: scaleX(0);
    transform-origin: left;
    transition: transform 0.35s var(--khadrah-ease);
}

.header-bottom .menu li a:hover::after,
.header-bottom .menu li a.active::after {
    transform: scaleX(1);
}

.view-category .menu-category-btn {
    background: hsl(var(--base)) !important;
    font-family: var(--body-font);
    font-weight: 600;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    font-size: 0.78rem !important;
    transition: background 0.3s var(--khadrah-ease), filter 0.3s ease;
}

.view-category .menu-category-btn:hover {
    filter: brightness(1.06);
}

.header-bottom .ecommerce__is,
.header-bottom .cart-icon-design .ecommerce__is {
    background: hsl(var(--base)) !important;
}

/* Search */
.header-middle .form--control,
.header-middle input[type="search"],
.header-middle .search-form input {
    border-radius: 0 !important;
    border: 1px solid hsl(var(--khadrah-line)) !important;
    background: hsl(var(--khadrah-mist)) !important;
    font-family: var(--body-font);
    transition: border-color 0.25s ease, box-shadow 0.25s ease;
}

.header-middle .form--control:focus,
.header-middle input[type="search"]:focus {
    border-color: hsl(var(--base) / 0.55) !important;
    box-shadow: 0 0 0 3px hsl(var(--base) / 0.12) !important;
}

/* --------------------------------------------------------------------------
   Buttons
   -------------------------------------------------------------------------- */
.btn--base,
.tf-btn.btn-fill,
.boutique-hero-slide__cta {
    border-radius: 0 !important;
    font-family: var(--body-font);
    font-weight: 600;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    font-size: 0.78rem;
    transition:
        transform 0.35s var(--khadrah-ease),
        background 0.3s ease,
        color 0.3s ease,
        border-color 0.3s ease !important;
}

.btn--base:hover,
.tf-btn.btn-fill:hover {
    transform: translateY(-2px);
}

/* --------------------------------------------------------------------------
   Full-bleed hero
   -------------------------------------------------------------------------- */
.home-page-section--hero {
    margin: 0;
    padding: 0;
}

.boutique-hero-banner.boutique-hero-banner--bleed {
    width: 100%;
    max-width: none;
    padding-left: 0;
    padding-right: 0;
    margin: 0;
}

.boutique-hero-banner--bleed .boutique-hero-banner__inner {
    margin: 0 !important;
}

.boutique-hero-banner--bleed .boutique-hero-banner__row {
    gap: 0 !important;
}

.boutique-hero-banner--bleed .boutique-hero-slider__viewport.slider-wrapper,
.boutique-hero-banner--bleed .rounded--5 {
    border-radius: 0 !important;
    height: min(86vh, 720px) !important;
    min-height: min(86vh, 720px) !important;
}

@media (max-width: 767px) {
    .boutique-hero-banner--bleed .boutique-hero-slider__viewport.slider-wrapper {
        height: min(72vh, 520px) !important;
        min-height: 280px !important;
    }
}

.boutique-hero-slide__media {
    overflow: hidden;
}

.boutique-hero-slide__img {
    transition: transform 7s linear;
    will-change: transform;
}

.boutique-hero-rotator__slide.is-active .boutique-hero-slide__img {
    transform: scale(1.06);
}

.boutique-hero-slide__overlay {
    background:
        linear-gradient(105deg, hsl(var(--khadrah-ink) / 0.72) 0%, hsl(var(--khadrah-ink) / 0.28) 48%, transparent 78%) !important;
}

.boutique-hero-slide__content {
    max-width: min(36rem, 88vw);
    padding: clamp(1.5rem, 5vw, 4rem) !important;
}

.boutique-hero-slide__title {
    font-size: clamp(2.35rem, 6.2vw, 4.75rem) !important;
    font-weight: 700 !important;
    line-height: 0.95 !important;
    color: #fff !important;
    margin-bottom: 0.85rem !important;
    text-shadow: none !important;
    animation: khadrah-rise 0.9s var(--khadrah-ease-out) both;
}

.boutique-hero-slide__subtitle {
    font-family: var(--body-font) !important;
    font-size: clamp(0.95rem, 1.5vw, 1.125rem) !important;
    font-weight: 400 !important;
    color: hsl(0 0% 100% / 0.82) !important;
    max-width: 28rem;
    line-height: 1.55 !important;
    margin-bottom: 1.5rem !important;
    animation: khadrah-rise 0.9s 0.1s var(--khadrah-ease-out) both;
}

.boutique-hero-slide__cta {
    display: inline-flex !important;
    align-items: center;
    gap: 0.5rem;
    padding: 0.95rem 1.75rem !important;
    background: #fff !important;
    color: hsl(var(--khadrah-ink)) !important;
    border: 1px solid transparent !important;
    animation: khadrah-rise 0.9s 0.18s var(--khadrah-ease-out) both;
}

.boutique-hero-slide__cta:hover {
    background: hsl(var(--base)) !important;
    color: #fff !important;
    transform: translateY(-2px);
}

@keyframes khadrah-rise {
    from {
        opacity: 0;
        transform: translateY(22px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* --------------------------------------------------------------------------
   Page atmospheres (soft — no heavy multi-shadow cards)
   -------------------------------------------------------------------------- */
body.page-vibrant--home main,
body.page-vibrant--product main,
body.page-vibrant--cart main {
    background:
        radial-gradient(ellipse 70% 40% at 50% -8%, hsl(var(--base) / 0.07), transparent 55%),
        linear-gradient(180deg, hsl(var(--khadrah-mist)) 0%, hsl(var(--khadrah-paper)) 42%, hsl(var(--khadrah-mist)) 100%) !important;
}

body.page-vibrant--product .product-details-container,
body.page-vibrant--cart .cart {
    border-radius: 0 !important;
    box-shadow: none !important;
    border: 1px solid hsl(var(--khadrah-line)) !important;
    background: hsl(var(--khadrah-paper)) !important;
}

body.page-vibrant--product .product-title {
    border-left: 3px solid hsl(var(--base));
    font-size: clamp(1.35rem, 2.4vw, 1.85rem);
}

body.page-vibrant--product .product-details .product-price {
    font-family: var(--heading-font);
    font-size: 1.45rem;
    font-weight: 700;
}

body.page-vibrant--product .products-description .nav-tabs {
    background: hsl(var(--khadrah-mist)) !important;
    border-radius: 0 !important;
}

body.page-vibrant--product .products-description .nav-tabs li a.active {
    border-radius: 0 !important;
}

body.page-vibrant--cart .cart-step-box {
    border-radius: 0 !important;
    transition: transform 0.3s var(--khadrah-ease), border-color 0.3s ease, background 0.3s ease;
}

body.page-vibrant--cart .cart-step-box.active {
    border-color: hsl(var(--base) / 0.45) !important;
    background: hsl(var(--base) / 0.06) !important;
    box-shadow: none !important;
}

body.page-vibrant--cart .cart-next-step .btn--base {
    box-shadow: none !important;
}

/* --------------------------------------------------------------------------
   Category strip — compact retail tiles (NOT full-bleed posters)
   -------------------------------------------------------------------------- */
.featured-categories-modern {
    padding-block: clamp(1.75rem, 4vw, 3rem) !important;
}

.khadrah-section__eyebrow {
    display: inline-block;
    font-family: var(--body-font);
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    color: hsl(var(--base));
    margin-bottom: 0.65rem;
}

.featured-categories-modern__heading,
.khadrah-section__title {
    font-size: clamp(1.5rem, 3vw, 2.15rem) !important;
    font-weight: 700 !important;
    margin: 0 !important;
}

/* Beat home.blade flex width fights — always a neat row of cards */
body.page-vibrant--home .home-page-section--popular-categories .featured-categories-modern__grid,
.home-page-section--popular-categories .featured-categories-modern__grid {
    display: grid !important;
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    gap: 0.85rem !important;
    justify-content: stretch !important;
    align-items: start !important;
    width: 100% !important;
    max-width: 56rem;
    margin-inline: auto;
}

@media (min-width: 768px) {
    body.page-vibrant--home .home-page-section--popular-categories .featured-categories-modern__grid,
    .home-page-section--popular-categories .featured-categories-modern__grid {
        grid-template-columns: repeat(4, minmax(0, 1fr)) !important;
        gap: 1.15rem !important;
    }
}

body.page-vibrant--home .home-page-section--popular-categories .featured-categories-modern__grid > .small-card-item,
body.page-vibrant--home .home-page-section--popular-categories .featured-categories-modern__grid > .small-card-item:nth-child(n),
.home-page-section--popular-categories .featured-categories-modern__grid > .small-card-item {
    width: auto !important;
    max-width: none !important;
    flex: unset !important;
    border-radius: 0 !important;
    box-shadow: none !important;
    background: transparent !important;
    overflow: visible !important;
    padding: 0 !important;
    border: none !important;
    transform: none !important;
}

.khadrah-cat-card {
    display: block;
    text-decoration: none !important;
    color: inherit;
    text-align: center;
}

.khadrah-cat-card__media {
    position: relative;
    display: block;
    width: 100%;
    aspect-ratio: 1 / 1 !important;
    max-height: 220px;
    overflow: hidden;
    background:
        linear-gradient(145deg, hsl(var(--base) / 0.14), hsl(var(--khadrah-ink) / 0.05)),
        hsl(var(--khadrah-mist));
    border: 1px solid hsl(var(--khadrah-line));
}

.khadrah-cat-card__media img {
    width: 100% !important;
    height: 100% !important;
    max-width: 100% !important;
    aspect-ratio: unset !important;
    object-fit: cover !important;
    object-position: center;
    margin: 0 !important;
    transition: transform 0.7s var(--khadrah-ease), opacity 0.35s ease;
}

.khadrah-cat-card--placeholder .khadrah-cat-card__media img {
    opacity: 0;
    position: absolute;
    inset: 0;
}

.khadrah-cat-card__mono {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: var(--heading-font);
    font-size: clamp(2rem, 5vw, 2.75rem);
    font-weight: 700;
    color: hsl(var(--base) / 0.42);
    letter-spacing: -0.04em;
    user-select: none;
    pointer-events: none;
}

.khadrah-cat-card__name {
    display: block;
    margin-top: 0.7rem;
    font-family: var(--heading-font);
    font-size: 0.98rem;
    font-weight: 600;
    letter-spacing: -0.02em;
    color: hsl(var(--khadrah-ink));
    transition: color 0.25s ease;
}

.khadrah-cat-card:hover .khadrah-cat-card__media img {
    transform: scale(1.04);
}

.khadrah-cat-card:hover .khadrah-cat-card__name {
    color: hsl(var(--base));
}

.khadrah-cat-card:hover .khadrah-cat-card__media {
    border-color: hsl(var(--base) / 0.35);
}

/* Kill old home.blade box/inset shadows on these tiles */
body.page-vibrant--home .home-page-section--popular-categories .featured-categories-modern__grid > .small-card-item:nth-child(n) {
    box-shadow: none !important;
}

body.page-vibrant--home .home-page-section--popular-categories .featured-categories-modern__grid > .small-card-item:hover {
    transform: none !important;
    box-shadow: none !important;
}

/* --------------------------------------------------------------------------
   Product cards / boutique shelves
   -------------------------------------------------------------------------- */
.boutique-product-card,
.product-card,
.product-item {
    border-radius: 0 !important;
    transition: transform 0.45s var(--khadrah-ease);
}

.boutique-product-card:hover,
.product-card:hover {
    transform: translateY(-4px);
}

.boutique-product-card .product-thumb img,
.product-card img,
.product-item .thumb img {
    transition: transform 0.8s var(--khadrah-ease) !important;
}

.boutique-product-card:hover .product-thumb img,
.product-card:hover img {
    transform: scale(1.04);
}

.boutique-product-section .section-heading,
.boutique-product-section h2,
.boutique-home-shelves h2,
.boutique-home-shelves .title {
    font-family: var(--heading-font) !important;
}

/* --------------------------------------------------------------------------
   Coupon strip
   -------------------------------------------------------------------------- */
body.page-vibrant--home .banner-supper-sale {
    border-radius: 0 !important;
    border: 1px solid hsl(var(--base) / 0.25) !important;
    background:
        linear-gradient(115deg, hsl(var(--khadrah-ink)) 0%, hsl(var(--khadrah-ink) / 0.92) 55%, hsl(var(--base) / 0.95) 100%) !important;
    color: #fff;
    padding: clamp(1.5rem, 4vw, 2.25rem) !important;
}

body.page-vibrant--home .banner-supper-sale h6,
body.page-vibrant--home .banner-supper-sale .body-text-1 {
    color: hsl(0 0% 100% / 0.9) !important;
}

body.page-vibrant--home .banner-supper-sale .code-sale {
    background: transparent !important;
    border: 1px dashed hsl(0 0% 100% / 0.45) !important;
    color: #fff !important;
    border-radius: 0 !important;
}

body.page-vibrant--home .banner-supper-sale .tf-btn.btn-fill {
    background: #fff !important;
    color: hsl(var(--khadrah-ink)) !important;
}

/* --------------------------------------------------------------------------
   Scroll reveals (homepage)
   -------------------------------------------------------------------------- */
[data-home-animate] {
    opacity: 0;
    transform: translateY(28px);
    transition:
        opacity 0.8s var(--khadrah-ease-out),
        transform 0.8s var(--khadrah-ease-out);
}

[data-home-animate].is-inview,
[data-home-animate].is-visible,
[data-home-animate].in-view {
    opacity: 1;
    transform: none;
}

.home-page-section--hero[data-home-animate] {
    opacity: 1;
    transform: none;
}

/* Stagger children in category grid */
.home-page-section--popular-categories.is-inview .khadrah-cat-card,
.home-page-section--popular-categories.is-visible .khadrah-cat-card,
.home-page-section--popular-categories.in-view .khadrah-cat-card {
    animation: khadrah-rise 0.7s var(--khadrah-ease-out) both;
}

.home-page-section--popular-categories.is-inview .featured-categories-modern__card:nth-child(1) .khadrah-cat-card { animation-delay: 0.05s; }
.home-page-section--popular-categories.is-inview .featured-categories-modern__card:nth-child(2) .khadrah-cat-card { animation-delay: 0.12s; }
.home-page-section--popular-categories.is-inview .featured-categories-modern__card:nth-child(3) .khadrah-cat-card { animation-delay: 0.19s; }
.home-page-section--popular-categories.is-inview .featured-categories-modern__card:nth-child(4) .khadrah-cat-card { animation-delay: 0.26s; }

/* --------------------------------------------------------------------------
   Product listing sidebar
   -------------------------------------------------------------------------- */
body.page-vibrant--product .product-shop .category-sidebar .widget {
    border-radius: 0 !important;
    box-shadow: none !important;
    border: 1px solid hsl(var(--khadrah-line)) !important;
}

body.page-vibrant--product .sticky-sidebar .product-details-title {
    font-family: var(--heading-font);
    letter-spacing: -0.02em;
}

/* --------------------------------------------------------------------------
   Contact CTA / Get in touch block
   -------------------------------------------------------------------------- */
.contact-cta,
.get-in-touch,
.home-contact,
section:has(.get-in-touch),
.footer-top-area + section {
    /* soft polish if present */
}

/* --------------------------------------------------------------------------
   Scroll to top
   -------------------------------------------------------------------------- */
.scrollToTop {
    border-radius: 0 !important;
    background: hsl(var(--khadrah-ink)) !important;
    transition: background 0.25s ease, transform 0.25s var(--khadrah-ease) !important;
}

.scrollToTop:hover {
    background: hsl(var(--base)) !important;
    transform: translateY(-3px);
}

/* --------------------------------------------------------------------------
   Cart float
   -------------------------------------------------------------------------- */
.cart-added-float {
    border-radius: 0 !important;
    box-shadow: 0 12px 40px hsl(var(--khadrah-ink) / 0.18) !important;
    font-family: var(--body-font);
}

.cart-added-float__icon-wrap {
    background: hsl(var(--base)) !important;
    border-radius: 0 !important;
}

/* --------------------------------------------------------------------------
   Reduced motion
   -------------------------------------------------------------------------- */
@media (prefers-reduced-motion: reduce) {
    html { scroll-behavior: auto; }

    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }

    .boutique-hero-rotator__slide.is-active .boutique-hero-slide__img {
        transform: none;
    }

    [data-home-animate] {
        opacity: 1;
        transform: none;
    }
}
