@media (min-width: 900px) {
  body.woocommerce-shop ul.wc-block-product-template {
    grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
    gap: 24px !important;
  }
  body.woocommerce-shop .wc-block-product {
    min-width: 0;
  }
  .mas-home,
  .mas-shop-hero {
    width: calc(100% - 48px) !important;
    max-width: 1180px !important;
    margin-inline: auto !important;
  }
}

/* Keep regular pages clean; product reviews remain available. */
body.page .wp-block-comments,
body.woocommerce-shop .wp-block-comments {
  display: none !important;
}

/* Remove the oversized product recommendation carousel. */
body.single-product .wp-block-group:has(> .wp-block-group > h2.wp-block-heading + .wc-block-next-previous-buttons) {
  display: none !important;
}

/* Show artwork fields only after the matching design option is selected. */
body.single-product .wpcpo-option[data-key="wpcpo-6vpz"],
body.single-product .wpcpo-option[data-key="wpcpo-m8sq"],
body.single-product .wpcpo-option[data-key="wpcpo-8ia3"],
body.single-product .wpcpo-option[data-key="wpcpo-uq4m"] {
  display: none;
}

body.single-product form.cart:has(input[type="radio"][value="customer-design-included"]:checked)
  .wpcpo-option[data-key="wpcpo-6vpz"],
body.single-product form.cart:has(input[type="radio"][value="customer-design-included"]:checked)
  .wpcpo-option[data-key="wpcpo-8ia3"],
body.single-product form.cart:has(input[type="radio"][value="mas-design-20-minimum"]:checked)
  .wpcpo-option[data-key="wpcpo-m8sq"],
body.single-product form.cart:has(input[type="radio"][value="mas-design-20-minimum"]:checked)
  .wpcpo-option[data-key="wpcpo-uq4m"] {
  display: block;
}@media (min-width: 900px) {
  body.woocommerce-shop ul.wc-block-product-template {
    grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
    gap: 24px !important;
  }
  body.woocommerce-shop .wc-block-product {
    min-width: 0;
  }
  .mas-home,
  .mas-shop-hero {
    width: calc(100% - 48px) !important;
    max-width: 1180px !important;
    margin-inline: auto !important;
  }
}

/* Keep regular pages clean; product reviews remain available. */
body.page .wp-block-comments,
body.woocommerce-shop .wp-block-comments {
  display: none !important;
}

/* Remove the oversized product recommendation carousel. */
body.single-product .wp-block-group:has(> .wp-block-group > h2.wp-block-heading + .wc-block-next-previous-buttons) {
  display: none !important;
}

/* Show artwork fields only after the customer chooses the matching option. */
body.single-product form.cart .wpcpo-option-form > p.form-row:has(input[type="file"][name^="wpcpo-6vpz"]),
body.single-product form.cart .wpcpo-option-form > p.form-row:has(textarea[name^="wpcpo-m8sq"]),
body.single-product form.cart .wpcpo-option-form > p.form-row:has(input[type="file"][name^="wpcpo-8ia3"]),
body.single-product form.cart .wpcpo-option-form > p.form-row:has(textarea[name^="wpcpo-uq4m"]) {
  display: none;
}

body.single-product form.cart:has(input[type="radio"][value="customer-design-included"]:checked)
  .wpcpo-option-form > p.form-row:has(input[type="file"][name^="wpcpo-6vpz"]),
body.single-product form.cart:has(input[type="radio"][value="customer-design-included"]:checked)
  .wpcpo-option-form > p.form-row:has(input[type="file"][name^="wpcpo-8ia3"]),
body.single-product form.cart:has(input[type="radio"][value="mas-design-20-minimum"]:checked)
  .wpcpo-option-form > p.form-row:has(textarea[name^="wpcpo-m8sq"]),
body.single-product form.cart:has(input[type="radio"][value="mas-design-20-minimum"]:checked)
  .wpcpo-option-form > p.form-row:has(textarea[name^="wpcpo-uq4m"]) {
  display: block;
}@media (min-width: 900px) {
  body.woocommerce-shop ul.wc-block-product-template {
    grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
    gap: 24px !important;
  }
  body.woocommerce-shop .wc-block-product {
    min-width: 0;
  }
  .mas-home,
  .mas-shop {
    width: calc(100% - 48px) !important;
    max-width: 1180px !important;
    margin-inline: auto !important;
  }
}

/* Keep regular pages clean; product reviews remain available. */
body.page .wp-block-comments,
body.woocommerce-shop .wp-block-comments {
  display: none !important;
}

/* Remove the oversized product recommendation carousel. */
body.single-product .wp-block-group:has(> .wp-block-group > h2.wp-block-heading + .wc-block-next-previous-buttons) {
  display: none !important;
}

/* Show artwork fields only after the customer chooses the matching option. */
body.single-product form.cart .wpcpo-option-form > p.form-row:has(input[type="file"][name^="wpcpo-6vpz"]),
body.single-product form.cart .wpcpo-option-form > p.form-row:has(textarea[name^="wpcpo-m8sq"]),
body.single-product form.cart .wpcpo-option-form > p.form-row:has(input[type="file"][name^="wpcpo-8ia3"]),
body.single-product form.cart .wpcpo-option-form > p.form-row:has(textarea[name^="wpcpo-uq4m"]) {
  display: none;
}

body.single-product form.cart:has(input[type="radio"][value="customer-design-included"]:checked)
  .wpcpo-option-form > p.form-row:has(input[type="file"][name^="wpcpo-6vpz"]),
body.single-product form.cart:has(input[type="radio"][value="customer-design-included"]:checked)
  .wpcpo-option-form > p.form-row:has(input[type="file"][name^="wpcpo-8ia3"]),
body.single-product form.cart:has(input[type="radio"][value="mas-design-20-minimum"]:checked)
  .wpcpo-option-form > p.form-row:has(textarea[name^="wpcpo-m8sq"]),
body.single-product form.cart:has(input[type="radio"][value="mas-design-20-minimum"]:checked)
  .wpcpo-option-form > p.form-row:has(textarea[name^="wpcpo-uq4m"]) {
  display: block;
}@media (min-width: 900px) {
  body.woocommerce-shop ul.wc-block-product-template {
    grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
    gap: 24px !important;
  }
  body.woocommerce-shop .wc-block-product {
    min-width: 0;
  }
}

/* Show the full polo in its product gallery. */
body.postid-157 [aria-label="Product gallery"] img,
body.postid-157 [role="listbox"] img {
  object-fit: contain !important;
  background: #fff;
}

/* Show the full T-shirt in its product gallery. */
body.postid-156 [aria-label="Product gallery"] img,
body.postid-156 [role="listbox"] img {
  object-fit: contain !important;
  background: #fff;
}

/* Visible color names for the selected T-shirt and polo photos. */
.wp-block-woocommerce-product-image:has(img:is([src*="/g640-"], [src*="/g880-"]))::after {
  content: var(--mas-photo-color, "");
  display: block;
  padding: 8px 6px 12px;
  color: #222;
  background: #fff;
  text-align: center;
  font-size: 16px;
  font-weight: 600;
  line-height: 1.4;
}
.wp-block-woocommerce-product-image:has(img:is([src*="/g640-"], [src*="/g880-"])) img { object-fit: contain !important; background: #fff; }
.wp-block-woocommerce-product-image:has(img[data-image-id="396"]) { --mas-photo-color: "Carolina Blue"; }
.wp-block-woocommerce-product-image:has(img[data-image-id="364"]) { --mas-photo-color: "White"; }
.wp-block-woocommerce-product-image:has(img[data-image-id="389"]) { --mas-photo-color: "Ice Gray"; }
.wp-block-woocommerce-product-image:has(img[data-image-id="390"]) { --mas-photo-color: "Charcoal"; }
.wp-block-woocommerce-product-image:has(img[data-image-id="391"]) { --mas-photo-color: "Coral Silk"; }
.wp-block-woocommerce-product-image:has(img[data-image-id="392"]) { --mas-photo-color: "Cherry Red"; }
.wp-block-woocommerce-product-image:has(img[data-image-id="393"]) { --mas-photo-color: "Maroon"; }
.wp-block-woocommerce-product-image:has(img[data-image-id="394"]) { --mas-photo-color: "Military Green"; }
.wp-block-woocommerce-product-image:has(img[data-image-id="395"]) { --mas-photo-color: "Light Blue"; }
.wp-block-woocommerce-product-image:has(img[data-image-id="397"]) { --mas-photo-color: "Sand"; }
.wp-block-woocommerce-product-image:has(img[data-image-id="398"]) { --mas-photo-color: "Dark Chocolate"; }
.wp-block-woocommerce-product-image:has(img[data-image-id="363"]) { --mas-photo-color: "Black"; }
.wp-block-woocommerce-product-image:has(img[data-image-id="366"]) { --mas-photo-color: "White"; }
.wp-block-woocommerce-product-image:has(img[data-image-id="377"]) { --mas-photo-color: "Sport Gray"; }
.wp-block-woocommerce-product-image:has(img[data-image-id="378"]) { --mas-photo-color: "Gold"; }
.wp-block-woocommerce-product-image:has(img[data-image-id="379"]) { --mas-photo-color: "Red"; }
.wp-block-woocommerce-product-image:has(img[data-image-id="380"]) { --mas-photo-color: "Royal"; }
.wp-block-woocommerce-product-image:has(img[data-image-id="381"]) { --mas-photo-color: "Navy"; }
.wp-block-woocommerce-product-image:has(img[data-image-id="382"]) { --mas-photo-color: "Sand"; }
.wp-block-woocommerce-product-image:has(img[data-image-id="383"]) { --mas-photo-color: "Forest Green"; }
.wp-block-woocommerce-product-image:has(img[data-image-id="384"]) { --mas-photo-color: "Light Blue"; }
.wp-block-woocommerce-product-image:has(img[data-image-id="365"]) { --mas-photo-color: "Black"; }

/* Keep customization details readable in narrow cart and checkout views. */
@media (max-width: 600px) {
  .wc-block-components-product-details {
    overflow-wrap: anywhere;
  }
  .wc-block-cart-item__product {
    min-width: 0;
  }
}

/* Fit the cart image, customization details, and line total on small phones. */
@media (max-width: 480px) {
  .wc-block-cart .wc-block-cart-items .wc-block-cart-items__row {
    grid-template-columns: 64px minmax(0, 1fr) max-content !important;
    column-gap: 12px !important;
  }
  .wc-block-cart .wc-block-cart-items .wc-block-cart-item__image {
    padding-right: 0 !important;
  }
  .wc-block-cart .wc-block-cart-items .wc-block-cart-item__product {
    grid-column: 2 !important;
  }
  .wc-block-cart .wc-block-cart-items .wc-block-cart-item__total {
    grid-column: 3 !important;
  }
}

/* Keep the checkout link visible in short mobile viewports. */
@media (max-width: 600px) and (max-height: 500px) {
  .wc-block-cart .wc-block-cart__submit-container--sticky {
    display: flex !important;
    position: static !important;
    width: 100%;
  }
}

/* Allow room beneath gallery images for their color captions. */
:is(body.postid-156, body.postid-157) [aria-label="Product gallery"] > li { aspect-ratio: auto !important; height: auto !important; }
:is(body.postid-156, body.postid-157) [aria-label="Product gallery"] .wp-block-woocommerce-product-image { height: auto !important; }
