/* ============================================================
   Cotton Masry — commerce UI layer (cm-commerce.css)
   Policies / FAQ / contact / track / checkout / product page /
   cart progress / search suggest / cookie consent / sticky CTA
   ============================================================ */

:root {
    --cmc-gold: #c88a17;
    --cmc-gold-dark: #9f690c;
    --cmc-ink: #181818;
    --cmc-dark: #242424;
    --cmc-cream: #f8f3eb;
    --cmc-cream2: #efe5d8;
    --cmc-border: #e7dfd4;
    --cmc-muted: #6d6d6d;
    --cmc-trust-bg: #faf7f2;
    --cmc-green: #005a41;
    --cmc-red: #b03030;
}

/* ---------- generic cards / alerts ---------- */
.cm-card {
    background: #fff;
    border: 1px solid var(--cmc-border);
    border-radius: 14px;
    padding: 24px;
}
.cm-alert { border-radius: 12px; padding: 14px 18px; margin-bottom: 16px; font-size: .95rem; }
.cm-alert-ok { background: #eef7f1; color: var(--cmc-green); border: 1px solid #cde8d8; }
.cm-alert-error { background: #fdeeee; color: var(--cmc-red); border: 1px solid #f5d5d5; }

/* ---------- policy / cms pages ---------- */
.cm-policy-card {
    background: #fff;
    border: 1px solid var(--cmc-border);
    border-radius: 16px;
    padding: clamp(20px, 4vw, 48px);
    max-width: 900px;
    margin-inline: auto;
}
.cm-rich h2 { font-size: 1.45rem; font-weight: 800; margin: 0 0 16px; color: var(--cmc-ink); }
.cm-rich h3 { font-size: 1.12rem; font-weight: 800; margin: 28px 0 10px; color: var(--cmc-ink); }
.cm-rich p { font-size: .98rem; line-height: 1.9; color: #333; margin-bottom: 12px; }
.cm-rich ul { padding-inline-start: 22px; margin-bottom: 14px; }
.cm-rich li { font-size: .98rem; line-height: 1.9; color: #333; }
.cm-rich a { color: var(--cmc-gold-dark); font-weight: 700; text-decoration: underline; }
.cm-policy-updated { margin-top: 28px; padding-top: 16px; border-top: 1px dashed var(--cmc-border); color: var(--cmc-muted); font-size: .88rem; }
.cm-dynamic-line { background: var(--cmc-trust-bg); border: 1px solid var(--cmc-border); border-radius: 10px; padding: 12px 16px; margin-top: 14px; font-size: .92rem; }
.cm-privacy-contact, .cm-paynote, .cm-sla { background: var(--cmc-trust-bg); border-radius: 10px; padding: 12px 16px; }

/* ---------- FAQ ---------- */
.cm-faq-list { max-width: 820px; margin-inline: auto; display: flex; flex-direction: column; gap: 12px; }
.cm-faq-item { background: #fff; border: 1px solid var(--cmc-border); border-radius: 12px; overflow: hidden; }
.cm-faq-item summary {
    cursor: pointer; padding: 18px 22px; font-weight: 700; font-size: 1.02rem;
    list-style: none; display: flex; justify-content: space-between; align-items: center; gap: 12px;
}
.cm-faq-item summary::-webkit-details-marker { display: none; }
.cm-faq-item summary::after { content: '+'; font-size: 1.35rem; color: var(--cmc-gold); font-weight: 700; transition: transform .2s; flex: 0 0 auto; }
.cm-faq-item[open] summary::after { transform: rotate(45deg); }
.cm-faq-item[open] summary { border-bottom: 1px solid var(--cmc-border); }
.cm-faq-answer { padding: 16px 22px; color: #444; line-height: 1.9; font-size: .96rem; background: var(--cmc-trust-bg); }
.cm-faq-more { text-align: center; margin-top: 28px; color: var(--cmc-muted); }
.cm-faq-more a { color: var(--cmc-gold-dark); font-weight: 700; }

/* ---------- contact ---------- */
.cm-contact-info { position: sticky; top: 100px; }
.cm-contact-list { list-style: none; padding: 0; display: flex; flex-direction: column; gap: 14px; }
.cm-contact-list li { display: flex; gap: 12px; align-items: flex-start; font-size: .95rem; }
.cm-contact-ico { font-size: 1.3rem; }
.cm-contact-list a { color: var(--cmc-gold-dark); font-weight: 700; }
.cm-contact-hours { margin-top: 20px; padding-top: 16px; border-top: 1px dashed var(--cmc-border); }
.cm-contact-hours h4 { font-size: .95rem; font-weight: 800; margin-bottom: 6px; }
.cm-contact-hours p { font-size: .88rem; color: var(--cmc-muted); margin: 0; }

/* ---------- track order ---------- */
.cm-track-card { max-width: 640px; margin-inline: auto; background: #fff; border: 1px solid var(--cmc-border); border-radius: 16px; padding: clamp(20px, 4vw, 40px); }
.cm-track-form { margin-top: 8px; }
.cm-track-head { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 8px; margin-bottom: 18px; }
.cm-track-no { font-size: 1.05rem; }
.cm-track-status { display: inline-block; margin-inline-start: 12px; background: var(--cmc-cream); color: var(--cmc-gold-dark); border-radius: 999px; padding: 4px 14px; font-weight: 700; font-size: .88rem; }
.cm-track-date { color: var(--cmc-muted); font-size: .88rem; }
.cm-steps { list-style: none; padding: 0; margin: 20px 0; display: flex; justify-content: space-between; position: relative; }
.cm-steps::before { content: ''; position: absolute; top: 9px; inset-inline: 12px; height: 2px; background: var(--cmc-border); }
.cm-steps li { position: relative; text-align: center; flex: 1; font-size: .78rem; color: var(--cmc-muted); z-index: 1; padding-top: 26px; }
.cm-step-dot { display: block; width: 20px; height: 20px; border-radius: 50%; background: #fff; border: 2px solid var(--cmc-border); margin: 0 auto 6px; position: absolute; top: 0; inset-inline: calc(50% - 10px); }
.cm-steps li.done { color: var(--cmc-green); font-weight: 700; }
.cm-steps li.done .cm-step-dot { background: var(--cmc-green); border-color: var(--cmc-green); }
.cm-track-items { margin-top: 22px; border-top: 1px dashed var(--cmc-border); padding-top: 16px; }
.cm-track-items h4 { font-size: .95rem; font-weight: 800; margin-bottom: 10px; }
.cm-track-item { display: flex; align-items: center; gap: 12px; padding: 8px 0; font-size: .93rem; }
.cm-track-item img { width: 44px; height: 44px; border-radius: 8px; object-fit: cover; flex: 0 0 auto; }
.cm-track-item span { flex: 1; }
.cm-track-item strong { white-space: nowrap; }
.cm-track-total { display: flex; justify-content: space-between; padding-top: 12px; margin-top: 6px; border-top: 1px solid var(--cmc-border); font-size: .95rem; }
.cm-track-note { margin-top: 18px; font-size: .88rem; color: var(--cmc-muted); }
.cm-track-note a { color: var(--cmc-gold-dark); font-weight: 700; }

/* ---------- order thanks ---------- */
.cm-thanks { padding-block: 40px; }
.cm-thanks-card { max-width: 640px; margin-inline: auto; background: #fff; border: 1px solid var(--cmc-border); border-radius: 18px; padding: clamp(24px, 5vw, 48px); text-align: center; }
.cm-thanks-ico { font-size: 2.6rem; margin-bottom: 8px; }
.cm-thanks-card h1 { font-size: 1.5rem; font-weight: 800; margin-bottom: 6px; }
.cm-thanks-sub { color: var(--cmc-muted); margin-bottom: 20px; }
.cm-thanks-order { background: var(--cmc-cream); border: 1px dashed var(--cmc-gold); border-radius: 12px; padding: 14px; display: flex; flex-direction: column; gap: 4px; margin-bottom: 20px; }
.cm-thanks-order span { font-size: .85rem; color: var(--cmc-muted); }
.cm-thanks-order strong { font-size: 1.25rem; letter-spacing: .5px; }
.cm-thanks-details { text-align: start; margin-bottom: 20px; }
.cm-thanks-row { display: flex; justify-content: space-between; gap: 16px; padding: 8px 0; border-bottom: 1px dashed var(--cmc-border); font-size: .92rem; }
.cm-thanks-row span { color: var(--cmc-muted); flex-shrink: 0; }
.cm-thanks-row strong { text-align: end; }
.cm-thanks-items { text-align: start; margin-bottom: 22px; }
.cm-thanks-items h3 { font-size: 1rem; font-weight: 800; margin-bottom: 10px; }
.cm-thanks-actions { display: flex; gap: 10px; justify-content: center; flex-wrap: wrap; margin-bottom: 16px; }
.cm-thanks-wa { display: inline-block; color: var(--cmc-green); font-weight: 700; font-size: .92rem; }

/* ---------- checkout additions ---------- */
.cm-pay-option { display: flex; align-items: center; gap: 10px; border: 1px solid var(--cmc-border); border-radius: 10px; padding: 12px 16px; margin-bottom: 8px; cursor: pointer; font-weight: 600; }
.cm-pay-option input { width: 18px; height: 18px; accent-color: var(--cmc-gold); }
.cm-pay-note { background: var(--cmc-trust-bg); border: 1px solid var(--cmc-border); border-radius: 10px; padding: 14px 16px; font-size: .93rem; }
.cm-pay-note p { margin: 0 0 8px; }
.cm-checkout-trust { display: flex; flex-direction: column; gap: 8px; margin-top: 14px; background: var(--cmc-trust-bg); border-radius: 12px; padding: 16px; font-size: .9rem; color: #444; }
.cm-checkout-error { margin-top: 12px; background: #fdeeee; color: var(--cmc-red); border-radius: 10px; padding: 12px 16px; font-size: .9rem; }
.cm-sum-line { display: flex; justify-content: space-between; padding: 6px 0; font-size: .93rem; }
.cm-sum-total { border-top: 1px solid var(--cmc-border); margin-top: 6px; padding-top: 10px; font-weight: 800; font-size: 1.02rem; }
.cm-ship-line, .cm-sum-ship { display: flex; justify-content: space-between; font-size: .88rem; color: var(--cmc-muted); }

/* ---------- cart: shipping progress + upsell ---------- */
.cm-ship-wrap { margin-bottom: 18px; }
.cm-ship-msg { font-size: .95rem; font-weight: 700; margin-bottom: 8px; color: var(--cmc-ink); }
.cm-ship-bar { height: 10px; border-radius: 999px; background: var(--cmc-cream2); overflow: hidden; }
.cm-ship-bar span { display: block; height: 100%; background: linear-gradient(90deg, var(--cmc-gold), var(--cmc-gold-dark)); border-radius: 999px; transition: width .4s ease; }
.cm-upsell { margin-top: 34px; }
.cm-upsell h3 { font-size: 1.1rem; font-weight: 800; margin-bottom: 14px; }
.cm-upsell-row { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 12px; }
.cm-upsell-card { background: #fff; border: 1px solid var(--cmc-border); border-radius: 12px; padding: 10px; display: flex; flex-direction: column; gap: 6px; text-decoration: none; color: inherit; transition: box-shadow .2s; }
.cm-upsell-card:hover { box-shadow: 0 6px 18px rgba(0,0,0,.07); }
.cm-upsell-card img { width: 100%; aspect-ratio: 1; object-fit: cover; border-radius: 8px; }
.cm-upsell-card span { font-size: .85rem; font-weight: 600; line-height: 1.5; }
.cm-upsell-card strong { color: var(--cmc-gold-dark); font-size: .9rem; }

/* ---------- search suggest ---------- */
.cmx-search { position: relative; }
.cm-suggest {
    position: absolute; top: calc(100% + 6px); inset-inline: 0; background: #fff; z-index: 1050;
    border: 1px solid var(--cmc-border); border-radius: 12px; box-shadow: 0 14px 34px rgba(0,0,0,.12); overflow: hidden;
}
.cm-suggest-item { display: flex; align-items: center; gap: 10px; padding: 10px 14px; text-decoration: none; color: inherit; border-bottom: 1px solid #f4efe7; font-size: .9rem; }
.cm-suggest-item:hover { background: var(--cmc-trust-bg); }
.cm-suggest-item img { width: 40px; height: 40px; border-radius: 8px; object-fit: cover; flex: 0 0 auto; }
.cm-suggest-name { flex: 1; line-height: 1.5; font-weight: 600; }
.cm-suggest-price { color: var(--cmc-gold-dark); font-weight: 800; white-space: nowrap; }
.cm-suggest-all { display: block; text-align: center; padding: 11px; font-weight: 700; color: var(--cmc-gold-dark); background: var(--cmc-cream); font-size: .9rem; text-decoration: none; }

/* ---------- product page additions ---------- */
.cm-pdp-trust { display: flex; flex-direction: column; gap: 8px; background: var(--cmc-trust-bg); border-radius: 12px; padding: 14px 16px; margin-block: 18px; font-size: .9rem; color: #444; }
.cm-pdp-trust a { color: var(--cmc-gold-dark); font-weight: 700; }
.cm-pdp-specs { margin-top: 26px; }
.cm-pdp-specs h3, .cm-pdp-care h3 { font-size: 1.05rem; font-weight: 800; margin-bottom: 12px; }
.cm-pdp-specs dl { background: #fff; border: 1px solid var(--cmc-border); border-radius: 12px; overflow: hidden; margin: 0; }
.cm-spec-row { display: flex; justify-content: space-between; gap: 14px; padding: 11px 16px; border-bottom: 1px solid #f1ebe1; font-size: .92rem; }
.cm-spec-row:last-child { border-bottom: 0; }
.cm-spec-row dt { color: var(--cmc-muted); flex-shrink: 0; }
.cm-spec-row dd { margin: 0; text-align: end; font-weight: 600; }
.cm-spec-row a { color: var(--cmc-gold-dark); }
.cm-pdp-care { margin-top: 22px; }
.cm-pdp-care p { background: var(--cmc-cream); border-radius: 12px; padding: 14px 16px; font-size: .92rem; color: #444; margin: 0; line-height: 1.8; }
.cm-stock.low { color: #a06500; background: #fdf6e8; }

/* ---------- mobile sticky CTA ---------- */
.cm-sticky-cta {
    position: fixed; bottom: 0; inset-inline: 0; z-index: 1080;
    background: #fff; border-top: 1px solid var(--cmc-border);
    display: none; align-items: center; gap: 12px; padding: 10px 16px calc(10px + env(safe-area-inset-bottom));
    box-shadow: 0 -8px 24px rgba(0,0,0,.08);
    transform: translateY(100%); transition: transform .25s ease;
}
.cm-sticky-cta.show { transform: translateY(0); }
.cm-sticky-price { font-weight: 800; font-size: 1.05rem; color: var(--cmc-ink); white-space: nowrap; }
.cm-sticky-price small { color: var(--cmc-muted); font-weight: 600; }
.cm-sticky-add { flex: 1; height: 50px; border: 0; border-radius: 12px; background: var(--cmc-gold); color: #fff; font-weight: 800; font-size: 1rem; cursor: pointer; }
.cm-sticky-add:active { background: var(--cmc-gold-dark); }
@media (max-width: 1023px) { .cm-sticky-cta { display: flex; } }
@media (min-width: 1024px) { .cm-sticky-cta { display: none !important; } }

/* ---------- toolbar / filters ---------- */
.cm-toolbar { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin: 18px 0 14px; flex-wrap: wrap; }
.cm-count { color: var(--cmc-muted); font-size: .9rem; }
.cm-toolbar-actions { display: flex; align-items: center; gap: 10px; }
.cm-sort-form { display: flex; align-items: center; gap: 8px; }
.cm-sort-label { font-size: .88rem; color: var(--cmc-muted); }
.cm-sort { width: auto; font-size: .88rem; padding: 6px 30px 6px 12px; border-radius: 10px; border: 1px solid var(--cmc-border); background: #fff; }
.cm-filter-toggle { border: 1px solid var(--cmc-border); background: #fff; border-radius: 10px; padding: 8px 16px; font-weight: 700; font-size: .88rem; cursor: pointer; }
.cm-filter-panel { background: #fff; border: 1px solid var(--cmc-border); border-radius: 14px; padding: 18px; margin-bottom: 20px; }
.cm-filter-panel h4 { font-size: .92rem; font-weight: 800; margin: 0 0 10px; }
.cm-filter-cats { display: flex; flex-wrap: wrap; gap: 10px 18px; margin-bottom: 16px; }
.cm-check { display: flex; align-items: center; gap: 8px; font-size: .9rem; cursor: pointer; }
.cm-check input { width: 17px; height: 17px; accent-color: var(--cmc-gold); }
.cm-filter-price { display: flex; align-items: center; gap: 10px; margin-bottom: 16px; }
.cm-filter-price input { width: 110px; padding: 9px 12px; border: 1px solid var(--cmc-border); border-radius: 10px; font-size: .9rem; }
.cm-filter-actions { display: flex; gap: 10px; }
.cm-btn-ghost { border: 1px solid var(--cmc-border); border-radius: 12px; padding: 10px 22px; font-weight: 700; color: var(--cmc-muted); text-decoration: none; display: inline-block; }

/* filter panel: desktop static, mobile bottom sheet */
@media (max-width: 767px) {
    .cm-filter-panel { position: fixed; inset: auto 0 0 0; border-radius: 18px 18px 0 0; z-index: 1100; margin: 0; display: none; box-shadow: 0 -12px 40px rgba(0,0,0,.15); padding-bottom: calc(18px + env(safe-area-inset-bottom)); }
    .cm-filter-panel.open { display: block; }
}
@media (min-width: 768px) {
    .cm-filter-toggle { display: none; }
    .cm-filter-panel { display: block !important; }
}

/* ---------- cookie consent ---------- */
.cm-cookie-bar { position: fixed; bottom: 0; inset-inline: 0; z-index: 1200; background: var(--cmc-dark); color: #fff; padding: 14px 16px calc(14px + env(safe-area-inset-bottom)); box-shadow: 0 -10px 30px rgba(0,0,0,.25); }
.cm-cookie-inner { max-width: 1200px; margin-inline: auto; display: flex; align-items: center; justify-content: space-between; gap: 18px; flex-wrap: wrap; }
.cm-cookie-inner p { margin: 0; font-size: .86rem; line-height: 1.7; flex: 1; min-width: 240px; }
.cm-cookie-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.cm-cookie-btn { border: 1px solid rgba(255,255,255,.35); background: transparent; color: #fff; border-radius: 999px; padding: 9px 18px; font-size: .85rem; font-weight: 700; cursor: pointer; }
.cm-cookie-btn:hover { background: rgba(255,255,255,.1); }
.cm-cookie-accept { background: var(--cmc-gold); border-color: var(--cmc-gold); }
.cm-cookie-modal { position: fixed; inset: 0; z-index: 1210; background: rgba(0,0,0,.5); display: flex; align-items: center; justify-content: center; padding: 20px; }
.cm-cookie-modal[hidden] { display: none; }
.cm-cookie-modal-card { background: #fff; border-radius: 16px; padding: 26px; max-width: 480px; width: 100%; }
.cm-cookie-modal-card h3 { font-size: 1.1rem; font-weight: 800; margin-bottom: 16px; }
.cm-cookie-row { display: flex; gap: 10px; align-items: flex-start; padding: 10px 0; border-bottom: 1px dashed var(--cmc-border); font-size: .9rem; cursor: pointer; }
.cm-cookie-row input { width: 18px; height: 18px; accent-color: var(--cmc-gold); margin-top: 2px; }
.cm-cookie-modal-card .cm-cookie-actions { margin-top: 18px; }
.cm-cookie-modal-card .cm-cookie-btn { color: var(--cmc-ink); border-color: var(--cmc-border); }
.cm-cookie-modal-card .cm-cookie-save { background: var(--cmc-gold); color: #fff; border-color: var(--cmc-gold); }

/* ---------- footer legal / payment row ---------- */
.cm-footer-legal { display: flex; flex-wrap: wrap; gap: 8px 22px; justify-content: center; padding: 18px 0 6px; margin-top: 26px; border-top: 1px solid rgba(255,255,255,.12); font-size: .82rem; color: rgba(255,255,255,.75); }
.cm-footer-legal a { color: var(--cmc-gold); text-decoration: underline; }
.cm-footer-phone { text-align: center; font-size: .85rem; color: rgba(255,255,255,.85); padding-bottom: 8px; }
.cm-footer-phone a { color: #fff; font-weight: 700; }
.cmx-payment-row { display: flex; gap: 10px; justify-content: center; align-items: center; padding: 10px 0 0; flex-wrap: wrap; }
.cmx-payment-row img { height: 26px; width: auto; opacity: .9; }

/* ---------- guides ---------- */
.cm-guide-card { background: #fff; border: 1px solid var(--cmc-border); border-radius: 14px; overflow: hidden; display: block; text-decoration: none; color: inherit; transition: box-shadow .2s; }
.cm-guide-card:hover { box-shadow: 0 8px 24px rgba(0,0,0,.08); }
.cm-guide-card img { width: 100%; aspect-ratio: 16/9; object-fit: cover; }
.cm-guide-body { padding: 16px 18px; }
.cm-guide-body h3 { font-size: 1rem; font-weight: 800; margin-bottom: 6px; line-height: 1.6; }
.cm-guide-body p { font-size: .87rem; color: var(--cmc-muted); margin: 0; line-height: 1.7; }
.cm-article { max-width: 760px; margin-inline: auto; background: #fff; border: 1px solid var(--cmc-border); border-radius: 16px; padding: clamp(20px, 4vw, 44px); }
.cm-article h2 { font-size: 1.25rem; font-weight: 800; margin: 26px 0 10px; }
.cm-article h3 { font-size: 1.05rem; font-weight: 800; margin: 20px 0 8px; }
.cm-article p { line-height: 2; color: #333; font-size: .98rem; }
.cm-article ul { padding-inline-start: 22px; }
.cm-article li { line-height: 2; color: #333; }

/* ---------- misc ---------- */
.cm-cat-desc { color: var(--cmc-muted); max-width: 640px; line-height: 1.8; margin-top: 8px; font-size: .93rem; }
.cm-hint { font-size: .85rem; color: var(--cmc-muted); margin-top: 10px; line-height: 1.7; }

/* focus states (a11y) */
a:focus-visible, button:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible, summary:focus-visible {
    outline: 3px solid rgba(200,138,23,.55); outline-offset: 2px; border-radius: 6px;
}

/* ---------- home: hero checks + why list + faq home (appended) ---------- */
.cmx-hero-checks { list-style: none; display: flex; flex-wrap: wrap; gap: 8px 18px; padding: 0; margin: 18px 0 0; }
.cmx-hero-checks li { font-size: .88rem; font-weight: 700; color: #3d3d3d; }
.cmx-why-list { list-style: none; padding: 0; margin: 14px 0 18px; display: flex; flex-direction: column; gap: 10px; }
.cmx-why-list li { font-size: .95rem; line-height: 1.8; color: #3a3a3a; }
.cmx-why-list strong { color: var(--cmc-ink); }
.cmx-faq-home { background: var(--cmc-trust-bg); padding-block: 56px; }
.cm-article-cta { margin-top: 32px; background: var(--cmc-cream); border-radius: 14px; padding: 24px; text-align: center; }
.cm-article-cta h3 { font-weight: 800; margin-bottom: 6px; }
.cm-article-cta p { color: var(--cmc-muted); margin-bottom: 14px; }
.cm-article-hero { width: 100%; border-radius: 14px; margin-bottom: 20px; aspect-ratio: 16/9; object-fit: cover; }
.cm-admin { padding-block: 24px 60px; }
.cm-admin h1 { font-size: 1.5rem; font-weight: 800; margin-bottom: 8px; }
.cm-admin-note { color: var(--cmc-muted); font-size: .92rem; margin-bottom: 20px; }
.cm-admin-card { background: #fff; border: 1px solid var(--cmc-border); border-radius: 14px; padding: 22px; margin-bottom: 18px; }
.cm-admin-card h2 { font-size: 1.05rem; font-weight: 800; margin-bottom: 4px; }
.cm-admin-hint { color: var(--cmc-muted); font-size: .84rem; margin-bottom: 14px; }
.cm-admin-table { background: #fff; border: 1px solid var(--cmc-border); border-radius: 14px; padding: 10px; }
.cm-badge-status { border-radius: 999px; padding: 4px 12px; font-size: .78rem; font-weight: 700; }
.cm-badge-status.new { background: #fdf6e8; color: #a06500; }
.cm-badge-status.confirmed, .cm-badge-status.preparing { background: #e8f0fd; color: #1d4fa0; }
.cm-badge-status.shipped, .cm-badge-status.out_delivery { background: #f0e8fd; color: #5b2fa0; }
.cm-badge-status.delivered { background: #eef7f1; color: var(--cmc-green); }
.cm-badge-status.cancelled { background: #fdeeee; color: var(--cmc-red); }
.cm-badge-pay { border-radius: 999px; padding: 3px 10px; font-size: .75rem; font-weight: 700; }
.cm-badge-pay.paid { background: #eef7f1; color: var(--cmc-green); }
.cm-badge-pay.pending { background: #fdf6e8; color: #a06500; }
.cm-badge-pay.refunded { background: #fdeeee; color: var(--cmc-red); }
.cm-order-details { padding: 12px 4px; font-size: .9rem; }
.cm-od-addr { margin-bottom: 8px; color: #444; }
.cm-od-item { padding: 4px 0; border-bottom: 1px dashed #eee; }
.cm-od-total { padding-top: 8px; font-weight: 700; }
.cm-msg-list { display: flex; flex-direction: column; gap: 12px; }
.cm-msg-card { background: #fff; border: 1px solid var(--cmc-border); border-radius: 12px; padding: 16px 18px; }
.cm-msg-card.new { border-inline-start: 4px solid var(--cmc-gold); }
.cm-msg-head { display: flex; flex-wrap: wrap; gap: 6px 16px; align-items: center; font-size: .88rem; margin-bottom: 8px; }
.cm-msg-topic { background: var(--cmc-cream); color: var(--cmc-gold-dark); border-radius: 999px; padding: 3px 12px; font-weight: 700; font-size: .78rem; }
.cm-msg-date { color: var(--cmc-muted); font-size: .8rem; margin-inline-start: auto; }
.cm-msg-subject { font-weight: 800; margin-bottom: 4px; font-size: .95rem; }
.cm-msg-body { font-size: .92rem; color: #444; line-height: 1.8; background: var(--cmc-trust-bg); border-radius: 10px; padding: 12px 14px; margin-bottom: 10px; }
.cm-msg-actions { display: flex; gap: 8px; align-items: center; }
.cm-admin-page-edit { background: #fff; border: 1px solid var(--cmc-border); border-radius: 12px; padding: 0; margin-bottom: 12px; overflow: hidden; }
.cm-admin-page-edit summary { cursor: pointer; padding: 16px 18px; font-weight: 700; display: flex; justify-content: space-between; align-items: center; gap: 10px; }
.cm-admin-page-edit summary::-webkit-details-marker { display: none; }
.cm-admin-page-edit summary::after { content: 'تعديل ▾'; color: var(--cmc-gold-dark); font-size: .84rem; font-weight: 700; }
.cm-admin-page-edit[open] summary::after { content: 'إغلاق ▴'; }
.cm-admin-page-edit form { padding: 4px 18px 20px; }
.cm-admin-page-url { color: var(--cmc-muted); font-size: .8rem; }
.cm-admin-faq-row { display: flex; justify-content: space-between; gap: 14px; background: #fff; border: 1px solid var(--cmc-border); border-radius: 12px; padding: 14px 16px; margin-bottom: 10px; align-items: flex-start; }
.cm-admin-faq-row p { margin: 6px 0 0; color: #555; font-size: .9rem; }
.cm-btn-danger { background: var(--cmc-red); color: #fff; border: 0; border-radius: 10px; padding: 8px 16px; font-weight: 700; cursor: pointer; }

/* ---------- bundles + reviews (appended) ---------- */
.cm-bundles-pdp { margin-top: 36px; }
.cm-bundle-card { display: flex; flex-wrap: wrap; gap: 16px; justify-content: space-between; align-items: center; background: #fff; border: 1px solid var(--cmc-border); border-radius: 14px; padding: 18px 20px; margin-bottom: 12px; }
.cm-bundle-info { flex: 1 1 300px; }
.cm-bundle-info h3 { font-weight: 800; margin-bottom: 4px; }
.cm-bundle-info p { color: var(--cmc-muted); font-size: .88rem; margin-bottom: 8px; }
.cm-bundle-items { list-style: none; padding: 0; margin: 0 0 10px; }
.cm-bundle-items li { display: flex; justify-content: space-between; gap: 10px; padding: 6px 0; border-bottom: 1px dashed #eee; font-size: .9rem; }
.cm-bundle-items li span { color: var(--cmc-muted); white-space: nowrap; }
.cm-bundle-price { display: flex; align-items: baseline; gap: 10px; }
.cm-bundle-sum { color: var(--cmc-muted); text-decoration: line-through; font-size: .85rem; }
.cm-bundle-price strong { font-size: 1.15rem; color: var(--cmc-gold-dark); }
.cm-reviews-pdp { margin-top: 40px; }
.cm-reviews-summary { display: flex; align-items: center; gap: 8px; margin-bottom: 14px; }
.cm-reviews-summary .cm-stars { color: #e8a020; font-size: 1.1rem; letter-spacing: 2px; }
.cm-review-card { background: #fff; border: 1px solid var(--cmc-border); border-radius: 12px; padding: 14px 16px; margin-bottom: 10px; }
.cm-review-head { display: flex; flex-wrap: wrap; gap: 6px 12px; align-items: center; font-size: .85rem; margin-bottom: 6px; }
.cm-review-head .cm-stars { color: #e8a020; letter-spacing: 1px; }
.cm-review-verified { background: #eef7f1; color: var(--cmc-green); border-radius: 999px; padding: 2px 10px; font-weight: 700; font-size: .75rem; }
.cm-review-variant { background: var(--cmc-cream); border-radius: 999px; padding: 2px 10px; font-size: .75rem; color: #6b5d4f; }
.cm-review-date { color: var(--cmc-muted); font-size: .78rem; margin-inline-start: auto; }
.cm-review-card p { margin: 0; font-size: .92rem; line-height: 1.8; color: #3d3d3d; }
.cm-review-photo { max-width: 110px; border-radius: 8px; margin-bottom: 8px; }
.cm-reviews-empty { color: var(--cmc-muted); margin-bottom: 12px; }
.cm-review-form { background: var(--cmc-trust-bg); border-radius: 12px; padding: 18px; margin-top: 12px; max-width: 560px; }
.cm-review-status { display: inline-block; margin-inline-start: 10px; font-size: .88rem; color: var(--cmc-green); }

/* ---------- FIX: product grid cards + pagination + mobile nav ---------- */
/* Product card body (used in cmx-products-grid) */
.cmx-product-body { padding: 12px 14px 14px; display: flex; flex-direction: column; gap: 6px; flex: 1; }
.cmx-product-cat { font-size: .74rem; color: var(--cmc-muted, #8a7d6b); font-weight: 700; }
.cmx-product-name { font-size: .95rem; font-weight: 700; line-height: 1.55; margin: 0; }
.cmx-product-name a { color: var(--cmc-ink, #2d2a26); text-decoration: none; }
.cmx-product-name a:hover { color: var(--cmc-gold-dark, #a06500); }
.cmx-product-price { font-weight: 800; color: var(--cmc-gold-dark, #a06500); font-size: 1.02rem; }
.cmx-product-add { margin-top: auto; display: flex; align-items: center; justify-content: center; gap: 8px; border: 1.5px solid var(--cmc-gold, #c38744); background: #fff; color: var(--cmc-gold-dark, #a06500); border-radius: 10px; padding: 9px 12px; font-weight: 800; font-size: .86rem; cursor: pointer; transition: .2s; min-height: 44px; }
.cmx-product-add:hover { background: var(--cmc-gold, #c38744); color: #fff; }
.cmx-product-add .spinner-border { display: none; }
.cmx-product-add.loading .spinner-border { display: inline-block; }

/* Home featured grid on mobile: 2 cols tight */
@media(max-width:767px) {
    .cmx-products-grid { grid-template-columns: repeat(2, 1fr) !important; gap: 12px !important; }
    .cmx-product-name { font-size: .88rem; }
}

/* ---------- Mobile nav (drawer) — was completely missing ---------- */
.cmx-mobile-nav { display: none; position: fixed; inset: 0; z-index: 999; background: rgba(30,25,18,.45); }
.cmx-mobile-nav.cmx-open { display: block; }
.cmx-mobile-nav::before { content: ''; position: absolute; inset: 0; }
.cmx-mobile-nav > a { position: relative; display: block; background: #fff; border-bottom: 1px solid #f0ebe3; padding: 14px 22px; color: var(--cmc-ink, #2d2a26); font-weight: 700; font-size: .98rem; text-decoration: none; max-width: 320px; margin-inline-start: auto; }
.cmx-mobile-nav > a:first-child { border-radius: 0 0 0 0; padding-top: 20px; }
.cmx-mobile-nav > a:hover { background: var(--cmc-cream, #faf6f0); color: var(--cmc-gold-dark, #a06500); }
@media(min-width:1025px) { .cmx-mobile-nav { display: none !important; } }

/* ---------- Bootstrap-styled Laravel pagination ---------- */
.cm-page-nav { display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; align-items: center; margin-top: 28px; }
.cm-page-nav nav[role="navigation"] { width: 100%; }
.cm-page-nav ul { display: flex; flex-wrap: wrap; gap: 6px; list-style: none; padding: 0; margin: 0; justify-content: center; }
.cm-page-nav li { display: block; }
.cm-page-nav li span, .cm-page-nav li a { display: inline-flex; align-items: center; justify-content: center; min-width: 42px; height: 42px; padding: 0 12px; border: 1px solid var(--cmc-border, #e7e0d4); border-radius: 10px; background: #fff; color: var(--cmc-ink, #2d2a26); font-weight: 700; font-size: .92rem; text-decoration: none; transition: .18s; }
.cm-page-nav li a:hover { border-color: var(--cmc-gold, #c38744); color: var(--cmc-gold-dark, #a06500); }
.cm-page-nav li.active span, .cm-page-nav li.active a { background: var(--cmc-gold, #c38744); border-color: var(--cmc-gold, #c38744); color: #fff; }
.cm-page-nav li.disabled span { color: #b9b0a3; cursor: not-allowed; opacity: .6; }
/* neutralize leftover tailwind utility classes inside pagination */
.cm-page-nav [class*="inline-flex"], .cm-page-nav [class*="flex "], .cm-page-nav [class*="px-4"], .cm-page-nav [class*="text-"], .cm-page-nav [class*="bg-"], .cm-page-nav [class*="border-"], .cm-page-nav [class*="rounded-"], .cm-page-nav [class*="dark:"] { all: unset; display: inline-flex !important; align-items: center; justify-content: center; min-width: 42px; height: 42px; padding: 0 12px; box-sizing: border-box; }
.cm-page-nav li > a > svg, .cm-page-nav li > span > svg { width: 18px; height: 18px; }

/* ---------- "All products" header link ---------- */
.cmx-link-all { white-space: nowrap; }
