/**
 * Moon Kids Home Child – custom CSS.
 * Loads after all parent theme CSS, so rules here win without extra !important
 * (keep !important only where the parent or a plugin already uses it).
 *
 * Brand: purple #400080, dark purple #2E005C, yellow #F4B011.
 * Mobile/tablet breakpoint used by our fixes: max-width 991px (same as the parent theme's mobile layout).
 */

/* ========== 1. Global ========== */

/* Hide floating extras on all screens (Asana: Mobile task, step 4) */
.grecaptcha-badge{visibility:hidden!important;}            /* add the reCAPTCHA text notice to Contact Form 7 forms */
.cky-btn-revisit-wrapper{display:none!important;}          /* cookie preferences open from the footer "Cookie settings" link */

@media (max-width:991px){
  body{padding-bottom:0!important;}                        /* remove the 48px gap the theme kept for the old bottom bar */
}


/* ========== 2. Header & menu ========== */

@media (max-width:991px){
  /* Language/currency bar no longer fixed to the bottom – both now live in the menu drawer */
  .mkh-lang,.mkh-store{display:none!important;}

  /* Show the store/currency group in the drawer (the parent theme hides it because it expected the bottom bar) */
  .mkh-drawer .mkh-drawer__group--store{display:block!important;}

  /* Language group in the drawer (added by inc/custom.php) – same look as the store group */
  .mkh-drawer__group--lang .mkh-drawer__links a.mkh-store__option{display:flex;padding:0.55rem 0.4rem;}

  /* Hide floating items while the mobile menu drawer is open */
  html.mkh-drawer-open .mkh-float-chat,
  html.mkh-drawer-open .mkh-sticky-atc{display:none!important;}
}


/* ========== 3. Floating buttons (mobile) ========== */

@media (max-width:991px){
  /* Only Call + WhatsApp float, in the bottom-right corner */
  .mkh-float-chat{bottom:calc(16px + env(safe-area-inset-bottom))!important;}
  /* Floating side-cart basket (header bag icon stays). Extra classes beat the plugin's .xoo-wsc-basket[style*="block"] rule */
  .xoo-wsc-markup .xoo-wsc-basket.xoo-wsc-basket{display:none!important;}
}


/* ========== 4. Product page ========== */

.mkh-sticky-atc{display:none;}

@media (max-width:991px){
  /* Hide the category icon strip on product pages so title + price show in the first screen */
  .single-product .mkh-category-strip-block{display:none!important;}

  /* Room for the sticky bar, and lift Call + WhatsApp above it */
  body.single-product{padding-bottom:76px!important;}
  .single-product .mkh-float-chat{bottom:calc(88px + env(safe-area-inset-bottom))!important;}

  /* Sticky "Add to basket · price" bar (markup + script in inc/custom.php) */
  .mkh-sticky-atc{position:fixed;left:0;right:0;bottom:0;z-index:99991;display:flex;align-items:center;gap:12px;
    padding:10px 16px calc(10px + env(safe-area-inset-bottom));background:#fff;
    box-shadow:0 -2px 12px rgba(0,0,0,.1);transform:translateY(110%);transition:transform .25s;}
  .mkh-sticky-atc.is-visible{transform:none;}
  .mkh-sticky-atc__price{flex:1;font-weight:700;color:#400080;}
  .mkh-sticky-atc__btn{background:#400080;color:#fff;border:0;border-radius:999px;padding:12px 22px;font-weight:700;min-height:44px;cursor:pointer;}
}



/* Product gallery 4:3 on phones + tablets so title + price reach the first screen (Asana: Mobile task, step 8).
   Whole photo stays visible (no cropping); smaller 56px thumbnails. Tested: no blank gap when changing slides. */
@media (max-width:991px){
  .single-product .woocommerce-product-gallery__image img{aspect-ratio:4/3;width:100%;height:auto !important;object-fit:contain;background:#fff;}
  .single-product .flex-control-thumbs{gap:8px;}
  .single-product .flex-control-thumbs li{flex:0 0 56px !important;width:56px !important;}
  .single-product .flex-control-thumbs li img{width:56px !important;height:56px !important;}
}

/* ========== 5. Category pages ========== */
/* Sticky result count + sort bar on phones + tablets (Asana: Mobile task, step 9).
   The "Filters" button will be added to this bar with the category filters task. */
@media (max-width:991px){
  .mkh-shop-toolbar{position:sticky;top:0;z-index:60;display:flex;flex-wrap:nowrap;align-items:center;justify-content:space-between;gap:12px;
    background:#fff;padding:8px 0;box-shadow:0 6px 8px -8px rgba(0,0,0,.25);}
  .mkh-shop-toolbar .woocommerce-result-count{order:1;margin:0;font-size:13px;line-height:1.3;flex:1 1 auto;min-width:0;}
  .mkh-shop-toolbar .woocommerce-ordering{order:2;margin:0;flex:0 0 auto;}
  .mkh-shop-toolbar .woocommerce-ordering select{max-width:190px;}
}

/* Pagination: "Page X of N" label is added by inc/custom.php – hidden on desktop.
   Phones + tablets: one compact row ← Page 7 of 14 → instead of numbers wrapping onto 3 rows.
   (Asana: Mobile task, step 9 – approved design, keep) */
.woocommerce nav.woocommerce-pagination .mkh-page-of{display:none;}
/* Previous / Next arrow icons (SVG from inc/custom.php); the words stay for screen readers only */
.woocommerce-pagination .page-numbers .screen-reader-text{position:absolute !important;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border:0;}
.woocommerce-pagination a.prev,.woocommerce-pagination a.next{display:inline-flex;align-items:center;justify-content:center;}
.woocommerce-pagination .mkh-page-arrow{display:block;}
@media (max-width:991px){
  .woocommerce nav.woocommerce-pagination{display:flex !important;align-items:center;justify-content:center;gap:16px;}
  .woocommerce nav.woocommerce-pagination ul.page-numbers{display:contents !important;}
  .woocommerce nav.woocommerce-pagination ul.page-numbers li{display:none !important;margin:0 !important;}
  .woocommerce nav.woocommerce-pagination ul.page-numbers li:has(.prev){display:block !important;order:1;}
  .woocommerce nav.woocommerce-pagination ul.page-numbers li:has(.next){display:block !important;order:3;}
  .woocommerce nav.woocommerce-pagination ul.page-numbers li:has(.prev) a,
  .woocommerce nav.woocommerce-pagination ul.page-numbers li:has(.next) a{width:48px;min-width:48px;height:48px;padding:0;display:inline-flex;align-items:center;justify-content:center;}
  .woocommerce nav.woocommerce-pagination .mkh-page-of{display:block;order:2;font-size:15px;font-weight:600;white-space:nowrap;color:#222;}
}



/* ========== 6. Cart & checkout ========== */


/* ========== 7. Footer ========== */

/* ========== 8. Forms ========== */
/* Google reCAPTCHA notice under Contact Form 7 forms – required because the badge is hidden (section 1).
   Markup added by inc/custom.php (Asana: Mobile task, step 4) */
.mkh-recaptcha-notice{margin:12px 0 0;font-size:13px;line-height:1.5;color:#6b6b6b;}
.mkh-recaptcha-notice a{color:inherit;text-decoration:underline;}
.mkh-recaptcha-notice a:hover,.mkh-recaptcha-notice a:focus{color:#400080;}

/* ========== 9. Mobile tap targets & text size ========== */
/* Phones + tablets (up to 991px): every button/link at least 44×44px and no text under 13px.
   Inline links inside sentences are left as they are (allowed by the guideline).
   Asana: Mobile task, step 6 */
@media (max-width:991px){
  /* Tap targets */
  .mkh-menu-toggle,.mkh-action-link,.mkh-vs-btn,.mkh-search__submit,.mkh-pcard__cart,
  .woocommerce-product-gallery__trigger,.mkh-qty__btn,.woocommerce-pagination .page-numbers,
  .mkh-product-carousel__tab{min-width:44px;min-height:44px;}
  .mkh-search__input,.mkh-section__cta,.mkh-product-carousel__cta{min-height:44px;}
  .mkh-pcard__more{display:inline-flex;align-items:center;min-height:44px;}
  .mkh-pcard__name a{display:flex;align-items:center;min-height:44px;}
  .single-product .summary a.button,.xoo-wsc-btn,.xoo-wsc-ft-btn{min-height:44px;display:inline-flex;align-items:center;justify-content:center;}
  .wp-block-social-links .wp-block-social-link-anchor{min-width:44px;min-height:44px;display:inline-flex;align-items:center;justify-content:center;}
  footer .wp-block-list a,.mkh-footer__legal a,.mkh-footer__featured-title a{display:inline-flex;align-items:center;min-height:44px;min-width:44px;}
  .woocommerce-breadcrumb a{display:inline-block;padding:4px 0;} /* 24px+ target, keeps the breadcrumb short */
  .wpcf7-list-item label{display:inline-flex;align-items:center;gap:8px;min-height:44px;}
  .wpcf7-list-item input[type=checkbox],.wpcf7-list-item input[type=radio]{width:20px;height:20px;margin:0;}
  /* Small text */
  .woocommerce-price-suffix,.mkh-pcard__badge,.mkh-pcard__more,.mkh-msg__text,.mkh-footer__pay,.mkh-category-strip__label,
  .mkh-top-mosaic__card-name,.mkh-top-mosaic__card-desc,.mkh-top-mosaic__card-price,.mkh-sets__price,.woocommerce-breadcrumb,
  .products .button,.mkh-pcard .button,.mkh-story__badge,.mkh-services__card,.mkh-services__card *,.sku_wrapper,.sku_wrapper *,
  .sublabel-tag,.sublabel-tag *,.posted_in,.posted_in a,.mkh-page-hero__eyebrow,.wc-block-components-notice-banner__content{font-size:13px !important;}
}
