/* Site extras — keep style.css identical to style_bk.css */

.text-brwn { color: #967869; }
.bg-navb { background: rgb(42, 37, 38); }

html {
    -webkit-text-size-adjust: 100%;
    text-size-adjust: 100%;
}

/* Google Maps — contain overflow (Android expands layout viewport if this leaks) */
#map {
    max-width: 100%;
    overflow: hidden;
}

/* —— Home: Notebook Studio promo —— */
.nb-home-studio {
    --nb-home-studio-ink: #1c1917;
    --nb-home-studio-muted: #78716c;
    --nb-home-studio-display: 'Cormorant Garamond', Georgia, 'Times New Roman', serif;
    --nb-home-studio-nav-offset: 110px;
    position: relative;
    overflow: hidden;
    margin-top: 0;
    padding-top: var(--nb-home-studio-nav-offset);
    min-height: calc(300px + var(--nb-home-studio-nav-offset));
    background-color: #efeae3;
    background-size: cover;
    background-position: center 40%;
    background-repeat: no-repeat;
}

.nb-home-studio__overlay {
    position: absolute;
    inset: 0;
    z-index: 1;
    pointer-events: none;
    background:
        linear-gradient(
            105deg,
            rgba(252, 250, 247, 0.14) 0%,
            transparent 22%,
            transparent 78%,
            rgba(252, 250, 247, 0.12) 100%
        ),
        linear-gradient(
            180deg,
            rgba(252, 250, 247, 0.06) 0%,
            transparent 42%,
            rgba(246, 245, 242, 0.28) 100%
        );
}

.nb-home-studio__content {
    position: relative;
    z-index: 2;
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 300px;
    box-sizing: border-box;
    padding: 1.75rem 1.5rem 2.75rem;
}

.nb-home-studio__copy {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    max-width: 36rem;
    margin: 0;
}

.nb-home-studio__brand {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.2rem 0.4rem;
    margin: 0 0 0.85rem;
    line-height: 1;
}

.nb-home-studio__by {
    font-family: var(--nb-home-studio-display);
    font-size: clamp(0.95rem, 2.4vw, 1.125rem);
    font-weight: 400;
    font-style: italic;
    line-height: 1;
    letter-spacing: 0.05em;
    color: #5c534c;
    transform: translateY(0.18em);
    text-shadow: 0 1px 14px rgba(252, 250, 247, 0.35);
}

.nb-home-studio__flynery-mark {
    display: block;
    width: clamp(4.5rem, 16vw, 7.25rem);
    height: auto;
    flex-shrink: 0;
    filter: drop-shadow(0 1px 12px rgba(252, 250, 247, 0.25));
}

.nb-home-studio__title {
    margin: 0 0 0.65rem;
    padding: 0;
    border: none;
    line-height: 1;
    background: none;
}

.nb-home-studio__title-studio {
    display: block;
    font-family: var(--nb-home-studio-display) !important;
    font-size: clamp(2.05rem, 6.5vw, 3.15rem);
    font-weight: 500 !important;
    line-height: 1.12;
    letter-spacing: 0.065em;
    color: var(--nb-home-studio-ink);
    text-shadow:
        0 1px 18px rgba(252, 250, 247, 0.5),
        0 0 1px rgba(252, 250, 247, 0.65);
}

.nb-home-studio__tagline {
    margin: 0 0 0.45rem;
    max-width: 28rem;
    font-family: 'Kanit', sans-serif;
    font-size: clamp(0.9375rem, 2.2vw, 1.125rem);
    font-weight: 400;
    line-height: 1.55;
    letter-spacing: 0.015em;
    color: #3d3835;
    text-shadow: 0 1px 14px rgba(252, 250, 247, 0.4);
}

.nb-home-studio__lead {
    margin: 0;
    max-width: 32rem;
    font-family: 'Kanit', sans-serif;
    font-size: clamp(0.75rem, 1.85vw, 0.9375rem);
    font-weight: 300;
    line-height: 1.6;
    letter-spacing: 0.012em;
    color: var(--nb-home-studio-muted);
    text-shadow: 0 1px 12px rgba(252, 250, 247, 0.35);
}

.nb-home-studio__cta {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    margin-top: 1.15rem;
    padding: 0.6rem 1.25rem 0.6rem 0.95rem;
    border: 1px solid rgba(92, 83, 76, 0.28);
    border-radius: 999px;
    background: rgba(252, 250, 247, 0.88);
    color: #3d3835 !important;
    font-family: 'Kanit', sans-serif;
    font-size: 0.9375rem;
    font-weight: 500;
    letter-spacing: 0.02em;
    line-height: 1.2;
    text-decoration: none !important;
    box-shadow:
        0 1px 0 rgba(255, 255, 255, 0.7) inset,
        0 4px 18px rgba(28, 25, 23, 0.08);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    transition:
        background 0.18s ease,
        border-color 0.18s ease,
        color 0.18s ease,
        box-shadow 0.18s ease,
        transform 0.15s ease;
}

.nb-home-studio__cta:hover,
.nb-home-studio__cta:focus {
    background: rgba(252, 250, 247, 0.98);
    border-color: rgba(92, 83, 76, 0.45);
    color: #1c1917 !important;
    box-shadow:
        0 1px 0 rgba(255, 255, 255, 0.85) inset,
        0 6px 22px rgba(28, 25, 23, 0.12);
}

.nb-home-studio__cta:focus {
    outline: none;
}

.nb-home-studio__cta:focus-visible {
    outline: none;
    box-shadow: 0 0 0 3px rgba(92, 83, 76, 0.22);
}

.nb-home-studio__cta:active {
    transform: scale(0.98);
}

.nb-home-studio__cta-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 1.5rem;
    height: 1.5rem;
    border-radius: 50%;
    background: #5c554e;
    color: #faf8f5;
    font-size: 0.7rem;
}

.nb-home-studio__cta-icon .fa {
    line-height: 1;
}

.nb-home-studio__cta-text {
    transform: translateY(0.01em);
    font-weight: 500 !important;
}

.nb-home-studio__wave {
    position: absolute;
    left: 0;
    right: 0;
    bottom: -1px;
    z-index: 3;
    line-height: 0;
    pointer-events: none;
}

.nb-home-studio__wave svg {
    display: block;
    width: 100%;
    height: clamp(28px, 5vw, 56px);
}

@media (max-width: 768px) {
    .nb-home-studio {
        --nb-home-studio-nav-offset: 100px;
        min-height: calc(260px + var(--nb-home-studio-nav-offset));
    }

    .nb-home-studio__content {
        min-height: 260px;
        padding: 1.5rem 1.15rem 2.35rem;
    }

    .nb-home-studio__brand {
        margin-bottom: 0.65rem;
    }

    .nb-home-studio__title {
        margin-bottom: 0.55rem;
    }

    .nb-home-studio__cta {
        margin-top: 0.95rem;
        padding: 0.55rem 1.1rem 0.55rem 0.85rem;
        font-size: 0.875rem;
    }
}

/*
 * Product cards:
 * - default 1 column
 * - 3 columns ONLY on real desktop (fine pointer + hover)
 *   → Android ที่ขยาย layout viewport เกิน 992px จะไม่โดน 3 คอลัมน์
 */
.nb-product-col {
    flex: 0 0 100% !important;
    max-width: 100% !important;
    width: 100% !important;
}

@media (min-width: 992px) and (hover: hover) and (pointer: fine) {
    .nb-product-col {
        flex: 0 0 33.333333% !important;
        max-width: 33.333333% !important;
        width: 33.333333% !important;
    }
}

/* JS class on real Android phones — always 1 column */
html.is-android-phone .nb-product-col,
html.nb-android-wide .nb-product-col {
    flex: 0 0 100% !important;
    max-width: 100% !important;
    width: 100% !important;
}

/* Touch phones/tablets: keep 1 col even if width MQ lies */
@media (hover: none) and (pointer: coarse) {
    .nb-product-col {
        flex: 0 0 100% !important;
        max-width: 100% !important;
        width: 100% !important;
    }
}

/*
 * Android only — clip horizontal overflow.
 * Do NOT add global img { height: auto } or overflow-x on all browsers
 * (that combination broke the site before).
 */
html.is-android-phone,
html.is-android-phone body,
html.nb-android-wide,
html.nb-android-wide body {
    max-width: 100%;
    overflow-x: hidden;
}

html.is-android-phone .btn-group-custom,
html.nb-android-wide .btn-group-custom {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    max-width: 100%;
}

html.is-android-phone .container,
html.is-android-phone .container-fluid,
html.nb-android-wide .container,
html.nb-android-wide .container-fluid {
    max-width: 100%;
}

html.is-android-phone .carousel,
html.is-android-phone .carousel-inner,
html.is-android-phone .carousel-item,
html.is-android-phone .carousel-img,
html.is-android-phone .nb-home-studio,
html.is-android-phone .row,
html.nb-android-wide .carousel,
html.nb-android-wide .carousel-inner,
html.nb-android-wide .carousel-item,
html.nb-android-wide .carousel-img,
html.nb-android-wide .nb-home-studio,
html.nb-android-wide .row {
    max-width: 100%;
}

html.is-android-phone iframe,
html.is-android-phone .fb_iframe_widget,
html.is-android-phone #fb-root,
html.nb-android-wide iframe,
html.nb-android-wide .fb_iframe_widget {
    max-width: 100% !important;
}

/* background-attachment:fixed พังสเกลบน Chrome Android */
html.is-android body:before,
html.is-android-phone body:before {
    background-attachment: scroll !important;
}

/*
 * carousel height:100% (จาก style_bk) = สูงเต็มจอ + พื้นดำโหว่บนมือถือ
 * บังคับความสูงสมเหตุสมผลบน Android
 */
html.is-android-phone #carouselExampleIndicators,
html.is-android-phone #carouselExampleIndicators .carousel-inner,
html.is-android-phone #carouselExampleIndicators .carousel-item {
    height: auto !important;
    min-height: 0 !important;
}

html.is-android-phone #carouselExampleIndicators .carousel-img {
    height: 42vh !important;
    min-height: 200px !important;
    max-height: 320px !important;
    width: 100% !important;
    background-size: cover !important;
    background-position: center center !important;
}

html.is-android-phone #carouselExampleIndicators .carousel-caption {
    top: auto !important;
    bottom: 18%;
    padding-left: 0.75rem;
    padding-right: 0.75rem;
}

html.is-android-phone #carouselExampleIndicators .carousel-caption .display-4 {
    font-size: 1.65rem !important;
}

html.is-android-phone #carouselExampleIndicators .carousel-caption .lead,
html.is-android-phone #carouselExampleIndicators .carousel-caption .btn {
    font-size: 0.9rem !important;
}
