/*
 * RIFT Modern Nordic theme layer
 * Purpose: clean, contemporary outdoor retail direction for the KPdesign preview.
 * Loaded after the original RIFT design system so WooCommerce structure and
 * custom template functionality remain intact.
 */

:root {
    --rift-navy: #1d2925;
    --rift-blue: #365c4d;
    --rift-coral: #bd8864;
    --rift-lime: #dce4dc;
    --rift-cream: #f7f6f1;
    --rift-white: #ffffff;
    --rift-muted: #68736e;
    --rift-border: #d7ddd9;
    --rift-success: #2f6b4f;
    --rift-sale: #f0e4d8;
    --rift-radius: 18px;
    --rift-container: min(1180px, calc(100% - 48px));
}

html { background: var(--rift-cream); }

body.rift-design-system {
    background: var(--rift-cream) !important;
    color: var(--rift-navy);
    font-family: Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif !important;
    font-size: 17px;
    line-height: 1.65;
    -webkit-font-smoothing: antialiased;
}

body.rift-design-system h1,
body.rift-design-system h2,
body.rift-design-system h3,
body.rift-design-system h4,
body.rift-design-system h5,
body.rift-design-system h6,
body.rift-design-system .woocommerce-loop-product__title {
    color: var(--rift-navy);
    font-family: Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif !important;
    font-weight: 650 !important;
    letter-spacing: -0.035em !important;
    line-height: 1.08;
    text-transform: none !important;
}

body.rift-design-system p { color: #4f5d57; }
body.rift-design-system a { text-underline-offset: 3px; }

.rift-site-header {
    background: rgba(247, 246, 241, .94) !important;
    border-bottom: 1px solid rgba(29, 41, 37, .12) !important;
    box-shadow: none !important;
    backdrop-filter: blur(16px);
}

.rift-header-inner {
    min-height: 84px;
    gap: 34px;
}

.rift-logo {
    padding: 7px 13px !important;
    border: 0 !important;
    border-radius: 8px !important;
    background: var(--rift-navy) !important;
    box-shadow: none !important;
    color: var(--rift-white) !important;
    font-size: 1.05rem !important;
    font-weight: 700 !important;
    letter-spacing: .16em !important;
}

.rift-logo::after { display: none !important; }

.rift-main-nav { gap: 30px; }
.rift-main-nav a {
    color: var(--rift-navy) !important;
    font-size: .82rem !important;
    font-weight: 650 !important;
    letter-spacing: .08em !important;
    text-transform: uppercase;
}
.rift-main-nav a:hover { color: var(--rift-blue) !important; }

.rift-header-action,
.rift-menu-toggle {
    width: 42px !important;
    height: 42px !important;
    border: 1px solid var(--rift-border) !important;
    border-radius: 50% !important;
    background: rgba(255,255,255,.78) !important;
    box-shadow: none !important;
    color: var(--rift-navy) !important;
}

.rift-cart-count {
    background: var(--rift-blue) !important;
    color: #fff !important;
    border: 2px solid var(--rift-cream) !important;
    box-shadow: none !important;
}

.rift-section { padding-block: clamp(64px, 8vw, 112px) !important; }
.rift-section + .rift-section { border-top: 1px solid rgba(29,41,37,.08); }

.rift-kicker {
    color: var(--rift-blue) !important;
    font-size: .74rem !important;
    font-weight: 700 !important;
    letter-spacing: .15em !important;
    text-transform: uppercase;
}
.rift-kicker::before { background: var(--rift-coral) !important; height: 1px !important; }

.rift-hero {
    margin: clamp(28px, 5vw, 64px) auto !important;
    padding: clamp(42px, 7vw, 84px) !important;
    border: 0 !important;
    border-radius: 28px !important;
    background:
        radial-gradient(circle at 84% 16%, rgba(220,228,220,.18), transparent 32%),
        linear-gradient(135deg, #29443a 0%, #365c4d 100%) !important;
    box-shadow: 0 24px 70px rgba(29, 41, 37, .14) !important;
    gap: clamp(40px, 7vw, 88px) !important;
}

.rift-hero::before,
.rift-hero::after { display: none !important; }

.rift-hero h1 {
    max-width: 720px;
    margin-bottom: 24px !important;
    color: #fff !important;
    font-size: clamp(3.25rem, 7vw, 6.7rem) !important;
    font-weight: 590 !important;
    letter-spacing: -.055em !important;
    line-height: .94 !important;
    text-transform: none !important;
}

.rift-hero p {
    max-width: 580px !important;
    color: rgba(255,255,255,.78) !important;
    font-size: clamp(1rem, 1.5vw, 1.2rem) !important;
}

.rift-hero .rift-kicker { color: #dce4dc !important; }

.rift-hero-visual img {
    border: 0 !important;
    border-radius: 24px !important;
    box-shadow: none !important;
    filter: saturate(.62) contrast(.96) !important;
    transform: none !important;
}

.rift-actions { gap: 12px !important; }

.rift-button,
body.rift-design-system .button,
body.rift-design-system button.button,
body.rift-design-system input.button,
.woofc-area .woofc-action-inner > div a {
    min-height: 48px !important;
    padding: 12px 20px !important;
    border: 1px solid transparent !important;
    border-radius: 10px !important;
    background: var(--rift-navy) !important;
    box-shadow: none !important;
    color: #fff !important;
    font-family: inherit !important;
    font-size: .78rem !important;
    font-weight: 700 !important;
    letter-spacing: .08em !important;
    text-transform: uppercase !important;
    transition: background .2s ease, color .2s ease, transform .2s ease !important;
}

.rift-button:hover,
body.rift-design-system .button:hover,
body.rift-design-system button.button:hover,
.woofc-area .woofc-action-inner > div a:hover {
    background: var(--rift-blue) !important;
    transform: translateY(-1px) !important;
}

.rift-button--ghost,
.rift-hero .rift-button {
    background: #fff !important;
    color: var(--rift-navy) !important;
}
.rift-hero .rift-button:first-child {
    background: #dce4dc !important;
    color: var(--rift-navy) !important;
}

.rift-section-heading {
    align-items: end !important;
    gap: 32px !important;
    margin-bottom: clamp(34px, 5vw, 58px) !important;
}
.rift-section-heading h2 {
    max-width: 820px;
    font-size: clamp(2.5rem, 5.5vw, 5.1rem) !important;
    font-weight: 590 !important;
    letter-spacing: -.055em !important;
}
.rift-section-heading p { max-width: 500px !important; }

.rift-category-grid { gap: 16px !important; }
.rift-category-card {
    min-height: 230px !important;
    padding: 28px !important;
    border: 1px solid var(--rift-border) !important;
    border-radius: 18px !important;
    background: rgba(255,255,255,.72) !important;
    box-shadow: none !important;
    color: var(--rift-navy) !important;
    transition: transform .2s ease, border-color .2s ease, background .2s ease !important;
}
.rift-category-card:nth-child(2),
.rift-category-card:nth-child(4) { background: #edf0ec !important; }
.rift-category-card:nth-child(3) { background: #f3ebe4 !important; }
.rift-category-card:hover {
    background: #fff !important;
    border-color: #aebbb4 !important;
    box-shadow: none !important;
    transform: translateY(-4px) !important;
}
.rift-category-card h3 { font-size: clamp(1.35rem, 2.1vw, 1.8rem) !important; }
.rift-category-card > span:first-child { color: var(--rift-muted) !important; }

.woocommerce ul.products {
    gap: 24px !important;
}
.woocommerce ul.products li.product {
    border: 1px solid var(--rift-border) !important;
    border-radius: 18px !important;
    background: #fff !important;
    box-shadow: 0 10px 32px rgba(29,41,37,.06) !important;
    transition: transform .25s ease, box-shadow .25s ease !important;
}
.woocommerce ul.products li.product:hover {
    box-shadow: 0 18px 44px rgba(29,41,37,.10) !important;
    transform: translateY(-5px) !important;
}
.woocommerce ul.products li.product a img {
    margin-bottom: 0 !important;
    border-bottom: 0 !important;
    background: #ecebe6 !important;
    filter: saturate(.58) contrast(.95) !important;
}
.woocommerce ul.products li.product .woocommerce-loop-product__title,
.woocommerce ul.products li.product .price,
.woocommerce ul.products li.product .rift-product-brand,
.woocommerce ul.products li.product .button { margin-inline: 22px !important; }
.woocommerce ul.products li.product .woocommerce-loop-product__title {
    padding-top: 22px !important;
    font-size: 1.22rem !important;
}
.rift-product-brand {
    color: var(--rift-muted) !important;
    font-size: .7rem !important;
    font-weight: 700 !important;
    letter-spacing: .12em !important;
}
.woocommerce ul.products li.product .price,
.woocommerce div.product span.price {
    color: var(--rift-navy) !important;
    font-weight: 650 !important;
}
.woocommerce span.onsale {
    top: 14px !important;
    left: 14px !important;
    padding: 7px 10px !important;
    border: 0 !important;
    border-radius: 999px !important;
    background: var(--rift-sale) !important;
    color: var(--rift-navy) !important;
    font-size: .68rem !important;
    font-weight: 700 !important;
    letter-spacing: .08em !important;
}

.rift-brand-panel,
.rift-campaign {
    padding: clamp(42px, 6vw, 74px) !important;
    border: 1px solid var(--rift-border) !important;
    border-radius: 24px !important;
    box-shadow: none !important;
}
.rift-brand-panel { background: #edf0ec !important; }
.rift-campaign { background: var(--rift-navy) !important; }
.rift-campaign[style] {
    background: #edf0ec !important;
    color: var(--rift-navy) !important;
}
.rift-campaign[style] h2,
.rift-campaign[style] p { color: var(--rift-navy) !important; }
.rift-campaign[style] .rift-kicker { color: var(--rift-blue) !important; }
.rift-brand-panel h2,
.rift-campaign h2 {
    font-size: clamp(2.5rem, 5vw, 4.8rem) !important;
    font-weight: 590 !important;
}
.rift-campaign h2,
.rift-campaign p { color: #fff !important; }
.rift-campaign-badge,
.rift-brand-panel-badge,
.rift-badge {
    border: 1px solid rgba(29,41,37,.12) !important;
    border-radius: 50% !important;
    background: #dce4dc !important;
    box-shadow: none !important;
    color: var(--rift-navy) !important;
}

.rift-page-hero,
.rift-shop-intro {
    width: min(1180px, calc(100% - 48px)) !important;
    margin: clamp(28px, 5vw, 64px) auto 48px !important;
    padding: clamp(40px, 6vw, 72px) !important;
    border: 1px solid var(--rift-border) !important;
    border-radius: 24px !important;
    background: #edf0ec !important;
    box-shadow: none !important;
}
.rift-page-hero h1,
.rift-shop-intro h1 {
    font-size: clamp(2.8rem, 6vw, 5.8rem) !important;
    font-weight: 590 !important;
    letter-spacing: -.055em !important;
}

.single-product .et_builder_inner_content.product {
    display: block !important;
    grid-template-columns: none !important;
}
.single-product ul.products li.product {
    display: block !important;
    grid-template-columns: none !important;
}
.single-product .rift-product-template > .product {
    display: block !important;
    grid-template-columns: none !important;
}
.single-product .rift-product-template > .product > .clearfix {
    display: grid !important;
    grid-template-columns: minmax(0, 1.05fr) minmax(360px, .95fr) !important;
    gap: clamp(36px, 6vw, 76px) !important;
    align-items: start !important;
}
.single-product .rift-product-template > .product > .clearfix::before,
.single-product .rift-product-template > .product > .clearfix::after,
.single-product .rift-product-template > .product > .clearfix > .bodycommerce-sale-badge {
    display: none !important;
    content: none !important;
}
.single-product .woocommerce-product-gallery {
    border: 1px solid var(--rift-border) !important;
    border-radius: 22px !important;
    box-shadow: none !important;
}
.single-product .woocommerce-product-gallery img {
    filter: saturate(.58) contrast(.95) !important;
}
.single-product div.product .product_title {
    font-size: clamp(2.6rem, 5vw, 4.8rem) !important;
    font-weight: 590 !important;
}

body.rift-design-system input.input-text,
body.rift-design-system textarea,
body.rift-design-system select,
body.rift-design-system .select2-container--default .select2-selection--single {
    min-height: 50px;
    border: 1px solid #cdd5d0 !important;
    border-radius: 10px !important;
    background: #fff !important;
    box-shadow: none !important;
    color: var(--rift-navy) !important;
}

.rift-content-card,
.rift-legal,
.rift-contact-grid,
.woocommerce-account .woocommerce,
.woocommerce-cart-form,
.cart-collaterals,
form.checkout,
.woocommerce-form-coupon,
.woocommerce-form-login {
    border-radius: 18px !important;
}

.woocommerce-cart-form,
.cart-collaterals,
.woocommerce-checkout .col2-set,
.woocommerce-checkout #order_review,
.woocommerce-tabs.wc-tabs-wrapper {
    border: 1px solid var(--rift-border) !important;
    border-radius: 18px !important;
    background: #fff !important;
    box-shadow: 0 10px 32px rgba(29,41,37,.06) !important;
}
.woocommerce-cart-form table.shop_table,
.woocommerce-checkout table.shop_table { border-color: var(--rift-border) !important; }
.woocommerce-tabs ul.tabs li {
    border-color: var(--rift-border) !important;
    background: #edf0ec !important;
    box-shadow: none !important;
}

.rift-legal-note,
.woocommerce-info,
.woocommerce-message,
.woocommerce-error {
    border: 1px solid var(--rift-border) !important;
    border-radius: 12px !important;
    background: #edf0ec !important;
    color: var(--rift-navy) !important;
    box-shadow: none !important;
}

.rift-site-footer {
    margin-top: clamp(72px, 10vw, 140px);
    background: #16211d !important;
    color: rgba(255,255,255,.76) !important;
}
.rift-site-footer h3,
.rift-site-footer h4,
.rift-site-footer a { color: #fff !important; }
.rift-site-footer p { color: rgba(255,255,255,.66) !important; }
.rift-footer-grid { gap: clamp(36px, 6vw, 84px) !important; }

.woofc-area {
    font-family: Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif !important;
}
.woofc-area .woofc-inner {
    border-left: 1px solid var(--rift-border) !important;
    box-shadow: -18px 0 54px rgba(29,41,37,.14) !important;
}

@media (max-width: 980px) {
    :root { --rift-container: min(100% - 36px, 1180px); }
    .single-product .rift-product-template > .product > .clearfix { grid-template-columns: 1fr !important; }
    .rift-header-inner { min-height: 76px; }
    .rift-main-nav {
        border: 1px solid var(--rift-border) !important;
        border-radius: 14px !important;
        background: rgba(255,255,255,.98) !important;
        box-shadow: 0 20px 50px rgba(29,41,37,.12) !important;
    }
    .rift-hero {
        padding: 44px 32px !important;
        border-radius: 22px !important;
    }
    .rift-hero h1 { font-size: clamp(3rem, 13vw, 5rem) !important; }
    .rift-category-card { min-height: 190px !important; }
}

@media (max-width: 640px) {
    :root { --rift-container: calc(100% - 28px); }
    body.rift-design-system { font-size: 16px; }
    .rift-header-inner { padding-inline: 14px !important; }
    .rift-logo { font-size: .9rem !important; }
    .rift-section { padding-block: 62px !important; }
    .rift-hero {
        width: calc(100% - 20px) !important;
        margin: 20px auto 42px !important;
        padding: 38px 22px 28px !important;
        gap: 32px !important;
        border-radius: 20px !important;
    }
    .rift-hero h1 {
        font-size: clamp(3rem, 15vw, 4.3rem) !important;
        line-height: .92 !important;
    }
    .rift-hero p { font-size: .98rem !important; }
    .rift-hero-visual { min-height: 0 !important; }
    .rift-hero-visual img { border-radius: 18px !important; }
    .rift-section-heading h2 { font-size: clamp(2.35rem, 12vw, 3.6rem) !important; }
    .rift-category-grid { gap: 12px !important; }
    .rift-category-card {
        min-height: 170px !important;
        padding: 24px !important;
        border-radius: 14px !important;
    }
    .woocommerce ul.products { gap: 18px !important; }
    .woocommerce ul.products li.product { border-radius: 14px !important; }
    .rift-brand-panel,
    .rift-campaign,
    .rift-page-hero,
    .rift-shop-intro {
        width: calc(100% - 28px) !important;
        padding: 32px 24px !important;
        border-radius: 18px !important;
    }
    .rift-brand-panel h2,
    .rift-campaign h2,
    .rift-page-hero h1,
    .rift-shop-intro h1 { font-size: clamp(2.3rem, 12vw, 3.5rem) !important; }
    .rift-footer-grid { gap: 42px !important; }
}

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