/* Khairat Al-Tabiaa B2B Premium Design System */

:root {
    /* Brand Palette */
    --kh-forest: #12382D;
    --kh-forest-deep: #0C261E;
    --kh-mid-green: #2C5545;
    --kh-gold: #C89B40;
    --kh-gold-hover: #DAB059;
    --kh-cream: #F9F6F0;
    --kh-white: #FFFFFF;
    
    /* Neutral Palette */
    --kh-ink: #1F2926;
    --kh-text: #4E5955;
    --kh-text-light: #7A8681;
    --kh-border: #DCE3E0;
    --kh-border-light: rgba(18, 56, 45, 0.08);
    
    /* Layout */
    --kh-container-max: 1200px;
    --kh-container-padding: 24px;
    
    /* Typography */
    --kh-font-sans: 'Tajawal', Tahoma, Arial, sans-serif;
    
    /* Animation */
    --kh-transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
}

/* Base Reset & Typography */
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    scroll-behavior: smooth;
}

body.khairat-page {
    background: var(--kh-white);
    color: var(--kh-text);
    font-family: var(--kh-font-sans);
    font-size: 16px;
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4, h5, h6 {
    color: var(--kh-forest);
    font-weight: 700;
    line-height: 1.3;
    margin-bottom: 0.5em;
}

a {
    color: var(--kh-forest);
    text-decoration: none;
    transition: var(--kh-transition);
}

img {
    max-width: 100%;
    height: auto;
}

/* Layout Core */
.kh-container {
    width: 100%;
    max-width: var(--kh-container-max);
    margin: 0 auto;
    padding-inline: var(--kh-container-padding);
}

.kh-section {
    padding-block: 64px;
}

.kh-section--cream {
    background-color: var(--kh-cream);
}

.kh-text-center {
    text-align: center;
}

.kh-section__head {
    margin-bottom: 40px;
}

.kh-section__head h2 {
    font-size: clamp(28px, 4vw, 42px);
    font-weight: 800;
}

.kh-section__head p {
    font-size: 18px;
    max-width: 600px;
    margin-top: 12px;
}

.kh-section__head.kh-text-center p {
    margin-inline: auto;
}

/* Typography Utilities */
.kh-kicker {
    display: inline-block;
    color: var(--kh-gold);
    font-size: 14px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 12px;
}

/* Buttons */
.kh-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 14px 28px;
    font-size: 16px;
    font-weight: 700;
    border-radius: 4px;
    cursor: pointer;
    border: 1px solid transparent;
}

.kh-btn--sm {
    padding: 10px 20px;
    font-size: 15px;
}

.kh-btn--primary {
    background: var(--kh-gold);
    color: var(--kh-white);
}

.kh-btn--primary:hover {
    background: var(--kh-gold-hover);
    color: var(--kh-white);
}

.kh-btn--ghost {
    background: transparent;
    border-color: var(--kh-forest);
    color: var(--kh-forest);
}

.kh-btn--ghost:hover {
    background: var(--kh-forest);
    color: var(--kh-white);
}

/* Topbar */
.kh-topbar {
    background: var(--kh-forest-deep);
    color: var(--kh-white);
    font-size: 13px;
    padding-block: 8px;
}

.kh-topbar__inner {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.kh-topbar__text {
    opacity: 0.9;
}

.kh-topbar__lang a {
    color: rgba(255, 255, 255, 0.6);
    font-weight: 500;
}

.kh-topbar__lang a.is-active {
    color: var(--kh-white);
    font-weight: 700;
}

.kh-topbar__lang span {
    margin-inline: 8px;
    color: rgba(255, 255, 255, 0.2);
}

/* Header */
.kh-header {
    background: var(--kh-white);
    border-bottom: 1px solid var(--kh-border-light);
    position: sticky;
    top: 0;
    z-index: 50;
}

.kh-header__inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    min-height: 80px;
}

@media (max-width: 768px) {
    .kh-header__inner {
        min-height: 64px;
    }
    .kh-brand-logo {
        max-height: 48px;
    }
}

.kh-brand {
    display: flex;
    align-items: center;
    gap: 16px;
}

.kh-brand-logo {
    max-height: 60px;
    width: auto;
}

.kh-brand-logo-footer {
    max-height: 56px;
    width: auto;
}

.kh-nav {
    display: flex;
    gap: 32px;
}

.kh-nav a {
    font-size: 15px;
    font-weight: 500;
    color: var(--kh-ink);
}

.kh-nav a:hover {
    color: var(--kh-gold);
}

.kh-menu-toggle {
    display: none;
    background: transparent;
    border: none;
    cursor: pointer;
    width: 24px;
    height: 24px;
}

.kh-menu-toggle span {
    display: block;
    width: 100%;
    height: 2px;
    background: var(--kh-forest);
    margin-block: 5px;
}

/* Hero Section */
.kh-hero {
    background: var(--kh-cream);
    padding-block: 60px 0; /* Image touches bottom */
    overflow: hidden;
}

.kh-hero__grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 60px;
    align-items: center;
}

.kh-hero__content {
    padding-block-end: 60px;
}

.kh-hero__content h1 {
    font-size: clamp(40px, 5vw, 64px);
    font-weight: 900;
    margin-bottom: 8px;
    line-height: 1.1;
}

.kh-hero__content h2 {
    font-size: clamp(24px, 3vw, 32px);
    color: var(--kh-mid-green);
    font-weight: 500;
    margin-bottom: 24px;
}

.kh-hero__lead {
    font-size: 20px;
    margin-bottom: 40px;
    max-width: 480px;
}

.kh-hero__actions {
    display: flex;
    gap: 16px;
    margin-bottom: 48px;
}

.kh-hero__signals {
    display: flex;
    gap: 24px;
}

.kh-badge {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
    font-weight: 700;
    color: var(--kh-forest);
}

.kh-badge svg {
    color: var(--kh-gold);
}

.kh-hero__media {
    height: 100%;
    min-height: 500px;
    border-start-start-radius: 24px;
    border-start-end-radius: 24px;
    overflow: hidden;
    position: relative;
    background: var(--kh-white);
    box-shadow: 0 -10px 40px rgba(18, 56, 45, 0.05);
}

/* Placeholder box */
.kh-placeholder-box {
    background: rgba(18, 56, 45, 0.03);
    border: 2px dashed rgba(18, 56, 45, 0.1);
    display: flex;
    align-items: center;
    justify-content: center;
}

.kh-placeholder-inner {
    text-align: center;
    color: var(--kh-text-light);
}

.kh-placeholder-inner svg {
    margin-bottom: 16px;
    opacity: 0.5;
}

.kh-placeholder-inner span {
    display: block;
    font-size: 14px;
    font-weight: 500;
}

/* Categories Strip */
.kh-category-strip {
    margin-inline: calc(var(--kh-container-padding) * -1);
    padding-inline: var(--kh-container-padding);
    overflow-x: auto;
    scrollbar-width: none; /* Firefox */
}
.kh-category-strip::-webkit-scrollbar {
    display: none; /* Safari and Chrome */
}

.kh-category-strip__inner {
    display: flex;
    gap: 32px;
    min-width: max-content;
    padding-block: 16px;
}

.kh-category-pill {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 16px;
    width: 140px;
}

.kh-category-pill__img {
    width: 120px;
    height: 120px;
    border-radius: 50%;
    overflow: hidden;
    background: var(--kh-white);
    border: 1px solid var(--kh-border-light);
    box-shadow: 0 4px 20px rgba(0,0,0,0.03);
    transition: var(--kh-transition);
}

.kh-category-pill:hover .kh-category-pill__img {
    border-color: var(--kh-gold);
    transform: translateY(-4px);
}

.kh-category-pill__img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.kh-category-pill__title {
    font-size: 16px;
    font-weight: 700;
    color: var(--kh-forest);
    text-align: center;
}

/* Product Grid */
.kh-product-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 24px;
}

@media (max-width: 480px) {
    .kh-product-grid {
        grid-template-columns: minmax(0, 1fr);
    }
}

.kh-product-card {
    background: var(--kh-white);
    border: 1px solid var(--kh-border-light);
    border-radius: 8px;
    overflow: hidden;
    transition: var(--kh-transition);
    display: flex;
    flex-direction: column;
}

.kh-product-card:hover {
    box-shadow: 0 12px 30px rgba(18, 56, 45, 0.06);
    transform: translateY(-4px);
    border-color: rgba(18, 56, 45, 0.15);
}

.kh-product-card__image {
    aspect-ratio: 4/3;
    display: block;
    background: var(--kh-cream);
    overflow: hidden;
    position: relative;
}

.kh-product-card__image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease, opacity 0.35s ease;
}

.kh-product-card__image-secondary {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    z-index: 1;
}

@media (hover: hover) {
    /* If secondary exists, crossfade on hover */
    .kh-product-card:hover .kh-product-card__image-primary {
        opacity: 0;
    }
    .kh-product-card:hover .kh-product-card__image-secondary {
        opacity: 1;
    }
    
    /* If only primary exists, just scale */
    .kh-product-card:hover .kh-product-card__image-primary:only-child {
        opacity: 1;
        transform: scale(1.05);
    }
}

.kh-product-card__body {
    padding: 24px;
    display: flex;
    flex-direction: column;
    flex-grow: 1;
}

.kh-eyebrow {
    font-size: 12px;
    font-weight: 700;
    color: var(--kh-gold);
    text-transform: uppercase;
    margin-bottom: 8px;
    display: block;
}

.kh-product-card h3 {
    font-size: 20px;
    margin-bottom: 12px;
}

.kh-product-card p {
    font-size: 14px;
    color: var(--kh-text-light);
    margin-bottom: 24px;
    flex-grow: 1;
}

.kh-card-link {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: 15px;
    font-weight: 700;
    color: var(--kh-forest);
}

.kh-card-link svg {
    transition: transform 0.3s ease;
}

html[dir="ltr"] .kh-product-card:hover .kh-card-link svg {
    transform: translateX(4px);
}
html[dir="rtl"] .kh-product-card:hover .kh-card-link svg {
    transform: translateX(-4px) rotate(180deg);
}
html[dir="rtl"] .kh-card-link svg {
    transform: rotate(180deg);
}


/* Why Khairat Features */
.kh-features-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 32px;
}

.kh-feature-card {
    background: var(--kh-white);
    padding: 32px;
    border-radius: 8px;
    border: 1px solid var(--kh-border-light);
}

.kh-feature-card__icon {
    width: 48px;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--kh-cream);
    color: var(--kh-gold);
    border-radius: 8px;
    margin-bottom: 24px;
}

.kh-feature-card h3 {
    font-size: 18px;
    margin-bottom: 12px;
}

.kh-feature-card p {
    font-size: 14px;
    color: var(--kh-text-light);
}

/* Timeline Process */
.kh-timeline {
    display: flex;
    justify-content: space-between;
    position: relative;
    padding-top: 40px;
}

.kh-timeline::before {
    content: '';
    position: absolute;
    top: 64px;
    inset-inline-start: 40px;
    inset-inline-end: 40px;
    height: 2px;
    background: var(--kh-cream);
    z-index: 1;
}

.kh-timeline__step {
    position: relative;
    z-index: 2;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 16px;
    width: 140px;
    text-align: center;
}

.kh-timeline__marker {
    width: 48px;
    height: 48px;
    background: var(--kh-white);
    border: 2px solid var(--kh-forest);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 800;
    color: var(--kh-forest);
    font-size: 18px;
}

.kh-timeline__step strong {
    font-size: 16px;
    color: var(--kh-forest);
}

/* Wholesale Block */
.kh-wholesale {
    padding-block: 80px;
    background: var(--kh-forest);
    color: var(--kh-white);
}

.kh-wholesale__grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 60px;
    align-items: center;
}

.kh-wholesale__content h2 {
    color: var(--kh-white);
    font-size: clamp(32px, 4vw, 48px);
}

.kh-wholesale__content p {
    font-size: 18px;
    color: rgba(255, 255, 255, 0.8);
    margin-bottom: 32px;
    max-width: 480px;
}

.kh-wholesale__image {
    border-radius: 16px;
    min-height: 320px;
    border-color: rgba(255, 255, 255, 0.1);
    background: rgba(255, 255, 255, 0.05);
}

.kh-wholesale__image .kh-placeholder-inner {
    color: rgba(255, 255, 255, 0.6);
}

/* Quality/Proof section */
.kh-proof-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 60px;
    align-items: center;
}

.kh-cert-list {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
}

.kh-cert-card {
    background: var(--kh-white);
    border: 1px solid var(--kh-border-light);
    padding: 24px;
    border-radius: 8px;
    font-weight: 700;
    color: var(--kh-forest);
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
}

/* Stats */
.kh-stats {
    background: var(--kh-forest-deep);
    padding-block: 60px;
    color: var(--kh-white);
}

.kh-stats__grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 32px;
    text-align: center;
}

.kh-stats__grid div {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 16px;
}

.kh-stats__grid svg {
    color: var(--kh-gold);
}

.kh-stats__grid span {
    font-size: 20px;
    font-weight: 700;
}

/* Footer */
.kh-footer {
    background: var(--kh-forest);
    color: var(--kh-white);
    padding-block-start: 80px;
}

.kh-footer__grid {
    display: grid;
    grid-template-columns: 2fr 1fr 1.5fr;
    gap: 60px;
    margin-bottom: 60px;
}

.kh-footer__brand-col p {
    margin-top: 24px;
    color: rgba(255, 255, 255, 0.7);
    max-width: 360px;
}

.kh-brand--footer .kh-brand__text strong {
    color: var(--kh-white);
}
.kh-brand--footer .kh-brand__text small {
    color: rgba(255, 255, 255, 0.6);
}

.kh-footer h3 {
    color: var(--kh-white);
    font-size: 18px;
    margin-bottom: 24px;
}

.kh-footer__links-col a {
    display: block;
    color: rgba(255, 255, 255, 0.7);
    margin-bottom: 12px;
}

.kh-footer__links-col a:hover {
    color: var(--kh-gold);
}

.kh-contact-note {
    color: rgba(255, 255, 255, 0.7);
    margin-bottom: 24px;
    font-size: 15px;
}

.kh-footer__bottom {
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    padding-block: 24px;
}

.kh-footer__bottom-inner {
    display: flex;
    justify-content: space-between;
    align-items: center;
    color: rgba(255, 255, 255, 0.6);
    font-size: 14px;
}

.kh-footer__legal {
    display: flex;
    gap: 24px;
}

.kh-footer__legal a {
    color: rgba(255, 255, 255, 0.6);
}

/* Utilities */
.kh-data-note {
    background: #FFF3CD;
    color: #856404;
    padding: 16px;
    border-radius: 4px;
    margin-block: 24px;
    text-align: center;
    font-weight: 500;
}
.kh-empty {
    grid-column: 1 / -1;
    text-align: center;
    padding: 40px;
    background: var(--kh-cream);
    border-radius: 8px;
    color: var(--kh-text-light);
}

/* Responsive */
@media (max-width: 1024px) {
    .kh-hero__grid,
    .kh-wholesale__grid,
    .kh-proof-grid {
        grid-template-columns: 1fr;
        gap: 40px;
    }
    
    .kh-hero__media {
        min-height: 400px;
        border-radius: 24px;
    }
    
    .kh-hero {
        padding-block-end: 60px;
    }

    .kh-features-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .kh-footer__grid {
        grid-template-columns: 1fr 1fr;
    }
}

@media (max-width: 768px) {
    .kh-header__inner {
        min-height: 64px;
    }
    
    .kh-menu-toggle {
        display: block;
    }
    
    .kh-nav {
        display: none;
        position: absolute;
        top: 100%;
        inset-inline-start: 0;
        inset-inline-end: 0;
        background: var(--kh-white);
        flex-direction: column;
        padding: 24px;
        gap: 16px;
        box-shadow: 0 10px 20px rgba(0,0,0,0.05);
    }
    
    .kh-nav.is-open {
        display: flex;
    }
    
    .kh-header__actions {
        display: none;
    }
    
    .kh-brand-logo {
        max-height: 48px;
    }
    
    /* Layout tightening for mobile */
    .kh-section {
        padding-block: 48px;
    }
    
    .kh-section__head {
        margin-bottom: 32px;
    }

    /* Topbar */
    .kh-topbar__inner {
        flex-direction: column;
        align-items: flex-start;
        gap: 32px;
        padding-top: 0;
    }
    
    .kh-timeline {
        flex-direction: column;
        align-items: flex-start;
        gap: 32px;
        padding-top: 0;
    }
    
    .kh-timeline::before {
        top: 0;
        bottom: 0;
        inset-inline-start: 24px;
        height: auto;
        width: 2px;
    }
    html[dir="rtl"] .kh-timeline::before {
        inset-inline-end: 24px;
        inset-inline-start: auto;
    }
    
    .kh-timeline__step {
        flex-direction: row;
        width: 100%;
        text-align: start;
    }
    
    .kh-stats__grid {
        grid-template-columns: 1fr;
    }
    
    .kh-footer {
        padding-block-start: 48px;
    }
    .kh-footer__grid {
        grid-template-columns: 1fr;
        gap: 24px;
    }
    
    .kh-footer__bottom-inner {
        flex-direction: column;
        gap: 16px;
        text-align: center;
    }
}

@media (max-width: 575px) {
    .kh-hero__actions {
        flex-direction: column;
    }
    
    .kh-hero__signals {
        flex-direction: column;
        gap: 12px;
    }
    
    .kh-features-grid {
        grid-template-columns: 1fr;
    }
    
    .kh-cert-list {
        grid-template-columns: 1fr;
    }
    
    .kh-brand__text small {
        display: none;
    }
}

/* Product Details Page */
.kh-breadcrumbs {
    padding-block: 24px;
    background: var(--kh-cream);
    border-bottom: 1px solid var(--kh-border-light);
}

.kh-breadcrumbs__list {
    list-style: none;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
    font-size: 14px;
    color: var(--kh-text-light);
}

.kh-breadcrumbs__list li {
    display: flex;
    align-items: center;
    gap: 8px;
}

.kh-breadcrumbs__list li:not(:last-child)::after {
    content: '>';
    opacity: 0.5;
}
html[dir="rtl"] .kh-breadcrumbs__list li:not(:last-child)::after {
    content: '<';
}

.kh-breadcrumbs__list a {
    color: var(--kh-text);
}

.kh-breadcrumbs__list a:hover {
    color: var(--kh-forest);
}

.kh-breadcrumbs__list span {
    color: var(--kh-forest);
    font-weight: 700;
}

.kh-product-details {
    padding-block: 64px;
}

.kh-product-details__grid {
    display: grid;
    grid-template-columns: 48% 52%;
    gap: 40px;
    align-items: start;
}

/* ============================================================
   PRODUCT GALLERY v3 — CSS Grid stacking, works in all browsers
   ============================================================ */
.kh-product-gallery-wrapper {
    width: 100%;
}

/* ── Main viewer ── */
.kh-gallery__main {
    position: relative;
    width: 100%;
    background: #f5f2ea;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 2px 20px rgba(18, 56, 45, 0.08);
    /* Grid stacking: all children share the same cell */
    display: grid;
    grid-template-rows: 1fr;
}

/* Grid stacking container that enforces aspect ratio */
.kh-gallery__main::before {
    content: '';
    display: block;
    grid-area: 1 / 1;
    padding-top: 75%; /* 4:3 ratio */
    pointer-events: none;
}

/* All slides share the same grid cell → stacked on top of each other */
.kh-gallery__slide {
    grid-area: 1 / 1;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s ease;
    pointer-events: none;
    z-index: 1;
}

.kh-gallery__slide.is-active {
    opacity: 1;
    pointer-events: auto;
    z-index: 2;
}

@media (prefers-reduced-motion: reduce) {
    .kh-gallery__slide { transition: none; }
}

.kh-gallery__slide img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    display: block;
    padding: 16px;
    box-sizing: border-box;
}

/* ── Arrows ── */
.kh-gallery__arrow {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    z-index: 10;
    width: 38px;
    height: 38px;
    border-radius: 50%;
    border: none;
    background: rgba(18, 56, 45, 0.45);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    opacity: 0;
    transition: opacity 0.3s ease, background 0.2s ease;
    flex-shrink: 0;
    line-height: 1;
}

.kh-gallery__main:hover .kh-gallery__arrow { opacity: 1; }
.kh-gallery__arrow:hover { background: rgba(18, 56, 45, 0.85); }

.kh-gallery__arrow--prev { inset-inline-start: 12px; }
.kh-gallery__arrow--next { inset-inline-end: 12px; }

/* ── Dot indicators ── */
.kh-gallery__dots {
    position: absolute;
    bottom: 10px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 8px;
    z-index: 10;
}

.kh-gallery__dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    border: none;
    background: rgba(255, 255, 255, 0.5);
    cursor: pointer;
    padding: 0;
    transition: all 0.25s ease;
}

.kh-gallery__dot.is-active {
    background: #fff;
    transform: scale(1.35);
}

/* ── Thumbnail strip ── */
.kh-gallery__thumbs {
    display: flex;
    gap: 10px;
    margin-top: 12px;
    overflow-x: auto;
    padding-bottom: 4px;
    scrollbar-width: none;
    -ms-overflow-style: none;
}

.kh-gallery__thumbs::-webkit-scrollbar { display: none; }

.kh-gallery__thumb {
    flex-shrink: 0;
    width: 76px;
    height: 76px;
    border-radius: 8px;
    overflow: hidden;
    border: 2px solid #e8e1d0;
    padding: 0;
    background: #f5f2ea;
    cursor: pointer;
    opacity: 0.6;
    transition: opacity 0.25s ease, border-color 0.25s ease, transform 0.25s ease;
}

.kh-gallery__thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.kh-gallery__thumb:hover { opacity: 0.85; }

.kh-gallery__thumb.is-active {
    opacity: 1;
    border-color: #b8942e;
    transform: translateY(-3px);
    box-shadow: 0 4px 14px rgba(18, 56, 45, 0.18);
}

/* ── Mobile header ── */
.kh-product-mobile-header { margin-bottom: 20px; }
.kh-product-mobile-header h1 { font-size: 26px; margin-top: 8px; }

/* ── Responsive ── */
@media (max-width: 1024px) {
    .kh-product-details__grid {
        grid-template-columns: 1fr;
        gap: 32px;
    }
}

@media (max-width: 767px) {
    .kh-gallery__arrow { display: none !important; }
    .kh-gallery__thumbs { justify-content: flex-start; }

    /* Mobile: horizontal swipe strip for the slides */
    .kh-gallery__main {
        display: block;         /* override grid */
        overflow-x: auto;
        scroll-snap-type: x mandatory;
        scroll-behavior: smooth;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: none;
    }
    .kh-gallery__main::-webkit-scrollbar { display: none; }
    .kh-gallery__main::before { display: none; } /* remove pseudo height */

    .kh-gallery__slide {
        display: inline-flex;   /* horizontal row */
        width: 100%;
        min-width: 100%;
        scroll-snap-align: start;
        opacity: 1 !important;  /* all slides visible for swipe */
        pointer-events: auto;
        vertical-align: top;
        aspect-ratio: 4 / 3;
    }
}

/* ============================================================ */

.kh-product-info h1 {
    font-size: clamp(32px, 4vw, 42px);
    font-weight: 800;
    margin-bottom: 16px;
}

.kh-product-meta {
    margin-bottom: 32px;
}

.kh-product-meta .kh-eyebrow {
    font-size: 14px;
    display: inline-block;
}

.kh-product-desc {
    font-size: 16px;
    color: var(--kh-text);
    margin-bottom: 40px;
    line-height: 1.8;
}

.kh-b2b-specs {
    background: var(--kh-cream);
    border-radius: 8px;
    padding: 24px;
    margin-bottom: 40px;
    border: 1px solid var(--kh-border-light);
}

.kh-b2b-specs__item {
    display: flex;
    align-items: flex-start;
    gap: 16px;
    margin-bottom: 16px;
}
.kh-b2b-specs__item:last-child {
    margin-bottom: 0;
}

.kh-b2b-specs__icon {
    color: var(--kh-gold);
    flex-shrink: 0;
    margin-top: 4px;
}

.kh-b2b-specs__content h4 {
    font-size: 15px;
    margin-bottom: 4px;
    color: var(--kh-forest);
}

.kh-b2b-specs__content p {
    font-size: 14px;
    color: var(--kh-text);
}

.kh-product-actions {
    display: flex;
    gap: 16px;
    flex-wrap: wrap;
}

.kh-btn--whatsapp {
    background: #25D366;
    color: white;
}
.kh-btn--whatsapp:hover {
    background: #128C7E;
    color: white;
}

@media (max-width: 768px) {
    .kh-product-details__grid {
        grid-template-columns: minmax(0, 1fr);
        gap: 40px;
    }
    
    .kh-product-actions {
        flex-direction: column;
    }
    
    .kh-product-actions .kh-btn {
        width: 100%;
    }
}

/* Catalog specific overrides */
.kh-product-card h3 {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

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

/* ================================================
   EGYPTIAN ROOTS TRUST SECTION
   ================================================ */

.kh-egypt-roots {
    border-top: 1px solid var(--kh-border-light);
    border-bottom: 1px solid var(--kh-border-light);
}

.kh-trust-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
}

.kh-trust-card {
    background: var(--kh-white);
    border: 1px solid var(--kh-border);
    border-radius: 14px;
    padding: 28px 24px;
    transition: box-shadow 0.25s ease, transform 0.25s ease, border-color 0.25s ease;
}

.kh-trust-card:hover {
    box-shadow: 0 8px 28px rgba(18, 56, 45, 0.1);
    transform: translateY(-3px);
    border-color: var(--kh-gold);
}

.kh-trust-card__icon {
    width: 44px;
    height: 44px;
    background: linear-gradient(135deg, rgba(200, 155, 64, 0.12), rgba(18, 56, 45, 0.08));
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--kh-forest);
    margin-bottom: 16px;
}

.kh-trust-card h3 {
    font-size: 1.05rem;
    font-weight: 700;
    color: var(--kh-forest);
    margin-bottom: 8px;
    line-height: 1.3;
}

.kh-trust-card p {
    font-size: 0.92rem;
    color: var(--kh-text-light);
    line-height: 1.6;
    margin: 0;
}

@media (max-width: 900px) {
    .kh-trust-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 600px) {
    .kh-trust-grid {
        grid-template-columns: 1fr;
    }
    .kh-egypt-roots {
        padding-top: 40px;
        padding-bottom: 40px;
    }
}

/* ================================================
   FLOATING WHATSAPP BUTTON (Khairat-only)
   ================================================ */

.kh-wa-float {
    position: fixed;
    bottom: 20px;
    inset-inline-end: 20px;
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 56px;
    height: 56px;
    border-radius: 50%;
    background-color: #25D366;
    color: #fff;
    text-decoration: none;
    box-shadow: 0 4px 16px rgba(37, 211, 102, 0.45);
    transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.kh-wa-float:hover {
    transform: scale(1.1);
    box-shadow: 0 6px 22px rgba(37, 211, 102, 0.6);
    color: #fff;
}

.kh-wa-float svg {
    display: block;
    flex-shrink: 0;
}

@media (max-width: 600px) {
    .kh-wa-float {
        width: 50px;
        height: 50px;
        bottom: calc(24px + env(safe-area-inset-bottom));
        inset-inline-end: 16px;
    }
}

/* ════════════════════════════════════════════════════════════
   PHASE 3.0 — HOMEPAGE VISUAL RE-ARCHITECTURE
   ════════════════════════════════════════════════════════════ */

/* ── HEADER POLISH ───────────────────────────────────────── */

.kh-header__inner {
    min-height: 72px; /* slightly more compact than 80px */
}

.kh-header__actions .kh-btn--primary {
    background: var(--kh-gold);
    color: var(--kh-white);
    font-weight: 700;
    letter-spacing: 0.02em;
}

/* ── HERO EDITORIAL ──────────────────────────────────────── */

.kh-hero {
    background: var(--kh-cream);
    padding-block: 72px 0;
    overflow: hidden;
    position: relative;
}

.kh-hero__botanical {
    position: absolute;
    inset-inline-end: 0;
    top: 0;
    width: 60%;
    height: 100%;
    pointer-events: none;
    opacity: 1;
    z-index: 0;
}

.kh-hero__botanical svg {
    width: 100%;
    height: 100%;
}

.kh-hero__layout {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 48px;
    align-items: center;
    position: relative;
    z-index: 1;
}

.kh-hero__content {
    padding-block-end: 72px;
}

.kh-hero__kicker {
    display: inline-block;
    font-size: 13px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    color: var(--kh-gold);
    margin-bottom: 20px;
    border-bottom: 2px solid var(--kh-gold);
    padding-bottom: 6px;
}

.kh-hero__h1 {
    font-size: clamp(32px, 4.5vw, 58px);
    font-weight: 900;
    color: var(--kh-forest);
    line-height: 1.12;
    margin-bottom: 24px;
    letter-spacing: -0.01em;
}

.kh-hero__lead {
    font-size: clamp(16px, 1.5vw, 19px);
    color: var(--kh-text);
    max-width: 500px;
    line-height: 1.75;
    margin-bottom: 40px;
}

.kh-hero__actions {
    display: flex;
    gap: 16px;
    margin-bottom: 40px;
    flex-wrap: wrap;
}

/* Trust Strip */
.kh-hero__trust-strip {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 12px;
    padding-top: 24px;
    border-top: 1px solid var(--kh-border-light);
}

.kh-trust-pill {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
    font-weight: 600;
    color: var(--kh-text);
}

.kh-trust-pill__dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--kh-gold);
    flex-shrink: 0;
}

.kh-trust-sep {
    color: var(--kh-border);
    font-size: 18px;
    line-height: 1;
}

/* Hero Image — editorial, no box/card feel */
.kh-hero__image-wrap {
    height: 100%;
    display: flex;
    align-items: flex-end;
}

.kh-hero__image-frame {
    position: relative;
    width: 100%;
    border-top-start-radius: 20px;
    border-top-end-radius: 20px;
    overflow: hidden;
    min-height: 480px;
    background: var(--kh-forest-deep);
    box-shadow: 0 -8px 40px rgba(18,56,45,0.08), 0 0 0 1px rgba(18,56,45,0.06);
}

.kh-hero__image-frame img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

/* Image badge overlay */
.kh-hero__image-badge {
    position: absolute;
    bottom: 20px;
    inset-inline-start: 20px;
    display: flex;
    align-items: center;
    gap: 8px;
    background: rgba(12, 38, 30, 0.85);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    border: 1px solid rgba(200,155,64,0.25);
    border-radius: 999px;
    padding: 8px 16px;
    color: var(--kh-white);
    font-size: 13px;
    font-weight: 600;
}

/* ── CATEGORY TILES ──────────────────────────────────────── */

.kh-cat-section {
    padding-block: 80px;
}

/* 3+2 editorial grid */
.kh-cat-tiles {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    grid-template-rows: auto;
    gap: 20px;
    margin-top: 0;
}

/* Tiles 4 and 5 (index 3 & 4) span and center in bottom row */
.kh-cat-tile--wide {
    /* handled by nth-child positional trick */
}

/* Bottom two tiles centered using auto columns */
.kh-cat-tiles .kh-cat-tile:nth-child(4) {
    grid-column: 1 / 2;
    margin-inline-start: 16.67%; /* shift right to visually center 2 of 3 */
}

.kh-cat-tiles .kh-cat-tile:nth-child(5) {
    grid-column: 2 / 3;
    margin-inline-start: 16.67%;
}

.kh-cat-tile {
    position: relative;
    display: block;
    border-radius: 16px;
    overflow: hidden;
    aspect-ratio: 3/4;
    text-decoration: none;
    background: var(--kh-forest-deep);
}

.kh-cat-tile img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.55s cubic-bezier(0.25, 0.8, 0.25, 1);
    display: block;
}

.kh-cat-tile:hover img {
    transform: scale(1.07);
}

.kh-cat-tile__overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, rgba(12,38,30,0.85) 0%, rgba(12,38,30,0.2) 50%, transparent 100%);
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    padding: 24px;
    transition: background 0.35s ease;
}

.kh-cat-tile:hover .kh-cat-tile__overlay {
    background: linear-gradient(to top, rgba(12,38,30,0.92) 0%, rgba(12,38,30,0.35) 55%, transparent 100%);
}

.kh-cat-tile__name {
    display: block;
    color: var(--kh-white);
    font-size: 18px;
    font-weight: 800;
    margin-bottom: 8px;
    line-height: 1.2;
}

.kh-cat-tile__cta {
    display: flex;
    align-items: center;
    gap: 6px;
    color: var(--kh-gold);
    font-size: 13px;
    font-weight: 700;
    opacity: 0;
    transform: translateY(6px);
    transition: opacity 0.3s ease, transform 0.3s ease;
}

html[dir="rtl"] .kh-cat-tile__cta svg {
    transform: rotate(180deg);
}

.kh-cat-tile:hover .kh-cat-tile__cta {
    opacity: 1;
    transform: translateY(0);
}

@media (max-width: 900px) {
    .kh-cat-tiles {
        grid-template-columns: repeat(2, 1fr);
    }
    .kh-cat-tiles .kh-cat-tile:nth-child(4),
    .kh-cat-tiles .kh-cat-tile:nth-child(5) {
        grid-column: auto;
        margin-inline-start: 0;
    }
}

@media (max-width: 480px) {
    .kh-cat-tile__cta {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ── 3 EDITORIAL FEATURE PANELS ─────────────────────────── */

.kh-editorial {
    padding-block: 80px;
}

.kh-editorial__panels {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 28px;
    margin-top: 8px;
}

.kh-editorial__panel {
    background: var(--kh-white);
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 2px 16px rgba(18,56,45,0.06);
    border: 1px solid var(--kh-border-light);
    transition: box-shadow 0.3s ease, transform 0.3s ease;
}

.kh-editorial__panel:hover {
    box-shadow: 0 8px 36px rgba(18,56,45,0.1);
    transform: translateY(-4px);
}

.kh-editorial__panel-img {
    position: relative;
    aspect-ratio: 4/3;
    overflow: hidden;
    background: var(--kh-forest-deep);
}

.kh-editorial__panel-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.55s ease;
}

.kh-editorial__panel:hover .kh-editorial__panel-img img {
    transform: scale(1.05);
}

.kh-editorial__panel-num {
    position: absolute;
    top: 16px;
    inset-inline-start: 16px;
    font-size: 13px;
    font-weight: 800;
    letter-spacing: 0.1em;
    color: var(--kh-gold);
    background: rgba(12,38,30,0.7);
    backdrop-filter: blur(6px);
    border-radius: 999px;
    padding: 4px 12px;
}

.kh-editorial__panel-body {
    padding: 28px;
}

.kh-editorial__accent {
    width: 36px;
    height: 3px;
    background: var(--kh-gold);
    border-radius: 99px;
    margin-bottom: 16px;
}

.kh-editorial__panel-body h3 {
    font-size: clamp(17px, 1.8vw, 20px);
    font-weight: 800;
    color: var(--kh-forest);
    margin-bottom: 12px;
}

.kh-editorial__panel-body p {
    font-size: 14px;
    color: var(--kh-text-light);
    line-height: 1.7;
}

@media (max-width: 900px) {
    .kh-editorial__panels {
        grid-template-columns: 1fr;
        gap: 20px;
    }

    .kh-editorial__panel-img {
        aspect-ratio: 16/7;
    }
}

/* ── PROCESS — FROM FARM TO SHIPPING ────────────────────── */

.kh-process-section {
    background: var(--kh-white);
}

.kh-process {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    position: relative;
    padding-top: 32px;
    gap: 8px;
}

/* Gold connector line */
.kh-process__track {
    position: absolute;
    top: 56px; /* center of marker */
    inset-inline-start: 48px;
    inset-inline-end: 48px;
    height: 2px;
    background: linear-gradient(to inline-end, var(--kh-gold), rgba(200,155,64,0.3));
    z-index: 1;
}

/* Fallback for logical property in older browsers */
.kh-process__track {
    background: linear-gradient(90deg, var(--kh-gold) 0%, rgba(200,155,64,0.3) 100%);
}

html[dir="rtl"] .kh-process__track {
    background: linear-gradient(270deg, var(--kh-gold) 0%, rgba(200,155,64,0.3) 100%);
}

.kh-process__step {
    position: relative;
    z-index: 2;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 14px;
    flex: 1;
    text-align: center;
    min-width: 80px;
}

.kh-process__marker {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: var(--kh-forest);
    color: var(--kh-gold);
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 16px rgba(18,56,45,0.2);
    flex-shrink: 0;
}

.kh-process__num {
    font-size: 11px;
    font-weight: 800;
    letter-spacing: 0.08em;
    color: var(--kh-gold);
    opacity: 0.7;
}

.kh-process__label {
    font-size: clamp(13px, 1.1vw, 15px);
    font-weight: 700;
    color: var(--kh-forest);
    max-width: 120px;
    line-height: 1.35;
    margin: 0;
}

/* Mobile: vertical stack */
@media (max-width: 768px) {
    .kh-process {
        flex-direction: column;
        align-items: flex-start;
        gap: 0;
        padding-top: 0;
    }

    .kh-process__track {
        top: 0;
        bottom: 0;
        inset-inline-start: 30px;
        inset-inline-end: auto;
        width: 2px;
        height: auto;
        background: linear-gradient(180deg, var(--kh-gold) 0%, rgba(200,155,64,0.3) 100%);
    }

    .kh-process__step {
        flex-direction: row;
        text-align: start;
        width: 100%;
        padding-block: 20px;
    }

    .kh-process__num {
        display: none;
    }

    .kh-process__label {
        max-width: none;
    }

    .kh-process__marker {
        width: 52px;
        height: 52px;
        flex-shrink: 0;
    }
}

/* ── EGYPTIAN ROOTS — STORY BLOCK + CAPS ────────────────── */

.kh-roots {
    border-top: 1px solid var(--kh-border-light);
    border-bottom: 1px solid var(--kh-border-light);
    padding-block: 80px;
}

.kh-roots__layout {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 80px;
    align-items: center;
}

/* Egypt Badge */
.kh-egypt-badge {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    background: var(--kh-white);
    border: 1px solid var(--kh-border);
    border-radius: 999px;
    padding: 6px 16px 6px 8px;
    margin-bottom: 28px;
}

.kh-egypt-badge__flag {
    display: inline-flex;
    width: 26px;
    height: 26px;
    border-radius: 50%;
    overflow: hidden;
    flex-direction: column;
    flex-shrink: 0;
    border: 1px solid rgba(0,0,0,0.08);
}

.kh-egypt-badge__flag span {
    display: block;
    flex: 1;
}

.kh-egypt-badge > span:last-child {
    font-size: 0.82rem;
    font-weight: 700;
    color: var(--kh-forest);
    letter-spacing: 0.04em;
}

.kh-roots__heading {
    font-size: clamp(26px, 3vw, 38px);
    font-weight: 900;
    color: var(--kh-forest);
    margin-bottom: 16px;
    line-height: 1.25;
}

.kh-roots__meta {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 13px;
    font-weight: 600;
    color: var(--kh-gold);
    margin-bottom: 20px;
}

.kh-roots__meta-sep {
    color: var(--kh-border);
}

.kh-roots__body {
    font-size: 16px;
    color: var(--kh-text);
    line-height: 1.8;
    max-width: 520px;
    margin-bottom: 32px;
}

.kh-roots__cta {
    border: 1.5px solid var(--kh-forest);
    color: var(--kh-forest);
    background: transparent;
    font-weight: 700;
}

.kh-roots__cta:hover {
    background: var(--kh-forest);
    color: var(--kh-white);
}

/* Capability grid */
.kh-roots__caps {
    background: var(--kh-white);
    border-radius: 20px;
    padding: 40px;
    border: 1px solid var(--kh-border-light);
    box-shadow: 0 4px 24px rgba(18,56,45,0.06);
}

.kh-roots__cap-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 24px;
}

.kh-cap-item {
    display: flex;
    align-items: flex-start;
    gap: 14px;
    padding: 20px;
    background: var(--kh-cream);
    border-radius: 12px;
    border: 1px solid transparent;
    transition: border-color 0.25s ease, box-shadow 0.25s ease;
}

.kh-cap-item:hover {
    border-color: rgba(200,155,64,0.3);
    box-shadow: 0 4px 16px rgba(18,56,45,0.08);
}

.kh-cap-item__icon {
    width: 40px;
    height: 40px;
    border-radius: 10px;
    background: var(--kh-white);
    color: var(--kh-forest);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    border: 1px solid var(--kh-border-light);
}

.kh-cap-item div:not(.kh-cap-item__icon) {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.kh-cap-item strong {
    font-size: 14px;
    font-weight: 800;
    color: var(--kh-forest);
    display: block;
}

.kh-cap-item span {
    font-size: 12px;
    color: var(--kh-text-light);
}

@media (max-width: 900px) {
    .kh-roots__layout {
        grid-template-columns: 1fr;
        gap: 40px;
    }

    .kh-roots__body {
        max-width: 100%;
    }

    .kh-roots__caps {
        padding: 24px;
    }
}

@media (max-width: 500px) {
    .kh-roots__cap-grid {
        grid-template-columns: 1fr;
    }

    .kh-roots__caps {
        padding: 20px;
    }
}

/* ── EXPORT CINEMATIC BANNER ─────────────────────────────── */

.kh-cinematic {
    position: relative;
    padding-block: 0;
    min-height: 560px;
    display: flex;
    align-items: stretch;
    overflow: hidden;
}

/* Background image via CSS custom property */
.kh-cinematic::before {
    content: '';
    position: absolute;
    inset: 0;
    background-image: var(--kh-export-bg);
    background-size: cover;
    background-position: center;
    z-index: 0;
}

.kh-cinematic__overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(
        105deg,
        rgba(12,38,30,0.96) 0%,
        rgba(12,38,30,0.88) 45%,
        rgba(12,38,30,0.50) 75%,
        rgba(12,38,30,0.30) 100%
    );
    z-index: 1;
}

html[dir="rtl"] .kh-cinematic__overlay {
    background: linear-gradient(
        255deg,
        rgba(12,38,30,0.96) 0%,
        rgba(12,38,30,0.88) 45%,
        rgba(12,38,30,0.50) 75%,
        rgba(12,38,30,0.30) 100%
    );
}

.kh-cinematic__layout {
    position: relative;
    z-index: 2;
    display: flex;
    align-items: center;
    padding-block: 96px;
}

.kh-cinematic__content {
    max-width: 620px;
}

.kh-cinematic__kicker {
    display: inline-block;
    font-size: 12px;
    font-weight: 800;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: var(--kh-gold);
    margin-bottom: 20px;
    border-bottom: 2px solid rgba(200,155,64,0.4);
    padding-bottom: 6px;
}

.kh-cinematic__heading {
    font-size: clamp(30px, 4vw, 52px);
    font-weight: 900;
    color: var(--kh-white);
    line-height: 1.12;
    margin-bottom: 20px;
    letter-spacing: -0.01em;
}

.kh-cinematic__body {
    font-size: clamp(15px, 1.4vw, 18px);
    color: rgba(255,255,255,0.82);
    line-height: 1.75;
    margin-bottom: 40px;
    max-width: 540px;
}

.kh-cinematic__actions {
    display: flex;
    gap: 16px;
    flex-wrap: wrap;
    align-items: center;
}

.kh-btn--gold {
    background: var(--kh-gold);
    color: var(--kh-white);
    font-weight: 700;
}

.kh-btn--gold:hover {
    background: var(--kh-gold-hover);
    color: var(--kh-white);
}

.kh-btn--ghost-white {
    background: transparent;
    border: 1.5px solid rgba(255,255,255,0.4);
    color: var(--kh-white);
    display: inline-flex;
    align-items: center;
    gap: 10px;
    font-weight: 600;
}

.kh-btn--ghost-white:hover {
    background: rgba(255,255,255,0.1);
    border-color: rgba(255,255,255,0.7);
    color: var(--kh-white);
}

@media (max-width: 768px) {
    .kh-cinematic {
        min-height: auto;
    }

    .kh-cinematic__layout {
        padding-block: 72px;
    }

    .kh-cinematic__actions {
        flex-direction: column;
    }

    .kh-cinematic__actions .kh-btn {
        width: 100%;
        justify-content: center;
    }
}

/* ── QUALITY SECTION — COMPACT ───────────────────────────── */

.kh-quality-section {
    padding-block: 64px;
}

.kh-quality__layout {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 60px;
    align-items: center;
}

.kh-quality__content h2 {
    font-size: clamp(24px, 3vw, 36px);
    margin-bottom: 16px;
}

.kh-quality__content p {
    color: var(--kh-text);
    line-height: 1.75;
    margin-bottom: 8px;
}

.kh-quality__content .kh-btn--outline {
    border: 1.5px solid var(--kh-forest);
    color: var(--kh-forest);
    background: transparent;
    font-weight: 700;
}

.kh-quality__content .kh-btn--outline:hover {
    background: var(--kh-forest);
    color: var(--kh-white);
}

.kh-quality__caps {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
}

.kh-quality__cap {
    display: flex;
    align-items: center;
    gap: 12px;
    background: var(--kh-white);
    border: 1px solid var(--kh-border-light);
    border-radius: 10px;
    padding: 16px 20px;
    font-weight: 700;
    font-size: 14px;
    color: var(--kh-forest);
    transition: border-color 0.25s, box-shadow 0.25s;
}

.kh-quality__cap svg {
    color: var(--kh-gold);
    flex-shrink: 0;
}

.kh-quality__cap:hover {
    border-color: rgba(200,155,64,0.3);
    box-shadow: 0 4px 12px rgba(18,56,45,0.07);
}

@media (max-width: 900px) {
    .kh-quality__layout {
        grid-template-columns: 1fr;
        gap: 36px;
    }
}

@media (max-width: 500px) {
    .kh-quality__caps {
        grid-template-columns: 1fr;
    }
}

/* ── HERO RESPONSIVE OVERRIDES ───────────────────────────── */

@media (max-width: 1024px) {
    .kh-hero__layout {
        grid-template-columns: 1fr;
        gap: 40px;
    }

    .kh-hero__content {
        padding-block-end: 0;
    }

    .kh-hero__image-wrap {
        /* order removed to allow natural DOM flow (text before image) */
    }

    .kh-hero__image-frame {
        height: clamp(280px, 45vh, 400px);
        min-height: auto;
        border-radius: 16px;
        overflow: hidden;
    }
    
    .kh-hero__image-frame img {
        height: 100%;
        object-fit: cover;
        object-position: center;
    }

    .kh-hero {
        padding-block: 48px;
    }
}

@media (max-width: 575px) {
    .kh-hero__actions {
        flex-direction: column;
    }

    .kh-hero__actions .kh-btn {
        width: 100%;
        justify-content: center;
    }

    .kh-hero__trust-strip {
        gap: 8px;
    }

    .kh-trust-sep {
        display: none;
    }

    .kh-hero__trust-strip {
        flex-direction: column;
        align-items: flex-start;
    }
}

/* ── REMOVE OLD kh-stats SECTION ────────────────────────── */

/* The .kh-stats section is removed from home.blade.php;
   CSS kept for any future use but effectively unused on homepage. */

/* ── FOOTER POLISH ───────────────────────────────────────── */

.kh-footer__brand-col .kh-footer__address {
    font-size: 13px;
    color: rgba(255,255,255,0.55);
    margin-top: 8px;
    line-height: 1.6;
}

/* ── WHATSAPP FLOAT TOOLTIP ──────────────────────────────── */
/* NOTE: .kh-wa-float remains position:fixed (set in the original block above).
   A fixed element creates its own stacking context, so ::after { position:absolute }
   is positioned relative to the fixed button — no position:relative override needed. */

.kh-wa-float::after {
    content: attr(data-tooltip);
    position: absolute;
    inset-inline-end: calc(100% + 12px);
    top: 50%;
    transform: translateY(-50%);
    background: rgba(12,38,30,0.92);
    color: var(--kh-white);
    font-size: 12px;
    font-weight: 600;
    white-space: nowrap;
    padding: 6px 12px;
    border-radius: 6px;
    pointer-events: none;
    opacity: 0;
    transition: opacity 0.25s ease;
}

.kh-wa-float:hover::after {
    opacity: 1;
}

@media (max-width: 768px) {
    .kh-wa-float::after {
        display: none;
    }
}

/* ── END PHASE 3.0 ───────────────────────────────────────── */

/* ════════════════════════════════════════════════════════════
   PHASE 3.0.2 — MOBILE DENSITY & FINAL ART POLISH
   ════════════════════════════════════════════════════════════ */

@media (max-width: 768px) {
    /* 1. Header Compaction */
    .kh-header__inner {
        min-height: 60px;
    }
    .kh-brand-logo {
        max-width: 200px;
        max-height: 44px;
    }

    /* 2. Hero Density */
    .kh-hero {
        padding-block: 40px 0;
    }
    .kh-hero__h1 {
        font-size: clamp(28px, 6.5vw, 36px);
        margin-bottom: 16px;
    }
    .kh-hero__lead {
        line-height: 1.6;
        margin-bottom: 32px;
        font-size: 15px;
    }
    .kh-hero__actions {
        margin-bottom: 32px;
    }
    .kh-hero__trust-strip {
        padding-top: 16px;
    }

    /* 3. Featured Products Mobile Swipe */
    #products .kh-product-grid {
        display: flex;
        flex-wrap: nowrap;
        overflow-x: auto;
        scroll-snap-type: x mandatory;
        -webkit-overflow-scrolling: touch;
        gap: 16px;
        padding-bottom: 16px;
        margin-inline: -24px;
        padding-inline: 24px;
        scrollbar-width: none; /* Firefox */
        -ms-overflow-style: none;  /* IE */
    }
    
    #products .kh-product-grid::-webkit-scrollbar {
        display: none; /* Chrome, Safari */
    }

    #products .kh-product-card {
        flex: 0 0 85vw;
        scroll-snap-align: start;
        min-width: 260px;
    }

    /* 4. Editorial Panels Mobile Compaction */
    .kh-editorial {
        padding-block: 48px;
    }
    .kh-editorial__panels {
        gap: 16px;
    }
    .kh-editorial__panel-img {
        aspect-ratio: 16 / 9;
    }
    .kh-editorial__panel-body {
        padding: 20px;
    }
    .kh-editorial__panel-body h3 {
        font-size: 20px;
        margin-bottom: 8px;
    }
    .kh-editorial__panel-body p {
        font-size: 15px;
        line-height: 1.6;
    }
    .kh-editorial__accent {
        margin-bottom: 12px;
    }

    /* 5. Farm to Shipping - Mobile gap reduction */
    .kh-process__step {
        padding-block: 16px;
    }
    
    /* 6. Egyptian Roots Mobile Compaction */
    .kh-roots {
        padding-block: 48px;
    }
    .kh-roots__layout {
        gap: 32px;
    }
    .kh-egypt-badge {
        margin-bottom: 20px;
    }
    .kh-roots__heading {
        font-size: 26px;
        margin-bottom: 12px;
    }
    .kh-roots__meta {
        margin-bottom: 16px;
    }
    .kh-roots__body {
        font-size: 15px;
        line-height: 1.6;
        margin-bottom: 24px;
    }
    .kh-roots__caps {
        padding: 20px;
    }
    .kh-roots__cap-grid {
        gap: 16px;
    }
    .kh-cap-item {
        padding: 16px;
    }
    .kh-cap-item__icon {
        width: 32px;
        height: 32px;
    }

    /* 7. Export Banner Mobile */
    .kh-cinematic__layout {
        padding-block: 56px;
    }
    .kh-cinematic__heading {
        font-size: 26px;
    }
    .kh-cinematic__body {
        font-size: 15px;
        margin-bottom: 32px;
    }

    /* 8. Quality Section Mobile */
    .kh-quality-section {
        padding-block: 48px;
    }
    .kh-quality__caps {
        grid-template-columns: 1fr 1fr;
        gap: 12px;
    }
    .kh-quality__cap {
        padding: 16px 12px;
        font-size: 13px;
        gap: 8px;
        flex-direction: column;
        text-align: center;
        justify-content: center;
    }
}

@media (max-width: 400px) {
    /* Fallback if 2 columns is too tight for quality */
    .kh-quality__caps {
        grid-template-columns: 1fr;
    }
    .kh-quality__cap {
        flex-direction: row;
        text-align: start;
        justify-content: flex-start;
        padding: 16px 20px;
    }
}

/* ════════════════════════════════════════════════════════════
   PHASE 4.0 — CORPORATE PAGES PREMIUM VISUAL ALIGNMENT
   ════════════════════════════════════════════════════════════ */

/* ── SHARED CORPORATE HERO ────────────────────────────── */
.kh-corp-hero {
    background: var(--kh-cream);
    padding-block: 64px 0;
    position: relative;
    overflow: hidden;
}

.kh-corp-hero__layout {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 48px;
    align-items: center;
}

.kh-corp-hero__content {
    padding-block-end: 64px;
}

.kh-corp-hero__h1 {
    font-size: clamp(32px, 4vw, 48px);
    font-weight: 900;
    color: var(--kh-forest);
    line-height: 1.15;
    margin-bottom: 24px;
    letter-spacing: -0.01em;
}

.kh-corp-hero__lead {
    font-size: clamp(16px, 1.5vw, 18px);
    color: var(--kh-text);
    max-width: 500px;
    line-height: 1.75;
}

.kh-corp-hero__image-wrap {
    height: 100%;
    display: flex;
    align-items: flex-end;
}

.kh-corp-hero__image-frame {
    width: 100%;
    border-top-start-radius: 20px;
    border-top-end-radius: 20px;
    overflow: hidden;
    position: relative;
}

.kh-corp-hero__image-frame img {
    width: 100%;
    height: auto;
    display: block;
    object-fit: cover;
    object-position: center bottom;
}

@media (max-width: 900px) {
    .kh-corp-hero__layout {
        grid-template-columns: 1fr;
        gap: 40px;
    }
    .kh-corp-hero__content {
        padding-block-end: 0;
    }
    .kh-corp-hero__image-wrap {
        order: -1;
    }
    .kh-corp-hero__image-frame {
        border-radius: 16px;
    }
    .kh-corp-hero {
        padding-block: 40px;
    }
}

/* ── ABOUT PAGE: FACTS STRIP ──────────────────────────── */
.kh-corp-facts {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    background: var(--kh-white);
    border-radius: 16px;
    border: 1px solid var(--kh-border-light);
    box-shadow: 0 4px 24px rgba(18,56,45,0.04);
    margin-top: -32px; /* Pull up into hero slightly if desired, or just space it */
    position: relative;
    z-index: 10;
    overflow: hidden;
}

.kh-corp-fact {
    padding: 32px 24px;
    text-align: center;
    border-inline-end: 1px solid var(--kh-border-light);
}

.kh-corp-fact:last-child {
    border-inline-end: none;
}

.kh-corp-fact__value {
    font-size: 28px;
    font-weight: 900;
    color: var(--kh-forest);
    margin-bottom: 8px;
    line-height: 1;
}

.kh-corp-fact__label {
    font-size: 14px;
    font-weight: 700;
    color: var(--kh-gold);
}

@media (max-width: 900px) {
    .kh-corp-facts {
        grid-template-columns: repeat(2, 1fr);
    }
    .kh-corp-fact:nth-child(2) {
        border-inline-end: none;
    }
    .kh-corp-fact:nth-child(1),
    .kh-corp-fact:nth-child(2) {
        border-bottom: 1px solid var(--kh-border-light);
    }
}
@media (max-width: 480px) {
    .kh-corp-facts {
        grid-template-columns: 1fr;
    }
    .kh-corp-fact {
        border-inline-end: none !important;
        border-bottom: 1px solid var(--kh-border-light);
        padding: 24px;
    }
    .kh-corp-fact:last-child {
        border-bottom: none;
    }
}

/* ── CAPABILITY PILLS ─────────────────────────────────── */
.kh-corp-pills {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 16px;
}
.kh-corp-pill {
    background: var(--kh-white);
    border: 1px solid var(--kh-border-light);
    border-radius: 12px;
    padding: 20px;
    display: flex;
    align-items: center;
    gap: 16px;
    box-shadow: 0 2px 12px rgba(18,56,45,0.03);
}
.kh-corp-pill__icon {
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--kh-gold);
    flex-shrink: 0;
}
.kh-corp-pill__text {
    font-size: 15px;
    font-weight: 700;
    color: var(--kh-forest);
    line-height: 1.4;
}
@media (max-width: 900px) {
    .kh-corp-pills {
        grid-template-columns: repeat(2, 1fr);
    }
}
@media (max-width: 480px) {
    .kh-corp-pills {
        grid-template-columns: 1fr;
    }
}

/* ── QUALITY PAGE: DETAILED TIMELINE WORKFLOW ─────────── */
.kh-workflow {
    position: relative;
    max-width: 800px;
    margin: 0 auto;
    padding-block: 40px;
}

.kh-workflow::before {
    content: '';
    position: absolute;
    top: 40px;
    bottom: 40px;
    inset-inline-start: 24px;
    width: 2px;
    background: linear-gradient(180deg, var(--kh-gold) 0%, rgba(200,155,64,0.2) 100%);
}
html[dir="rtl"] .kh-workflow::before {
    inset-inline-end: 24px;
    inset-inline-start: auto;
}

.kh-workflow__step {
    position: relative;
    padding-inline-start: 64px;
    margin-bottom: 48px;
}
html[dir="rtl"] .kh-workflow__step {
    padding-inline-end: 64px;
    padding-inline-start: 0;
}
.kh-workflow__step:last-child {
    margin-bottom: 0;
}

.kh-workflow__marker {
    position: absolute;
    top: 0;
    inset-inline-start: 8px;
    width: 34px;
    height: 34px;
    border-radius: 50%;
    background: var(--kh-forest);
    color: var(--kh-gold);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    font-weight: 800;
    box-shadow: 0 0 0 6px var(--kh-white), 0 4px 12px rgba(18,56,45,0.15);
    z-index: 2;
}
html[dir="rtl"] .kh-workflow__marker {
    inset-inline-end: 8px;
    inset-inline-start: auto;
}

.kh-workflow__content {
    background: var(--kh-white);
    padding: 32px;
    border-radius: 16px;
    border: 1px solid var(--kh-border-light);
    box-shadow: 0 4px 20px rgba(18,56,45,0.04);
}

.kh-workflow__content h3 {
    font-size: 20px;
    font-weight: 800;
    color: var(--kh-forest);
    margin-bottom: 12px;
}

.kh-workflow__content p {
    font-size: 15px;
    color: var(--kh-text);
    line-height: 1.7;
    margin: 0;
}

@media (max-width: 600px) {
    .kh-workflow__content {
        padding: 24px;
    }
}

/* ── EXPORT PAGE: BUYER WORKFLOW ──────────────────────── */
.kh-b2b-steps {
    display: flex;
    flex-direction: column;
    gap: 16px;
    max-width: 700px;
    margin: 0 auto;
}

.kh-b2b-step {
    display: flex;
    align-items: center;
    gap: 20px;
    background: var(--kh-white);
    padding: 20px 32px;
    border-radius: 12px;
    border: 1px solid var(--kh-border-light);
    box-shadow: 0 2px 12px rgba(18,56,45,0.03);
}

.kh-b2b-step__num {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: var(--kh-cream);
    color: var(--kh-forest);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 900;
    font-size: 18px;
    flex-shrink: 0;
}

.kh-b2b-step__text {
    font-size: 18px;
    font-weight: 700;
    color: var(--kh-forest);
}

@media (max-width: 600px) {
    .kh-b2b-step {
        padding: 16px 20px;
        gap: 16px;
    }
    .kh-b2b-step__text {
        font-size: 16px;
    }
}

/* ── CONTACT PAGE: BLOCKS & CTA ───────────────────────── */
.kh-contact-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
    margin-bottom: 48px;
}

.kh-contact-card {
    background: var(--kh-white);
    padding: 40px 32px;
    border-radius: 16px;
    border: 1px solid var(--kh-border-light);
    text-align: center;
    box-shadow: 0 4px 20px rgba(18,56,45,0.04);
}

.kh-contact-card__icon {
    width: 56px;
    height: 56px;
    border-radius: 50%;
    background: var(--kh-cream);
    color: var(--kh-gold);
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 24px;
}

.kh-contact-card h3 {
    font-size: 18px;
    font-weight: 800;
    color: var(--kh-forest);
    margin-bottom: 16px;
}

.kh-contact-card p,
.kh-contact-card a {
    font-size: 16px;
    color: var(--kh-text);
    line-height: 1.6;
    display: block;
    text-decoration: none;
    font-weight: 600;
}

.kh-contact-card a:hover {
    color: var(--kh-gold);
}

.kh-contact-wa {
    background: linear-gradient(135deg, #12382D 0%, #0C261E 100%);
    border-radius: 20px;
    padding: 48px;
    text-align: center;
    color: var(--kh-white);
    position: relative;
    overflow: hidden;
}
.kh-contact-wa__inner {
    position: relative;
    z-index: 2;
}
.kh-contact-wa h2 {
    color: var(--kh-white);
    margin-bottom: 24px;
    font-size: clamp(24px, 3vw, 32px);
}
.kh-contact-wa .kh-btn {
    background: #25D366;
    color: #fff;
    font-weight: 700;
    border: none;
}
.kh-contact-wa .kh-btn:hover {
    background: #20BA59;
    color: #fff;
}

.kh-contact-socials {
    display: flex;
    justify-content: center;
    gap: 16px;
    margin-top: 48px;
}

.kh-social-link {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: var(--kh-cream);
    color: var(--kh-forest);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.3s, color 0.3s;
}

.kh-social-link:hover {
    background: var(--kh-forest);
    color: var(--kh-white);
}

.kh-social-link[aria-disabled="true"] {
    opacity: 0.4;
    cursor: not-allowed;
    background: var(--kh-cream);
    color: var(--kh-forest);
}

@media (max-width: 900px) {
    .kh-contact-grid {
        grid-template-columns: 1fr;
    }
}
@media (max-width: 600px) {
    .kh-contact-wa {
        padding: 32px 20px;
    }
}

/* ════════════════════════════════════════════════════════════
   MOTION SYSTEM (Phase 6.5)
   ════════════════════════════════════════════════════════════ */

/* Base Reveal States */
.kh-reveal {
    transition: opacity 600ms cubic-bezier(0.25, 1, 0.5, 1), transform 600ms cubic-bezier(0.25, 1, 0.5, 1);
    will-change: opacity, transform;
}

/* ONLY hide elements when JS is ready and they haven't been revealed yet */
html.kh-motion-ready .kh-reveal:not(.kh-is-visible) {
    opacity: 0;
    transform: translateY(16px);
}

/* Stagger Effects */
.kh-stagger:nth-child(1) { transition-delay: 0ms; }
.kh-stagger:nth-child(2) { transition-delay: 80ms; }
.kh-stagger:nth-child(3) { transition-delay: 160ms; }
.kh-stagger:nth-child(4) { transition-delay: 240ms; }
.kh-stagger:nth-child(n+5) { transition-delay: 320ms; }

/* Micro-interactions */
@media (hover: hover) and (pointer: fine) {
    .kh-product-card {
        transition: transform 300ms ease, box-shadow 300ms ease;
    }
    .kh-product-card:hover {
        transform: translateY(-4px);
        box-shadow: 0 12px 24px rgba(18,56,45,0.08);
    }
    .kh-product-card:hover .kh-product-card__image-frame img {
        transform: scale(1.03);
    }
    .kh-product-card__image-frame img {
        transition: transform 400ms ease;
    }

    .kh-cat-card__img {
        transition: transform 400ms ease;
    }
    .kh-cat-card:hover .kh-cat-card__img img {
        transform: scale(1.05);
    }
}

/* Fallback for JS failure or disabled */
.no-js .kh-reveal {
    opacity: 1;
    transform: translateY(0);
}

/* Prefers Reduced Motion */
@media (prefers-reduced-motion: reduce) {
    .kh-reveal {
        transition: none !important;
        opacity: 1 !important;
        transform: none !important;
    }
    .kh-stagger {
        transition-delay: 0ms !important;
    }
    .kh-product-card:hover {
        transform: none !important;
    }
    .kh-product-card:hover .kh-product-card__image-frame img,
    .kh-product-card:hover .kh-product-card__image-primary:only-child {
        transform: none !important;
    }
    .kh-product-card:hover .kh-product-card__image-primary {
        opacity: 1 !important;
    }
    .kh-product-card:hover .kh-product-card__image-secondary {
        display: none !important;
    }
    .kh-cat-card:hover .kh-cat-card__img {
        transform: none !important;
    }
}
