/* India Gardening: phone layout fixes (screens up to 767px wide).
   Loaded after everything else, so it only changes how things look on phones. */
@media (max-width: 767px) {

	/* M9 / M6: calmer text sizes and headings */
	html body .entry-content h1 { font-size: 30px !important; line-height: 1.15 !important; }
	html body .entry-content h2,
	html body .ig-care__title,
	html body .ig-section-head h2 { font-size: 26px !important; line-height: 1.2 !important; margin-top: 0 !important; margin-bottom: 10px !important; }
	html body .entry-content h3.wp-block-heading { font-size: 20px !important; line-height: 1.25 !important; }
	html body .entry-content .ecosystem-section h3 { font-size: 24px !important; line-height: 1.2 !important; }
	html body .entry-content p,
	html body .ig-care__desc { font-size: 15px !important; line-height: 1.55 !important; }
	html body .wp-block-details summary { font-size: 15px !important; line-height: 1.4 !important; padding-top: 12px !important; padding-bottom: 12px !important; }
	html body .wp-block-details > :not(summary) { font-size: 14px !important; }

	/* M2: smaller search bar */
	html body .igm-search { padding: 3px 3px 3px 16px !important; }
	html body .igm-search input[type="search"] { min-height: 0 !important; height: 34px !important; line-height: 34px !important; font-size: 14px !important; }
	html body .igm-search button { width: 34px !important; height: 34px !important; }

	/* M3: category row and menu tabs: first item fully visible, snap to each item, next one peeks */
	html body .igm-catrow { scroll-snap-type: x proximity; scroll-padding-left: 16px; gap: 14px !important; padding-left: 16px !important; -webkit-overflow-scrolling: touch; }
	html body .igm-catrow > .igm-cat { scroll-snap-align: start; margin: 0 !important; }
	html body .igm-menu { scroll-snap-type: x proximity; scroll-padding-left: 16px; -webkit-overflow-scrolling: touch; }
	html body .igm-menu > li { scroll-snap-align: start; }

	/* M4 / M6: less empty space between home sections */
	html body .entry-content > .igm-cats + .wp-block-spacer { height: 6px !important; }
	html body .entry-content > .wp-block-athemes-athemes-blocks-block-container:not(:first-child) > .athemes-blocks-block-container-wrapper:not(:has(.athemes-blocks-background-image)) { padding-top: 14px !important; padding-bottom: 14px !important; }
	html body .entry-content .wp-block-spacer { max-height: 14px; }

	/* M1 / M7: phone sliders: the next card peeks in, swipes are easy and not delayed */
	html body .igm-pcar ul.products { scroll-snap-type: x proximity !important; scroll-behavior: auto !important; gap: 10px !important; padding-right: 16px !important; -webkit-overflow-scrolling: touch; }
	html body .igm-pcar ul.products li.product.igm-li { flex: 0 0 74% !important; }
	html body .ig-carousel-track { scroll-snap-type: x proximity; scroll-behavior: auto; -webkit-overflow-scrolling: touch; }

	/* M5: Care guide section smaller: 2 cards per row */
	html body .ig-care-wrap { padding: 0 !important; }
	html body .ig-care { padding: 18px 14px !important; }
	html body .ig-care__text { padding-bottom: 6px !important; }
	html body .ig-care__grid { display: grid !important; grid-template-columns: 1fr 1fr !important; gap: 10px !important; margin-top: 14px !important; }
	html body .ig-care__card { height: auto !important; min-height: 0 !important; padding: 12px !important; }
	html body .ig-care__card p { display: none !important; }
	html body .ig-care__card .ig-care__icon { width: 40px !important; height: 40px !important; }
	html body .ig-care__card h3 { font-size: 15px !important; line-height: 1.25 !important; }
	html body .ig-care__card img { max-height: 90px; width: auto; max-width: 100%; object-fit: contain; }

	/* M8: "Design and build your unique mini ecosystem" panel uses the full screen width */
	html body .entry-content .athemes-blocks-block-container-wrapper:has(.ecosystem-section) { padding: 0 !important; }
	html body .entry-content .athemes-blocks-block-container-wrapper-content:has(.ecosystem-section) { padding: 0 !important; max-width: none !important; }
	html body .entry-content .ecosystem-section { width: 100vw !important; max-width: 100vw !important; margin-left: calc(50% - 50vw) !important; margin-right: 0 !important; border-radius: 0 !important; padding: 24px 18px !important; box-sizing: border-box; }

	/* M10: footer: link groups open and close by tapping the title */
	html body footer .widget_nav_menu .widget-title { position: relative; cursor: pointer; margin-bottom: 0 !important; padding: 14px 28px 14px 0; border-bottom: 1px solid rgba(0,0,0,.12); }
	html body footer .widget_nav_menu .widget-title::after { content: ""; position: absolute; right: 4px; top: 50%; width: 8px; height: 8px; margin-top: -6px; border-right: 2px solid currentColor; border-bottom: 2px solid currentColor; transform: rotate(45deg); transition: transform .2s; }
	html body footer .widget_nav_menu:not(.igm-open) > div,
	html body footer .widget_nav_menu:not(.igm-open) > ul,
	html body footer .widget_nav_menu:not(.igm-open) > nav { display: none !important; }
	html body footer .widget_nav_menu.igm-open .widget-title::after { transform: rotate(-135deg); margin-top: -2px; }
	html body footer .widget { margin-bottom: 0 !important; }

	/* Smoother scrolling on phones: no hover effects or heavy image layers, lighter footer rendering */
	html body .igm-im img, html body .igm-cimg img, html body .igc-im img, html body .iagc-visual img, html body .iagc-swatch img, html body .entry-content figure.wp-block-image img { will-change: auto !important; transition: none !important; }
	html body .igm-card:hover .igm-im img { transform: none !important; }
	html body footer.site-footer, html body .site-footer { content-visibility: auto; contain-intrinsic-size: auto 700px; }

	/* Hero video is not played on phones (4 MB, full-HD video makes phones stutter): calm green background instead */
	html body .igm-novideo { background: linear-gradient(160deg, #2F4A39 0%, #1F3328 100%) !important; }
	html body .igm-novideo > video { display: none !important; }

	/* Arrow buttons on phones, so people see a row can be swiped */
	html body .igm-pcar .igm-pcar-btn { display: flex !important; width: 34px !important; height: 34px !important; top: calc(50% - 52px) !important; z-index: 4; }
	html body .igm-pcar .igm-pcar-prev { left: 4px !important; }
	html body .igm-pcar .igm-pcar-next { right: 4px !important; }
	html body .igm-cat-arrow[style*="display: flex"] { display: flex !important; width: 30px; height: 30px; }
	html body .igm-cat-prev { left: 2px; }
	html body .igm-cat-next { right: 2px; }
	html body .ig-carousel-wrap { position: relative; }
	html body .igm-rbtn { position: absolute; top: 50%; z-index: 4; width: 34px; height: 34px; margin-top: -17px; border-radius: 50%; border: 1px solid rgba(32,36,28,.12); background: rgba(255,255,255,.95); color: #20241C; display: flex; align-items: center; justify-content: center; padding: 0; box-shadow: 0 3px 10px rgba(32,36,28,.18); cursor: pointer; }
	html body .igm-rbtn[hidden] { display: none !important; }
	html body .igm-rprev { left: 2px; }
	html body .igm-rnext { right: 2px; }
}
