/* صفحة المنتج — نفس تصميم الرئيسية (متغيرات home.css) */
.rh-product { padding-top: 12px; text-align: start; }

/* المسار */
.rh-crumbs--product ol { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; align-items: center; gap: 4px; }
.rh-crumbs--product li { display: flex; align-items: center; font-size: 13px; color: var(--rh-muted); }
.rh-crumbs--product li[role="presentation"] { display: none; }
.rh-crumbs--product li + li:not(:nth-child(2))::before { content: "/"; margin-inline-end: 6px; color: #c4c8ce; }
.rh-crumbs--product a, .rh-crumbs--product span { color: var(--rh-muted); text-decoration: none; }
.rh-crumbs--product a:hover { color: var(--rh-yellow-dark); }
.rh-crumbs--product li:last-child span { color: var(--rh-dark); font-weight: 700; }

/* الجزء الرئيسي: الصور + البيانات */
.rh-pd { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 28px; background: #fff; border-radius: 16px; padding: 24px; margin-top: 8px; }
.rh-pd__gallery { min-width: 0; }
.rh-pd__gallery .pg-main { border-radius: 14px; background: var(--rh-bg); }
.rh-pd__info { min-width: 0; display: flex; flex-direction: column; gap: 14px; }

.rh-pd__top { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.rh-pd__sale { background: #e53935; color: #fff; font-size: 12px; font-weight: 700; padding: 3px 10px; border-radius: 6px; }
.rh-pd__stock { font-size: 12px; font-weight: 700; padding: 3px 10px; border-radius: 6px; background: var(--rh-bg); color: var(--rh-muted); }
.rh-pd__stock.is-in { background: #e7f6ec; color: #1e8e3e; }
.rh-pd__stock.is-out { background: #fdecea; color: #d93025; }

.rh-pd__title { font-size: 24px; font-weight: 800; color: var(--rh-dark); margin: 0; line-height: 1.5; }
.rh-pd__rating { display: flex; align-items: center; gap: 10px; font-size: 13px; }
.rh-pd__rating a { color: var(--rh-muted); text-decoration: none; }
.rh-pd__rating a:hover { color: var(--rh-yellow-dark); }

.rh-pd__prices { display: flex; align-items: baseline; gap: 12px; flex-wrap: wrap; padding: 14px 0; border-top: 1px solid var(--rh-border); border-bottom: 1px solid var(--rh-border); }
.rh-pd__price { font-size: 30px; font-weight: 900; color: var(--rh-dark); }
.rh-pd__old { font-size: 17px; color: #e53935; text-decoration: line-through; }

.rh-pd__meta { width: 100%; border-collapse: collapse; font-size: 14px; }
.rh-pd__meta th { width: 110px; color: var(--rh-muted); font-weight: 600; padding: 4px 0; text-align: start; }
.rh-pd__meta td { color: var(--rh-dark); font-weight: 700; padding: 4px 0; }

/* الكمية + الإضافة */
.rh-pd__buy { display: flex; gap: 10px; align-items: stretch; }
.rh-pd__qty { display: flex; align-items: center; border: 1px solid var(--rh-border); border-radius: 12px; overflow: hidden; height: 52px; direction: ltr; flex: 0 0 auto; }
.rh-pd__qty button { width: 46px; height: 100%; border: 0; background: var(--rh-bg); font-size: 20px; color: var(--rh-dark); cursor: pointer; }
.rh-pd__qty button:hover { background: var(--rh-border); }
.rh-pd__qty input { width: 56px; height: 100%; border: 0; text-align: center; font-size: 16px; font-weight: 700; outline: none; -moz-appearance: textfield; }
.rh-pd__qty input::-webkit-inner-spin-button { -webkit-appearance: none; }
.rh-pd__add { flex: 1; }
.rh-pd__addbtn { display: flex; align-items: center; justify-content: center; gap: 10px; height: 52px; border-radius: 12px; background: var(--rh-yellow); color: var(--rh-dark) !important; font-size: 16px; font-weight: 800; cursor: pointer; text-decoration: none !important; transition: background .2s; }
.rh-pd__addbtn:hover { background: var(--rh-yellow-dark); }

.rh-pd__total { display: flex; align-items: baseline; gap: 8px; font-size: 14px; color: var(--rh-muted); }
.rh-pd__total b { font-size: 20px; color: #1e8e3e; }

.rh-pd__actions { display: flex; gap: 10px; flex-wrap: wrap; }
.rh-pd__action { display: inline-flex; align-items: center; gap: 8px; height: 42px; padding: 0 16px; border: 1px solid var(--rh-border); border-radius: 10px; color: var(--rh-dark) !important; font-size: 14px; font-weight: 600; cursor: pointer; text-decoration: none !important; transition: border-color .2s, background .2s; }
.rh-pd__action:hover { border-color: var(--rh-yellow); background: #fff7e3; }

.rh-pd__share { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; font-size: 13px; color: var(--rh-muted); }
.rh-pd__share .share-btn { width: 36px; height: 36px; border-radius: 50%; background: var(--rh-bg); color: var(--rh-dark); display: inline-flex; align-items: center; justify-content: center; cursor: pointer; transition: background .2s, color .2s; }
.rh-pd__share .share-btn:hover { background: var(--rh-yellow); }

/* المتغيرات (الأنواع) */
.rh-product .variants-section { border: 1px solid var(--rh-border); border-radius: 12px; padding: 14px; }
.rh-product .variants-section select { height: 44px; border-radius: 10px; border: 1px solid var(--rh-border); padding: 0 10px; max-width: 100% !important; width: 100%; }

/* المميزات */
.rh-pd__features { list-style: none; margin: 18px 0 0; padding: 18px 0; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); background: #fff; border-radius: 16px; }
.rh-pd__features .shop-features__divider { display: none; }
.rh-pd__features .shop-features__item { display: flex; align-items: center; gap: 12px; padding: 0 20px; }
.rh-pd__features .shop-features__item + .shop-features__divider + .shop-features__item { border-inline-start: 1px solid var(--rh-border); }
.rh-pd__features .shop-features__item-title { font-weight: 800; color: var(--rh-dark); font-size: 14px; }
.rh-pd__features .shop-features__item-subtitle { font-size: 12px; color: var(--rh-muted); }

/* التبويبات */
.rh-tabs { background: #fff; border-radius: 16px; margin-top: 18px; overflow: hidden; scroll-margin-top: 140px; }
.rh-tabs__nav { display: flex; gap: 4px; padding: 0 16px; border-bottom: 1px solid var(--rh-border); overflow-x: auto; scrollbar-width: none; }
.rh-tabs__btn { position: relative; border: 0; background: none; padding: 16px 14px; font-size: 15px; font-weight: 700; color: var(--rh-muted); cursor: pointer; white-space: nowrap; }
.rh-tabs__btn.active { color: var(--rh-dark); }
.rh-tabs__btn.active::after { content: ""; position: absolute; left: 10px; right: 10px; bottom: -1px; height: 3px; border-radius: 2px; background: var(--rh-yellow); }
.rh-tabs__count { display: inline-flex; min-width: 22px; height: 22px; padding: 0 6px; border-radius: 11px; background: var(--rh-bg); font-size: 12px; align-items: center; justify-content: center; margin-inline-start: 4px; }
.rh-tabs__pane { display: none; padding: 22px 24px; line-height: 1.9; color: var(--rh-text); }
.rh-tabs__pane.active { display: block; }

/* التقييمات */
.rh-reviews { display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr); gap: 28px; }
.rh-reviews__list { list-style: none; margin: 0; padding: 0; }
.rh-reviews__list .reviews-list__item { border-bottom: 1px solid var(--rh-border); padding: 14px 0; }
.rh-reviews__list .review__body { display: grid; grid-template-columns: 50px 1fr auto; gap: 4px 12px; align-items: center; }
.rh-reviews__list .review__content { grid-column: 2 / -1; color: var(--rh-text); }
.rh-reviews__list .review__author { font-weight: 800; color: var(--rh-dark); }
.rh-reviews__list .review__date { font-size: 12px; color: var(--rh-muted); }
.rh-reviews__form { background: var(--rh-bg); border-radius: 14px; padding: 20px; display: flex; flex-direction: column; gap: 8px; align-self: start; }
.rh-reviews__form h3 { margin: 0 0 6px; font-size: 18px; font-weight: 800; color: var(--rh-dark); }
.rh-reviews__form label { font-size: 13px; font-weight: 700; color: var(--rh-dark); margin: 6px 0 0; }
.rh-reviews__form textarea { width: 100%; border: 1px solid var(--rh-border); border-radius: 10px; padding: 12px; font-size: 14px; resize: vertical; outline: none; background: #fff; }
.rh-reviews__form textarea:focus { border-color: var(--rh-yellow); }
.rh-reviews__form .rh-btn { height: 46px; margin-top: 8px; }
.rh-reviews__stars .r-star { font-size: 26px; cursor: pointer; color: #d5d8dc; }

/* منتجات ذات صلة */
#rhRelated { margin-top: 28px; }

@media (max-width: 991px) {
    .rh-pd { grid-template-columns: 1fr; padding: 16px; gap: 18px; }
    .rh-pd__features { grid-template-columns: repeat(2, minmax(0, 1fr)); row-gap: 16px; }
    .rh-reviews { grid-template-columns: 1fr; }
}
@media (max-width: 575px) {
    .rh-pd__title { font-size: 19px; }
    .rh-pd__price { font-size: 24px; }
    .rh-pd__buy { flex-direction: column; }
    .rh-pd__qty { align-self: flex-start; }
    .rh-tabs__pane { padding: 16px; }
    .rh-pd__features { grid-template-columns: 1fr; }
    .rh-pd__features .shop-features__item { border: 0 !important; }
}
