/**
 * Agia Medica – patient-first UX (clinic vs shop, seniors, WCAG touch/contrast)
 * Brand: #4e86b6 / #00438E / #0f6fbd. Desktop layout kept; mobile is first-class.
 */

/* Skip link */
.am-skip-link {
    position: absolute;
    left: 8px;
    top: -48px;
    z-index: 10000;
    padding: 10px 16px;
    background: #0f6fbd;
    color: #fff;
    font-size: 16px;
    font-weight: 700;
    border-radius: 8px;
}
.am-skip-link:focus {
    top: 8px;
    color: #fff;
    outline: 3px solid #ffe500;
}

/* Header: one patient logo, registration CTA, larger chrome */
.header-container .toper-left {
    display: none !important;
}
.header-container .logo-home .toper {
    text-align: right;
}
.header-container .logo-home .toper a {
    color: inherit;
    text-decoration: none;
}
.logo-home {
    min-height: 72px;
    padding-right: 340px;
}
.am-header-cta {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    position: absolute;
    right: 0;
    top: 12px;
}
.am-header-phone {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    color: #c40003;
    line-height: 1.2;
    text-decoration: none;
}
.am-header-phone__label {
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: #4e86b6;
}
.am-header-phone__number {
    font-size: 22px;
    font-weight: 700;
    font-family: Lato, Montserrat, arial, serif;
}
.am-header-book {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 44px;
    padding: 0 18px;
    border-radius: 24px;
    background: #dd137b;
    color: #fff !important;
    font-size: 15px;
    font-weight: 700;
    text-decoration: none !important;
    white-space: nowrap;
}
.am-header-book:hover,
.am-header-book:focus {
    background: #b90f66;
    color: #fff !important;
}

.header-menu .btn-nav,
.header-menu .settings,
.header-menu .quick-top-search,
.header-menu .ktm-top-cart .ktm-minicart-inner,
.header-menu .icon-magnifier,
.header-menu .icon-user {
    min-width: 44px;
    min-height: 44px;
}

/* Keep account, search and cart aligned with the same desktop grid as navigation. */
@media (min-width: 1200px) {
    .header-container .header-menu .btn-group-left {
        left: calc(50% - 585px);
        padding-left: 0;
    }
    .header-container .header-menu .btn-group-right {
        right: calc(50% - 585px);
        padding-right: 0;
    }

    /* The fixed cart and search controls need their own space when the menu sticks. */
    .header-container .is-sticky .nav-top-inner {
        box-sizing: border-box;
        padding-right: 100px;
    }
    .header-container .is-sticky #ktmnav li.level0 {
        padding-right: 9px;
        padding-left: 9px;
    }
}

/* Product compare removed from storefront */
.compare-topbar,
.block-compare,
.block-top-compare,
.header-menu .compare-btn,
.header-menu .icon-chart,
li.compare,
div.compare {
    display: none !important;
}
.nav-mobile-accordion .am-mobile-book a,
.nav-mobile-accordion .am-mobile-call a {
    font-weight: 700;
    min-height: 48px;
    display: flex;
    align-items: center;
}
.nav-mobile-accordion .am-mobile-book a {
    color: #0f6fbd;
}

/* Accordion chevrons must not leak when the drawer is off-canvas */
.ktm-nav.overlay-contentscale:not(.open) span.expand,
.ktm-nav.overlay-contentscale:not(.open) span.collapse {
    visibility: hidden !important;
    pointer-events: none;
}

/* Hide edge Facebook tab – social stays in footer/content */
#like-box {
    display: none !important;
}

/* Font zoom controls */
.fontzoom {
    display: flex;
    gap: 6px;
    bottom: 16px;
    left: 16px;
    z-index: 1001;
}
.fontzoom .jfontsize-button {
    width: 44px;
    height: 44px;
    line-height: 44px;
    font-size: 16px;
    float: none;
    margin: 0;
    padding: 0;
    font-family: inherit;
    color: #0f4f86;
    background: #fff;
    border: 1px solid #a9bfd1;
    border-radius: 6px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.16);
    cursor: pointer;
}
.fontzoom .jfontsize-button:hover {
    color: #fff;
    background: #0f4f86;
    border-color: #0f4f86;
}
.fontzoom .jfontsize-button:focus {
    outline: 3px solid #dd137b;
    outline-offset: 2px;
}
.fontzoom .jfontsize-button:disabled {
    opacity: 0.55;
    cursor: default;
}
.fontzoom .jfontsize-button:disabled:hover {
    color: #0f4f86;
    background: #fff;
    border-color: #a9bfd1;
}
.am-fontzoom-status {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

/* Keep the copyright row visually attached to the blue footer. */
.footer-container .footer-copyright {
    background: #4e86b6;
    border-top: 1px solid rgba(255, 255, 255, 0.25);
}
.footer-container .footer-copyright .footer {
    padding: 12px 0;
}
.footer-container .footer-copyright .copyright,
.footer-container .footer-copyright .copyright a {
    color: #fff;
}

#back-top a,
#back-top .sticker {
    min-width: 44px;
    min-height: 44px;
}

/* Homepage patient hero */
.am-home-hero {
    margin: 0 0 28px;
    padding: 28px 28px 24px;
    border-radius: 18px;
    background: linear-gradient(135deg, #0f4f86 0%, #4e86b6 100%);
    color: #fff;
}
.am-home-hero__badge {
    display: inline-block;
    margin-bottom: 10px;
    padding: 4px 10px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.18);
    font-size: 13px;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}
.am-home-hero h1 {
    margin: 0 0 10px;
    color: #fff;
    font-size: 32px;
    line-height: 1.25;
    font-weight: 700;
}
.am-home-hero p {
    margin: 0 0 18px;
    max-width: 640px;
    font-size: 18px;
    line-height: 1.5;
    color: #f3f7fb;
}
.am-home-hero__actions {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}
.am-home-hero__actions a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 48px;
    padding: 0 20px;
    border-radius: 12px;
    font-size: 16px;
    font-weight: 700;
    text-decoration: none !important;
}
.am-home-hero__call {
    background: #fff;
    color: #0f4f86 !important;
}
.am-home-hero__book {
    background: #dd137b;
    color: #fff !important;
}

.am-home-section {
    margin: 0 0 22px;
}

/* Homepage products are selected by the global `home` product attribute. */
.am-featured-products {
    margin: 0 0 28px;
}
.am-featured-products__head h2 {
    margin: 0 0 14px;
    color: #16324f;
    font-size: 22px;
    font-weight: 700;
}
.am-featured-products__grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 16px;
}
.am-featured-products__item {
    display: flex;
    flex-direction: column;
    min-width: 0;
    padding: 12px;
    border: 1px solid #e4eaf0;
    border-radius: 14px;
    background: #fff;
}
.am-featured-products__image {
    display: block;
    overflow: hidden;
    aspect-ratio: 1;
    margin-bottom: 12px;
    border-radius: 10px;
    background: #f6f8fa;
}
.am-featured-products__image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}
.am-featured-products__item h3 {
    margin: 0 0 8px;
    font-size: 16px;
    line-height: 1.35;
}
.am-featured-products__item h3 a {
    color: #16324f;
    text-decoration: none;
}
.am-featured-products__price {
    margin-bottom: 12px;
    color: #16324f;
    font-weight: 700;
}
.am-home-section__title {
    margin: 0 0 14px;
    font-size: 22px;
    font-weight: 700;
    color: #16324f;
}

.am-home-specialties__head {
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    justify-content: space-between;
    gap: 8px 16px;
    margin: 0 0 14px;
}
.am-home-specialties__head .am-home-section__title {
    margin: 0;
}
.am-home-specialties__all {
    color: #0f6fbd;
    font-size: 15px;
    font-weight: 700;
    text-decoration: none;
}
.am-home-specialties__all:hover,
.am-home-specialties__all:focus {
    text-decoration: underline;
}
.am-home-specialties__panel {
    margin: 0;
    padding: 18px 20px 12px;
}
.am-home-specialties__group {
    margin: 0 0 18px;
}
.am-home-specialties__group:last-child {
    margin-bottom: 6px;
}
.am-home-specialties__group-title {
    margin: 0 0 10px;
    padding: 0 0 8px;
    border-bottom: 2px solid #0f6fbd;
    font-size: 18px;
    font-weight: 700;
    line-height: 1.3;
}
.am-home-specialties__group-title a {
    color: #16324f;
    text-decoration: none;
}
.am-home-specialties__group-title a:hover,
.am-home-specialties__group-title a:focus {
    color: #0f6fbd;
}
.am-home-specialties__group-title--solo {
    margin-bottom: 0;
    border-bottom: 0;
    padding-bottom: 0;
}
.am-home-specialties__group-title--solo a {
    display: flex;
    align-items: center;
    min-height: 48px;
}
.am-home-specialties__list {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0 24px;
    list-style: none;
    margin: 0;
    padding: 0;
}
.am-home-specialties__list li {
    margin: 0;
    padding: 0;
    border-bottom: 1px solid #e4eaf0;
}
.am-home-specialties__list a {
    display: flex;
    align-items: center;
    min-height: 48px;
    padding: 10px 4px;
    color: #2c3d4a;
    font-size: 16px;
    font-weight: 600;
    line-height: 1.35;
    text-decoration: none;
}
.am-home-specialties__list a:hover,
.am-home-specialties__list a:focus {
    color: #0f6fbd;
}
.am-home-specialties__list a:focus {
    outline: 2px solid #0f6fbd;
    outline-offset: 2px;
}

.am-home-specialties__columns {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 24px;
}
.am-home-specialties__columns .am-home-specialties__group {
    margin-bottom: 0;
}
.am-home-specialties__columns .am-home-specialties__list {
    grid-template-columns: 1fr;
}
.am-home-specialties__standalone {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 48px;
    margin-top: 20px;
    padding: 10px 16px;
    border: 2px solid #dd137b;
    border-radius: 12px;
    color: #7d0c47;
    font-size: 16px;
    font-weight: 700;
    text-decoration: none;
}
.am-home-specialties__standalone:hover,
.am-home-specialties__standalone:focus {
    background: #fff0f8;
    color: #7d0c47;
}

/* Four brands, treated as a quiet corporate trust signal rather than a banner. */
.am-home-brands {
    padding: 24px;
    border: 1px solid #e4eaf0;
    border-radius: 18px;
    background: #fbfcfe;
}
.am-home-brands__head {
    margin-bottom: 18px;
}
.am-home-brands__head .am-home-section__title {
    margin-bottom: 4px;
}
.am-home-brands__head p {
    margin: 0;
    color: #5b6b78;
    font-size: 16px;
}
.am-home-brands__grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 12px;
}
.am-home-brands__item {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100px;
    padding: 16px;
    border: 1px solid #e4eaf0;
    border-radius: 12px;
    background: #fff;
}
.am-home-brands__item img {
    display: block;
    width: 100%;
    max-width: 180px;
    max-height: 64px;
    height: auto;
    object-fit: contain;
}
@media (max-width: 991px) {
    .am-featured-products__grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
    .am-home-specialties__columns {
        grid-template-columns: 1fr;
        gap: 18px;
    }
    .am-home-brands__grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}
@media (max-width: 767px) {
    .am-featured-products__grid {
        gap: 10px;
    }
    .am-featured-products__item {
        padding: 10px;
    }
    .am-home-specialties__list {
        grid-template-columns: 1fr;
    }
    .am-home-specialties__panel {
        padding: 14px 14px 8px;
        border: 2px solid #0f6fbd;
    }
    .am-home-brands {
        padding: 18px 14px;
    }
}

/* Tile contrast: solid overlay, not photo-dependent */
.cms-index-index .img-block,
.main-top .img-block {
    position: relative;
    overflow: hidden;
    border-radius: 12px;
}
.cms-index-index .img-block .img-text,
.main-top .img-block .img-text {
    background: linear-gradient(to top, rgba(36, 118, 164, 0.65) 0%, rgba(138, 207, 235, 0.20) 100%) !important;
}
.cms-index-index .img-block .img-text a,
.cms-index-index .img-block .img-text a span,
.main-top .img-block .img-text a,
.main-top .img-block .img-text a span {
    color: #fff !important;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.45);
    font-weight: 700;
}
.img-block--shop .img-text a span::after {
    content: "Sklep";
    display: block;
    margin-top: 4px;
    font-size: 12px;
    font-weight: 600;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    opacity: 0.9;
}

.am-patient-intro .category-description {
    font-size: 16px;
    line-height: 1.55;
    color: #24323c;
}
.am-patient-intro .category-description img {
    display: block;
    max-width: 100%;
    height: auto;
    margin: 12px 0 16px;
    border-radius: 8px;
}
.am-patient-intro .category-description-toggle {
    display: none !important;
}

/* Keep registration CTA visible on category pages (mobile patients need it) */

/* Shop catalog accordion vs clinic specialty tree (Codnitive) */
body[class*="categorypath-uslugi-w-przychodniach"] .block.block-nav,
body.category-uslugi-w-przychodniach .block.block-nav {
    display: none !important;
}

/*
 * Codnitive #sidebar-nav-menu – site-wide readability (seniors, 16px+, 48px tap).
 * Do not target #sidebar-nav alone: Magento shop tree reused that id.
 */
.block.sidebar-nav-left,
.am-sidenav {
    margin: 0 0 20px;
    padding: 4px 14px 12px;
    border: 1px solid #d5e3ee;
    border-radius: 12px;
    background: #fff;
    box-shadow: 0 1px 0 rgba(15, 111, 189, 0.08);
}
.block.sidebar-nav-left .block-title,
.am-sidenav .block-title {
    margin: 0 0 4px;
    padding: 14px 2px 10px;
    border: 0;
    border-bottom: 2px solid #0f6fbd;
    background: none;
}
.block.sidebar-nav-left .block-title strong,
.block.sidebar-nav-left .block-title span,
.am-sidenav .block-title strong,
.am-sidenav .block-title span {
    color: #16324f;
    font-family: Lato, Montserrat, arial, sans-serif;
    font-size: 18px;
    font-weight: 700;
    letter-spacing: 0;
    text-transform: none;
    line-height: 1.25;
}
.block.sidebar-nav-left .block-content,
.am-sidenav .block-content {
    overflow: visible;
    padding: 4px 0 8px;
}
#sidebar-nav-menu,
#sidebar-nav-menu ul,
.codnitiveSidenavLeft ul,
.codnitiveSidenavLeft ul ul,
.codnitiveSidenavLeft ul ul ul {
    list-style: none !important;
    margin: 0;
    padding: 0;
}
#sidebar-nav-menu > li,
.codnitiveSidenavLeft li.level0,
.codnitiveSidenavLeft #sidebar-nav-menu > li {
    background: none !important;
    list-style: none !important;
    margin: 0 !important;
    padding: 0 !important;
    border-bottom: 1px solid #e4eaf0;
}
#sidebar-nav-menu > li.last {
    border-bottom: 0;
}
#sidebar-nav-menu li a,
#sidebar-nav-menu .collapsible-wrapper,
#sidebar-nav-menu .category_name,
.codnitiveSidenavLeft li a,
.codnitiveSidenavLeft li a .category_name {
    color: #16324f;
    font-family: Lato, Montserrat, arial, sans-serif;
    font-size: 16px !important;
    font-weight: 700 !important;
    line-height: 1.35;
    text-decoration: none;
}
#sidebar-nav-menu > li > a,
#sidebar-nav-menu > li > .collapsible-wrapper {
    display: block;
    min-height: 48px;
    padding: 12px 44px 12px 0;
}
#sidebar-nav-menu li li a,
#sidebar-nav-menu li li .collapsible-wrapper,
.codnitiveSidenavLeft li li a,
.codnitiveSidenavLeft li li a .category_name {
    display: block;
    min-height: 44px;
    padding: 7px 5px 7px 5px;
    color: #2c3d4a;
    font-size: 15px !important;
    font-weight: 600 !important;
}
#sidebar-nav-menu li li li a,
.codnitiveSidenavLeft li li li a,
.codnitiveSidenavLeft li li li a .category_name {
    padding-left: 24px;
    font-size: 15px !important;
    font-weight: 500 !important;
}
#sidebar-nav-menu li.active > a,
#sidebar-nav-menu li.active > .collapsible-wrapper,
#sidebar-nav-menu li.active > a .category_name,
.codnitiveSidenavLeft li.active > a,
.codnitiveSidenavLeft li.level0.active > a,
.codnitiveSidenavLeft li.level0.active li.level1.active > a,
.codnitiveSidenavLeft li.level0.active li.level1.active > a .category_name {
    color: #0f6fbd !important;
    font-weight: 700 !important;
}
#sidebar-nav-menu a:hover,
#sidebar-nav-menu a:focus,
.codnitiveSidenavLeft a:hover,
.codnitiveSidenavLeft a:focus {
    color: #0f6fbd;
}
#sidebar-nav-menu a:focus,
.codnitiveSidenavLeft a:focus {
    outline: 2px solid #0f6fbd;
    outline-offset: 2px;
}
#sidebar-nav-menu .plus-left,
#sidebar-nav-menu .plus-right,
#sidebar-nav-menu .arrow-left,
#sidebar-nav-menu .arrow-right {
    width: 44px !important;
    height: 44px !important;
    margin: 2px 0 0 !important;
    background-position: center !important;
    background-repeat: no-repeat !important;
    background-size: 18px auto;
}
#sidebar-nav-menu li.home a {
    min-height: 48px;
    padding-left: 0;
    background: none;
}
#sidebar-nav-menu span.product-count {
    color: #5b6b78;
    font-size: 14px;
    font-weight: 600;
}

@media (max-width: 991px) {
    .block.sidebar-nav-left,
    .am-sidenav {
        margin-bottom: 16px;
        padding: 2px 12px 10px;
        border: 2px solid #0f6fbd;
        border-radius: 12px;
        box-shadow: none;
    }
    .block.sidebar-nav-left .block-title span,
    .am-sidenav .block-title span {
        font-size: 18px;
    }
    #sidebar-nav-menu li a,
    #sidebar-nav-menu .category_name,
    .codnitiveSidenavLeft li a,
    .codnitiveSidenavLeft li a .category_name {
        font-size: 17px !important;
    }
    #sidebar-nav-menu li li a,
    #sidebar-nav-menu li li a .category_name,
    .codnitiveSidenavLeft li li a,
    .codnitiveSidenavLeft li li a .category_name {
        font-size: 16px !important;
    }
    #sidebar-nav-menu > li > a,
    #sidebar-nav-menu > li > .collapsible-wrapper {
        min-height: 48px;
        padding-top: 12px;
        padding-bottom: 12px;
    }
    #sidebar-nav-menu li li a,
    #sidebar-nav-menu li li .collapsible-wrapper {
        padding: 7px 5px 7px 5px;
    }
    .category-mobile-sidebar-toggle.is-clinic-nav {
        border-color: #0f6fbd;
        background: #eef6fc;
        color: #16324f;
        font-size: 16px;
    }
}
.am-clinic-cta {
    display: flex;
    flex-direction: column;
    gap: 8px;
    width: 100%;
}
.am-clinic-cta__book,
.am-clinic-cta .button {
    display: inline-flex !important;
    align-items: center;
    justify-content: center;
    min-height: 48px;
    width: 100%;
    padding: 0 16px;
    border: 0;
    border-radius: 12px;
    background: #0f6fbd !important;
    color: #fff !important;
    font-size: 16px;
    font-weight: 700;
    text-decoration: none !important;
}
.am-clinic-cta__call {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 44px;
    font-size: 15px;
    font-weight: 700;
    color: #0f6fbd;
}
.am-clinic-cta__pay {
    display: inline-block;
    margin-top: 4px;
    font-size: 14px;
    color: #4a5560;
    text-decoration: underline;
}
.am-clinic-banner {
    margin: 0 0 20px;
    padding: 16px 18px;
    border-radius: 14px;
    background: #eef6fc;
    border: 1px solid #cfe3f4;
}
.am-clinic-banner p {
    margin: 0 0 10px;
    font-size: 16px;
    line-height: 1.5;
}
.am-clinic-banner__actions {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}
.am-clinic-banner__actions a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 44px;
    padding: 0 16px;
    border-radius: 10px;
    font-weight: 700;
    text-decoration: none !important;
}
.am-clinic-banner__call {
    background: #0f6fbd;
    color: #fff !important;
}
.am-clinic-banner__book {
    background: #fff;
    color: #0f6fbd !important;
    border: 1px solid #0f6fbd;
}

.am-pdp-sticky {
    display: none;
}

/* Contact form – registration-sized controls */
.am-contact-form .input-text,
.am-contact-form select,
.am-contact-form textarea {
    width: 100%;
    min-height: 48px;
    padding: 12px 14px;
    border: 1px solid #c2cad5;
    border-radius: 12px;
    font-size: 16px;
    box-sizing: border-box;
}
.am-contact-form textarea {
    min-height: 120px;
}
.am-contact-form label {
    display: block;
    margin-bottom: 8px;
    font-size: 16px;
    font-weight: 700;
}
.am-contact-form .subscribe-info {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    font-size: 15px;
    font-style: normal;
    line-height: 1.45;
}
.am-contact-form .am-checkbox {
    position: relative;
    flex: 0 0 44px;
    width: 44px;
    height: 44px;
    margin: 0 !important;
}
.am-contact-form .am-checkbox input {
    position: absolute;
    top: 0;
    left: 0;
    width: 44px;
    height: 44px;
    margin: 0;
    opacity: 0;
    cursor: pointer;
}
.am-contact-form .am-checkbox span {
    display: block;
    width: 24px;
    height: 24px;
    margin: 10px;
    border: 2px solid #4e86b6;
    border-radius: 4px;
    background: #fff;
}
.am-contact-form .am-checkbox input:checked + span {
    background: #0f6fbd;
    box-shadow: inset 0 0 0 3px #fff;
}
.am-contact-form .am-checkbox input:focus + span {
    outline: 3px solid #ffe500;
}
.am-contact-form .buttons-set .button {
    width: 100%;
    min-height: 48px;
    font-size: 16px;
    font-weight: 700;
}

/* Registration: recommended phone path */
.registration-cta-card.is-primary {
    background: #0f6fbd;
    border-color: #0f6fbd;
    color: #fff;
}
.registration-cta-card.is-primary .registration-cta-title,
.registration-cta-card.is-primary .registration-cta-copy {
    color: #fff;
}
.registration-cta-card.is-primary .registration-cta-phone {
    display: block;
    margin-top: 8px;
    font-size: 22px;
    font-weight: 700;
}
.registration-path-note {
    margin: 0 0 18px;
    font-size: 16px;
    line-height: 1.6;
}
.registration-form-fallback-title {
    margin: 28px 0 12px;
    font-size: 22px;
}

/* Hide legacy CMS intro that duplicates / contradicts the new flow */
.std .registration-flow {
    margin-top: 8px;
}
.cms-page-view .std > *:not(.registration-flow):not(script):not(style) {
    /* kept visible unless JS marks the page; JS hides preceding siblings */
}

/* Cennik filter */
.am-cennik-filter {
    margin: 0 0 16px;
}
.am-cennik-filter input {
    width: 100%;
    max-width: 420px;
    min-height: 48px;
    padding: 12px 14px;
    border: 1px solid #c2cad5;
    border-radius: 12px;
    font-size: 16px;
}

/* Footer: registration number hierarchy */
.footer-container .am-footer-register {
    margin: 0 0 8px;
}
.footer-container .am-footer-register a {
    color: #fff;
    font-size: 20px;
    font-weight: 700;
}
.footer-container .am-footer-office {
    opacity: 0.85;
    font-size: 13px;
}

/* Sticky mobile conversion bar */
.am-mobile-cta {
    display: none;
}

@media (max-width: 991px) {
    body {
        font-size: 16px;
        line-height: 1.5;
    }
    .col-main,
    .col-main p,
    .col-main li,
    .category-description,
    .short-description {
        font-size: 16px;
        line-height: 1.5;
    }

    .am-home-hero {
        padding: 20px 16px 18px;
        margin-bottom: 18px;
    }
    .am-home-hero h1 {
        font-size: 24px;
    }
    .am-home-hero p {
        font-size: 16px;
    }
    .am-home-hero__actions a {
        flex: 1 1 100%;
    }

    /* Contact / forms */
    #contactForm .input-text,
    #contactForm select,
    #contactForm textarea,
    .form-list .input-text,
    .form-list select,
    .form-list textarea {
        min-height: 48px;
        font-size: 16px;
    }
    #contactForm .button,
    .am-contact-form .button {
        width: 100%;
        min-height: 48px;
    }

    .cennik td,
    .cennik th {
        font-size: 15px;
        padding: 10px 8px;
    }
}

/* ==========================================================================
   Mobile / tablet: header + main menu (patient-first)
   Loaded after responsive.css – wins over theme breakpoints.
   ========================================================================== */
@media (max-width: 1199px) {
    /* Keep logo + registration CTA; hide desktop megamenu that wraps badly */
    .header-container.header-layout-1 .header,
    .header-container .header {
        display: block !important;
    }
    .header-container .nav-top,
    .header-container .ktm-navigation,
    .header-container .ktm-main-menu {
        display: none !important;
    }
    .header-container .menu-bar-btn {
        display: block !important;
    }

    /* Whole chrome sticks; disable theme sticky plugin shift */
    .header-container.header-layout-1 {
        position: sticky;
        top: 0;
        z-index: 200;
        display: flex;
        flex-direction: column;
        background: #fff;
        box-shadow: 0 1px 0 rgba(15, 79, 134, 0.12);
    }
    .header-container.header-layout-1 .menu-full {
        order: -1;
    }
    .is-sticky #ktm-sticky-header,
    #ktm-sticky-header,
    #ktm-sticky-header-sticky-wrapper,
    .header-container .sticky-wrapper {
        position: relative !important;
        top: auto !important;
        width: 100% !important;
        height: 56px !important;
        min-height: 56px;
        box-shadow: none !important;
        border-bottom: 0 !important;
    }
    .ktm-wrapper.overlay-open {
        -webkit-transform: none !important;
        transform: none !important;
    }

    /* Tool bar: hamburger + account / search / cart */
    .header-container .header-menu {
        display: flex;
        align-items: center;
        justify-content: space-between;
        height: 56px;
        min-height: 56px;
        padding: 0 6px;
        text-align: left;
        background: #0f6fbd;
    }
    .header-container .header-menu .btn-group-left,
    .header-container .header-menu .btn-group-right {
        position: static;
        display: flex;
        align-items: center;
        gap: 2px;
        padding: 0;
        float: none;
    }
    .header-container .header-menu .btn-group-right > div,
    .header-container .header-menu .btn-group-left > div {
        float: none;
    }
    .header-container .header-menu .menu-bar-btn,
    .header-container .header-menu .settings,
    .header-container .header-menu .quick-top-search,
    .header-container .header-menu .ktm-top-cart {
        display: flex;
        align-items: center;
        justify-content: center;
        height: 56px;
        margin: 0;
        padding: 0;
        line-height: 0;
    }
    .header-container .header-menu .btn-nav,
    .header-container .header-menu .settings,
    .header-container .header-menu .quick-top-search,
    .header-container .header-menu .ktm-top-cart .ktm-minicart-inner {
        min-width: 48px;
        min-height: 48px;
        color: #fff !important;
    }
    .header-container .header-menu .btn-nav {
        display: inline-flex;
        align-items: center;
        justify-content: center;
        width: 48px;
        height: 48px;
        padding: 0;
        border: 0;
        background: transparent;
        border-radius: 10px;
        line-height: 0;
    }
    .header-container .header-menu .btn-nav i {
        display: flex;
        align-items: center;
        justify-content: center;
        width: 48px;
        height: 48px;
        font-size: 26px;
        line-height: 1 !important;
        color: #fff;
    }
    .header-container .header-menu .btn-nav:hover,
    .header-container .header-menu .btn-nav:focus,
    .header-container .header-menu .btn-nav[aria-expanded="true"] {
        background: rgba(255, 255, 255, 0.16);
        outline: none;
    }
    .header-container .header-menu .settings,
    .header-container .header-menu .quick-top-search {
        width: 48px;
        border-radius: 10px;
    }
    .header-container .header-menu .settings > i,
    .header-container .header-menu .quick-top-search > i,
    .header-container .header-menu .icon-user,
    .header-container .header-menu .icon-magnifier {
        display: flex;
        align-items: center;
        justify-content: center;
        width: 48px;
        height: 48px;
        min-width: 48px;
        min-height: 48px;
        margin: 0;
        padding: 0;
        font-size: 22px;
        line-height: 1 !important;
        color: #fff !important;
        vertical-align: middle;
    }
    .header-container .header-menu .settings > i:before,
    .header-container .header-menu .quick-top-search > i:before {
        display: block;
        line-height: 1;
    }
    .header-container .header-menu .settings.is-open,
    .header-container .header-menu .quick-top-search.is-open {
        background: rgba(255, 255, 255, 0.16);
    }
    .header-container .header-menu .ktm-icon-ajaxcart,
    .header-container .header-menu .ktm-icon-ajaxcart a,
    .header-container .header-menu .ktm-maincart {
        display: flex;
        align-items: center;
        justify-content: center;
        height: 56px;
        margin: 0;
        padding: 0;
        float: none;
        position: static;
    }
    .header-container .ktm-icon-ajaxcart,
    .header-container .ktm-icon-ajaxcart a,
    .header-container .ktm-icon-ajaxcart .icon-cart,
    .header-container .ktm-icon-ajaxcart .icons {
        color: #fff !important;
        line-height: 1 !important;
    }
    .header-container .ktm-icon-ajaxcart .icon-cart {
        display: flex;
        align-items: center;
        justify-content: center;
        width: 48px;
        height: 48px;
        margin: 0;
    }

    /* Disable hover popovers on touch; use .is-open from JS */
    .header-container .settings:hover .settings-inner,
    .header-container .quick-top-search:hover .top-search {
        opacity: 0;
        visibility: hidden;
    }
    .header-container .settings.is-open .settings-inner,
    .header-container .quick-top-search.is-open .top-search {
        opacity: 1;
        visibility: visible;
    }
    .header-container .settings .settings-inner {
        left: 0;
        right: auto;
    }
    .header-container .settings .setting-content {
        width: min(290px, calc(100vw - 24px));
        border-radius: 12px;
        box-shadow: 0 12px 32px rgba(0, 0, 0, 0.18);
    }
    .header-container .settings .setting-option ul li a {
        display: flex;
        align-items: center;
        min-height: 48px;
        color: #16324f;
        font-size: 16px;
        font-weight: 600;
    }
    .header-container .quick-top-search .top-search {
        right: 0;
        left: auto;
        width: min(320px, calc(100vw - 16px));
        padding: 12px;
        background: #fff;
        border: 1px solid #d5e3ee;
        border-radius: 12px;
        box-shadow: 0 12px 32px rgba(0, 0, 0, 0.16);
    }
    .header-container .quick-top-search .top-search .input-text {
        min-height: 48px;
        font-size: 16px;
        width: 100%;
    }

    /* Logo + registration row */
    .header-container .header-inner {
        height: auto;
        min-height: 0;
        padding: 10px 0 12px;
    }
    .header-container .logo-home {
        position: relative;
        display: flex;
        flex-direction: column;
        align-items: stretch;
        gap: 10px;
        min-height: 0;
        padding: 0;
        height: auto !important;
    }
    .header-container .logo-home .logo {
        display: block;
        text-align: center;
    }
    .header-container .logo-home .logo img {
        max-height: 52px;
        width: auto;
        margin: 0 auto;
    }
    .header-container .am-header-cta {
        position: static;
        display: flex;
        align-items: stretch;
        justify-content: space-between;
        gap: 8px;
        width: 100%;
        margin: 0;
        top: auto;
        right: auto;
    }
    .header-container .am-header-phone {
        flex: 1 1 auto;
        align-items: flex-start;
        justify-content: center;
        min-height: 48px;
        padding: 6px 10px;
        border-radius: 12px;
        background: #eef6fc;
        text-decoration: none;
    }
    .header-container .am-header-phone__label {
        font-size: 11px;
    }
    .header-container .am-header-phone__number {
        font-size: 18px;
        color: #c40003;
    }
    .header-container .am-header-book {
        flex: 0 0 auto;
        min-height: 48px;
        padding: 0 16px;
        border-radius: 12px;
        font-size: 15px;
    }
    .header-container .header-inner .toper,
    .header-container .header-inner .contact,
    .header-container .header-inner .dist {
        display: none !important;
    }

    /* Drawer overlay — fully off-canvas when closed (theme used -320px) */
    .ktm-nav.overlay {
        width: min(100vw, 360px);
        padding-top: 72px;
        background: #fff;
        -webkit-overflow-scrolling: touch;
        overflow: hidden;
    }
    .ktm-nav.overlay-contentscale {
        background: #fff;
        -webkit-transform: translateX(-110%);
        transform: translateX(-110%);
        visibility: hidden;
        pointer-events: none;
        box-shadow: none;
    }
    .ktm-nav.overlay-contentscale:not(.open),
    .ktm-nav.overlay-contentscale:not(.open) *,
    .ktm-nav.overlay-contentscale:not(.open) span.expand,
    .ktm-nav.overlay-contentscale:not(.open) span.collapse {
        visibility: hidden !important;
    }
    .ktm-nav.overlay-contentscale.open {
        visibility: visible;
        pointer-events: auto;
        -webkit-transform: translateX(0);
        transform: translateX(0);
        box-shadow: 4px 0 24px rgba(0, 0, 0, 0.18);
        overflow: auto;
    }
    .ktm-nav.overlay-contentscale.open,
    .ktm-nav.overlay-contentscale.open * {
        visibility: visible;
    }
    .ktm-nav .overlay-close {
        top: 12px;
        right: 12px;
        width: 48px;
        height: 48px;
        border-radius: 12px;
        color: #16324f;
        font-size: 24px;
        background: #eef6fc;
    }
    .ktm-nav .overlay-close i {
        line-height: 48px;
    }
    .ktm-nav .logo-canvas {
        margin: 0 16px 12px;
    }
    .ktm-nav .logo-canvas img {
        max-height: 44px;
        margin: 0 auto;
    }
    .ktm-nav ul.nav-accordion {
        display: block;
        width: 100%;
        min-width: 0;
        margin: 0;
        padding: 0 0 96px;
    }
    .ktm-nav ul.nav-accordion li a,
    .ktm-nav ul.nav-accordion > li > a {
        min-height: 52px;
        height: auto;
        padding: 14px 52px 14px 16px;
        color: #16324f;
        font-size: 17px;
        font-weight: 700;
        line-height: 1.3;
        border-bottom: 1px solid #e4eaf0;
        text-transform: none;
    }
    .ktm-nav ul.nav-accordion ul li a {
        min-height: 48px;
        padding-left: 28px;
        font-size: 16px;
        font-weight: 600;
        color: #2c3d4a;
    }
    .ktm-nav ul.nav-accordion ul ul li a {
        padding-left: 40px;
        font-size: 15px;
        font-weight: 500;
    }
    .ktm-nav ul.nav-accordion li span.expand,
    .ktm-nav ul.nav-accordion li span.collapse {
        width: 48px;
        height: 52px;
        line-height: 52px;
        font-size: 18px;
        color: #0f6fbd;
        border-left: 1px solid #e4eaf0;
    }
    .ktm-nav .am-mobile-book a,
    .ktm-nav .am-mobile-call a {
        margin: 8px 16px;
        padding: 14px 16px !important;
        border: 0 !important;
        border-radius: 12px;
        min-height: 52px;
        justify-content: center;
        text-align: center;
    }
    .ktm-nav .am-mobile-book a {
        background: #0f6fbd !important;
        color: #fff !important;
    }
    .ktm-nav .am-mobile-call a {
        background: #eef6fc !important;
        color: #0f4f86 !important;
    }
    .ktm-nav .home a {
        font-weight: 700;
    }

    /* Dim page behind open menu */
    body.am-nav-open {
        overflow: hidden;
    }
    body.am-nav-open .am-nav-backdrop {
        display: block;
    }
    .am-nav-backdrop {
        display: none;
        position: fixed;
        inset: 0;
        z-index: 9998;
        background: rgba(12, 32, 54, 0.48);
        border: 0;
        padding: 0;
        cursor: pointer;
    }
}

@media (max-width: 767px) {
    .header-container .logo-home .logo img {
        max-height: 44px;
    }
    .header-container .am-header-phone__number {
        font-size: 16px;
    }
    .header-container .am-header-book {
        padding: 0 14px;
        font-size: 14px;
    }
    .ktm-nav.overlay {
        width: 100vw;
        max-width: 100vw;
    }
}

@media (max-width: 767px) {
    body.am-has-mobile-cta {
        padding-bottom: 76px;
    }

    .am-mobile-cta {
        display: flex;
        position: fixed;
        left: 0;
        right: 0;
        bottom: 0;
        z-index: 1000;
        gap: 0;
        background: #fff;
        box-shadow: 0 -4px 18px rgba(0, 0, 0, 0.12);
        padding: 8px 8px calc(8px + env(safe-area-inset-bottom, 0px));
    }
    .am-mobile-cta a {
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        flex: 1 1 50%;
        min-height: 56px;
        padding: 6px 8px;
        border-radius: 10px;
        text-decoration: none !important;
        line-height: 1.2;
    }
    .am-mobile-cta__call {
        color: #0f4f86;
        background: #eef6fc;
        margin-right: 6px;
    }
    .am-mobile-cta__book {
        background: #dd137b;
        color: #fff !important;
        font-size: 16px;
        font-weight: 700;
    }
    .am-mobile-cta__kicker {
        font-size: 12px;
        font-weight: 700;
        text-transform: uppercase;
        letter-spacing: 0.03em;
    }
    .am-mobile-cta__value {
        font-size: 14px;
        font-weight: 700;
    }

    #back-top {
        bottom: 86px;
        right: 10px;
    }
    .fontzoom {
        display: flex;
        bottom: 86px;
    }
    body.am-pdp-sticky-visible .fontzoom {
        bottom: calc(96px + var(--am-pdp-sticky-height, 0px));
    }
    body.am-pdp-sticky-visible #back-top {
        bottom: calc(96px + var(--am-pdp-sticky-height, 0px));
    }
    body.am-has-mobile-cta.am-pdp-sticky-visible {
        padding-bottom: calc(76px + var(--am-pdp-sticky-height, 0px));
    }

    /* Long service names and prices must remain inside the viewport. */
    table.cennik {
        width: 100%;
        table-layout: fixed;
    }
    table.cennik th,
    table.cennik td {
        white-space: normal;
        overflow-wrap: anywhere;
    }
    table.cennik th:first-child:not(:last-child):not([colspan]),
    table.cennik td:first-child:not(:last-child):not([colspan]) {
        width: 70%;
    }
    table.cennik th:last-child:not(:first-child):not([colspan]),
    table.cennik td:last-child:not(:first-child):not([colspan]) {
        width: 30%;
    }
    .col-main {
        overflow-wrap: anywhere;
    }
    .col-main a[href^="mailto:"] {
        white-space: normal;
    }

    .am-pdp-sticky.is-visible {
        display: flex;
        flex-direction: column;
        position: fixed;
        left: 8px;
        right: 8px;
        bottom: 84px;
        z-index: 999;
        align-items: stretch;
        gap: 6px;
        padding: 10px 12px;
        border-radius: 12px;
        background: #fff;
        box-shadow: 0 8px 24px rgba(0, 0, 0, 0.16);
    }
    .am-pdp-sticky .price {
        font-size: 18px;
        font-weight: 700;
        color: #16324f;
    }
    .am-pdp-sticky .button {
        min-height: 48px;
        width: 100%;
        min-width: 0;
        max-width: 100%;
        padding: 0 8px;
        box-sizing: border-box;
        font-size: 16px;
        font-weight: 700;
    }
    .am-pdp-sticky .button > span {
        padding: 8px;
        line-height: 1.2;
        white-space: normal;
    }

    .product-shop .add-to-box,
    .product-shop .addtocart {
        order: -1;
    }
    .product-view .product-shop {
        display: flex;
        flex-direction: column;
    }
    .product-view .product-shop .top-product-name,
    .product-view .product-shop .price-box,
    .product-view .product-shop .product-type-data {
        order: 0;
    }
}

@media (min-width: 768px) {
    .am-mobile-cta {
        display: none !important;
    }
}
