/* ===== متغيرات / Theme — مطابقة لألوان متجر Verterre ===== */
:root {
    /* اللون الأساسي للأزرار = rgb(221,29,29) كما في القالب الأصلي */
    --green: #dd1d1d;          /* (الأساسي/الأزرار) */
    --green-dark: #b81717;     /* تمرير الفأرة */
    --green-soft: #fdeaea;     /* خلفية فاتحة بلون العلامة */
    --header: #2e2a39;         /* خلفية الترويسة الداكنة rgb(46,42,57) */
    --ink: #2e2a39;            /* لون النص الأساسي */
    --muted: #6b7280;
    --line: #e5e7eb;
    --bg: #ffffff;
    --panel: #f3f3f3;          /* رمادي فاتح rgb(243,243,243) */
    --sale: #dd1d1d;
    --radius: 14px;
    --shadow: 0 4px 18px rgba(0, 0, 0, .08);
    --max: 560px;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

body {
    font-family: 'Cairo', system-ui, sans-serif;
    color: var(--ink);
    background: var(--panel);
    line-height: 1.7;
    -webkit-font-smoothing: antialiased;
}

h1, h2, .product__title, .section-title, .price-box__value {
    font-family: 'Barlow', 'Cairo', system-ui, sans-serif;
}

img { max-width: 100%; display: block; }

/* ===== شريط متحرك / Marquee ===== */
.marquee {
    background: var(--green-dark);
    color: #fff;
    overflow: hidden;
    white-space: nowrap;
    font-size: 14px;
    font-weight: 700;
}
.marquee__track {
    display: inline-flex;
    gap: 36px;
    padding: 9px 0;
    animation: scroll 22s linear infinite;
}
.marquee__track span { display: inline-flex; align-items: center; gap: 7px; }
.marquee svg { width: 17px; height: 17px; flex-shrink: 0; }
@keyframes scroll {
    from { transform: translateX(0); }
    to   { transform: translateX(50%); }
}

/* ===== ترويسة العلامة / Brand bar (داكنة كالأصل) ===== */
.topbar {
    background: var(--header);
    display: flex;
    justify-content: center;
    padding: 12px;
}
.topbar__logo { height: 46px; width: auto; }

/* ===== الصفحة / Page wrapper ===== */
.page {
    max-width: var(--max);
    margin: 0 auto;
    background: var(--bg);
    padding-bottom: 90px;
}
section { padding: 18px 16px; }

/* ===== المعرض / Image carousel ===== */
.gallery { padding-top: 16px; }
.carousel { position: relative; border-radius: var(--radius); overflow: hidden; background: #f3f4f6; }
.carousel__track {
    display: flex; overflow-x: auto; scroll-snap-type: x mandatory;
    scroll-behavior: smooth; -webkit-overflow-scrolling: touch;
    scrollbar-width: none; direction: ltr;
}
.carousel__track::-webkit-scrollbar { display: none; }
.carousel__slide { flex: 0 0 100%; scroll-snap-align: center; }
.carousel__slide img { width: 100%; aspect-ratio: 1/1; object-fit: contain; object-position: center; background: #fff; }

.carousel__arrow {
    position: absolute; top: 50%; transform: translateY(-50%);
    width: 38px; height: 38px; border: none; border-radius: 50%;
    background: rgba(255, 255, 255, .92); color: var(--ink);
    display: grid; place-items: center; cursor: pointer; z-index: 2;
    box-shadow: 0 2px 8px rgba(0, 0, 0, .2);
}
.carousel__arrow svg { width: 22px; height: 22px; }
.carousel__arrow:active { transform: translateY(-50%) scale(.9); }
.carousel__arrow--prev { right: 10px; }   /* RTL: السابق على اليمين */
.carousel__arrow--next { left: 10px; }

.carousel__dots { display: flex; justify-content: center; gap: 7px; margin-top: 12px; }
.carousel__dots .dot {
    width: 8px; height: 8px; padding: 0; border: none; border-radius: 999px;
    background: #d1d5db; cursor: pointer; transition: width .2s, background .2s;
}
.carousel__dots .dot.is-active { background: var(--green); width: 22px; }

.badge-sale {
    position: absolute; top: 12px; inset-inline-start: 12px; z-index: 2;
    background: var(--sale); color: #fff; font-weight: 800;
    padding: 6px 12px; border-radius: 999px; font-size: 15px;
}

/* ===== المنتج / Product info ===== */
.stars-row { display: flex; align-items: center; gap: 8px; }
.stars { color: #fbbf24; letter-spacing: 2px; font-size: 20px; line-height: 1; }
.stars-count { color: var(--muted); font-size: 13px; }
.product__title { font-size: 23px; font-weight: 800; margin: 8px 0 10px; }

.price-box { display: flex; align-items: baseline; gap: 8px 10px; flex-wrap: wrap; margin-bottom: 14px; }
.price-box__value { font-size: 28px; font-weight: 900; color: var(--green-dark); white-space: nowrap; }
.price-box__old { font-size: 18px; color: var(--muted); text-decoration: line-through; white-space: nowrap; }
.price-box__off { background: var(--green-soft); color: var(--green-dark); font-weight: 700; font-size: 13px; padding: 4px 10px; border-radius: 999px; white-space: nowrap; align-self: center; }

.product__desc { color: #333; margin-bottom: 14px; }

.features { list-style: none; display: grid; gap: 8px; margin-bottom: 18px; }
.features li { position: relative; padding-inline-start: 28px; font-weight: 600; }
.features li::before {
    content: '✓'; position: absolute; inset-inline-start: 0;
    top: 50%; transform: translateY(-50%);
    width: 20px; height: 20px; background: var(--green); color: #fff;
    border-radius: 50%; font-size: 13px; display: grid; place-items: center;
}

/* ===== أزرار الطلب / CTA buttons ===== */
.btn-order {
    display: flex; align-items: center; justify-content: center; gap: 10px;
    width: 100%; border: none; cursor: pointer;
    background: var(--green); color: #fff; font-family: inherit;
    font-size: 19px; font-weight: 800; padding: 15px; border-radius: 12px;
    text-align: center; text-decoration: none;
    box-shadow: 0 6px 16px rgba(0, 0, 0, .18);
    transition: transform .12s, background .2s;
}
.btn-order svg { width: 22px; height: 22px; flex-shrink: 0; }
/* اهتزاز دوري للفت الانتباه / periodic attention buzz */
.btn-order { animation: cta-buzz 4s ease-in-out infinite; }
@keyframes cta-buzz {
    0%, 88%, 100% { transform: translateX(0) rotate(0); }
    89% { transform: translateX(-3px) rotate(-.6deg); }
    90% { transform: translateX(3px) rotate(.6deg); }
    91% { transform: translateX(-3px) rotate(-.6deg); }
    92% { transform: translateX(3px) rotate(.6deg); }
    93% { transform: translateX(-2px); }
    94% { transform: translateX(2px); }
    95% { transform: translateX(0); }
}
@media (prefers-reduced-motion: reduce) { .btn-order { animation: none; } }
.btn-order:hover { background: var(--green-dark); }
.btn-order:active { transform: scale(.98); }
.btn-order--hero { margin-top: 4px; }
.btn-order:disabled { opacity: .7; cursor: default; }

/* ===== شريط الثقة / Trust strip ===== */
.trust { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; background: var(--green-soft); }
.trust__item { display: flex; align-items: center; gap: 8px; font-weight: 700; font-size: 14px; }
.trust__item span { font-size: 20px; }

/* ===== نموذج الطلب / Order form ===== */
.order { background: #fff; border: 2px solid var(--green-soft); border-radius: var(--radius); margin: 12px; box-shadow: var(--shadow); }
.order__title { font-size: 19px; font-weight: 800; margin-bottom: 14px; text-align: center; }
.field { margin-bottom: 16px; }
.field label { display: block; font-weight: 700; margin-bottom: 6px; font-size: 14px; }
.req { color: var(--sale); }

/* حقل بأيقونة على اليمين (RTL) كما في التصميم */
.input-icon {
    position: relative; display: flex; align-items: stretch;
    border: 1.6px solid var(--line); border-radius: 12px; overflow: hidden;
    background: #fff; transition: border-color .15s, box-shadow .15s;
}
.input-icon:focus-within { border-color: var(--green); box-shadow: 0 0 0 3px var(--green-soft); }
.input-icon.invalid { border-color: var(--sale); }
.input-icon__btn {
    flex: 0 0 48px; display: grid; place-items: center;
    background: var(--panel); color: #555;
}
.input-icon__btn svg { width: 21px; height: 21px; }
.input-icon input, .input-icon select {
    flex: 1; min-width: 0; height: 52px; border: none; background: transparent; outline: none;
    padding: 0 14px; font-family: inherit; font-size: 16px; color: var(--ink); line-height: 52px;
}
.input-icon ::placeholder { color: #9aa1ab; }
/* القائمة المنسدلة: أخفِ السهم الأصلي وأضف شيفرون على اليسار */
.input-icon--select select { appearance: none; -webkit-appearance: none; padding-inline-start: 40px; }
.input-icon__chev { position: absolute; left: 12px; top: 50%; transform: translateY(-50%); color: var(--muted); pointer-events: none; }
.input-icon__chev svg { width: 20px; height: 20px; }

.err { color: var(--sale); font-size: 12px; min-height: 14px; display: block; margin-top: 4px; text-align: right; }

/* رقائق المتغيّرات / Variant chips */
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip { cursor: pointer; }
.chip input { position: absolute; opacity: 0; width: 0; height: 0; }
.chip span {
    display: inline-block; padding: 10px 16px; border: 1.6px solid var(--line);
    border-radius: 999px; font-weight: 700; font-size: 14px; background: #fff;
    color: var(--ink); transition: border-color .15s, background .15s, color .15s;
}
.chip input:checked + span { border-color: var(--green); background: var(--green-soft); color: var(--green-dark); }
.chip input:focus-visible + span { box-shadow: 0 0 0 3px var(--green-soft); }

.order__summary { display: flex; justify-content: space-between; align-items: center; padding: 12px 0; border-top: 1px dashed var(--line); margin-bottom: 12px; font-weight: 700; }
.order__summary strong { color: var(--green-dark); font-size: 20px; }

/* تذكرة نجاح الطلب / order success ticket */
.order-success { text-align: center; padding: 30px 16px; }
.order-success h3 { font-size: 22px; font-weight: 800; color: var(--green-dark); margin: 6px 0 8px; opacity: 0; animation: oc-fade .4s .7s ease forwards; }
.order-success p { color: #444; font-size: 15px; opacity: 0; animation: oc-fade .4s .9s ease forwards; }

/* علامة صح متحركة (رسم الدائرة ثم الصح) / animated draw-in check */
.success-check { width: 92px; height: 92px; display: block; margin: 0 auto 14px; animation: oc-pop .4s .85s ease; transform-origin: center; }
.success-check__circle {
    fill: none; stroke: var(--green); stroke-width: 3;
    stroke-dasharray: 151; stroke-dashoffset: 151;
    animation: oc-circle .55s ease forwards;
}
.success-check__tick {
    fill: none; stroke: var(--green); stroke-width: 4; stroke-linecap: round; stroke-linejoin: round;
    stroke-dasharray: 40; stroke-dashoffset: 40;
    animation: oc-tick .35s .5s ease forwards;
}
@keyframes oc-circle { to { stroke-dashoffset: 0; } }
@keyframes oc-tick   { to { stroke-dashoffset: 0; } }
@keyframes oc-pop    { 0% { transform: scale(1); } 50% { transform: scale(1.12); } 100% { transform: scale(1); } }
@keyframes oc-fade   { to { opacity: 1; } }
@media (prefers-reduced-motion: reduce) {
    .success-check__circle, .success-check__tick { animation: none; stroke-dashoffset: 0; }
    .order-success h3, .order-success p { animation: none; opacity: 1; }
}

.form-msg { margin-top: 12px; padding: 12px; border-radius: 10px; font-weight: 700; text-align: center; }
.form-msg.ok { background: #e6f4ea; color: var(--green-dark); }
.form-msg.bad { background: #fdecea; color: var(--sale); }

/* ===== خطوات الطلب / Steps ===== */
.steps-wrap .section-title { margin-bottom: 18px; }
.steps { display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; text-align: center; position: relative; }
.steps::before {
    content: ''; position: absolute; top: 25px; left: 12.5%; right: 12.5%;
    height: 2px; background: var(--green-soft); z-index: 0;
}
.step { display: flex; flex-direction: column; align-items: center; gap: 9px; position: relative; z-index: 1; }
.step__ic {
    position: relative; width: 52px; height: 52px; border-radius: 50%;
    background: #fff; border: 2px solid var(--green); color: var(--green);
    display: grid; place-items: center; box-shadow: 0 2px 8px rgba(0, 0, 0, .06);
}
.step__ic svg { width: 24px; height: 24px; }
.step__n {
    position: absolute; top: -6px; right: -6px;
    width: 20px; height: 20px; border-radius: 50%;
    background: var(--green); color: #fff; border: 2px solid #fff;
    font-size: 11px; font-weight: 800; line-height: 1;
    display: flex; align-items: center; justify-content: center; text-align: center;
}
.step__lbl { font-size: 12px; font-weight: 700; }

/* ===== المواصفات / Specs ===== */
.section-title { font-size: 19px; font-weight: 800; margin-bottom: 12px; text-align: center; }
.specs__table { width: 100%; border-collapse: collapse; }
.specs__table td { padding: 11px 12px; border: 1px solid var(--line); font-size: 14px; }
.specs__table td:first-child { font-weight: 700; background: #fafafa; width: 40%; }

/* ===== الوصف الكامل المُستنسخ / Cloned full description ===== */
.description { padding: 0; }
.description img { width: 100%; height: auto; border-radius: 8px; margin: 6px 0; }
.description p { margin: 8px 12px; }
.description iframe {
    width: 100%; aspect-ratio: 16/9; height: auto; border: 0; display: block; margin: 10px 0;
}
.description table { width: calc(100% - 24px); margin: 10px 12px; border-collapse: collapse; }
.description td { border: 1px solid var(--line); padding: 8px; }

/* ===== المراجعات / Reviews ===== */
.reviews { background: #fff; }
.reviews__head { display: flex; align-items: center; gap: 8px; justify-content: center; margin-bottom: 14px; }
.review-photos { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-bottom: 18px; }
.review-photos img { aspect-ratio: 1/1; object-fit: cover; border-radius: 10px; }
.review { display: flex; gap: 10px; padding: 12px 0; border-top: 1px solid var(--line); }
.review__avatar { width: 40px; height: 40px; border-radius: 50%; flex: 0 0 40px; object-fit: cover; }
.review__name { font-weight: 800; font-size: 14px; display: flex; gap: 6px; align-items: center; }
.review__text { font-size: 14px; color: #333; }

/* ===== الضمان / Guarantee ===== */
.guarantee { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; text-align: center; }
.guarantee__item {
    background: var(--green-soft); border-radius: 10px; padding: 14px 6px;
    font-weight: 700; font-size: 13px; color: var(--ink);
    display: flex; flex-direction: column; align-items: center; gap: 8px;
}
.guarantee__item svg { width: 26px; height: 26px; color: var(--green); }

/* ===== زر ثابت / Sticky CTA ===== */
.sticky-cta {
    position: fixed; inset-inline: 0; bottom: 0; z-index: 50;
    max-width: var(--max); margin: 0 auto;
    background: var(--green); color: #fff; text-decoration: none;
    font-size: 18px; font-weight: 800; text-align: center;
    padding: 15px; box-shadow: 0 -4px 16px rgba(0, 0, 0, .15);
}
.sticky-cta:active { background: var(--green-dark); }

/* ===== صور أسفل الصفحة / Footer images (stacked, full-width) ===== */
.bottom-stack { padding: 0; display: block; }
.bottom-stack img { width: 100%; height: auto; display: block; }

/* ===== نافذة المغادرة / Exit overlay (form only) ===== */
.exit-overlay {
    position: fixed; inset: 0; z-index: 300; background: rgba(0, 0, 0, .6);
    overflow-y: auto; padding: 14px; display: flex; align-items: flex-start; justify-content: center;
    animation: exit-fade .2s ease;
}
.exit-overlay[hidden] { display: none; }
.exit-overlay__inner {
    background: #fff; border-radius: 16px; width: 100%; max-width: var(--max);
    margin: 20px auto; position: relative; box-shadow: 0 20px 60px rgba(0, 0, 0, .35);
    animation: exit-pop .25s ease;
}
.exit-overlay__close {
    position: absolute; top: 8px; inset-inline-end: 10px; z-index: 2;
    width: 34px; height: 34px; border: none; border-radius: 50%; cursor: pointer;
    background: #f1f1f1; color: #555; font-size: 17px; line-height: 1;
}
.exit-overlay__head { text-align: center; padding: 20px 16px 4px; }
.exit-overlay__head h2 { font-size: 20px; font-weight: 800; color: var(--green-dark); }
.exit-overlay__head p { color: var(--muted); font-size: 14px; margin-top: 6px; }
/* النموذج المنقول داخل النافذة يملأ العرض بلا هوامش زائدة */
.exit-overlay #order { margin: 12px; border: none; box-shadow: none; }
@keyframes exit-fade { from { opacity: 0; } to { opacity: 1; } }
@keyframes exit-pop { from { transform: translateY(14px) scale(.98); opacity: 0; } to { transform: none; opacity: 1; } }

/* ===== التذييل / Footer ===== */
.site-footer { max-width: var(--max); margin: 0 auto; background: #fff; text-align: center; padding: 24px 16px 100px; border-top: 1px solid var(--line); }
.site-footer__logo { height: 40px; width: auto; margin: 0 auto 10px; }
.site-footer p { color: var(--muted); font-size: 13px; }

@media (min-width: 600px) {
    .page { margin: 16px auto; border-radius: 18px; overflow: hidden; box-shadow: var(--shadow); }
}
