/* =====================================================================
   THEME 71 — "Farmacia Azzurra" — responsive rules
   ===================================================================== */

@media (max-width: 1199.98px) {
    .header-title { font-size: 23px; }
    .carousel-item .custom-container { padding: 48px 40px 156px; }
    .index-page .products-list,
    .favorites-page .products-list { grid-template-columns: repeat(3, minmax(0, 1fr)); }
    .package-wrapper {
        grid-template-columns: 104px 76px minmax(0, 1fr) minmax(0, 1.3fr) auto;
        gap: 12px 14px;
        padding: 12px 16px 12px 14px;
    }
    .package-image > div { width: 76px; height: 58px; }
    .products-wrapper,
    .product-page__container { grid-template-columns: 240px minmax(0, 1fr); column-gap: 24px; }
    .footer-items { gap: 32px; }
}

@media (max-width: 991.98px) {
    /* header collapses to: button | logo | icons  /  search */
    .header-grid {
        grid-template-columns: auto minmax(0, 1fr) auto auto;
        grid-template-areas:
            "menu logo fav cart"
            "search search search search";
        column-gap: 12px;
        row-gap: 12px;
    }
    .header-nav { display: none; }
    .header-grid > .main-menu > .menu-wrapper > .menu-open {
        width: 48px;
        height: 48px;
        padding: 0;
        justify-content: center;
        border-radius: var(--r-md);
    }
    .header-grid > .main-menu > .menu-wrapper > .menu-open .menu-open-label { display: none; }
    .site-logo { width: 36px; height: 36px; }
    .header-title { font-size: 21px; }
    .header-search .side_search { height: 48px; }
    #header.checkout .header-grid { grid-template-areas: "menu logo cart"; grid-template-columns: auto minmax(0, 1fr) auto; }

    /* listings */
    .products-wrapper,
    .product-page__container { display: block; }
    .products-categories { display: none; }
    .toolbar__wrapper { flex-direction: column; align-items: stretch; gap: 1rem; }
    .products-page .toolbar__categories,
    .product-page .toolbar__categories { display: block; max-width: 420px; }
    .search-page .products-page .toolbar__categories { display: block; }
    .products-list { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
    .index-page .products-list,
    .favorites-page .products-list { grid-template-columns: repeat(3, minmax(0, 1fr)); }

    /* home */
    .carousel-item { min-height: 500px; }
    .carousel-item .custom-container { min-height: 500px; padding: 40px 32px 184px; gap: 1.1rem; }
    .carousel-item h2 { max-width: 520px; }
    .carousel-indicators-wrapper .custom-container { padding: 0 32px; }
    .features-items { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .item-layout { grid-template-columns: 1fr; gap: 2rem; }
    .item-banner { order: -1; max-width: 420px; }
    .products-section .item-layout,
    .info-section .item-layout { gap: 2.5rem; }
    .intro-section .item-banner { order: 0; }

    /* product */
    .product-intro { grid-template-columns: 180px minmax(0, 1fr); gap: 20px; padding: 18px; }
    .product-img { min-height: 160px; }
    .package-wrapper {
        grid-template-columns: 76px minmax(0, 1fr) auto;
        grid-template-areas:
            "image dose buy"
            "image price buy"
            "bonus bonus bonus";
        gap: 4px 14px;
        padding: 14px 16px;
    }
    .package-image { grid-area: image; align-self: start; }
    .package-dose { grid-area: dose; }
    .package-price { grid-area: price; }
    .package-price > div { flex-direction: row; align-items: baseline; flex-wrap: wrap; gap: 0 .5rem; }
    .package-price small.red { order: 0; }
    .package-bonus { grid-area: bonus; padding-top: 10px; margin-top: 6px; border-top: 1px solid var(--linea-soft); }
    .package-buy { grid-area: buy; align-self: center; }
    .package-example { grid-template-columns: 1fr; }

    /* contact / footer */
    .contact-us { grid-template-columns: 1fr; }
    .footer-items { grid-template-columns: 1fr 1fr; }
    .footer-subscribe { grid-column: 1 / -1; max-width: 480px; }
    .features { grid-template-columns: 1fr; }
    .features-img { display: none; }
}

@media (max-width: 767.98px) {
    .custom-container,
    .seo_index { padding: 0 20px; }
    #header { margin-bottom: 0; }
    .main-header { padding: 12px 0; }

    /* hero */
    .index__banner { margin-top: 14px; }
    .banner__wrapper { padding: 0 20px; }
    .carousel-item { min-height: 0; background-position: 78% center; }
    .carousel-item::before {
        background: linear-gradient(90deg,
            rgba(255, 255, 255, 0.97) 0%,
            rgba(255, 255, 255, 0.97) 42%,
            rgba(255, 255, 255, 0.9) 58%,
            rgba(255, 255, 255, 0.35) 100%);
    }
    .carousel-item .custom-container { min-height: 0; padding: 28px 22px 96px; gap: .9rem; }
    .carousel-item h2 { font-size: clamp(1.4rem, 5.6vw, 1.95rem); max-width: 78%; }
    .carousel-item span {
        font-size: 13.5px;
        max-width: 78%;
        display: -webkit-box;
        -webkit-line-clamp: 3;
        -webkit-box-orient: vertical;
        overflow: hidden;
    }
    .carousel-item .site-button { display: inline-flex; min-height: 44px; font-size: 13px; padding: 0 1.25rem; }
    .carousel-indicators-wrapper { display: block; bottom: 18px; }
    .carousel-indicators-wrapper .custom-container { padding: 0 22px; }
    .carousel-indicators {
        flex-wrap: nowrap;
        overflow-x: auto;
        scrollbar-width: none;
        padding-bottom: 2px;
        -webkit-overflow-scrolling: touch;
    }
    .carousel-indicators::-webkit-scrollbar { display: none; }
    .carousel-indicator { flex: none; padding: .45rem .8rem .45rem .55rem; font-size: 12px; }
    .carousel-indicator img { width: 18px; height: 18px; }

    /* cards */
    .products-list,
    .index-page .products-list,
    .favorites-page .products-list { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
    .pill-card { padding: 0 12px 12px; gap: .25rem .5rem; }
    .pill-img { margin: 0 -12px 8px; padding: 18px 12px 14px; min-height: 140px; }
    .pill-img img { max-height: 100px; }
    .pill-ed-card .pill-img img { max-height: 110px; }
    .pill-name h3 { font-size: 16px; }
    .pill-ingredient { font-size: 12px; }
    .pill-dosages { display: none; }
    .price-value,
    .pill-ed-card .price_prep_val { font-size: 18px; }
    .pill-buy .site-button { width: 40px; min-height: 40px; padding: 0; font-size: 0; gap: 0; }
    .pill-buy .site-button img { width: 16px; height: 16px; }
    .pill-favorite { top: 8px; right: 8px; width: 32px; height: 32px; background-size: 16px auto; }
    .pill-ed-card .pill-favorite,
    .favorite .pill-ed-card .pill-favorite { top: 8px; right: 8px; width: 32px; height: 32px; background-size: 16px auto; }
    .section-heading { margin-bottom: 1.25rem; }

    /* sections */
    .features-items { gap: 10px; }
    .features-item { padding: 18px 16px 16px; }
    .features-image { width: 44px; height: 44px; border-radius: 12px; margin-bottom: 12px; }
    .features-image img { width: 22px; height: 22px; }
    .features-title { font-size: 15px; }
    .features-description { font-size: 13px; }
    .item-layout { padding: 2.5rem 0; }
    .item-info { gap: 1rem; }
    .item-banner { max-width: 340px; }
    .content-section { margin-top: 2.5rem; }

    /* toolbar / listing */
    .products-header #breadcrumbs .breadcrumbs__container { padding: 1rem 0 .5rem; }
    .toolbar__wrapper h2.title { font-size: 1.75rem; }

    /* product page */
    .product-intro { grid-template-columns: 1fr; }
    .product-img { min-height: 150px; }
    .product-description-title a { padding: .8rem .85rem; font-size: 13px; }
    .info-shipping { overflow-x: auto; -webkit-overflow-scrolling: touch; }
    .shedule-tbl { min-width: 560px; }
    .ourbonus-block { grid-template-columns: 1fr; gap: 0; }

    /* cart */
    .cart-block { padding: 0 16px 16px; }
    .cart-header { display: none; }
    .cart-item-row {
        grid-template-columns: 80px minmax(0, 1fr) auto 32px;
        grid-template-rows: auto auto;
        gap: 10px 12px;
        padding: 14px 0;
    }
    .cart-item-img { grid-area: 1 / 1 / 3 / 2; width: 80px; height: 64px; align-self: start; }
    .cart-item-img img { width: 76px; }
    .cart-item-info { grid-area: 1 / 2 / 2 / 4; }
    .cart-item-remove { grid-area: 1 / 4 / 2 / 5; }
    .cart-item-quantity { grid-area: 2 / 2 / 3 / 3; justify-self: start; }
    .cart-item-total { grid-area: 2 / 3 / 3 / 5; justify-self: end; }
    .cart-item-price { display: none; }
    .cart-item-update { grid-area: 3 / 1 / 4 / 5; margin-top: 0; }
    .cart-item-name { font-size: 15px; }
    #cart_shipping .cart-item-row,
    .shipping-row .cart-item-row { flex-direction: column; align-items: stretch; }
    .shipping-total { display: none; }
    .shipping_methods { flex-direction: column; }
    .shipping_method { width: 100%; margin: 0; }
    .delivery-button { min-width: 0; width: 100%; }
    .insurance-info { font-size: 14px; }
    .insurance-info img { display: none; }
    .cart-buttons { flex-direction: column-reverse; align-items: stretch; gap: 12px; }
    .cart-chechout { justify-content: space-between; }
    a.continue-shopping { justify-content: center; }
    .gift-title { padding: 16px 48px 16px 58px; font-size: 14px; }
    .gift-title::before { left: 14px; width: 30px; height: 30px; }
    .bonuses-row { grid-template-columns: 1fr; }
    #cart_bonuses { border-radius: var(--r-lg); }

    /* static */
    .contact_form { padding: 1.25rem; border-radius: var(--r-lg); }
    .contact_form .site-button { align-self: stretch; }
    .order-status-wrapper { padding: 1.5rem 1.25rem; }
    .about_us p { flex-direction: column; text-align: left; align-items: stretch; font-size: 15px; }
    .about_us p::before,
    .about_us p::after { order: -1; min-width: 100% !important; }
    .landing-bottom { grid-template-columns: 1fr; }
    .faq_descr { padding: 0 2.75rem 0 1.1rem; }
    .faq_descr::after { right: 1.1rem; }
    .question { font-size: 16px; padding: .95rem 0; }
    .answer { font-size: 14px; }
    .our_policy strong { font-size: 19px; }
    .our_policy p { font-size: 15px; }
    h2.title, div.title { margin-bottom: 1rem; }

    /* panels & footer */
    .menu-content { width: 86vw; }
    .empty-cart-container,
    .favorites-empty { padding: 2rem 1.25rem; margin: 2rem auto 3rem; }
    .footer-container .custom-container { padding: 2.75rem 20px 2rem; }
    .footer-items { grid-template-columns: 1fr; gap: 28px; margin-bottom: 2rem; }
    .footer-subscribe { max-width: none; }
    .footer-links { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .footer-brand-text { max-width: none; }
    .footer-text { font-size: 12.5px; }

    /* legacy mobile checkout */
    #wrapper_billing { padding: 0 16px; }
    #wrapper_billing td,
    #wrapper_billing th { padding: 9px 10px; }
    #wrapper_billing input.text_coupon { width: 120px; }
    .check-cart td:first-child { font-size: 13px; }
    .pblocks { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 575.98px) {
    .custom-container,
    .seo_index { padding: 0 16px; }
    .banner__wrapper { padding: 0 12px; }
    #myCarousel { border-radius: var(--r-lg); }

    /* header */
    .pre-header { display: none; }
    #header { top: 0; }
    .main-header { padding: 10px 0 12px; }
    .header-grid { column-gap: 10px; row-gap: 10px; }
    .header-grid > .main-menu > .menu-wrapper > .menu-open { width: 42px; height: 42px; border-radius: var(--r-sm); }
    .site-logo { width: 32px; height: 32px; }
    .site-name a { gap: 8px; min-width: 0; }
    .header-title { font-size: 18px; max-width: 40vw; overflow: hidden; text-overflow: ellipsis; }
    .header-grid > .favorites-menu a,
    .header-grid > .cart-menu .menu-wrapper > .menu-open { width: 42px; height: 42px; border-radius: var(--r-sm); }
    .header-grid > .favorites-menu a img,
    .header-grid > .cart-menu .menu-wrapper > .menu-open img { width: 19px; height: 19px; }
    .header-search .side_search { height: 46px; padding-left: 16px; border-radius: var(--r-sm); }
    .side_search .bttn { width: 36px; height: 36px; border-radius: 8px; }

    /* main menu panel on phones: utilities move into the header */
    .mobile-menu { display: flex; align-items: center; flex-wrap: wrap; gap: .5rem .75rem; }
    .main-menu-header { align-items: flex-start; padding: 14px 14px 14px 20px; min-height: 0; }
    .main-menu-header .menu-title { flex-direction: column; align-items: flex-start; gap: .6rem; }
    .main-menu-header .menu-title .desktop-menu { font-size: 21px; }
    .mobile-menu .currency-menu .menu-open,
    .mobile-menu .language-menu .menu-open {
        color: var(--inchiostro);
        background: var(--perla);
        border: 1px solid var(--linea);
        font-size: 12px;
        padding: .3rem .65rem;
    }
    .mobile-menu .lz_text_link { color: var(--inchiostro); font-size: 12px; }
    .mobile-menu .lz_text_link img { filter: none; opacity: .75; height: 14px; }
    .mobile-menu .lz_text_link::after { color: var(--azzurro); font-size: 12px; }
    .cart-menu-mobile { display: block; margin: 2px 0; }
    .cart-menu-mobile .menu-wrapper > .menu-open {
        display: flex;
        align-items: center;
        gap: .75rem;
        width: auto;
        height: auto;
        padding: .8rem 1rem;
        border: none;
        border-radius: var(--r-sm);
        background: none;
        font-size: 15px;
        font-weight: 600;
        color: var(--inchiostro);
        transform: none;
    }
    .cart-menu-mobile .menu-wrapper > .menu-open:hover { background: var(--azzurro-tint); }
    .cart-menu-mobile .menu-wrapper > .menu-open img { width: 20px; height: 20px; filter: none; }
    .cart-menu-mobile .menu-wrapper > .menu-open::after { content: var(--cart-menu-mobile); text-transform: none; }
    .cart-menu-mobile .menu-wrapper > .menu-open::after:first-letter { text-transform: uppercase; }
    .cart-menu-mobile .cart-count { position: static; order: 3; margin-left: auto; box-shadow: none; }
    .menu-support-phones { display: flex; }
    .menu-item { padding: .75rem 1rem; }
    .mobile-menu-categories .menu-close::after { content: var(--menu-categories-close); display: block; font-weight: 600; font-size: 13px; text-transform: capitalize; }

    /* content */
    .carousel-item h2 { max-width: 84%; }
    .carousel-item span { max-width: 84%; }
    .products-list,
    .index-page .products-list,
    .favorites-page .products-list { gap: 10px; }
    .pill-card { border-radius: 16px; }
    .pill-img { border-radius: 16px 16px 0 0; }
    .item-title { font-size: 1.6rem; }
    .item-description { font-size: 15px; }
    .item-subtitle { font-size: 1.3rem; }
    .features-items { gap: 8px; }
    .features-item { padding: 14px 12px 12px; border-radius: 16px; }
    .features-title { font-size: 14px; }
    .features-description { font-size: 12px; }
    .product-title { font-size: 1.55rem; }
    .toolbar__categories { max-width: none; }
    .product-dosege,
    .product-dosege.site-button.package-button { min-width: 60px; padding: 0 .8rem; font-size: 13px; }
    .package-wrapper { grid-template-columns: 64px minmax(0, 1fr) auto; padding: 12px; }
    .package-image > div { width: 64px; height: 50px; }
    .package-image img { max-height: 42px; }
    .package-dose strong { font-size: 17px; }
    .package-current-price,
    .product-wrapper strong.package-current-price { font-size: 19px; }
    .package-buy .package-button,
    .package-buy .site-button.package-button { width: 44px; height: 44px; min-height: 44px; padding: 0; border-radius: var(--r-sm); }
    .package-buy .package-button span { display: none; }
    .package-buy .package-button::before {
        content: '';
        display: block;
        width: 18px;
        height: 18px;
        background: url(../images/icons/ic_cart.svg) center / contain no-repeat;
        filter: brightness(0) invert(1);
    }
    .package-save { display: none; }
    .package-example { padding: 16px; }
    .package-view { gap: 10px; }

    /* cart */
    .cart-chechout { width: 100%; }
    a.continue-shopping { width: 100%; }
    .free-pill { max-width: none; flex: 1 1 calc(50% - 6px); min-width: 0; padding: 12px; }
    .gift-ico { width: 60px; }
    .bonus-container { padding: 14px 16px; }
    .bonus-img { width: 52px; height: 52px; border-radius: 14px; }
    .bonus-img img { width: 26px; height: 26px; }

    /* footer */
    .footer-links { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .footer-brand-name { font-size: 21px; }
    .footer-label { font-size: 18px; }

    /* legacy checkout */
    #wrapper_billing select.select2,
    #wrapper_billing select.select3 { min-width: 76px; }
    .pblocks { grid-template-columns: 1fr; }
}

@media (max-width: 440px) {
    .header-title { max-width: 34vw; font-size: 16px; }
    .pill-name h3 { font-size: 15px; }
    .carousel-item h2 { font-size: 1.3rem; }
    .carousel-item .custom-container { padding: 24px 18px 92px; }
    .pill-buy .site-button { width: 38px; min-height: 38px; }
    .price-value,
    .pill-ed-card .price_prep_val { font-size: 17px; }
    .mobile-apps-links img { height: 40px; }
    .product-description-title a { font-size: 12px; padding: .75rem .65rem; }
    .cart-item-row { grid-template-columns: 68px minmax(0, 1fr) auto 28px; }
    .cart-item-img { width: 68px; height: 56px; }
    .cart-item-img img { width: 64px; }
    .menu-content { width: 90vw; }
}

@media (hover: hover) {
    .pill-favorite:hover { background-image: url('../images/icons/ic_favorites_product_hover.svg'); }
    .favorite .pill-favorite:hover { background-image: url('../images/icons/ic_favorites_product_fill.svg'); }
}
