/* Pink Store — shared styles (store + dashboard). Logical properties keep RTL/LTR symmetrical. */
:root {
  --pink: #e83e8c;
  --pink-dark: #c2185b;
  --pink-soft: #fde4ef;
  --pink-softer: #fff4f8;
  --ink: #2b1d25;
  --muted: #7d6b74;
  --line: #f3d6e3;
  --bg: #fffafc;
  --card: #ffffff;
  --ok: #1f9d55;
  --ok-soft: #e3f7ec;
  --warn: #b7791f;
  --warn-soft: #fff4dc;
  --bad: #d64545;
  --bad-soft: #fde8e8;
  --radius: 16px;
  --shadow: 0 6px 24px rgba(232, 62, 140, 0.10);
  --font: 'Cairo', system-ui, -apple-system, 'Segoe UI', sans-serif;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; font-family: var(--font); color: var(--ink); background: var(--bg); line-height: 1.6; font-size: 15px; }
img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
button, input, select, textarea { font: inherit; color: inherit; }
.container { width: 100%; max-width: 1200px; margin-inline: auto; padding-inline: 16px; }
.hidden { display: none !important; }
.muted { color: var(--muted); }
.center { text-align: center; }

/* buttons */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; border: 0; border-radius: 999px;
  padding: 11px 22px; font-weight: 700; cursor: pointer; background: var(--pink); color: #fff; transition: background .15s, transform .1s; }
.btn:hover { background: var(--pink-dark); }
.btn:active { transform: scale(.98); }
.btn:disabled { opacity: .55; cursor: not-allowed; }
.btn.block { width: 100%; }
.btn.ghost { background: transparent; color: var(--pink-dark); border: 1.5px solid var(--pink); }
.btn.ghost:hover { background: var(--pink-soft); }
.btn.light { background: var(--pink-soft); color: var(--pink-dark); }
.btn.danger { background: var(--bad-soft); color: var(--bad); }
.btn.sm { padding: 6px 14px; font-size: 13px; }
.icon-btn { background: none; border: 0; cursor: pointer; padding: 8px; border-radius: 12px; display: inline-flex; align-items: center; position: relative; }
.icon-btn:hover { background: var(--pink-soft); }
.icon-btn svg { width: 24px; height: 24px; }

/* forms */
.field { display: flex; flex-direction: column; gap: 6px; margin-bottom: 14px; }
.field label { font-weight: 600; font-size: 14px; }
.input, select.input, textarea.input { width: 100%; border: 1.5px solid var(--line); border-radius: 12px; padding: 11px 14px; background: #fff; outline: none; }
.input:focus { border-color: var(--pink); box-shadow: 0 0 0 3px var(--pink-soft); }
textarea.input { min-height: 90px; resize: vertical; }
select.input { -webkit-appearance: none; appearance: none; cursor: pointer; line-height: 1.6; min-height: 44px;
  padding-inline-end: 40px; background-repeat: no-repeat; background-size: 14px; background-position: right 14px center;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23c2185b' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E"); }
[dir=rtl] select.input { background-position: left 14px center; }
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 0 14px; }
.check { display: flex; align-items: center; gap: 10px; margin-bottom: 12px; cursor: pointer; }
.check input { width: 18px; height: 18px; accent-color: var(--pink); }
.error-box { background: var(--bad-soft); color: var(--bad); padding: 10px 14px; border-radius: 12px; margin-bottom: 14px; font-weight: 600; }

/* announcement + header */
.announce { background: var(--pink-dark); color: #fff; text-align: center; font-size: 13px; padding: 6px 16px; }
.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: 12px; height: 68px; }
.brand { display: flex; align-items: center; gap: 10px; font-weight: 800; font-size: 20px; color: var(--pink-dark); white-space: nowrap; }
.brand img { width: 44px; height: 44px; object-fit: contain; border-radius: 50%; }
.search { flex: 1; position: relative; max-width: 520px; margin-inline: auto; }
.search input { width: 100%; border: 1.5px solid var(--line); background: var(--pink-softer); border-radius: 999px; padding: 10px 44px 10px 16px; outline: none; }
[dir=rtl] .search input { padding: 10px 16px 10px 44px; }
.search input:focus { border-color: var(--pink); background: #fff; }
.search button { position: absolute; inset-inline-end: 6px; top: 50%; transform: translateY(-50%); }
.header-actions { display: flex; align-items: center; gap: 4px; }
.lang-btn { font-weight: 700; font-size: 14px; color: var(--pink-dark); padding: 8px 12px; }
.badge { position: absolute; top: 2px; inset-inline-end: 0; background: var(--pink); color: #fff; font-size: 11px; font-weight: 700;
  min-width: 18px; height: 18px; border-radius: 9px; display: grid; place-items: center; padding: 0 4px; }
/* category bar: wraps onto extra lines on tablets/desktops, swipes sideways on phones */
.cat-nav { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; padding: 10px 0; }
@media (max-width: 760px) {
  .cat-nav { flex-wrap: nowrap; justify-content: flex-start; overflow-x: auto; scrollbar-width: none; scroll-snap-type: x proximity;
    margin-inline: -16px; padding-inline: 16px; scroll-padding-inline: 16px;
    -webkit-mask-image: linear-gradient(to var(--fade-dir, left), #000 85%, transparent); mask-image: linear-gradient(to var(--fade-dir, left), #000 85%, transparent); }
  [dir=ltr] .cat-nav { --fade-dir: right; }
  .cat-nav::-webkit-scrollbar { display: none; }
  .cat-nav .chip { scroll-snap-align: start; }
}
.chip { white-space: nowrap; padding: 6px 14px; border-radius: 999px; background: var(--pink-softer); border: 1px solid var(--line); font-size: 14px; font-weight: 600; }
.chip.active, .chip:hover { background: var(--pink); color: #fff; border-color: var(--pink); }
.mobile-search { display: none; padding-bottom: 10px; }
.subnav { background: #fff; border-bottom: 1px solid var(--line); }
.header { border-bottom: 1px solid var(--line); }

/* hero */
.hero { margin: 20px 0; border-radius: 24px; padding: 48px 40px; color: #fff; position: relative; overflow: hidden;
  background: radial-gradient(circle at 85% 20%, #ffb3d1 0, transparent 40%), linear-gradient(135deg, #f472b6, #c2185b); }
.hero h1 { margin: 0 0 10px; font-size: clamp(26px, 4vw, 42px); line-height: 1.3; }
.hero p { margin: 0 0 22px; max-width: 520px; opacity: .95; font-size: 16px; }
.hero .btn { background: #fff; color: var(--pink-dark); }
.hero .btn:hover { background: var(--pink-soft); }
.hero-deco { position: absolute; inset-inline-end: 40px; bottom: -10px; font-size: 120px; opacity: .25; pointer-events: none; }

/* sections */
.section { margin: 32px 0; }
.section-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 16px; flex-wrap: wrap; }
.section-head h2 { margin: 0; font-size: 22px; }
.section-head a { color: var(--pink-dark); font-weight: 700; }
.cat-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(130px, 1fr)); gap: 12px; }
.cat-card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px 10px; text-align: center; transition: transform .15s, box-shadow .15s; }
.cat-card:hover { transform: translateY(-3px); box-shadow: var(--shadow); }
.cat-card .ico { font-size: 34px; width: 64px; height: 64px; margin: 0 auto 8px; display: grid; place-items: center; background: var(--pink-soft); border-radius: 50%; }
.cat-card b { display: block; font-size: 14px; }
.cat-card small { color: var(--muted); }

/* products */
.products { display: grid; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: 16px; }
.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; display: flex; flex-direction: column; transition: box-shadow .15s, transform .15s; }
.card:hover { box-shadow: var(--shadow); transform: translateY(-2px); }
.card .thumb { aspect-ratio: 1; background: var(--pink-softer); position: relative; }
.card .thumb img { width: 100%; height: 100%; object-fit: cover; }
.placeholder { width: 100%; height: 100%; display: grid; place-items: center; font-size: 56px; background: linear-gradient(135deg, var(--pink-softer), var(--pink-soft)); }
.tag { position: absolute; top: 10px; inset-inline-start: 10px; background: var(--pink); color: #fff; font-size: 12px; font-weight: 700; padding: 2px 10px; border-radius: 999px; }
.tag.gray { background: #8a7d84; }
.card .body { padding: 12px; display: flex; flex-direction: column; gap: 6px; flex: 1; }
.card .name { font-weight: 700; font-size: 15px; line-height: 1.4; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; min-height: 2.8em; }
.price { display: flex; align-items: baseline; gap: 8px; flex-wrap: wrap; }
.price b { color: var(--pink-dark); font-size: 17px; }
.price s { color: var(--muted); font-size: 13px; }
.card .btn { margin-top: auto; padding: 9px 12px; font-size: 14px; }
.toolbar { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-bottom: 16px; flex-wrap: wrap; }
.toolbar select.input { width: auto; min-width: 190px; padding-block: 8px; padding-inline-start: 16px; border-radius: 999px; font-weight: 600; }
.empty { text-align: center; padding: 60px 16px; color: var(--muted); }
.empty .big { font-size: 56px; }

/* product page */
.pdp { display: grid; grid-template-columns: 1fr 1fr; gap: 32px; margin: 24px 0; }
.gallery .main { aspect-ratio: 1; border-radius: var(--radius); overflow: hidden; background: var(--pink-softer); border: 1px solid var(--line); }
.gallery .main img { width: 100%; height: 100%; object-fit: cover; }
.thumbs { display: flex; gap: 8px; margin-top: 10px; overflow-x: auto; }
.thumbs img { width: 72px; height: 72px; object-fit: cover; border-radius: 10px; border: 2px solid transparent; cursor: pointer; flex-shrink: 0; }
.thumbs img.active { border-color: var(--pink); }
.pdp h1 { margin: 0 0 8px; font-size: clamp(22px, 3vw, 30px); line-height: 1.35; }
.pdp .price b { font-size: 26px; }
.pdp .desc { white-space: pre-line; color: #4d3d45; }
.qty { display: inline-flex; align-items: center; border: 1.5px solid var(--line); border-radius: 999px; overflow: hidden; background: #fff; }
.qty button { width: 38px; height: 38px; border: 0; background: none; font-size: 18px; cursor: pointer; }
.qty button:hover { background: var(--pink-soft); }
.qty span { min-width: 32px; text-align: center; font-weight: 700; }
.buy-row { display: flex; gap: 12px; align-items: center; margin: 20px 0; flex-wrap: wrap; }
.buy-row .btn { flex: 1; min-width: 180px; }
.crumbs { font-size: 14px; color: var(--muted); margin-top: 16px; }
.crumbs a:hover { color: var(--pink-dark); }

/* cart + checkout */
.page-title { margin: 24px 0 16px; font-size: 26px; }
.layout-2 { display: grid; grid-template-columns: 1fr 360px; gap: 24px; align-items: start; margin-bottom: 40px; }
.panel { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 20px; }
.panel h3 { margin: 0 0 14px; font-size: 18px; }
.sticky { position: sticky; top: 88px; }
.line-item { display: grid; grid-template-columns: 80px 1fr auto; gap: 14px; align-items: center; padding: 14px 0; border-bottom: 1px solid var(--line); }
.line-item:last-child { border-bottom: 0; }
.line-item .img { width: 80px; height: 80px; border-radius: 12px; overflow: hidden; background: var(--pink-softer); }
.line-item .img img { width: 100%; height: 100%; object-fit: cover; }
.line-item .img .placeholder { font-size: 32px; }
.line-item .name { font-weight: 700; }
.line-item.unavailable .img, .line-item.unavailable .name, .line-item.unavailable .muted { opacity: .45; }
.qty button:disabled { opacity: .3; cursor: not-allowed; }
.line-item .end { display: flex; flex-direction: column; align-items: flex-end; gap: 8px; }
.link-btn { background: none; border: 0; color: var(--bad); cursor: pointer; font-size: 13px; padding: 0; }
.sum-row { display: flex; justify-content: space-between; padding: 6px 0; }
.sum-row.total { border-top: 1px dashed var(--line); margin-top: 8px; padding-top: 12px; font-size: 18px; font-weight: 800; }
.hint { background: var(--pink-softer); border-radius: 12px; padding: 10px 12px; font-size: 14px; color: var(--pink-dark); margin: 10px 0; }
.mini-item { display: flex; justify-content: space-between; gap: 10px; font-size: 14px; padding: 4px 0; }
.pay-option { display: flex; gap: 12px; align-items: flex-start; border: 1.5px solid var(--line); border-radius: 14px; padding: 14px; margin-bottom: 10px; cursor: pointer; background: #fff; }
.pay-option:has(input:checked) { border-color: var(--pink); background: var(--pink-softer); }
.pay-option input { margin-top: 5px; accent-color: var(--pink); width: 18px; height: 18px; flex-shrink: 0; }
.pay-option b { display: block; }
.pay-option small { color: var(--muted); }
.pay-logos { margin-inline-start: auto; display: flex; gap: 4px; flex-shrink: 0; }
.pay-logos span { font-size: 10px; font-weight: 800; border: 1px solid var(--line); border-radius: 6px; padding: 2px 6px; background: #fff; }
.pay-logos span.emoji { font-size: 22px; border: 0; padding: 0; background: none; line-height: 1; }
.instapay-box { background: #fff; border: 1.5px dashed var(--pink); border-radius: 14px; padding: 14px; margin: -2px 0 12px; }
.ipa { display: flex; gap: 8px; align-items: center; background: var(--pink-softer); border-radius: 10px; padding: 8px 12px; margin: 8px 0; direction: ltr; justify-content: space-between; }
.ipa code { font-weight: 800; font-size: 16px; color: var(--pink-dark); word-break: break-all; }

/* success / track */
.success { max-width: 560px; margin: 40px auto; text-align: center; }
.success .big { font-size: 64px; }
.code-box { font-size: 26px; font-weight: 800; letter-spacing: 2px; color: var(--pink-dark); background: var(--pink-soft); border-radius: 14px; padding: 10px; margin: 12px 0; direction: ltr; }
.pill { display: inline-block; padding: 2px 12px; border-radius: 999px; font-size: 13px; font-weight: 700; background: var(--pink-soft); color: var(--pink-dark); }
.pill.ok { background: var(--ok-soft); color: var(--ok); }
.pill.warn { background: var(--warn-soft); color: var(--warn); }
.pill.bad { background: var(--bad-soft); color: var(--bad); }

/* offers */
.chip.hot { background: linear-gradient(135deg, #ff6b6b, var(--pink)); color: #fff; border-color: transparent; }
.chip.hot.active, .chip.hot:hover { background: var(--pink-dark); }
.save { align-self: flex-start; background: #fff1e6; color: #d9480f; font-size: 12px; font-weight: 800; padding: 2px 10px; border-radius: 999px; }
.save.big { font-size: 14px; padding: 4px 14px; margin-top: 8px; display: inline-block; }
.offers-section { background: linear-gradient(135deg, #fff1f6, #ffe3ee); border: 1px solid var(--line); border-radius: 24px; padding: 20px; }
.offers-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-bottom: 16px; }
.offers-head h1, .offers-head h2 { margin: 0; font-size: 24px; color: var(--pink-dark); }
.offers-head p { margin: 4px 0 0; color: var(--muted); }
.offers-banner { margin: 20px 0; padding: 28px; border-radius: 20px; color: #fff; position: relative; overflow: hidden;
  background: linear-gradient(135deg, #ff6b6b, var(--pink) 55%, var(--pink-dark)); }
.offers-banner h1 { color: #fff; font-size: clamp(24px, 4vw, 34px); }
.offers-banner p { color: #fff; opacity: .92; }
.offers-deco { font-size: 70px; opacity: .35; }
@media (max-width: 760px) { .offers-section { padding: 14px; border-radius: 18px; } .offers-head .btn { width: 100%; } .offers-deco { display: none; } }

/* footer */
.footer { background: #2b1d25; color: #f7dbe8; margin-top: 48px; padding: 36px 0 20px; }
.footer-grid { display: grid; grid-template-columns: 2fr 1fr 1fr; gap: 24px; }
.footer h4 { color: #fff; margin: 0 0 10px; }
.footer a:hover { color: #fff; }
.footer ul { list-style: none; padding: 0; margin: 0; display: grid; gap: 6px; }
.footer .copy { border-top: 1px solid #4a3540; margin-top: 24px; padding-top: 14px; font-size: 13px; text-align: center; color: #b99aa9; }

/* toast + floating whatsapp */
.toast { position: fixed; bottom: 24px; left: 50%; transform: translateX(-50%) translateY(20px); background: var(--ink); color: #fff; padding: 10px 20px;
  border-radius: 999px; opacity: 0; transition: .25s; z-index: 200; pointer-events: none; font-weight: 600; max-width: calc(100% - 32px); text-align: center; }
.toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }
.wa-float { position: fixed; bottom: 20px; inset-inline-end: 20px; width: 58px; height: 58px; border-radius: 50%; background: #25d366; color: #fff; border: 0;
  cursor: pointer; display: grid; place-items: center; box-shadow: 0 6px 18px rgba(0,0,0,.22); z-index: 90; transition: transform .15s; }
.wa-float:hover { transform: scale(1.07); }
.wa-float::after { content: ''; position: absolute; inset: 0; border-radius: 50%; border: 2px solid #25d366; animation: wa-pulse 2.4s ease-out infinite; }
@keyframes wa-pulse { from { transform: scale(1); opacity: .7; } to { transform: scale(1.5); opacity: 0; } }
.wa-float svg { width: 32px; height: 32px; }
.wa-tip { position: absolute; inset-inline-end: 70px; top: 50%; transform: translateY(-50%); white-space: nowrap; background: #fff; color: var(--ink);
  font-weight: 700; font-size: 14px; padding: 8px 14px; border-radius: 999px; box-shadow: var(--shadow); opacity: 0; pointer-events: none; transition: opacity .3s; }
.wa-tip.show { opacity: 1; }
.wa-card { position: fixed; bottom: 92px; inset-inline-end: 20px; width: 320px; max-width: calc(100vw - 32px); background: #fff; border-radius: 18px;
  box-shadow: 0 12px 40px rgba(0,0,0,.2); overflow: hidden; z-index: 95; }
.wa-card-head { background: #075e54; color: #fff; display: flex; align-items: center; gap: 10px; padding: 14px; }
.wa-card-head img { width: 42px; height: 42px; border-radius: 50%; background: #fff; object-fit: contain; }
.wa-card-head small { display: block; opacity: .85; font-size: 12px; }
.wa-close { margin-inline-start: auto; background: none; border: 0; color: #fff; font-size: 24px; cursor: pointer; line-height: 1; }
.wa-card-body { background: #ece5dd; padding: 18px 14px; }
.wa-bubble { background: #fff; border-radius: 12px; padding: 10px 14px; display: inline-block; font-size: 14px; box-shadow: 0 1px 1px rgba(0,0,0,.08); }
.wa-start { display: block; text-align: center; background: #25d366; color: #fff; font-weight: 700; padding: 12px; margin: 12px; border-radius: 999px; }
.wa-start:hover { background: #1ebe5a; }
@media (max-width: 760px) { .footer { padding-bottom: 88px; } .wa-float { bottom: 16px; inset-inline-end: 16px; width: 52px; height: 52px; } .wa-card { bottom: 80px; inset-inline-end: 16px; } .wa-tip { display: none; } }
.spinner { width: 36px; height: 36px; border: 4px solid var(--pink-soft); border-top-color: var(--pink); border-radius: 50%; animation: spin 1s linear infinite; margin: 60px auto; }
@keyframes spin { to { transform: rotate(360deg); } }

/* ---------- responsive ---------- */
@media (max-width: 960px) {
  .layout-2 { grid-template-columns: 1fr; }
  .sticky { position: static; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .footer-grid > :first-child { grid-column: 1 / -1; }
}
@media (max-width: 760px) {
  .header-row { height: 60px; }
  .header-row .search { display: none; }
  .mobile-search { display: block; }
  .mobile-search .search { max-width: none; }
  .brand { font-size: 17px; margin-inline-end: auto; }
  .brand img { width: 38px; height: 38px; }
  .hero { padding: 32px 22px; border-radius: 18px; margin: 14px 0; }
  .hero-deco { font-size: 80px; inset-inline-end: 10px; }
  .pdp { grid-template-columns: 1fr; gap: 18px; }
  .products { grid-template-columns: repeat(2, 1fr); gap: 10px; }
  .card .body { padding: 10px; }
  .card .name { font-size: 14px; }
  .price b { font-size: 15px; }
  .cat-grid { grid-template-columns: repeat(4, 1fr); gap: 8px; }
  .cat-card { padding: 12px 4px; }
  .cat-card .ico { width: 48px; height: 48px; font-size: 26px; }
  .cat-card b { font-size: 12px; }
  .cat-card small { display: none; }
  .grid-2 { grid-template-columns: 1fr; }
  .line-item { grid-template-columns: 64px 1fr; }
  .line-item .img { width: 64px; height: 64px; }
  .line-item .end { grid-column: 2; flex-direction: row; align-items: center; justify-content: space-between; }
  .section-head h2, .page-title { font-size: 20px; }
}
@media (max-width: 420px) {
  .cat-grid { grid-template-columns: repeat(3, 1fr); }
  .header-actions .lang-btn { padding: 8px 6px; }
}
