:root {
    --bg: #faf8f5;
    --card: #ffffff;
    --ink: #241f1c;
    --muted: #6f655e;
    --line: #e7e1da;
    --accent: #0f7a68;
    --dark: #3a2b24;
    --radius: 16px;
    --shadow: 0 1px 2px rgba(36, 31, 28, 0.06), 0 8px 24px rgba(36, 31, 28, 0.05);
}

* { box-sizing: border-box; }

html, body {
    margin: 0;
    padding: 0;
    background: var(--bg);
    color: var(--ink);
}

body {
    font-family: "Cairo", "Segoe UI", Tahoma, system-ui, -apple-system, sans-serif;
    font-size: 16px;
    line-height: 1.75;
    -webkit-text-size-adjust: 100%;
}

a { color: inherit; }

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

.topbar {
    position: sticky;
    top: 0;
    z-index: 10;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 12px 16px;
    background: rgba(250, 248, 245, 0.92);
    backdrop-filter: blur(8px);
    border-bottom: 1px solid var(--line);
}

.brand {
    font-weight: 700;
    font-size: 20px;
    text-decoration: none;
}

.nav {
    display: flex;
    gap: 16px;
    font-weight: 600;
    font-size: 15px;
}

.nav a { text-decoration: none; color: var(--muted); }
.nav a:hover { color: var(--ink); }

main {
    max-width: 720px;
    margin: 0 auto;
    padding: 20px 16px 40px;
}

h1, h2 { line-height: 1.35; margin: 0 0 8px; }

.hero { padding: 8px 0 20px; }
.hero h1 { font-size: 28px; }
.lead { color: var(--muted); margin: 0 0 16px; font-size: 16px; }

.grid { display: grid; grid-template-columns: 1fr; gap: 18px; }

.card {
    background: var(--card);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    overflow: hidden;
}

.card-media { display: block; background: #f1ece6; }
.card-media img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; }

.card-body { padding: 16px; }
.card-body h2 { font-size: 20px; }
.card-body h2 a { text-decoration: none; }
.card-body .muted { margin: 0 0 12px; font-size: 15px; }

.muted { color: var(--muted); }

.price-row {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
    margin-bottom: 14px;
}

.price-row.big { margin: 12px 0 18px; }
.price { font-weight: 700; font-size: 20px; color: var(--accent); }
.price-row.big .price { font-size: 26px; }

.chip {
    font-size: 13px;
    font-weight: 600;
    color: var(--muted);
    background: #f2ede7;
    border-radius: 999px;
    padding: 2px 10px;
}

.actions { display: flex; flex-wrap: wrap; gap: 10px; }

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    min-height: 46px;
    padding: 10px 18px;
    border-radius: 999px;
    border: 1px solid transparent;
    font-family: inherit;
    font-size: 16px;
    font-weight: 600;
    text-decoration: none;
    cursor: pointer;
    transition: transform 0.06s ease, opacity 0.15s ease;
}

.btn:active { transform: scale(0.985); }

.btn-primary { background: var(--dark); color: #fff; }
.btn-dark { background: #12100e; color: #fff; }
.btn-ghost { background: transparent; color: var(--ink); border-color: var(--line); }
.btn-wide, .wide { width: 100%; }
.wide { margin-top: 12px; }

.btn-qty {
    width: 40px;
    min-height: 40px;
    padding: 0;
    border-radius: 12px;
    border: 1px solid var(--line);
    background: #fff;
    font-size: 18px;
}

.note-line { margin-top: 20px; color: var(--muted); font-size: 15px; }

.back {
    display: inline-block;
    margin-bottom: 12px;
    color: var(--muted);
    text-decoration: none;
    font-size: 15px;
}

.pdp { display: grid; grid-template-columns: 1fr; gap: 20px; }

.main-shot {
    width: 100%;
    border-radius: var(--radius);
    background: #f1ece6;
    aspect-ratio: 1 / 1;
    object-fit: cover;
}

.thumbs { display: flex; gap: 8px; margin-top: 10px; }

.thumb {
    padding: 0;
    border: 2px solid transparent;
    border-radius: 12px;
    overflow: hidden;
    background: none;
    cursor: pointer;
    width: 72px;
    height: 72px;
}

.thumb.is-on { border-color: var(--dark); }
.thumb img { width: 100%; height: 100%; object-fit: cover; }

.h2 { font-size: 20px; margin: 26px 0 10px; }

.bullets { margin: 0; padding-inline-start: 20px; }
.bullets li { margin-bottom: 6px; }

.facts { margin: 0; }
.fact {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    padding: 10px 0;
    border-bottom: 1px solid var(--line);
}
.fact dt { color: var(--muted); margin: 0; }
.fact dd { margin: 0; font-weight: 600; }

.callout {
    margin-top: 24px;
    padding: 14px 16px;
    background: #f4efe8;
    border-radius: 14px;
}
.callout p { margin: 6px 0 0; color: var(--muted); font-size: 15px; }

.page-title { font-size: 26px; margin-bottom: 12px; }

.lines { background: var(--card); border-radius: var(--radius); box-shadow: var(--shadow); }

.line {
    display: grid;
    grid-template-columns: 64px 1fr auto;
    gap: 12px;
    align-items: center;
    padding: 14px 16px;
    border-bottom: 1px solid var(--line);
}
.line:last-child { border-bottom: 0; }
.line-img { width: 64px; height: 64px; border-radius: 12px; object-fit: cover; }
.line-main { display: flex; flex-direction: column; }
.line-main a { text-decoration: none; font-weight: 600; }
.line-main .muted { font-size: 14px; }
.qty { display: flex; align-items: center; gap: 8px; }
.qty-num { min-width: 20px; text-align: center; font-weight: 600; }
.line-total { grid-column: 2 / 4; font-weight: 700; color: var(--accent); }

.sum {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px 4px;
    font-size: 18px;
}
.sum strong { color: var(--accent); font-size: 22px; }

.panel {
    background: var(--card);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    padding: 8px 16px;
    margin-bottom: 18px;
}

.sum-row {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    padding: 10px 0;
    border-bottom: 1px solid var(--line);
}
.sum-row:last-child { border-bottom: 0; }

.msg {
    white-space: pre-wrap;
    word-break: break-word;
    background: var(--card);
    border: 1px solid var(--line);
    border-radius: 14px;
    padding: 14px 16px;
    font-family: inherit;
    font-size: 15px;
    line-height: 1.9;
    margin: 0 0 16px;
}

.footer {
    max-width: 720px;
    margin: 0 auto;
    padding: 24px 16px 40px;
    color: var(--muted);
    font-size: 14px;
    text-align: center;
    border-top: 1px solid var(--line);
}
.footer a { color: var(--ink); font-weight: 600; }

@media (min-width: 720px) {
    .grid { grid-template-columns: 1fr 1fr; }
    .pdp { grid-template-columns: 1fr 1fr; align-items: start; }
    .hero h1 { font-size: 34px; }
    .line { grid-template-columns: 64px 1fr auto auto; }
    .line-total { grid-column: auto; }
}

/* أقسام المتجر */
.cats{display:flex;gap:8px;overflow-x:auto;padding:10px 16px;border-bottom:1px solid #eee;background:#fff;position:sticky;top:0;z-index:5}
.cats a{white-space:nowrap;font-size:14px;padding:6px 12px;border-radius:999px;background:#f4f1ec;color:#333;text-decoration:none}
.cats a:active{background:#e8e2d8}
.cat-block{margin:26px 0 10px}
.cat-title{font-size:20px;margin:0 16px 12px}
