/* ياسر للهدايا — تصميم متجر أبيض عصري. لا يعتمد على خطوط أو مكتبات خارجية. */
@font-face{font-family:"Katibeh";src:url("/assets/Katibeh-Regular.ttf") format("truetype");font-display:swap}
@font-face{font-family:"Reem Kufi";src:url("/assets/ReemKufi.ttf") format("truetype");font-display:swap}
@font-face{font-family:"Noto Naskh Arabic";src:url("/assets/NotoNaskhArabic-Regular.ttf") format("truetype");font-display:swap}

:root{
  /* ألوان الهوية: أخضر زيتوني + عاجي (من الشعار) */
  --brand:#3E4B2F;--brand-dark:#2F3A23;--brand-soft:#E9EDE3;--ivory:#F8F4EB;
  --bg:#FFFFFF;--soft:#F8F4EB;--ink:#1F2418;--muted:#555B4C;--line:#E3DFD2;
  --danger:#b32121;--focus:#2563eb;
  --wa:#128c7e;--radius:14px;--shadow:0 1px 2px rgba(31,36,24,.06),0 8px 24px rgba(31,36,24,.07);
  --max:1160px;
  --font:"Segoe UI","Noto Sans Arabic","Noto Naskh Arabic",Tahoma,"DejaVu Sans",Arial,sans-serif;
}
*,*::before,*::after{box-sizing:border-box}
html{-webkit-text-size-adjust:100%;scroll-behavior:smooth}
body{margin:0;background:var(--bg);color:var(--ink);font-family:var(--font);font-size:17px;line-height:1.75}
img,svg{max-width:100%;height:auto}
a{color:var(--brand-dark);text-underline-offset:3px}
a:hover{color:var(--brand)}
h1,h2,h3{line-height:1.3;margin:0 0 .5em;color:var(--ink);font-weight:700}
h1{font-size:clamp(1.9rem,4.5vw,3rem)}
h2{font-size:clamp(1.5rem,3vw,2.1rem)}
h3{font-size:1.15rem}
p{margin:0 0 1em}
[hidden]{display:none!important}
:focus-visible{outline:3px solid var(--focus);outline-offset:2px;border-radius:4px}
.container{width:min(100% - 32px,var(--max));margin-inline:auto}
.skip{position:absolute;inset-inline-start:12px;top:-60px;background:var(--ink);color:#fff;padding:10px 16px;border-radius:8px;z-index:100}
.skip:focus{top:12px;color:#fff}
.kicker{display:inline-block;color:var(--brand-dark);background:var(--brand-soft);font-size:.85rem;font-weight:700;padding:2px 12px;border-radius:99px;margin-bottom:12px}
.muted{color:var(--muted)}

/* الأزرار */
.btn,.button,button.primary,.primary{display:inline-flex;align-items:center;justify-content:center;gap:8px;min-height:46px;padding:10px 22px;border-radius:12px;border:1.5px solid var(--brand);background:var(--brand);color:#fff;font:inherit;font-weight:700;text-decoration:none;cursor:pointer;transition:background .15s,transform .15s}
.btn:hover,.button:hover,.primary:hover{background:var(--brand-dark);border-color:var(--brand-dark);color:#fff}
.btn:active{transform:translateY(1px)}
.btn-secondary,.btn-ghost{background:#fff;color:var(--brand-dark);border-color:var(--line)}
.btn-secondary:hover,.btn-ghost:hover{background:var(--soft);color:var(--brand-dark);border-color:var(--brand)}
.btn-wa{background:var(--wa);border-color:var(--wa)}
.btn-wa:hover{background:#0e7367;border-color:#0e7367}
.btn-sm{min-height:38px;padding:6px 16px;font-size:.95rem}
button:disabled{opacity:.5;cursor:not-allowed}

/* الترويسة */
.site-header{position:sticky;top:0;z-index:50;background:rgba(255,255,255,.96);backdrop-filter:blur(8px);border-bottom:1px solid var(--line)}
.header-row{display:flex;align-items:center;gap:20px;min-height:68px}
.brand{display:flex;align-items:center;gap:10px;color:var(--ink);text-decoration:none;font-weight:800;font-size:1.2rem}
.brand-mark{display:block;flex:none;width:44px;height:44px;border-radius:10px}
.main-nav{display:flex;gap:4px;margin-inline-start:auto}
.main-nav a{padding:8px 14px;border-radius:10px;color:var(--ink);text-decoration:none;font-weight:600}
.main-nav a:hover,.main-nav a[aria-current="page"]{background:var(--brand-soft);color:var(--brand-dark)}
.menu-toggle{display:none;margin-inline-start:auto;background:#fff;border:1.5px solid var(--line);border-radius:10px;width:46px;height:46px;font-size:1.3rem;cursor:pointer}
@media(max-width:820px){
  .menu-toggle{display:block}
  .header-cta{display:none}
  .main-nav{display:none;position:absolute;inset-inline:0;top:100%;flex-direction:column;background:#fff;border-bottom:1px solid var(--line);padding:10px 16px 16px;margin:0}
  .main-nav.is-open{display:flex}
  .main-nav a{padding:12px 14px}
}

/* الواجهة الرئيسية */
.hero{background:linear-gradient(180deg,var(--soft),#fff);padding:56px 0 40px}
.hero-grid{display:grid;grid-template-columns:1.05fr .95fr;gap:40px;align-items:center}
.hero p.lead{font-size:1.2rem;color:var(--muted);max-width:34em}
.hero-actions{display:flex;flex-wrap:wrap;gap:12px;margin-top:20px}
.hero-media{display:grid;grid-template-columns:1fr 1fr;gap:12px}
.hero-media img{width:100%;height:100%;object-fit:cover;border-radius:var(--radius);box-shadow:var(--shadow);background:var(--soft)}
.hero-media img:first-child{grid-row:span 2;aspect-ratio:3/4}
.hero-media img:last-child{aspect-ratio:4/3}
.trust{display:flex;flex-wrap:wrap;gap:10px 22px;padding:0;margin:26px 0 0;list-style:none;color:var(--muted);font-size:.95rem}
.trust li::before{content:"✓";color:var(--brand);font-weight:800;margin-inline-end:6px}
@media(max-width:820px){.hero{padding:32px 0}.hero-grid{grid-template-columns:1fr}}
.section{padding:56px 0}
.section.alt{background:var(--soft)}
.section-head{max-width:46em;margin-bottom:28px}
.section-head p{color:var(--muted)}

/* بطاقات المنتجات */
.product-grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(250px,1fr));gap:22px;list-style:none;margin:0;padding:0}
.product-card{display:flex;flex-direction:column;background:#fff;border:1px solid var(--line);border-radius:var(--radius);overflow:hidden;box-shadow:var(--shadow);height:100%}
.product-card .thumb{display:block;aspect-ratio:1/1;background:var(--soft);overflow:hidden}
.product-card .thumb img{width:100%;height:100%;object-fit:cover;transition:transform .35s}
.product-card:hover .thumb img{transform:scale(1.04)}
.product-card .body{display:flex;flex-direction:column;gap:6px;padding:16px 18px 18px;flex:1}
.product-card h3{margin:0}
.product-card h3 a{color:var(--ink);text-decoration:none}
.product-card h3 a:hover{color:var(--brand-dark)}
.product-card p{margin:0;color:var(--muted);font-size:.95rem;flex:1}
.price{font-weight:800;font-size:1.15rem;color:var(--brand-dark)}
.price small{font-weight:500;color:var(--muted);font-size:.8rem}
.card-actions{display:flex;gap:8px;margin-top:10px;flex-wrap:wrap}
.chips{display:flex;flex-wrap:wrap;gap:8px;margin:0 0 22px}
.chip{border:1.5px solid var(--line);background:#fff;color:var(--ink);font:inherit;font-weight:600;padding:6px 16px;border-radius:99px;cursor:pointer}
.chip[aria-pressed="true"]{background:var(--brand);border-color:var(--brand);color:#fff}
.tag{display:inline-block;font-size:.78rem;font-weight:700;background:var(--brand-soft);color:var(--brand-dark);padding:1px 10px;border-radius:99px;align-self:flex-start}

/* خطوات وأسئلة */
.steps-grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(220px,1fr));gap:18px;list-style:none;margin:0;padding:0;counter-reset:s}
.steps-grid li{counter-increment:s;background:#fff;border:1px solid var(--line);border-radius:var(--radius);padding:20px}
.steps-grid li::before{content:counter(s);display:grid;place-items:center;width:34px;height:34px;border-radius:50%;background:var(--brand);color:#fff;font-weight:800;margin-bottom:10px}
.steps-grid strong{display:block;margin-bottom:4px}
.info-grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(230px,1fr));gap:18px;list-style:none;margin:0;padding:0}
.info-grid li{background:#fff;border:1px solid var(--line);border-radius:var(--radius);padding:20px}
.info-grid strong{display:block;font-size:1.1rem;margin-bottom:4px}
.faq details{border:1px solid var(--line);border-radius:12px;padding:4px 18px;margin-bottom:10px;background:#fff}
.faq summary{cursor:pointer;font-weight:700;padding:12px 0}
.faq details[open] summary{color:var(--brand-dark)}

/* صفحة المنتج */
.breadcrumb{font-size:.9rem;color:var(--muted);padding:16px 0 0}
.breadcrumb ol{display:flex;flex-wrap:wrap;gap:6px;list-style:none;padding:0;margin:0}
.breadcrumb li+li::before{content:"‹";margin-inline-end:6px;color:var(--muted)}
.breadcrumb a{color:var(--muted)}
.product-layout{display:grid;grid-template-columns:1fr 1fr;gap:40px;padding:24px 0 48px;align-items:start}
.product-media img{width:100%;border-radius:var(--radius);background:var(--soft);box-shadow:var(--shadow)}
.product-info .price{font-size:1.6rem;display:block;margin:6px 0 14px}
.spec{width:100%;border-collapse:collapse;margin:18px 0}
.spec th,.spec td{text-align:start;padding:10px 12px;border-bottom:1px solid var(--line);font-size:.97rem}
.spec th{width:34%;color:var(--muted);font-weight:600}
@media(max-width:820px){.product-layout{grid-template-columns:1fr;gap:22px}}

/* المصمّم: بورد المشية */
.customizer{padding:48px 0;background:var(--soft)}
.customizer-head{max-width:46em;margin-bottom:22px}
.customizer-layout{display:grid;grid-template-columns:minmax(300px,480px) 1fr;gap:28px;align-items:start}
.customizer-board-shell{position:sticky;top:84px;background:#fff;border:1px solid var(--line);border-radius:var(--radius);padding:16px;position:relative;box-shadow:var(--shadow)}
.board-ruler{display:flex;justify-content:space-between;align-items:baseline;font-weight:700;font-size:.95rem;margin-bottom:8px}
.board-ruler small{color:var(--muted);font-weight:500}
.aspect-lock{display:inline-flex;align-items:center;gap:6px;font:inherit;font-size:.9rem;font-weight:600;border:1.5px solid var(--line);background:#fff;border-radius:99px;padding:3px 12px;cursor:pointer;margin-bottom:8px}
.aspect-lock[aria-pressed="true"]{border-color:var(--brand);background:var(--brand-soft);color:var(--brand-dark)}
.board-stage{border-radius:10px;overflow:hidden;line-height:0;background:#20372b;touch-action:none}
.board-svg{display:block;width:100%;height:auto;max-width:none;user-select:none;-webkit-user-select:none}
.board-dimensions rect{fill:rgba(17,24,39,.72);rx:10}
.board-dimensions text{fill:#fff;font:600 34px var(--font)}
.editable-text{cursor:grab;outline:none}
.editable-text.is-dragging{cursor:grabbing}
.editable-text.is-placeholder #text-lines{opacity:.4}
.editable-text.is-too-large #text-lines{fill:var(--danger)}
.editable-text:focus-visible .selection-box{stroke:var(--focus)}
.hit-area{fill:transparent}
.resize-handle .handle-hit{fill:transparent}
.resize-handle .handle-mark{fill:var(--focus);stroke:#fff;stroke-width:3}
.resize-handle[data-handle="nw"],.resize-handle[data-handle="se"]{cursor:nwse-resize}
.resize-handle[data-handle="ne"],.resize-handle[data-handle="sw"]{cursor:nesw-resize}
.board-hint{display:grid;gap:2px;font-size:.88rem;color:var(--muted);margin-top:10px}
.board-status{margin:10px 0 0;font-size:.92rem;color:var(--muted);min-height:2.6em}
.board-status.warning{color:#9a5b00}
.board-status.error{color:var(--danger);font-weight:600}
.customizer-controls{background:#fff;border:1px solid var(--line);border-radius:var(--radius);padding:20px;display:grid;gap:14px;box-shadow:var(--shadow)}
.customizer-controls h3{margin:0}
.customizer-field{display:grid;gap:6px}
.customizer-measures{display:grid;grid-template-columns:1fr 1fr;gap:12px}
.customizer-footnote,.measure-hint,.field-hint,small{color:var(--muted);font-size:.87rem;line-height:1.6}
.customizer-size{font-weight:700;color:var(--brand-dark)}
.ready-panel,.layer-panel{border:1px dashed var(--line);border-radius:12px;padding:12px 14px;background:var(--soft)}
.ready-list{display:flex;flex-wrap:wrap;gap:8px;margin-top:8px;max-height:210px;overflow:auto}
.ready-list p{margin:0;font-size:.9rem;color:var(--muted)}
.ready-list button{display:inline-flex;align-items:center;gap:8px;border:1.5px solid var(--line);background:#fff;border-radius:10px;font:inherit;font-size:.92rem;padding:4px 10px;cursor:pointer}
.ready-list button:hover{border-color:var(--brand);background:var(--brand-soft)}
.ready-list img{height:34px;width:auto;max-width:90px;object-fit:contain}
.layer-panel-heading{display:flex;justify-content:space-between;align-items:center;gap:8px}
.layer-panel-heading button{border:1.5px solid var(--brand);background:#fff;color:var(--brand-dark);font:inherit;font-weight:700;font-size:.9rem;padding:3px 12px;border-radius:99px;cursor:pointer}
.layer-list{display:flex;flex-wrap:wrap;gap:6px;margin-top:8px}
.layer-row{display:inline-flex;border:1.5px solid var(--line);border-radius:10px;overflow:hidden;background:#fff}
.layer-row.is-active{border-color:var(--brand);background:var(--brand-soft)}
.layer-select,.layer-remove{border:0;background:transparent;font:inherit;font-size:.9rem;padding:4px 10px;cursor:pointer;color:var(--ink)}
.layer-remove{border-inline-start:1px solid var(--line);color:var(--danger);font-weight:800}
.vector-selected-note{background:var(--brand-soft);border-radius:10px;padding:10px 14px;margin:0;font-size:.92rem}

/* نماذج */
label{font-weight:600;font-size:.95rem}
input,select,textarea{font:inherit;color:var(--ink);background:#fff;border:1.5px solid #cbd1da;border-radius:10px;padding:9px 12px;min-height:44px;width:100%}
input[type=radio],input[type=checkbox]{width:auto;min-height:0;accent-color:var(--brand)}
input[type=range]{padding:0;min-height:30px;accent-color:var(--brand)}
input[type=file]{padding:8px}
textarea{min-height:96px;resize:vertical}
input:focus,select:focus,textarea:focus{border-color:var(--brand);outline:none;box-shadow:0 0 0 3px rgba(62,75,47,.22)}
.order-section{padding:56px 0}
.order-layout{display:grid;grid-template-columns:1fr 1.1fr;gap:36px;align-items:start}
.order-intro ol{padding-inline-start:20px;color:var(--muted)}
.order-card{background:#fff;border:1px solid var(--line);border-radius:var(--radius);padding:24px;box-shadow:var(--shadow);display:grid;gap:14px}
.order-card h3{margin:0}
.order-product{display:flex;gap:14px;align-items:center}
.order-thumb{width:64px;height:auto;border-radius:10px;object-fit:cover}
.order-product small{display:block}
.quantity-row,.order-total{display:flex;align-items:center;justify-content:space-between;gap:12px}
.quantity-control{display:inline-flex;align-items:center;border:1.5px solid #cbd1da;border-radius:10px;overflow:hidden}
.quantity-control button{width:42px;height:42px;border:0;background:var(--soft);font-size:1.2rem;cursor:pointer}
.quantity-control output{min-width:44px;text-align:center;font-weight:700}
.order-total{font-weight:800;font-size:1.15rem;border-top:1px solid var(--line);padding-top:12px}
.form-grid{display:grid;grid-template-columns:1fr 1fr;gap:12px}
.form-grid .full{grid-column:1/-1}
.field{display:grid;gap:5px}
.order-disclaimer{font-size:.87rem;color:var(--muted);margin:0}
@media(max-width:900px){.customizer-board-shell{position:static}.customizer-layout,.order-layout{grid-template-columns:1fr}.form-grid{grid-template-columns:1fr}}

/* مصمّم شريط القماش */
.ribbon-page{padding:32px 0 56px}
.ribbon-intro{margin-bottom:26px;max-width:48em}
.ribbon-spec{display:flex;flex-wrap:wrap;gap:8px}
.ribbon-spec span,.ribbon-spec strong{background:var(--soft);border:1px solid var(--line);border-radius:99px;padding:2px 14px;font-size:.92rem}
.ribbon-spec strong{background:var(--brand-soft);color:var(--brand-dark);border-color:transparent}
.ribbon-layout{display:grid;grid-template-columns:minmax(300px,440px) 1fr;gap:28px;align-items:start}
.ribbon-controls,.ribbon-workspace,.ribbon-cart{background:#fff;border:1px solid var(--line);border-radius:var(--radius);padding:22px;box-shadow:var(--shadow)}
.ribbon-controls{display:grid;gap:12px}
.ribbon-controls h2,.ribbon-workspace h2{font-size:1.3rem;margin:0}
.control-row{display:grid;grid-template-columns:1fr 1fr;gap:12px}
.control-row>div{display:grid;gap:5px}
fieldset{border:1px solid var(--line);border-radius:12px;padding:10px 14px;margin:0}
legend{font-weight:700;font-size:.95rem;padding:0 6px}
.choice-row{display:flex;flex-wrap:wrap;gap:10px 18px}
.choice-row label{display:inline-flex;align-items:center;gap:6px;font-weight:500}
.swatch{display:inline-block;width:18px;height:18px;border-radius:50%;border:1px solid rgba(0,0,0,.25)}
.swatch.black{background:#171512}.swatch.brown{background:#493023}.swatch.gold{background:#9a712c}
.font-sample{font-size:1.5rem;background:var(--soft);border-radius:10px;padding:8px 14px;margin:0;text-align:center;min-height:2.4em}
.button-row,.editor-actions{display:flex;flex-wrap:wrap;gap:8px;align-items:center}
.button-row button,.editor-actions button:not(.primary),.cart-row button{background:#fff;color:var(--brand-dark);border:1.5px solid var(--line);border-radius:10px;font:inherit;font-weight:600;padding:7px 14px;min-height:40px;cursor:pointer}
.button-row button:hover,.editor-actions button:not(.primary):hover{border-color:var(--brand);background:var(--brand-soft)}
.button-row button.primary,.editor-actions .primary{background:var(--brand);color:#fff;border-color:var(--brand)}
.status{padding:10px 14px;border-radius:10px;background:var(--brand-soft);color:var(--brand-dark);font-size:.93rem}
.status.error{background:#fdecec;color:var(--danger)}
.fit-note{margin:0;color:#9a5b00;font-size:.9rem}
.preview-heading{display:flex;justify-content:space-between;align-items:center;margin-bottom:10px}
.preview-heading span{background:var(--soft);border-radius:99px;padding:1px 12px;font-size:.88rem}
.preview-toolbar{display:flex;flex-wrap:wrap;align-items:center;gap:10px;margin-bottom:10px;font-size:.92rem}
.preview-toolbar input[type=range]{width:140px}
.ribbon-viewport{height:min(70vh,640px);overflow:auto;background:repeating-conic-gradient(#f1f3f5 0 25%,#fff 0 50%) 0 0/20px 20px;border:1px solid var(--line);border-radius:12px;padding:22px;display:flex;justify-content:center;align-items:flex-start}
#ribbon-stage{position:relative;flex:none;touch-action:none}
#ribbon-fabric,#ribbon-fabric svg{display:block;width:100%;height:100%}
#ribbon-hit{position:absolute;cursor:move;border:1.5px dashed var(--focus);border-radius:3px;touch-action:none}
.preview-note{font-size:.88rem;color:var(--muted);margin:10px 0}
.exports{border:1px solid var(--line);border-radius:12px;padding:10px 14px}
.exports summary{cursor:pointer;font-weight:700}
.ribbon-cart{margin-top:28px}
.cart-heading{display:flex;flex-wrap:wrap;justify-content:space-between;align-items:end;gap:10px;margin-bottom:12px}
.cart-row{display:grid;grid-template-columns:70px 1fr auto;gap:14px;align-items:center;border-top:1px solid var(--line);padding:12px 0}
.cart-row img{width:70px;height:auto;max-height:110px;object-fit:contain;background:var(--soft);border-radius:8px}
.cart-row h3{margin:0;font-size:1rem}
.cart-row p{margin:0;white-space:pre-line;font-size:.88rem;color:var(--muted)}
.cart-row input[type=number]{width:72px}
#cart-total{font-weight:800}
@media(max-width:900px){.ribbon-layout{grid-template-columns:1fr}.cart-row{grid-template-columns:56px 1fr}.cart-row .button-row{grid-column:1/-1}}

/* أداة تجهيز الطلبات */
.tool-page{padding:32px 0 56px}
.production-card{display:grid;grid-template-columns:150px 1fr;gap:20px;background:#fff;border:1px solid var(--line);border-radius:var(--radius);padding:18px;margin-top:16px}
.production-preview{width:100%;height:auto;background:var(--soft);border-radius:8px}
.production-summary{white-space:pre-line;font-size:.93rem;color:var(--muted)}
@media(max-width:640px){.production-card{grid-template-columns:1fr}}

/* التذييل */
.site-footer{background:var(--brand);color:var(--ivory);padding:44px 0 28px;margin-top:0}
.site-footer a{color:var(--ivory)}
.site-footer a:hover{color:#fff}
.footer-brand{display:flex;align-items:center;gap:12px;margin-bottom:10px}
.footer-brand img{width:56px;height:56px;border-radius:12px;box-shadow:0 0 0 1px rgba(248,244,235,.25)}
.footer-brand h2{margin:0}
.footer-grid{display:grid;grid-template-columns:1.4fr 1fr 1fr;gap:30px}
.site-footer h2{font-size:1.05rem;color:var(--ivory)}
.site-footer ul{list-style:none;margin:0;padding:0;display:grid;gap:6px}
.copyright{border-top:1px solid rgba(248,244,235,.2);margin-top:26px;padding-top:16px;font-size:.88rem;color:#D9D3C2}
@media(max-width:760px){.footer-grid{grid-template-columns:1fr}}
.wa-float{position:fixed;inset-inline-start:16px;bottom:16px;z-index:40;box-shadow:0 6px 20px rgba(0,0,0,.25)}
@media(prefers-reduced-motion:reduce){*{transition:none!important;scroll-behavior:auto!important}}
@media print{.site-header,.site-footer,.wa-float{display:none}}
