/**
 * SHARPI Hotfix – v2.0.4
 * Scope: single product (remove top OPIS + better layout) + checkout (cleaner summary + hide duplicates)
 * Note: written as override layer loaded LAST.
 */

/* ============================================================
   SINGLE PRODUCT – remove TOP "OPIS" (excerpt / short description)
   ============================================================ */
body.single-product .summary .woocommerce-product-details__short-description,
body.single-product .summary .wp-block-post-excerpt,
body.single-product .summary .wp-block-woocommerce-product-summary-field__short-description,
body.single-product .summary .wp-block-woocommerce-product-summary-field__excerpt,
body.single-product .summary .wp-block-woocommerce-product-summary-field__description,
body.single-product .summary .wp-block-woocommerce-product-description,
body.single-product .summary .wp-block-woocommerce-product-details__description,
body.single-product .summary .wc-block-components-product-details__short-description {
  display: none !important;
}

/* In case the theme/editor injects a "Opis" accordion/heading above tabs, keep it hidden in the summary column only. */
body.single-product .entry-summary [id*="opis"],
body.single-product .entry-summary [class*="opis"] {
  /* only if it's an obvious description container, not the whole summary */
}

/* ============================================================
   SINGLE PRODUCT – layout closer to the mockup (gallery left, summary right)
   ============================================================ */
body.single-product .site-main{
  padding: 22px 0 46px;
}

body.single-product div.product{
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 18px;
}

/* If Woo/Gutenberg uses constrained layout containers, make sure product pages are NOT squashed */
body.single-product .wp-site-blocks,
body.single-product .wp-block-post-content,
body.single-product .entry-content,
body.single-product .site-content,
body.single-product #primary,
body.single-product #main{
  max-width: none !important;
  width: 100% !important;
}
body.single-product .is-layout-constrained{
  width: 100% !important;
}
body.single-product .is-layout-constrained > :where(:not(.alignleft):not(.alignright):not(.alignfull)){
  max-width: 1280px !important;
}

body.single-product div.product .woocommerce-product-gallery{
  background: var(--sharpi-surface, #fff);
  border: 1px solid rgba(0,0,0,.08);
  border-radius: 18px;
  box-shadow: 0 10px 30px rgba(0,0,0,.06);
  padding: 16px;
}

body.single-product div.product .summary{
  background: #fff;
  border: 1px solid rgba(0,0,0,.08);
  border-radius: 18px;
  box-shadow: 0 10px 30px rgba(0,0,0,.06);
  padding: 20px;
}

body.single-product div.product .summary .product_title{
  font-size: clamp(26px, 2.4vw, 40px);
  line-height: 1.08;
  letter-spacing: -0.02em;
  margin: 0 0 10px;
}

body.single-product .woocommerce-product-rating{
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 8px 0 10px;
}

body.single-product p.price,
body.single-product span.price{
  color: var(--sharpi-orange, #F7941D) !important;
  font-weight: 900;
  font-size: clamp(26px, 2.2vw, 38px);
  margin: 8px 0 12px;
}

body.single-product p.stock{
  font-weight: 800;
  margin: 0 0 14px;
}

body.single-product form.cart{
  display: flex;
  gap: 12px;
  align-items: stretch;
  margin-top: 16px;
}

body.single-product form.cart .quantity{
  width: 110px;
}

body.single-product form.cart .quantity input.qty{
  width: 100% !important;
  height: 52px !important;
  border-radius: 12px !important;
  border: 1px solid rgba(0,0,0,.10) !important;
  font-weight: 800;
}

body.single-product form.cart .single_add_to_cart_button,
body.single-product form.cart button[type="submit"]{
  flex: 1;
  height: 52px;
  border-radius: 12px;
  font-weight: 900;
  letter-spacing: 0.02em;
  background: linear-gradient(135deg, var(--sharpi-orange, #F7941D) 0%, #ff6b00 100%);
  border: none !important;
  color: #fff !important;
  box-shadow: 0 12px 28px rgba(247,148,29,.22);
}

body.single-product form.cart .single_add_to_cart_button:hover{
  transform: translateY(-1px);
  box-shadow: 0 16px 34px rgba(247,148,29,.28);
}

@media (min-width: 992px){
  body.single-product div.product{
    display: grid;
    grid-template-columns: 1.05fr .95fr;
    gap: 28px;
    align-items: start;
  }
  body.single-product div.product .woocommerce-tabs{
    grid-column: 1 / -1;
    margin-top: 26px;
  }
  body.single-product div.product .woocommerce-product-gallery{
    position: sticky;
    top: 110px;
  }
}

/* ============================================================
   SINGLE PRODUCT – HARD ALIGNMENT OVERRIDES (r4)
   Reason: sharpi-hotfix.css is the LAST layer; if layout glitches persist, enforce grid placement here.
   ============================================================ */

@media (min-width: 992px){
  body.single-product div.product{
    display: grid !important;
    grid-template-columns: minmax(0, 1.05fr) minmax(0, 0.95fr) !important;
    column-gap: 28px !important;
    row-gap: 0 !important;
    align-items: start !important;
    grid-auto-flow: row;
  }

  /* Notices/extra injected blocks should NEVER push the main columns down */
  body.single-product div.product > .woocommerce-notices-wrapper,
  body.single-product div.product > .woocommerce-message,
  body.single-product div.product > .woocommerce-error,
  body.single-product div.product > .woocommerce-info{
    grid-column: 1 / -1 !important;
    grid-row: 1 !important;
    margin: 0 0 14px !important;
  }

  body.single-product div.product > .woocommerce-product-gallery,
  body.single-product div.product > div.images{
    grid-column: 1 !important;
    grid-row: 2 !important;
    align-self: start !important;
    margin: 0 !important;
  }

  body.single-product div.product > .summary,
  body.single-product div.product > .summary.entry-summary{
    grid-column: 2 !important;
    grid-row: 2 !important;
    align-self: start !important;
    margin: 0 !important;
  }

  body.single-product div.product > .woocommerce-tabs{
    grid-column: 1 / -1 !important;
    grid-row: 3 !important;
    margin-top: 26px !important;
  }

  /* Keep upsells/related BELOW tabs on desktop (under opis) */
  body.single-product div.product > .upsells.products,
  body.single-product div.product > .related.products{
    grid-column: 1 / -1 !important;
    grid-row: 4 !important;
    margin-top: 22px !important;
  }



  /* Sticky gallery can cause apparent top misalignment in some setups (restored scroll, anchor jumps). Disable. */
  body.single-product div.product .woocommerce-product-gallery{
    position: static !important;
    top: auto !important;
  }
}


/* ============================================================
   SINGLE PRODUCT – MOBILE STACK (r5)
   Purpose: enforce 1-column layout on phones even if some legacy Woo floats win.
   NOTE: max-width 980px also covers cases where viewport meta is ignored (classic 980px layout).
   ============================================================ */
@media (max-width: 980px){
  body.single-product div.product{
    display: flex !important;
    flex-direction: column !important;
    gap: 14px !important;
    padding: 0 12px !important;
  }

  body.single-product div.product > .woocommerce-product-gallery,
  body.single-product div.product > div.images,
  body.single-product div.product > .summary,
  body.single-product div.product > .summary.entry-summary{
    width: 100% !important;
    float: none !important;
    clear: both !important;
    margin: 0 !important;
  }

  body.single-product div.product > .woocommerce-product-gallery,
  body.single-product div.product > div.images{
    order: 1 !important;
  }

  body.single-product div.product > .summary,
  body.single-product div.product > .summary.entry-summary{
    order: 2 !important;
  }

  body.single-product div.product > .woocommerce-tabs{
    order: 3 !important;
    margin-top: 16px !important;
  }

  body.single-product form.cart{
    flex-direction: column !important;
    align-items: stretch !important;
  }

  body.single-product form.cart .quantity{
    width: 100% !important;
  }

  body.single-product form.cart .single_add_to_cart_button,
  body.single-product form.cart button[type="submit"]{
    width: 100% !important;
  }
}
@media (max-width: 767px){

/* ============================================================
   SINGLE PRODUCT – MOBILE STACK (r5)
   Purpose: enforce 1-column layout on phones even if some legacy Woo floats win.
   NOTE: max-width 980px also covers cases where viewport meta is ignored (classic 980px layout).
   ============================================================ */
@media (max-width: 980px){
  body.single-product div.product{
    display: flex !important;
    flex-direction: column !important;
    align-items: stretch !important;
    gap: 14px !important;
    padding-left: 12px !important;
    padding-right: 12px !important;
  }

  body.single-product div.product > .woocommerce-product-gallery,
  body.single-product div.product > div.images,
  body.single-product div.product > .summary,
  body.single-product div.product > .summary.entry-summary{
    float: none !important;
    width: 100% !important;
    clear: both !important;
    margin: 0 !important;
  }

  /* Buybox: stack quantity + button */
  body.single-product form.cart{
    flex-direction: column !important;
  }
  body.single-product form.cart .quantity,
  body.single-product form.cart .quantity input.qty,
  body.single-product form.cart .single_add_to_cart_button,
  body.single-product form.cart button[type="submit"]{
    width: 100% !important;
  }
}
  /* Mobile: shrink buybox so it doesn't visually dwarf the gallery */
  body.single-product div.product .summary{
    padding: 16px !important;
  }

  body.single-product .sharpi-trust-badges{
    display: grid !important;
    grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
    gap: 10px !important;
    margin-top: 12px !important;
  }
  body.single-product .sharpi-trust-badge{
    padding: 10px 8px !important;
    border-radius: 14px !important;
  }
  body.single-product .sharpi-trust-badge .title{
    font-size: 12px !important;
    line-height: 1.15 !important;
  }
}

/* Tabs */
body.single-product .woocommerce-tabs{
  background: transparent;
  border: none;
  padding: 0;
}

body.single-product .woocommerce div.product .woocommerce-tabs ul.tabs{
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  padding: 0;
  margin: 0 0 14px;
  border: none;
}

body.single-product .woocommerce div.product .woocommerce-tabs ul.tabs li{
  border: none;
  background: transparent;
  padding: 0;
  margin: 0;
}

body.single-product .woocommerce div.product .woocommerce-tabs ul.tabs li a{
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-weight: 900;
  padding: 10px 16px;
  border-radius: 999px;
  background: #fff;
  border: 1px solid rgba(0,0,0,.08);
  color: rgba(0,0,0,.78);
}

body.single-product .woocommerce div.product .woocommerce-tabs ul.tabs li.active a{
  color: rgba(0,0,0,.90);
  border-color: rgba(0,0,0,.14);
  box-shadow: 0 10px 24px rgba(0,0,0,.06);
}

body.single-product .woocommerce div.product .woocommerce-tabs .panel{
  background: #fff;
  border: 1px solid rgba(0,0,0,.08);
  border-radius: 18px;
  padding: 20px;
  box-shadow: 0 10px 30px rgba(0,0,0,.04);
}

/* Description content: keep media under control */
body.single-product .woocommerce-tabs .panel img,
body.single-product .woocommerce-tabs .panel svg{
  max-width: 100%;
  height: auto;
  max-height: 520px;
}

body.single-product .woocommerce-tabs .panel figure.wp-block-image img{
  max-height: 240px;
  width: auto;
  margin-left: auto;
  margin-right: auto;
  display: block;
}

/* Extra safety: avoid giant infographic-like images taking over the whole page */
body.single-product .woocommerce-tabs .panel img,
body.single-product .woocommerce-tabs .panel svg{
  max-height: 420px;
}

/* ============================================================
   CHECKOUT – cleanup + readability (white version)
   ============================================================ */

/* One-step checkout: hide the 4-step progress indicator (it confuses users because payment is inside checkout anyway) */
body.woocommerce-checkout .sharpi-progress-bar{
  display: none !important;
}

/* Hide duplicated notice banners (keep errors visible) */
body.woocommerce-checkout .woocommerce-notices-wrapper .woocommerce-message + .woocommerce-message,
body.woocommerce-checkout .woocommerce-notices-wrapper .woocommerce-info + .woocommerce-info{
  display: none !important;
}

/* Some plugins echo notices inside order review – de-duplicate there as well */
body.woocommerce-checkout #order_review .woocommerce-message + .woocommerce-message,
body.woocommerce-checkout #order_review .woocommerce-info + .woocommerce-info{
  display: none !important;
}

/* If plugin injects multiple identical "free shipping left" notices inside the summary, keep only the first */
body.woocommerce-checkout .wc-block-components-order-summary .woocommerce-message ~ .woocommerce-message,
body.woocommerce-checkout .wc-block-components-order-summary .woocommerce-info ~ .woocommerce-info{
  display: none !important;
}

/* Remove floating "badges" that clutter summary column */
body.woocommerce-checkout .sharpi-floating-badges,
body.woocommerce-checkout .sharpi-trust-badges,
body.woocommerce-checkout .floating-badges,
body.woocommerce-checkout .trust-badges{
  display: none !important;
}

/* In case the badges are rendered as a vertical floating icon stack */
body.woocommerce-checkout [class*="floating-badge"],
body.woocommerce-checkout [class*="floating-icons"],
body.woocommerce-checkout [class*="floating-icon"]{
  display: none !important;
}

/* Order summary card (Woo Blocks) */
body.woocommerce-checkout .wc-block-components-order-summary{
  border: 1px solid rgba(0,0,0,.08);
  border-radius: 18px;
  overflow: hidden;
  box-shadow: 0 12px 30px rgba(0,0,0,.06);
}

body.woocommerce-checkout .wc-block-components-order-summary__title{
  margin: 0;
  padding: 18px 20px;
  color: #fff;
  background: linear-gradient(135deg, var(--sharpi-orange, #F7941D) 0%, #ff6b00 100%);
}

body.woocommerce-checkout .wc-block-components-order-summary__content{
  padding: 18px 20px;
  background: #fff;
}

/* Product items list in summary */
body.woocommerce-checkout .wc-block-components-order-summary-item{
  border-bottom: 1px solid rgba(0,0,0,.06);
  padding: 12px 0;
}

body.woocommerce-checkout .wc-block-components-order-summary-item:last-child{
  border-bottom: none;
}

/* Shipping options – make them look like selectable cards */
body.woocommerce-checkout .wc-block-components-radio-control__option{
  border: 1px solid rgba(0,0,0,.10);
  border-radius: 14px;
  padding: 12px 12px;
  background: #fff;
}

body.woocommerce-checkout .wc-block-components-radio-control__option[aria-checked="true"],
body.woocommerce-checkout .wc-block-components-radio-control__option.is-checked{
  border-color: rgba(247,148,29,.55);
  box-shadow: 0 10px 24px rgba(247,148,29,.12);
}

body.woocommerce-checkout .wc-block-components-radio-control__label{
  font-weight: 800;
}

body.woocommerce-checkout .wc-block-components-radio-control__description{
  color: rgba(0,0,0,.62);
}

/* Primary button polish */
body.woocommerce-checkout .wc-block-components-button:not(.is-link){
  border-radius: 12px;
  font-weight: 900;
}


/* ============================================================
   HEADER – menu bez zawijania + estetyczna wyszukiwarka na DESKTOP
   ============================================================ */

/* Menu: nie zawijaj etykiet (żeby nie robiło się "dwie linie") */
@media (min-width: 993px){
  .main-navigation ul{ flex-wrap: nowrap; gap: 1.1rem; }
  .main-navigation a{ white-space: nowrap; font-size: 0.92rem; }
}

/* Search overlay: wcześniej było ostylowane tylko na mobile (<=768px)
   więc na desktop pojawiał się "dziwny" input w lewym górnym rogu */
.search-overlay{
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,.72);
  backdrop-filter: blur(6px);
  z-index: 1100;
  display: flex;
  align-items: flex-start;
  justify-content: center;
  padding: 110px 16px 40px;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity .2s ease, visibility .2s ease;
}
.search-overlay.active{
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
}
.search-overlay .search-form{
  width: 100%;
  max-width: 720px;
}
.search-overlay .search-form input[type="search"]{
  width: 100%;
  height: 56px;
  padding: 0 18px;
  border-radius: 18px;
  border: 1px solid rgba(255,255,255,.22);
  background: rgba(255,255,255,.96);
  font-size: 18px;
  box-shadow: 0 18px 60px rgba(0,0,0,.35);
}
.search-overlay .search-form input[type="search"]:focus{
  outline: 3px solid rgba(247, 148, 29, .35);
  border-color: rgba(247, 148, 29, .55);
  background: #fff;
}
.search-close{
  position: absolute;
  top: 22px;
  right: 22px;
  width: 46px;
  height: 46px;
  border-radius: 999px;
  background: rgba(255,255,255,.14);
  border: 1px solid rgba(255,255,255,.20);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
}
.search-close:hover{
  background: rgba(255,255,255,.20);
}
/* =========================================================
   SHARPI – WooCommerce Gallery FIX (Hard Swap)
   Wklej NA SAM KONIEC pliku:
   /wp-content/themes/TWOJ-MOTYW/assets/css/sharpi-hotfix.css
   ========================================================= */

.woocommerce-product-gallery .flex-viewport{
  overflow: visible !important;
  height: auto !important;
}

.woocommerce-product-gallery .woocommerce-product-gallery__wrapper{
  transform: none !important;
  width: 100% !important;
}

/* ukryj wszystkie slajdy */
.woocommerce-product-gallery .woocommerce-product-gallery__image{
  display: none !important;
  float: none !important;
  width: 100% !important;
  margin-right: 0 !important;
}

/* pokaz tylko aktywny */
.woocommerce-product-gallery .woocommerce-product-gallery__image.flex-active-slide{
  display: block !important;
}

/* fallback na start */
.woocommerce-product-gallery .woocommerce-product-gallery__image:first-child{
  display: block !important;
}

/* zoom overlay nie moze blokowac */
.woocommerce-product-gallery .zoomImg{
  pointer-events: none !important;
}

/* =========================================================
   SHARPI – WooCommerce Gallery FIX (Override)
   Problem: po hard-swap widziałeś aktywny slajd "niżej",
            bo fallback :first-child pokazywał zawsze 1. slajd.
   Rozwiązanie: ukryj fallback i pokazuj TYLKO .flex-active-slide.
   Wklej NA SAM KONIEC sharpi-hotfix.css (pod poprzednim fixem).
   ========================================================= */

.woocommerce-product-gallery .woocommerce-product-gallery__image:first-child{
  display: none !important;
}

.woocommerce-product-gallery .woocommerce-product-gallery__image.flex-active-slide{
  display: block !important;
}
/* =========================================================
   SHARPI – WooCommerce Gallery FIX (Mobile: no stacking)
   Objaw: na mobile slajdy układają się jeden pod drugim.
   Cel: wymusić widoczność TYLKO aktywnego slajdu na mobile.
   Wklej NA SAM KONIEC sharpi-hotfix.css (po poprzednich fixach).
   ========================================================= */

@media (max-width: 768px){

  /* przywróć typowe zachowanie viewportu na mobile */
  .woocommerce-product-gallery .flex-viewport{
    overflow: hidden !important;
  }

  /* bezwzględnie ukryj WSZYSTKIE slajdy… */
  .woocommerce-product-gallery.images .flex-viewport .woocommerce-product-gallery__wrapper > .woocommerce-product-gallery__image{
    display: none !important;
    float: none !important;
    width: 100% !important;
    margin-right: 0 !important;
  }

  /* …i pokaż tylko aktywny */
  .woocommerce-product-gallery.images .flex-viewport .woocommerce-product-gallery__wrapper > .woocommerce-product-gallery__image.flex-active-slide{
    display: block !important;
  }

  /* zoom overlay nadal nie może blokować */
  .woocommerce-product-gallery .zoomImg{
    pointer-events: none !important;
  }

  /* miniatury – poziomy scroll (opcjonalnie, ale poprawia UX) */
  .woocommerce-product-gallery .flex-control-nav.flex-control-thumbs{
    display: flex !important;
    gap: 8px;
    overflow-x: auto;
    overflow-y: hidden;
    padding-bottom: 6px;
    -webkit-overflow-scrolling: touch;
  }
  .woocommerce-product-gallery .flex-control-nav.flex-control-thumbs li{
    flex: 0 0 auto;
  }
}

/* Fallback startowy: pokaż 1. slajd TYLKO gdy flex-active-slide nie istnieje.
   (działa w nowoczesnych przeglądarkach – Chrome/Edge/Safari)
*/
@supports selector(.x:has(.y)){
  @media (max-width: 768px){
    .woocommerce-product-gallery.images .flex-viewport .woocommerce-product-gallery__wrapper:not(:has(.woocommerce-product-gallery__image.flex-active-slide)) > .woocommerce-product-gallery__image:first-child{
      display: block !important;
    }
  }
}

/* ======================================================================
   SHARPI Archive Cards (Shop/Category) — v1
   Makes default Woo archive tiles look like SHARPI home cards.
   Safe scope: shop + product category/tag archives only.
   ====================================================================== */

body.woocommerce-shop .woocommerce ul.products,
body.post-type-archive-product .woocommerce ul.products,
body.tax-product_cat .woocommerce ul.products,
body.tax-product_tag .woocommerce ul.products {
  display: grid !important;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 18px;
  list-style: none;
  margin: 0;
  padding: 0;
}

@media (max-width: 1024px){
  body.woocommerce-shop .woocommerce ul.products,
  body.post-type-archive-product .woocommerce ul.products,
  body.tax-product_cat .woocommerce ul.products,
  body.tax-product_tag .woocommerce ul.products {
    grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
    gap: 16px;
  }
}

@media (max-width: 640px){
  body.woocommerce-shop .woocommerce ul.products,
  body.post-type-archive-product .woocommerce ul.products,
  body.tax-product_cat .woocommerce ul.products,
  body.tax-product_tag .woocommerce ul.products {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
  }
}

@media (max-width: 420px){
  body.woocommerce-shop .woocommerce ul.products,
  body.post-type-archive-product .woocommerce ul.products,
  body.tax-product_cat .woocommerce ul.products,
  body.tax-product_tag .woocommerce ul.products {
    grid-template-columns: 1fr;
  }
}

body.woocommerce-shop .woocommerce ul.products li.product,
body.post-type-archive-product .woocommerce ul.products li.product,
body.tax-product_cat .woocommerce ul.products li.product,
body.tax-product_tag .woocommerce ul.products li.product{
  position: relative;
  background: var(--white);
  border: 1px solid var(--gray-200);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-sm);
  padding: 14px;
  transition: transform var(--transition-normal), box-shadow var(--transition-normal), border-color var(--transition-normal);
  display: flex;
  flex-direction: column;
  min-width: 0;
}

body.woocommerce-shop .woocommerce ul.products li.product:hover,
body.post-type-archive-product .woocommerce ul.products li.product:hover,
body.tax-product_cat .woocommerce ul.products li.product:hover,
body.tax-product_tag .woocommerce ul.products li.product:hover{
  border-color: rgba(247, 148, 29, 0.55);
  box-shadow: var(--shadow-lg);
  transform: translateY(-3px);
}

body.woocommerce-shop .woocommerce ul.products li.product a,
body.post-type-archive-product .woocommerce ul.products li.product a,
body.tax-product_cat .woocommerce ul.products li.product a,
body.tax-product_tag .woocommerce ul.products li.product a{
  color: inherit;
  text-decoration: none;
}

body.woocommerce-shop .woocommerce ul.products li.product a.woocommerce-LoopProduct-link,
body.post-type-archive-product .woocommerce ul.products li.product a.woocommerce-LoopProduct-link,
body.tax-product_cat .woocommerce ul.products li.product a.woocommerce-LoopProduct-link,
body.tax-product_tag .woocommerce ul.products li.product a.woocommerce-LoopProduct-link,
body.tax-product_cat .woocommerce ul.products li.product a.woocommerce-loop-category__link,
body.tax-product_cat .woocommerce ul.products li.product-category a{
  display: block;
}

body.woocommerce-shop .woocommerce ul.products li.product a img,
body.post-type-archive-product .woocommerce ul.products li.product a img,
body.tax-product_cat .woocommerce ul.products li.product a img,
body.tax-product_tag .woocommerce ul.products li.product a img{
  width: 100%;
  max-width: 220px;
  height: 220px;
  margin: 4px auto 12px;
  display: block;
  object-fit: contain;
  background: var(--gray-50);
  border-radius: var(--radius-lg);
  padding: 10px;
}

@media (max-width: 640px){
  body.woocommerce-shop .woocommerce ul.products li.product a img,
  body.post-type-archive-product .woocommerce ul.products li.product a img,
  body.tax-product_cat .woocommerce ul.products li.product a img,
  body.tax-product_tag .woocommerce ul.products li.product a img{
    max-width: 170px;
    height: 170px;
    padding: 8px;
    margin-bottom: 10px;
  }
}

body.woocommerce-shop .woocommerce ul.products li.product .woocommerce-loop-product__title,
body.post-type-archive-product .woocommerce ul.products li.product .woocommerce-loop-product__title,
body.tax-product_cat .woocommerce ul.products li.product .woocommerce-loop-product__title,
body.tax-product_tag .woocommerce ul.products li.product .woocommerce-loop-product__title,
body.tax-product_cat .woocommerce ul.products li.product .woocommerce-loop-category__title,
body.woocommerce-shop .woocommerce ul.products li.product .woocommerce-loop-category__title{
  font-size: 0.95rem;
  font-weight: 800;
  color: var(--gray-900);
  margin: 0 0 8px;
  line-height: 1.25;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  min-height: 2.45em;
}

body.tax-product_cat .woocommerce ul.products li.product .woocommerce-loop-category__title,
body.woocommerce-shop .woocommerce ul.products li.product .woocommerce-loop-category__title{
  text-align: center;
}

body.tax-product_cat .woocommerce ul.products li.product .woocommerce-loop-category__title mark.count,
body.woocommerce-shop .woocommerce ul.products li.product .woocommerce-loop-category__title mark.count{
  background: var(--sharpi-orange-light);
  color: var(--sharpi-orange);
  border-radius: 999px;
  padding: 0.12rem 0.45rem;
  font-weight: 900;
  font-size: 0.82em;
  margin-left: 0.35rem;
}

body.woocommerce-shop .woocommerce ul.products li.product .price,
body.post-type-archive-product .woocommerce ul.products li.product .price,
body.tax-product_cat .woocommerce ul.products li.product .price,
body.tax-product_tag .woocommerce ul.products li.product .price{
  margin-top: 2px;
  font-weight: 900;
  color: var(--gray-900);
}

body.woocommerce-shop .woocommerce ul.products li.product .price del,
body.post-type-archive-product .woocommerce ul.products li.product .price del,
body.tax-product_cat .woocommerce ul.products li.product .price del,
body.tax-product_tag .woocommerce ul.products li.product .price del{
  color: var(--gray-500);
  font-weight: 700;
  margin-right: 6px;
}

body.woocommerce-shop .woocommerce ul.products li.product .price ins,
body.post-type-archive-product .woocommerce ul.products li.product .price ins,
body.tax-product_cat .woocommerce ul.products li.product .price ins,
body.tax-product_tag .woocommerce ul.products li.product .price ins{
  color: var(--sharpi-orange);
  text-decoration: none;
}

body.woocommerce-shop .woocommerce ul.products li.product .button,
body.post-type-archive-product .woocommerce ul.products li.product .button,
body.tax-product_cat .woocommerce ul.products li.product .button,
body.tax-product_tag .woocommerce ul.products li.product .button{
  margin-top: 12px;
  width: 100%;
  text-align: center;
  border-radius: var(--radius-lg);
  padding: 0.7rem 0.9rem;
  font-weight: 900;
  border: 1px solid var(--sharpi-orange);
  background: var(--sharpi-orange);
  color: #fff;
  transition: filter var(--transition-normal), transform var(--transition-normal);
}

body.woocommerce-shop .woocommerce ul.products li.product .button:hover,
body.post-type-archive-product .woocommerce ul.products li.product .button:hover,
body.tax-product_cat .woocommerce ul.products li.product .button:hover,
body.tax-product_tag .woocommerce ul.products li.product .button:hover{
  filter: brightness(0.95);
  transform: translateY(-1px);
}

/* Sale badge */
body.woocommerce-shop .woocommerce ul.products li.product .onsale,
body.post-type-archive-product .woocommerce ul.products li.product .onsale,
body.tax-product_cat .woocommerce ul.products li.product .onsale,
body.tax-product_tag .woocommerce ul.products li.product .onsale{
  position: absolute;
  top: 12px;
  left: 12px;
  background: var(--sharpi-orange);
  color: #fff;
  border-radius: 999px;
  padding: 6px 10px;
  font-weight: 900;
  font-size: 12px;
  line-height: 1;
  z-index: 3;
}

/* Tighter spacing under category hero */
body.tax-product_cat .woocommerce-result-count,
body.tax-product_cat .woocommerce-ordering{
  margin-top: 10px;
}

/* Category tiles: add subtle CTA line */
body.tax-product_cat .woocommerce ul.products li.product-category a.woocommerce-loop-category__link::after,
body.woocommerce-shop .woocommerce ul.products li.product-category a.woocommerce-loop-category__link::after{
  content: "Zobacz →";
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  margin-top: 10px;
  font-weight: 900;
  color: var(--sharpi-orange);
  opacity: 0.95;
}

body.tax-product_cat .woocommerce ul.products li.product-category:hover a.woocommerce-loop-category__link::after,
body.woocommerce-shop .woocommerce ul.products li.product-category:hover a.woocommerce-loop-category__link::after{
  filter: brightness(0.95);
}

.woocommerce ul.products li.product a.button{
  white-space: nowrap;
  display: flex;
  justify-content: center;
  align-items: center;
}

/* w assets/css/sharpi-hotfix.css albo w CSS motywu */
body.tax-product_cat .woocommerce ul.products li.product a.woocommerce-LoopProduct-link > img {
    width: 100% !important;
    height: auto !important;
    object-fit: contain;
    padding: 10px;
    margin: 0 auto;
}

