/* =====================================================
   Ahmad Print Shop — Modern polish layer (loads after style.css)
   Refines typography, header, buttons, cards, forms, footer, auth pages.
   ===================================================== */

:root {
  --ring: 0 0 0 4px rgba(26, 86, 176, .18);
  --shadow-soft: 0 1px 2px rgba(15, 23, 42, .04), 0 8px 24px -8px rgba(15, 23, 42, .12);
  --shadow-lift: 0 2px 4px rgba(15, 23, 42, .04), 0 18px 40px -12px rgba(15, 23, 42, .22);
}

html { scroll-behavior: smooth; }
body { -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility; }
h1, h2, h3 { letter-spacing: -.02em; }
::selection { background: rgba(26, 86, 176, .18); }

/* Accessible keyboard focus everywhere */
:where(a, button, input, select, textarea, summary, [tabindex]):focus-visible {
  outline: 2px solid var(--primary);
  outline-offset: 2px;
  border-radius: 8px;
}

/* ── Promo + contact bars ─────────────────────────── */
.promo-bar {
  background: linear-gradient(90deg, #0b1e4a, #123a85 50%, #0b1e4a);
  font-size: 13px; letter-spacing: .01em; padding: 8px 14px;
}
.top-contact-bar { background: #f3f6fb; border-bottom: 1px solid #e6ecf5; font-size: 12.5px; }
.top-contact-items a, .top-contact-items span { transition: color .15s; }
.top-contact-items a:hover { color: var(--primary); }
.top-contact-links a { font-weight: 600; }

/* ── Header ───────────────────────────────────────── */
.site-header {
  background: rgba(255, 255, 255, .86);
  -webkit-backdrop-filter: saturate(180%) blur(14px);
  backdrop-filter: saturate(180%) blur(14px);
  border-bottom: 1px solid rgba(226, 232, 240, .8);
}
.main-nav a { position: relative; font-weight: 600; transition: color .15s; }
.main-nav a::after {
  content: ""; position: absolute; left: 12px; right: 12px; bottom: 4px; height: 2px;
  background: linear-gradient(90deg, var(--primary), var(--orange));
  transform: scaleX(0); transform-origin: left; transition: transform .25s ease; border-radius: 2px;
}
.main-nav a:hover::after, .main-nav a.active::after { transform: scaleX(1); }
.hdr-btn, .hdr-cart { transition: transform .15s, background .15s; }
.hdr-btn:hover, .hdr-cart:hover { transform: translateY(-1px); }

/* ── Buttons ──────────────────────────────────────── */
.btn { border-radius: 12px; font-weight: 700; transition: transform .15s ease, box-shadow .2s ease, background .2s ease; }
.btn:hover { transform: translateY(-1px); }
.btn:active { transform: translateY(0) scale(.99); }
.btn-primary { background: linear-gradient(135deg, var(--primary), var(--primary-dk)); box-shadow: 0 10px 22px -10px rgba(26, 86, 176, .7); }
.btn-orange { background: linear-gradient(135deg, #ff7a1a, var(--orange)); box-shadow: 0 10px 22px -10px rgba(255, 107, 0, .75); }
.btn[disabled] { opacity: .6; cursor: not-allowed; transform: none; }

/* ── Forms ────────────────────────────────────────── */
.form-control, .input, select.form-control, textarea.form-control {
  border-radius: 12px; border: 1.5px solid #dbe3ef; transition: border-color .15s, box-shadow .15s;
}
.form-control:focus { border-color: var(--primary); box-shadow: var(--ring); outline: none; }
.form-label { font-weight: 600; font-size: 13px; color: var(--slate); }

/* ── Cards / products ─────────────────────────────── */
.hp-product-card, .hp-cat-card, .hp-banner-card, .product-card {
  transition: transform .25s ease, box-shadow .25s ease;
}
.hp-product-card:hover, .hp-cat-card:hover, .hp-banner-card:hover, .product-card:hover {
  transform: translateY(-4px); box-shadow: var(--shadow-lift);
}
img { max-width: 100%; height: auto; }

/* Scroll-reveal helper already used by homepage (.hp-animate / .hp-visible) */
.hp-animate { opacity: 0; transform: translateY(14px); transition: opacity .5s ease, transform .5s ease; }
.hp-animate.hp-visible { opacity: 1; transform: none; }

/* ── Page banner ──────────────────────────────────── */
.page-banner {
  background:
    radial-gradient(700px 260px at 15% 0%, rgba(255, 255, 255, .14), transparent 60%),
    linear-gradient(135deg, #0b1e4a, #1a56b0);
  color: #fff;
}
.page-banner h1 { letter-spacing: -.03em; }
.page-banner p { opacity: .85; }

/* ── Footer ───────────────────────────────────────── */
.site-footer { background: linear-gradient(180deg, #121828, #0c111e); }
.footer-col h4 { letter-spacing: .06em; text-transform: uppercase; font-size: 12px; opacity: .9; }
.footer-col a { transition: color .15s, padding-left .15s; }
.footer-col ul a:hover { color: #fff; padding-left: 4px; }
.footer-socials a { transition: transform .15s, background .15s; }
.footer-socials a:hover { transform: translateY(-3px); }

/* ── Auth pages (login / register) ────────────────── */
.auth-body { background:
  radial-gradient(900px 420px at 85% -10%, rgba(26, 86, 176, .12), transparent 60%),
  radial-gradient(700px 380px at 0% 100%, rgba(255, 107, 0, .10), transparent 60%),
  #f6f8fc; }
.auth-wrap { display: grid; place-items: center; padding: 48px 18px 80px; }
.auth-card {
  width: 100%; max-width: 460px; background: #fff; border: 1px solid #e6ecf5; border-radius: 26px;
  padding: 36px 34px; box-shadow: var(--shadow-lift);
}
.auth-icon {
  width: 56px; height: 56px; border-radius: 18px; display: grid; place-items: center; font-size: 22px; color: #fff; margin: 0 auto 14px;
  background: linear-gradient(135deg, var(--primary), #3b82f6); box-shadow: 0 14px 28px -12px rgba(26, 86, 176, .8);
}
.auth-card h1 { text-align: center; font-size: 26px; font-weight: 800; }
.auth-sub { text-align: center; color: var(--muted); margin: 6px 0 22px; font-size: 14.5px; }
.auth-row { display: flex; justify-content: space-between; margin: -4px 0 18px; font-size: 13px; }
.auth-row a, .auth-foot a { color: var(--primary); font-weight: 700; }
.auth-foot { text-align: center; margin-top: 20px; font-size: 14px; color: var(--muted); }
.auth-hint { display: block; margin-top: 6px; color: var(--muted); font-size: 12px; }
.auth-card .alert { margin-bottom: 16px; display: flex; gap: 8px; align-items: flex-start; }

/* ── Account page ─────────────────────────────────── */
.acct-card { background: #fff; border: 1px solid #e6ecf5; border-radius: 22px; padding: 24px; margin-bottom: 20px; box-shadow: var(--shadow-soft); }
.acct-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 14px; }
.acct-head h2 { font-size: 20px; font-weight: 800; }
.acct-empty { text-align: center; padding: 28px 10px; color: var(--muted); }
.acct-empty i { font-size: 34px; color: #b6c4dc; margin-bottom: 8px; }
.acct-order { display: flex; justify-content: space-between; gap: 12px; align-items: center; padding: 14px 16px; border: 1px solid #edf1f7; border-radius: 16px; margin-bottom: 10px; transition: border-color .15s, transform .15s, box-shadow .15s; }
.acct-order:hover { border-color: var(--primary); transform: translateY(-2px); box-shadow: var(--shadow-soft); }
.acct-order strong { display: block; font-family: ui-monospace, Menlo, monospace; }
.acct-order span { color: var(--muted); font-size: 12.5px; }
.acct-right { display: flex; gap: 12px; align-items: center; text-align: right; }
.acct-pill { background: #eaf2ff; color: var(--primary); padding: 4px 10px; border-radius: 999px; font-size: 12px; font-weight: 700; }
.acct-dl { display: grid; grid-template-columns: 110px 1fr; gap: 10px 14px; margin-bottom: 18px; }
.acct-dl dt { color: var(--muted); font-weight: 600; font-size: 13px; }
.acct-dl dd { margin: 0; font-weight: 600; word-break: break-word; }

/* ── Mobile refinements ───────────────────────────── */
@media (max-width: 760px) {
  .top-contact-items span { display: none; }
  .auth-card { padding: 28px 22px; border-radius: 22px; }
  .acct-order { flex-direction: column; align-items: flex-start; }
  .acct-right { text-align: left; }
}

/* Respect users who prefer less motion */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; scroll-behavior: auto !important; }
  .hp-animate { opacity: 1; transform: none; }
}
@media print { .promo-bar, .top-contact-bar, .site-header, .site-footer { display: none !important; } }

/* ── Form field sizing (auth, contact, track, checkout) ── */
.form-group { margin-bottom: 16px; }
.form-control {
  display: block; width: 100%; padding: 13px 15px; font: inherit; font-size: 15px; line-height: 1.4;
  background: #fff; color: var(--dark);
}
textarea.form-control { min-height: 110px; resize: vertical; }
.form-control::placeholder { color: #94a3b8; }

/* ── Header fit: keep the Shop Now button inside the viewport ── */
.header-inner { gap: 14px; }
.main-nav { flex-wrap: nowrap; min-width: 0; }
.main-nav a { padding-left: 10px; padding-right: 10px; white-space: nowrap; font-size: 14px; }
.header-actions { flex-shrink: 0; }
.header-cta { white-space: nowrap; }
@media (max-width: 1280px) { .main-nav a { padding-left: 8px; padding-right: 8px; font-size: 13.5px; } }
@media (max-width: 1500px) { .header-cta { display: none !important; } }

/* ═════════════ Brand type system (self-hosted, variable) ═════════════ */
@font-face { font-family: 'Bricolage Grotesque'; font-style: normal; font-weight: 200 800; font-display: swap;
  src: url('../fonts/bricolage-grotesque-latin-wght-normal.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD, U+20B9; }
@font-face { font-family: 'Bricolage Grotesque'; font-style: normal; font-weight: 200 800; font-display: swap;
  src: url('../fonts/bricolage-grotesque-latin-ext-wght-normal.woff2') format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: 'Figtree'; font-style: normal; font-weight: 300 900; font-display: swap;
  src: url('../fonts/figtree-latin-wght-normal.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD, U+20B9; }
@font-face { font-family: 'Figtree'; font-style: normal; font-weight: 300 900; font-display: swap;
  src: url('../fonts/figtree-latin-ext-wght-normal.woff2') format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF; }

:root {
  --font: 'Figtree', 'Inter', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --display: 'Bricolage Grotesque', 'Figtree', system-ui, sans-serif;
  --paper: #f5f6f8;
  --ink: #0c1b3d;
  --ink-2: #3a4866;
  --hair: #dde2ea;
  --ink-c: #00aeef; --ink-m: #ec008c; --ink-y: #ffe600;
}
body { font-family: var(--font); }
h1, h2, h3, .logo-text strong, .page-banner h1 { font-family: var(--display); }

/* small-phone header fit */
@media (max-width: 600px) {
  .hdr-search { display: none !important; }
  .header-actions { gap: 4px; }
  .logo-text small, .logo-text span { display: none; }
}
