/* Son responsive sabitlestirme qati. Esas layout qaydalari style.css faylindadir. */
html,
body {
    max-width: 100%;
    overflow-x: hidden;
    -webkit-text-size-adjust: 100%;
}

body,
button,
input,
select,
textarea {
    min-width: 0;
}

img,
svg,
video,
canvas,
iframe {
    max-width: 100%;
}

.kontakt-home .horizontal-products {
    display: grid;
    grid-auto-flow: row;
    grid-auto-columns: auto;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    overflow: visible;
    scroll-snap-type: none;
}

.kontakt-home .horizontal-products .product-card,
.kontakt-home .horizontal-products--large .product-card {
    width: 100%;
    display: flex;
    flex-direction: column;
    min-height: 0;
}

.mobile-category-head--primary,
.mobile-category-grid {
    display: none;
}

.product-card .product-media {
    aspect-ratio: 4 / 3;
    max-height: 220px;
    min-height: 140px;
    overflow: hidden;
}

.product-card .product-media img {
    width: 100%;
    height: 100%;
    object-fit: contain !important;
    padding: 14px !important;
    background: #f4f4f2;
}

.kontakt-home .horizontal-products .product-media {
    height: clamp(150px, 22vw, 220px);
    aspect-ratio: auto;
}

.ad-banner-zone {
    max-width: min(1260px, calc(100% - 80px));
}

.ad-banner-zone--inline {
    max-width: 100%;
}

.search-box,
.product-card,
.product-body,
.page-card,
.summary,
.section-head,
.footer-grid,
.cart-row > *,
.form-grid > *,
.product-detail > * {
    min-width: 0;
}

.product-title,
.section-head h1,
.section-head h2,
.footer-grid p,
.footer-grid a,
.summary,
.cart-row,
.notification-item,
.toast__msg {
    overflow-wrap: anywhere;
}

.field input,
.field select,
.field textarea,
.btn,
.button {
    max-width: 100%;
}

.table-wrap,
.gallery-thumbs,
.catalog-menu,
.notification-list,
.horizontal-products,
.brand-rail,
.video-rail,
.category-pills {
    -webkit-overflow-scrolling: touch;
}

@media (max-width: 1100px) {
    body {
        padding-bottom: calc(92px + env(safe-area-inset-bottom));
    }

    .mobile-bottom-nav {
        height: calc(82px + env(safe-area-inset-bottom));
        padding-bottom: calc(10px + env(safe-area-inset-bottom));
    }

    .search-results {
        top: calc(100% + 8px);
        max-height: min(62vh, 460px);
        overflow: auto;
    }
}

@media (max-width: 620px) {
    body {
        padding-bottom: calc(90px + env(safe-area-inset-bottom));
    }

    .product-card .product-media {
        min-height: 118px;
        max-height: 160px;
    }

    .product-card .product-media img {
        padding: 10px !important;
    }

    .kontakt-home .horizontal-products .product-media {
        height: 150px;
    }

    .kontakt-home .horizontal-products {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 10px;
    }

    .page-card {
        margin-top: 16px;
        margin-bottom: 16px;
    }

    .gallery-thumbs,
    .thumbs {
        display: flex;
        gap: 8px;
        overflow-x: auto;
        padding-bottom: 4px;
    }

    .gallery-thumbs img,
    .thumbs img {
        width: 70px;
        height: 70px;
        flex: 0 0 auto;
        object-fit: contain;
    }

    .notification-floating {
        left: 12px;
        right: 12px;
        top: 96px;
        width: auto;
    }

    .ad-banner-zone,
    .ad-banner-zone--kontakt,
    .ad-banner-zone--top,
    .ad-banner-zone--bottom {
        width: 100%;
        max-width: 100%;
        padding-left: 12px;
        padding-right: 12px;
    }

    .ad-banner-zone--inline {
        padding-left: 0;
        padding-right: 0;
    }
}

@media (max-width: 780px) {
    .kontakt-hero,
    .kontakt-hero--no-week-deal {
        display: grid !important;
        grid-template-columns: minmax(0, 1fr) !important;
        gap: 12px;
        padding-top: 0;
    }

    .kontakt-hero .hero-slider {
        order: 1;
    }

    .kontakt-hero .week-offer {
        order: 2;
        display: block !important;
        margin: 0 10px 12px;
        border-radius: 6px;
        overflow: hidden;
        background: #fff;
    }

    .week-offer__head {
        grid-template-columns: minmax(0, 1fr) repeat(3, 50px);
        gap: 0;
        min-height: 68px;
        padding: 14px;
    }

    .week-offer__head strong {
        font-size: 18px;
        line-height: 1.25;
    }

    .week-offer__head span {
        font-size: 12px;
    }

    .week-offer__head b {
        font-size: 16px;
    }

    .week-offer__body {
        display: grid;
        grid-template-columns: 142px minmax(0, 1fr);
        align-items: center;
        gap: 16px;
        padding: 18px 18px 10px;
        text-align: left;
    }

    .week-offer__body img {
        width: 142px;
        height: 142px;
        object-fit: contain;
        grid-row: 1 / 4;
    }

    .week-offer__body span {
        grid-column: 2;
        min-height: 0;
        font-size: 15px;
        line-height: 1.35;
    }

    .week-offer__body strong {
        grid-column: 2;
        font-size: 21px;
        line-height: 1.2;
    }

    .week-offer__body del {
        grid-column: 2;
    }

    .week-offer__nav {
        padding-bottom: 12px;
    }
}

@media (max-width: 420px) {
    .kontakt-hero .week-offer {
        margin-left: 8px;
        margin-right: 8px;
    }

    .week-offer__head {
        grid-template-columns: minmax(0, 1fr) repeat(3, 43px);
        padding: 12px;
    }

    .week-offer__body {
        grid-template-columns: 116px minmax(0, 1fr);
        gap: 12px;
        padding: 16px 14px 8px;
    }

    .week-offer__body img {
        width: 116px;
        height: 116px;
    }

    .week-offer__body strong {
        font-size: 19px;
    }
}

@media (max-width: 340px) {
    .product-grid {
        grid-template-columns: 1fr;
    }

    .mobile-bottom-nav {
        grid-template-columns: repeat(2, minmax(0, 1fr)) 74px repeat(2, minmax(0, 1fr));
    }

    .mobile-bottom-nav__cart {
        width: 74px !important;
        height: 74px !important;
    }
}


/* Service kartlarının web/mobil daşma düzəlişi */
.service-rail {
    max-width: 100%;
    width: 100%;
    overflow: hidden;
}

.service-rail article {
    max-width: 100%;
    min-width: 0;
    overflow: hidden;
}

.service-rail article > div {
    min-width: 0;
    max-width: 100%;
    overflow: hidden;
}

.service-rail strong,
.service-rail span {
    overflow-wrap: anywhere;
    word-break: break-word;
}

@media (max-width: 620px) {
    .service-rail {
        grid-template-columns: minmax(0, 1fr) !important;
        padding-left: 12px;
        padding-right: 12px;
    }

    .service-rail article {
        grid-template-columns: 42px minmax(0, 1fr);
        width: 100%;
    }
}

/* NovaMart final responsive pass: keep the bottom nav flat and five-column. */
@media (max-width: 1100px) {
    body {
        padding-bottom: calc(70px + env(safe-area-inset-bottom));
    }

    .mobile-bottom-nav {
        height: calc(70px + env(safe-area-inset-bottom)) !important;
        padding: 0 0 env(safe-area-inset-bottom) !important;
        grid-template-columns: repeat(5, minmax(0, 1fr)) !important;
        background: #fff;
        border-top: 1px solid #dde2e8;
        box-shadow: 0 -5px 18px rgba(25, 35, 48, .08);
    }

    .mobile-bottom-nav a,
    .mobile-bottom-nav button {
        width: 100% !important;
        height: 70px !important;
        top: auto !important;
        border-radius: 0 !important;
        background: #fff !important;
        color: #91a0b1 !important;
        box-shadow: none !important;
    }

    .mobile-bottom-nav__cart {
        width: 100% !important;
        height: 70px !important;
        background: #fff !important;
        color: #91a0b1 !important;
    }

    .mobile-bottom-nav__badge,
    .mobile-bottom-nav__badge.small {
        top: 8px !important;
        right: auto !important;
        left: calc(50% + 7px) !important;
        min-width: 18px;
        height: 18px;
        border-radius: 999px;
        background: #e32d37 !important;
        color: #fff !important;
        font-size: 10px;
        line-height: 18px;
    }
}

@media (max-width: 340px) {
    .mobile-bottom-nav {
        grid-template-columns: repeat(5, minmax(0, 1fr)) !important;
    }

    .mobile-bottom-nav__cart {
        width: 100% !important;
        height: 70px !important;
    }
}

.contact-modal {
    position: fixed;
    inset: 0;
    z-index: 180;
    display: grid;
    place-items: center;
    padding: 16px;
    background: rgba(17, 24, 39, .52);
}

.contact-modal[hidden] {
    display: none;
}

.contact-modal__panel {
    width: min(500px, 100%);
    background: #fff;
    border-radius: 4px;
    box-shadow: 0 24px 70px rgba(15, 23, 42, .26);
    overflow: hidden;
}

.contact-modal__head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    min-height: 74px;
    padding: 0 24px;
    border-bottom: 1px solid #e5e7eb;
}

.contact-modal__head h2 {
    margin: 0;
    color: #171923;
    font-size: 30px;
    font-weight: 500;
}

.contact-modal__head button {
    width: 42px;
    height: 42px;
    border: 0;
    background: transparent;
    color: #111827;
    font-size: 38px;
    line-height: 1;
    cursor: pointer;
}

.contact-modal__body {
    padding: 28px 24px 32px;
}

.contact-modal__phone {
    display: inline-block;
    color: #171923;
    font-size: 30px;
    line-height: 1.2;
    font-weight: 800;
    letter-spacing: 1px;
}

.contact-modal__body p {
    margin: 12px 0 28px;
    color: #8b93a1;
    font-size: 16px;
}

.contact-modal__body p::after {
    content: "";
    display: block;
    height: 1px;
    margin-top: 28px;
    background: #e5e7eb;
}

.contact-modal__whatsapp {
    min-height: 60px;
    border-radius: 999px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    background: #78d56b;
    color: #fff;
    font-size: 20px;
    font-weight: 600;
}

.contact-modal__whatsapp svg {
    width: 31px;
    height: 31px;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.8;
}

@media (max-width: 1100px) {
    .mobile-category-panel {
        position: fixed;
        inset: 0 auto 0 0;
        z-index: 150;
        width: min(340px, 88vw);
        max-width: 100vw;
        height: 100dvh;
        overflow-y: auto;
        background: #fff;
        border-radius: 0;
        box-shadow: 18px 0 45px rgba(15, 23, 42, .22);
        padding: 0;
    }

    .mobile-category-head {
        position: sticky;
        top: 0;
        z-index: 2;
        height: 70px;
        margin: 0;
        padding: 0 18px;
        background: #fff !important;
        color: #0f172a !important;
        border-bottom: 1px solid #e5e7eb;
        font-size: 16px;
        font-weight: 900;
    }

    .mobile-category-grid + .mobile-category-head {
        display: none;
    }

    .mobile-category-panel:not(.is-catalog) .mobile-category-head--menu {
        display: flex;
        background: #f9e221 !important;
        color: #050505 !important;
    }

    .mobile-category-panel.is-catalog .mobile-category-head--primary {
        display: flex;
    }

    .mobile-category-panel.is-catalog .mobile-category-head--menu,
    .mobile-category-panel.is-catalog > a {
        display: none;
    }

    .mobile-category-panel:not(.is-catalog) > a {
        display: flex;
        align-items: center;
        min-height: 53px;
        padding: 0 18px;
        border-bottom: 1px solid #eceff3;
        color: #0b1220;
        font-size: 16px;
        font-weight: 800;
        line-height: 1.2;
        background: #fff;
    }

    .mobile-category-head button {
        color: inherit !important;
        font-size: 28px;
        font-weight: 900;
    }

    .mobile-category-grid {
        display: grid;
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 12px;
        padding: 0 8px 18px;
    }

    .mobile-category-card {
        min-height: 70px;
        display: grid !important;
        grid-template-columns: 48px minmax(0, 1fr);
        align-items: center;
        gap: 12px;
        padding: 10px;
        border: 1px solid #e7ebf0;
        border-radius: 12px;
        background: #fff;
        color: #0f172a;
        box-shadow: 0 3px 10px rgba(15, 23, 42, .04);
    }

    .mobile-category-card span {
        width: 48px;
        height: 48px;
        border-radius: 10px;
        display: grid;
        place-items: center;
        background: #f5f7fb;
    }

    .mobile-category-card img {
        width: 34px;
        height: 34px;
        object-fit: contain;
    }

    .mobile-category-card strong {
        min-width: 0;
        color: #0f172a;
        font-size: 13px;
        line-height: 1.25;
        font-weight: 700;
    }

    .mobile-category-panel:not(.is-catalog) .mobile-category-head--primary,
    .mobile-category-panel:not(.is-catalog) .mobile-category-grid,
    .mobile-category-panel:not(.is-catalog) .mobile-category-card {
        display: none !important;
    }

    .mobile-category-panel.is-catalog > a {
        display: none;
    }

    .mobile-bottom-nav a,
    .mobile-bottom-nav button {
        display: grid !important;
        grid-template-rows: 30px 18px;
        align-content: center;
        justify-items: center;
        gap: 2px;
        font-size: 11px;
        line-height: 1;
    }

    .mobile-bottom-nav span {
        display: block;
        max-width: 100%;
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
    }

    .mobile-bottom-nav svg {
        width: 28px !important;
        height: 28px !important;
        fill: none;
        stroke: currentColor;
        stroke-width: 1.8;
    }

    .mobile-bottom-nav__badge,
    .mobile-bottom-nav__badge.small {
        position: absolute;
        font-style: normal;
    }
}

@media (max-width: 420px) {
    .contact-modal {
        align-items: end;
        padding: 0;
    }

    .contact-modal__panel {
        border-radius: 4px 4px 0 0;
    }

    .contact-modal__head {
        padding: 0 22px;
    }

    .contact-modal__phone {
        font-size: 27px;
    }

    .contact-modal__whatsapp {
        min-height: 58px;
        font-size: 18px;
    }
}

@media (max-width: 780px) {
    .mobile-bottom-nav .user-avatar {
        width: 28px !important;
        height: 28px !important;
        min-width: 28px !important;
        max-width: 28px !important;
        align-self: center;
        justify-self: center;
    }

    .mobile-bottom-nav .user-avatar img {
        width: 28px !important;
        height: 28px !important;
        max-width: 28px !important;
    }
}
