/* =========================================================
   Sweet Box 2026 — base.css
   משתנים, reset, topbar, breadcrumb, divider, footer.
   נטען בכל עמודי האתר.
   ========================================================= */

* { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --blue: #B5DCE8;
  --blue-deep: #5B9DB5;
  --blue-soft: #EDF6FA;
  --teal-accent: #4A8FA8;
  --ink: #1A1A1F;
  --ink-soft: #4D5258;
  --ink-whisper: #8A8E96;
  --cream: #FFFFFF;
  --brown: #554B41;
  --paper: #FFFFFF;
  --line: #E8EAED;
  --green: #6B8E5C;
  --success: #6B8E5C;
}

html, body {
  font-family: 'Heebo', 'Frank Ruhl Libre', sans-serif;
  color: var(--ink);
  background: var(--paper);
  direction: rtl;
  scroll-behavior: smooth;
  -webkit-font-smoothing: antialiased;
}

a { color: inherit; text-decoration: none; }

img { max-width: 100%; height: auto; }

/* === TOP BAR === */
.topbar {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 100;
  padding: 14px 32px;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  background: rgba(250, 250, 250, 0.85);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid rgba(0,0,0,0.05);
}
.admin-bar .topbar { top: 32px; }
.topbar > *:first-child { justify-self: start; }
.topbar > *:last-child { justify-self: end; }
.topbar .logo { justify-self: center; }
.topbar .logo img { height: 56px; width: auto; display: block; }
.topbar .logo a { display: block; line-height: 0; }
.topbar .cta {
  background: var(--teal-accent);
  color: #FFFFFF;
  padding: 10px 22px;
  font-size: 12px;
  letter-spacing: 2px;
  text-decoration: none;
  font-weight: 500;
  border-radius: 999px;
  transition: background 0.3s, transform 0.2s;
}
.topbar .cta:hover { background: var(--brown); transform: translateY(-1px); }
.topbar .cta-bulk {
  background: transparent;
  border: 1.5px solid var(--teal-accent);
  color: var(--teal-accent);
}
.topbar .cta-bulk:hover { background: var(--teal-accent); color: #FFF; }

.topbar-side { display: flex; align-items: center; gap: 14px; }
.cart-icon-btn {
  position: relative;
  width: 42px;
  height: 42px;
  border-radius: 50%;
  background: white;
  border: 1.5px solid var(--line);
  display: flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
  transition: border-color 0.3s, transform 0.2s;
}
.cart-icon-btn:hover { border-color: var(--blue-deep); transform: translateY(-1px); }
.cart-icon-btn svg { width: 18px; height: 18px; color: var(--brown); }
.cart-icon-btn .cart-badge {
  position: absolute;
  top: -4px;
  inset-inline-start: -4px;
  min-width: 20px;
  height: 20px;
  border-radius: 999px;
  background: var(--teal-accent);
  color: white;
  font-size: 11px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 5px;
  line-height: 1;
}

/* === תפריט מובייל: המבורגר + מגירה === */
.mobile-hamburger {
  display: none;
  width: 42px;
  height: 42px;
  border-radius: 50%;
  background: white;
  border: 1.5px solid var(--line);
  align-items: center;
  justify-content: center;
  cursor: pointer;
  padding: 0;
  font-family: inherit;
  transition: border-color 0.3s, transform 0.2s;
}
.mobile-hamburger:hover { border-color: var(--blue-deep); transform: translateY(-1px); }
.mobile-hamburger svg { width: 20px; height: 20px; color: var(--brown); }

@media (max-width: 760px) {
  .topbar {
    grid-template-columns: auto 1fr auto;
    gap: 8px;
    padding: 10px 12px;
  }
  .topbar .cta,
  .topbar .cta-bulk { display: none; }
  .mobile-hamburger { display: flex; order: 1; justify-self: start; }
  .topbar .logo { order: 2; justify-self: center; }
  .topbar .topbar-side { order: 3; justify-self: end; }
}

.sb-drawer { position: fixed; inset: 0; z-index: 1000; pointer-events: none; direction: rtl; }
.sb-drawer.open { pointer-events: auto; }
.sb-drawer-backdrop { position: absolute; inset: 0; background: rgba(20,20,25,0.55); opacity: 0; transition: opacity 0.3s; }
.sb-drawer.open .sb-drawer-backdrop { opacity: 1; }
.sb-drawer-panel {
  position: absolute; top: 0; bottom: 0; inset-inline-start: 0;
  width: 84%; max-width: 340px; background: white;
  transform: translateX(100%);
  transition: transform 0.35s cubic-bezier(0.4, 0, 0.2, 1);
  padding: 22px 26px 30px; overflow-y: auto;
  display: flex; flex-direction: column;
  box-shadow: -4px 0 28px rgba(20,20,25,0.22);
}
.sb-drawer.open .sb-drawer-panel { transform: translateX(0); }
.sb-drawer-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 18px; padding-bottom: 18px; border-bottom: 1px solid var(--line); }
.sb-drawer-header .sb-drawer-logo img { height: 48px; width: auto; display: block; }
.sb-drawer-close { background: white; border: 1.5px solid var(--line); width: 38px; height: 38px; border-radius: 50%; cursor: pointer; font-size: 16px; color: var(--brown); font-family: inherit; transition: border-color 0.3s, transform 0.2s; padding: 0; line-height: 1; }
.sb-drawer-close:hover { border-color: var(--blue-deep); transform: rotate(90deg); }
.sb-drawer-cta { display: block; background: var(--teal-accent); color: white; text-align: center; border-radius: 999px; padding: 14px 18px; font-weight: 500; letter-spacing: 2px; font-size: 13px; text-decoration: none; margin-bottom: 12px; transition: background 0.3s; }
.sb-drawer-cta:hover { background: var(--brown); color: white; }
.sb-drawer-cta.secondary { background: white; color: var(--teal-accent); border: 1.5px solid var(--teal-accent); }
.sb-drawer-cta.secondary:hover { background: var(--teal-accent); color: white; }
.sb-drawer-links { list-style: none; margin: 16px 0 0; padding: 0; flex: 1; }
.sb-drawer-links li { border-bottom: 1px solid var(--line); }
.sb-drawer-links li:last-child { border-bottom: none; }
.sb-drawer-links a { display: flex; align-items: center; justify-content: space-between; padding: 15px 4px; text-decoration: none; color: var(--brown); font-size: 15.5px; font-weight: 500; transition: color 0.2s; }
.sb-drawer-links a:hover { color: var(--blue-deep); }
.sb-drawer-links a .arrow { color: var(--ink-whisper); font-size: 14px; }
.sb-drawer-links a .cart-mini-badge { background: var(--teal-accent); color: white; font-size: 11px; font-weight: 700; padding: 2px 8px; border-radius: 999px; margin-inline-start: auto; margin-inline-end: 8px; }
.sb-drawer-footer { margin-top: 18px; padding-top: 18px; border-top: 1px solid var(--line); }
.sb-drawer-social { display: flex; justify-content: center; gap: 14px; }
.sb-drawer-social a { width: 38px; height: 38px; border-radius: 50%; border: 1px solid var(--line); background: white; color: var(--brown); display: flex; align-items: center; justify-content: center; transition: background 0.2s; }
.sb-drawer-social a:hover { background: #EDF6FA; }
.sb-drawer-social svg { width: 16px; height: 16px; fill: currentColor; }

/* === BREADCRUMB === */
.breadcrumb {
  padding: 100px 32px 18px;
  font-weight: 300;
  font-size: 14px;
  color: var(--brown);
  letter-spacing: 1px;
  max-width: 1280px;
  margin: 0 auto;
}
.breadcrumb a { color: var(--blue-deep); transition: color 0.3s; }
.breadcrumb a:hover { color: var(--ink); }
.breadcrumb .sep { margin: 0 8px; color: var(--ink-whisper); }

/* === DIVIDER === */
.divider { display: flex; align-items: center; justify-content: center; padding: 4px 0; background: var(--paper); margin: 0; }
.divider img { max-width: 380px; width: 60%; height: auto; opacity: 0.9; display: block; }
.divider.large img { max-width: 720px; width: 80%; }
.divider.cream { background: var(--cream); }
.divider.soft-blue { background: var(--blue-soft); }
.divider.patterned { background: #EDF6FA; }

/* === FOOTER === */
.footer { background: #FFFFFF; color: var(--brown); padding: 26px 32px 16px; border-top: 1px solid rgba(74, 143, 168, 0.18); text-align: center; }
.footer-top { max-width: 800px; margin: 0 auto 16px; display: flex; flex-direction: column; align-items: center; gap: 12px; }
.footer-brand-block { display: flex; flex-direction: column; align-items: center; gap: 8px; }
.footer-brand-block img { height: 54px; width: auto; display: block; }
.footer-social { display: flex; gap: 10px; justify-content: center; }
.footer-social a { width: 32px; height: 32px; border-radius: 50%; background: var(--brown); color: var(--paper); display: inline-flex; align-items: center; justify-content: center; text-decoration: none; transition: background 0.3s; }
.footer-social a:hover { background: var(--blue-deep); }
.footer-social svg { width: 16px; height: 16px; fill: currentColor; }
.footer-columns { max-width: 1100px; margin: 0 auto; display: grid; grid-template-columns: 1fr 1fr 1fr 1fr; gap: 22px; padding: 18px 0; border-top: 1px solid rgba(74, 143, 168, 0.15); border-bottom: 1px solid rgba(74, 143, 168, 0.15); text-align: center; }
.footer-col h4 { font-size: 14px; font-weight: 500; letter-spacing: 2.5px; color: var(--teal-accent); margin-bottom: 10px; text-transform: uppercase; }
.footer-col ul { list-style: none; padding: 0; }
.footer-col li { margin-bottom: 5px; }
.footer-col a, .footer-col p { font-size: 13px; color: var(--brown); text-decoration: none; line-height: 1.55; font-weight: 300; transition: color 0.3s; display: inline-block; }
.footer-col a:hover { color: var(--blue-deep); }
.footer-col .small-note { font-size: 11.5px; color: var(--blue-deep); font-weight: 300; letter-spacing: 1px; }
.footer-kosher-line { max-width: 1200px; margin: 14px auto 0; text-align: center; font-size: 12px; color: var(--teal-accent); font-weight: 400; letter-spacing: 1.5px; padding: 8px 0 4px; }
.footer-bottom { max-width: 1200px; margin: 8px auto 0; text-align: center; font-size: 11px; color: var(--brown); letter-spacing: 2px; opacity: 0.6; }

/* === כפתורי קלף מוצר (משותף לדף הבית ולארכיון) === */
.box-cta-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin-top: 14px;
  padding-top: 14px;
  border-top: 1px solid var(--line);
}
.box-buy-btn, .box-add-btn {
  padding: 11px 8px;
  font-family: inherit;
  font-size: 12.5px;
  font-weight: 500;
  letter-spacing: 0.5px;
  border-radius: 999px;
  cursor: pointer;
  transition: background 0.3s, color 0.3s, transform 0.2s, border-color 0.3s;
  border: none;
  text-align: center;
  white-space: nowrap;
  display: inline-block;
  line-height: 1.2;
}
.box-buy-btn { background: var(--teal-accent); color: white; }
.box-buy-btn:hover { background: var(--brown); transform: translateY(-1px); color: white; }
.box-add-btn { background: white; border: 1.5px solid var(--blue-deep); color: var(--blue-deep); }
.box-add-btn:hover { background: var(--blue-deep); color: white; transform: translateY(-1px); }
.box-add-btn.added { opacity: 0.85; }

/* מוצר שאזל מהמלאי (מוצג לפי הדגל בכרטיסיית המלאי) — בלי אפשרות רכישה */
.btn-oos {
  grid-column: 1 / -1;
  display: block;
  padding: 11px 8px;
  border-radius: 999px;
  background: #F1F3F5;
  border: 1.5px dashed var(--line);
  color: var(--ink-whisper);
  text-align: center;
  font-size: 12.5px;
  font-weight: 500;
  letter-spacing: 1px;
  cursor: default;
}

/* ווקומרס מזריק קישור "מעבר לסל הקניות" אחרי הוספת AJAX — לא חלק מהעיצוב */
.box-card .added_to_cart,
.display-item .added_to_cart,
.upsell-card .added_to_cart,
.checkout-upsell .added_to_cart,
.related-item .added_to_cart { display: none !important; }

/* הודעות מערכת של ווקומרס — מינימלי ותואם עיצוב */
.woocommerce-message, .woocommerce-info, .woocommerce-error {
  max-width: 1100px;
  margin: 12px auto;
  padding: 14px 20px;
  background: var(--blue-soft);
  border-inline-start: 3px solid var(--blue-deep);
  color: var(--ink);
  font-size: 14px;
  list-style: none;
}
.woocommerce-error { border-inline-start-color: #C0574F; background: #FBF0EF; }
.woocommerce-message a, .woocommerce-info a { color: var(--blue-deep); text-decoration: underline; }
.screen-reader-text {
  border: 0; clip: rect(1px, 1px, 1px, 1px); clip-path: inset(50%);
  height: 1px; width: 1px; margin: -1px; overflow: hidden; padding: 0; position: absolute;
}

/* === RESPONSIVE === */
@media (max-width: 900px) {
  .topbar { padding: 10px 12px; }
  .topbar .logo img { height: 40px; }
  .topbar .cta { padding: 8px 14px; font-size: 11px; letter-spacing: 1px; }
  .breadcrumb { padding: 90px 16px 12px; font-size: 12.5px; }
  .divider { padding: 0; }
  .divider img { max-width: 80%; }
  .footer { padding: 22px 16px 14px; }
  .footer-top { flex-direction: column; align-items: center; text-align: center; gap: 10px; margin-bottom: 12px; }
  .footer-brand-block img { height: 46px; }
  .footer-columns { grid-template-columns: 1fr 1fr; gap: 14px; padding: 14px 0; }
  .footer-col h4 { font-size: 12px; letter-spacing: 2px; margin-bottom: 6px; }
  .footer-col a, .footer-col p { font-size: 12.5px; line-height: 1.45; }
  .footer-col li { margin-bottom: 3px; }
  .footer-kosher-line { font-size: 11px; padding: 6px 12px; }
  .footer-bottom { font-size: 10px; }
}
@media (max-width: 700px) {
  .cart-icon-btn { width: 38px; height: 38px; }
  .topbar-side { gap: 8px; }
}
@media (max-width: 782px) {
  .admin-bar .topbar { top: 46px; }
}
@media (max-width: 600px) {
  .divider img { width: 80%; }
}
