/* Keyzape Home Builder – lightweight, theme-independent homepage styles */
.khb-home,
.khb-home * {
    box-sizing: border-box;
}

.khb-home {
    width: 100%;
    color: var(--khb-text, #172033);
    background: var(--khb-page-bg, #f6f8fc);
    font-family: inherit;
    overflow: clip;
}

.khb-home a {
    text-decoration: none;
}

.khb-fullbleed {
    position: relative;
    left: 50%;
    width: 100vw;
    max-width: 100vw;
    margin-left: -50vw;
}

.khb-container {
    width: min(calc(100% - 36px), var(--khb-width, 1380px));
    margin-inline: auto;
}

.khb-section {
    padding: clamp(46px, 6vw, 86px) 0;
    content-visibility: auto;
    contain-intrinsic-size: 1px 700px;
}

.khb-section + .khb-section {
    padding-top: 0;
}

.khb-eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 14px;
    color: var(--khb-accent, #1463ff);
    font-size: 12px;
    font-weight: 800;
    line-height: 1.2;
    letter-spacing: .14em;
    text-transform: uppercase;
}

.khb-eyebrow::before {
    width: 28px;
    height: 2px;
    background: currentColor;
    border-radius: 999px;
    content: "";
}

/* Hide WoodMart/page-builder title only on the shortcode page. */
.khb-homepage-active.khb-hide-page-title .page-title,
.khb-homepage-active.khb-hide-page-title .entry-title,
.khb-homepage-active.khb-hide-page-title .wd-page-title,
.khb-homepage-active.khb-hide-page-title .title-size-small,
.khb-homepage-active.khb-hide-page-title .title-size-default,
.khb-homepage-active.khb-hide-page-title .title-size-large {
    display: none !important;
}

.khb-homepage-active .main-page-wrapper,
.khb-homepage-active .site-content,
.khb-homepage-active .content-layout-wrapper {
    padding-top: 0 !important;
}

.khb-homepage-active .site-content > .container,
.khb-homepage-active .main-page-wrapper > .container,
.khb-homepage-active .content-layout-wrapper {
    max-width: none !important;
    width: 100% !important;
    padding-inline: 0 !important;
}

/* Hero */
.khb-hero {
    min-height: var(--khb-hero-height, 480px);
    display: grid;
    align-items: center;
    isolation: isolate;
    overflow: hidden;
    color: #fff;
    background:
        radial-gradient(circle at 82% 20%, rgba(20, 99, 255, .45), transparent 34%),
        linear-gradient(125deg, #071226 0%, var(--khb-accent-dark, #0b1b3a) 56%, #123b85 100%);
}

.khb-hero-media,
.khb-hero-media img,
.khb-hero-overlay {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
}

.khb-hero-media {
    z-index: -3;
}

.khb-hero-media img {
    object-fit: cover;
    object-position: center;
}

.khb-hero-overlay {
    z-index: -2;
    background: linear-gradient(90deg, rgba(5, 13, 30, var(--khb-overlay, .55)) 0%, rgba(5, 13, 30, calc(var(--khb-overlay, .55) * .72)) 48%, rgba(5, 13, 30, .12) 100%);
}

.khb-hero-inner {
    display: flex;
    align-items: center;
    min-height: var(--khb-hero-height, 480px);
    padding-block: 54px;
}

.khb-hero-copy {
    width: min(680px, 100%);
}

.khb-align-center .khb-hero-copy {
    margin-inline: auto;
    text-align: center;
}

.khb-align-center .khb-eyebrow,
.khb-align-center .khb-hero-actions {
    justify-content: center;
}

.khb-hero h1 {
    margin: 0;
    color: #fff;
    font-size: clamp(36px, 5.3vw, 74px);
    font-weight: 800;
    line-height: 1.03;
    letter-spacing: -.045em;
    text-wrap: balance;
}

.khb-hero p {
    max-width: 620px;
    margin: 22px 0 0;
    color: rgba(255,255,255,.82);
    font-size: clamp(16px, 1.5vw, 20px);
    line-height: 1.65;
}

.khb-align-center .khb-hero p {
    margin-inline: auto;
}

.khb-hero-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-top: 30px;
}

.khb-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 48px;
    padding: 12px 22px;
    border: 1px solid transparent;
    border-radius: 12px;
    font-size: 14px;
    font-weight: 800;
    line-height: 1;
    transition: transform .2s ease, background-color .2s ease, border-color .2s ease;
}

.khb-btn:hover {
    transform: translateY(-2px);
}

.khb-btn-primary {
    color: #fff !important;
    background: var(--khb-accent, #1463ff);
    box-shadow: 0 12px 32px rgba(20,99,255,.28);
}

.khb-btn-secondary {
    color: #fff !important;
    border-color: rgba(255,255,255,.38);
    background: rgba(255,255,255,.09);
    backdrop-filter: blur(8px);
}

/* Trust strip */
.khb-trust-wrap {
    z-index: 4;
    margin-top: -28px;
    background: transparent;
}

.khb-trust-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    border: 1px solid rgba(19, 34, 60, .08);
    border-radius: 18px;
    background: var(--khb-surface, #fff);
    box-shadow: 0 16px 46px rgba(21, 35, 66, .1);
    overflow: hidden;
}

.khb-trust-item {
    display: flex;
    align-items: center;
    gap: 13px;
    min-width: 0;
    padding: 20px;
}

.khb-trust-item + .khb-trust-item {
    border-left: 1px solid rgba(19, 34, 60, .08);
}

.khb-trust-icon {
    flex: 0 0 42px;
    display: grid;
    place-items: center;
    width: 42px;
    height: 42px;
    border-radius: 12px;
    color: var(--khb-accent, #1463ff);
    background: color-mix(in srgb, var(--khb-accent, #1463ff) 10%, #fff);
}

.khb-trust-icon svg {
    width: 22px;
    height: 22px;
    fill: currentColor;
}

.khb-trust-item strong,
.khb-trust-item small {
    display: block;
}

.khb-trust-item strong {
    color: var(--khb-text, #172033);
    font-size: 14px;
    line-height: 1.25;
}

.khb-trust-item small {
    margin-top: 4px;
    color: var(--khb-muted, #687386);
    font-size: 12px;
    line-height: 1.35;
}

/* Section headings */
.khb-section-head {
    display: flex;
    align-items: end;
    justify-content: space-between;
    gap: 24px;
    margin-bottom: 26px;
}

.khb-section-head h2 {
    margin: 0;
    color: var(--khb-text, #172033);
    font-size: clamp(27px, 3.2vw, 42px);
    font-weight: 800;
    line-height: 1.12;
    letter-spacing: -.035em;
}

.khb-section-head p {
    margin: 8px 0 0;
    color: var(--khb-muted, #687386);
    font-size: 15px;
    line-height: 1.55;
}

.khb-text-link {
    flex: none;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: var(--khb-accent, #1463ff) !important;
    font-size: 14px;
    font-weight: 800;
}

.khb-text-link span {
    font-size: 20px;
    line-height: 1;
}

/* Categories */
.khb-categories-section {
    padding-top: clamp(68px, 8vw, 104px);
}

.khb-category-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 16px;
}

.khb-category-card {
    position: relative;
    display: grid;
    grid-template-columns: 78px minmax(0, 1fr) 26px;
    align-items: center;
    gap: 16px;
    min-width: 0;
    padding: 16px;
    border: 1px solid rgba(19, 34, 60, .08);
    border-radius: 18px;
    color: var(--khb-text, #172033) !important;
    background: var(--khb-surface, #fff);
    box-shadow: 0 8px 26px rgba(21, 35, 66, .05);
    transition: transform .2s ease, box-shadow .2s ease, border-color .2s ease;
}

.khb-category-card:hover {
    transform: translateY(-3px);
    border-color: color-mix(in srgb, var(--khb-accent, #1463ff) 30%, transparent);
    box-shadow: 0 14px 34px rgba(21, 35, 66, .1);
}

.khb-category-media {
    display: grid;
    place-items: center;
    width: 78px;
    aspect-ratio: 1 / 1;
    border-radius: 14px;
    overflow: hidden;
    background: #eef3ff;
}

.khb-category-media img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.khb-category-placeholder {
    color: var(--khb-accent, #1463ff);
    font-size: 30px;
    font-weight: 900;
}

.khb-category-copy {
    min-width: 0;
}

.khb-category-copy strong,
.khb-category-copy small {
    display: block;
}

.khb-category-copy strong {
    overflow: hidden;
    color: var(--khb-text, #172033);
    font-size: 15px;
    font-weight: 800;
    line-height: 1.35;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.khb-category-copy small {
    margin-top: 5px;
    color: var(--khb-muted, #687386);
    font-size: 12px;
    line-height: 1.4;
}

.khb-category-arrow {
    color: var(--khb-accent, #1463ff);
    font-size: 22px;
}

/* Products */
.khb-product-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 16px;
}

.khb-product-card {
    position: relative;
    min-width: 0;
    margin: 0;
    border: 1px solid rgba(19, 34, 60, .08);
    border-radius: 18px;
    background: var(--khb-surface, #fff);
    box-shadow: 0 8px 28px rgba(21, 35, 66, .055);
    overflow: hidden;
    transition: transform .2s ease, box-shadow .2s ease;
}

.khb-product-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 16px 38px rgba(21, 35, 66, .11);
}

.khb-product-media {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    aspect-ratio: 1 / 1;
    padding: 0;
    overflow: hidden;
    background: #f2f5fa;
}

.khb-product-media img,
.khb-product-media .khb-product-image,
.khb-product-card img {
    display: block !important;
    width: 100% !important;
    height: 100% !important;
    max-width: 100% !important;
    margin: 0 !important;
    object-fit: contain !important;
    object-position: center !important;
}

.khb-sale-badge {
    position: absolute;
    z-index: 2;
    top: 12px;
    left: 12px;
    display: inline-flex;
    align-items: center;
    min-height: 25px;
    padding: 5px 9px;
    border-radius: 999px;
    color: #fff;
    background: var(--khb-accent-dark, #0b1b3a);
    font-size: 10px;
    font-weight: 800;
    line-height: 1;
    text-transform: uppercase;
}

.khb-product-body {
    display: flex;
    flex-direction: column;
    min-height: 154px;
    padding: 15px;
}

.khb-product-body h3 {
    display: -webkit-box;
    min-height: 42px;
    margin: 0 0 8px;
    overflow: hidden;
    color: var(--khb-text, #172033);
    font-size: 14px;
    font-weight: 750;
    line-height: 1.48;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
}

.khb-product-body h3 a {
    color: inherit !important;
}

.khb-product-price {
    min-height: 26px;
    margin-bottom: 13px;
    color: var(--khb-text, #172033);
    font-size: 15px;
    font-weight: 800;
}

.khb-product-price del {
    margin-right: 4px;
    color: var(--khb-muted, #687386);
    font-weight: 500;
    opacity: .65;
}

.khb-product-price ins {
    color: inherit;
    text-decoration: none;
}

.khb-product-button {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 42px;
    margin-top: auto;
    padding: 10px 13px;
    border-radius: 11px;
    color: #fff !important;
    background: var(--khb-accent-dark, #0b1b3a);
    font-size: 13px;
    font-weight: 800;
    line-height: 1;
}

.khb-product-button:hover {
    color: #fff !important;
    background: var(--khb-accent, #1463ff);
}

.khb-empty {
    padding: 28px;
    border: 1px dashed rgba(19, 34, 60, .18);
    border-radius: 16px;
    color: var(--khb-muted, #687386);
    text-align: center;
    background: var(--khb-surface, #fff);
}

/* Promo */
.khb-promo-card {
    display: grid;
    grid-template-columns: minmax(0, 1.1fr) minmax(300px, .9fr);
    min-height: 360px;
    border-radius: 26px;
    color: #fff;
    background:
        radial-gradient(circle at 20% 10%, rgba(20,99,255,.65), transparent 38%),
        linear-gradient(125deg, #071226 0%, var(--khb-accent-dark, #0b1b3a) 100%);
    overflow: hidden;
}

.khb-promo-no-image {
    grid-template-columns: 1fr;
}

.khb-promo-copy {
    align-self: center;
    padding: clamp(32px, 5vw, 68px);
}

.khb-promo-copy h2 {
    max-width: 700px;
    margin: 0;
    color: #fff;
    font-size: clamp(30px, 4vw, 52px);
    font-weight: 800;
    line-height: 1.08;
    letter-spacing: -.04em;
}

.khb-promo-copy p {
    max-width: 630px;
    margin: 18px 0 26px;
    color: rgba(255,255,255,.76);
    font-size: 16px;
    line-height: 1.65;
}

.khb-promo-media {
    min-height: 360px;
}

.khb-promo-media img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* FAQ */
.khb-faq-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px;
}

.khb-faq-item {
    border: 1px solid rgba(19, 34, 60, .08);
    border-radius: 15px;
    background: var(--khb-surface, #fff);
    box-shadow: 0 7px 24px rgba(21, 35, 66, .04);
    overflow: hidden;
}

.khb-faq-item summary {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    padding: 20px;
    color: var(--khb-text, #172033);
    font-size: 15px;
    font-weight: 800;
    line-height: 1.45;
    cursor: pointer;
    list-style: none;
}

.khb-faq-item summary::-webkit-details-marker {
    display: none;
}

.khb-faq-item summary span {
    flex: 0 0 30px;
    display: grid;
    place-items: center;
    width: 30px;
    height: 30px;
    border-radius: 9px;
    color: var(--khb-accent, #1463ff);
    background: color-mix(in srgb, var(--khb-accent, #1463ff) 10%, #fff);
    font-size: 20px;
    transition: transform .2s ease;
}

.khb-faq-item[open] summary span {
    transform: rotate(45deg);
}

.khb-faq-item > div {
    padding: 0 20px 20px;
    color: var(--khb-muted, #687386);
    font-size: 14px;
    line-height: 1.7;
}

.khb-faq-item > div p {
    margin: 0;
}

@media (max-width: 1100px) {
    .khb-trust-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
    .khb-trust-item:nth-child(3) {
        border-left: 0;
        border-top: 1px solid rgba(19, 34, 60, .08);
    }
    .khb-trust-item:nth-child(4) {
        border-top: 1px solid rgba(19, 34, 60, .08);
    }
    .khb-category-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
    .khb-product-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }
}

@media (max-width: 767px) {
    .khb-container {
        width: min(calc(100% - 24px), var(--khb-width, 1380px));
    }
    .khb-hero {
        min-height: max(520px, var(--khb-hero-height, 480px));
        align-items: end;
    }
    .khb-hero-inner {
        min-height: max(520px, var(--khb-hero-height, 480px));
        padding-block: 54px 44px;
        align-items: end;
    }
    .khb-hero-overlay {
        background: linear-gradient(0deg, rgba(5,13,30,.9) 0%, rgba(5,13,30,.54) 58%, rgba(5,13,30,.18) 100%);
    }
    .khb-hero h1 {
        font-size: clamp(34px, 10vw, 49px);
    }
    .khb-hero p {
        font-size: 15px;
    }
    .khb-btn {
        min-height: 46px;
        padding-inline: 17px;
    }
    .khb-trust-wrap {
        margin-top: -18px;
    }
    .khb-trust-grid {
        grid-template-columns: 1fr 1fr;
        border-radius: 15px;
    }
    .khb-trust-item {
        align-items: flex-start;
        gap: 9px;
        padding: 13px 10px;
    }
    .khb-trust-icon {
        flex-basis: 34px;
        width: 34px;
        height: 34px;
        border-radius: 9px;
    }
    .khb-trust-icon svg {
        width: 18px;
        height: 18px;
    }
    .khb-trust-item strong {
        font-size: 12px;
    }
    .khb-trust-item small {
        display: none;
    }
    .khb-section {
        padding-block: 48px;
    }
    .khb-section-head {
        align-items: flex-start;
        margin-bottom: 20px;
    }
    .khb-section-head h2 {
        font-size: 28px;
    }
    .khb-section-head p {
        font-size: 13px;
    }
    .khb-text-link {
        display: none;
    }
    .khb-category-grid {
        grid-template-columns: 1fr;
        gap: 11px;
    }
    .khb-category-card {
        grid-template-columns: 62px minmax(0, 1fr) 24px;
        gap: 12px;
        padding: 11px;
        border-radius: 14px;
    }
    .khb-category-media {
        width: 62px;
        border-radius: 11px;
    }
    .khb-product-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 11px;
    }
    .khb-product-card {
        border-radius: 14px;
    }
    .khb-product-body {
        min-height: 142px;
        padding: 11px;
    }
    .khb-product-body h3 {
        min-height: 39px;
        font-size: 12.5px;
    }
    .khb-product-price {
        font-size: 13px;
    }
    .khb-product-button {
        min-height: 39px;
        padding-inline: 8px;
        font-size: 11.5px;
    }
    .khb-sale-badge {
        top: 8px;
        left: 8px;
        min-height: 22px;
        font-size: 9px;
    }
    .khb-promo-card {
        grid-template-columns: 1fr;
        min-height: 0;
        border-radius: 20px;
    }
    .khb-promo-copy {
        padding: 34px 24px;
    }
    .khb-promo-copy h2 {
        font-size: 33px;
    }
    .khb-promo-media {
        min-height: 240px;
        order: -1;
    }
    .khb-faq-grid {
        grid-template-columns: 1fr;
    }
    .khb-faq-item summary {
        padding: 17px;
        font-size: 14px;
    }
}

@media (max-width: 380px) {
    .khb-product-grid {
        gap: 8px;
    }
    .khb-product-body {
        padding: 9px;
    }
}

@media (prefers-reduced-motion: reduce) {
    .khb-btn,
    .khb-category-card,
    .khb-product-card,
    .khb-faq-item summary span {
        transition: none;
    }
}
