@charset "UTF-8";

/**
 * Home page – unified section headers (alignment, title size/weight, actions)
 * Load after other home component CSS so these rules win.
 */

:root {
    --nx-home-section-text: var(--text-primary, #1d1d1f);
    --nx-home-section-muted: var(--text-secondary, #6e6e73);
    --nx-home-section-border: var(--border-color, rgba(0, 0, 0, 0.08));
    --nx-home-section-primary: var(--primary, var(--bs-primary, #0d6efd));
    --nx-home-section-primary-hover: var(--primary-hover, var(--bs-primary-hover, #0b5ed7));
    --nx-home-section-secondary: var(--secondary, var(--bs-secondary, #6c757d));
    --nx-home-section-title-size: clamp(1.5rem, 3.8vw, 2rem);
    --nx-home-section-title-weight: 700;
    --nx-home-section-header-pb: 1.125rem;
    --nx-home-section-header-mb: 1.375rem;
    --nx-home-section-max: 1200px;
    --nx-home-section-pad-x: 1.25rem;
}

@media (max-width: 991px) {
    :root {
        --nx-home-section-pad-x: 1rem;
    }
}

@media (max-width: 576px) {
    :root {
        --nx-home-section-pad-x: 1rem;
    }
}

/* ----- Container width alignment (match featured categories) ----- */
.nx-featured-brands__container,
.nx-gallery-container {
    max-width: var(--nx-home-section-max);
    margin-left: auto;
    margin-right: auto;
    padding-left: var(--nx-home-section-pad-x);
    padding-right: var(--nx-home-section-pad-x);
}

.nx-blog-container {
    padding-left: var(--nx-home-section-pad-x);
    padding-right: var(--nx-home-section-pad-x);
}

/* ----- Shared header row ----- */
.nx-home-section-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 0.75rem 1rem;
    /* padding-bottom: var(--nx-home-section-header-pb);
    margin-bottom: var(--nx-home-section-header-mb); */
}

/* Blog section: tighter than old 3rem gap under title */
.nx-blog-section .nx-home-section-header {
    margin-bottom: var(--nx-home-section-header-mb);
}

@media (max-width: 576px) {
    .nx-home-section-header {
        flex-direction: row;
        align-items: center;
    }
}

/* ----- Title (h2) ----- */
.nx-home-section-title {
    font-family: -apple-system, BlinkMacSystemFont, 'SF Pro Display', 'Segoe UI', system-ui, sans-serif;
    font-size: var(--nx-home-section-title-size);
    font-weight: var(--nx-home-section-title-weight);
    letter-spacing: -0.02em;
    line-height: 1.2;
    color: var(--nx-home-section-text);
    margin: 0;
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    gap: 0.35em;
}

/* Lead word(s) — solid theme text */
.nx-home-section-title-lead {
    color: var(--nx-home-section-text);
    font-weight: var(--nx-home-section-title-weight);
}

/* Accent word(s) — theme gradient (primary → hover → secondary) */
.nx-home-section-title-accent {
    font-weight: var(--nx-home-section-title-weight);
    background-image: linear-gradient(
        105deg,
        var(--nx-home-section-primary) 0%,
        var(--nx-home-section-primary-hover) 48%,
        var(--nx-home-section-secondary) 100%
    );
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    -webkit-text-fill-color: transparent;
}

/* ----- Title as link (product rows) ----- */
.nx-home-section-title-link {
    display: inline-flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 0.35em 0.4rem;
    color: var(--nx-home-section-text);
    text-decoration: none;
    font-size: inherit;
    font-weight: var(--nx-home-section-title-weight);
    letter-spacing: inherit;
    line-height: inherit;
    transition: gap 0.2s ease;
}

.nx-home-section-title-link:hover,
.nx-home-section-title-link:focus-visible {
    color: var(--nx-home-section-text);
    outline: none;
}

.nx-home-section-title-link:hover .nx-home-section-title-accent,
.nx-home-section-title-link:focus-visible .nx-home-section-title-accent {
    background-image: linear-gradient(
        105deg,
        var(--nx-home-section-primary-hover) 0%,
        var(--nx-home-section-primary) 50%,
        var(--nx-home-section-secondary) 100%
    );
}

.nx-home-section-title-link:hover .nx-home-section-arrow,
.nx-home-section-title-link:focus-visible .nx-home-section-arrow {
    transform: translateX(3px);
    color: var(--nx-home-section-primary);
}

.nx-home-section-arrow {
    width: 1.125rem;
    height: 1.125rem;
    flex-shrink: 0;
    stroke: currentColor;
    fill: none;
    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round;
    transition: transform 0.2s ease, color 0.2s ease;
    opacity: 0.9;
}

.nx-home-section-title-link:focus-visible {
    outline: 2px solid var(--nx-home-section-primary);
    outline-offset: 3px;
    border-radius: 6px;
}

/* ----- Right-side action (View all / See more) ----- */
.nx-home-section-action {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.35rem;
    padding: 0.45rem 0.85rem;
    font-size: 0.8125rem;
    font-weight: 500;
    letter-spacing: 0.01em;
    line-height: 1.25;
    color: var(--nx-home-section-text);
    text-decoration: none;
    border: 1px solid var(--nx-home-section-border);
    border-radius: 999px;
    background: rgba(0, 0, 0, 0.02);
    transition:
        color 0.22s cubic-bezier(0.4, 0, 0.2, 1),
        border-color 0.22s cubic-bezier(0.4, 0, 0.2, 1),
        background 0.22s cubic-bezier(0.4, 0, 0.2, 1),
        box-shadow 0.22s cubic-bezier(0.4, 0, 0.2, 1);
}

.nx-home-section-action:hover,
.nx-home-section-action:focus-visible {
    color: var(--nx-home-section-primary);
    border-color: color-mix(in srgb, var(--nx-home-section-primary) 35%, var(--nx-home-section-border));
    background: color-mix(in srgb, var(--nx-home-section-primary) 6%, #ffffff);
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.04);
    outline: none;
}

.nx-home-section-action:focus-visible {
    box-shadow: 0 0 0 3px color-mix(in srgb, var(--nx-home-section-primary) 22%, transparent);
}

.nx-home-section-action svg {
    flex-shrink: 0;
    width: 14px;
    height: 14px;
    opacity: 0.8;
    transition: transform 0.2s ease, opacity 0.2s ease;
}

.nx-home-section-action:hover svg,
.nx-home-section-action:focus-visible svg {
    transform: translateX(2px);
    opacity: 1;
}

/* Featured categories: drop old left bar indent – titles align with grid */
.nx-featured-categories__header.nx-home-section-header {
    padding-left: 0;
    margin-left: 0;
}

.nx-featured-categories__title.nx-home-section-title {
    padding-left: 0;
    border-left: none;
}

/* Gallery: was centered – align with other sections */
.nx-gallery-header.nx-home-section-header {
    text-align: left;
    justify-content: flex-start;
    margin-bottom: var(--nx-home-section-header-mb);
}

/* Home blog: retire filled primary button in favour of pill action */
.nx-blog-section .nx-home-section-action {
    min-height: 44px;
}

@media (prefers-reduced-motion: reduce) {
    .nx-home-section-title-link,
    .nx-home-section-arrow,
    .nx-home-section-action,
    .nx-home-section-action svg {
        transition: none;
    }
}

/* ----- Override legacy title styles when unified class is combined ----- */
.nx-blog-title.nx-home-section-title,
.nx-gallery-title.nx-home-section-title {
    background: none !important;
    -webkit-background-clip: unset !important;
    background-clip: unset !important;
    -webkit-text-fill-color: unset !important;
    color: var(--nx-home-section-text);
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    position: static;
}

.nx-blog-title.nx-home-section-title::after,
.nx-gallery-title.nx-home-section-title::after {
    display: none !important;
    content: none !important;
}

.nx-featured-brands__title.nx-home-section-title {
    color: var(--nx-home-section-text);
    text-shadow: none;
    animation: none;
}

.nx-featured-categories__title.nx-home-section-title {
    border-left: none;
    padding-left: 0;
}
