/* Madar Electronics marketplace — Phase 1 shop UI (Build: shop1) */
.rt-shop-hero {
  padding: calc(var(--header-h, 70px) + 28px) 0 18px;
  background:
    radial-gradient(ellipse 70% 55% at 50% 0%, rgba(59, 130, 246, 0.1), transparent 58%),
    #f5f7fb;
  border-bottom: 1px solid rgba(15, 23, 42, 0.08);
  text-align: center;
}

.rt-shop-hero h1 {
  margin: 0 0 8px;
  font-size: clamp(1.6rem, 3.4vw, 2.2rem);
  letter-spacing: -0.03em;
  color: #0f172a;
}

.rt-shop-hero p {
  margin: 0 auto;
  max-width: 40rem;
  color: #475569;
  font-weight: 500;
}

.rt-line-switch {
  display: inline-flex;
  gap: 8px;
  margin-top: 16px;
  flex-wrap: wrap;
  justify-content: center;
}

.rt-line-switch a {
  display: inline-flex;
  align-items: center;
  padding: 8px 14px;
  border-radius: 999px;
  border: 1px solid rgba(15, 23, 42, 0.12);
  background: #fff;
  color: #0f172a;
  text-decoration: none;
  font-size: 0.85rem;
  font-weight: 650;
}

.rt-line-switch a.is-active {
  background: var(--rt-brand-dark, #101b2e);
  border-color: var(--rt-brand-dark, #101b2e);
  color: #fff;
}

.rt-shop-section {
  padding: 28px 0 64px;
}

.rt-shop-toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 12px 18px;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 16px;
}

.rt-shop-toolbar .rt-meta {
  color: #64748b;
  font-size: 0.9rem;
  font-weight: 600;
}

.rt-filters {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 10px;
  margin-bottom: 18px;
}

.rt-filter {
  display: flex;
  flex-direction: column;
  gap: 6px;
  font-size: 0.75rem;
  font-weight: 650;
  color: #64748b;
  letter-spacing: 0.02em;
  text-transform: uppercase;
}

.rt-filter input,
.rt-filter select {
  appearance: none;
  border: 1px solid rgba(15, 23, 42, 0.12);
  background: #fff;
  border-radius: 12px;
  padding: 10px 12px;
  font: inherit;
  font-size: 0.92rem;
  font-weight: 550;
  color: #0f172a;
  text-transform: none;
  letter-spacing: 0;
}

.rt-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
}

.rt-card {
  background: #fff;
  border: 1px solid rgba(15, 23, 42, 0.1);
  border-radius: 16px;
  overflow: hidden;
  box-shadow: 0 8px 24px rgba(15, 23, 42, 0.05);
  display: flex;
  flex-direction: column;
  transition: transform 0.25s ease, box-shadow 0.25s ease, border-color 0.25s ease;
}

.rt-card:hover {
  transform: translateY(-2px);
  border-color: rgba(37, 99, 235, 0.28);
  box-shadow: 0 14px 34px rgba(15, 23, 42, 0.08);
}

.rt-card-media {
  position: relative;
  display: block;
  aspect-ratio: 4 / 3;
  background: #eef2f7;
  overflow: hidden;
}

.rt-card-media img,
.rt-product-gallery img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
}

.rt-line-badge {
  position: absolute;
  left: 0;
  top: 12px;
  z-index: 2;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 7px 12px 7px 10px;
  border-radius: 0 8px 8px 0;
  font-size: 0.62rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  line-height: 1;
  border: 0;
  box-shadow: 4px 8px 18px rgba(47, 41, 36, 0.28);
}
.rt-line-seal {
  flex: 0 0 auto;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  display: inline-block;
}
.rt-line-badge.brand-new {
  display: none;
}
.rt-line-badge.used {
  display: none !important;
}

.rt-card-body {
  padding: 14px 14px 16px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  flex: 1;
}

.rt-card-brand {
  margin: 0;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: #64748b;
}

.rt-card-title {
  margin: 0;
  font-size: 1rem;
  line-height: 1.3;
  letter-spacing: -0.02em;
}

.rt-card-title a {
  color: #0f172a;
  text-decoration: none;
}

.rt-card-meta,
.rt-card-condition,
.rt-price-note {
  margin: 0;
  color: #64748b;
  font-size: 0.86rem;
  font-weight: 500;
}

.rt-price {
  margin-top: 4px;
  font-size: 1.2rem;
  font-weight: 800;
  color: #0f172a;
  letter-spacing: -0.02em;
}

.rt-price-ask {
  color: #1d4ed8;
}

.rt-card-foot {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  margin-top: 4px;
  font-size: 0.8rem;
  font-weight: 650;
}

.rt-stock.in { color: #15803d; }
.rt-stock.low { color: #b45309; }
.rt-stock.out { color: #b91c1c; }
.rt-moq { color: #64748b; }

.rt-card-actions,
.rt-product-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 10px;
}

.rt-pay-strip {
  margin: 14px 0 8px;
  padding: 12px 14px;
  border-radius: 14px;
  background: linear-gradient(135deg, #eff6ff, #ffffff 55%, #f8fafc);
  border: 1px solid rgba(37, 99, 235, 0.16);
}

.rt-pay-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 8px;
}

.rt-pay-badge {
  display: inline-flex;
  align-items: center;
  padding: 5px 10px;
  border-radius: 999px;
  background: #fff;
  border: 1px solid rgba(15, 23, 42, 0.12);
  font-size: 0.75rem;
  font-weight: 750;
  color: #0f172a;
}

.rt-pay-badge.wa {
  background: #ecfdf5;
  border-color: rgba(22, 163, 74, 0.25);
  color: #15803d;
}

.rt-pay-strip p,
.rt-confirm-note {
  margin: 0;
  color: #475569;
  font-size: 0.86rem;
  font-weight: 500;
  line-height: 1.45;
}

.rt-pagination {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: center;
  align-items: center;
  margin-top: 24px;
}

.rt-pagination-card {
  width: fit-content;
  max-width: 100%;
  margin-left: auto;
  margin-right: auto;
  padding: 10px 12px;
  gap: 8px;
  background: #fff;
  border: 1px solid rgba(15, 23, 42, 0.1);
  border-radius: 14px;
  box-shadow: 0 8px 22px rgba(15, 23, 42, 0.05);
}

.rt-page-btn {
  min-width: 38px;
  height: 38px;
  padding: 0 12px;
  border-radius: 10px;
  border: 1px solid rgba(15, 23, 42, 0.12);
  background: #fff;
  color: #0f172a;
  font-weight: 700;
  font-size: 0.82rem;
  cursor: pointer;
}

.rt-page-btn.rt-page-nav {
  min-width: 72px;
}

.rt-page-btn.is-active {
  background: var(--rt-brand-dark, #101b2e);
  border-color: var(--rt-brand-dark, #101b2e);
  color: #fff;
}

.rt-page-btn.is-disabled,
.rt-page-btn:disabled {
  opacity: 0.4;
  cursor: not-allowed;
  pointer-events: none;
}

.rt-page-status {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 38px;
  padding: 0 14px;
  border-radius: 10px;
  background: #f1f5f9;
  color: #334155;
  font-size: 0.84rem;
  font-weight: 650;
  white-space: nowrap;
}

.rt-page-status strong {
  margin: 0 4px;
  color: #0b1220;
  font-weight: 800;
}

@media (max-width: 560px) {
  .rt-pagination-card {
    width: 100%;
    justify-content: space-between;
    padding: 8px;
    gap: 6px;
  }
  .rt-page-btn.rt-page-nav {
    min-width: 0;
    flex: 1 1 auto;
    padding: 0 8px;
    font-size: 0.75rem;
  }
  .rt-page-status {
    order: -1;
    flex: 1 1 100%;
    margin-bottom: 2px;
  }
}

/* —— Same-page Show more (replaces First/Prev/Next/Last) —— */
.rt-showmore {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  width: min(420px, 100%);
  margin: 28px auto 8px;
  padding: 0 12px;
  text-align: center;
}
.rt-showmore-status {
  margin: 0;
  font-size: 0.92rem;
  font-weight: 600;
  color: #334155;
  letter-spacing: -0.01em;
}
.rt-showmore-status strong {
  color: #0b1220;
  font-weight: 800;
}
.rt-showmore-track {
  width: 100%;
  height: 3px;
  border-radius: 999px;
  background: #e2e8f0;
  overflow: hidden;
}
.rt-showmore-fill {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: var(--rt-brand-dark, #101b2e);
  transition: width 0.28s ease;
}
.rt-showmore-btn {
  appearance: none;
  margin-top: 4px;
  min-width: 168px;
  min-height: 46px;
  padding: 0 28px;
  border: 0;
  border-radius: 12px;
  background: var(--rt-brand-dark);
  color: #fff;
  font-family: "Plus Jakarta Sans", Manrope, system-ui, sans-serif;
  font-size: 0.95rem;
  font-weight: 750;
  letter-spacing: -0.01em;
  cursor: pointer;
  transition: background 0.18s ease, transform 0.18s ease;
}
.rt-showmore-btn:hover {
  background: var(--rt-brand-dark-hover);
  transform: translateY(-1px);
}
.rt-showmore-btn:focus-visible {
  outline: 2px solid #2563eb;
  outline-offset: 3px;
}
.rt-showmore-done {
  margin: 2px 0 0;
  font-size: 0.84rem;
  font-weight: 600;
  color: #64748b;
}

.rt-empty {
  grid-column: 1 / -1;
  padding: 28px;
  text-align: center;
  color: #64748b;
  background: #fff;
  border: 1px dashed rgba(15, 23, 42, 0.15);
  border-radius: 14px;
}

.rt-breadcrumbs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  margin-bottom: 18px;
  color: #64748b;
  font-size: 0.86rem;
  font-weight: 550;
}

.rt-breadcrumbs a {
  color: #1d4ed8;
  text-decoration: none;
}

.rt-product-layout {
  display: grid;
  grid-template-columns: 1.05fr 1fr;
  gap: 28px;
  align-items: start;
}

.rt-product-gallery {
  position: relative;
  border-radius: 18px;
  overflow: hidden;
  border: 1px solid rgba(15, 23, 42, 0.1);
  background: #fff;
  aspect-ratio: 4 / 3;
}

.rt-product-info h1 {
  margin: 0 0 8px;
  font-size: clamp(1.4rem, 3vw, 2rem);
  letter-spacing: -0.03em;
  color: #0f172a;
}

.rt-spec-list {
  list-style: none;
  margin: 14px 0;
  padding: 0;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}

.rt-spec-list li {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  padding: 10px 12px;
  border-radius: 12px;
  background: #fff;
  border: 1px solid rgba(15, 23, 42, 0.08);
  font-size: 0.88rem;
}

.rt-spec-list strong { color: #64748b; font-weight: 650; }
.rt-spec-list span { color: #0f172a; font-weight: 700; }

.rt-product-desc {
  color: #475569;
  line-height: 1.55;
  font-weight: 500;
}

.rt-related {
  margin-top: 42px;
}

.rt-related h2 {
  margin: 0 0 14px;
  font-size: 1.25rem;
  letter-spacing: -0.02em;
}

.nav-has-sub {
  position: relative;
}

.nav-sub-toggle {
  border: 0;
  background: transparent;
  color: inherit;
  font: inherit;
  font-weight: 500;
  cursor: pointer;
  padding: 0;
}

.nav-sub {
  display: none;
  position: absolute;
  top: calc(100% + 10px);
  left: 0;
  min-width: 180px;
  margin: 0;
  padding: 8px;
  list-style: none;
  background: #fff;
  border: 1px solid rgba(15, 23, 42, 0.1);
  border-radius: 12px;
  box-shadow: 0 16px 36px rgba(15, 23, 42, 0.12);
  z-index: 40;
}

.nav-has-sub.is-open .nav-sub,
.nav-has-sub:hover .nav-sub {
  display: grid;
  gap: 2px;
}

.nav-sub a {
  display: block;
  padding: 8px 10px;
  border-radius: 8px;
  color: #0f172a;
  text-decoration: none;
  font-size: 0.9rem;
}

.nav-sub a:hover {
  background: #eff6ff;
  color: #1d4ed8;
}

.rt-home-split {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  margin-top: 18px;
}

.rt-home-split a {
  display: block;
  padding: 22px 20px;
  border-radius: 16px;
  background: #fff;
  border: 1px solid rgba(15, 23, 42, 0.1);
  text-decoration: none;
  color: inherit;
  box-shadow: 0 8px 24px rgba(15, 23, 42, 0.05);
}

.rt-home-split strong {
  display: block;
  font-size: 1.15rem;
  margin-bottom: 6px;
  color: #0f172a;
}

.rt-home-split span {
  color: #64748b;
  font-weight: 500;
  font-size: 0.92rem;
}

@media (max-width: 980px) {
  .rt-filters { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .rt-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .rt-product-layout { grid-template-columns: 1fr; }
}

@media (max-width: 640px) {
  .rt-filters { grid-template-columns: 1fr; }
  .rt-grid,
  .rt-home-split { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .rt-spec-list { grid-template-columns: 1fr; }
  .nav-sub {
    position: static;
    display: none;
    box-shadow: none;
    border: 0;
    padding: 0 0 0 8px;
    background: transparent;
  }
  .nav-has-sub.is-open .nav-sub { display: grid; }
}
