/* صفحة المنتج وصفحة المتجر — مشتركة بين النسخ الثلاث وتأخذ ألوان كل نسخة */

/* ================= صفحة المنتج ================= */
.pdp-top { background: var(--sand-100); }
.pdp-crumbs { padding-top: 22px; margin-bottom: 16px; }
.pdp { display: grid; grid-template-columns: 1.08fr 1fr; gap: 28px; align-items: start; padding-bottom: 40px; }
.pdp-media { position: sticky; top: 130px; display: grid; gap: 12px; }
.pdp-main { position: relative; aspect-ratio: 1; border-radius: 18px; overflow: hidden; background: #fff; box-shadow: var(--shadow); }
.pdp-img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; opacity: 0; transition: opacity .5s ease; transform: scale(var(--z, 1)); transform-origin: var(--x, 50%) var(--y, 50%); }
.pdp-img.on { opacity: 1; }
.pdp-main .badge { z-index: 2; }
.pdp-main-cap { position: absolute; z-index: 2; inset-inline: 0; bottom: 0; padding: 60px 26px 22px; color: #fff; background: linear-gradient(to top, rgba(0,0,0,.55), rgba(0,0,0,0)); display: grid; gap: 2px; }
.pdp-main-cap b { font-family: var(--display); font-size: clamp(24px, 2.4vw, 34px); font-weight: 600; }
.pdp-main-cap span { opacity: .9; font-size: 15px; }
.pdp-thumbs { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.pdp-thumbs button { position: relative; border: 2px solid transparent; border-radius: 12px; overflow: hidden; padding: 0; background: #fff; aspect-ratio: 4 / 3; transition: border-color .2s; }
.pdp-thumbs button.on { border-color: var(--brown-800); }
.pdp-thumbs img { width: 100%; height: 100%; object-fit: cover; transform: scale(var(--z, 1)); transform-origin: var(--x, 50%) var(--y, 50%); }
.pdp-thumbs span { position: absolute; bottom: 6px; inset-inline-start: 6px; background: rgba(255,255,255,.92); border-radius: 6px; font-size: 11.5px; font-weight: 700; padding: 2px 8px; color: var(--brown-900); }

.pdp-info { display: grid; gap: 14px; }
.pdp-box { background: #fff; border-radius: 15px; padding: 18px; box-shadow: 0 1px 2px rgba(0,0,0,.04); border: 1px solid var(--line); }
.pdp-h { font-size: 17px; margin-bottom: 12px; color: var(--brown-900); }
.pdp-variants { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.pdp-var { position: relative; display: grid; justify-items: center; gap: 6px; text-align: center; padding: 30px 8px 12px; border: 1.5px solid var(--line); border-radius: 14px; background: var(--sand-100); transition: border-color .2s, transform .2s; }
.pdp-var:hover { border-color: var(--sand-300); transform: translateY(-2px); }
.pdp-var.on { border-color: var(--brown-900); background: #fff; box-shadow: 0 0 0 1px var(--brown-900); }
.pdp-var em { position: absolute; top: 8px; left: 50%; transform: translateX(-50%); font-style: normal; font-size: 11.5px; font-weight: 700; padding: 2px 10px; border-radius: 999px; background: var(--brown-800); color: #fff; white-space: nowrap; }
.pdp-var em.soft { background: #fff; color: var(--brown-900); border: 1px solid var(--line); }
.pdp-var img { width: 82px; height: 82px; border-radius: 10px; object-fit: cover; }
.pdp-var b { font-size: 13.5px; line-height: 1.35; color: var(--brown-900); }
.pdp-var span { font-size: 13px; font-weight: 800; color: #c0392b; }
.pdp-var del { color: var(--muted); font-weight: 400; font-size: 11.5px; }

.pdp-title { display: flex; gap: 14px; align-items: center; }
.pdp-title img { width: 74px; height: 74px; border-radius: 12px; object-fit: cover; flex: none; }
.pdp-title small { display: block; font-size: 11.5px; letter-spacing: 1.5px; color: var(--muted); font-weight: 700; }
.pdp-title h1 { font-size: clamp(22px, 2.2vw, 28px); color: var(--brown-900); line-height: 1.3; }
.pdp-made { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; color: var(--brown-700); font-weight: 600; }
.pdp-made .ic { width: 16px; height: 16px; }
.pdp-price { display: flex; align-items: center; flex-wrap: wrap; gap: 10px; margin: 16px 0 10px; }
.pdp-price strong { font-size: 32px; font-weight: 800; color: #c0392b; line-height: 1; }
.pdp-price del { color: var(--muted); font-size: 16px; }
.pdp-price .save { background: #c0392b; color: #fff; border-radius: 8px; padding: 4px 10px; font-size: 13px; font-weight: 700; }
.pdp-desc { margin: 0 0 14px; color: #5f5049; font-size: 15px; }
.pdp-feats { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.pdp-feats li { display: flex; align-items: center; gap: 8px; background: var(--sand-100); border-radius: 10px; padding: 10px 12px; font-size: 13.5px; font-weight: 600; color: var(--brown-900); }
.pdp-feats .ic { width: 16px; height: 16px; color: #2f8a55; flex: none; }

#pdp-form { display: grid; gap: 16px; }
#pdp-form .opt legend, #pdp-form .legend { font-weight: 700; font-size: 15px; margin-bottom: 8px; display: block; }
.pdp-qty-row { display: flex; align-items: center; justify-content: space-between; }
.pdp-qty-row .legend { margin: 0 !important; }

.pdp-bundle { display: grid; grid-template-columns: 1fr auto; gap: 12px; align-items: center; padding: 14px; border-radius: 12px; background: color-mix(in srgb, var(--brown-800) 7%, #fff); border: 1px dashed color-mix(in srgb, var(--brown-800) 40%, #fff); margin-bottom: 10px; }
.pdp-bundle-imgs { grid-column: 1 / -1; display: flex; align-items: center; gap: 6px; }
.pdp-bundle-imgs img { width: 46px; height: 46px; border-radius: 10px; object-fit: cover; border: 2px solid #fff; }
.pdp-bundle-imgs i { font-style: normal; font-weight: 800; color: var(--brown-800); }
.pdp-bundle-txt { display: grid; gap: 2px; }
.pdp-bundle-txt b { font-size: 14.5px; color: var(--brown-900); }
.pdp-bundle-txt strong { color: #c0392b; font-size: 16px; }
.pdp-bundle-txt small { color: #2f8a55; font-weight: 600; font-size: 12.5px; }
.pdp-bundle-btn { height: 44px; padding: 0 18px; }
.pdp-addons { display: grid; }
.pdp-addon { display: grid; grid-template-columns: 54px 1fr auto; gap: 12px; align-items: center; padding: 12px 2px; border-top: 1px solid var(--line); }
.pdp-addon img { width: 54px; height: 54px; border-radius: 10px; object-fit: cover; }
.pdp-addon b { display: block; font-size: 14px; color: var(--brown-900); }
.pdp-addon > div > span { display: block; color: #c0392b; font-weight: 700; font-size: 13px; }
.pdp-addon a { font-size: 12px; color: var(--muted); text-decoration: underline; }
.pdp-add-mini { height: 38px; padding: 0 16px; border-radius: 10px; border: 1.5px solid var(--brown-900); background: #fff; color: var(--brown-900); font-weight: 700; font-size: 13px; transition: .2s; }
.pdp-add-mini:hover { background: var(--brown-900); color: #fff; }

.pdp-pay { display: flex; align-items: center; gap: 8px; background: #fff; border: 1px solid var(--line); border-radius: 12px; padding: 12px 16px; font-size: 14px; font-weight: 600; color: #2f8a55; }
.pdp-pay .ic { width: 20px; height: 20px; }
.pdp-cta { height: 58px; font-size: 17px; border-radius: 14px; }
.pdp-info > .btn-outline { height: 50px; border-radius: 14px; }
.pdp-ship { margin: 0; text-align: center; color: var(--muted); font-size: 13.5px; display: flex; justify-content: center; align-items: center; gap: 6px; }
.pdp-ship .ic { width: 18px; height: 18px; }

.pdp-trust { background: #fff; border-block: 1px solid var(--line); }
.pdp-trust .container { display: grid; grid-template-columns: repeat(4, 1fr); }
.pdp-trust span { display: grid; justify-items: center; gap: 8px; padding: 22px 10px; text-align: center; }
.pdp-trust .ic { width: 28px; height: 28px; color: var(--brown-800); }
.pdp-trust b { font-size: 14px; color: var(--brown-900); }

.pdp-sec { padding: 60px 0; }
.pdp-sec-tint { background: var(--sand-100); }
.pdp-sec-h { font-size: clamp(26px, 2.8vw, 36px); color: var(--brown-900); text-align: center; margin-bottom: 30px; }
.pdp-details { display: grid; grid-template-columns: 1fr 1fr; gap: 40px; align-items: start; }
.pdp-details h2 { font-size: clamp(24px, 2.6vw, 34px); color: var(--brown-900); margin: 4px 0 12px; }
.pdp-details p { margin: 0; color: #5f5049; font-size: 16px; }
.pdp-benefits { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; }
.pdp-benefits div { background: #fff; border-radius: 15px; padding: 22px; display: grid; gap: 6px; border: 1px solid var(--line); }
.pdp-benefits .ic { width: 28px; height: 28px; color: var(--brown-800); margin-bottom: 4px; }
.pdp-benefits b { font-size: 16px; color: var(--brown-900); }
.pdp-benefits span { color: var(--muted); font-size: 14px; }
.pdp-steps { list-style: none; padding: 0; margin: 0 auto; max-width: 760px; display: grid; gap: 18px; }
.pdp-steps li { display: flex; gap: 16px; align-items: flex-start; }
.pdp-steps li > b { width: 36px; height: 36px; flex: none; border-radius: 50%; background: var(--brown-900); color: #fff; display: grid; place-items: center; }
.pdp-steps h4 { font-size: 17px; color: var(--brown-900); }
.pdp-steps p { margin: 2px 0 0; color: var(--muted); }
.pdp-faq { max-width: 860px; margin: 0 auto; }
.pdp-faq details { border-bottom: 1px solid var(--line); }
.pdp-faq summary { list-style: none; cursor: pointer; display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 18px 4px; font-weight: 700; font-size: 16px; color: var(--brown-900); }
.pdp-faq summary::-webkit-details-marker { display: none; }
.pdp-faq summary i { display: grid; transition: transform .25s; }
.pdp-faq summary .ic { width: 18px; height: 18px; }
.pdp-faq details[open] summary i { transform: rotate(45deg); }
.pdp-faq p { margin: 0 0 18px; color: var(--muted); padding: 0 4px; }

.pdp-bar { position: fixed; z-index: 35; bottom: 16px; inset-inline: 0; pointer-events: none; transform: translateY(140%); transition: transform .4s ease; }
.pdp-bar.show { transform: none; }
.pdp-bar-in { pointer-events: auto; max-width: 820px; display: flex; align-items: center; gap: 12px; background: #fff; border-radius: 16px; padding: 10px; box-shadow: 0 18px 40px -18px rgba(0,0,0,.35), 0 0 0 1px var(--line); }
.pdp-bar-in img { width: 48px; height: 48px; border-radius: 10px; object-fit: cover; }
.pdp-bar-txt { flex: 1; min-width: 0; display: grid; }
.pdp-bar-txt b { font-size: 15px; color: var(--brown-900); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pdp-bar-txt span { font-size: 13px; color: var(--muted); }
.pdp-bar-txt del { font-size: 12px; }
.pdp-bar .btn { height: 48px; border-radius: 12px; }
.pdp-bar-wa { width: 48px; height: 48px; border-radius: 50%; background: #25d366; color: #fff; display: grid; place-items: center; flex: none; }
.has-pdp-bar .wa-float { display: none; }

/* ================= صفحة المتجر ================= */
.shop-head { padding: 26px 0 8px; }
.shop-head h1 { font-size: clamp(28px, 3vw, 40px); color: var(--brown-900); }
.shop-layout { display: grid; grid-template-columns: 270px 1fr; gap: 28px; align-items: start; padding-bottom: 20px; }
#filters { position: sticky; top: 130px; background: #fff; border: 1px solid var(--line); border-radius: 15px; padding: 18px; display: grid; gap: 4px; max-height: calc(100vh - 150px); overflow: auto; scrollbar-width: thin; }
.flt-head { display: flex; align-items: center; justify-content: space-between; padding-bottom: 10px; border-bottom: 1px solid var(--line); margin-bottom: 4px; }
.flt-head h3 { font-size: 16px; display: flex; gap: 8px; align-items: center; color: var(--brown-900); }
.flt-head .ic { width: 18px; height: 18px; color: var(--brown-800); }
.flt-close { display: none; border: 0; background: none; color: var(--brown-900); }
.flt-group { padding: 14px 0; border-bottom: 1px solid var(--line); display: grid; gap: 8px; }
.flt-group h4 { font-size: 14px; color: var(--brown-900); margin-bottom: 2px; }
.flt-check { display: flex; align-items: center; gap: 10px; cursor: pointer; font-size: 14px; padding: 3px 0; }
.flt-check input { position: absolute; opacity: 0; }
.flt-check .box { width: 20px; height: 20px; border-radius: 6px; border: 1.5px solid var(--sand-300); display: grid; place-items: center; color: transparent; transition: .2s; flex: none; }
.flt-check .box .ic { width: 14px; height: 14px; }
.flt-check input:checked + .box { background: var(--brown-800); border-color: var(--brown-800); color: #fff; }
.flt-check input:focus-visible + .box { outline: 2px solid var(--brown-500); outline-offset: 2px; }
.flt-check .lbl { flex: 1; color: var(--brown-900); }
.flt-check em { font-style: normal; font-size: 12px; color: var(--muted); background: var(--sand-100); border-radius: 999px; padding: 1px 8px; }
.flt-range { width: 100%; accent-color: var(--brown-800); }
.flt-range-lbl { display: flex; justify-content: space-between; font-size: 12.5px; color: var(--muted); }
.flt-range-lbl b { color: var(--brown-900); }
.flt-colors { display: flex; flex-wrap: wrap; gap: 8px; }
.flt-colors label { cursor: pointer; position: relative; }
.flt-colors input { position: absolute; opacity: 0; }
.flt-colors i { display: block; width: 28px; height: 28px; border-radius: 50%; border: 1px solid rgba(0,0,0,.12); box-shadow: inset 0 0 0 3px #fff; transition: .2s; }
.flt-colors input:checked + i { box-shadow: inset 0 0 0 3px #fff, 0 0 0 2px var(--brown-800); }
.flt-colors span { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
.flt-switch { display: flex; align-items: center; gap: 10px; cursor: pointer; font-size: 14px; color: var(--brown-900); padding: 3px 0; }
.flt-switch input { position: absolute; opacity: 0; }
.flt-switch .track { width: 38px; height: 22px; border-radius: 22px; background: #d8dcda; position: relative; transition: .25s; flex: none; }
.flt-switch .track::after { content: ""; position: absolute; top: 3px; inset-inline-start: 3px; width: 16px; height: 16px; border-radius: 50%; background: #fff; transition: .25s; box-shadow: 0 1px 3px rgba(0,0,0,.2); }
.flt-switch input:checked + .track { background: var(--brown-800); }
.flt-switch input:checked + .track::after { inset-inline-start: 19px; }
#filters > .btn { margin-top: 14px; height: 44px; }
.flt-promo { margin-top: 12px; display: grid; gap: 4px; padding: 16px; border-radius: 12px; background: var(--sand-100); }
.flt-promo b { color: var(--brown-900); font-size: 14.5px; }
.flt-promo span { color: var(--brown-700); font-size: 13px; font-weight: 600; display: inline-flex; gap: 4px; align-items: center; }
.flt-promo .ic { width: 16px; height: 16px; }

.shop-bar { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; background: #fff; border: 1px solid var(--line); border-radius: 15px; padding: 10px 14px; margin-bottom: 12px; }
.shop-bar #shop-count { color: var(--muted); font-size: 14px; }
.shop-bar #shop-count b { color: var(--brown-900); }
.shop-bar-end { display: flex; align-items: center; gap: 10px; }
.shop-bar .select { height: 40px; border-radius: 10px; font-size: 14px; }
.cols-toggle { display: flex; gap: 4px; background: var(--sand-100); padding: 3px; border-radius: 10px; }
.cols-toggle button { width: 34px; height: 34px; border: 0; border-radius: 8px; background: none; color: var(--muted); display: grid; place-items: center; }
.cols-toggle button.on { background: #fff; color: var(--brown-900); box-shadow: 0 1px 3px rgba(0,0,0,.08); }
.cols-toggle .ic { width: 18px; height: 18px; }
.flt-open { display: none; align-items: center; gap: 8px; height: 40px; padding: 0 14px; border-radius: 10px; border: 1px solid var(--line); background: #fff; font-weight: 700; font-size: 14px; color: var(--brown-900); }
.flt-open .ic { width: 18px; height: 18px; }
.flt-open em { font-style: normal; background: var(--brown-800); color: #fff; border-radius: 999px; min-width: 20px; font-size: 12px; padding: 0 6px; }
.flt-open em:empty { display: none; }
#active-chips { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 14px; }
#active-chips:empty { display: none; }
#active-chips button { display: inline-flex; align-items: center; gap: 6px; height: 32px; padding: 0 12px; border-radius: 999px; border: 1px solid var(--line); background: var(--sand-100); font-size: 13px; font-weight: 600; color: var(--brown-900); }
#active-chips .ic { width: 14px; height: 14px; }
#active-chips .clear { background: none; border-color: transparent; text-decoration: underline; color: var(--muted); }
.shop-main .grid { grid-template-columns: repeat(4, 1fr); }
.shop-main .grid[data-cols="3"] { grid-template-columns: repeat(3, 1fr); }
.flt-backdrop { display: none; }

@media (max-width: 1240px) {
  .shop-main .grid, .shop-main .grid[data-cols="3"] { grid-template-columns: repeat(3, 1fr); }
}
@media (max-width: 1024px) {
  .pdp { grid-template-columns: 1fr; gap: 16px; }
  .pdp-media { position: static; }
  .pdp-details { grid-template-columns: 1fr; gap: 20px; }
  .pdp-benefits { grid-template-columns: repeat(2, 1fr); }
  .shop-layout { grid-template-columns: 1fr; }
  #filters { position: fixed; top: 0; bottom: 0; inset-inline-start: 0; z-index: 90; width: min(330px, 88vw); max-height: none; border-radius: 0; transform: translateX(105%); transition: transform .35s ease; box-shadow: 0 0 40px rgba(0,0,0,.2); }
  #filters.open { transform: none; }
  .flt-close { display: grid; }
  .flt-open { display: inline-flex; }
  .cols-toggle { display: none; }
  #filters.open ~ .flt-backdrop { display: block; position: fixed; inset: 0; z-index: 85; background: rgba(0,0,0,.4); }
}
@media (max-width: 640px) {
  .pdp-crumbs { padding-top: 14px; font-size: 13px; }
  .pdp-main { border-radius: 15px; }
  .pdp-main-cap { padding: 40px 16px 14px; }
  .pdp-box { padding: 14px; }
  .pdp-var { padding: 28px 4px 10px; }
  .pdp-var img { width: 64px; height: 64px; }
  .pdp-var b { font-size: 12.5px; }
  .pdp-feats { grid-template-columns: 1fr 1fr; gap: 6px; }
  .pdp-feats li { font-size: 12.5px; padding: 8px 10px; }
  .pdp-price strong { font-size: 28px; }
  .pdp-trust .container { grid-template-columns: repeat(2, 1fr); }
  .pdp-sec { padding: 42px 0; }
  .pdp-benefits { grid-template-columns: 1fr; }
  .pdp-bar { bottom: 10px; }
  .pdp-bar-in { margin-inline: 10px; width: auto; }
  .pdp-bar-in img { display: none; }
  .pdp-bar .btn { padding: 0 16px; }
  .shop-main .grid, .shop-main .grid[data-cols="3"] { grid-template-columns: repeat(2, 1fr); }
  .shop-bar { padding: 8px 10px; }
  .shop-bar .select { max-width: 150px; }
}
