/* ===========================================================
   FurniLove — listing produktów (sklep / kategorie)
   Styl spójny ze stroną główną. Działa na bloku WooCommerce
   "Product Collection" — nie zmienia funkcji, tylko wygląd.
   =========================================================== */
:root{
  --fl-gold:#a17c44;
  --fl-gold-d:#876230;
  --fl-cream:#fbfaf3;
  --fl-ink:#1b1b1b;
  --fl-muted:#8a8a8a;
  --fl-line:#ece7db;
  --fl-serif:"Playfair Display",Georgia,serif;
  --fl-sans:"Manrope",-apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif;
  --fl-radius:16px;
  --fl-shadow:0 18px 50px -20px rgba(60,45,20,.28);
}

/* ---------- nagłówek archiwum ---------- */
body[class*="woocommerce"] .wp-block-query-title,
body[class*="woocommerce"] .woocommerce-products-header__title{
  font-family:var(--fl-serif);
  font-weight:600;
  font-size:clamp(2.2rem,4.4vw,3.4rem);
  letter-spacing:-.01em;
  line-height:1.1;
  margin-bottom:.35em;
}
body[class*="woocommerce"] .wp-block-query-title::before{
  content:"Kolekcja";
  display:block;
  font-family:var(--fl-sans);
  font-size:.78rem;letter-spacing:.28em;text-transform:uppercase;
  color:var(--fl-gold);font-weight:600;margin-bottom:12px;
}
body[class*="woocommerce"] .wp-block-query-title::after{
  content:"";display:block;width:56px;height:2px;background:var(--fl-gold);margin-top:18px;
}
body[class*="woocommerce"] .woocommerce-breadcrumb{
  font-size:.85rem;color:var(--fl-muted);letter-spacing:.02em;margin-bottom:18px;
}
body[class*="woocommerce"] .woocommerce-breadcrumb a{color:var(--fl-gold);text-decoration:none;}
body[class*="woocommerce"] .woocommerce-breadcrumb a:hover{color:var(--fl-gold-d);}

/* ---------- pasek narzędzi (filtr / liczba / sortowanie) ---------- */
.woo-filters-toggle{
  border:1.5px solid var(--fl-line)!important;
  background:#fff!important;color:var(--fl-ink)!important;
  border-radius:999px!important;padding:11px 24px!important;
  font-family:var(--fl-sans)!important;font-weight:600!important;
  letter-spacing:.02em;transition:.25s!important;box-shadow:none!important;
}
.woo-filters-toggle:hover{border-color:var(--fl-gold)!important;color:var(--fl-gold)!important;transform:translateY(-1px);}
body[class*="woocommerce"] .woocommerce-result-count{
  color:var(--fl-muted);font-size:.92rem;margin:0;white-space:nowrap;
}
/* na wąskich ekranach: pasek wyników+sortowania zawija się, fraza na własnej linii (bez łamania w środku) */
@media (max-width:768px){
  body[class*="woocommerce"] .is-layout-flex:has(> .wp-block-woocommerce-product-results-count){
    flex-wrap:wrap!important;gap:10px 16px!important;justify-content:flex-start!important;
  }
  body[class*="woocommerce"] .wp-block-woocommerce-product-results-count{flex:1 0 100%;}
  body[class*="woocommerce"] .wp-block-woocommerce-catalog-sorting{flex:1 0 100%;}
  body[class*="woocommerce"] .woocommerce-result-count{font-size:.85rem;}
}
body[class*="woocommerce"] .woocommerce-ordering select,
body[class*="woocommerce"] select.orderby{
  font-family:var(--fl-sans);border:1.5px solid var(--fl-line);border-radius:999px;
  padding:10px 38px 10px 18px;background-color:#fff;color:var(--fl-ink);
  font-size:.92rem;cursor:pointer;transition:.25s;-webkit-appearance:none;appearance:none;
  background-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%23a17c44' stroke-width='2'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
  background-repeat:no-repeat;background-position:right 16px center;
}
body[class*="woocommerce"] .woocommerce-ordering select:hover,
body[class*="woocommerce"] select.orderby:hover{border-color:var(--fl-gold);}
body[class*="woocommerce"] .woocommerce-ordering select:focus,
body[class*="woocommerce"] select.orderby:focus{outline:none;border-color:var(--fl-gold);box-shadow:0 0 0 3px rgba(161,124,68,.15);}

/* ---------- siatka i odstępy ---------- */
.wc-block-product-template{gap:26px!important;}

/* ---------- karta produktu (minimalistyczna, bez ramek) ---------- */
li.wc-block-product, .wc-block-product{
  list-style:none;background:transparent;border:none;
  border-radius:14px;padding:12px 12px 22px;
  display:flex;flex-direction:column;text-align:center;
  transition:transform .4s cubic-bezier(.2,.7,.3,1),box-shadow .4s,background-color .4s;
}
/* na hover kafel delikatnie „wypływa" z bieli — miękki cień, bez obwódek (tylko desktop, nie na dotyku) */
@media (hover:hover) and (pointer:fine){
  li.wc-block-product:hover, .wc-block-product:hover{
    transform:translateY(-6px);background:#fff;
    box-shadow:0 26px 60px -28px rgba(20,16,8,.26);
  }
}

/* obrazek wtopiony w biel — bez kremowego tła i ramki */
.wc-block-product .wc-block-components-product-image,
.wc-block-product .wp-block-woocommerce-product-image{
  margin:0 0 16px;background:transparent;border-radius:10px;overflow:hidden;
}
.wc-block-product .wc-block-components-product-image > a{display:block;}
.wc-block-product .furni-product-hover-swap{border-radius:10px;}
/* primary definiuje wysokość kafla (produkt w całości, na biało) */
.wc-block-product .furni-product-hover-image{width:100%!important;}
.wc-block-product .furni-product-hover-image--primary{height:260px!important;object-fit:contain!important;}
/* sekundarne (hover) — TEŻ w całości (contain), żeby żadne zdjęcie nie było ucięte */
.wc-block-product .furni-product-hover-image--secondary{object-fit:contain!important;}
/* zwykły obrazek WooCommerce (gdy brak hover-swap) — pełne zdjęcie, bez kadrowania */
.wc-block-product .wc-block-components-product-image img:not(.furni-product-hover-image),
.wc-block-product .wp-block-woocommerce-product-image img:not(.furni-product-hover-image){
  height:260px!important;object-fit:contain!important;width:100%!important;
}
/* płynniejszy cross-fade tylko na desktopie (urządzenia z hover) */
@media (hover:hover) and (pointer:fine){
  .wc-block-product .furni-product-hover-image{transition:opacity .6s ease, transform .7s cubic-bezier(.2,.7,.3,1)!important;}
}
@media (max-width:480px){
  .wc-block-product .furni-product-hover-image--primary{height:200px!important;}
}
/* pusty placeholder bloku — chowamy */
.wc-block-product .wc-block-components-product-image__inner-container:empty{display:none!important;}

/* tytuł */
.wc-block-product .wp-block-post-title{
  font-family:var(--fl-sans)!important;font-weight:600!important;
  font-size:1.04rem!important;line-height:1.3!important;margin:8px 0 0!important;
  letter-spacing:.01em;
}
.wc-block-product .wp-block-post-title a{color:var(--fl-ink);text-decoration:none;transition:color .25s;}
.wc-block-product .wp-block-post-title a:hover{color:var(--fl-gold);}

/* cena */
.wc-block-product .wc-block-components-product-price,
.wc-block-product .wp-block-woocommerce-product-price{
  margin-top:6px!important;
}
.wc-block-product .wc-block-components-product-price__value,
.wc-block-product .wc-block-grid__product-price .price{
  font-family:var(--fl-serif)!important;font-weight:600!important;
  font-size:1.3rem!important;color:var(--fl-ink)!important;
}
.wc-block-product .wc-block-components-product-price__regular{color:var(--fl-muted)!important;text-decoration:line-through;font-size:.95rem;}

/* przycisk dodaj do koszyka */
.wc-block-product .wp-block-button{margin-top:auto;padding-top:14px;}
.wc-block-product .wp-block-button__link,
.wc-block-product .wc-block-components-product-button .wc-block-components-button{
  background:var(--fl-gold)!important;color:#fff!important;border:1.5px solid var(--fl-gold)!important;
  border-radius:999px!important;font-family:var(--fl-sans)!important;font-weight:600!important;
  padding:11px 22px!important;letter-spacing:.02em;transition:.25s!important;box-shadow:none!important;
}
.wc-block-product .wp-block-button__link:hover,
.wc-block-product .wc-block-components-product-button .wc-block-components-button:hover{
  background:var(--fl-gold-d)!important;border-color:var(--fl-gold-d)!important;transform:translateY(-1px);
}
/* wariant "wyświetl produkt" (gdy produkt nie jest prosty) */
.wc-block-product .wp-block-button.is-style-outline .wp-block-button__link{
  background:transparent!important;color:var(--fl-gold)!important;
}

/* sale badge */
.wc-block-product .wc-block-components-product-sale-badge,
.wc-block-product .wc-block-components-sale-badge{
  background:var(--fl-gold)!important;color:#fff!important;border-radius:999px!important;
  font-family:var(--fl-sans)!important;letter-spacing:.06em;font-weight:700;
}

/* ---------- paginacja ---------- */
body[class*="woocommerce"] .wp-block-query-pagination{justify-content:center;gap:8px;margin-top:54px;}
body[class*="woocommerce"] .wp-block-query-pagination .page-numbers,
body[class*="woocommerce"] .wp-block-query-pagination a,
body[class*="woocommerce"] .wp-block-query-pagination .wp-block-query-pagination-numbers .page-numbers{
  display:inline-grid;place-items:center;min-width:46px;height:46px;padding:0 14px;
  border:1px solid var(--fl-line);border-radius:999px;color:var(--fl-ink);
  text-decoration:none;font-weight:600;transition:.25s;
}
body[class*="woocommerce"] .wp-block-query-pagination .page-numbers:hover,
body[class*="woocommerce"] .wp-block-query-pagination .page-numbers.current{
  background:var(--fl-gold);color:#fff;border-color:var(--fl-gold);
}

/* ---------- responsywność ---------- */
@media(max-width:1024px){ .wc-block-product-template.columns-5{grid-template-columns:repeat(3,1fr)!important;} }
@media(max-width:760px){ .wc-block-product-template.columns-5,.wc-block-product-template{grid-template-columns:repeat(2,1fr)!important;gap:16px!important;} }
@media(max-width:480px){ .wc-block-product .wc-block-components-product-image__inner-container img{height:180px;} }
