/**
 * Rental PLP — Rentomojo-matched (Lato, #f7f7f7 bg, app mobile)
 */
:root {
  --rm-red: #e23744;
  --rm-red-dark: #c42f3a;
  --rm-red-soft: #fde8ea;
  --rm-border: #e5e5e5;
  --rm-text: #2b2b2b;
  --rm-text-2: #4a4a4a;
  --rm-muted: #9ca3af;
  --rm-bg: #f7f7f7;
  --rm-card: #ffffff;
  --rm-green: #16a34a;
  --rm-orange: #f59e0b;
}

/* Page canvas */
body.rental-plp {
  background: var(--rm-bg) !important;
  font-family: 'Lato', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif !important;
  color: var(--rm-text);
  margin: 0;
  -webkit-font-smoothing: antialiased;
}

body.rental-plp.rm-filter-open { overflow: hidden; }

/* Location strip — match homepage / Rentomojo */
body.rental-plp .location-bar {
  background: #fff;
  border-bottom: 1px solid var(--rm-border);
  padding: 8px 16px;
  font-size: 0.8125rem;
  color: var(--rm-text-2);
  gap: 8px;
}
body.rental-plp .location-bar-icon { color: var(--rm-red); }
body.rental-plp .location-bar-label strong { color: var(--rm-text); font-weight: 700; }
body.rental-plp .location-bar-detect {
  background: var(--rm-red) !important;
  color: #fff !important;
  border-radius: 6px;
  padding: 5px 12px;
  font-size: 0.75rem;
  font-weight: 700;
}
body.rental-plp .location-bar-change:not(.location-bar-detect) {
  color: var(--rm-red) !important;
  font-weight: 700;
  font-size: 0.75rem;
}

.rm-plp-page {
  min-height: 100vh;
  padding-bottom: calc(72px + env(safe-area-inset-bottom));
  background: var(--rm-bg);
}

/* ── Header ── */
.rm-topbar {
  position: sticky;
  top: 0;
  z-index: 120;
  background: #fff;
  border-bottom: 1px solid var(--rm-border);
  box-shadow: 0 1px 0 rgba(0, 0, 0, 0.04);
}
.rm-topbar-inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 12px 20px;
  display: flex;
  align-items: center;
  gap: 20px;
}
.rm-brand {
  display: flex;
  align-items: center;
  text-decoration: none;
  flex-shrink: 0;
}
.rm-brand img { height: 32px; width: auto; }

.rm-search-form {
  flex: 1;
  max-width: 560px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  gap: 8px;
  border: 1px solid #dcdcdc;
  border-radius: 999px;
  padding: 11px 18px;
  background: #fff;
  transition: border-color 0.15s, box-shadow 0.15s;
}
.rm-search-form:focus-within {
  border-color: #c9c9c9;
  box-shadow: 0 0 0 3px rgba(226, 55, 68, 0.08);
}
.rm-search-form input {
  flex: 1;
  border: none;
  outline: none;
  font-size: 0.9375rem;
  font-family: inherit;
  background: transparent;
  color: var(--rm-text);
}
.rm-search-form input::placeholder { color: #b0b0b0; }
.rm-search-submit {
  border: none;
  background: none;
  padding: 0;
  cursor: pointer;
  color: var(--rm-muted);
  display: flex;
  align-items: center;
}
.rm-search-mobile { display: none; }

.rm-top-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
}
.rm-login-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 10px 20px;
  background: var(--rm-red);
  color: #fff !important;
  border-radius: 999px;
  font-size: 0.8125rem;
  font-weight: 700;
  text-decoration: none;
  white-space: nowrap;
  box-shadow: 0 2px 8px rgba(226, 55, 68, 0.25);
  transition: background 0.15s;
}
.rm-login-btn:hover { background: var(--rm-red-dark); }
.rm-icon-btn {
  width: 42px;
  height: 42px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--rm-border);
  border-radius: 10px;
  color: var(--rm-text);
  text-decoration: none;
  background: #fff;
}

/* ── Shell ── */
.rm-shell {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px 36px;
}

/* Hero — all products landing */
.rm-hero {
  background: linear-gradient(135deg, #fff 0%, #fff8f8 100%);
  border: 1px solid var(--rm-border);
  border-radius: 16px;
  padding: 24px 22px;
  margin-bottom: 18px;
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.04);
}
.rm-hero-title {
  font-size: 1.5rem;
  font-weight: 900;
  margin: 0 0 6px;
  letter-spacing: -0.03em;
  color: var(--rm-text);
}
.rm-hero-sub {
  margin: 0 0 16px;
  font-size: 0.875rem;
  color: var(--rm-muted);
}
.rm-hero-cats {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.rm-hero-cat {
  padding: 8px 16px;
  border-radius: 999px;
  background: var(--rm-red-soft);
  color: var(--rm-red);
  font-size: 0.75rem;
  font-weight: 800;
  text-decoration: none;
  border: 1px solid rgba(226, 55, 68, 0.15);
}
.rm-hero-cat:hover { background: var(--rm-red); color: #fff; }

/* White content panel — Rentomojo main area */
.rm-content-panel {
  background: #fff;
  border: 1px solid var(--rm-border);
  border-radius: 16px;
  padding: 20px 20px 24px;
  box-shadow: 0 1px 6px rgba(0, 0, 0, 0.04);
}

.rm-breadcrumb {
  font-size: 0.75rem;
  color: var(--rm-muted);
  padding: 16px 0 12px;
}
.rm-breadcrumb a { color: var(--rm-muted); text-decoration: none; }
.rm-breadcrumb a:hover { color: var(--rm-red); }
.rm-breadcrumb strong { color: var(--rm-text-2); font-weight: 600; }

/* Category pills */
.rm-cat-pills {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding-bottom: 14px;
  scrollbar-width: none;
  -webkit-overflow-scrolling: touch;
}
.rm-cat-pills::-webkit-scrollbar { display: none; }
.rm-cat-pill {
  flex-shrink: 0;
  padding: 9px 20px;
  border-radius: 999px;
  border: 1px solid var(--rm-border);
  background: #fff;
  font-size: 0.8125rem;
  font-weight: 700;
  color: var(--rm-text);
  text-decoration: none;
  white-space: nowrap;
  transition: all 0.15s;
}
.rm-cat-pill:hover { border-color: #f5a5ad; color: var(--rm-red); }
.rm-cat-pill.is-active {
  background: var(--rm-red);
  border-color: var(--rm-red);
  color: #fff;
  box-shadow: 0 2px 10px rgba(226, 55, 68, 0.3);
}

/* Subcategory icons */
.rm-subcats-wrap {
  position: relative;
  margin-bottom: 22px;
  padding-bottom: 4px;
}
.rm-subcats {
  display: flex;
  gap: 14px;
  overflow-x: auto;
  padding: 2px 0 6px;
  scrollbar-width: none;
  -webkit-overflow-scrolling: touch;
}
.rm-subcats::-webkit-scrollbar { display: none; }
.rm-subcat {
  flex: 0 0 84px;
  text-align: center;
  text-decoration: none;
  color: inherit;
}
.rm-subcat-box {
  width: 76px;
  height: 76px;
  margin: 0 auto 8px;
  border: 1px solid var(--rm-border);
  border-radius: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #fff;
  overflow: hidden;
  transition: border-color 0.15s, background 0.15s, box-shadow 0.15s;
}
.rm-subcat.is-active .rm-subcat-box {
  border: 2px solid var(--rm-red);
  background: var(--rm-red-soft);
  box-shadow: 0 2px 12px rgba(226, 55, 68, 0.12);
}
.rm-subcat-box img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  padding: 8px;
}
.rm-subcat-ph { font-size: 1.75rem; line-height: 1; }
.rm-subcat-label {
  font-size: 0.6875rem;
  font-weight: 700;
  color: var(--rm-text-2);
  line-height: 1.25;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.rm-subcat.is-active .rm-subcat-label { color: var(--rm-red); }

/* Mobile toolbar */
.rm-mobile-toolbar {
  display: none;
  gap: 10px;
  margin-bottom: 12px;
}
.rm-mobile-filter-btn {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 11px 14px;
  border: 1px solid var(--rm-border);
  border-radius: 12px;
  background: #fff;
  font-weight: 700;
  font-size: 0.8125rem;
  font-family: inherit;
  color: var(--rm-text);
  cursor: pointer;
}
.rm-sort-mobile { flex: 1; }
.rm-sort-mobile select {
  width: 100%;
  padding: 11px 14px;
  border: 1px solid var(--rm-border);
  border-radius: 12px;
  font-size: 0.8125rem;
  font-family: inherit;
  font-weight: 600;
  background: #fff;
  color: var(--rm-text);
}

.rm-filter-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.45);
  z-index: 240;
  backdrop-filter: blur(2px);
}

/* Layout */
.rm-layout {
  display: grid;
  grid-template-columns: 220px 1fr;
  gap: 20px;
  align-items: start;
}
.rm-content-panel .rm-layout { gap: 28px; }

/* Filters */
.rm-filters {
  position: sticky;
  top: 88px;
  background: #fafafa;
  border: 1px solid #efefef;
  border-radius: 14px;
  padding: 20px 18px;
}
.rm-filters-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 18px;
}
.rm-filters h3 {
  font-size: 1.125rem;
  font-weight: 900;
  margin: 0;
  color: var(--rm-text);
  letter-spacing: -0.02em;
}
.rm-filters-close {
  display: none;
  width: 36px;
  height: 36px;
  border: none;
  border-radius: 99px;
  background: #f3f4f6;
  font-size: 1.25rem;
  line-height: 1;
  cursor: pointer;
  color: var(--rm-text);
}
.rm-filter-group { margin-bottom: 22px; }
.rm-filter-group h4 {
  font-size: 0.875rem;
  font-weight: 800;
  margin: 0 0 12px;
  color: var(--rm-text);
}
.rm-filter-row { padding: 5px 0; }
.rm-filter-row a {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  text-decoration: none;
  color: inherit;
  font-size: 0.8125rem;
}
.rm-filter-row label {
  display: flex;
  align-items: center;
  gap: 10px;
  cursor: pointer;
  font-weight: 500;
  color: var(--rm-text-2);
}
.rm-filter-row input[type="checkbox"] {
  accent-color: var(--rm-red);
  width: 17px;
  height: 17px;
  border-radius: 4px;
}
.rm-filter-count {
  font-size: 0.75rem;
  color: var(--rm-muted);
  background: #f3f4f6;
  padding: 3px 9px;
  border-radius: 6px;
  min-width: 26px;
  text-align: center;
  font-weight: 600;
}
.rm-cap-pills { display: flex; flex-wrap: wrap; gap: 8px; }
.rm-cap-pill {
  padding: 7px 14px;
  border: 1px solid var(--rm-border);
  border-radius: 8px;
  font-size: 0.75rem;
  font-weight: 700;
  text-decoration: none;
  color: var(--rm-text);
  background: #fff;
}
.rm-cap-pill.is-active {
  border-color: var(--rm-red);
  color: var(--rm-red);
  background: var(--rm-red-soft);
}
.rm-filter-clear {
  display: block;
  text-align: left;
  margin-top: 8px;
  font-size: 0.8125rem;
  color: var(--rm-red);
  font-weight: 700;
  text-decoration: none;
}

/* Grid header */
.rm-grid-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  margin-bottom: 18px;
  flex-wrap: wrap;
  gap: 12px;
}
.rm-grid-title {
  font-size: 1.375rem;
  font-weight: 900;
  margin: 0 0 4px;
  letter-spacing: -0.03em;
  color: var(--rm-text);
}
.rm-grid-count { font-size: 0.8125rem; color: var(--rm-muted); }
.rm-sort select {
  padding: 9px 14px;
  border: 1px solid var(--rm-border);
  border-radius: 999px;
  font-size: 0.8125rem;
  font-family: inherit;
  font-weight: 600;
  background: #fff;
  color: var(--rm-text);
  cursor: pointer;
}

/* Product grid */
.rm-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 18px;
}

.rm-card {
  background: var(--rm-card);
  border: 1px solid var(--rm-border);
  border-radius: 14px;
  overflow: hidden;
  transition: box-shadow 0.2s, transform 0.2s;
  display: flex;
  flex-direction: column;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
}
.rm-card:hover {
  box-shadow: 0 10px 32px rgba(0, 0, 0, 0.09);
  transform: translateY(-3px);
}
.rm-card.is-oos { opacity: 0.72; }

.rm-card-img {
  position: relative;
  aspect-ratio: 1 / 1;
  background: #fafafa;
  display: block;
  text-decoration: none;
  overflow: hidden;
}
.rm-card-img img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  padding: 10px;
  transition: transform 0.25s;
}
.rm-card:hover .rm-card-img img { transform: scale(1.03); }
.rm-card-ph {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 3rem;
  background: linear-gradient(145deg, #f8f8f8, #efefef);
}

.rm-badge {
  position: absolute;
  top: 10px;
  left: 10px;
  padding: 4px 10px;
  border-radius: 5px;
  font-size: 0.625rem;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}
.rm-badge-popular { background: #fef3c7; color: #92400e; }
.rm-badge-new { background: #dcfce7; color: #166534; }

.rm-wish {
  position: absolute;
  top: 10px;
  right: 10px;
  width: 34px;
  height: 34px;
  border-radius: 99px;
  background: rgba(255, 255, 255, 0.95);
  border: 1px solid var(--rm-border);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.9375rem;
  color: #d1d5db;
  pointer-events: none;
}

/* Delivery strip — Rentomojo grey bar */
.rm-delivery-strip {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 8px 12px;
  background: #f5f5f5;
  border-top: 1px solid #efefef;
  border-bottom: 1px solid #efefef;
  font-size: 0.6875rem;
  font-weight: 600;
  color: var(--rm-muted);
}
.rm-delivery-strip svg { flex-shrink: 0; opacity: 0.7; }

.rm-card-body {
  padding: 12px 14px 14px;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
  flex: 1;
}
.rm-card-title {
  flex: 1;
  min-width: 0;
  font-size: 0.875rem;
  font-weight: 800;
  line-height: 1.35;
  color: var(--rm-text);
  text-decoration: none;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.rm-card-title:hover { color: var(--rm-red); }
.rm-card-price-col {
  flex-shrink: 0;
  text-align: right;
}
.rm-price-label {
  display: block;
  font-size: 0.625rem;
  color: var(--rm-muted);
  font-weight: 600;
  text-transform: none;
  letter-spacing: 0;
  margin-bottom: 2px;
}
.rm-price-val {
  font-size: 1.0625rem;
  font-weight: 900;
  color: var(--rm-text);
  line-height: 1.1;
  letter-spacing: -0.02em;
}
.rm-price-unit {
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--rm-text-2);
}

.rm-show-oos {
  display: block;
  width: 100%;
  max-width: 380px;
  margin: 32px auto 0;
  padding: 14px 20px;
  text-align: center;
  border: none;
  border-radius: 10px;
  background: var(--rm-red);
  color: #fff;
  font-weight: 800;
  font-size: 0.875rem;
  cursor: pointer;
  text-decoration: none;
  font-family: inherit;
  box-shadow: 0 4px 16px rgba(226, 55, 68, 0.3);
}

.rm-pagination {
  display: flex;
  justify-content: center;
  gap: 8px;
  margin-top: 32px;
  flex-wrap: wrap;
}
.rm-page {
  padding: 9px 16px;
  border: 1px solid var(--rm-border);
  border-radius: 10px;
  font-size: 0.8125rem;
  font-weight: 700;
  text-decoration: none;
  color: var(--rm-text);
  background: #fff;
}
.rm-page.is-active {
  background: var(--rm-red);
  border-color: var(--rm-red);
  color: #fff;
}

.rm-empty {
  text-align: center;
  padding: 56px 24px;
  background: #fff;
  border-radius: 16px;
  border: 1px solid var(--rm-border);
}

/* Bottom nav spacing on mobile */
body.rental-plp .app-bottom-nav,
body.rental-plp .mbottom-nav {
  box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.08);
  border-top: 1px solid var(--rm-border);
}

/* ── Tablet ── */
@media (max-width: 1024px) {
  .rm-grid { grid-template-columns: repeat(2, 1fr); gap: 14px; }
  .rm-layout { grid-template-columns: 200px 1fr; gap: 16px; }
  .rm-shell { padding: 0 16px 32px; }
}

/* ── Mobile app look ── */
@media (max-width: 767px) {
  body.rental-plp .location-bar {
    padding: 7px 12px;
    font-size: 0.75rem;
  }

  .rm-hero {
    padding: 18px 16px;
    margin-bottom: 12px;
    border-radius: 14px;
  }
  .rm-hero-title { font-size: 1.2rem; }

  .rm-content-panel {
    padding: 14px 12px 16px;
    border-radius: 14px;
    border-left: none;
    border-right: none;
    margin: 0 -12px;
    width: calc(100% + 24px);
  }

  .rm-cat-pills-desktop { display: none; }

  .rm-topbar-inner {
    padding: 10px 12px;
    gap: 10px;
  }
  .rm-search-desktop { display: none; }
  .rm-search-mobile {
    display: flex;
    margin: 0 12px 10px;
    max-width: none;
  }
  .rm-login-txt { font-size: 0.75rem; }
  .rm-login-btn {
    padding: 8px 14px;
    font-size: 0.75rem;
  }
  .rm-brand img { height: 28px; }

  .rm-shell { padding: 0 12px 20px; }
  .rm-breadcrumb { padding: 10px 0 8px; font-size: 0.6875rem; }

  .rm-subcats-wrap {
    margin: 0 -4px 12px;
    padding: 0 4px;
  }
  .rm-subcat { flex: 0 0 72px; }
  .rm-subcat-box { width: 64px; height: 64px; border-radius: 12px; }

  .rm-mobile-toolbar { display: flex; }
  .rm-grid-head .rm-sort { display: none; }

  .rm-layout { grid-template-columns: 1fr; }

  /* Filter bottom sheet */
  .rm-filters {
    display: block;
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    top: auto;
    z-index: 250;
    max-height: 82vh;
    overflow-y: auto;
    border-radius: 20px 20px 0 0;
    padding: 20px 18px calc(24px + env(safe-area-inset-bottom));
    transform: translateY(105%);
    transition: transform 0.32s cubic-bezier(0.32, 0.72, 0, 1);
    box-shadow: 0 -12px 40px rgba(0, 0, 0, 0.15);
  }
  .rm-filters.is-open { transform: translateY(0); }
  .rm-filters-close { display: flex; align-items: center; justify-content: center; }

  .rm-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
  }
  .rm-grid-title { font-size: 1.125rem; }
  .rm-card { border-radius: 12px; }
  .rm-card-img { aspect-ratio: 1 / 1.05; }
  .rm-card-body {
    flex-direction: column;
    align-items: stretch;
    padding: 10px 10px 12px;
    gap: 8px;
  }
  .rm-card-price-col { text-align: left; }
  .rm-card-title { font-size: 0.8125rem; -webkit-line-clamp: 2; }
  .rm-price-val { font-size: 0.9375rem; }
  .rm-delivery-strip { padding: 6px 10px; font-size: 0.625rem; }
}

@media (min-width: 768px) {
  .rm-subcats-wrap { margin-bottom: 8px; }
  .rm-cat-pills-desktop { display: flex; }
}

@media (max-width: 380px) {
  .rm-login-txt { display: none; }
  .rm-login-btn { padding: 8px 12px; }
}
