/* ============================================================
   RankingRowerów – Catalog CSS  v1.0
   ============================================================ */

/* --- Base -------------------------------------------------- */
.rrk-main { max-width: 1280px; margin: 0 auto; padding: 24px 20px; font-family: inherit; }
.rrk-main *, .rrk-main *::before, .rrk-main *::after { box-sizing: border-box; }
.rrk-main a { text-decoration: none; }

/* --- Breadcrumbs ------------------------------------------- */
.rrk-breadcrumbs { margin-bottom: 20px; }
.rrk-breadcrumbs ol {
  display: flex; gap: 6px; list-style: none;
  margin: 0; padding: 0; flex-wrap: wrap;
  font-size: 13px; color: #666;
}
.rrk-breadcrumbs li + li::before { content: '›'; margin-right: 6px; color: #aaa; }
.rrk-breadcrumbs a { color: #2271b1; }
.rrk-breadcrumbs a:hover { text-decoration: underline; }

/* --- Page header ------------------------------------------- */
.rrk-page-header { margin-bottom: 28px; }
.rrk-page-header h1 { font-size: clamp(1.5rem, 3vw, 2.2rem); margin: 0 0 6px; color: #111; }
.rrk-subtitle { color: #555; margin: 0; font-size: 1.05rem; }

/* --- Buttons ----------------------------------------------- */
.rrk-btn {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 9px 20px; border-radius: 6px; border: 2px solid transparent;
  font-size: 14px; font-weight: 600; cursor: pointer;
  text-decoration: none; transition: all .2s ease;
  white-space: nowrap;
}
.rrk-btn-primary  { background: #e84b1d; border-color: #e84b1d; color: #fff !important; }
.rrk-btn-primary:hover { background: #c73d14; border-color: #c73d14; }
.rrk-btn-ghost    { background: transparent; border-color: #ccc; color: #333 !important; }
.rrk-btn-ghost:hover { border-color: #888; }
.rrk-btn-outline  { background: #fff; border-color: #2271b1; color: #2271b1 !important; }
.rrk-btn-outline:hover { background: #2271b1; color: #fff !important; }

/* --- Tags -------------------------------------------------- */
.rrk-tag {
  display: inline-block; font-size: 11px; font-weight: 600;
  padding: 2px 9px; border-radius: 12px; line-height: 1.5;
  background: #e8f0fe; color: #1a56db;
}
.rrk-tag-year     { background: #e8f5e9; color: #2e7d32; }
.rrk-tag-segment  { background: #fff3cd; color: #856404; }
.rrk-tag-material { background: #f3e8ff; color: #6b21a8; }

/* --- Brand pills ------------------------------------------- */
.rrk-brand-pills {
  display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 24px;
}
.rrk-pill {
  padding: 6px 14px; border-radius: 20px; border: 1px solid #ddd;
  background: #f9f9f9; color: #333; font-size: 13px;
  transition: all .2s; cursor: pointer; text-decoration: none;
}
.rrk-pill:hover, .rrk-pill-active {
  background: #2271b1; border-color: #2271b1; color: #fff !important;
}

/* --- Type pills (brand page) ------------------------------- */
.rrk-type-pills { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 20px; }
.rrk-pill-type  { cursor: pointer; }

/* --- Filter bar -------------------------------------------- */
.rrk-filters {
  background: #f5f7fa; border: 1px solid #e0e4ec;
  border-radius: 10px; padding: 20px; margin-bottom: 28px;
}
.rrk-filter-form { display: flex; flex-direction: column; gap: 14px; }
.rrk-filter-row  { display: flex; gap: 14px; flex-wrap: wrap; align-items: flex-end; }
.rrk-filter-group {
  display: flex; flex-direction: column; gap: 4px;
  min-width: 130px; flex: 1;
}
.rrk-filter-group label {
  font-size: 11px; font-weight: 700; color: #555;
  text-transform: uppercase; letter-spacing: .06em;
}
.rrk-filter-group select,
.rrk-filter-group input[type="text"] {
  padding: 8px 10px; border: 1px solid #ccc; border-radius: 6px;
  font-size: 14px; background: #fff; width: 100%;
  transition: border-color .2s;
}
.rrk-filter-group select:focus,
.rrk-filter-group input:focus { border-color: #2271b1; outline: none; }
.rrk-filter-search { flex: 2; }
.rrk-filter-price  { flex: 3; }
.rrk-filter-actions {
  flex-direction: row; gap: 8px; align-items: flex-end;
  min-width: unset; flex: 0 0 auto;
}

/* Price range */
.rrk-range-wrap { display: flex; gap: 8px; align-items: center; }
.rrk-range-wrap input[type="range"] {
  flex: 1; accent-color: #2271b1; cursor: pointer;
}

/* --- Results meta ------------------------------------------ */
.rrk-results-meta { font-size: 13px; color: #666; margin-bottom: 16px; }
.rrk-results-meta strong { color: #111; }

/* --- Grid -------------------------------------------------- */
.rrk-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(230px, 1fr));
  gap: 20px;
}
.rrk-grid-small {
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
}

/* --- Card -------------------------------------------------- */
.rrk-card {
  background: #fff; border: 1px solid #e8e8e8; border-radius: 10px;
  overflow: hidden; display: flex; flex-direction: column;
  transition: box-shadow .2s, transform .2s;
}
.rrk-card:hover {
  box-shadow: 0 8px 32px rgba(0,0,0,.13); transform: translateY(-3px);
}
.rrk-card-img-wrap {
  display: block; aspect-ratio: 4/3; overflow: hidden; background: #f5f5f5;
}
.rrk-card-img-wrap img {
  width: 100%; height: 100%; object-fit: cover;
  transition: transform .35s ease;
}
.rrk-card:hover .rrk-card-img-wrap img { transform: scale(1.05); }
.rrk-card-body { padding: 14px 14px 10px; flex: 1; }
.rrk-card-meta { display: flex; gap: 5px; flex-wrap: wrap; margin-bottom: 7px; }
.rrk-card-title { font-size: 15px; font-weight: 600; margin: 0 0 8px; line-height: 1.35; }
.rrk-card-title a { color: #111; }
.rrk-card-title a:hover { color: #2271b1; }
.rrk-card-price { font-size: 18px; font-weight: 700; color: #e84b1d; margin-bottom: 4px; }
.rrk-card-rating { font-size: 13px; color: #f5a623; margin-top: 4px; }
.rrk-card-cta {
  display: block; text-align: center; padding: 10px 14px;
  background: #f5f7fa; color: #2271b1 !important; font-size: 13px; font-weight: 600;
  border-top: 1px solid #eee; transition: background .2s, color .2s;
}
.rrk-card-cta:hover { background: #2271b1; color: #fff !important; }

/* --- Load more --------------------------------------------- */
.rrk-load-more-wrap { text-align: center; margin: 36px 0 20px; }

/* --- Empty state ------------------------------------------- */
.rrk-empty {
  grid-column: 1 / -1; text-align: center; padding: 60px 20px;
  color: #666; font-size: 15px;
}
.rrk-empty a { color: #2271b1; }

/* ============================================================
   BRAND PAGE
   ============================================================ */
.rrk-brand-header {
  display: flex; gap: 28px; align-items: flex-start;
  margin-bottom: 32px; padding: 28px; background: #f9fafb;
  border: 1px solid #e8e8e8; border-radius: 12px; flex-wrap: wrap;
}
.rrk-brand-logo-wrap {
  flex-shrink: 0; display: flex; align-items: center; justify-content: center;
  width: 160px; height: 100px; background: #fff; border-radius: 8px;
  border: 1px solid #eee; padding: 12px;
}
.rrk-brand-logo { max-width: 100%; max-height: 100%; object-fit: contain; }
.rrk-brand-header-info { flex: 1; min-width: 200px; }
.rrk-brand-header-info h1 { margin: 0 0 8px; font-size: clamp(1.4rem, 2.5vw, 2rem); }
.rrk-brand-header-actions { margin-top: 12px; display: flex; gap: 10px; flex-wrap: wrap; }

.rrk-brand-desc {
  background: #f0f6ff; border-left: 4px solid #2271b1;
  padding: 16px 20px; border-radius: 0 8px 8px 0; margin-bottom: 28px;
  color: #333; line-height: 1.7;
}

/* Other brands grid */
.rrk-other-brands { margin-top: 48px; padding-top: 32px; border-top: 1px solid #eee; }
.rrk-other-brands h2 { font-size: 1.2rem; margin-bottom: 16px; }
.rrk-brand-grid {
  display: flex; gap: 12px; flex-wrap: wrap;
}
.rrk-brand-link {
  display: inline-flex; align-items: center; justify-content: center;
  padding: 8px 14px; border: 1px solid #ddd; border-radius: 6px;
  background: #fff; color: #333; font-size: 13px; font-weight: 600;
  transition: all .2s; min-width: 70px;
}
.rrk-brand-link img { max-height: 32px; max-width: 90px; object-fit: contain; }
.rrk-brand-link:hover { border-color: #2271b1; color: #2271b1; box-shadow: 0 2px 8px rgba(34,113,177,.15); }

/* ============================================================
   BIKE PAGE
   ============================================================ */
.rrk-bike-top {
  display: grid; grid-template-columns: 1fr 1fr;
  gap: 40px; margin-bottom: 40px; align-items: start;
}

/* Gallery */
.rrk-bike-gallery {}
.rrk-bike-img-main {
  width: 100%; border-radius: 12px; display: block;
  box-shadow: 0 4px 20px rgba(0,0,0,.1);
}
.rrk-bike-img-placeholder {
  aspect-ratio: 4/3; background: #f0f0f0; border-radius: 12px;
  display: flex; flex-direction: column; align-items: center;
  justify-content: center; color: #999; gap: 8px;
}
.rrk-bike-img-placeholder span { font-size: 3rem; }
.rrk-source-link {
  display: block; margin-top: 10px; font-size: 13px;
  color: #666; text-align: center;
}
.rrk-source-link:hover { color: #2271b1; }

/* Summary */
.rrk-bike-summary {}
.rrk-bike-tags { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 14px; }
.rrk-bike-article h1 {
  font-size: clamp(1.4rem, 2.5vw, 1.9rem); margin: 0 0 16px; line-height: 1.25;
}

/* Rating */
.rrk-rating-big {
  display: flex; align-items: center; gap: 10px; margin-bottom: 14px; flex-wrap: wrap;
}
.rrk-stars-row { display: flex; gap: 2px; }
.rrk-star { font-size: 22px; color: #ddd; transition: color .2s; }
.rrk-star.filled { color: #f5a623; }
.rrk-rating-num { font-size: 1.4rem; font-weight: 700; color: #111; }
.rrk-rating-label { font-size: 12px; color: #888; }

/* Price */
.rrk-price-big { margin-bottom: 16px; display: flex; align-items: baseline; gap: 6px; }
.rrk-price-amount { font-size: 2.2rem; font-weight: 800; color: #e84b1d; }
.rrk-price-currency { font-size: 1.1rem; color: #e84b1d; font-weight: 600; }

.rrk-bike-lead { color: #444; line-height: 1.75; margin-bottom: 20px; font-size: 15px; }

.rrk-cta-buy { margin-bottom: 24px; padding: 14px 28px; font-size: 15px; width: 100%; justify-content: center; }

/* Quick specs */
.rrk-specs-quick { width: 100%; border-collapse: collapse; margin-top: 16px; }
.rrk-specs-quick th,
.rrk-specs-quick td {
  padding: 9px 12px; border-bottom: 1px solid #eee; text-align: left; font-size: 14px;
}
.rrk-specs-quick th { color: #666; font-weight: 500; width: 42%; }
.rrk-specs-quick td { color: #111; font-weight: 600; }

/* Brand badge */
.rrk-brand-badge {
  margin-top: 20px; padding: 12px; background: #f9f9f9; border-radius: 8px;
  display: inline-flex; align-items: center;
}
.rrk-brand-badge img { max-height: 40px; max-width: 120px; object-fit: contain; }

/* Pros / Cons */
.rrk-pros-cons {
  display: grid; grid-template-columns: 1fr 1fr; gap: 24px;
  background: #f9f9f9; border-radius: 12px; padding: 28px; margin: 32px 0;
}
.rrk-pros h2 { color: #2e7d32; font-size: 1.1rem; margin-top: 0; }
.rrk-cons h2 { color: #c62828; font-size: 1.1rem; margin-top: 0; }
.rrk-pros ul, .rrk-cons ul { margin: 0; padding: 0; list-style: none; }
.rrk-pros li, .rrk-cons li { padding: 6px 0; border-bottom: 1px solid #eee; font-size: 14px; line-height: 1.5; }
.rrk-pros li::before { content: '✓ '; color: #2e7d32; font-weight: 700; }
.rrk-cons li::before { content: '✗ '; color: #c62828; font-weight: 700; }

/* Full specs */
.rrk-full-specs { margin: 32px 0; }
.rrk-full-specs h2 { font-size: 1.3rem; margin-bottom: 16px; }
.rrk-specs-table { width: 100%; border-collapse: collapse; font-size: 14px; }
.rrk-specs-table th,
.rrk-specs-table td { padding: 10px 14px; border-bottom: 1px solid #eee; text-align: left; }
.rrk-specs-table th {
  background: #f5f5f5; width: 35%; font-weight: 500; color: #555;
}
.rrk-specs-table tr:hover td { background: #fafafa; }

/* Alternatives */
.rrk-alternatives {
  background: #fff8e1; border: 1px solid #ffe082;
  border-radius: 10px; padding: 20px; margin: 24px 0;
}
.rrk-alternatives h3 { margin-top: 0; font-size: 1rem; color: #856404; }
.rrk-alternatives p { margin: 0; font-size: 14px; color: #555; }

/* Related */
.rrk-related { margin-top: 48px; padding-top: 32px; border-top: 1px solid #eee; }
.rrk-related h2 { font-size: 1.3rem; margin-bottom: 20px; }

/* ============================================================
   RESPONSIVE
   ============================================================ */
@media (max-width: 900px) {
  .rrk-bike-top { grid-template-columns: 1fr; gap: 24px; }
  .rrk-pros-cons { grid-template-columns: 1fr; }
}

@media (max-width: 640px) {
  .rrk-main { padding: 16px 14px; }
  .rrk-grid { grid-template-columns: repeat(auto-fill, minmax(155px, 1fr)); gap: 12px; }
  .rrk-card-title { font-size: 13px; }
  .rrk-card-price { font-size: 15px; }
  .rrk-brand-header { flex-direction: column; padding: 20px; }
  .rrk-filter-row { flex-direction: column; }
  .rrk-filter-group { min-width: 100%; }
  .rrk-filter-actions { flex-direction: row; }
  .rrk-price-amount { font-size: 1.8rem; }
  .rrk-cta-buy { padding: 12px 20px; font-size: 14px; }
}

@media (max-width: 400px) {
  .rrk-grid { grid-template-columns: 1fr 1fr; }
}
