/* جسر PHP للمتجر — يكمّل nawras.css دون كسر السلة والصفحات الداخلية */
:root {
  --brand: var(--teal);
  --brand-2: var(--navy);
}

/* توافق أزرار التصميم القديم */
.btn-gold,
.btn-dark-gold { background: var(--grad); color: #fff; border: 0; font-weight: 700; border-radius: 50px; padding-inline: 28px; box-shadow: 0 10px 25px -10px var(--teal); }
.btn-gold:hover,
.btn-dark-gold:hover { color: #fff; transform: translateY(-3px); }
.btn-outline-gold { border: 2px solid var(--teal); color: var(--navy); border-radius: 50px; font-weight: 700; background: transparent; }
.btn-outline-gold:hover { background: var(--teal); color: #fff; }

/* هيدر ثابت للصفحات الداخلية */
.site-header { position: sticky; top: 0; z-index: 1040; }
.page-inner .hero { display: none; }
.page-inner main { padding-top: 12px; min-height: 50vh; }

/* بطاقة المنتج من الـ API */
.p-card .p-img a,
.p-card .p-media a { display: block; height: 100%; }
.p-card .p-media { position: relative; aspect-ratio: 1/1; overflow: hidden; background: #f0f4f7; }
.p-card .p-media img { width: 100%; height: 100%; object-fit: cover; transition: .6s; }
.p-card:hover .p-media img { transform: scale(1.08); }
.p-card .p-tag,
.p-badge { position: absolute; top: 14px; right: 14px; background: #ff4d6d; color: #fff; font-size: .78rem; font-weight: 800; padding: 5px 12px; border-radius: 50px; z-index: 2; }
.p-ship-free {
  display: inline-flex;
  align-items: center;
  gap: .35rem;
  margin-top: .5rem;
  font-size: .78rem;
  font-weight: 800;
  color: #0a6b52;
  background: linear-gradient(135deg, #e7faf2 0%, #d9f4ea 100%);
  border: 1px solid #b7e6d2;
  padding: .28rem .7rem;
  border-radius: 999px;
  letter-spacing: .01em;
}
.p-ship-free i { font-size: .95rem; color: #0d9b72; }
.p-card .p-actions { position: absolute; top: 14px; left: 14px; display: flex; flex-direction: column; gap: 8px; z-index: 2; opacity: 0; transform: translateX(-20px); transition: .35s; }
.p-card:hover .p-actions { opacity: 1; transform: none; }
.p-card .p-actions button,
.p-card .p-actions a {
  width: 40px; height: 40px; border-radius: 50%; border: 0; background: #fff; color: var(--navy);
  box-shadow: 0 4px 12px rgba(0,0,0,.12); display: grid; place-items: center; transition: .2s;
}
.p-card .p-actions button:hover,
.p-card .p-actions a:hover,
.p-card .p-actions button.active { background: var(--teal); color: #fff; }
.p-card .p-add {
  position: absolute; right: 12px; left: 12px; bottom: 12px; z-index: 2;
  border: 0; background: var(--navy); color: #fff; border-radius: 14px; font-weight: 700;
  padding: 10px 12px; opacity: 0; transform: translateY(10px); transition: .3s; text-align: center;
}
.p-card:hover .p-add { opacity: 1; transform: none; }
.p-card .p-add:hover { background: var(--teal); color: #fff; }
.p-card .p-foot { margin-top: auto; padding-top: 10px; }
.p-card .p-add-mobile {
  display: none; width: 100%; border: 0; background: var(--navy); color: #fff;
  border-radius: 12px; font-weight: 700; padding: 10px; text-align: center;
}
.p-card .p-rating { color: #ffb703; font-size: .85rem; margin-bottom: 6px; }
.p-card .p-rating span { color: var(--muted); margin-inline-start: 4px; }
.p-card .p-price { font-weight: 900; font-size: 1.25rem; color: var(--navy); }
.p-card .p-price del { font-size: .9rem; color: #9aa8b6; font-weight: 500; margin-inline-start: 6px; }
.p-card .p-title a { color: inherit; }
@media (max-width: 767.98px) {
  .p-card .p-add { display: none; }
  .p-card .p-add-mobile { display: inline-flex; align-items: center; justify-content: center; gap: 6px; }
  .p-card .p-actions { opacity: 1; transform: none; }
}

/* فلاتر */
.filters .filter-btn,
.filters button.filter-btn {
  border: 0; background: #fff; padding: 10px 22px; border-radius: 50px; font-weight: 700;
  color: var(--navy); transition: .25s; box-shadow: 0 2px 8px rgba(0,0,0,.05);
}
.filters .filter-btn.active,
.filters .filter-btn:hover { background: var(--grad); color: #fff; }

/* سلة ودرج جانبي */
.side-canvas,
.cart-drawer { width: min(400px, 100vw) !important; }
.cart-item {
  display: flex; gap: 12px; padding: 12px 0; border-bottom: 1px solid #eef2f5; align-items: center;
}
.cart-item img { width: 70px; height: 70px; object-fit: cover; border-radius: 12px; }
.cart-item .info { flex: 1; min-width: 0; }
.cart-item .info h6 { font-weight: 700; font-size: .92rem; margin: 0 0 4px; color: var(--navy); }
.cart-item .info small { color: var(--muted); display: block; }
.cart-item .line-price { font-weight: 800; color: var(--navy); font-size: .9rem; }
.cart-item .remove { border: 0; background: transparent; color: #ff4d6d; }
.cart-item .qty { display: inline-flex; align-items: center; border: 1px solid #dfe7ee; border-radius: 50px; }
.cart-item .qty button { border: 0; background: none; width: 30px; height: 30px; }
.cart-item .qty span { min-width: 22px; text-align: center; font-weight: 700; }
.cart-empty { text-align: center; padding: 48px 12px; color: var(--muted); }
.cart-empty i { font-size: 3.5rem; color: #cdd8e2; display: block; margin-bottom: 8px; }
.cart-footer { border-top: 2px solid #eef2f5; padding-top: 16px; }
.cart-footer .coupon { display: flex; gap: 8px; margin-bottom: 12px; }
.sum-row { display: flex; justify-content: space-between; margin: 6px 0; color: var(--muted); }
.sum-row.total { color: var(--navy); font-size: 1.1rem; font-weight: 800; }
.sum-row.discount { color: #0a8f4a; }
.free-ship { background: #e3f8fa; border-radius: 14px; padding: 12px 14px; margin-bottom: 14px; }
.free-ship p { margin: 0 0 8px; font-size: .9rem; font-weight: 600; color: var(--navy); }
.free-ship .bar { height: 8px; background: #fff; border-radius: 8px; overflow: hidden; }
.free-ship .bar span { display: block; height: 100%; background: var(--grad); border-radius: 8px; transition: width .4s; }
.cart-footer-links { display: flex; gap: 8px; margin-top: 10px; flex-wrap: wrap; }

/* توست */
.lafoi-toast-host,
.nawras-toast-host {
  position: fixed; top: 90px; left: 50%; transform: translateX(-50%); z-index: 2000;
  display: flex; flex-direction: column; gap: 8px; width: max-content; max-width: calc(100vw - 24px);
}
.lafoi-toast,
.nawras-toast {
  background: var(--navy); color: #fff; padding: 12px 18px; border-radius: 18px;
  box-shadow: var(--shadow); font-weight: 700; display: flex; gap: 12px; align-items: center;
  animation: toastIn .4s; min-width: 260px;
}
.lafoi-toast-icon,
.nawras-toast-icon { color: var(--teal-2); font-size: 1.2rem; }
.lafoi-toast-media,
.nawras-toast-media { width: 48px; height: 48px; border-radius: 12px; overflow: hidden; background: rgba(255,255,255,.1); display: grid; place-items: center; flex-shrink: 0; }
.lafoi-toast-media img,
.nawras-toast-media img { width: 100%; height: 100%; object-fit: cover; }
.lafoi-toast-copy p,
.nawras-toast-copy p { margin: 0; font-size: .9rem; font-weight: 600; }
.lafoi-toast-x,
.nawras-toast-x { border: 0; background: transparent; color: #fff; opacity: .7; }
.lafoi-toast-cart-btn,
.nawras-toast-cart-btn {
  border: 0; background: var(--teal); color: #fff; border-radius: 50px; padding: 6px 12px; font-weight: 700; font-size: .8rem;
}

/* شريط سفلي للجوال */
.bottom-nav {
  position: fixed; bottom: 0; right: 0; left: 0; z-index: 1030;
  background: rgba(255,255,255,.96); backdrop-filter: blur(12px);
  border-top: 1px solid #e8eef3; display: flex; justify-content: space-around;
  padding: 8px 6px calc(8px + env(safe-area-inset-bottom));
}
.bottom-nav a {
  flex: 1; text-align: center; color: var(--muted); font-size: .72rem; font-weight: 700;
  display: flex; flex-direction: column; align-items: center; gap: 2px; position: relative; padding: 4px;
}
.bottom-nav a i { font-size: 1.25rem; color: var(--navy); }
.bottom-nav a.active,
.bottom-nav a:hover { color: var(--teal); }
.bottom-nav a.active i { color: var(--teal); }
.bottom-nav em {
  position: absolute; top: 0; left: 50%; margin-left: 8px;
  background: #ff4d6d; color: #fff; font-style: normal; font-size: .65rem;
  min-width: 18px; height: 18px; border-radius: 9px; display: grid; place-items: center;
}
@media (min-width: 992px) { .bottom-nav { display: none !important; } }
@media (max-width: 991.98px) {
  body { padding-bottom: 72px; }
  .wa-float, .float-wa { bottom: 84px; }
  .to-top { bottom: 84px; }
}

/* واتساب عائم — توافق اسم الكلاس القديم */
.float-wa {
  position: fixed; bottom: 24px; right: 24px; width: 58px; height: 58px; border-radius: 50%;
  background: #25d366; color: #fff; font-size: 1.8rem; display: grid; place-items: center;
  z-index: 999; box-shadow: 0 10px 25px rgba(37,211,102,.5);
}

/* فوتر أكورديون للجوال */
.footer-grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr 1.2fr; gap: 28px; }
.footer-acc { border: 0; }
.footer-acc summary {
  list-style: none; color: #fff; font-weight: 800; margin-bottom: 12px; cursor: default;
}
.footer-acc summary::-webkit-details-marker { display: none; }
.footer-acc ul { list-style: none; padding: 0; margin: 0; }
.footer-acc a { display: block; color: #9fb3c8; padding: 4px 0; }
.footer-about { max-width: 320px; }
.footer-bottom-row {
  display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap;
}
.footer-dev {
  display: inline-flex !important; align-items: center; gap: 8px; color: #9fb3c8 !important;
  padding: 0 !important; font-size: .85rem;
}
.footer-dev:hover { color: var(--teal-2) !important; padding-inline-start: 0 !important; }
@media (max-width: 991.98px) {
  .footer-grid { grid-template-columns: 1fr; gap: 8px; }
  .footer-acc { border-bottom: 1px solid rgba(255,255,255,.08); padding: 8px 0; }
  .footer-acc summary { cursor: pointer; display: flex; justify-content: space-between; align-items: center; }
  .footer-acc summary::after { content: "+"; font-size: 1.2rem; color: var(--teal-2); }
  .footer-acc[open] summary::after { content: "−"; }
  .footer-acc:not([open]) ul { display: none; }
  .footer-brand { margin-bottom: 12px; }
}

/* صفحة من نحن */
.about-page-hero {
  background: radial-gradient(circle at 20% 20%, #16407a 0, var(--navy) 55%, #061631 100%);
  color: #fff; padding: 48px 0 56px;
}
.about-page-hero .eyebrow { color: var(--teal-2); font-weight: 800; }
.about-page-hero .page-title { font-weight: 900; font-size: clamp(1.8rem, 4vw, 2.6rem); margin: 10px 0; }
.about-page-lead { color: #bcd0e0; max-width: 720px; margin: 0; }
.about-breadcrumb { display: flex; gap: 8px; align-items: center; margin-bottom: 18px; font-size: .9rem; }
.about-breadcrumb a { color: #9fb7cc; }
.about-breadcrumb span { color: #7f98ad; }
.about-img { position: relative; border-radius: 24px; overflow: hidden; }
.about-img img { width: 100%; display: block; border-radius: 24px; }
.about-card {
  position: absolute; bottom: 16px; right: 16px; background: #fff; color: var(--navy);
  border-radius: 16px; padding: 12px 14px; display: flex; gap: 10px; align-items: center;
  box-shadow: var(--shadow);
}
.about-card i { color: var(--teal); font-size: 1.4rem; }
.about-list { list-style: none; padding: 0; margin: 18px 0 0; }
.about-list li { display: flex; gap: 8px; align-items: flex-start; padding: 6px 0; font-weight: 600; }
.about-list i { color: var(--teal); }

/* صفحات داخلية */
.flash { border-radius: 14px; padding: 12px 16px; font-weight: 600; }
.flash.success { background: #e3f8fa; color: var(--navy); }
.flash.error { background: #ffe8ec; color: #b00020; }
.lux-modal { border-radius: 20px; border: 0; }
.search-box { position: relative; }
.search-box i { position: absolute; top: 50%; right: 14px; transform: translateY(-50%); color: var(--muted); }
.search-box input { padding-inline-end: 42px; border-radius: 14px; }

/* أقسام مساعدة */
.marquee-track span { color: #fff; font-weight: 800; font-size: 1.3rem; opacity: .85; white-space: nowrap; }
.contact-form .btn-brand { border-radius: 14px; }
.page-inner .section,
.page-inner .py-section { padding-top: 40px; }

/* مستكشف الأقسام */
.shop-explorer {
  background: #fff; border: 1px solid #e8eef3; border-radius: 22px;
  padding: 16px 18px 14px; margin-bottom: 22px;
  box-shadow: 0 14px 34px -28px rgba(11,37,69,.28);
}
.shop-explorer-head {
  display: flex; justify-content: space-between; align-items: center; gap: 12px;
  flex-wrap: wrap; margin-bottom: 12px; direction: rtl;
}
.shop-explorer-head strong { color: var(--navy); font-size: 1.05rem; font-weight: 900; }
.shop-explorer-head .sort-select,
.shop-explorer-head #sortSelect,
select.sort-select,
select#sortSelect.sort {
  direction: rtl;
  text-align: right;
  text-align-last: right;
  unicode-bidi: isolate;
  min-width: 200px;
  border-radius: 50px;
  font-weight: 700;
  color: var(--navy);
  border-color: #dfe7ee;
  background-color: #fff;
  padding: .55rem 1rem .55rem 2.4rem;
  background-position: left .9rem center;
  background-repeat: no-repeat;
  appearance: none;
  -webkit-appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath fill='%230b2545' d='M1.4.6 6 5.2 10.6.6 12 2 6 8 0 2z'/%3E%3C/svg%3E");
}
.shop-explorer-head .sort-select:focus,
select#sortSelect.sort:focus {
  border-color: var(--teal);
  box-shadow: 0 0 0 .2rem rgba(10,165,181,.15);
}
.shop-explorer .filters { margin-bottom: 0; }
.shop-explorer .cat-level { margin-bottom: 10px; }
.shop-explorer .subcat-level {
  padding-top: 10px; border-top: 1px dashed #e5edf3; margin-top: 4px;
}
.shop-explorer .filter-btn em {
  font-style: normal; font-size: .75rem; opacity: .75; margin-inline-start: 4px;
}
.shop-explorer .filter-btn.sub { background: #f3f7fa; }
.shop-explorer .filter-btn.has-kids::after {
  content: ""; display: inline-block; width: 0; height: 0; margin-inline-start: 6px;
  border-inline-start: 4px solid transparent; border-inline-end: 4px solid transparent;
  border-top: 5px solid currentColor; opacity: .55; vertical-align: middle;
}
.shop-crumb {
  display: flex; align-items: center; gap: 10px; flex-wrap: wrap;
  margin-top: 10px; color: var(--muted); font-size: .9rem; font-weight: 700;
}
.shop-crumb-back {
  border: 0; background: #e3f8fa; color: var(--navy); border-radius: 999px;
  padding: 6px 12px; font-weight: 800; display: inline-flex; align-items: center; gap: 6px;
}
.shop-crumb-back:hover { background: var(--teal); color: #fff; }
.cat-card .cat-count {
  display: block; color: #9fb7cc; font-size: .82rem; font-weight: 600; margin: 2px 0 6px;
}
.s-card .p-badge {
  position: absolute; top: 14px; right: 14px; z-index: 2;
  background: #ff4d6d; color: #fff; font-size: .78rem; font-weight: 800;
  padding: 5px 12px; border-radius: 50px;
}
.s-media { position: relative; }

/* ========== صفحة المنتج ========== */
.pd-page { padding: 1.4rem 0 3rem; background: linear-gradient(180deg, #f7fafc 0%, #fff 42%); }
.pd-crumbs { display: flex; flex-wrap: wrap; gap: .4rem; align-items: center; font-size: .85rem; color: var(--muted); margin-bottom: 1.1rem; }
.pd-crumbs a { color: var(--teal); text-decoration: none; font-weight: 700; }
.pd-crumbs a:hover { color: var(--navy); }
.pd-layout { display: grid; grid-template-columns: minmax(0,1.05fr) minmax(0,.95fr); gap: 2rem; align-items: start; }
.pd-gallery { position: sticky; top: 96px; }
.pd-main-img {
  position: relative; background: #fff; border-radius: 24px; overflow: hidden;
  border: 1px solid #e8eef3; box-shadow: 0 18px 40px -28px rgba(11,37,69,.35);
}
.pd-main-img img, .pd-main-img .pd-main-video {
  width: 100%; aspect-ratio: 1; object-fit: contain; display: block; background: #f5f8fb; padding: 18px;
}
.pd-badge {
  position: absolute; top: 14px; right: 14px; z-index: 3;
  background: var(--grad); color: #fff; font-size: .78rem; font-weight: 800;
  padding: .3rem .75rem; border-radius: 999px;
}
.pd-badge-ship {
  top: auto; bottom: 14px; right: 14px; left: auto;
  display: inline-flex; align-items: center; gap: .35rem;
  background: linear-gradient(135deg, #0d9b72, #0a7a5c);
  box-shadow: 0 10px 22px -12px rgba(10,122,92,.65);
}
.pd-free-ship {
  display: flex; align-items: center; gap: .75rem;
  margin: 0 0 1rem;
  padding: .85rem 1rem;
  border-radius: 16px;
  background: linear-gradient(135deg, #e8faf3 0%, #f3fcf8 55%, #fff 100%);
  border: 1px solid #c6ebd9;
}
.pd-free-ship-icon {
  width: 42px; height: 42px; border-radius: 14px; flex: 0 0 auto;
  display: grid; place-items: center;
  background: linear-gradient(135deg, #0d9b72, #0a7a5c);
  color: #fff; font-size: 1.15rem;
  box-shadow: 0 8px 18px -10px rgba(10,122,92,.7);
}
.pd-free-ship strong { display: block; color: #0a6b52; font-size: .95rem; margin-bottom: .1rem; }
.pd-free-ship span { color: #4d6a60; font-size: .82rem; font-weight: 600; }
.checkout-item-free-ship {
  display: inline-flex; align-items: center; gap: .3rem;
  margin-top: .25rem; color: #0a7a5c; font-weight: 700;
}
.pd-thumbs { display: flex; gap: .55rem; margin-top: .8rem; overflow-x: auto; padding-bottom: 4px; }
.pd-thumb {
  position: relative; flex: 0 0 72px; width: 72px; height: 72px; padding: 0;
  border-radius: 14px; border: 2px solid #e8eef3; background: #fff; overflow: hidden;
}
.pd-thumb img { width: 100%; height: 100%; object-fit: cover; }
.pd-thumb.active { border-color: var(--teal); box-shadow: 0 0 0 3px rgba(10,165,181,.18); }
.pd-thumb-play {
  position: absolute; inset: 0; display: grid; place-items: center;
  background: rgba(6,22,49,.45); color: #fff; font-size: 1.3rem;
}
.pd-info {
  background: #fff; border: 1px solid #e8eef3; border-radius: 24px;
  padding: 1.45rem 1.5rem; box-shadow: 0 18px 40px -28px rgba(11,37,69,.3);
}
.pd-cat {
  display: inline-block; font-size: .78rem; font-weight: 800; color: var(--teal);
  background: #e3f8fa; padding: .3rem .75rem; border-radius: 999px; margin-bottom: .7rem;
}
.pd-title { font-weight: 900; color: var(--navy); font-size: clamp(1.35rem,2.5vw,1.9rem); margin: 0 0 .4rem; line-height: 1.35; }
.pd-unit { color: var(--muted); margin-bottom: .85rem; font-weight: 600; }
.pd-price-row { display: flex; justify-content: space-between; align-items: center; gap: 1rem; margin-bottom: 1rem; flex-wrap: wrap; }
.pd-price span { color: var(--navy); font-weight: 900; font-size: 1.85rem; }
.pd-price del { color: #9aa8b6; font-size: 1rem; margin-inline-start: .45rem; font-weight: 600; }
.pd-stock { font-size: .8rem; font-weight: 800; padding: .32rem .75rem; border-radius: 999px; }
.pd-stock.is-in { background: #e8f8ef; color: #0f7a3d; }
.pd-stock.is-out { background: #fdeeee; color: #8a1f16; }
.pd-lead { color: #445566; line-height: 1.8; margin: 0 0 1.1rem; }
.pd-options.is-hidden { display: none; }
.pd-opt-title, .pd-label { font-size: .9rem; font-weight: 800; color: var(--navy); margin-bottom: .55rem; }
.pd-size-list, .pd-color-list, .pd-variant-list { display: flex; flex-wrap: wrap; gap: .55rem; margin-bottom: .95rem; }
.pd-size-btn, .pd-color-btn, .pd-variant {
  border: 1px solid #dfe7ee; border-radius: 14px; background: #fff; padding: .45rem .9rem; cursor: pointer; font-weight: 700; color: var(--navy);
}
.pd-size-btn.active, .pd-color-btn.active, .pd-variant.active {
  border-color: var(--teal); background: #e3f8fa; box-shadow: 0 0 0 2px rgba(10,165,181,.15);
}
.pd-buy-row { display: flex; gap: .65rem; align-items: stretch; }
.pd-qty { display: inline-flex; align-items: center; border: 1px solid #dfe7ee; border-radius: 14px; overflow: hidden; background: #fff; }
.pd-qty button { width: 44px; height: 50px; border: 0; background: var(--soft); font-size: 1.2rem; font-weight: 900; color: var(--navy); }
.pd-qty input { width: 52px; height: 50px; border: 0; text-align: center; font-weight: 800; color: var(--navy); }
.pd-add { flex: 1; min-height: 50px; border-radius: 14px !important; display: inline-flex; align-items: center; justify-content: center; gap: .45rem; }
.pd-add.is-busy { opacity: .7; }
.pd-wa {
  display: flex; align-items: center; justify-content: center; gap: .45rem; margin-top: .7rem; min-height: 48px;
  border-radius: 14px; border: 1px solid #25d366; color: #128c7e; text-decoration: none; font-weight: 800; background: #f3fff7;
}
.pd-wa:hover { background: #25d366; color: #fff; }
.pd-perks { display: grid; grid-template-columns: repeat(3,1fr); gap: .55rem; margin: 1.1rem 0; }
.pd-perk {
  display: flex; flex-direction: column; align-items: center; gap: .3rem; text-align: center;
  background: var(--soft); border: 1px solid #e8eef3; border-radius: 14px; padding: .8rem .4rem;
  font-size: .78rem; font-weight: 700; color: var(--navy);
}
.pd-perk i { color: var(--teal); font-size: 1.2rem; }
.pd-meta { display: flex; flex-wrap: wrap; gap: .85rem; color: var(--muted); font-size: .86rem; }
.pd-meta b { color: var(--navy); }
.pd-details {
  margin-top: 1.85rem; padding: 1.4rem 1.5rem; background: #fff; border-radius: 22px;
  border: 1px solid #e8eef3; box-shadow: 0 14px 34px -28px rgba(11,37,69,.28);
}
.pd-details-title { font-size: 1.2rem; font-weight: 900; color: var(--navy); margin: 0 0 .9rem; }
.pd-details .product-specs table { width: 100%; border-collapse: collapse; }
.pd-details .product-specs th,
.pd-details .product-specs td { text-align: right; padding: 10px 12px; border-bottom: 1px solid #eef3f7; vertical-align: top; }
.pd-details .product-specs th { width: 34%; color: var(--navy); font-weight: 800; background: var(--soft); }
.pd-details .product-specs tr:nth-child(even) td { background: #fafcfd; }
.pd-related { padding: 2.2rem 0 2.8rem; background: var(--soft); }
.pd-related .section-head { margin-bottom: 1.4rem; }
.pd-sticky-buy {
  position: fixed; inset-inline: 0;
  bottom: calc(64px + env(safe-area-inset-bottom, 0px));
  z-index: 1028; display: none;
  align-items: center; gap: .55rem; padding: .7rem .9rem;
  background: rgba(255,255,255,.96); border-top: 1px solid #e8eef3; backdrop-filter: blur(12px);
  box-shadow: 0 -10px 30px rgba(11,37,69,.08);
}
.pd-sticky-price small { display: block; font-size: .68rem; color: var(--muted); }
.pd-sticky-price strong { color: var(--navy); font-size: 1.05rem; }
.pd-sticky-qty { display: inline-flex; align-items: center; border: 1px solid #dfe7ee; border-radius: 12px; overflow: hidden; background: #fff; }
.pd-sticky-qty button { width: 34px; height: 40px; border: 0; background: var(--soft); font-weight: 900; color: var(--navy); }
.pd-sticky-qty span { min-width: 28px; text-align: center; font-weight: 800; }
.page-title { font-weight: 900; color: var(--navy); }

/* ========== السلة والدفع ========== */
.cart-page, .checkout-page { position: relative; padding-bottom: 2.5rem; background: linear-gradient(180deg, #f7fafc 0%, #fff 40%); }
.checkout-page .container { max-width: 1140px; }
.cart-layout, .checkout-layout {
  display: grid; grid-template-columns: minmax(0,1fr) minmax(280px,360px); gap: 1.35rem; align-items: start;
}
.cart-lines { min-width: 0; }
.cart-line {
  display: grid; grid-template-columns: 88px minmax(0,1fr) auto; gap: 1rem; align-items: start;
  background: #fff; border: 1px solid #e8eef3; border-radius: 18px; padding: 1rem; margin-bottom: .85rem;
  box-shadow: 0 12px 28px -24px rgba(11,37,69,.3);
}
.cart-line-img img { width: 88px; height: 88px; object-fit: cover; border-radius: 14px; background: var(--soft); }
.cart-line-name { font-weight: 800; color: var(--navy); text-decoration: none; }
.cart-line-name:hover { color: var(--teal); }
.cart-line-variant { color: var(--muted); font-size: .85rem; margin: .2rem 0; }
.cart-line-price { font-weight: 800; color: var(--navy); margin-top: .25rem; }
.cart-line-actions { display: flex; flex-wrap: wrap; align-items: center; gap: .75rem; margin-top: .65rem; }
.cart-line-total { font-weight: 900; min-width: 5.5rem; color: var(--navy); }
.cart-qty-ctrl.pd-qty { display: inline-flex; align-items: center; border: 1px solid #dfe7ee; border-radius: 12px; overflow: hidden; background: #fff; }
.cart-qty-ctrl button { border: 0; background: var(--soft); width: 34px; height: 34px; font-weight: 800; }
.cart-qty-ctrl .cart-qty-val { min-width: 36px; text-align: center; font-weight: 800; }
.sheeb-empty-card { background: #fff; border: 1px solid #e8eef3; border-radius: 22px; box-shadow: 0 12px 28px -24px rgba(11,37,69,.28); }
.cart-empty-actions { display: flex; flex-wrap: wrap; gap: .65rem; justify-content: center; margin-top: .5rem; }
.cart-page-actions {
  display: none; position: fixed; left: 0; right: 0;
  bottom: calc(64px + env(safe-area-inset-bottom, 0px));
  z-index: 1028; gap: .55rem; padding: .75rem 1rem;
  background: rgba(255,255,255,.97); backdrop-filter: blur(10px);
  border-top: 1px solid #e8eef3; box-shadow: 0 -8px 24px rgba(11,37,69,.08);
}
.cart-page-actions .btn { flex: 1 1 0; min-height: 48px; font-weight: 800; }
.summary-card {
  background: #fff; border: 1px solid #e8eef3; border-radius: 20px; padding: 1.25rem 1.35rem;
  position: sticky; top: 104px; align-self: start; box-shadow: 0 14px 34px -28px rgba(11,37,69,.3);
}
.checkout-page .summary-card { position: static; }
.summary-card h3 { font-size: 1.15rem; font-weight: 900; margin: 0 0 1rem; color: var(--navy); }
.summary-line {
  display: flex; justify-content: space-between; gap: 1rem; align-items: flex-start;
  padding: .55rem 0; border-bottom: 1px solid #eef3f7; font-size: .95rem; color: #445;
}
.summary-line.total { border: 0; font-weight: 900; font-size: 1.1rem; padding-top: .85rem; color: var(--navy); }
.summary-line.total span:last-child { color: var(--teal); }
.coupon-row { display: flex; gap: .5rem; margin: 1rem 0; }
.coupon-row input {
  flex: 1; border: 1.5px solid #dfe7ee; border-radius: 14px; padding: .7rem .9rem; background: #fff; min-width: 0;
}
.coupon-row input:focus { outline: 0; border-color: var(--teal); box-shadow: 0 0 0 4px rgba(10,165,181,.15); }
.checkout-panel {
  background: #fff; border: 1px solid #e8eef3; border-radius: 20px; padding: 1.35rem 1.4rem 1.5rem;
  box-shadow: 0 14px 34px -28px rgba(11,37,69,.28); min-width: 0;
}
.checkout-panel > h2:first-child { margin-top: 0; }
.checkout-section { margin-top: 1.6rem; }
.checkout-page .page-title { font-size: clamp(1.55rem, 2.5vw, 2rem); font-weight: 900; }
.checkout-page h2 { font-size: 1.12rem; font-weight: 900; margin: 0 0 .85rem; color: var(--navy); }
.checkout-note {
  display: block; background: #e3f8fa; color: var(--navy); border: 1px solid rgba(10,165,181,.25);
  border-radius: 14px; padding: .75rem .9rem; margin: 0 0 1rem; font-size: .88rem; line-height: 1.55;
}
.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: 1rem; width: 100%; }
.form-grid .field.full { grid-column: 1 / -1; }
.field { display: flex; flex-direction: column; gap: .45rem; min-width: 0; width: 100%; }
.field label { font-size: .9rem; font-weight: 800; color: var(--navy); margin: 0; }
.field input, .field select, .field textarea {
  display: block; width: 100%; max-width: 100%; box-sizing: border-box;
  border: 1.5px solid #dfe7ee; border-radius: 14px; padding: .8rem 1rem; background: #fff; color: var(--navy); font: inherit;
}
.field select {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath fill='%236b7a8c' d='M1.4.6 6 5.2 10.6.6 12 2 6 8 0 2z'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: left 1rem center; padding-left: 2.4rem; appearance: none;
}
.field textarea { min-height: 110px; resize: vertical; }
.field input:focus, .field select:focus, .field textarea:focus {
  outline: 0; border-color: var(--teal); box-shadow: 0 0 0 4px rgba(10,165,181,.15);
}
.field-hint { display: block; color: var(--muted); font-size: .82rem; margin: .15rem 0 0; line-height: 1.45; }
.checkout-fulfillment, .payment-options { display: grid; gap: .65rem; }
.checkout-fulfillment label, .payment-options label {
  display: flex; gap: .75rem; align-items: flex-start; border: 1.5px solid #dfe7ee; border-radius: 16px;
  padding: 1rem 1.05rem; margin: 0; background: #fff; cursor: pointer;
}
.checkout-fulfillment label input, .payment-options label input {
  width: 1.1rem; height: 1.1rem; margin-top: .2rem; flex: 0 0 auto; accent-color: var(--teal);
}
.checkout-fulfillment label:has(input:checked), .payment-options label:has(input:checked) {
  border-color: var(--teal); background: #e3f8fa; box-shadow: 0 0 0 2px rgba(10,165,181,.14);
}
.checkout-fulfillment strong, .payment-options strong { display: block; font-weight: 800; color: var(--navy); }
.checkout-fulfillment small, .payment-options small { display: block; color: var(--muted); margin-top: .25rem; line-height: 1.45; }
.checkout-delivery[hidden] { display: none !important; }
.checkout-btn { margin-top: .85rem; border-radius: 50px !important; }

.product-card {
  background: #fff; border: 1px solid #e8eef3; border-radius: 18px; overflow: hidden; height: 100%;
  box-shadow: 0 12px 28px -24px rgba(11,37,69,.28); transition: .3s;
}
.product-card:hover { transform: translateY(-6px); box-shadow: var(--shadow); }
.product-card .thumb { position: relative; aspect-ratio: 1; overflow: hidden; background: #f0f4f7; }
.product-card .thumb img { width: 100%; height: 100%; object-fit: cover; }
.product-card .thumb-link { display: block; height: 100%; }
.product-card .quick-btn {
  position: absolute; bottom: 12px; left: 50%; transform: translateX(-50%);
  background: rgba(11,37,69,.9); color: #fff; border-radius: 999px; padding: 6px 12px;
  font-size: 12px; text-decoration: none; font-weight: 700; white-space: nowrap;
}
.product-card .body { padding: 12px 14px 14px; }
.product-card h6 { margin: 0 0 8px; font-size: 15px; font-weight: 800; }
.product-card h6 a { color: var(--navy); text-decoration: none; }
.product-card .price { font-weight: 900; color: var(--navy); }
.product-card .old-price { color: #9aa8b6; text-decoration: line-through; font-size: 13px; display: block; }
.product-card .add-btn {
  width: 40px; height: 40px; border-radius: 12px; border: 0; background: var(--navy); color: #fff;
  display: grid; place-items: center;
}
.product-card .add-btn:hover { background: var(--teal); }
.product-card .price-row { display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.badge-off {
  position: absolute; top: 12px; right: 12px; background: #ff4d6d; color: #fff;
  font-size: .75rem; font-weight: 800; padding: 4px 10px; border-radius: 999px; z-index: 2;
}

@media (max-width: 991.98px) {
  .pd-layout, .cart-layout, .checkout-layout { grid-template-columns: 1fr; }
  .pd-gallery { position: static; }
  .pd-buy-row { display: none; }
  .pd-sticky-buy { display: flex; }
  .pd-page { padding-bottom: calc(150px + env(safe-area-inset-bottom, 0px)); }
  .summary-card { position: static; }
  .summary-card .cart-desktop-ctas { display: none; }
  .cart-page-actions { display: flex; }
  .cart-page { padding-bottom: calc(88px + 66px + env(safe-area-inset-bottom, 0px)); }
  .checkout-page, .cart-page { padding-bottom: calc(1.5rem + 72px + env(safe-area-inset-bottom, 0px)); }
  .cart-line { grid-template-columns: 72px minmax(0,1fr); }
  .cart-line-total { margin-top: .35rem; }
  .pd-perks { grid-template-columns: 1fr; }
}
@media (max-width: 575.98px) {
  .form-grid { grid-template-columns: 1fr; }
  .checkout-panel, .pd-info, .pd-details { padding: 1.1rem 1rem 1.25rem; }
  .coupon-row { flex-direction: column; }
  .pd-title { font-size: 1.25rem; }
}
