/*
 * Responsive and readability layer, loaded after commerce.css.
 * Goals: no text below 11px, tap targets ≥ 36px on touch screens, nothing edge-to-edge,
 * and wide screens keep the same 1400px content width as the header.
 */

/* Shop, category and product pages share the header's content width. */
.shop-main { width: min(1400px, calc(100% - 64px)); margin-inline: auto; }

/* Product cards: readable at every width. */
.nova-product-card .product-name h3 { font-size: 13px !important; line-height: 1.45; }
.nova-product-card .product-spec { font-size: 12px; line-height: 1.5; height: auto !important; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; min-height: 3em; }
.product-card-actions .button { font-size: 12px !important; min-height: 36px; display: inline-flex; align-items: center; justify-content: center; }
.wish-button, .compare-button { min-width: 36px; min-height: 36px; }
.product-brand { font-size: 11px; }

/* Minimum sizes for small print at every width (the base stylesheet goes down to 7px). */
.brand-strip span, .brand-strip i { font-size: 11px; }
.brand small { font-size: 10px; }
.header-actions > a > span:not(.action-icon) { font-size: 11px; }
.nav-help { font-size: 12px; }
.eyebrow { font-size: 10px !important; }
.pc-caption { font-size: 9px !important; }
.hero-cta { font-size: 11px !important; }
.hero-copy small, .hero-copy p { font-size: 11px !important; }
.hero-bottom b { font-size: 12px !important; }
.hero-bottom span { font-size: 11px !important; }
.quick-services small, .service-strip small { font-size: 11px !important; }
.price del, .price del bdi { font-size: 12px; }
.nova-cart-count { font-size: 11px; }
.footer-grid p, .footer-grid a { font-size: 13px; }
.footer-grid a { display: block; padding: 3px 0; }
.side-promo span, .side-promo b { font-size: 11px !important; }
.side-promo p { font-size: 12px !important; }
.section-heading > a { font-size: 12px !important; }
.category-sidebar a { font-size: 12px; }

/* Form controls large enough to tap. */
input[type=checkbox], input[type=radio] { width: 18px; height: 18px; vertical-align: -3px; accent-color: var(--green); }
.woocommerce-message .button, .woocommerce-info .button { min-height: 36px; display: inline-flex; align-items: center; }
a.remove { display: inline-flex; align-items: center; justify-content: center; min-width: 32px; min-height: 32px; font-size: 20px; }

/* Category chips above the product list. */
.nova-filter a { font-size: 12px; padding: 8px 12px; }

@media (max-width: 1150px) {
  .shop-main { width: calc(100% - 32px); }
}

@media (max-width: 900px) {
  .category-sidebar a { font-size: 12px; padding: 9px 10px; }
  .brand small { font-size: 9px; }
  .quick-services b { font-size: 12px; }
  .quick-services small { font-size: 11px; }
}

@media (max-width: 640px) {
  .shop-main { width: calc(100% - 24px); }
  body { font-size: 14px; }

  /* Header */
  .utility-bar { font-size: 12px; }
  .utility-bar .container { padding: 0; }
  .utility-bar a { display: inline-flex; align-items: center; gap: 4px; min-height: 40px; }
  .brand-strip i { font-size: 10px; }
  .brand small { font-size: 10px; }
  .header-actions > a { min-width: 40px; min-height: 40px; justify-content: center; }
  .search-form { height: 44px; }
  .search-form input { font-size: 15px; }
  .main-nav > .container { height: 46px; }
  .category-toggle { height: 46px; font-size: 12px; }
  .main-nav a { font-size: 13px; display: inline-flex; align-items: center; min-height: 44px; }
  .mobile-categories:not([hidden]) { font-size: 13px; }
  .mobile-categories a { min-height: 40px; display: flex; align-items: center; }

  /* Home hero and sections */
  .hero-copy .eyebrow { font-size: 9px; }
  .hero-copy p { font-size: 11px; }
  .hero-cta { font-size: 11px; padding: 11px 12px; }
  .hero-copy small { font-size: 10px; }
  .pc-caption { font-size: 8px; }
  .hero-bottom b { font-size: 11px; }
  .hero-bottom span { font-size: 11px; }
  .section-heading > a, .section-heading p { font-size: 12px; }
  .build-callout p, .build-callout > .button { font-size: 13px; }
  .service-strip b { font-size: 12px; }
  .service-strip small { font-size: 11px; }

  /* Product grid */
  .nova-product-card .product-name h3 { font-size: 13px !important; height: auto; min-height: 38px; }
  .nova-product-card .product-spec { font-size: 11px; }
  .product-card-actions .button { font-size: 12px !important; }

  /* Category chips become one swipeable row instead of half a screen of buttons. */
  .nova-filter { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; margin-inline: -12px; padding: 0 12px 4px; }
  .nova-filter::-webkit-scrollbar { display: none; }
  .nova-filter a { flex: 0 0 auto; font-size: 13px; padding: 9px 12px; }

  /* Tables, tabs, footer */
  .shop_table th, .shop_table td { font-size: 13px; }
  .shop_table .coupon button { font-size: 12px; }
  .woocommerce-tabs .tabs { font-size: 13px; }
  .woocommerce-tabs .tabs a { display: inline-flex; min-height: 40px; align-items: center; }
  .footer-grid h3 { font-size: 13px; }
  .footer-grid p, .footer-grid a { font-size: 13px; }
  .footer-grid a { display: flex; align-items: center; min-height: 40px; margin: 0; padding: 0; }
  .footer-bottom { font-size: 11px; }

  /* Cart: 40px remove button and quantity field. */
  .shop_table a.remove { min-width: 40px; min-height: 40px; }
  .shop_table .quantity input { width: 64px; height: 44px; }

  /* Keep the floating call button clear of content it would cover. */
  .floating-contact { bottom: 12px; right: 10px; width: 46px; height: 46px; padding: 0; justify-content: center; }
  .site-footer { padding-bottom: 60px; }
}

/* Cart table as stacked cards on narrow phones (WooCommerce's own responsive CSS is not loaded by this theme). */
@media (max-width: 480px) {
  .shop_table_responsive thead { display: none; }
  .shop_table_responsive tr { display: block; border-bottom: 1px solid var(--line); padding: 6px 0; }
  .shop_table_responsive td { display: flex; justify-content: space-between; gap: 10px; text-align: right; border: 0 !important; }
  .shop_table_responsive td[data-title]::before { content: attr(data-title); font-weight: 700; text-align: left; }
  .shop_table_responsive td.product-remove, .shop_table_responsive td.product-thumbnail { justify-content: flex-start; }
  /* The remove button sits at the top right of its product card, not on a row of its own. */
  .shop_table_responsive tr.cart_item { position: relative; }
  .shop_table_responsive tr.cart_item td.product-remove { position: absolute; top: 6px; right: 0; padding: 0; }
  .shop_table_responsive tr.cart_item td.product-name { padding-right: 44px; }
  .shop_table_responsive td.actions { display: block; }
  .shop_table_responsive td.product-name { display: block; text-align: left; }
  .shop_table_responsive td.product-name::before { display: block; margin-bottom: 4px; }
  .shop_table_responsive td.product-name .variation { display: flex; gap: 6px; margin: 4px 0 0; color: var(--muted); }
  .shop_table_responsive td.product-name .variation dd, .shop_table_responsive td.product-name .variation p { margin: 0; }
}

@media (max-width: 360px) {
  .product-section .products, .woocommerce ul.products, ul.products { grid-template-columns: 1fr !important; }
  .nova-product-card { border-right: 0 !important; }
  .brand > span { font-size: 17px; }
}

/* Footer bottom line and category banner captions. */
.footer-bottom, .footer-bottom span { font-size: 12px !important; }
.category-banner p, .product-section .section-heading p { font-size: 12px !important; }

/* The single-product layout rule (.single-product .product) also matches related-product cards (li.product). */
.single-product li.product.nova-product-card { display: flex; flex-direction: column; padding: 15px; gap: 0; border-radius: 0; background: #fff; }
.single-product .related ul.products { grid-template-columns: repeat(4, minmax(0, 1fr)); }
@media (max-width: 640px) {
  .single-product .related ul.products { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .single-product li.product.nova-product-card { padding: 11px; }
  .pc-caption { display: none; }
}

/* Pagination: large categories have hundreds of pages. */
.woocommerce-pagination ul { flex-wrap: wrap; row-gap: 8px; margin: 0; }
.woocommerce-pagination a, .woocommerce-pagination span { min-width: 40px; min-height: 40px; display: inline-flex; align-items: center; justify-content: center; padding: 6px 10px; }
