/* ===========================================================================
   REPY.SPACE — shop.css
   ===========================================================================
   Style dla:
     - modala produktu (.pv-modal-*)
     - badge liczby stylów na karcie (.item-style-badge)
     - inline sekcji kategorii na stronie głównej (#inline-category-section)
     - strony search.html (.search-page-*)
     - stron kategorii (.category-page-*)
   Paleta i język wizualny 1:1 z resztą repy.space (czarne tła, biały
   tekst, subtelne obramowania rgba(255,255,255,x), zaokrąglone rogi,
   font Inter/Figtree).
=========================================================================== */

/* --- BADGE LICZBY STYLÓW NA KARCIE --- */
.item-style-badge {
  position: absolute;
  bottom: 8px;
  left: 8px;
  background: rgba(0, 0, 0, 0.72);
  border: 1px solid rgba(255, 255, 255, 0.18);
  color: #ffffff;
  font-size: 9.5px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  padding: 4px 8px;
  border-radius: 6px;
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  pointer-events: none;
}
.item-price-from {
  font-size: 9px;
  font-weight: 700;
  color: #777777;
  text-transform: uppercase;
  margin-left: 3px;
  text-shadow: none;
  vertical-align: middle;
}
.empty-state {
  width: 100%;
  text-align: center;
  padding: 60px 20px;
  color: #555555;
  font-size: 13px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.8px;
}

/* --- ANIMACJA WEJŚCIA KART (fade + slide-up, kaskadowo) --- */
@keyframes repyCardEnter {
  from { opacity: 0; transform: translateY(14px) scale(0.98); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}
.item-card {
  animation: repyCardEnter 0.45s cubic-bezier(0.16, 1, 0.3, 1) backwards;
}
.item-card:nth-child(1) { animation-delay: 0.02s; }
.item-card:nth-child(2) { animation-delay: 0.05s; }
.item-card:nth-child(3) { animation-delay: 0.08s; }
.item-card:nth-child(4) { animation-delay: 0.11s; }
.item-card:nth-child(5) { animation-delay: 0.14s; }
.item-card:nth-child(6) { animation-delay: 0.17s; }
.item-card:nth-child(n+7) { animation-delay: 0.2s; }

/* --- ANIMACJA HOVER NA OBRAZKU KARTY (lekkie zbliżenie) --- */
.item-img-box img { transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1); }
.item-card:hover .item-img-box img { transform: scale(1.04); }

/* --- ANIMACJA WEJŚCIA SEKCJI (karuzele, grid) PRZY SCROLLU --- */
@keyframes repySectionFadeIn {
  from { opacity: 0; transform: translateY(20px); }
  to { opacity: 1; transform: translateY(0); }
}
.repy-animate-in {
  animation: repySectionFadeIn 0.6s cubic-bezier(0.16, 1, 0.3, 1) backwards;
}

/* --- PLACEHOLDER DLA ZEPSUTYCH / BRAKUJĄCYCH ZDJĘĆ --- */
.repy-img-fallback {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 100%;
  color: rgba(255, 255, 255, 0.18);
}
.repy-img-fallback svg { width: 30%; height: 30%; min-width: 22px; min-height: 22px; max-width: 40px; max-height: 40px; }
.item-img-box.img-broken,
.pv-main-image.img-broken,
.pv-thumb.img-broken,
.pv-style-swatch.img-broken {
  background: #0d0d0f;
}

/* --- TOAST INFORMACYJNY --- */
.repy-toast {
  position: fixed;
  bottom: 28px;
  left: 50%;
  transform: translateX(-50%) translateY(20px);
  background: #0a0a0a;
  border: 1px solid rgba(255, 255, 255, 0.16);
  color: #ffffff;
  font-size: 13px;
  font-weight: 600;
  padding: 14px 22px;
  border-radius: 12px;
  z-index: 1100;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.25s ease, transform 0.25s ease, visibility 0.25s ease;
  box-shadow: 0 14px 34px rgba(0, 0, 0, 0.6);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  white-space: nowrap;
}
.repy-toast.show {
  opacity: 1;
  visibility: visible;
  transform: translateX(-50%) translateY(0);
}
@media screen and (max-width: 500px) {
  .repy-toast { white-space: normal; max-width: 88vw; text-align: center; }
}

/* ===========================================================================
   MODAL PRODUKTU
=========================================================================== */
.pv-modal-overlay {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  background: rgba(0, 0, 0, 0.55);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.25s ease, visibility 0.25s ease;
}
.pv-modal-overlay.open {
  opacity: 1;
  visibility: visible;
}
body.pv-modal-locked {
  overflow: hidden;
}

.pv-modal {
  position: relative;
  width: 100%;
  max-width: 980px;
  max-height: 88vh;
  overflow-y: auto;
  background: #0a0a0a;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 22px;
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.8), 0 0 0 1px rgba(255, 255, 255, 0.04);
  transform: translateY(16px) scale(0.98);
  transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}
.pv-modal-overlay.open .pv-modal {
  transform: translateY(0) scale(1);
}

.pv-modal-close {
  position: absolute;
  top: 18px;
  right: 18px;
  z-index: 5;
  width: 36px;
  height: 36px;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.12);
  color: #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: background 0.2s ease, border-color 0.2s ease, transform 0.2s ease;
}
.pv-modal-close:hover {
  background: rgba(255, 255, 255, 0.12);
  border-color: rgba(255, 255, 255, 0.25);
  transform: scale(1.06);
}

.pv-modal-body { padding: 36px; }

.pv-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 40px;
}

/* --- GALERIA --- */
.pv-gallery { display: flex; flex-direction: column; gap: 14px; }
.pv-main-image {
  width: 100%;
  aspect-ratio: 1 / 1;
  background: #121214;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 16px;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  box-sizing: border-box;
}
.pv-main-image img { width: 100%; height: 100%; object-fit: contain; }
.pv-img-placeholder { color: rgba(255, 255, 255, 0.15); display: flex; align-items: center; justify-content: center; }

.pv-thumbs {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(58px, 1fr));
  gap: 8px;
}
.pv-thumb {
  aspect-ratio: 1 / 1;
  border-radius: 9px;
  overflow: hidden;
  border: 1.5px solid rgba(255, 255, 255, 0.16);
  background: #121214;
  cursor: pointer;
  padding: 5px;
  box-sizing: border-box;
  transition: border-color 0.2s ease, transform 0.15s ease;
}
.pv-thumb img { width: 100%; height: 100%; object-fit: contain; display: block; }
.pv-thumb:hover { border-color: rgba(255, 255, 255, 0.4); }
.pv-thumb.active { border-color: #ffffff; }

/* --- INFO --- */
.pv-info { display: flex; flex-direction: column; min-width: 0; }
.pv-brand {
  font-size: 11px; font-weight: 800; text-transform: uppercase;
  color: #666666; letter-spacing: 1px; margin-bottom: 6px;
}
.pv-title {
  font-family: 'Figtree', sans-serif;
  font-size: 26px; font-weight: 800; color: #ffffff; line-height: 1.2;
  margin-bottom: 16px; word-break: break-word;
}
.pv-price-row { display: flex; align-items: center; gap: 12px; margin-bottom: 22px; }
.pv-price {
  font-family: 'Figtree', sans-serif; font-size: 28px; font-weight: 900;
  color: #ffffff; text-shadow: 0 0 16px rgba(255, 255, 255, 0.3);
}
.pv-batch {
  font-size: 10px; font-weight: 700; color: #525252; text-transform: uppercase;
  letter-spacing: 1.2px; background: rgba(255,255,255,0.05); padding: 5px 10px; border-radius: 6px;
  border: 1px solid rgba(255,255,255,0.08);
}

.pv-section { margin-bottom: 22px; }
.pv-section-label {
  font-size: 11px; font-weight: 800; text-transform: uppercase; color: #888888;
  letter-spacing: 0.8px; margin-bottom: 10px;
}
.pv-style-count { color: #555555; font-weight: 600; text-transform: none; }

/* --- PRZEŁĄCZNIK STYLÓW --- */
.pv-style-switcher { display: flex; flex-wrap: wrap; gap: 8px; }
.pv-style-swatch {
  width: 52px; height: 52px; border-radius: 10px; overflow: hidden;
  border: 2px solid rgba(255, 255, 255, 0.16); background: #121214;
  cursor: pointer; padding: 6px; box-sizing: border-box; transition: border-color 0.2s ease, transform 0.15s ease;
  display: flex; align-items: center; justify-content: center;
}
.pv-style-swatch img { width: 100%; height: 100%; object-fit: contain; display: block; }
.pv-style-swatch:hover { transform: translateY(-2px); border-color: rgba(255,255,255,0.4); }
.pv-style-swatch.active { border-color: #ffffff; }
.pv-style-noimg { font-size: 12px; font-weight: 800; color: #666666; }

/* --- SELEKTOR AGENTA --- */
.pv-agent-selector {
  display: flex; align-items: center; gap: 10px; flex-wrap: wrap;
}
.pv-agent-current {
  display: flex; align-items: center; gap: 10px;
  background: rgba(255, 255, 255, 0.05); border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 12px; padding: 9px 14px;
}
.pv-agent-current-logo {
  width: 26px; height: 26px; border-radius: 7px; object-fit: cover; flex-shrink: 0;
}
.pv-agent-current-name { font-size: 13px; font-weight: 700; color: #ffffff; }

.pv-agent-dropdown-wrap { position: relative; }
.pv-agent-more-btn {
  display: flex; align-items: center; gap: 7px;
  background: rgba(255, 255, 255, 0.03); border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 12px; padding: 9px 14px; color: #aaaaaa; font-size: 12px; font-weight: 700;
  text-transform: uppercase; letter-spacing: 0.4px; cursor: pointer; transition: all 0.2s ease;
}
.pv-agent-more-btn:hover { background: rgba(255,255,255,0.07); color: #ffffff; border-color: rgba(255,255,255,0.2); }

.pv-agent-dropdown {
  position: absolute; top: calc(100% + 8px); left: 0; z-index: 20;
  background: rgba(10, 10, 10, 0.97); border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 12px; padding: 6px; min-width: 200px;
  display: flex; flex-direction: column; gap: 2px;
  opacity: 0; visibility: hidden; transform: translateY(6px);
  transition: opacity 0.18s ease, transform 0.18s ease, visibility 0.18s ease;
  box-shadow: 0 14px 34px rgba(0,0,0,0.6); backdrop-filter: blur(14px);
}
.pv-agent-dropdown.open { opacity: 1; visibility: visible; transform: translateY(0); }
.pv-agent-option {
  display: flex; align-items: center; gap: 10px; width: 100%;
  padding: 9px 10px; border-radius: 8px; background: transparent; border: none;
  color: #cccccc; font-size: 12.5px; font-weight: 600; cursor: pointer; text-align: left;
  transition: background 0.15s ease, color 0.15s ease;
}
.pv-agent-option:hover { background: rgba(255,255,255,0.07); color: #ffffff; }
.pv-agent-option img { width: 22px; height: 22px; border-radius: 6px; object-fit: cover; flex-shrink: 0; }

.pv-multi-agent-note {
  margin-top: 10px; font-size: 11px; color: #555555; line-height: 1.5;
}

/* --- PRZYCISKI AKCJI --- */
.pv-actions-row { display: flex; gap: 10px; margin-bottom: 22px; }
.pv-buy-btn, .pv-register-btn {
  flex: 1; display: flex; align-items: center; justify-content: center; gap: 8px;
  height: 54px; border-radius: 11px; font-size: 13px; font-weight: 700;
  text-transform: uppercase; letter-spacing: 0.5px; cursor: pointer; transition: all 0.2s ease;
}
.pv-buy-btn {
  background: #ffffff; color: #000000; border: 1px solid #ffffff;
}
.pv-buy-btn:hover { background: #e2e2e2; transform: translateY(-1px); }
.pv-register-btn {
  background: rgba(255,255,255,0.04); color: #cccccc; border: 1px solid rgba(255,255,255,0.14);
}
.pv-register-col { flex: 1; display: flex; flex-direction: column; }
.pv-register-btn:hover { background: rgba(255,255,255,0.09); color: #ffffff; border-color: rgba(255,255,255,0.3); }
.pv-register-coupon {
  display: block; text-align: center; font-size: 10.5px; font-weight: 700;
  color: #6b6b6b; text-transform: uppercase; letter-spacing: 0.4px;
  margin-top: 6px; line-height: 1.3;
}

/* --- LINK WEIDIAN + KOPIUJ --- */
.pv-link-copy-row { display: flex; gap: 8px; }
.pv-link-input {
  flex: 1; min-width: 0; height: 42px; padding: 0 14px;
  background: #050505; border: 1px solid rgba(255, 255, 255, 0.1); border-radius: 10px;
  color: #999999; font-size: 12px; font-family: 'Inter', sans-serif;
}
.pv-copy-btn {
  height: 42px; padding: 0 18px; border-radius: 10px; flex-shrink: 0;
  background: rgba(255,255,255,0.07); border: 1px solid rgba(255,255,255,0.14);
  color: #ffffff; font-size: 12px; font-weight: 700; text-transform: uppercase;
  letter-spacing: 0.4px; cursor: pointer; transition: all 0.2s ease;
}
.pv-copy-btn:hover { background: rgba(255,255,255,0.13); }
.pv-copy-btn.copied { background: #ffffff; color: #000000; border-color: #ffffff; }

/* --- QC SECTION --- */
.pv-qc-image {
  width: 100%; max-width: 320px; border-radius: 14px; overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.16); background: #121214;
}
.pv-qc-image img { width: 100%; height: auto; display: block; }

/* === RESPONSYWNOŚĆ MODALA === */
@media screen and (max-width: 800px) {
  .pv-modal-overlay { padding: 0; align-items: flex-end; }
  .pv-modal {
    max-width: 100%;
    max-height: 94vh;
    border-radius: 22px 22px 0 0;
    overflow: hidden;
    display: flex;
    flex-direction: column;
  }
  .pv-modal-close {
    position: absolute;
    top: 14px;
    right: 14px;
    transform: none;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: rgba(22, 22, 22, 0.97);
    border: 1px solid rgba(255, 255, 255, 0.2);
    box-shadow: 0 4px 20px rgba(0,0,0,0.6);
    z-index: 10;
    flex-shrink: 0;
  }
  .pv-modal-close:hover { background: rgba(40, 40, 40, 0.97); }
  .pv-modal-body {
    padding: 60px 22px 22px;
    overflow-y: auto;
    flex: 1;
    -webkit-overflow-scrolling: touch;
    overscroll-behavior: contain;
  }
  .pv-grid { grid-template-columns: 1fr; gap: 22px; }
  .pv-title { font-size: 21px; }
  .pv-actions-row { flex-direction: column; }
  .pv-buy-btn, .pv-register-btn { min-height: 54px; height: auto; padding: 14px 18px; }
}

/* ===========================================================================
   SEKCJA KATEGORII INLINE NA STRONIE GŁÓWNEJ (tryb "Rozwiń listę produktów")
=========================================================================== */
.inline-category-section { margin-top: 0; }
.inline-cat-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
}
@media screen and (max-width: 1100px) { .inline-cat-grid { grid-template-columns: repeat(3, 1fr); } }
@media screen and (max-width: 760px)  { .inline-cat-grid { grid-template-columns: repeat(2, 1fr); } }
@media screen and (max-width: 480px)  { .inline-cat-grid { grid-template-columns: 1fr; } }
.inline-cat-grid .item-card { flex: none; width: 100%; }

/* ===========================================================================
   STRONA WYSZUKIWANIA (search.html) I STRONY KATEGORII (categories/*.html)
=========================================================================== */
.search-page-wrapper, .category-page-wrapper {
  max-width: 1400px; margin: 0 auto; padding: 50px 40px 0 40px; position: relative; z-index: 2;
}
.search-page-header, .category-page-header {
  text-align: center; margin-bottom: 36px;
}
.search-page-header h1, .category-page-header h1 {
  font-size: 40px; font-weight: 900; text-transform: uppercase; letter-spacing: -1.5px;
  color: #ffffff; margin-bottom: 10px; font-family: 'Inter', sans-serif;
}
.category-page-header .category-breadcrumb {
  font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: 1px;
  color: #555555; margin-bottom: 14px;
}
.category-breadcrumb a { color: #888888; transition: color 0.2s ease; }
.category-breadcrumb a:hover { color: #ffffff; }
.search-page-subtitle, .category-page-subtitle {
  color: #666666; font-size: 13px; font-weight: 600; text-transform: uppercase; letter-spacing: 1.5px;
}

.search-bar-page-wrap {
  max-width: 640px; margin: 0 auto 30px auto; position: relative;
}
.search-bar-page-wrap input {
  width: 100%; padding: 17px 20px 17px 50px; background: #0a0a0a;
  border: 1px solid rgba(255,255,255,0.12); border-radius: 14px;
  color: #ffffff; font-size: 15px; font-weight: 500; outline: none;
  transition: border-color 0.2s ease;
}
.search-bar-page-wrap input:focus { border-color: rgba(255,255,255,0.35); }
.search-bar-page-wrap input::placeholder { color: #555555; }
.search-bar-page-icon {
  position: absolute; left: 18px; top: 50%; transform: translateY(-50%);
  width: 17px; height: 17px; color: #555555; pointer-events: none;
}

.filters-bar {
  display: flex; flex-wrap: wrap; gap: 12px; align-items: center; justify-content: center;
  margin-bottom: 30px; padding-bottom: 26px; border-bottom: 1px solid rgba(255,255,255,0.06);
}
.filters-bar select {
  background: #0a0a0a; border: 1px solid rgba(255,255,255,0.12); border-radius: 10px;
  color: #cccccc; font-size: 12.5px; font-weight: 600; padding: 11px 14px; outline: none;
  cursor: pointer; transition: border-color 0.2s ease;
}
.filters-bar select:hover, .filters-bar select:focus { border-color: rgba(255,255,255,0.3); color: #ffffff; }
.filters-results-count {
  font-size: 11.5px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.8px;
  color: #555555; margin-left: auto;
}
@media screen and (max-width: 700px) {
  .filters-bar { justify-content: flex-start; }
  .filters-results-count { margin-left: 0; width: 100%; text-align: left; margin-top: 6px; }
}

.results-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 18px;
  margin-bottom: 50px;
}
.results-grid .item-card { flex: none; width: 100%; }
@media screen and (max-width: 1100px) { .results-grid { grid-template-columns: repeat(3, 1fr); } }
@media screen and (max-width: 760px)  { .results-grid { grid-template-columns: repeat(2, 1fr); } }
@media screen and (max-width: 480px)  { .results-grid { grid-template-columns: 1fr; } }

.load-more-row { display: flex; justify-content: center; margin-bottom: 90px; }
.load-more-btn {
  background: rgba(255,255,255,0.05); border: 1px solid rgba(255,255,255,0.14);
  color: #ffffff; padding: 14px 36px; border-radius: 100px; font-size: 12.5px;
  font-weight: 700; text-transform: uppercase; letter-spacing: 0.8px; cursor: pointer;
  transition: all 0.2s ease;
}
.load-more-btn:hover { background: rgba(255,255,255,0.1); border-color: rgba(255,255,255,0.3); }

/* ===========================================================================
   KAFELKI KATEGORII (search.html, qc-finder.html) — małe, zaokrąglone,
   z emoji na desktopie; na mobile zastępowane prostym <select>.
=========================================================================== */
.qc-cat-tiles, .search-cat-tiles {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: center;
  margin-bottom: 28px;
}
.qc-cat-tile, .search-cat-tile {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 9px 16px;
  border-radius: 100px;
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(255,255,255,0.12);
  color: #cccccc;
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
  transition: background 0.18s ease, border-color 0.18s ease, color 0.18s ease, transform 0.15s cubic-bezier(0.34, 1.56, 0.64, 1);
  white-space: nowrap;
}
.qc-cat-tile:hover, .search-cat-tile:hover { transform: translateY(-2px); background: rgba(255,255,255,0.08); border-color: rgba(255,255,255,0.25); color: #ffffff; }
.qc-cat-tile:active, .search-cat-tile:active { transform: translateY(0) scale(0.96); }
.qc-cat-tile.active, .search-cat-tile.active { background: #ffffff; color: #000000; border-color: #ffffff; animation: tileActivatePulse 0.35s cubic-bezier(0.16, 1, 0.3, 1); }
.qc-cat-emoji, .search-cat-emoji { font-size: 14px; line-height: 1; transition: transform 0.25s cubic-bezier(0.34, 1.56, 0.64, 1); }
.qc-cat-tile:hover .qc-cat-emoji, .search-cat-tile:hover .search-cat-emoji { transform: scale(1.2) rotate(-6deg); }
@keyframes tileActivatePulse { 0% { transform: scale(0.92); } 60% { transform: scale(1.04); } 100% { transform: scale(1); } }

.qc-cat-select-mobile-wrap, .search-cat-select-mobile-wrap { display: none; margin-bottom: 24px; }
.qc-cat-select-mobile-wrap select, .search-cat-select-mobile-wrap select {
  width: 100%; padding: 13px 16px; background: #0a0a0a; border: 1px solid rgba(255,255,255,0.12);
  border-radius: 12px; color: #ffffff; font-size: 13px; font-weight: 600;
}

@media screen and (max-width: 700px) {
  .qc-cat-tiles, .search-cat-tiles { display: none; }
  .qc-cat-select-mobile-wrap, .search-cat-select-mobile-wrap { display: block; }
}
