/* The product page's compact accessory style, shared by home/shop/category grids. */
body.tww-compact-catalog { background: #fff; }
body.tww-compact-catalog #content { color: #171717; background: #fff; padding-block: 28px 48px; }
body.tww-compact-catalog #content.site-main { width: min(1240px,calc(100% - 40px)) !important; max-width: 1240px !important; margin-inline: auto !important; }
body.tww-compact-catalog #content.site-main > .wrap { width: 100% !important; max-width: none !important; padding-inline: 0; }
body.tww-compact-catalog #content .tww-shell { width: min(1240px,calc(100% - 40px)) !important; max-width: 1240px !important; }
body.tww-compact-catalog #content .woocommerce-result-count { font-size: 12px; margin-bottom: 24px; }
body.tww-compact-catalog #content .woocommerce-ordering select { font-size: 12px; min-height: 38px; border-radius: 3px; background: #fff; border: 1px solid #ccc; }
body.tww-compact-catalog #content ul.products {
  display: grid !important; grid-template-columns: repeat(4,minmax(0,1fr)) !important;
  grid-auto-flow: row !important; gap: 28px 24px !important; width: 100% !important;
  margin: 0 !important; padding: 0 !important; list-style: none; overflow: visible;
}
body.tww-compact-catalog #content ul.products::before,
body.tww-compact-catalog #content ul.products::after { display: none !important; }
body.tww-compact-catalog #content ul.products li.product {
  display: grid !important; grid-template-columns: 80px minmax(0,1fr) !important; grid-template-rows: 1fr auto; align-items: start;
  gap: 10px 12px !important; float: none !important; clear: none !important; width: auto !important;
  min-width: 0 !important; min-height: 0 !important; margin: 0 !important; padding: 0 !important;
  background: #fff !important; border: 0 !important; border-radius: 0 !important; box-shadow: none !important;
  transform: none !important; animation: none !important; overflow: visible !important;
}
body.tww-compact-catalog #content .woocommerce-loop-product__link {
  display: grid; grid-column: 1 / -1; grid-row: 1; grid-template-columns: 80px minmax(0,1fr); grid-template-rows: auto auto auto;
  align-items: start; align-content: start; gap: 4px 12px; color: #111; text-decoration: none; min-width: 0;
}
body.tww-compact-catalog #content .woocommerce-loop-product__link img {
  grid-column: 1; grid-row: 1 / span 3; width: 80px !important; height: 96px !important; aspect-ratio: auto !important;
  object-fit: contain !important; background: #fff; border: 0; border-radius: 0 !important; padding: 0 !important; margin: 0 !important;
}
body.tww-compact-catalog #content .woocommerce-loop-product__title {
  grid-column: 2; grid-row: 1; font-size: 11px !important; font-weight: 500 !important; line-height: 1.45 !important;
  padding: 0 !important; margin: 0 !important; color: #111 !important; min-height: 0 !important;
}
body.tww-compact-catalog #content ul.products .price { grid-column: 2; grid-row: 2; font-size: 11px !important; line-height: 1.4; font-weight: 700 !important; margin: 0 !important; }
body.tww-compact-catalog #content ul.products .price ins { text-decoration: none; background: none; }
body.tww-compact-catalog #content ul.products .price del { font-weight: 400; }
body.tww-compact-catalog #content li.product > :is(.button,.added_to_cart) {
  grid-column: 2; justify-self: start; margin: 0 !important; padding: 4px 10px !important; min-height: 25px !important;
  border: 1px solid #349653 !important; border-radius: 3px !important; background: #fff !important; color: #278542 !important;
  font-size: 11px !important; line-height: 1.3 !important; font-weight: 400 !important; box-shadow: none !important; transform: none !important;
}
body.tww-compact-catalog #content li.product > .button:hover { background: #edf8ef !important; }
body.tww-compact-catalog #content li.product .tww-wishlist-control { grid-column: 1; grid-row: 2; justify-self: end; margin: 0; position: relative; }
body.tww-compact-catalog #content li.product .tww-wishlist-trigger { width: 26px; min-height: 25px; padding: 0 !important; border: 0 !important; background: #fff !important; color: #555 !important; font-size: 17px; box-shadow: none; }
body.tww-compact-catalog #content li.product .tww-wishlist-trigger__label { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); }
body.tww-compact-catalog #content li.product .tww-wishlist-popover { left: 0; right: auto; width: min(270px,70vw); z-index: 20; }
body.tww-compact-catalog #content ul.products :is(.onsale,.tww-bmsm-loop-badge,.tww-bmsm-dom-badge) {
  position: static !important; grid-column: 2; grid-row: 3; min-height: 0 !important; min-width: 0 !important; width: auto !important;
  padding: 0 !important; margin: 0 !important; border-radius: 0 !important; background: transparent !important;
  color: #278542 !important; box-shadow: none !important; font-size: 9px !important; line-height: 1.4 !important;
}
body.tww-compact-catalog #content li.product:has(.tww-bmsm-loop-badge) > .tww-bmsm-dom-badge { display: none !important; }
body.tww-compact-catalog #content li.product .star-rating { grid-column: 2; width: 5.4em; }
body.tww-compact-catalog #content .tww-section-head { align-items: center; margin-bottom: 24px; }
body.tww-compact-catalog #content .tww-section-head > a { border: 1px solid #349653; border-radius: 3px; color: #278542; padding: 6px 14px; }
body.tww-compact-catalog #content .tww-page-section { background: #fff; border: 0; border-top: 1px solid #ddd; border-radius: 0; box-shadow: none; margin-top: 32px; padding-block: 28px; }
body.tww-compact-catalog #content .tww-hero { grid-template-columns: minmax(280px,1fr) minmax(0,2fr); gap: 32px; align-items: stretch; }
body.tww-compact-catalog #content .tww-hero-media { border: 0; border-radius: 4px; box-shadow: none; min-height: 380px; }
body.tww-compact-catalog #content .tww-hero-products { padding: 0; border: 0; border-radius: 0; box-shadow: none; overflow: visible; background: #fff; }
body.tww-compact-catalog #content .tww-hero-products ul.products { grid-template-columns: repeat(2,minmax(0,1fr)) !important; }
body.tww-compact-catalog #content .tww-hero-copy h2 { color: #fff; font-size: 28px !important; line-height: 1.2 !important; }
body.tww-compact-catalog #content .tww-category-directory { background: #f8fafc; padding-block: 28px; margin-top: 32px; border-block: 1px solid #ddd; }
body.tww-compact-catalog #content .tww-category-tiles { grid-template-columns: repeat(4,minmax(0,1fr)); gap: 16px; }
body.tww-compact-catalog #content .tww-category-tiles > a { border-radius: 3px; box-shadow: none; transform: none; }
body.tww-compact-catalog #content .tww-category-tiles strong { font-size: 13px; font-weight: 600; }
body.tww-compact-catalog #content .tww-category-tiles small { font-size: 11px; }
body.tww-compact-catalog #content .tww-archive-discovery { width: 100%; margin: 36px 0 0; padding: 28px 0; background: #fff; border-top: 1px solid #ddd; }
body.tww-compact-catalog #content .tww-archive-discovery > .tww-shell { width: 100% !important; }
body.tww-compact-catalog #content :is(a,button,input,select):focus-visible { outline: 2px solid #0076b9; outline-offset: 3px; }
@media(max-width:1000px) {
  body.tww-compact-catalog #content ul.products { grid-template-columns: repeat(3,minmax(0,1fr)) !important; }
  body.tww-compact-catalog #content .tww-hero { grid-template-columns: 1fr; }
  body.tww-compact-catalog #content .tww-hero-media { min-height: 340px; }
}
@media(max-width:760px) {
  body.tww-compact-catalog #content ul.products { grid-template-columns: repeat(2,minmax(0,1fr)) !important; }
  body.tww-compact-catalog #content.site-main,body.tww-compact-catalog #content .tww-shell { width: calc(100% - 32px) !important; }
  body.tww-compact-catalog #content .tww-category-tiles { grid-template-columns: repeat(2,minmax(0,1fr)); }
  body.tww-compact-catalog #content li.product > :is(.button,.added_to_cart),body.tww-compact-catalog #content li.product .tww-wishlist-trigger { min-height: 44px !important; }
}
@media(max-width:480px) {
  body.tww-compact-catalog #content ul.products,body.tww-compact-catalog #content .tww-hero-products ul.products { grid-template-columns: minmax(0,1fr) !important; }
  body.tww-compact-catalog #content .woocommerce-loop-product__title,body.tww-compact-catalog #content ul.products .price { font-size: 13px !important; }
  body.tww-compact-catalog #content .tww-section-head { align-items: flex-start; gap: 12px; }
}
/* Two equal desktop rows for curated sections, never the full paginated catalog. */
@media(min-width:761px) {
  body.tww-compact-catalog #content ul.products:is(.tww-compact-grid,[data-tww-collection]):not(#tww-recent-rail) { grid-template-columns: repeat(4,minmax(0,1fr)) !important; }
  body.tww-compact-catalog #content ul.products:is(.tww-compact-grid,[data-tww-collection]):not(#tww-recent-rail):has(> li.product:nth-child(6):last-child) { grid-template-columns: repeat(3,minmax(0,1fr)) !important; }
  body.tww-compact-catalog #content ul.products:is(.tww-compact-grid,[data-tww-collection]):not(#tww-recent-rail):has(> li.product:nth-child(4):last-child) { grid-template-columns: repeat(2,minmax(0,1fr)) !important; }
  body.tww-compact-catalog #content ul.products:is(.tww-compact-grid,[data-tww-collection]):not(#tww-recent-rail):has(> li.product:nth-child(2):last-child) { grid-template-columns: minmax(0,1fr) !important; }
}
