/* Homepage cleanup overrides: unified warm storefront background and overflow fix */
html,
body {
    overflow-x: hidden;
}

body {
    background: #f4f0e8;
}

#products {
    position: relative;
    isolation: isolate;
    padding-top: 38px;
    padding-bottom: 12px;
}

#products::before {
    content: '';
    position: absolute;
    top: 0;
    bottom: -36px;
    left: 50%;
    z-index: -1;
    width: 100vw;
    transform: translateX(-50%);
    pointer-events: none;
    background:
        radial-gradient(circle at 16% 6%, rgba(255,255,255,.88) 0 8%, transparent 28%),
        linear-gradient(180deg, #f6f2eb 0%, #eee8df 56%, #f4f0e8 100%);
}

#products > .section-header:first-child {
    margin: 0 0 24px;
    padding: 0;
    background: transparent;
}

.product-lines-carousel.product-lines-carousel {
    margin-top: 0;
    padding-top: 0;
}

.product-lines-carousel::before {
    display: none;
}

.product-lines-carousel .product-grid {
    padding-top: 0;
}

.product-lines-carousel .product-grid > .product-card {
    scroll-margin-left: 0;
}

.storefront-product-section::before,
.all-models-section::before {
    left: 50%;
    right: auto;
    width: 100vw;
    transform: translateX(-50%);
    inset-inline: auto;
}

/* Wider storefront shelves: closer to large ecommerce layout */
#products.container {
    max-width: none;
    width: 100%;
    padding-left: clamp(24px, 2.6vw, 44px);
    padding-right: clamp(24px, 2.6vw, 44px);
}

#products > .section-header:first-child,
.storefront-product-section,
.all-models-section {
    max-width: none;
}

.product-lines-carousel .product-grid,
.storefront-featured-grid {
    scroll-padding-left: 0;
    scroll-padding-right: 0;
}

.product-lines-carousel .product-grid > .product-card {
    flex-basis: clamp(360px, 27vw, 500px);
}

.storefront-feature-card.featured-product-card {
    flex-basis: clamp(360px, 26vw, 480px);
    min-height: 492px;
}

.storefront-feature-card .featured-product-image {
    height: 265px;
    padding: 18px 22px;
}

.storefront-feature-card .featured-product-copy {
    min-height: 205px;
    padding: 18px 20px 20px;
}

.storefront-feature-card .featured-product-copy h3 {
    font-size: 25px;
}

.storefront-feature-card .featured-product-copy p {
    min-height: 42px;
    margin-bottom: 12px;
}

.storefront-tags {
    gap: 6px;
    margin-bottom: 16px;
}

.storefront-tags em {
    min-height: 23px;
    padding: 3px 8px;
    font-size: 10px;
}

/* The lineup is a shelf per series. Only the shelf scrolls, never the page. */
.series-rail {
    --rail-gap: 16px;
    display: grid;
    grid-auto-flow: column;
    grid-auto-columns: calc((100% - 2 * var(--rail-gap)) / 3);
    gap: var(--rail-gap);
    min-width: 0;
    overflow-x: auto;
    overscroll-behavior-x: contain;
    scroll-snap-type: x mandatory;
    scrollbar-width: thin;
    scrollbar-color: #bcab95 transparent;
    padding-block: 5px 10px;
}
.series-rail .model-mini-card {
    scroll-snap-align: start;
    grid-template-rows: clamp(140px, 13vw, 215px) auto auto auto;
    align-content: start;
    min-width: 0;
    min-height: 0;
    padding: clamp(14px, 1.3vw, 22px);
    background: #fff;
}
.series-rail .model-mini-card img { height: 100%; min-height: 0; object-fit: contain; }
.series-rail .model-mini-card span { color: #805c35; }
.series-rail .model-mini-card > span { display: flex; align-items: center; gap: 8px; min-height: 20px; flex-wrap: wrap; }
.series-rail .pick-badge {
    display: inline-block; padding: 2px 8px; border-radius: 999px;
    background: #f4ead8; color: #694922; font: inherit; font-size: 11px;
    font-weight: 650; line-height: 16px; letter-spacing: .01em; text-transform: none;
}
.series-rail .model-mini-card strong { color: #352b22; }
.series-rail .model-mini-card small { color: #605a53; }
.series-actions, .series-controls { display: flex; align-items: center; gap: 12px; }
.series-controls { gap: 6px; flex-shrink: 0; }
.series-controls[hidden] { display: none; }
.series-controls button {
    display: grid; place-items: center; padding: 0 0 3px;
    width: 42px; height: 42px; border-radius: 50%;
    border: 1px solid #bba98e; background: #fffcf7; color: #664724;
    font: 26px/1 system-ui, sans-serif; cursor: pointer;
}
.series-controls button:hover:not(:disabled) { background: #f2e6d7; }
.series-controls button:disabled { opacity: .4; cursor: default; }
.series-controls button:focus-visible, .series-rail:focus-visible { outline: 2px solid #805c35; outline-offset: 2px; }
.series-rail .model-mini-card:focus-visible { outline: 2px solid #805c35; outline-offset: -3px; }
@media (max-width: 1000px) {
    .series-rail { grid-auto-columns: calc((100% - var(--rail-gap)) / 2); }
}
@media (max-width: 768px) {
    .all-models-group .series-head { gap: 6px; }
    .series-actions { width: 100%; justify-content: space-between; }
}
@media (max-width: 560px) {
    .series-rail { --rail-gap: 12px; grid-auto-columns: 85%; }
    .series-controls button { width: 44px; height: 44px; }
}

@media (min-width: 1600px) {
    .product-lines-carousel .product-grid > .product-card {
        flex-basis: clamp(430px, 24vw, 540px);
    }
    .storefront-feature-card.featured-product-card {
        flex-basis: clamp(390px, 24vw, 520px);
    }
    .all-models-grid {
        grid-template-columns: repeat(6, minmax(0, 1fr));
    }
}

@media (max-width: 1100px) {
    .all-models-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }
}

@media (max-width: 768px) {
    #products.container {
        padding-left: 18px;
        padding-right: 18px;
    }
    .product-lines-carousel .product-grid > .product-card {
        flex-basis: 82vw;
    }
    .storefront-feature-card.featured-product-card {
        flex-basis: 78vw;
        min-height: 468px;
    }
    .storefront-feature-card .featured-product-image {
        height: 235px;
    }
    .all-models-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

.reason-section {
    background: #f4f0e8;
}

.story-section {
    border-top: 1px solid rgba(218, 210, 198, .72);
}

/* Warm premium treatment for Why Choose cards */
.reason-section {
    background:
        radial-gradient(circle at 50% 0%, rgba(255,255,255,.62) 0 9%, transparent 30%),
        linear-gradient(180deg, #f4f0e8 0%, #eee7dc 100%);
}

.reason-section .section-header h2 {
    color: #2f251c;
}

.reason-section .section-header p {
    color: rgba(47, 37, 28, .72);
}

.reason-card {
    background: linear-gradient(180deg, #fffdf8 0%, #f8f1e7 100%);
    border: 1px solid rgba(190, 160, 113, .24);
    box-shadow: 0 12px 28px rgba(68, 52, 35, .06);
}

.reason-card h3 {
    color: #2f251c;
}

.reason-card img,
.reason-card-wide img {
    background: linear-gradient(180deg, #fbf5eb 0%, #eee2d2 100%);
    filter: saturate(.72) sepia(.16) hue-rotate(350deg) contrast(1.02) brightness(1.02);
    opacity: .94;
}

.reason-card:hover {
    border-color: rgba(177, 132, 69, .38);
    box-shadow: 0 16px 34px rgba(68, 52, 35, .10);
}

/* Warm controls for Customer Stories */
.story-section .case-dot::after {
    background: rgba(151, 112, 63, .24);
}

.story-section .case-dot[aria-current='true']::after {
    background: #9b6f35;
}

.story-section .case-arrow {
    color: #8d6638;
    border-color: rgba(177, 132, 69, .30);
    box-shadow: 0 12px 25px rgba(93, 67, 38, .10);
}

.story-section .case-arrow:hover:not(:disabled) {
    color: #6f4d29;
    border-color: rgba(177, 132, 69, .42);
}

.story-section .case-arrow:focus-visible,
.story-section .case-dot:focus-visible {
    outline-color: #9b6f35;
}

/* Slightly stronger warm-down for legacy blue illustration assets */
.reason-card img,
.reason-card-wide img {
    filter: saturate(.62) sepia(.20) hue-rotate(350deg) contrast(1.03) brightness(1.03);
}

/* Final warm overrides for remaining hard-coded blue accents */
.shop-model-card:hover button {
    background: #6f4d29;
}

.modal-spec-item span {
    color: #8d6638;
    border-color: rgba(177, 132, 69, .28);
    background: rgba(248, 241, 230, .72);
}

.shop-category-nav .icon-wrapper svg,
.shop-category-nav .icon-wrapper svg * {
    stroke: #8d6638;
}

.modal-more-link,
.category-hero .eyebrow,
.product-line-cover-card .product-line-cta {
    color: #8d6638;
}

.product-line-cover-card .product-line-cta {
    background: #8d6638;
    color: #fffaf3;
}

/* Final CTA system: warm premium buttons and links */
.inquiry-btn,
.shop-model-card button,
.modal-actions button,
.inquiry-submit,
.footer-outline-quote,
.footer-quote-link,
.featured-products-footer a,
.storefront-heading-link,
.all-models-group-head a,
.storefront-card-actions strong {
    transition: background .22s ease, color .22s ease, border-color .22s ease, box-shadow .22s ease, transform .22s ease;
}

.inquiry-btn,
.shop-model-card button,
.modal-actions button,
.inquiry-submit {
    background: linear-gradient(135deg, #4a3421 0%, #8d6638 58%, #b98f54 100%) !important;
    color: #fffaf3 !important;
    border: 1px solid rgba(255, 250, 243, .20) !important;
    box-shadow: 0 10px 24px rgba(93, 67, 38, .18);
}

.inquiry-btn:hover,
.shop-model-card:hover button,
.modal-actions button:hover,
.inquiry-submit:hover {
    background: linear-gradient(135deg, #3a2a1d 0%, #76522c 58%, #a37842 100%) !important;
    box-shadow: 0 14px 30px rgba(93, 67, 38, .24);
    transform: translateY(-1px);
}

.storefront-heading-link,
.all-models-group-head a,
.featured-products-footer a,
.modal-more-link {
    color: #8d6638 !important;
}

.storefront-heading-link:hover,
.all-models-group-head a:hover,
.featured-products-footer a:hover,
.modal-more-link:hover {
    color: #5f4123 !important;
}

.storefront-card-actions strong {
    color: #4a3421;
}

.storefront-card-actions small {
    color: rgba(74, 52, 33, .56);
}

/* Customer Stories warm editorial finish */
.story-section {
    background:
        radial-gradient(circle at 50% 0%, rgba(255,255,255,.68) 0 8%, transparent 31%),
        linear-gradient(180deg, #f4f0e8 0%, #eee6db 100%);
}

.story-header h2 {
    color: #2f251c;
}

.story-header p {
    color: rgba(47, 37, 28, .72);
}

.story-archive-note {
    color: rgba(74, 52, 33, .66);
    background: rgba(255, 250, 243, .68);
    border-color: rgba(190, 160, 113, .24);
}

.story-slide {
    background: linear-gradient(180deg, #fffdf8 0%, #f8f1e7 100%);
    border: 1px solid rgba(190, 160, 113, .24);
    box-shadow: 0 16px 36px rgba(68, 52, 35, .08);
}

.story-slide-evidence {
    background: linear-gradient(180deg, #fbf5eb 0%, #efe3d3 100%);
}

.story-slide-evidence img {
    filter: saturate(.82) sepia(.08) contrast(1.02) brightness(1.01);
}

.story-label {
    color: #9b6f35;
    background: rgba(190, 160, 113, .13);
    border-color: rgba(190, 160, 113, .26);
}

.story-slide-content h3 {
    color: #2f251c;
}

.story-meta span {
    color: rgba(74, 52, 33, .74);
    background: rgba(255, 250, 243, .72);
    border-color: rgba(190, 160, 113, .22);
}

.story-quote,
.story-source {
    color: rgba(47, 37, 28, .76);
}

.story-section .case-arrow {
    background: rgba(255, 250, 243, .88);
}

.story-section .case-arrow:hover:not(:disabled) {
    background: #fffaf3;
}

/* Restore visible Why Choose heading area */
.reason-section {
    padding-top: 56px !important;
}

.reason-section .container {
    overflow: visible;
}

.reason-section .section-header {
    position: relative;
    z-index: 2;
    display: block;
    min-height: 82px;
    margin: 0 0 28px !important;
    padding-top: 0 !important;
    overflow: visible;
}

.reason-section .section-header h2 {
    display: block;
    margin: 0 0 10px !important;
    color: #2f251c;
    font-size: clamp(30px, 3vw, 42px);
    line-height: 1.08;
    letter-spacing: -.04em;
}

.reason-section .section-header p {
    display: block;
    max-width: 880px;
    margin: 0 !important;
    color: rgba(47, 37, 28, .72);
    font-size: 15px;
    line-height: 1.7;
}

/* Smooth transition from product lineup to Why Choose */
#products {
    padding-bottom: 0;
    background: #f4f0e8;
}

#products::before {
    bottom: -96px;
    background:
        radial-gradient(circle at 16% 6%, rgba(255,255,255,.70) 0 8%, transparent 28%),
        linear-gradient(180deg, #f6f2eb 0%, #f0e9de 62%, #f4f0e8 100%);
}

.all-models-section {
    margin-bottom: 0;
    padding-bottom: 44px;
}

.all-models-section::before {
    bottom: -84px;
    background: linear-gradient(180deg, rgba(248,244,236,.92) 0%, rgba(244,240,232,.98) 82%, #f4f0e8 100%);
    box-shadow: none;
}

.reason-section {
    margin-top: 0;
    padding-top: 38px !important;
    background:
        linear-gradient(180deg, #f4f0e8 0%, #eee7dc 100%) !important;
}

.reason-section::before {
    content: '';
    display: block;
    height: 1px;
    margin-top: -1px;
    background: transparent;
}

.reason-section .section-header {
    margin-top: 0 !important;
}

/* Smooth transition around brand moment and stories */
.reason-section {
    padding-bottom: 54px;
}

.brand-moment-section {
    margin-top: 0;
    padding-top: 42px;
    padding-bottom: 58px;
    background:
        linear-gradient(180deg, #eee7dc 0%, #f2ede5 42%, #f4f0e8 100%) !important;
}

.story-section {
    border-top: 0;
    padding-top: 46px;
    background:
        linear-gradient(180deg, #f4f0e8 0%, #eee6db 100%) !important;
}

.main-footer {
    margin-top: 0;
}

/* About MACY-PAN brand intro section */
.about-brand-section {
    padding: 24px clamp(24px, 2.6vw, 44px) 52px;
    background:
        linear-gradient(180deg, #eee7dc 0%, #f2ede5 100%);
}

.about-brand-card {
    display: grid;
    grid-template-columns: minmax(0, 1.35fr) minmax(340px, .9fr);
    gap: clamp(32px, 5vw, 76px);
    align-items: center;
    max-width: none;
    padding: clamp(34px, 4vw, 58px);
    border: 1px solid rgba(190, 160, 113, .24);
    border-radius: 24px;
    background:
        radial-gradient(circle at 0% 0%, rgba(255,255,255,.78) 0 10%, transparent 34%),
        linear-gradient(135deg, #fffdf8 0%, #f6eee2 100%);
    box-shadow: 0 20px 46px rgba(68, 52, 35, .08);
}

.about-brand-copy .section-kicker {
    margin: 0 0 14px;
    color: #9b6f35;
    font-size: 11px;
    font-weight: 800;
    letter-spacing: .18em;
}

.about-brand-copy h2 {
    max-width: 760px;
    margin: 0 0 22px;
    color: #2f251c;
    font-size: clamp(34px, 4vw, 58px);
    line-height: .98;
    letter-spacing: -.06em;
}

.about-brand-copy p {
    max-width: 760px;
    margin: 0 0 14px;
    color: rgba(47, 37, 28, .74);
    font-size: 15px;
    line-height: 1.75;
}

.about-brand-proof {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px;
}

.about-brand-proof div {
    min-height: 142px;
    padding: 22px 20px;
    border: 1px solid rgba(190, 160, 113, .24);
    border-radius: 18px;
    background: rgba(255, 250, 243, .72);
    box-shadow: inset 0 1px 0 rgba(255,255,255,.52);
}

.about-brand-proof strong {
    display: block;
    margin-bottom: 10px;
    color: #4a3421;
    font-size: clamp(22px, 2vw, 34px);
    line-height: 1;
    letter-spacing: -.045em;
}

.about-brand-proof span {
    display: block;
    color: rgba(74, 52, 33, .66);
    font-size: 13px;
    line-height: 1.5;
}

@media (max-width: 1000px) {
    .about-brand-card {
        grid-template-columns: 1fr;
    }
    .about-brand-proof {
        grid-template-columns: repeat(4, minmax(0, 1fr));
    }
}

@media (max-width: 720px) {
    .about-brand-section {
        padding-left: 18px;
        padding-right: 18px;
    }
    .about-brand-card {
        padding: 28px 22px;
        border-radius: 18px;
    }
    .about-brand-proof {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 460px) {
    .about-brand-proof {
        grid-template-columns: 1fr;
    }
}
