/* ===========================
   shop.css (CLEAN) — PWC
   - Removed: card variants UI (pwc-card-vars, pwc-var-*)
   - Added: product cards styled like PDP "Mohlo by vás zajímat" (pwc-pcard)
   =========================== */

.pwc-shop {
  padding: 18px 0 30px;
}

/* breadcrumb */
.pwc-shop-top .woocommerce-breadcrumb {
  font-size: 14px;
  opacity: .75;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  margin: 0 0 14px;
}

/* shell */
.pwc-shop-shell {
  display: grid;
  grid-template-columns: 280px minmax(0, 1fr);
  gap: 18px;
  align-items: start;
}

@media (max-width: 900px) {
  .pwc-shop-shell {
    grid-template-columns: 1fr;
  }
}

/* ---------------------------
   Filters (LEFT)
--------------------------- */
.pwc-shop-filters {
  border: 1px solid var(--pwc-border);
  border-radius: var(--pwc-r-lg);
  background: var(--pwc-white);
  overflow: hidden;
  position: sticky;
  top: 14px;
}

.pwc-filters-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 12px;
  border-bottom: 1px solid var(--pwc-border);
  background: rgba(0, 0, 0, .02);
  font-weight: 700;
}

.pwc-filters-title {
  font-weight: 700;
}

.pwc-filters-close {
  display: none;
  width: 40px;
  height: 40px;
}

.pwc-filters-body {
  padding: 12px;
  display: grid;
  gap: 12px;
}

/* IMPORTANT: stop global img rules from blowing swatches */
.pwc-shop-filters img {
  width: auto !important;
  max-width: 100% !important;
  height: auto !important;
}

/* accordion boxes */
.pwc-fbox {
  border: 1px solid var(--pwc-border);
  border-radius: var(--pwc-r-lg);
  background: var(--pwc-white);
  overflow: hidden;
}

.pwc-fbox-sum {
  cursor: pointer;
  list-style: none;
  padding: 6px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  font-weight: 700;
}

.pwc-fbox[open] .pwc-fbox-caret {
  transform: rotate(180deg);
}

.pwc-fbox-caret {
  transition: transform .15s ease;
  opacity: .6;
}

.pwc-fbox-sum::-webkit-details-marker {
  display: none;
}

.pwc-price {
  padding: 6px;
}

.pwc-price-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-bottom: 10px;
}

.pwc-price label span {
  display: block;
  font-size: 12px;
  opacity: .7;
  font-weight: 500;
  margin-bottom: 6px;
}

.pwc-price input {
  width: 100%;
  height: 40px;
  border-radius: var(--pwc-r-pill);
  border: 1px solid rgba(0, 0, 0, .20);
  padding: 0 12px;
  font-weight: 400;
  background: var(--pwc-white);
}

.pwc-clear {
  display: inline-block;
  margin-top: 8px;
  font-weight: 700;
  opacity: .7;
  text-decoration: none;
}

.pwc-clear:hover {
  text-decoration: underline;
}

/* filter list */
.pwc-flist {
  padding: 0 6px;
  display: grid;
  gap: 8px;
}

.pwc-fitem {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 10px;
  border-radius: var(--pwc-r-lg);
  border: 1px solid rgba(0, 0, 0, .10);
  background: rgba(0, 0, 0, .02);
  text-decoration: none;
}

.pwc-fitem:hover {
  background: rgba(0, 0, 0, .04);
}

.pwc-fitem.is-on {
  border-color: var(--pwc-accent);
  box-shadow: 0 0 0 2px rgba(206, 176, 132, .22);
  background: rgba(206, 176, 132, .10);
}

.pwc-fname {
  flex: 1;
  min-width: 0;
  font-weight: 400;
  font-size: 13px;
  line-height: 1.2;
}

.pwc-fcount {
  font-weight: 400;
  font-size: 12px;
  opacity: .55;
}

/* swatches (NEVER huge) */
.pwc-swatch {
  flex: 0 0 24px;
  width: 24px !important;
  height: 24px !important;
  border-radius: 999px;
  overflow: hidden;
  border: 1px solid rgba(0, 0, 0, .12);
  background: rgba(0, 0, 0, .03);
  display: block;
}

.pwc-swatch--img img {
  width: 100% !important;
  height: 100% !important;
  object-fit: cover !important;
  display: block !important;
}

.pwc-swatch--color {
  background: var(--sw);
}

.pwc-swatch--dot::after {
  content: "";
  width: 8px;
  height: 8px;
  border-radius: 999px;
  background: rgba(0, 0, 0, .35);
  display: block;
  margin: 7px auto 0;
}

/* ---------------------------
   Main (RIGHT)
--------------------------- */
.pwc-shop-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  margin: 0 0 10px;
}

.pwc-shop-h1 {
  margin: 0 0 8px;
  font-size: 26px;
  line-height: 1.15;
}

.pwc-shop-intro {
  font-size: 14px;
  color: var(--pwc-text-secondary);
}

.pwc-shop-intro p {
  margin: 0 0 8px;
}

.pwc-shop-openfilters {
  display: none;
}

@media (max-width: 900px) {
  .pwc-shop-openfilters {
    display: inline-flex;
  }
}

/* sort tabs row */
.pwc-sortbar {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  margin: 10px 0 14px;
}

.pwc-sort {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 36px;
  padding: 0 14px;
  border-radius: var(--pwc-r-pill);
  border: 1px solid var(--pwc-border);
  background: var(--pwc-white);
  text-decoration: none;
  font-weight: 400;
  font-size: 12px;
}

.pwc-sort:hover {
  background: rgba(0, 0, 0, .02);
}

.pwc-sort.is-on {
  background: var(--pwc-accent);
  border-color: var(--pwc-accent);
  color: #fff;
}

.pwc-sortmeta {
  margin-left: auto;
  font-size: 12px;
  font-weight: 400;
  opacity: .7;
}

/* ---------------------------
   Product grid
--------------------------- */
.pwc-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 18px 16px;
}

@media (max-width: 1200px) {
  .pwc-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (max-width: 900px) {
  .pwc-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 520px) {
  .pwc-grid {
    grid-template-columns: 1fr;
  }
}

/* ===========================
   Product cards — PDP-like
   (copied behavior from pdp.css "pwc-pcard" section)
   =========================== */

/* Ensure grid equal heights */
.pwc-grid>* {
  height: 100%;
}

/* PDP card wrapper */
.pwc-pcard,
.pwc-card {
  background: var(--pwc-surface);
  border-radius: var(--pwc-r-lg);
  overflow: hidden;
  height: 100%;
  display: flex;
  flex-direction: column;
}

/* Link block */
.pwc-pcard-link,
.pwc-card-link {
  display: block;
  text-decoration: none;
  color: inherit;
  flex: 1 1 auto;
}

/* Image */
.pwc-pimg,
.pwc-card-img {
  width: 100%;
}

.pwc-pimg img,
.pwc-card-img img {
  width: 100% !important;
  object-fit: contain !important;
  display: block;
  border-radius: var(--pwc-r-sm);
}

/* Body */
.pwc-pbody {
  padding: 0;
  display: grid;
  justify-items: center;
  text-align: center;
}

/* Title – keep stable height (so price/stock/button align) */
.pwc-ptitle,
.pwc-card-title {
  text-align: center;
  text-decoration: none;
  color: inherit;
  font-weight: 700;
  font-size: 16px;
  line-height: 1.25;
  padding: 6px;
  margin: 0;
  /* stability */
  display: -webkit-box;
  -webkit-box-orient: vertical;
  overflow: hidden;
  min-height: 42px;
  /* stable baseline like PDP (min-height 36 + padding) */
}

.pwc-ptitle:hover,
.pwc-card-title:hover {
  text-decoration: underline;
}

/* Actions zone pinned to bottom */
.pwc-pactions,
.pwc-card-cta {
  margin-top: auto;
  padding: 12px;
  padding-top: 0;
  display: grid;
  gap: 0;
  justify-items: center;
  text-align: center;
}

/* Price */
.pwc-pactions .pwc-price,
.pwc-pactions .pwc-price .price,
.pwc-card-price {
  text-align: center;
  font-weight: 500;
}

/* Stock */
.pwc-pactions .pwc-stock,
.pwc-card-stock {
  font-size: 13px;
  font-weight: 600;
  margin-top: 0;
  text-align: center;
  justify-content: center;
}

.pwc-stock--instock {
  color: var(--pwc-success);
}

.pwc-stock--backorder {
  color: var(--pwc-warning);
}

.pwc-stock--outofstock {
  color: var(--pwc-error);
}

/* Button — exactly like PDP interest section */
.pwc-btn.pwc-btn--cart,
.pwc-card-cta .pwc-btn,
.pwc-card-cta .button {
  width: 100%;
  border-color: var(--pwc-accent) !important;
  color: var(--pwc-black) !important;
  background: var(--pwc-accent) !important;
  font-weight: 500 !important;
  margin-top: 6px;
}

/* If you also use small/block buttons on cards, keep them full width */
.pwc-btn--block {
  width: 100%;
}

/* ---------------------------
   Pagination
--------------------------- */
.pwc-pagi {
  margin: 18px 0 6px;
}

.pwc-pagi .woocommerce-pagination ul {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  justify-content: center;
  gap: 10px;
}

.pwc-pagi .page-numbers {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 42px;
  height: 42px;
  border-radius: var(--pwc-r-pill);
  border: 1px solid var(--pwc-border);
  background: var(--pwc-white);
  text-decoration: none;
  font-weight: 950;
}

.pwc-pagi .page-numbers.current {
  background: var(--pwc-accent);
  border-color: var(--pwc-accent);
  color: #fff;
}

/* ---------------------------
   SEO section
--------------------------- */
.pwc-seo {
  margin: 18px 0 0;
  padding: 18px;
  border: 1px solid var(--pwc-border);
  border-radius: var(--pwc-r-lg);
  background: rgba(0, 0, 0, .02);
}

.pwc-seo p {
  color: var(--pwc-text-secondary);
}

/* ---------------------------
   Mobile filters drawer
--------------------------- */
.pwc-filters-backdrop {
  display: none;
}

@media (max-width: 900px) {
  .pwc-shop-filters {
    position: fixed;
    inset: 0 auto 0 0;
    width: min(360px, calc(100% - 54px));
    height: 100dvh;
    top: 0;
    border-radius: 0;
    transform: translateX(-105%);
    transition: transform .25s ease;
    z-index: 80;
  }

  .pwc-filters-close {
    display: grid;
    place-items: center;
  }

  .pwc-filters-body {
    height: calc(100dvh - 60px);
    overflow: auto;
    -webkit-overflow-scrolling: touch;
  }

  .pwc-filters-backdrop {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, .35);
    z-index: 70;
    opacity: 0;
    transition: opacity .2s ease;
  }

  body.pwc-filters-open .pwc-shop-filters {
    transform: translateX(0);
  }

  body.pwc-filters-open .pwc-filters-backdrop {
    display: block;
    opacity: 1;
  }

  body.pwc-filters-open {
    overflow: hidden;
  }
}

/* Swiper slide height safety (same intent as PDP) */
.swiper-slide {
  height: auto;
}

/* ===========================
   PDP-like cards: stable heights (Shop grid)
   =========================== */

.pwc-pcard {
  height: 100%;
  display: flex;
  flex-direction: column;
}

.pwc-pcard-link {
  display: block;
  text-decoration: none;
  color: inherit;
}

.pwc-pimg img {
  width: 100% !important;
  display: block;
  object-fit: contain !important;
}

/* Title: allow 2 lines, but reserve the same space */
.pwc-ptitle {
  margin: 0;
  text-align: center;
  font-weight: 600;
  line-height: 1.25;
  padding-bottom: 0;
  display: -webkit-box;
  -webkit-box-orient: vertical;
  overflow: hidden;

  min-height: 40px;
  /* keeps cards aligned */
}

/* Actions always pinned to bottom */

.pwc-pactions .pwc-btn--cart,
.pwc-pactions .button {
  width: 100%;
}


/* ===========================
   MOBILE FILTERS FIX (drawer)
   - fixes: no scroll, bad iOS touch scroll, summary tap area
   =========================== */

@media (max-width: 900px) {

  /* Drawer must be a real scroll container on mobile */
  .pwc-shop-filters {
    /* already fixed in your CSS */
    height: 100svh;
    /* better than 100vh on mobile browsers */
    max-height: 100svh;
    overflow: hidden;
    /* keep rounded edges clean */
    -webkit-overflow-scrolling: touch;
    touch-action: pan-y;
    /* allow vertical gesture */
    overscroll-behavior: contain;
  }

  /* Make the header “stick” and keep body scrollable */
  .pwc-filters-head {
    position: sticky;
    top: 0;
    z-index: 2;
    background: var(--pwc-white);
    border-bottom: 1px solid var(--pwc-border);
  }

  .pwc-filters-body {
    /* IMPORTANT: scroll must be on this element */
    overflow-y: auto;
    overflow-x: hidden;
    height: auto;
    max-height: calc(100svh - 60px);
    /* head height approx */
    -webkit-overflow-scrolling: touch;
    overscroll-behavior: contain;
    touch-action: pan-y;
    padding-bottom: 90px;
    /* so last filter isn't behind phone UI */
  }

  /* Bigger tap targets + smoother details */
  .pwc-fbox-sum {
    padding: 12px 10px;
    /* was 6px – too small on mobile */
    min-height: 44px;
    /* mobile tap standard */
    border-radius: var(--pwc-r-lg);
  }

  /* Sometimes iOS ignores summary toggling if it contains selectable text */
  .pwc-fbox-sum,
  .pwc-fbox-sum * {
    -webkit-user-select: none;
    user-select: none;
  }

  /* Prevent “click-through” weirdness */
  .pwc-fbox {
    isolation: isolate;
  }

  /* Backdrop must always sit behind drawer but above content */
  body.pwc-filters-open .pwc-filters-backdrop {
    display: block;
    opacity: 1;
    pointer-events: auto;
  }

  .pwc-filters-backdrop {
    pointer-events: none;
  }
}


/* ===========================
   Active filters (chips)
   =========================== */
.pwc-activef {
  border: 1px solid var(--pwc-border);
  border-radius: var(--pwc-r-lg);
  background: rgba(0, 0, 0, .02);
  padding: 10px;
}

.pwc-activef-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 10px;
}

.pwc-activef-title {
  font-weight: 800;
  font-size: 13px;
}

.pwc-activef-clear {
  text-decoration: none;
  font-weight: 800;
  font-size: 12px;
  opacity: .75;
}

.pwc-activef-clear:hover {
  text-decoration: underline;
}

.pwc-activef-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.pwc-chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 10px;
  border-radius: var(--pwc-r-pill);
  border: 1px solid rgba(0, 0, 0, .10);
  background: #fff;
  text-decoration: none;
  font-size: 12px;
}

.pwc-chip:hover {
  background: rgba(0, 0, 0, .03);
}

.pwc-chip-x {
  width: 18px;
  height: 18px;
  border-radius: 999px;
  display: grid;
  place-items: center;
  background: rgba(206, 176, 132, .18);
  font-weight: 900;
}

/* Small reset link in drawer header (mobile) */
.pwc-filters-reset {
  display: none;
  text-decoration: none;
  font-weight: 800;
  font-size: 12px;
  opacity: .75;
}

.pwc-filters-reset:hover {
  text-decoration: underline;
}

@media (max-width: 900px) {
  .pwc-filters-reset {
    display: inline-flex;
    margin-left: auto;
    margin-right: 6px;
  }
}


/* ===========================
   CATEGORY TILES — EXACT ROW UI + ACCENT HOVER
   (paste at END of shop.css)
   =========================== */

/* grid spacing like screenshot (4 columns, roomy) */
.pwc-tiles {
  margin: 10px 0 26px;
}

.pwc-tiles-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px 12px;
  /* bigger gaps like screenshot */
}

@media (max-width: 1100px) {
  .pwc-tiles-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 900px) {
  .pwc-tiles-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 520px) {
  .pwc-tiles-grid {
    grid-template-columns: 1fr;
  }
}

/* tile */
.pwc-tile.pwc-tile--row {
  /* exact “pill card” look */
  border: 1px solid var(--pwc-border);
  background: rgba(0, 0, 0, .03);
  border-radius: 18px;
  /* screenshot-like (not too round) */
  padding: 8px 8px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;

  text-decoration: none;
  color: inherit;

  transition: border-color .16s ease, background .16s ease, box-shadow .16s ease;
}

/* left group */
.pwc-tile-left {
  display: flex;
  align-items: center;
  gap: 14px;
  min-width: 0;
}

/* icon */
.pwc-tile-ic {

  display: grid;
  place-items: center;
}

.pwc-tile-ic img {
  width: 44px;
  height: 44px;
  object-fit: cover;
  border-radius: 999px;
}

/* title */
.pwc-tile-name {
  font-weight: 700;
  font-size: 15px;
  line-height: 1.15;
  color: var(--pwc-text);

  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;

  transition: text-decoration-color .16s ease;
}


/* HOVER / FOCUS = accent border + accent filled arrow circle + underline title */
.pwc-tile.pwc-tile--row:hover,
.pwc-tile.pwc-tile--row:focus-visible {
  border-color: var(--pwc-accent);
  box-shadow: 0 0 0 2px rgba(206, 176, 132, .22);
  /* fallback if accent is gold */
  background: rgba(0, 0, 0, .03);
  outline: none;
}

/* underline like screenshot */
.pwc-tile.pwc-tile--row:hover .pwc-tile-name,
.pwc-tile.pwc-tile--row:focus-visible .pwc-tile-name {
  text-decoration: underline;
  text-decoration-thickness: 2px;
  text-underline-offset: 3px;
}

/* arrow button becomes accent filled */
.pwc-tile.pwc-tile--row:hover .pwc-tile-go,
.pwc-tile.pwc-tile--row:focus-visible .pwc-tile-go {
  background: var(--pwc-accent);
  border-color: var(--pwc-accent);
  color: #fff;
  transform: translateX(2px);
}

/* remove old tile styles that could interfere */
.pwc-tile {
  min-height: unset;
}


/* ===========================
   CATEGORY TILE ARROW — SWIPER STYLE
   =========================== */

.pwc-tile-go {
  width: 44px;
  height: 44px;
  flex: 0 0 44px;

  display: grid;
  place-items: center;

  border-radius: 999px;
  background: rgba(255, 255, 255, .95);
  border: 1px solid rgba(0, 0, 0, .10);

  color: var(--pwc-text);
  /* arrow color (currentColor) */

  transition:
    background .16s ease,
    border-color .16s ease,
    color .16s ease,
    transform .16s ease;
}

.pwc-tile-arrow {
  display: block;
  width: 11px;
  height: 20px;
}

/* hover / focus = EXACT reference behavior */
.pwc-tile.pwc-tile--row:hover .pwc-tile-go,
.pwc-tile.pwc-tile--row:focus-visible .pwc-tile-go {
  background: var(--pwc-accent);
  border-color: var(--pwc-accent);
  color: #fff;
  /* arrow turns white */
  transform: translateX(2px);
}