/* ==========================================================================
   פיצוחיגל – שכבת מותג (כל העמודים)
   פונטים מקומיים, טוקנים של צבע/רדיוס/צל, כפתורים ופוקוס.
   ========================================================================== */

/* ---------- Fonts (self-hosted, SIL Open Font License) ---------- */
@font-face {
  font-family: "Assistant";
  font-style: normal;
  font-weight: 400 800;
  font-display: swap;
  src: url("../fonts/assistant-hebrew.woff2") format("woff2");
  unicode-range: U+0307-0308, U+0590-05FF, U+200C-2010, U+20AA, U+25CC, U+FB1D-FB4F;
}
@font-face {
  font-family: "Assistant";
  font-style: normal;
  font-weight: 400 800;
  font-display: swap;
  src: url("../fonts/assistant-latin.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: "Frank Ruhl Libre";
  font-style: normal;
  font-weight: 500 900;
  font-display: swap;
  src: url("../fonts/frank-ruhl-hebrew.woff2") format("woff2");
  unicode-range: U+0307-0308, U+0590-05FF, U+200C-2010, U+20AA, U+25CC, U+FB1D-FB4F;
}
@font-face {
  font-family: "Frank Ruhl Libre";
  font-style: normal;
  font-weight: 500 900;
  font-display: swap;
  src: url("../fonts/frank-ruhl-latin.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

/* ---------- Tokens ---------- */
:root {
  /* מותג – בורדו. ניתן לשנות ב-Customizer; שאר הגוונים נגזרים ממנו (ראו @supports למטה) */
  --pg-brand: #A1181E; /* sampled from the official logo */
  --pg-brand-deep: #711115;
  --pg-brand-soft: #B03D42;
  --pg-brand-tint: #F7ECEC;

  /* משלימים חמים (אגוזים/קלייה) */
  --pg-gold: #B0813F;
  --pg-gold-text: #85602A;   /* זהב כהה לטקסט קטן – עומד ב-AA */
  --pg-olive: #5B6A47;

  /* רקעים בהירים ונקיים */
  --pg-cream: #FBF7F4;
  --pg-paper: #FFFFFF;
  --pg-sand: #F2EBE6;

  /* טקסט */
  --pg-ink: #2A1418;
  --pg-ink-2: #574246;
  --pg-ink-3: #75605F;

  --pg-line: rgba(161, 24, 30, .10);
  --pg-line-strong: rgba(161, 24, 30, .22);

  --pg-r-sm: 8px;
  --pg-r: 14px;
  --pg-r-lg: 20px;
  --pg-r-pill: 100px;

  --pg-sh-1: 0 1px 2px rgba(42, 20, 24, .06), 0 2px 8px rgba(42, 20, 24, .05);
  --pg-sh-2: 0 4px 12px rgba(42, 20, 24, .08), 0 12px 32px rgba(42, 20, 24, .07);
  --pg-sh-3: 0 12px 28px rgba(42, 20, 24, .12), 0 28px 56px rgba(42, 20, 24, .12);

  --pg-ease: cubic-bezier(.22, .8, .3, 1);

  --pg-font: "Assistant", "Heebo", system-ui, -apple-system, "Segoe UI", Arial, sans-serif;
  --pg-font-d: "Frank Ruhl Libre", "Assistant", Georgia, serif;
}

/* כשהדפדפן תומך – כל הגוונים נגזרים מצבע המותג שנבחר ב-Customizer */
@supports (color: color-mix(in srgb, red, blue)) {
  :root {
    --pg-brand-deep: color-mix(in srgb, var(--pg-brand) 70%, #000);
    --pg-brand-soft: color-mix(in srgb, var(--pg-brand) 84%, #fff);
    --pg-brand-tint: color-mix(in srgb, var(--pg-brand) 8%, #fff);
    --pg-line: color-mix(in srgb, var(--pg-brand) 10%, transparent);
    --pg-line-strong: color-mix(in srgb, var(--pg-brand) 22%, transparent);
  }
}

/* ---------- Typography ---------- */
body {
  font-family: var(--pg-font);
  -webkit-font-smoothing: antialiased;
}
h1, h2, h3, h4, h5, h6 {
  font-family: var(--pg-font-d);
  letter-spacing: -.01em;
}

/* ---------- Focus (נגישות: פוקוס ברור במקלדת) ---------- */
:focus-visible {
  outline: 3px solid var(--pg-gold);
  outline-offset: 2px;
}

/* ---------- Buttons ---------- */
.uptheme-button-primary,
.woocommerce a.button,
.woocommerce button.button,
.woocommerce input.button,
.woocommerce #respond input#submit,
.woocommerce a.button.alt,
.woocommerce button.button.alt {
  background: var(--pg-brand);
  color: #fff;
  border: 0;
  border-radius: var(--pg-r-pill);
  font-family: var(--pg-font);
  font-weight: 700;
  transition: background .2s, box-shadow .2s, transform .2s var(--pg-ease);
}
.uptheme-button-primary:hover,
.woocommerce a.button:hover,
.woocommerce button.button:hover,
.woocommerce input.button:hover,
.woocommerce #respond input#submit:hover,
.woocommerce a.button.alt:hover,
.woocommerce button.button.alt:hover {
  background: var(--pg-brand-soft);
  color: #fff;
}
.woocommerce a.button:disabled,
.woocommerce button.button:disabled,
.woocommerce button.button.disabled,
.woocommerce button.button:disabled[disabled] {
  background: var(--pg-brand);
  color: #fff;
  opacity: .5;
}

/* ---------- Header cart badge ---------- */
/* Base rules from UpTheme's woocommerce-min.css, which now loads on store pages only (inc/performance.php).
   :where() = zero specificity, so the Customizer colors and the brand rules below still win. */
:where(.uptheme-woo-menu-item .uptheme-woo-menu-item-count) {
  position: relative;
  display: inline-block;
  margin-left: 10px;
  padding: 2px 7px;
  border-radius: 3px;
  background: #3ba9d2;
  color: #fff;
  font-size: 12px;
  text-align: center;
  vertical-align: middle;
}
:where(.uptheme-woo-menu-item .uptheme-woo-menu-item-count)::before {
  content: "\f10d";
  position: absolute;
  top: 50%;
  left: -6px;
  transform: translateY(-50%);
  color: #3ba9d2;
  font-family: "uptheme" !important;
  font-style: normal;
  font-weight: normal;
  font-variant: normal;
  text-transform: none;
  line-height: 1;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}
:where(.uptheme-woo-sub-menu-table-wrap .uptheme-table th) { background: transparent; }
:where(.uptheme-woo-sub-menu-table-wrap .uptheme-table td, .uptheme-woo-sub-menu-table-wrap .uptheme-table th) { border: none; }
:where(.uptheme-woo-sub-menu-table-wrap .uptheme-table tr) { border-bottom: 1px solid #f5f5f7; }

.uptheme-woo-menu-item .uptheme-woo-menu-item-count {
  background: var(--pg-brand);
  border-radius: var(--pg-r-pill);
  font-weight: 800;
}
.uptheme-woo-menu-item .uptheme-woo-menu-item-count:before {
  color: var(--pg-brand);
}
