/* Pops Cannabis — mobile product grid (2 per row). Loaded last, after WooCommerce CSS. */
@media screen and (max-width: 782px) {
  body.woocommerce ul.products,
  body.woocommerce-page ul.products,
  body ul.products,
  body .woocommerce ul.products,
  body ul.products.columns-1,
  body ul.products.columns-2,
  body ul.products.columns-3,
  body ul.products.columns-4,
  body ul.products.columns-5,
  body ul.products.columns-6 {
    display: grid !important;
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    gap: 12px !important;
    margin: 0 0 20px !important;
    padding: 0 !important;
    list-style: none !important;
  }

  body ul.products li.product,
  body ul.products li.product.first,
  body ul.products li.product.last,
  body .woocommerce ul.products li.product,
  body.woocommerce ul.products li.product,
  body.woocommerce-page ul.products li.product {
    width: 100% !important;
    max-width: 100% !important;
    min-width: 0 !important;
    margin: 0 !important;
    padding: 0 !important;
    float: none !important;
    clear: none !important;
  }

  /* Theme shelves / card grids */
  body .pc-shelf,
  body .pc-cat-grid,
  body .pc-grid,
  body .pc-grid--3,
  body .pc-loc-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    gap: 12px !important;
  }

  body ul.products li.product .woocommerce-loop-product__title,
  body .pc-shelf__card strong { font-size: 0.82rem !important; line-height: 1.25 !important; }
  body ul.products li.product .pc-card-body { padding: 10px !important; gap: 4px !important; }
  body ul.products li.product .price { font-size: 0.9rem !important; }
  body ul.products li.product .button,
  body ul.products li.product .add_to_cart_button {
    width: 100% !important;
    padding: 9px 8px !important;
    font-size: 0.7rem !important;
    letter-spacing: 0.02em !important;
  }
  body ul.products li.product .onsale { font-size: 0.62rem !important; padding: 3px 7px !important; }
}

/* ---------------------------------------------------------------
 * Single product page — mobile layout (loaded after WooCommerce CSS)
 * --------------------------------------------------------------- */
@media screen and (max-width: 782px) {
  body.single-product div.product {
    display: block !important;
    margin: 18px 0 0 !important;
  }
  body.single-product div.product > .woocommerce-product-gallery,
  body.single-product div.product > .summary,
  body.single-product div.product > .woocommerce-tabs,
  body.single-product div.product > .related,
  body.single-product div.product > .upsells,
  body.single-product div.product > .pc-seo-copy,
  body.single-product div.product > .pc-product-seo {
    float: none !important;
    width: 100% !important;
    max-width: 100% !important;
    min-width: 0 !important;
    margin-left: 0 !important;
    margin-right: 0 !important;
    clear: both !important;
  }
  body.single-product div.product > .woocommerce-product-gallery {
    padding: 10px !important;
    margin-bottom: 18px !important;
  }
  body.single-product div.product > .summary { margin-bottom: 22px !important; }
  body.single-product .summary .product_title { font-size: 1.5rem !important; line-height: 1.2 !important; }
  body.single-product .summary p.price,
  body.single-product .summary span.price { font-size: 1.25rem !important; }

  body.single-product .flex-control-thumbs { flex-wrap: wrap !important; gap: 8px !important; }
  body.single-product .flex-control-thumbs li { width: 58px !important; }

  /* Quantity + add to cart stack nicely */
  body.single-product form.cart { display: flex !important; flex-wrap: wrap !important; gap: 10px !important; }
  body.single-product form.cart .quantity { margin: 0 !important; float: none !important; }
  body.single-product form.cart .single_add_to_cart_button {
    flex: 1 1 160px !important;
    width: auto !important;
    float: none !important;
    padding: 13px 16px !important;
  }

  /* Tabs become stacked sections */
  body.single-product .woocommerce-tabs ul.tabs {
    display: flex !important;
    flex-wrap: wrap !important;
    gap: 8px !important;
    padding: 0 !important;
    margin: 0 0 14px !important;
  }
  body.single-product .woocommerce-tabs ul.tabs::before,
  body.single-product .woocommerce-tabs ul.tabs::after { display: none !important; }
  body.single-product .woocommerce-tabs ul.tabs li {
    float: none !important;
    margin: 0 !important;
    border-radius: 999px !important;
  }
  body.single-product .woocommerce-tabs .panel {
    padding: 16px !important;
    margin: 0 0 18px !important;
  }
  body .pc-tab-title { font-size: 1.15rem !important; }
  body .pc-block-title { font-size: 1.2rem !important; }

  /* SEO copy blocks */
  body .pc-product-seo,
  body .pc-cat-seo {
    padding: 18px 14px !important;
    margin-left: 0 !important;
    margin-right: 0 !important;
  }
  body .pc-product-seo h2,
  body .pc-cat-seo h2 { font-size: 1.15rem !important; }
  body .pc-product-seo p,
  body .pc-cat-seo p,
  body .pc-product-seo li,
  body .pc-cat-seo li { font-size: 0.95rem !important; line-height: 1.65 !important; }
  body .pc-product-seo table,
  body .pc-cat-seo table { display: block !important; overflow-x: auto !important; width: 100% !important; }

  /* Shop sidebar stacks above products */
  body .pc-shop-layout { display: block !important; }
  body .pc-shop-sidebar {
    width: 100% !important;
    max-width: 100% !important;
    flex: none !important;
    position: static !important;
    margin: 0 0 16px !important;
  }
  body .pc-sidebar-toggle { display: flex !important; }

  /* Kill WooCommerce smallscreen table float weirdness inside product areas */
  body.single-product table.shop_attributes,
  body.single-product .woocommerce-product-attributes { width: 100% !important; display: table !important; }
  body.single-product #reviews #comments ol.commentlist li img.avatar {
    width: 40px !important;
    position: static !important;
    float: left !important;
    margin-right: 10px !important;
  }
  body.single-product #reviews #comments ol.commentlist li .comment-text {
    margin: 0 !important;
    padding: 14px !important;
  }
}
