/* Header, mobile menu and homepage sections. Loaded after app.min.css. */

:root {
    --d-ink: #222;
    --d-muted: #6b6b6b;
    --d-line: #e6e6e6;
    --d-soft: #f6f6f8;
    --d-blue: #2ea3f2;
}

/* ---------- Top bar ---------- */
.h__top .header-text {
    color: var(--d-muted);
    letter-spacing: 0.2px;
}

    .h__top .header-text a {
        color: var(--d-ink);
        text-decoration: underline;
        text-underline-offset: 2px;
    }

.h__top .top-links a {
    color: var(--d-muted);
}

    .h__top .top-links a:hover {
        color: var(--d-ink);
    }

/* ---------- Desktop navbar ---------- */
.navbar-custom {
    border-bottom: 1px solid var(--d-line);
}

    .navbar-custom .navbar-nav .nav-item .nav-link {
        font-size: 14px;
        padding-left: 14px !important;
        padding-right: 14px !important;
    }

@media (min-width: 992px) and (max-width: 1199.98px) {
    .navbar-custom .navbar-nav .nav-item .nav-link {
        padding-left: 9px !important;
        padding-right: 9px !important;
        font-size: 13px;
    }
}

/* ---------- Mobile menu (offcanvas) ---------- */
.header-offcanvas .accordion-item {
    border: 0;
}

.header-offcanvas .accordion-header {
    border-bottom: 1px solid var(--d-line) !important;
    margin: 0;
}

    .header-offcanvas .accordion-header > a,
    .header-offcanvas .accordion > a.pill-item > .nav-link {
        padding: 15px 24px !important;
        font-size: 15px !important;
        font-weight: 500 !important;
        color: var(--d-ink) !important;
        border-bottom: 1px solid var(--d-line);
    }

    .header-offcanvas .accordion-header > a {
        border-bottom: 0;
    }

    .header-offcanvas .accordion-header .btn {
        color: var(--d-muted);
        padding: 0 20px;
        align-self: stretch;
    }

.header-offcanvas .accordion-collapse .accordion-body {
    padding: 0 !important;
    background: #fff;
    border-bottom: 1px solid var(--d-line);
}

    .header-offcanvas .accordion-collapse .accordion-body .pill-item .nav-link {
        border-bottom: 0;
        padding: 9px 24px 9px 36px !important;
        font-size: 14px;
        color: var(--d-muted);
    }

        .header-offcanvas .accordion-collapse .accordion-body .pill-item .nav-link.fw-semibold {
            color: var(--d-ink);
            padding-left: 24px !important;
            padding-top: 12px !important;
        }

.header-offcanvas .accordion-item:hover .accordion-collapse .nav-link {
    background-color: transparent !important;
}

    .header-offcanvas .accordion-item:hover .accordion-collapse .pill-item:hover > .nav-link {
        background-color: var(--d-soft) !important;
    }

.header-offcanvas .menu-note {
    display: block;
    font-size: 12px;
    color: var(--d-muted);
    font-weight: 400;
    margin-top: 2px;
}

.header-offcanvas .menu-help {
    padding: 20px 24px;
}

    .header-offcanvas .menu-help .menu-help-title {
        font-size: 12px;
        text-transform: uppercase;
        letter-spacing: 0.6px;
        color: var(--d-muted);
        margin-bottom: 10px;
    }

    .header-offcanvas .menu-help a {
        display: flex;
        align-items: center;
        gap: 8px;
        color: var(--d-ink);
        padding: 4px 0;
        font-size: 14px;
    }

/* ---------- Homepage sections ---------- */
.home-section {
    padding: 64px 0;
}

@media (max-width: 767.98px) {
    .home-section {
        padding: 44px 0;
    }

    .section-head {
        margin-bottom: 28px;
    }

        .section-head .home-h1 {
            font-size: 1.5rem;
        }
}

.home-section--soft {
    background: var(--d-soft);
}

.section-head {
    max-width: 680px;
    margin: 0 auto 36px;
    text-align: center;
}

    .section-head .home-h1 {
        margin-bottom: 8px;
    }

    .section-head p {
        color: var(--d-muted);
        margin: 0;
        font-size: 15px;
        line-height: 1.6;
    }

.home-intro {
    max-width: 760px;
    margin: 0 auto;
    text-align: center;
}

    .home-intro p {
        color: var(--d-muted);
        font-size: 15px;
        line-height: 1.7;
    }

/* Reviews */
.review-card {
    border: 1px solid var(--d-line);
    border-radius: 6px;
    padding: 24px;
    height: 100%;
    display: flex;
    flex-direction: column;
    background: #fff;
}

    .review-card .stars {
        color: #f5a623;
        font-size: 15px;
        margin-bottom: 12px;
    }

    .review-card blockquote {
        margin: 0 0 16px;
        color: var(--d-ink);
        font-size: 15px;
        line-height: 1.65;
        flex-grow: 1;
    }

    .review-card .review-meta {
        font-size: 13px;
        color: var(--d-muted);
        border-top: 1px solid var(--d-line);
        padding-top: 12px;
    }

        .review-card .review-meta strong {
            color: var(--d-ink);
            font-weight: 600;
        }

.rating-summary {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 15px;
    color: var(--d-muted);
}

    .rating-summary strong {
        color: var(--d-ink);
    }

/* Buying guide */
.guide-item {
    padding: 28px 0;
    border-top: 1px solid var(--d-line);
    height: 100%;
}

    .guide-item .guide-num {
        font-size: 13px;
        font-weight: 600;
        color: var(--d-blue);
        letter-spacing: 0.5px;
        margin-bottom: 6px;
    }

    .guide-item h3 {
        font-size: 18px;
        font-weight: 600;
        color: var(--d-ink);
        margin-bottom: 10px;
    }

    .guide-item p {
        color: var(--d-muted);
        font-size: 15px;
        line-height: 1.65;
    }

.guide-list {
    list-style: none;
    padding: 0;
    margin: 0;
    font-size: 15px;
}

    .guide-list li {
        display: flex;
        justify-content: space-between;
        gap: 16px;
        padding: 8px 0;
        border-bottom: 1px dashed var(--d-line);
    }

        .guide-list li:last-child {
            border-bottom: 0;
        }

        .guide-list li > span:first-child {
            color: var(--d-muted);
        }

        .guide-list li > span:last-child {
            color: var(--d-ink);
            text-align: right;
        }

.guide-tip {
    border-left: 3px solid var(--d-blue);
    background: var(--d-soft);
    padding: 16px 20px;
    margin-top: 12px;
    font-size: 15px;
    line-height: 1.65;
    color: var(--d-ink);
}

/* FAQ */
.faq-list {
    max-width: 820px;
    margin: 0 auto;
    border-top: 1px solid var(--d-line);
}

    .faq-list details {
        border-bottom: 1px solid var(--d-line);
    }

    .faq-list summary {
        list-style: none;
        cursor: pointer;
        padding: 18px 40px 18px 0;
        position: relative;
        font-size: 16px;
        font-weight: 500;
        color: var(--d-ink);
    }

        .faq-list summary::-webkit-details-marker {
            display: none;
        }

        .faq-list summary::after {
            content: "+";
            position: absolute;
            right: 4px;
            top: 50%;
            transform: translateY(-50%);
            font-size: 22px;
            font-weight: 300;
            color: var(--d-muted);
        }

    .faq-list details[open] summary::after {
        content: "\2212";
    }

    .faq-list details p {
        margin: 0;
        padding: 0 40px 20px 0;
        color: var(--d-muted);
        font-size: 15px;
        line-height: 1.7;
    }

/* Feature links */
.home-features {
    padding: 40px 0;
    border-bottom: 1px solid var(--d-line);
}

.feature-grid {
    row-gap: 8px;
}

.feature-item {
    display: flex;
    gap: 14px;
    padding: 18px 8px;
    color: var(--d-ink);
    text-decoration: none;
    height: 100%;
}

a.feature-item:hover h3 {
    color: var(--d-blue);
}

.feature-item i {
    font-size: 28px;
    color: var(--d-ink);
    line-height: 1;
    flex-shrink: 0;
    margin-top: 2px;
}

.feature-item h3 {
    font-size: 15px;
    font-weight: 600;
    margin: 0 0 4px;
    color: var(--d-ink);
    transition: color .15s ease;
}

.feature-item p {
    font-size: 14px;
    line-height: 1.55;
    color: var(--d-muted);
    margin: 0;
}

/* ---------- Homepage hero slider ---------- */
/* Desktop artwork is 1920x600: keep that ratio so the image is never cropped
   top or bottom. On narrower screens a minimum height keeps room for the text,
   and the image is anchored right so only the empty left side is trimmed. */
@media (min-width: 1400px) {
    .kalles-home-section .slideshow__slide {
        height: max(520px, 31.25vw);
    }
}

/* Small laptops: a shorter slide keeps the artwork clear of the text. */
@media (min-width: 1200px) and (max-width: 1399.98px) {
    .kalles-home-section .slideshow__slide {
        height: 440px;
    }

    .kalles-home-section .slideshow__slide .content > .h5,
    .kalles-home-section .slideshow__slide .content > ul {
        display: none !important;
    }
}

@media (min-width: 1200px) {

    .kalles-home-section .home-slider-1,
    .kalles-home-section .home-slider-2 {
        background-position: right center;
    }
}

/* Below 1200px the text would run into the desktop artwork, so laptops,
   tablets and phones get the square artwork first and the text below it. */
@media (max-width: 1199.98px) {
    .kalles-home-section .slideshow__slide {
        height: auto;
        flex-direction: column;
        align-items: stretch;
        padding: 16px 0 44px;
    }

    .kalles-home-section .slideshow__slide .slide-container {
        order: 1;
        margin-top: 0 !important;
        text-align: center;
    }

    .kalles-home-section .slideshow__slide .slide-container .col-lg-4 {
        width: 100%;
    }

    .kalles-home-section .slideshow__slide .content {
        max-width: 520px;
        margin: 0 auto;
    }

    /* The bullet list reads badly when centred; the product page has it. */
    .kalles-home-section .slideshow__slide .content > .h5,
    .kalles-home-section .slideshow__slide .content > ul {
        display: none !important;
    }

    .kalles-home-section .home-slide-h3 {
        font-size: 26px !important;
        line-height: 1.25;
        margin-bottom: 12px !important;
    }

    .kalles-home-section .home-slide-h4 {
        font-size: 17px !important;
        line-height: 1.5;
        color: var(--d-muted) !important;
        margin-bottom: 20px !important;
    }

    .kalles-home-section .slideshow__slide .btn {
        display: block;
        width: 100%;
        max-width: 320px;
        margin: 0 auto;
        padding-left: 16px !important;
        padding-right: 16px !important;
    }

    /* The phone artwork is square with the mattress (and its shadow) in the bottom 45%:
       show that band, anchored to the bottom edge so nothing below is cut. */
    .kalles-home-section .home-slider-1,
    .kalles-home-section .home-slider-2 {
        order: 0;
        position: relative !important;
        width: 100% !important;
        max-width: 560px;
        height: auto !important;
        aspect-ratio: 20 / 9;
        margin: 0 auto 20px;
        background-size: cover;
        background-position: center bottom;
    }

    .kalles-home-section .home-slider-1 {
        background-image: url('/assets/images/home-01/slider-1200-1200-celliant-mobile.jpg');
    }

    .kalles-home-section .home-slider-2 {
        background-image: url('/assets/images/home-01/slider-1200-1200-bambu-mobile.jpg');
    }

    .kalles-home-section .flickity-page-dots {
        bottom: 12px;
    }
}

@media (max-width: 430px) {
    .kalles-home-section .home-slider-1 {
        background-image: url('/assets/images/home-01/slider-1200-1200-celliant-mobile-xs.jpg');
    }

    .kalles-home-section .home-slider-2 {
        background-image: url('/assets/images/home-01/slider-1200-1200-bambu-mobile-xs.jpg');
    }
}

/* Configured bed drawn in its chosen colour in the mini cart and checkout (cart.js) */
.cart-bed-drawing svg {
    display: block;
    width: 100%;
    height: auto;
    max-height: 140px;
}
