.modern-home {
    --home-accent: var(--pd-primary, #ff6f50);
    --home-accent-rgb: var(--pd-primary-rgb, 255, 111, 80);
    --home-ink: #0f172a;
    --home-muted: #64748b;
    --home-line: #e7edf4;
    --home-soft: #f5f8fb;
    overflow: hidden;
    color: var(--home-ink);
    background: #fff;
}

.modern-home *,
.modern-home *::before,
.modern-home *::after {
    box-sizing: border-box;
}

.home-section {
    padding: 48px 0;
}

.home-section-soft {
    background:
        radial-gradient(circle at 8% 15%, rgba(var(--home-accent-rgb), .08), transparent 28%),
        #f7f9fc;
}

.home-section-heading {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 20px;
    margin-bottom: 22px;
}

.home-section-heading h2 {
    margin: 3px 0 0;
    color: var(--home-ink);
    font-size: clamp(24px, 2.2vw, 34px);
    font-weight: 800;
    line-height: 1.25;
    letter-spacing: -.025em;
}

.home-section-kicker {
    display: block;
    color: var(--home-accent);
    font-size: 12px;
    font-weight: 800;
    letter-spacing: .08em;
    text-transform: uppercase;
}

.home-view-all,
.home-primary-link {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: var(--home-ink);
    font-size: 13px;
    font-weight: 750;
    text-decoration: none;
    transition: color .2s ease, gap .2s ease;
}

.home-view-all:hover,
.home-primary-link:hover {
    gap: 11px;
    color: var(--home-accent);
    text-decoration: none;
}

.home-heading-actions {
    display: flex;
    align-items: center;
    gap: 8px;
}

.home-rail-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 38px;
    height: 38px;
    border: 1px solid var(--home-line);
    border-radius: 50%;
    background: #fff;
    color: var(--home-ink);
    cursor: pointer;
    transition: border-color .2s ease, color .2s ease, transform .2s ease;
}

.home-rail-button:hover,
.home-rail-button:focus-visible {
    border-color: var(--home-accent);
    color: var(--home-accent);
    outline: none;
    transform: translateY(-2px);
}

/* Hero */
.home-hero {
    padding: 24px 0 18px;
    background:
        radial-gradient(circle at 88% 20%, rgba(var(--home-accent-rgb), .14), transparent 30%),
        linear-gradient(180deg, #f8fafc, #fff);
}

.home-hero-shell {
    display: grid;
    grid-template-columns: minmax(300px, .8fr) minmax(0, 1.35fr);
    min-height: 430px;
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, .75);
    border-radius: 28px;
    background: #fff;
    box-shadow: 0 24px 65px rgba(15, 23, 42, .10);
}

.home-hero-copy {
    position: relative;
    z-index: 2;
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: clamp(30px, 4vw, 62px);
    background:
        linear-gradient(145deg, rgba(var(--home-accent-rgb), .09), transparent 58%),
        #fff;
    direction: inherit;
    text-align: start;
}

.home-hero[dir="rtl"] .home-hero-copy {
    direction: rtl;
    text-align: right;
}

.home-hero[dir="ltr"] .home-hero-copy {
    direction: ltr;
    text-align: left;
}

.home-hero-copy h1,
.home-hero-copy p,
.home-hero-eyebrow {
    direction: inherit;
    text-align: inherit;
    unicode-bidi: plaintext;
}

.home-hero-eyebrow {
    display: inline-flex;
    align-self: flex-start;
    margin-bottom: 14px;
    padding: 7px 12px;
    border: 1px solid rgba(var(--home-accent-rgb), .22);
    border-radius: 999px;
    background: rgba(var(--home-accent-rgb), .08);
    color: var(--home-accent);
    font-size: 12px;
    font-weight: 800;
}

.home-hero-copy h1 {
    max-width: 580px;
    margin: 0;
    color: var(--home-ink);
    font-size: clamp(31px, 3.7vw, 55px);
    font-weight: 850;
    line-height: 1.12;
    letter-spacing: -.045em;
}

.home-hero-copy p {
    max-width: 520px;
    margin: 20px 0 0;
    color: var(--home-muted);
    font-size: 16px;
    line-height: 1.8;
}

.home-hero-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 11px;
    margin-top: 28px;
    direction: inherit;
    justify-content: flex-start;
}

.home-hero-primary,
.home-hero-secondary,
.home-cta-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 9px;
    min-height: 48px;
    padding: 0 22px;
    border-radius: 14px;
    font-size: 14px;
    font-weight: 800;
    text-decoration: none;
    transition: transform .2s ease, box-shadow .2s ease, background .2s ease;
}

.home-hero-primary,
.home-cta-button {
    background: var(--home-accent);
    color: #fff;
    box-shadow: 0 12px 24px rgba(var(--home-accent-rgb), .24);
}

.home-hero-primary:hover,
.home-cta-button:hover {
    color: #fff;
    text-decoration: none;
    transform: translateY(-2px);
    box-shadow: 0 16px 30px rgba(var(--home-accent-rgb), .30);
}

.home-hero-secondary {
    border: 1px solid var(--home-line);
    background: #fff;
    color: var(--home-ink);
}

.home-hero-secondary:hover {
    border-color: rgba(var(--home-accent-rgb), .32);
    color: var(--home-accent);
    text-decoration: none;
}

.home-hero-visual,
.home-hero-visual .carousel,
.home-hero-visual .carousel-inner,
.home-hero-visual .carousel-item,
.home-hero-media {
    min-width: 0;
    height: 100%;
}

.home-hero-media {
    position: relative;
    display: block;
    min-height: 430px;
    overflow: hidden;
    background: linear-gradient(135deg, #e9eef5, #f8fafc);
}

.home-hero-media img {
    position: relative;
    z-index: 1;
    width: 100%;
    height: 100%;
    min-height: 430px;
    object-fit: cover;
    object-position: center;
}

.home-hero-fallback,
.home-hero-empty {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    color: rgba(var(--home-accent-rgb), .55);
    font-size: 56px;
    background:
        radial-gradient(circle at 30% 30%, rgba(var(--home-accent-rgb), .18), transparent 33%),
        linear-gradient(135deg, #f2f5f9, #fff);
}

.home-hero-fallback:not(.is-visible) {
    visibility: hidden;
}

.home-hero-fallback.is-visible {
    visibility: visible;
}

.home-hero-empty {
    position: relative;
    min-height: 430px;
}

.home-hero-empty span {
    position: absolute;
    width: 180px;
    height: 180px;
    border-radius: 42% 58% 62% 38%;
    background: rgba(var(--home-accent-rgb), .11);
}

.home-hero-empty span:nth-child(1) { top: 12%; left: 12%; }
.home-hero-empty span:nth-child(2) { right: 10%; bottom: 5%; transform: scale(.72); }
.home-hero-empty span:nth-child(3) { right: 18%; top: 8%; transform: scale(.42); }

.home-hero .carousel-control-prev,
.home-hero .carousel-control-next {
    top: 50%;
    width: 42px;
    height: 42px;
    margin: 0 14px;
    border-radius: 50%;
    background: rgba(255, 255, 255, .9);
    color: var(--home-ink);
    opacity: 1;
    transform: translateY(-50%);
    box-shadow: 0 8px 22px rgba(15, 23, 42, .12);
}

.home-hero .carousel-indicators li {
    width: 8px;
    height: 8px;
    border: 0;
    border-radius: 50%;
    background: #fff;
    opacity: .55;
}

.home-hero .carousel-indicators li.active {
    width: 26px;
    border-radius: 999px;
    opacity: 1;
}

/* Benefits */
.home-benefits {
    position: relative;
    z-index: 3;
    padding: 8px 0 18px;
}

.home-benefits-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 12px;
}

.home-benefit {
    display: flex;
    align-items: center;
    gap: 13px;
    min-width: 0;
    padding: 16px 18px;
    border: 1px solid var(--home-line);
    border-radius: 17px;
    background: #fff;
    color: var(--home-ink);
    text-decoration: none;
    transition: transform .2s ease, border-color .2s ease, box-shadow .2s ease;
}

.home-benefit:hover {
    border-color: rgba(var(--home-accent-rgb), .3);
    color: var(--home-ink);
    text-decoration: none;
    transform: translateY(-3px);
    box-shadow: 0 12px 28px rgba(15, 23, 42, .07);
}

.home-benefit-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 44px;
    width: 44px;
    height: 44px;
    border-radius: 14px;
    background: rgba(var(--home-accent-rgb), .1);
    color: var(--home-accent);
    font-size: 19px;
}

.home-benefit strong,
.home-benefit small {
    display: block;
}

.home-benefit strong { font-size: 14px; }
.home-benefit small { margin-top: 3px; color: var(--home-muted); font-size: 11px; line-height: 1.5; }

/* Categories */
.home-category-grid {
    display: grid;
    grid-template-columns: repeat(8, minmax(0, 1fr));
    gap: 14px;
}

.home-category-card {
    display: flex;
    min-width: 0;
    flex-direction: column;
    color: var(--home-ink);
    text-decoration: none;
}

.home-category-media {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    aspect-ratio: 1 / .86;
    overflow: hidden;
    border: 1px solid var(--home-line);
    border-radius: 18px;
    background: var(--home-soft);
}

.home-category-media img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform .35s ease;
}

.home-category-card:hover .home-category-media img { transform: scale(1.055); }

.home-media-fallback {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
    color: #a2adbb;
    font-size: 30px;
    background: linear-gradient(145deg, #f8fafc, #eef2f7);
}

.home-category-name {
    margin-top: 10px;
    overflow: hidden;
    font-size: 13px;
    font-weight: 750;
    line-height: 1.35;
    text-align: center;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.home-category-card:hover { color: var(--home-accent); text-decoration: none; }

/* Materials */
.home-materials-grid {
    display: grid;
    grid-template-columns: repeat(8, minmax(0, 1fr));
    gap: 16px;
}

.home-materials-rail {
    display: grid;
    grid-auto-flow: column;
    grid-auto-columns: 126px;
    gap: 18px;
    overflow-x: auto;
    overflow-y: hidden;
    padding: 6px 3px 18px;
    scroll-behavior: smooth;
    scroll-snap-type: x mandatory;
    overscroll-behavior-inline: contain;
    scrollbar-width: none;
}

.home-materials-rail::-webkit-scrollbar {
    display: none;
}

.home-materials-rail .home-material-card {
    width: 126px;
    scroll-snap-align: start;
}

.home-material-card {
    display: flex;
    align-items: center;
    min-width: 0;
    flex-direction: column;
    color: var(--home-ink);
    text-decoration: none;
}

.home-material-logo {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 94px;
    height: 94px;
    padding: 14px;
    overflow: hidden;
    border: 1px solid var(--home-line);
    border-radius: 50%;
    background: #fff;
    box-shadow: 0 9px 24px rgba(15, 23, 42, .07);
    transition: transform .22s ease, border-color .22s ease, box-shadow .22s ease;
}

.home-material-logo img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    object-position: center;
}

.home-material-fallback {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
    border-radius: 50%;
    background: rgba(var(--home-accent-rgb), .1);
    color: var(--home-accent);
    font-size: 17px;
    font-weight: 850;
}

.home-material-name {
    width: 100%;
    margin-top: 10px;
    overflow: hidden;
    font-size: 12px;
    font-weight: 750;
    text-align: center;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.home-material-card:hover { color: var(--home-accent); text-decoration: none; }
.home-material-card:hover .home-material-logo { border-color: rgba(var(--home-accent-rgb), .35); transform: translateY(-4px); box-shadow: 0 15px 32px rgba(15, 23, 42, .12); }

/* Product rails */
.home-product-rail {
    display: grid;
    grid-auto-columns: calc((100% - 72px) / 5);
    grid-auto-flow: column;
    gap: 18px;
    overflow-x: auto;
    overflow-y: visible;
    padding: 5px 2px 18px;
    scroll-behavior: smooth;
    scroll-snap-type: x mandatory;
    scrollbar-width: none;
}

.home-product-rail::-webkit-scrollbar { display: none; }

.home-product-cell {
    min-width: 0;
    height: 100%;
    scroll-snap-align: start;
}

.home-product-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 18px;
}

.home-deal-section {
    padding-top: 20px;
    background: #fff;
}

.home-deal-shell {
    padding: 30px;
    border-radius: 25px;
    background:
        radial-gradient(circle at 90% 10%, rgba(255, 255, 255, .16), transparent 26%),
        linear-gradient(135deg, #11253b, #1d3f55);
    box-shadow: 0 22px 45px rgba(15, 23, 42, .15);
}

.home-section-heading-light h2,
.home-section-heading-light .home-section-kicker,
.home-view-all-light { color: #fff; }

/* Banners */
.home-wide-banner-wrap { margin-top: 12px; margin-bottom: 10px; }
.home-wide-banner { display: block; overflow: hidden; border-radius: 24px; background: var(--home-soft); box-shadow: 0 14px 36px rgba(15, 23, 42, .08); }
.home-wide-banner img { display: block; width: 100%; max-height: 360px; object-fit: cover; }

.home-promo-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 18px;
    padding-top: 18px;
    padding-bottom: 52px;
}

.home-promo-card { display: block; min-height: 180px; overflow: hidden; border-radius: 22px; background: var(--home-soft); box-shadow: 0 12px 30px rgba(15, 23, 42, .07); }
.home-promo-card img { width: 100%; height: 100%; min-height: 180px; max-height: 300px; object-fit: cover; transition: transform .35s ease; }
.home-promo-card:hover img { transform: scale(1.025); }

/* Tabs */
.home-tabs {
    padding: 18px;
    border: 1px solid var(--home-line);
    border-radius: 24px;
    background: #fff;
    box-shadow: 0 14px 36px rgba(15, 23, 42, .055);
}

.home-tab-list {
    display: flex;
    gap: 8px;
    margin-bottom: 20px;
    overflow-x: auto;
    padding-bottom: 3px;
    scrollbar-width: none;
}

.home-tab-list::-webkit-scrollbar { display: none; }

.home-tab-button {
    flex: 0 0 auto;
    min-height: 40px;
    padding: 0 16px;
    border: 1px solid var(--home-line);
    border-radius: 999px;
    background: #fff;
    color: var(--home-muted);
    font-size: 13px;
    font-weight: 750;
    cursor: pointer;
}

.home-tab-button.is-active {
    border-color: var(--home-accent);
    background: var(--home-accent);
    color: #fff;
    box-shadow: 0 8px 18px rgba(var(--home-accent-rgb), .2);
}

.home-tab-button:focus-visible { outline: 3px solid rgba(var(--home-accent-rgb), .2); outline-offset: 2px; }
.home-tab-panel:not(.is-active) { display: none; }
.home-tab-panel-footer { display: flex; justify-content: flex-end; margin-top: 18px; }

/* Final CTA */
.home-final-cta { padding: 0 0 54px; }
.home-final-cta-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
    padding: 32px;
    border: 1px solid var(--home-line);
    border-radius: 26px;
    background:
        radial-gradient(circle at 12% 20%, rgba(var(--home-accent-rgb), .13), transparent 30%),
        #f8fafc;
}
.home-final-cta h2 { max-width: 720px; margin: 5px 0 0; color: var(--home-ink); font-size: clamp(22px, 2.5vw, 34px); font-weight: 820; line-height: 1.3; }

@media (max-width: 1199px) {
    .home-category-grid, .home-materials-grid { grid-template-columns: repeat(6, minmax(0, 1fr)); }
    .home-product-rail { grid-auto-columns: calc((100% - 54px) / 4); }
}

@media (max-width: 991px) {
    .home-section { padding: 38px 0; }
    .home-hero-shell { grid-template-columns: 1fr; min-height: 0; }
    .home-hero-copy { min-height: 330px; }
    .home-hero-visual, .home-hero-media, .home-hero-media img, .home-hero-empty { min-height: 340px; }
    .home-benefits-grid { grid-template-columns: 1fr; }
    .home-category-grid, .home-materials-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
    .home-product-rail { grid-auto-columns: calc((100% - 36px) / 3); }
    .home-product-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

@media (max-width: 767px) {
    .home-section-heading { align-items: center; }
    .home-section-heading h2 { font-size: 25px; }
    .home-heading-actions .home-view-all { display: none; }
    .home-product-rail { grid-auto-columns: calc((100% - 14px) / 2); gap: 14px; }
    .home-product-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
    .home-category-grid {
        grid-auto-columns: 132px;
        grid-auto-flow: column;
        grid-template-columns: none;
        overflow-x: auto;
        padding-bottom: 10px;
        scroll-snap-type: x mandatory;
        scrollbar-width: none;
    }
    .home-category-grid::-webkit-scrollbar { display: none; }
    .home-category-card { scroll-snap-align: start; }
    .home-materials-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 13px; }
    .home-material-logo { width: 78px; height: 78px; padding: 11px; }
    .home-materials-rail { grid-auto-columns: 108px; gap: 13px; }
    .home-materials-rail .home-material-card { width: 108px; }
    .home-promo-grid { grid-template-columns: 1fr; }
    .home-final-cta-inner { align-items: flex-start; flex-direction: column; }
}

@media (max-width: 575px) {
    .home-hero { padding-top: 12px; }
    .home-hero-shell { border-radius: 20px; }
    .home-hero-copy { min-height: 0; padding: 26px 21px; }
    .home-hero-copy h1 { font-size: 32px; }
    .home-hero-copy p { margin-top: 14px; font-size: 14px; }
    .home-hero-actions { margin-top: 21px; }
    .home-hero-primary, .home-hero-secondary { min-height: 44px; padding: 0 15px; font-size: 12px; }
    .home-hero-visual, .home-hero-media, .home-hero-media img, .home-hero-empty { min-height: 250px; }
    .home-benefit { padding: 13px; }
    .home-section { padding: 31px 0; }
    .home-section-heading { margin-bottom: 17px; }
    .home-section-heading h2 { font-size: 22px; }
    .home-view-all { font-size: 11px; }
    .home-rail-button { width: 34px; height: 34px; }
    .home-category-grid { grid-auto-columns: 118px; gap: 11px; }
    .home-materials-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
    .home-material-logo { width: 74px; height: 74px; }
    .home-materials-rail { grid-auto-columns: 96px; gap: 11px; }
    .home-materials-rail .home-material-card { width: 96px; }
    .home-product-rail { grid-auto-columns: calc((100% - 12px) / 2); gap: 12px; }
    .home-product-grid { gap: 12px; }
    .home-tabs { padding: 12px; border-radius: 18px; }
    .home-deal-shell { padding: 20px 13px; border-radius: 20px; }
    .home-wide-banner { border-radius: 16px; }
    .home-final-cta { padding-bottom: 34px; }
    .home-final-cta-inner { padding: 24px 20px; border-radius: 20px; }
}

@media (prefers-reduced-motion: reduce) {
    .modern-home *, .modern-home *::before, .modern-home *::after {
        scroll-behavior: auto !important;
        transition-duration: .01ms !important;
        animation-duration: .01ms !important;
        animation-iteration-count: 1 !important;
    }
}
