/* ============================================================
   RoseGolde Products v2.0.0
   البطاقات + صفحة المنتج (أسلوب ووكومرس) + صفحة التصنيف
   ============================================================ */

:root {
  --rgp-line: #eadbd2;
  --rgp-paper: #fffaf7;
  --rgp-ink: #17120f;
  --rgp-muted: #6f5c50;
  --rgp-gold: #b8893b;
  --rgp-gold-dark: #7d551f;
  --rgp-green: #1f9d55;
  --rgp-radius: 12px;
}

/* ============================================================
   شبكة البطاقات
   ============================================================ */
.rgp-products {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 18px;
  direction: rtl;
}

.rgp-products--cols-1 { grid-template-columns: 1fr; }
.rgp-products--cols-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.rgp-products--cols-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }

.rgp-card {
  display: flex;
  flex-direction: column;
  overflow: hidden;
  border: 1px solid var(--rgp-line);
  border-radius: var(--rgp-radius);
  background: #fff;
  box-shadow: 0 12px 28px rgba(52, 35, 24, .06);
  transition: transform .2s ease, box-shadow .2s ease;
}

.rgp-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 18px 36px rgba(52, 35, 24, .12);
}

.rgp-card__media {
  position: relative;
  display: block;
  aspect-ratio: 1 / 1;
  overflow: hidden;
  background: var(--rgp-paper);
}

.rgp-card__media img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
  transition: transform .35s ease;
}

.rgp-card:hover .rgp-card__media img {
  transform: scale(1.05);
}

.rgp-card__placeholder {
  width: 100%;
  height: 100%;
  display: grid;
  place-items: center;
  color: var(--rgp-gold-dark);
  font-weight: 900;
  background: linear-gradient(135deg, #fffaf7, #f4e5dc);
}

.rgp-card__badge {
  position: absolute;
  top: 10px;
  inset-inline-start: 10px;
  padding: 5px 10px;
  border-radius: 999px;
  color: #fff;
  background: var(--rgp-gold-dark);
  font-size: 12px;
  font-weight: 900;
}

.rgp-card__body {
  display: flex;
  flex-direction: column;
  flex: 1;
  padding: 16px;
}

.rgp-card__body h3 {
  margin: 0 0 8px;
  font-size: 18px;
  line-height: 1.4;
}

.rgp-card__body h3 a {
  color: var(--rgp-ink);
  text-decoration: none;
}

.rgp-card__body h3 a:hover {
  color: var(--rgp-gold-dark);
}

.rgp-card__body p {
  margin: 0 0 12px;
  color: var(--rgp-muted);
  line-height: 1.8;
  font-size: 14px;
}

.rgp-card__footer {
  margin-top: auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  flex-wrap: wrap;
}

.rgp-card__price {
  color: var(--rgp-gold-dark);
  font-size: 17px;
  font-weight: 900;
}

.rgp-card__price--ask {
  color: var(--rgp-muted);
  font-size: 13px;
  font-weight: 700;
}

.rgp-card__button {
  display: inline-flex;
  min-height: 38px;
  align-items: center;
  justify-content: center;
  padding: 0 14px;
  border-radius: 8px;
  color: #fff !important;
  background: linear-gradient(135deg, var(--rgp-gold), var(--rgp-gold-dark));
  font-weight: 900;
  font-size: 14px;
  text-decoration: none;
}

.rgp-empty {
  grid-column: 1 / -1;
  padding: 32px;
  border: 1px solid var(--rgp-line);
  border-radius: var(--rgp-radius);
  background: var(--rgp-paper);
  text-align: center;
}

.rgp-empty p {
  margin: 0 0 16px;
  font-size: 17px;
  color: var(--rgp-muted);
}

/* ============================================================
   مسار التنقل
   ============================================================ */
.rgp-breadcrumb {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  margin: 20px 0;
  color: var(--rgp-muted);
  font-size: 14px;
  direction: rtl;
}

.rgp-breadcrumb a {
  color: var(--rgp-gold-dark);
  text-decoration: none;
}

.rgp-breadcrumb a:hover {
  text-decoration: underline;
}

.rgp-breadcrumb__current {
  color: var(--rgp-ink);
  font-weight: 700;
}

/* ============================================================
   صفحة المنتج - التخطيط العلوي (صور | بيانات)
   ============================================================ */
.rgp-single {
  direction: rtl;
}

.rgp-single__top {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr);
  gap: 40px;
  align-items: start;
  margin-bottom: 48px;
}

/* --- عمود الصور --- */
.rgp-single__gallery {
  position: sticky;
  top: 90px;
}

.rgp-gallery-main {
  position: relative;
  border-radius: var(--rgp-radius);
  overflow: hidden;
  border: 1px solid var(--rgp-line);
  background: var(--rgp-paper);
  aspect-ratio: 1 / 1;
}

.rgp-gallery-main img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
}

.rgp-gallery-placeholder {
  width: 100%;
  height: 100%;
  display: grid;
  place-items: center;
  color: var(--rgp-gold-dark);
  font-weight: 900;
  font-size: 22px;
}

.rgp-single__badge {
  position: absolute;
  top: 14px;
  inset-inline-start: 14px;
  padding: 6px 14px;
  border-radius: 999px;
  color: #fff;
  background: var(--rgp-gold-dark);
  font-size: 13px;
  font-weight: 900;
}

.rgp-gallery-thumbs {
  display: flex;
  gap: 10px;
  margin-top: 12px;
  flex-wrap: wrap;
}

.rgp-gallery-thumb {
  width: 76px;
  height: 76px;
  padding: 0;
  border: 2px solid var(--rgp-line);
  border-radius: 8px;
  overflow: hidden;
  cursor: pointer;
  background: none;
  transition: border-color .2s ease;
}

.rgp-gallery-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.rgp-gallery-thumb.is-active,
.rgp-gallery-thumb:hover {
  border-color: var(--rgp-gold);
}

/* --- عمود البيانات --- */
.rgp-single__title {
  margin: 0 0 16px;
  font-size: clamp(24px, 3.4vw, 34px);
  line-height: 1.35;
  color: var(--rgp-ink);
}

.rgp-single__price {
  margin: 0 0 18px;
  padding-bottom: 18px;
  border-bottom: 1px solid var(--rgp-line);
}

.rgp-single__price strong {
  color: var(--rgp-gold-dark);
  font-size: 28px;
  font-weight: 900;
}

.rgp-price-ask {
  display: inline-block;
  padding: 8px 16px;
  border-radius: 8px;
  background: var(--rgp-paper);
  border: 1px dashed var(--rgp-gold);
  color: var(--rgp-gold-dark);
  font-weight: 800;
  font-size: 16px;
}

.rgp-single__excerpt p {
  margin: 0 0 20px;
  color: var(--rgp-muted);
  line-height: 2;
  font-size: 16px;
}

.rgp-single__actions {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 24px;
}

.rgp-btn {
  display: inline-flex;
  min-height: 50px;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 0 26px;
  border-radius: 10px;
  font-weight: 900;
  font-size: 16px;
  text-decoration: none;
  transition: opacity .2s ease, transform .2s ease;
}

.rgp-btn:hover {
  opacity: .92;
  transform: translateY(-2px);
}

.rgp-btn--buy {
  color: #fff !important;
  background: linear-gradient(135deg, var(--rgp-gold), var(--rgp-gold-dark));
}

.rgp-btn--whatsapp {
  color: #fff !important;
  background: var(--rgp-green);
}

.rgp-single__meta {
  list-style: none;
  margin: 0;
  padding: 16px 0 0;
  border-top: 1px solid var(--rgp-line);
}

.rgp-single__meta li {
  margin-bottom: 8px;
  color: var(--rgp-ink);
  font-size: 14px;
  line-height: 1.8;
}

.rgp-single__meta li span {
  color: var(--rgp-muted);
  font-weight: 700;
  margin-inline-end: 4px;
}

.rgp-single__meta li a {
  color: var(--rgp-gold-dark);
  text-decoration: none;
}

.rgp-single__meta li a:hover {
  text-decoration: underline;
}

/* ============================================================
   الوصف الكامل + المنتجات المشابهة
   ============================================================ */
.rgp-section-title {
  position: relative;
  margin: 0 0 22px;
  padding-bottom: 12px;
  font-size: 22px;
  color: var(--rgp-ink);
}

.rgp-section-title::after {
  content: "";
  position: absolute;
  bottom: 0;
  inset-inline-start: 0;
  width: 56px;
  height: 3px;
  border-radius: 3px;
  background: linear-gradient(135deg, var(--rgp-gold), var(--rgp-gold-dark));
}

.rgp-single__description {
  margin-bottom: 48px;
  padding: 28px;
  border: 1px solid var(--rgp-line);
  border-radius: var(--rgp-radius);
  background: #fff;
}

.rgp-single__content {
  color: var(--rgp-ink);
  line-height: 2;
}

.rgp-single__content img {
  max-width: 100%;
  height: auto;
  border-radius: 8px;
}

.rgp-single__related {
  margin-bottom: 48px;
}

/* ============================================================
   صفحة التصنيف / الأرشيف
   ============================================================ */
.rgp-archive-head {
  margin-bottom: 30px;
  direction: rtl;
}

.rgp-archive-title {
  margin: 0 0 10px;
  font-size: clamp(26px, 3.6vw, 38px);
  color: var(--rgp-ink);
}

.rgp-archive-desc {
  color: var(--rgp-muted);
  line-height: 1.9;
  max-width: 720px;
}

.rgp-pagination {
  margin: 34px 0;
  direction: rtl;
}

.rgp-pagination .nav-links {
  display: flex;
  gap: 8px;
  justify-content: center;
  flex-wrap: wrap;
}

.rgp-pagination .page-numbers {
  display: inline-flex;
  min-width: 40px;
  min-height: 40px;
  align-items: center;
  justify-content: center;
  padding: 0 12px;
  border: 1px solid var(--rgp-line);
  border-radius: 8px;
  color: var(--rgp-ink);
  text-decoration: none;
  font-weight: 700;
}

.rgp-pagination .page-numbers.current,
.rgp-pagination .page-numbers:hover {
  color: #fff;
  border-color: var(--rgp-gold-dark);
  background: linear-gradient(135deg, var(--rgp-gold), var(--rgp-gold-dark));
}

/* ============================================================
   الاستجابة للشاشات
   ============================================================ */
@media (max-width: 992px) {
  .rgp-single__top {
    grid-template-columns: 1fr;
    gap: 26px;
  }

  .rgp-single__gallery {
    position: static;
  }
}

@media (max-width: 920px) {
  .rgp-products,
  .rgp-products--cols-3,
  .rgp-products--cols-4 {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 560px) {
  .rgp-products,
  .rgp-products--cols-2,
  .rgp-products--cols-3,
  .rgp-products--cols-4 {
    grid-template-columns: 1fr;
  }

  .rgp-btn {
    width: 100%;
  }

  .rgp-single__description {
    padding: 18px;
  }
}
