/* round46 Western Sydney Markets UI v2 - loaded only when WSM_UI_V2 is on (includes/header.php) */

/* ---- colour contrast ---- */
html:root { --bm-text: #6b6b6b; }
.bm-nav-item, .bm-nav-item span { color: #6b6b6b; }
.sell-price, .wsm-card-price, .product-card .text-theme { color: #c8141b !important; }
section h3.text-center.mb-1, h3.text-center.mb-1 { color: #8a0f14 !important; }
#average_rating, b:has(> #average_rating) { color: #595959; }
.btn-theme.btn-orange { color: #1a1a1a !important; }
.product_sell_card:not(:hover) .btn_with_icon { background: #6b6b6b; }
#item-information label span { color: #6b6b6b; }
#continue-btn.btn-success { background-color: #007a29; border-color: #007a29; }

/* ---- fixed header: keep page content (breadcrumbs) below it ---- */
main.main-wrapper { padding-top: var(--wsm-hh, 103px) !important; }
@media (max-width: 1199.98px) { main.main-wrapper { padding-top: var(--wsm-hh, 81px) !important; } }

/* ---- floating cart button: small round button, clear of content ---- */
.cart-btn a.btn-theme { display: inline-flex; align-items: center; justify-content: center; min-width: 48px; min-height: 48px; }
.cart-btn a.btn-theme svg { width: 20px; height: 20px; }
@media (max-width: 1024px) {
  .cart-btn { top: auto !important; right: 12px !important; bottom: calc(92px + env(safe-area-inset-bottom, 0px)); z-index: 1000; }
  .cart-btn a.btn-theme { width: 52px; height: 52px; padding: 0; border-radius: 50%; box-shadow: 0 4px 14px rgba(0,0,0,.25); }
  body { padding-bottom: 80px; }
}

/* ---- slim cookie bar ---- */
div#cookieConsent { left: 0; right: 0; margin: 0; padding: 8px 12px; display: flex; flex-wrap: nowrap; align-items: center; gap: 10px; box-shadow: 0 -2px 10px rgba(0,0,0,.08); }
div#cookieConsent[style*="display: none"], div#cookieConsent[style*="display:none"] { display: none !important; }
div#cookieConsent .col-sm-8, div#cookieConsent .col-sm-4 { width: auto !important; padding: 0; flex: 0 1 auto; text-align: left !important; }
div#cookieConsent .col-sm-8 { flex: 1 1 auto; }
div#cookieConsent p { margin: 0; font-size: 13px; line-height: 1.35; color: #333; }
div#cookieConsent p a { color: #c8141b; text-decoration: underline; }
div#cookieConsent #acceptCookies { min-height: 40px; padding: 6px 18px; white-space: nowrap; }
@media (max-width: 1024px) { div#cookieConsent { bottom: 80px; } }
@media (max-width: 676px) { div#cookieConsent p { font-size: 12px; } }

/* ---- item page ---- */
@media (max-width: 767.98px) { .sinngle-product-title h1 { font-size: 24px; line-height: 1.25; } }
button.add-to-cart, .btnsection button.add-to-cart { background: #fff !important; color: #c8141b !important; border: 2px solid #c8141b !important; font-weight: 600; }
button.add-to-cart:hover, .btnsection button.add-to-cart:hover { background: #c8141b !important; color: #fff !important; }
.btnsection .btn { min-height: 48px; }
.wsm-pickup { margin: 6px 0 12px; padding: 8px 12px; background: #f6f6f6; border-left: 3px solid #c8141b; border-radius: 4px; font-size: 15px; color: #222; }

/* ---- shared product cards ---- */
.wsm-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 20px; margin: 10px 0 24px; }
@media (max-width: 575.98px) { .wsm-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; } }
.wsm-grid .wsm-card, section.products .container .wsm-grid .product-card.wsm-card { width: auto !important; max-width: none; margin: 0 !important; height: 100%; display: flex !important; flex-direction: column; }
.wsm-card .image { position: relative; }
.wsm-card .wsm-card-img img, section.products .container .product-card.wsm-card img.img-fluid { width: 100%; height: auto !important; aspect-ratio: 1 / 1; object-fit: cover; background: #f2f2f2; }
.wsm-card .text { display: flex; flex-direction: column; flex: 1 1 auto; padding-top: 8px; }
.wsm-card .wsm-card-btn { margin-top: auto; }
.product-card .text h5, .wsm-card-title { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; white-space: normal !important; text-overflow: ellipsis; line-height: 1.3; min-height: 2.6em; }
.wsm-card-title a { color: #1a1a1a; }
.wsm-card-loc { font-size: 13px; color: #595959; }
.wsm-card-price { font-size: 17px; }
.wsm-card-btn { display: flex; align-items: center; justify-content: center; min-height: 44px; border: 2px solid #c8141b; border-radius: 24px; color: #c8141b; font-weight: 600; text-decoration: none; }
.wsm-card-btn:hover, .wsm-card-btn:focus { background: #c8141b; color: #fff; }
@media (max-width: 575.98px) { .wsm-card-title { font-size: 15px; } .wsm-card-btn { min-height: 44px; font-size: 14px; } }

/* ---- tap targets ---- */
.product-action .action_btn { min-width: 44px; min-height: 44px; }
.pagination li a, .pagination li span, .pagination .page-link { min-width: 44px; min-height: 44px; display: inline-flex; align-items: center; justify-content: center; }
:focus-visible { outline: 3px solid #1a73e8; outline-offset: 2px; }

/* ---- market / date chips ---- */
.wsm-chips { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin: 8px 0 16px; }
.wsm-chips-label { font-weight: 600; color: #333; margin-right: 4px; }
.wsm-chip { display: inline-flex; align-items: center; gap: 6px; min-height: 44px; padding: 6px 16px; border: 1px solid #c9c9c9; border-radius: 22px; background: #fff; color: #1a1a1a; text-decoration: none; font-size: 14px; }
.wsm-chip:hover { border-color: #c8141b; color: #c8141b; }
.wsm-chip.is-active { background: #c8141b; border-color: #c8141b; color: #fff; }
.wsm-chip-date { font-size: 12px; opacity: .9; }

/* ---- empty states ---- */
.wsm-empty { max-width: 560px; margin: 32px auto; padding: 28px 20px; text-align: center; border: 1px dashed #d0d0d0; border-radius: 12px; background: #fafafa; }
.wsm-empty h2, .wsm-empty h3 { font-size: 22px; margin-bottom: 8px; color: #1a1a1a; }
.wsm-empty p { color: #444; margin-bottom: 16px; }
.wsm-empty-actions { display: flex; flex-wrap: wrap; gap: 10px; justify-content: center; }
.wsm-empty-actions a { display: inline-flex; align-items: center; justify-content: center; min-height: 44px; padding: 8px 20px; border-radius: 24px; text-decoration: none; }
.wsm-btn-outline { border: 2px solid #c8141b; color: #c8141b; background: #fff; }
.wsm-btn-outline:hover { background: #c8141b; color: #fff; }
div#cookieConsent[style*="display: block"], div#cookieConsent[style*="display:block"] { display: flex !important; }
/* round46: dropzone.css points at a sprite that is not on the server (404) - no image was ever shown */
body .dropzone .dz-default.dz-message { background-image: none !important; }
.wsm-card .wsm-card-loc { white-space: normal !important; overflow: visible !important; text-overflow: clip !important; }
@media (max-width: 767.98px) {
  .wsm-chips { flex-wrap: nowrap; overflow-x: auto; -webkit-overflow-scrolling: touch; padding-bottom: 4px; scrollbar-width: none; }
  .wsm-chips::-webkit-scrollbar { display: none; }
  .wsm-chip { flex: 0 0 auto; padding: 6px 14px; font-size: 13px; }
}
/* round46 Stage C: shared card inside the home and related-item sliders */
.silde-item > .wsm-card { width: auto !important; margin: 0 8px 16px !important; display: flex !important; flex-direction: column; }
.silde-item > .wsm-card + .wsm-card { margin-top: 0 !important; }
.product-slider .wsm-card .wsm-card-img img, .slick_slider_main .wsm-card .wsm-card-img img { width: 100%; height: auto !important; aspect-ratio: 1 / 1; object-fit: cover; }
.wsm-for-sale .wsm-chips { margin-bottom: 16px; }
/* round46 Stage C: mobile page title on list pages (the photo banner is hidden on phones) */
@media (max-width: 767.98px) {
  .hero_banner_section:has(+ section.products .wsm-chips) { display: block !important; padding: 16px 0 0 !important; }
  .hero_banner_section:has(+ section.products .wsm-chips) .hero_banner_main { background-image: none !important; padding: 0 !important; min-height: 0 !important; border-radius: 0; }
  .hero_banner_section:has(+ section.products .wsm-chips) .hero_banner_main::before, .hero_banner_section:has(+ section.products .wsm-chips) .hero_banner_main::after { display: none !important; }
  .hero_banner_section:has(+ section.products .wsm-chips) .hero_banner_text { text-align: left !important; }
  .hero_banner_section:has(+ section.products .wsm-chips) .hero_banner_text h1 { color: #1a1a1a !important; font-size: 22px !important; line-height: 1.25; margin: 0 !important; text-shadow: none !important; }
  .hero_banner_section:has(+ section.products .wsm-chips) .hero_banner_text > :not(h1) { display: none !important; }
  section.products.pt80:has(.wsm-chips) { padding-top: 12px !important; }
}
