@media (max-width:1400px) {
    .kafejnicas_right #map {
        width: max(0px, calc(100% - 875px));
    }
    .product_box_image {
        width: 155px;
    }
    .product_box_text {
        width: auto;
    }
    .par_mums_b_item:first-child {
        max-width: initial;
    }
    .par_mums_b_item {
        max-width: 40%;
    }
}

@media (max-width: 1300px) {
    .footer_wrapper {
        height: auto;
    }
    .footer_upper {
        flex-direction: column;
        text-align: center;
        gap: 30px;
    }
    .footer_column_1, .footer_column_2, .footer_column_3, .footer_column_4 {
        max-width: initial;
    }
    .fc4-2 {
        margin: 0 auto 8px auto;
    }
    .footer_contact_btn {
        margin: 50px auto 28px auto;
    }

    .home_slider_image_part {
        padding: 145px 0 0 68px;
    }
    .home_slider_image_part {
        left: -60px;
    }
    .home_slider_text_part h1 {
        font-size: 60px;
        line-height: 73px;
    }
    .home_slider_text_part p {
        font-size: 15px;
    }
    .home_slider_text_part {
        max-width: 410px;
    }
}

@media (max-width: 1200px) {
    .kafejnicas_right > div {
        flex-direction: column;
        width: 100%;
    }
    /* Override desktop 50% split so stacked layout works for every tab, not only tab 1 */
    .home_kafejnicas_block > .container > .kafejnicas_right .kafejnica_branch_panel,
    .home_kafejnicas_block .kafejnicas_right #map {
        width: 100%;
        max-width: 100%;
    }
    .home_kafejnicas_block .container {
        height: 720px;
    }
    .kafejnica_left {
        width: 100%;
    }
    .kafejnica_right {
        max-width: initial;
        height: 188px;
    }
    .header_language_wrapper {
        margin-top: 50px;
    }
    .home_slider_image_part img {
        max-width: 400px;
        max-height: 480px;
    }
    .home_slider_image_part {
        left: 0;
        margin-right: 110px;
    }
    .product_box_image img {
        width: 140px;
    }
    .home_produkti_row {
        padding: 0 44px;
    }
    .kafejnicas_right #map {
        width: 100%;
        top: initial;
        bottom: 0;
        height: 188px;
        min-height: initial !important;
    }
    .product_box_title {
        font-size: 15px;
        line-height: 22px;
        max-width: 360px;
    }
    .footer_lower p {
        font-size: 14px;
    }
    .header_logo img {
        height: 40px;
    }
    .header-bg .header_wrapper {
        height: 70px;
    }
    .page-info-bar {
        top: 70px;
    }
    .header_outside_wrapper.header-bg.header-about .header_wrapper {
        height: 70px;
    }
    .par_mums_banner {
        margin-top: 70px;
    }
    .page-main {
        margin: 70px 0 70px 0;
    }
    .header-offset {
        top: -130px;
    }
    .header_logo .header_logo_desktop {
        height: 105px;
        width: 186px;
        margin-top: 0;
    }
}

@media (max-width: 1150px) {
    .js-2 {
        font-size: 38px;
        line-height: 47px;
    }
}

@media (max-width: 1000px) {
    .home_jaunumu_subscribe .container {
        flex-direction: column;
        gap: 28px;
    }
    .home_jaunumu_subscribe {
        height: auto;
        padding: 23px 0;
    }
    .js-1 {
        text-align: center;
    }
    .home_slider_block .container {
        flex-direction: column;
    }
    .home_slider_block {
        height: auto;
    }
    .home_slider_image_part {
        height: 450px;
        padding: 0;
        margin: 0;
        width: 100%;
    }
    .home_slider_image_part img {
        max-width: 300px;
        max-height: 450px;
        left: 50%;
        bottom: 40px;
        transform: translateX(-50%);
    }
    .home_slider_nav {
        top: initial;
        bottom: 170px;
    }
    .home_slider_text_part {
        max-width: initial;
    }
    .home_produkti_row {
        grid-template-columns: repeat(2, 1fr);
    }
    .home_produkti_tab {
        height: 806px;
    }
    .product_box_image img {
        width: 100%;
    }
    .product_box_image {
        margin-left: auto;
    }
    .grid-sizer, .grid-item {
        width: 49%;
    }
    .par_mums_block h1 {
        font-size: 32px;
        line-height: 38px;
    }
    .page-info-bar p {
        font-size: 14px;
        line-height: 14px;
    }
    .par_mums_b {
        gap: 100px;
    }
}

@media (max-width: 768px) {
    .container {
        width: calc(100% - 50px);
    }
    .home_jaunumu_subscribe .container {
        width: calc(100% - 50px);
        max-width: none;
    }
    .footer_middle {
        flex-direction: column;
        gap: 30px;
        text-align: left;
    }
    .home_kafejnicas_block .container {
        height: 1100px;
        flex-direction: column;
        width: calc(100% - 50px);
        max-width: none;
        padding: 0;
    }
    .kafejnicas_left {
        height: auto;
        max-width: initial;
    }

    /* Kafejnīcas: centered horizontal branch chips (match reference mobile) */
    .home_kafejnicas_block .kafejnicas_left_column {
        width: 100%;
        max-width: none;
        height: auto;
        align-items: stretch;
    }

    .home_kafejnicas_block .kafejnicas_left_column .kafejnicas_l_upper {
        height: auto;
        min-height: 0;
        margin: 0 0 12px;
        padding: 0 4px;
        border: 0;
        background: transparent;
        display: flex;
        align-items: center;
        justify-content: center;
    }

    .home_kafejnicas_block .kafejnicas_left {
        background: #ffffff;
        border-radius: 16px;
        overflow: hidden;
        box-shadow: 0 4px 20px rgba(0, 0, 0, 0.06);
        margin-bottom: 12px;
    }

    .home_kafejnicas_block .kafejnicas_l_upper h3 {
        text-align: center;
        width: 100%;
        padding-left: 12px;
        padding-right: 12px;
        box-sizing: border-box;
    }

    .home_kafejnicas_block .kafejnicas_l_lower {
        display: flex;
        flex-direction: row;
        flex-wrap: nowrap;
        justify-content: flex-start;
        align-items: center;
        gap: 10px;
        padding: 12px 10px 14px;
        box-sizing: border-box;
        overflow-x: auto;
        overflow-y: hidden;
        -webkit-overflow-scrolling: touch;
        overscroll-behavior-x: contain;
        scroll-snap-type: x proximity;
    }

    .home_kafejnicas_block .kafejnicas_box {
        flex: 0 0 auto;
        flex-shrink: 0;
        width: auto;
        max-width: none;
        justify-content: center;
        scroll-snap-align: start;
    }

    .home_kafejnicas_block .kafejnicas_adress {
        width: auto !important;
        max-width: none !important;
        padding: 8px 12px !important;
        font-size: 14px !important;
        line-height: 1.25 !important;
        text-align: center;
        white-space: nowrap;
    }

    .home_kafejnicas_block .kafejnicas_box.kb_active .kafejnicas_adress {
        border-radius: 999px !important;
        padding-left: 14px !important;
        padding-right: 14px !important;
        text-decoration: none !important;
    }
    .home_produkti_row {
        padding: 0 20px;
    }
    .header_logo {
        max-width: 250px;
    }
    .home_produkti_block h2 {
        font-size: 55px;
        line-height: 67px;
    }
    .home_produkti_block .carousel__nav .carousel__button.is-prev {
        left: -35px;
    }
    .home_produkti_block .carousel__nav .carousel__button.is-next {
        right: -35px;
    }
    .product_box_price {
        font-size: 13px;
    }
    .kafejnica_left_content {
        height: auto;
    }
    .home_kafejnicas_block .container {
        height: auto;
    }
    .kafejnicas_right > div {
        position: initial;
    }
    /* Stack branch panel + map: full width (was only reliable for tab 1 when CSS targeted .kafejnica_r_1) */
    .home_kafejnicas_block > .container > .kafejnicas_right .kafejnica_branch_panel,
    .home_kafejnicas_block .kafejnicas_right #map {
        width: 100%;
        max-width: 100%;
    }
    .home_kafejnicas_block > .container > .kafejnicas_right {
        padding: 24px 18px;
        flex-wrap: wrap;
    }
    .kafejnica_location {
        margin-top: 14px;
        flex-wrap: wrap;
        gap: 12px;
    }
    .home_kafejnicas_block .kafejnica_location .waze-btn,
    .home_kafejnicas_block .kafejnica_location .gmaps-btn {
        flex: 1 1 auto;
        min-width: 0;
        justify-content: center;
        padding: 10px 14px;
    }
    .home_produkti_wrap {
        border: none;
    }
    .header_wrapper {
        width: 100%;
    }
    .mobile_header_close {
        left: 14px;
        right: auto;
    }
    .par_mums_b_item {
        max-width: initial;
    }
    .par_mums_b {
        flex-direction: column;
    }
    .par_mums_b_item {
        max-width: initial;
    }
    .par_mums_b {
        gap: 60px;
    }
    .par_mums_b_item img {
        left: 15px;
        top: -17px;
    }
    .page-info-bar p {
        font-size: 13px;
        line-height: 15px;
    }
    .page-info-bar {
        height: 80px;
        padding: 10px 0;
    }
    .copyrights {
        margin-top: 48px;
        padding-left: 20px;
        padding-right: 20px;
        box-sizing: border-box;
    }

    .copyrights .container {
        display: block;
        width: 100%;
        max-width: 100%;
        box-sizing: border-box;
    }

    .footer_lower {
        flex-direction: column;
        align-items: flex-start;
        justify-content: flex-start;
        height: auto;
        padding: 28px 0 24px;
        gap: 18px;
    }

    .footer_lower > .left,
    .footer_lower > .right {
        width: 100%;
        max-width: 100%;
        text-align: left;
    }

    .footer_lower > .left {
        display: flex;
        flex-direction: column;
        align-items: flex-start;
        gap: 14px;
    }

    .footer_lower .copyright-first {
        margin-bottom: 0;
    }

    .footer_lower .left .flt1,
    .footer_lower .copyright-last {
        text-align: left;
    }

    .footer_lower > .right img {
        display: block;
        margin: 0;
        max-width: min(260px, 88vw);
        height: auto;
    }

    .footer_lower p {
        font-size: 12px;
        text-align: left;
    }

    .footer_funding_liaa_row {
        flex-direction: column;
        align-items: flex-start;
        justify-content: flex-start;
        text-align: left;
        padding: 28px 0 36px;
        gap: 22px;
    }

    .footer_funding_liaa_row__text {
        margin-top: 0;
        max-width: 100%;
        min-width: 0;
        text-align: left;
    }

    .footer_funding_liaa_row__title,
    .footer_funding_liaa_row__body {
        text-align: left;
    }

    .footer_funding_liaa_row__aside {
        margin-left: 0;
        margin-right: 0;
        max-width: 100%;
        width: 100%;
        align-items: flex-start;
    }

    .footer_funding_liaa_row__flagImg {
        margin-left: 0;
        margin-right: 0;
    }

    .footer_funding_liaa_row__meta {
        width: 100%;
        max-width: 100%;
        text-align: left;
    }

    .footer_funding_liaa_row__meta p {
        max-width: 100%;
        margin-left: 0;
        margin-right: 0;
        text-align: left;
    }
}

@media (max-width: 650px) {
    .home_produkti_row {
        grid-template-columns: repeat(1, 1fr);
    }
    .product_box {
        justify-content: center;
    }
    .home_produkti_tab {
        height: 1568px;
    }
    .product_box_image {
        width: 210px;
    }
    .par_mums_title {
        font-size: 34px;
        line-height: 43px;
    }
}

@media (max-width: 500px) {
    .js-1 {
        font-size: 15px;
        line-height: 20px;
    }
    .js-2 {
        font-size: 26px;
        line-height: 30px;
        text-align: center;
    }
    .jaunumu_subscribe_right input {
        height: 40px;
        width: 65%;
    }
    .jaunumu_subscribe_right .jaunumu-save {
        height: 40px;
        width: 30%;
        padding: 8px 12px;
        font-size: 15px;
    }
    .header_logo {
        max-width: 160px;
    }
    .home_slider_text_part h1 {
        font-size: 40px;
        line-height: 1.2em;
    }
    .home_btn {
        padding: 13px 66px 13px 14px;
        font-size: 15px;
        margin: 28px 0 0 0;
    }
    .home_slider_text_part {
        padding-top: 130px;
    }
    .kafejnicas_adress {
        font-size: 14px;
        line-height: 17px;
        max-width: 141px;
    }

    .home_kafejnicas_block .kafejnicas_adress {
        max-width: none !important;
    }
    .kafejnicas_work_time {
        font-size: 13px;
        line-height: 17px;
    }
    .kafejnicas_right #map {
        height: 210px;
    }
    .footer_lower p {
        font-size: 12px;
    }
    .footer_wrapper .footer_upper p {
        font-size: 15px;
    }
    .footer_wrapper .footer_upper h6 {
        font-size: 18px;
        line-height: 100%;
        margin: 0 0 20px 0;
        font-weight: bold;
    }
    .home_slider_image_part img {
        left: 35%;
        max-width: 250px;
        max-height: 300px;
        bottom: 80px;
    }
    .home_slider_image_part {
        height: 360px;
    }
    .home_slider_nav {
        bottom: 120px;
    }
    .kafejnica_info, .kafejnica_info_value {
        font-size: 15px;
        font-weight: 500;
        line-height: 18px;
    }
    .kafejnica_info_wrap {
        gap: 10px;
    }
    .home_produkti_block h2 {
        font-size:34px;
        line-height: 120%;
        margin-top: 20px;
        text-align: center;
    }
    .home_produkti_block h3 {
        font-size: 16px;
        text-align: center;
        font-weight: 700;
    }
    .product_category_box p {
        font-size: 15px;
    }
    .product_box_image {
        width: auto;
        max-width: 190px;
    }
    .product_box_title {
        font-size: 14px;
    }
    .product_box_price {
        font-size: 12px;
    }
    .home_produkti_tab {
        height: auto;
        min-height: 1200px;
    }
    .kafejnica_right {
        height: 210px;
    }
    label.hb_label {
        width: 23px;
    }
    label.hb_label span {
        height: 2px;
        margin: 3px 0;
    }
    .mobile_header_close {
        left: 12px;
        right: auto;
    }
    .hb_label input[type="checkbox"]:checked ~ span:nth-of-type(1) {
        transform: rotatez(45deg) translate(4px,1px);
    }
    .hb_label input[type="checkbox"]:checked ~ span:nth-of-type(3) {
        transform: translate(10px,-5px) rotatez(45deg);
    }
    .gallery_title {
        font-size: 36px;
    }
    .footer_logo {
        width: 120px;
        height: 164px;
    }
    .kafejnica_ad_text p {
        font-size: 15px;
        line-height: 18px;
    }
}

@media (max-width: 400px) {
    .footer_column_4 img {
        width: 100%;
    }
    .home_slider_image_part img {
        max-width: 200px;
        max-height: 240px;
    }
    .home_slider_box p {
        font-size: 12px;
    }
    .home_slider_box {
        gap: 6px;
    }
    .home_slider_nav {
        gap: 8px;
    }
    .home_slider_box div {
        width: 10px;
        height: 10px;
    }
    .sb_active div {
        height: 18px;
    }
    .product_box_image {
        max-width: 110px;
        height: 100px;
    }
    .grid-sizer, .grid-item {
        width: 100%;
    }
}

@media (max-width: 350px) {
    .mobile_header_navigation_wrapper ul li a {
        font-size: 19px;
        line-height: 22px;
    }
}

/* Logo variants: desktop SVG vs mobile PNG */
.header_logo--mobile { display: none; }
.header_logo--desktop { display: block; }

@media (min-width: 1201px) {
    label.hb_label {
        display: none;
    }
}
@media (max-width: 1200px) {
    .header_logo--desktop { display: none; }
    .header_logo--mobile { display: block; }

    .header_wrapper .header_navigation_wrapper, .header_wrapper .header_language_wrapper {
        display: none;
    }

    /* Mobile header: hamburger (left) | logo (center) | cart (right) */
    .header_wrapper {
        position: relative;
        justify-content: space-between;
        height: 80px;
    }

    /* Center logo absolutely so it doesn't participate in flex spacing */
    .header_wrapper .header_logo {
        position: absolute;
        left: 45%;
        transform: translateX(-50%);
        max-width: 100px;
        z-index: 1;
    }

    /* Hamburger: orange square button with white bars */
    label.hb_label {
        display: flex !important;
        flex-direction: column;
        width: 48px;
        height: 48px;
        background: var(--bg-orange);
        border-radius: 12px;
        margin-left: 0;
        flex-shrink: 0;
        gap: 0;
    }

    label.hb_label span {
        background: #fff;
        width: 22px;
        height: 2px;
        margin: 2px 0;
        border-radius: 2px;
    }

    .hb_label {
    display: inline-flex;
    flex-direction: column;
    justify-content: center;
    align-items: flex-start;
    width: 50px;
    height: 50px;
    background: #f36c21;
    border-radius: 14px;
    padding: 10px;
    cursor: pointer;
}

/* Common line style */
.hb_label span {
    display: block;
    height: 3px;
    background: #fff;
    border-radius: 2px;
}

/* Individual line widths */
.hb_label span:nth-child(2) {
    width: 22px; /* top small */
}

.hb_label span:nth-child(3) {
    width: 16px; /* middle medium */
    margin: 5px 0;
}

.hb_label span:nth-child(4) {
    width: 28px; /* bottom long */
}

    /* Hide phone button on mobile */
    .header_wrapper .right-sec .h-phone {
        display: none;
    }

    /* right-sec: only cart visible, no extra gap */
    .header_wrapper .right-sec {
        gap: 0;
        margin-left: 0;
    }
}

/* Newsletter card: final mobile lock for full-width controls */
@media (max-width: 500px) {
    .home_jaunumu_subscribe .jaunumu_subscribe_right,
    .home_jaunumu_subscribe .jaunumu_subscribe_right form,
    .home_jaunumu_subscribe .jaunumu_subscribe_right form > div {
        width: 100% !important;
    }

    .home_jaunumu_subscribe .jaunumu_subscribe_right form > div {
        display: flex !important;
        flex-direction: column !important;
        align-items: center !important;
        gap: 12px !important;
    }

    .home_jaunumu_subscribe .jaunumu_subscribe_right input#jaunumu-email,
    .home_jaunumu_subscribe .jaunumu_subscribe_right .jaunumu-save {
        width: calc(100% - 24px) !important;
        max-width: none !important;
        margin-left: auto !important;
        margin-right: auto !important;
        display: block !important;
        box-sizing: border-box !important;
    }

    .home_jaunumu_subscribe .jaunumu_subscribe_right input#jaunumu-email {
        height: 58px !important;
        border-radius: 999px !important;
        padding: 0 26px !important;
        font-size: 16px !important;
        font-weight: 400 !important;
    }

    .home_jaunumu_subscribe .jaunumu_subscribe_right .jaunumu-save {
        height: 58px !important;
        border-radius: 999px !important;
        padding: 0 20px !important;
        font-size: 16px !important;
        font-weight: 600 !important;
        letter-spacing: 0.02em !important;
        text-align: center !important;
        background-color: var(--btn-dark) !important;
        transition: background-color 0.2s ease;
    }

    .home_jaunumu_subscribe .jaunumu_subscribe_right .jaunumu-save:hover {
        background-color: var(--btn-dark-hover) !important;
    }
}


@media (min-width: 1200px) {
    .home_produkti_wrap .carousel__viewport::before, .home_produkti_wrap .carousel__viewport::after {
        display: none;
    }
    .home_produkti_upper .product_category_box {
        width: 132px;
    }
}