/**
 * Theme Name: Blocksy Child
 * Description: Blocksy Child theme
 * Author: Creative Themes
 * Template: blocksy
 * Text Domain: blocksy
 */


/* === Mobile: product & category grids 2-up (exclude slick sliders) === */
@media (max-width: 768px) {
  .woocommerce ul.products:not(.slick-slider),
  ul.products:not(.slick-slider) {
    display: grid !important;
    grid-template-columns: 1fr 1fr !important;
    gap: 14px !important;
    margin-left: 0 !important;
    margin-right: 0 !important;
  }
  ul.products:not(.slick-slider) > li.product,
  ul.products:not(.slick-slider) > li.product-category {
    width: auto !important;
    max-width: none !important;
    margin: 0 !important;
    float: none !important;
    clear: none !important;
  }
  /* Never grid the dairy carousel's list (covers pre-init flash) */
  .wcpscwc-product-slider ul.products {
    display: block !important;
    grid-template-columns: none !important;
  }
  .wcpscwc-product-slider ul.products > li.product { float: none !important; }
}

/* Hide product-card category clutter (All Products, Popular Items, Uncategorized) on loop/shop grids — CRO 2026-06-24 */
ul.products li.product .entry-meta .meta-categories,
ul.products li.product .meta-categories { display: none !important; }

/* Mobile: smaller, tighter product-card titles for 2-col grid — CRO 2026-06-24 */
@media (max-width:768px){
  ul.products li.product .woocommerce-loop-product__title,
  ul.products li.product h2 { font-size:14px !important; line-height:1.3 !important; }
  ul.products li.product .price { font-size:14px !important; }
}

/* Homepage product-section headings: desktop 28px / mobile 26px.
   STABLE selector — Stackable regenerates block ids on every render, so id-based rules fail.
   Targets dark Stackable headings inside page content; excludes the white newsletter heading
   (palette-color-8) and anything in header/footer (outside .entry-content). CRO 2026-06-25. */
.entry-content .stk-block-heading__text:not([class*="palette-color-8"]){ font-size:28px !important; line-height:1.25 !important; }
@media (max-width:768px){
  .entry-content .stk-block-heading__text:not([class*="palette-color-8"]){ font-size:26px !important; line-height:1.2 !important; }
}

/* Logged-out: add a "Login / Register" text label beside the header account icon
   (Blocksy has no built-in label for the logged-out account element). 2026-06-25 */
body:not(.logged-in) .ct-header-account .ct-account-item{ width:auto; }
body:not(.logged-in) .ct-header-account .ct-account-item::after{
  content:"Login / Register";
  margin-inline-start:7px;
  font-size:14px;
  font-weight:600;
  line-height:1;
  white-space:nowrap;
}

/* "Login / Register" nav item: show only in the MOBILE hamburger menu (desktop already shows the
   header "Login / Register" label, so hide it from the desktop top nav). 2026-06-25 */
@media (min-width:1000px){ .frm-mobile-login{ display:none !important; } }
/* also hide for logged-in users on mobile (they don't need "Login / Register") */
body.logged-in .frm-mobile-login{ display:none !important; }

/* "Wishlist" nav item: show only in the MOBILE hamburger menu (desktop has footer + product buttons). 2026-06-25 */
@media (min-width:1000px){ .frm-mobile-wishlist{ display:none !important; } }

/* "My Account" nav item: mobile hamburger only, and ONLY for logged-in users
   (logged-out users see the "Login / Register" item instead). 2026-06-25 */
@media (min-width:1000px){ .frm-mobile-account{ display:none !important; } }
body:not(.logged-in) .frm-mobile-account{ display:none !important; }

/* Mobile menu: separator line above the account section (Login-Register / My Account ... Wishlist). 2026-06-25 */
.frm-mobile-login, .frm-mobile-account{
  border-top:1px solid rgba(255,255,255,.25);
  margin-top:10px;
  padding-top:10px;
}

/* Wishlist (YITH) table: product names were inheriting 30px — too big. Size like a normal list link. 2026-06-25 */
.wishlist_table td.product-name a,
.wishlist_table .product-name a{ font-size:16px !important; line-height:1.35 !important; font-weight:600 !important; }
@media (max-width:480px){
  .wishlist_table td.product-name a,
  .wishlist_table .product-name a{ font-size:15px !important; }
}

/* Wishlist page: hide the Blocksy page-title hero ("Wishlist") — YITH already shows "My wishlist". 2026-06-25 */
.page-id-1594 .hero-section{ display:none !important; }
