/* =========================
   LAYOUT BASICS
========================= */
.container { max-width:1180px; margin:0 auto; padding:0 20px; }
main h2 { font-size:1.75rem; margin:18px 0 10px; }

/* =========================
   HEADER (burger + brand left • tools right)
========================= */
.ja-banner {
  position: sticky; top: 0; z-index: 12000;
  background:#fff; border-bottom:1px solid #eee;
}
.ja-banner__inner {
  height: 56px; display:flex; align-items:center; justify-content:space-between;
  padding: 0 16px; position: relative; /* anchor for dropdown */
}
.ja-left { display:flex; align-items:center; gap:8px; }
.ja-burger {
  display:inline-flex; flex-direction:column; justify-content:center;
  width:28px; height:28px; padding:4px; border:0; background:transparent; cursor:pointer;
}
.ja-burger__bar { height:3px; width:100%; background:#000; margin:3px 0; border-radius:2px; }
header.ja-banner .brand-title {
  margin:0; font-size:1.25rem; font-weight:700; letter-spacing:.08em; color:#222; white-space:nowrap;
}

/* Right group */
.lang-switch { display:inline-flex; align-items:center; gap:10px; }

/* Burger dropdown: NOTE it lives inside .ja-left */
.ja-left .ja-menu {
  position:absolute; top:56px; left:0;
  min-width:170px; display:none; flex-direction:column; gap:6px;
  background:#fff; border:1px solid #ddd; border-radius:8px;
  box-shadow:0 6px 18px rgba(0,0,0,.14); padding:8px 0; z-index:13000;
}
.ja-left .ja-menu.open { display:flex; }
.ja-left .ja-menu a {
  display:block; padding:8px 14px; color:#222; text-decoration:none; font-size:.95rem;
}
.ja-left .ja-menu a:hover { background:#f7f7f7; }

/* RTL: flip header sides and anchor dropdown to right edge */
html[dir="rtl"] .ja-banner__inner { flex-direction: row-reverse; }
html[dir="rtl"] .ja-left { flex-direction: row-reverse; }
html[dir="rtl"] .ja-left .ja-menu { right:0; left:auto; }

/* Small screens */
@media (max-width: 420px) {
  header.ja-banner .brand-title { font-size: 1.1rem; }
  .lang-switch .lang-btn { padding:4px 8px; font-size:.85rem; }
}

/* =========================
   CART BUTTON (in header)
========================= */
.cart-btn {
  margin-left:12px; display:inline-flex; align-items:center; gap:8px;
  padding:6px 10px; border:1px solid #ddd; background:#fff; border-radius:10px; cursor:pointer; font-weight:600;
}
.cart-count {
  min-width:22px; height:22px; padding:0 6px; border-radius:11px;
  display:inline-flex; align-items:center; justify-content:center; font-size:12px; background:#b76e4b; color:#fff;
}

/* =========================
   CART DRAWER (right)
========================= */
.cart-backdrop {
  position: fixed; inset: 0; background: rgba(0,0,0,.45); z-index: 30000; display: none;
}
.cart-backdrop[aria-hidden="false"] { display: block; }

.cart-drawer {
  position: fixed; top: 0; right: 0; height: 100dvh; width: min(420px, 92vw);
  background: #fff; box-shadow: -8px 0 24px rgba(0,0,0,.12);
  transform: translateX(100%); transition: transform .25s ease; z-index: 30001;
  display: grid; grid-template-rows: auto 1fr auto;
}
.cart-drawer[aria-hidden="false"] { transform: translateX(0); }

.cart-header, .cart-footer { padding: 14px 16px; border-bottom: 1px solid #eee; }
.cart-footer { border-top: 1px solid #eee; border-bottom: none; }
.cart-close {
  border:none; background:#fff; width:36px; height:36px; border-radius:10px; cursor:pointer;
  float:right; font-size:22px; line-height:36px; box-shadow:0 2px 10px rgba(0,0,0,.10);
}
.cart-items { padding:6px 10px; overflow:auto; }
.cart-total-row { display:flex; align-items:center; justify-content:space-between; margin-bottom:10px; }

/* Line item */
.cart-line {
  display:grid; grid-template-columns:76px 1fr auto; align-items:center; gap:10px;
  padding:10px 6px; border-bottom:1px solid #f1f1f1;
}
.cart-thumb { width:76px; height:76px; object-fit:cover; border-radius:10px; }
.cart-info { display:grid; gap:6px; }
.cart-name { font-weight:600; }
.cart-meta { display:flex; align-items:center; justify-content:space-between; gap:10px; }
.cart-qty { display:inline-flex; align-items:center; gap:6px; }
.cart-qty-btn {
  width:28px; height:28px; border:1px solid #ddd; background:#fff; border-radius:8px; cursor:pointer;
}
.cart-qty-input { width:56px; text-align:center; padding:6px 8px; border:1px solid #ddd; border-radius:8px; }
.cart-remove {
  border:none; background:#fff; width:32px; height:32px; border-radius:8px; cursor:pointer;
  box-shadow:0 1px 6px rgba(0,0,0,.10); font-size:18px; line-height:32px;
}

/* =========================
   PRODUCT GRID + CARDS
========================= */
.ja-grid {
  display:grid; gap:20px; margin-top:8px;
  grid-template-columns: repeat(2, minmax(0,1fr));
}
@media (min-width: 768px) { .ja-grid { grid-template-columns: repeat(3, 1fr); } }
@media (min-width: 1200px){ .ja-grid { grid-template-columns: repeat(4, 1fr); } }
@media (min-width: 1800px){ .ja-grid { grid-template-columns: repeat(5, 1fr); } }

.card, .product-card {
  background:#fff; border-radius:14px; overflow:hidden;
  box-shadow:0 8px 24px rgba(0,0,0,.06); transition: transform .2s, box-shadow .2s;
}
.card:hover, .product-card:hover { transform: translateY(-2px); box-shadow:0 12px 30px rgba(0,0,0,.08); }

.card__body, .product-card .body {
  padding:10px 12px; display:flex; justify-content:space-between; align-items:flex-start; gap:8px;
}
.card__title, .product-card .title { font-weight:600; }
.card__price, .product-card .price { font-weight:700; white-space:nowrap; }

/* =========================
   IMAGE FRAME (single source of truth)
========================= */

/* Choose the card ratio once; JS reads this value too */
:root{
  --ja-card-ratio: 2 / 3;    /* portrait; shows cone tips nicely */
  --ja-card-pos:   50% 0%;   /* top-anchored */
}

/* The frame */
.image-frame {
  position: relative;
  aspect-ratio: var(--ja-card-ratio);
  overflow: hidden;
  border-radius: 14px;
}

/* The image fills the frame by default; JS may switch to 'contain' per photo */
.image-frame > img,
.card .card__img,
img.cake-thumb {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;                      /* default = crop to fill */
  object-position: var(--ja-card-pos);    /* show the tops */
  border-radius: 14px;
  background: transparent;
}

/* Optional escape hatch for a specific card: add .no-crop to its .image-frame */
.image-frame.no-crop > img {
  position: static;
  width: 100%;
  height: auto;
  object-fit: contain;
  background: #fff;
}

/* If your markup ever has an overlay link on top of the image, make sure it
   doesn’t hijack clicks intended for the photo itself. */
#ja-grid .card .card-link-overlay,
#ja-grid .product-card .card-link-overlay{
  pointer-events: none;
}

/* =========================
   QUICK VIEW MODAL
========================= */
.ja-modal { position:fixed; inset:0; z-index:40000; display:none; }
.ja-modal[aria-hidden="false"] { display:block; }
.ja-modal__backdrop { position:absolute; inset:0; background:rgba(0,0,0,.45); z-index:1; }

.ja-modal__sheet {
  position:absolute; z-index:2; background:#fff; border-radius:16px; overflow:hidden;
  left:50%; top:50%; transform:translate(-50%,-50%);
  width:min(960px, 94vw); max-height:86vh;
  display:grid; grid-template-columns:1fr 1fr;
}
.ja-modal__close {
  position:absolute; top:10px; right:12px; width:36px; height:36px;
  border:none; background:#fff; border-radius:50%;
  box-shadow:0 2px 10px rgba(0,0,0,.18); cursor:pointer; font-size:22px; line-height:36px; z-index:3;
}
.ja-modal__media { position:relative; }
.ja-modal__media img { width:100%; height:100%; object-fit:cover; }
.ja-modal__body { padding:20px 22px; overflow:auto; }

/* Mobile/tablet: single column */
@media (max-width: 999px){
  .ja-modal__sheet { width:94vw; max-height:90vh; grid-template-columns:1fr; }
  .ja-modal__media { max-height:42vh; overflow:hidden; }
  .ja-modal__body  { max-height:calc(90vh - 42vh); overflow:auto; padding:16px 18px 72px; }
  #ja-add { position:sticky; bottom:0; box-shadow:0 -6px 18px rgba(0,0,0,.06); }
}

/* =========================
   TOAST
========================= */
.ja-toast {
  position:fixed; left:50%; bottom:22px; transform:translateX(-50%) translateY(20px);
  background:#222; color:#fff; padding:10px 14px; border-radius:12px;
  box-shadow:0 8px 24px rgba(0,0,0,.25); opacity:0; z-index:50000;
  transition:opacity .18s ease, transform .18s ease; font-size:.95rem; pointer-events:none;
}
.ja-toast.show { opacity:1; transform:translateX(-50%) translateY(0); }

/* =========================
   QTY CONTROLS (small)
========================= */
.qty { display:flex; align-items:center; gap:6px; margin:12px 0; }
.qty input {
  width:48px; height:30px; text-align:center; padding:4px 6px; font-size:.9rem;
  border:1px solid #ddd; border-radius:6px;
}
.qty-btn {
  width:30px; height:30px; line-height:28px; text-align:center; font-size:16px;
  border:1px solid #ddd; background:#fff; border-radius:6px; cursor:pointer;
}

/* “Add to cart” in modal: compact */
.ja-modal #ja-add {
  font-size:.95rem; padding:10px 14px; height:42px; border-radius:10px;
  margin-top:12px; width:auto; min-width:160px; display:inline-block; margin-left:auto;
}

/* =========================
   CHECKOUT PANEL (slide-in)
========================= */
.ja-checkout { position:fixed; inset:0; z-index:42000; display:none; }
.ja-checkout[aria-hidden="false"] { display:block; }
.ja-checkout__backdrop { position:absolute; inset:0; background:rgba(0,0,0,.48); }

.ja-checkout__sheet {
  position:absolute; right:0; top:0; height:100%; width:min(680px, 100%);
  background:#fff; display:flex; flex-direction:column;
  box-shadow:-8px 0 24px rgba(0,0,0,.18);
  transform:translateX(100%); opacity:0; transition:transform .28s ease, opacity .28s ease;
}
.ja-checkout[aria-hidden="false"] .ja-checkout__sheet { transform:translateX(0); opacity:1; }

.ja-checkout__header {
  display:flex; align-items:center; justify-content:space-between;
  padding:16px 18px; border-bottom:1px solid #eee;
}
.ja-checkout__header h3 { margin:0; font-size:1.1rem; letter-spacing:.02em; }
.ja-checkout__close { font-size:1.4rem; background:none; border:0; cursor:pointer; line-height:1; }
.ja-checkout__content { padding:16px 18px 20px; overflow:auto; }

.ja-order h4 { margin:0 0 8px; font-weight:600; }
#ja-order-table { border:1px solid #eee; border-radius:12px; overflow:hidden; }
.ja-table { width:100%; border-collapse:collapse; }
.ja-table th, .ja-table td { padding:10px 12px; border-bottom:1px solid #f2f2f2; text-align:left; }
.ja-table th { background:#fafafa; font-weight:600; }
.ja-order__total { display:flex; justify-content:space-between; padding:12px 4px; font-size:1.05rem; }

.ja-formgrid { display:grid; grid-template-columns:1fr 1fr; gap:12px; margin-top:16px; }
.ja-field { display:flex; flex-direction:column; gap:6px; }
.ja-field--full { grid-column:1 / -1; }
.ja-field input, .ja-field textarea {
  width:100%; border:1px solid #ddd; border-radius:10px; padding:10px 12px; font:inherit; outline:none;
}
.ja-field input:focus, .ja-field textarea:focus { border-color:#b76e4b; box-shadow:0 0 0 3px rgba(183,110,75,.12); }

.ja-check { grid-column:1 / -1; display:flex; align-items:flex-start; gap:10px; font-size:.95rem; }
.ja-check input { margin-top:3px; }

.ja-checkout__actions { display:flex; justify-content:flex-end; gap:10px; margin-top:14px; }
.ja-checkout .btn { padding:10px 14px; border-radius:10px; border:1px solid transparent; cursor:pointer; text-decoration:none; }
.ja-checkout .btn-primary { background:#b76e4b; color:#fff; }
.ja-checkout .btn-primary:disabled { opacity:.6; cursor:not-allowed; }
.ja-checkout .btn-secondary { background:#fff; border-color:#ddd; }
.ja-help { color:#666; font-size:.9rem; margin:10px 2px 0; }

/* Honeypot */
.ja-hp { position:absolute !important; left:-9999px !important; opacity:0 !important; }

/* Mobile friendly */
@media (max-width: 720px){
  .ja-formgrid { grid-template-columns:1fr; }
  .ja-checkout__sheet { width:100%; }
}

/* RTL tweaks inside checkout */
html[dir="rtl"] .ja-formgrid { direction:rtl; }
html[dir="rtl"] .ja-field input,
html[dir="rtl"] .ja-field textarea { text-align:right; }
html[dir="rtl"] .ja-checkout__actions { flex-direction: row-reverse; }

/* =========================
   WHATSAPP number (obfuscated)
========================= */
:root{
  /* +213549740494 -> base64 split (kept as you had) */
  --wa-a: 'MjEzNTQ=';
  --wa-b: 'OTc0MDQ5NA==';
}
#ja-grid .card .card-link-overlay,
#ja-grid .product-card .card-link-overlay {
  pointer-events: none !important;
}
/* Ensure no invisible overlay steals clicks */
#ja-grid .card-link-overlay { pointer-events: none !important; }
/* ================================
   CAKES PAGE HEADER ISOLATION
   (only applies when body.page-cakes)
=================================== */

/* Hide the global header/nav that is styled by styles.css */
.page-cakes .site-header,
.page-cakes .header-top,
.page-cakes .main-nav {
  display: none !important;
}

/* Use the cakes header (.ja-banner) only, keep it transparent */
.page-cakes .ja-banner,
.page-cakes .ja-banner__inner {
  background: transparent !important;
  border: 0 !important;
  box-shadow: none !important;
  -webkit-backdrop-filter: none !important;
  backdrop-filter: none !important;
}

/* Disable the top masking so the grid isn’t visually clipped */
.page-cakes main {
  -webkit-mask: none !important;
          mask: none !important;
  padding-top: 0 !important;   /* we’ll manage spacing ourselves below */
}

/* If you want spacing below the sticky cakes header, set it here */
.page-cakes {
  /* Adjust to your .ja-banner height (e.g., 56–64px).
     If you’re calling JS that sets --sticky-offset dynamically, you can omit this. */
  --sticky-offset: 64px;
}

/* Option A: let the content sit below the header */
.page-cakes main { padding-top: var(--sticky-offset) !important; }

/* Option B (hero overlap look): comment out the line above and keep padding-top: 0 */


/* (Optional) Small sanity nudge for the cakes grid start */
.page-cakes #ja-grid { margin-top: 8px; }
/* ===== Transparent / Glassy header ===== */
.ja-banner{
  position: sticky;
  top: 0;
  z-index: 12000;
  background: transparent;          /* fully transparent at top */
  border-bottom: none;
  transition: background .25s ease, border-color .25s ease;
}
.ja-banner.scrolled{
  background: rgba(255,255,255,.85); /* readable when scrolling */
  border-bottom: 1px solid #eee;
  backdrop-filter: blur(6px);
}

/* Make header layout wrap nicely on small screens */
.ja-banner__inner{
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  flex-wrap: wrap;                   /* key: allows 2nd row on mobile */
}

/* Right-side tools (cart, language, etc.) */
.ja-tools{
  display:flex;
  align-items:center;
  gap: 8px;
  flex-wrap: wrap;                   /* keep items visible, never clipped */
  overflow: visible;                 /* avoid hidden dropdowns */
}

/* Language switch – always visible & tappable */
.lang-switch,
.ja-lang,
.ja-lang-switch{
  display:flex !important;
  gap: 6px;
  align-items:center;
}
.lang-switch button,
.ja-lang button,
.ja-lang-switch button{
  padding: 4px 10px;
  font-size: .9rem;
  line-height: 1.1;
  border-radius: 10px;
  white-space: nowrap;
}

/* Prevent header from covering content */
:root{ --sticky-offset: 56px; }
.ja-page, main{
  padding-top: var(--sticky-offset);
}

/* ===== Responsive grid/cards for phones & tablets ===== */
#ja-grid{
  display: grid;
  grid-template-columns: repeat(3, minmax(0,1fr));
  gap: 16px;
}
@media (max-width: 1024px){
  #ja-grid{ grid-template-columns: repeat(2, minmax(0,1fr)); gap: 14px; }
}
@media (max-width: 600px){
  #ja-grid{ grid-template-columns: 1fr; gap: 12px; }
}

/* Card media: fill nicely without weird cropping bars */
.ja-card__media{
  position: relative;
  border-radius: 12px;
  overflow: hidden;
  aspect-ratio: 4/5;               /* consistent height on all screens */
}
.ja-card__media img{
  width: 100%;
  height: 100%;
  object-fit: cover;                /* looks natural; no squish */
  display:block;
}

/* Tidy card text & price on small screens */
.ja-card__title{ font-size: .95rem; }
.ja-card__price{ font-weight: 700; }

/* Container/padding tweaks for small devices */
.container{ max-width:1180px; margin:0 auto; padding: 0 16px; }
@media (max-width: 600px){ .container{ padding: 0 12px; } }

/* Optional: smaller brand title on phones so language fits */
@media (max-width: 600px){
  .brand-title, .ja-brand, .site-title{ font-size: 1.1rem; letter-spacing:.02em; }
}

/* Make dropdown menus sit above everything */
.ja-menu, .dropdown, .ja-dropdown{
  position: absolute;
  z-index: 13000;
}

/* If your header has left/right groups, let them wrap full width on tablets */
@media (max-width: 1024px){
  .ja-left, .ja-tools{ flex: 1 1 100%; }
  .ja-left{ order: 1; }
  .ja-tools{ order: 2; justify-content: flex-start; }
  .lang-switch{ order: 3; }  /* language row can break to its own line */
}
/* === Grid smaller, medium size cakes === */
#ja-grid {
  display: grid;
  justify-content: center; /* center the grid */
  gap: 14px;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
}

/* Card size limits */
#ja-grid .ja-card {
  max-width: 200px;    /* <= smaller medium size */
  width: 100%;
}

/* Keep images balanced */
.ja-card__media {
  aspect-ratio: 3/4;   /* not too tall */
  border-radius: 10px;
  overflow: hidden;
}

.ja-card__media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

/* Tablet adjustments */
@media (max-width: 1024px) {
  #ja-grid .ja-card {
    max-width: 180px;
  }
}

/* Phone adjustments */
@media (max-width: 600px) {
  #ja-grid {
    grid-template-columns: repeat(2, 1fr); /* 2 per row */
  }
  #ja-grid .ja-card {
    max-width: 160px;
  }
}
/* =========================
   Compact, consistent card sizes (all devices)
   - Centered grid
   - Fixed column width per breakpoint so cards never blow up
========================= */

/* Base: phones (smallest) */
#ja-grid{
  display:grid;
  gap:14px;
  grid-template-columns: repeat(auto-fill, 170px); /* fixed, small */
  justify-content:center;                           /* center the tracks */
}
#ja-grid .ja-card{
  width:170px;
}

/* Tablet */
@media (min-width: 600px){
  #ja-grid{
    gap:16px;
    grid-template-columns: repeat(auto-fill, 200px); /* medium on tablets */
  }
  #ja-grid .ja-card{ width:200px; }
}

/* Desktop / large */
@media (min-width: 1024px){
  #ja-grid{
    gap:18px;
    grid-template-columns: repeat(auto-fill, 220px); /* still compact */
  }
  #ja-grid .ja-card{ width:220px; }
}

/* Card media keeps a neat portrait shape */
.ja-card__media{
  aspect-ratio: 3 / 4;
  border-radius: 12px;
  overflow: hidden;
}
.ja-card__media img{
  width:100%;
  height:100%;
  object-fit:cover;
  display:block;
}

/* Tighten texts so small cards stay tidy */
.ja-card__title{ font-size: .92rem; line-height:1.25; }
.ja-card__price{ font-size: .92rem; font-weight:700; }
.ja-card__desc{ font-size: .85rem; color:#555; }

/* Optional: shrink action row/buttons inside cards on small screens */
@media (max-width: 600px){
  .ja-card .ja-btn{ padding:6px 10px; font-size:.85rem; }
}
/* ===== Header: burger LEFT, brand FAR RIGHT, tools before brand ===== */
.ja-banner {
  background:#fff;
  border-bottom:1px solid #eee;
  box-shadow: 0 6px 22px rgba(0,0,0,.08); /* nice shadow */
}

.ja-banner__inner{
  display:flex !important;
  align-items:center !important;
  justify-content:space-between !important;
  position:relative !important;
  height:56px;
}

/* Left group (burger + menu anchor) */
.ja-left{
  display:flex !important;
  align-items:center !important;
  gap:8px !important;
  position:relative !important; /* anchor for dropdown */
}

/* Brand sits on the far right, independent of flow */
header.ja-banner .brand-title{
  position:absolute !important;
  right:16px !important;
  top:50% !important;
  transform:translateY(-50%) !important;
  margin:0 !important;
  white-space:nowrap !important;
  max-width:42vw;              /* prevent overlap */
  overflow:hidden; text-overflow:ellipsis;
}

/* Tools (languages, cart) pushed to the right,
   but leave space for the brand on the far edge */
.ja-tools{
  margin-left:auto !important;
  margin-right:180px !important;  /* reserve space for brand; tweak 140–220 */
  display:flex; align-items:center; gap:10px;
}

/* Make sure the dropdown opens under the burger on the LEFT */
header.ja-banner > .ja-menu{
  left:0 !important;
  right:auto !important;
  top:56px !important;
}

/* Small phones: slightly tighter fit */
@media (max-width:600px){
  header.ja-banner .brand-title{
    right:10px !important;
    max-width:48vw;
    font-size:1rem;
    letter-spacing:.05em;
  }
  .ja-tools{ margin-right:130px !important; gap:6px; }
}
/* ===== Keep header always LTR, even in Arabic ===== */
html[lang="ar"] .ja-banner__inner {
  flex-direction: row; /* don't reverse in Arabic */
}

/* Dropdown stays under burger (left side) */
html[lang="ar"] .ja-left .ja-menu {
  left: 0;
  right: auto;
}

/* Brand title spacing same for all languages */
html[lang="ar"] .brand-title {
  margin-left: 8px;
  margin-right: 0;
}

/* Tools (languages + cart) always on the right */
html[lang="ar"] .ja-tools {
  margin-right: auto;
  margin-left: 0;
}
/* =========================================================
   HEADER PARITY WITH LIVE SITE (EN/FR/AR all LTR)
   Put this block at the very end of cakes.css
   Scope: cakes page header only
========================================================= */

/* Always keep the header LTR, even when dir="rtl" */
html[dir="rtl"] .page-cakes .ja-banner__inner {
  flex-direction: row !important;
  padding-left: 16px !important;
  padding-right: 16px !important;
}

/* Keep burger + brand on the left (no reverse row) */
html[dir="rtl"] .page-cakes .ja-left {
  flex-direction: row !important;
  margin-left: 0 !important;
  transform: none !important;        /* cancel any left-nudge transform */
}

/* Dropdown must open from the LEFT under the burger */
html[dir="rtl"] .page-cakes .ja-left .ja-menu,
.page-cakes header.ja-banner > .ja-menu {
  left: 0 !important;
  right: auto !important;
  top: 56px !important;
}

/* Tools (languages + cart) always on the right */
html[dir="rtl"] .page-cakes .ja-tools {
  margin-left: auto !important;
  margin-right: 0 !important;
}

/* Brand title sits next to burger (no absolute positioning) */
.page-cakes header.ja-banner .brand-title,
.page-cakes header.ja-banner .ja-left .brand-title {
  position: static !important;
  left: auto !important;
  right: auto !important;
  top: auto !important;
  transform: none !important;
  margin: 0 !important;
  text-align: left !important;
  white-space: nowrap !important;
}

/* Neutralize any earlier “strong left nudge” blocks on cakes page */
.page-cakes .ja-banner__inner { padding-left: 16px !important; }
.page-cakes .ja-left { margin-left: 0 !important; }

/* Safety: if any class tries to flip the header for RTL, undo it */
html[dir="rtl"] .page-cakes .ja-banner__inner.rtl,
html[dir="rtl"] .page-cakes .rtl .ja-banner__inner {
  flex-direction: row !important;
}
/* Stronger left push */
.page-cakes {
  --left-nudge: -80px;   /* try -30px, -40px, -50px until it looks perfect */
}

.page-cakes .ja-left {
  margin-left: var(--left-nudge) !important;
}

.page-cakes header.ja-banner > .ja-menu,
.page-cakes .ja-left .ja-menu {
  left: calc(0px + var(--left-nudge)) !important;
}
/* === Keep dropdown aligned exactly under the burger === */
.page-cakes .ja-left {
  position: relative !important; /* burger = anchor */
}

.page-cakes .ja-left .ja-menu {
  left: 0 !important;   /* start exactly under the burger */
  right: auto !important;
  top: 56px !important; /* same as header height */
  transform: none !important;
}
/* === CAKES: Mobile & Tablet header fix === */

/* Let the left group shrink properly and stop cutting the brand */
.page-cakes .ja-banner__inner {
  gap: 10px;
}
.page-cakes .ja-left {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;             /* allow brand to shrink */
  position: relative;       /* anchor the dropdown */
  margin-left: 0 !important;/* cancel any earlier negative nudges */
}
.page-cakes .brand-title {
  margin: 0;
  line-height: 1.1;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;  /* avoid overflow pushing layout */
  max-width: 60vw;          /* keep space for language/cart */
}

/* Keep the burger fully flush-left */
.page-cakes .ja-burger {
  margin-left: 0 !important;
}

/* Make the language/cart strip compact and non-wrapping */
.page-cakes .lang-switch {
  display: flex;
  align-items: center;
  gap: 8px;
  flex: 0 0 auto;
  white-space: nowrap;
}

/* Keep the dropdown menu aligned under the burger on narrow screens */
.page-cakes #ja-menu.ja-menu {
  position: absolute;
  left: 0;
  top: 100%;
  right: auto;
  transform: none;
}

/* --- Tablet (≤ 1024px) --- */
@media (max-width: 1024px) {
  .page-cakes .brand-title {
    font-size: 1.05rem;
    letter-spacing: .02em;
    max-width: 56vw;
  }
}

/* --- Mobile (≤ 768px) --- */
@media (max-width: 768px) {
  .page-cakes .ja-banner__inner { padding-left: 8px; padding-right: 8px; }
  .page-cakes .brand-title {
    font-size: 0.98rem;
    max-width: 54vw;
  }
  .page-cakes .lang-switch { gap: 6px; }
  .page-cakes .lang-switch .lang-btn { padding: 3px 6px; font-size: .78rem; }
  .page-cakes .cart-btn { padding: 4px 8px; }
  /* Hide the word "Cart" to save width, keep icon + counter */
  .page-cakes .cart-btn span:nth-child(2) { display: none; }
}

/* --- Small phones (≤ 420px) --- */
@media (max-width: 420px) {
  .page-cakes .brand-title {
    font-size: 0.92rem;
    max-width: 50vw;
    letter-spacing: .01em;
  }
  .page-cakes .lang-switch { gap: 4px; }
  .page-cakes .lang-switch .lang-btn { font-size: .72rem; padding: 3px 5px; }
}
/* === CAKES: fix Arabic (RTL) dropdown position === */
.page-cakes .ja-left { position: relative; } /* anchor the menu */

/* Default (LTR) — open under the burger on the left */
.page-cakes #ja-menu.ja-menu{
  position: absolute;
  top: 100%;
  left: 0;
  right: auto;
  transform: none;
  z-index: 1000;
}

/* RTL (Arabic) — open under the burger on the RIGHT */
html[lang="ar"] .page-cakes #ja-menu.ja-menu,
html[dir="rtl"] .page-cakes #ja-menu.ja-menu{
  left: auto !important;
  right: 0 !important;          /* stick to the right edge of .ja-left */
  transform: none !important;
  text-align: right;
  direction: rtl;
}

/* Optional: tidy item alignment in RTL */
html[lang="ar"] .page-cakes .ja-menu a,
html[dir="rtl"] .page-cakes .ja-menu a{
  text-align: right;
}
/* ===== CAKES ONLY: force smaller brand title on tablets/phones ===== */
body.page-cakes header.ja-banner .ja-left > .brand-title.brand-title {
  /* desktop/tablet default */
  font-size: 1.05rem !important;
  line-height: 1.15 !important;
  letter-spacing: .04em !important;
  margin: 0 !important;
  max-width: 60vw !important;
  white-space: nowrap !important;
  overflow: hidden !important;
  text-overflow: ellipsis !important;
}

/* iPad and below */
@media (max-width: 1024px){
  body.page-cakes header.ja-banner .ja-left > .brand-title.brand-title {
    font-size: 0.98rem !important;
    max-width: 56vw !important;
  }
}

/* phones / narrow tablets */
@media (max-width: 768px){
  body.page-cakes header.ja-banner .ja-left > .brand-title.brand-title {
    font-size: 0.92rem !important;
    max-width: 54vw !important;
  }
  /* save space by hiding the word "Cart" */
  .page-cakes .cart-btn span:nth-child(2){ display:none; }
}

/* small phones */
@media (max-width: 430px){
  body.page-cakes header.ja-banner .ja-left > .brand-title.brand-title {
    font-size: 0.88rem !important;
    max-width: 52vw !important;
  }
}
/* === CAKES: taller header on mobile/tablet (keeps current layout) === */

/* Give the whole page a slightly larger sticky offset so content
   doesn't jump under the taller header on small screens */
@media (max-width: 1024px){
  body.page-cakes { --sticky-offset: 72px; }
}

/* Make the banner a bit taller only on cakes.html */
@media (max-width: 1024px){
  .page-cakes header.ja-banner{
    min-height: 72px;                 /* was ~56px */
  }
  .page-cakes .ja-banner__inner{
    padding-block: 10px;              /* more top/bottom breathing room */
    align-items: center;
  }
}

/* Phones: a touch more height */
@media (max-width: 768px){
  body.page-cakes { --sticky-offset: 78px; }
  .page-cakes header.ja-banner{ min-height: 78px; }
  .page-cakes .ja-banner__inner{ padding-block: 12px; }
}

/* Arabic: allow wrapping & give the title a bit more width (no swaps) */
html[lang="ar"] .page-cakes header.ja-banner .brand-title{
  white-space: normal;        /* allow 1–2 lines in Arabic */
  text-overflow: clip;
  overflow: visible;
  max-width: 74vw;            /* slightly wider than LTR so it fits cleanly */
  line-height: 1.2;
}
/* Desktop only (>1024px) — optional */
@media (min-width: 1025px){
  .page-cakes header.ja-banner{
    min-height: 84px; /* adjust to taste */
  }
  .page-cakes .ja-banner__inner{
    padding-block: 14px;
  }
}
/* Mobile / tablet dropdown positioning fix */
@media (max-width: 992px) {
  .ja-menu {
    position: absolute;
    top: 100%;              /* place directly below the burger line */
    margin-top: 15px;       /* extra gap below burger & language buttons */
    left: 0;
    right: auto;
    z-index: 9999;
  }
}
/* === Brand title fix for Arabic === */
.ja-banner .brand-title {
  line-height: 1.4;      /* give more breathing space */
  padding-top: 4px;      /* nudge it slightly down */
  padding-bottom: 6px;   /* add extra room below */
  font-size: 1.4rem;     /* make it more visible */
}

/* =========================================
   CAKES PAGE — Silver Frame Panel for Header
========================================= */
.page-cakes .ja-banner {
  background: #f5f5f5;                  /* silver background */
  border: 2px solid #c0c0c0;            /* silver border around frame */
  border-radius: 10px;                  /* slightly rounded corners */
  box-shadow: 0 4px 12px rgba(0,0,0,0.08); /* soft shadow for depth */
  margin: 10px auto;                    /* space around header panel */
  max-width: 1200px;                    /* keep it neat and centered */
}
/* === Arabic only — mobile & tablet: keep burger + brand at the far right === */
@media (max-width: 1024px) {
  html[lang="ar"] .page-cakes .ja-left {
    flex: 0 0 auto !important;      /* stop taking the whole row */
    margin-left: auto !important;    /* push the group to the right edge */
    justify-content: flex-start !important; /* keep order: burger, then title */
    gap: 8px !important;
  }

  html[lang="ar"] .page-cakes .ja-left .brand-title {
    margin: 0 !important;            /* kill any auto-centering */
    text-align: right !important;
    max-width: 60vw;                  /* prevent overlap with tools */
  }

  /* Dropdown stays anchored under the burger on the RIGHT */
  html[lang="ar"] .page-cakes .ja-left .ja-menu {
    right: 0 !important;
    left: auto !important;
    top: 56px !important;
  }
}
/* ARABIC — tablet & mobile: put tools (lang + cart) on a second row */
@media (max-width: 1024px) {
  html[lang="ar"] .page-cakes .ja-banner__inner {
    flex-wrap: wrap !important;                 /* allow 2 rows */
  }

  /* Row 1: burger + brand, packed to the right */
  html[lang="ar"] .page-cakes .ja-left {
    flex: 0 0 auto !important;                  /* shrink to contents */
    margin-left: auto !important;               /* push row to the right edge */
    justify-content: flex-start !important;
    gap: 8px !important;
  }

  /* Row 2: tools span full width, sit below */
  html[lang="ar"] .page-cakes .ja-tools,
  html[lang="ar"] .page-cakes .lang-switch {
    flex: 1 0 100% !important;                  /* force new line */
    order: 2 !important;
    justify-content: flex-start !important;     /* align like EN/FR */
    margin-top: 6px !important;
  }

  /* keep dropdown anchored to burger on the right */
  html[lang="ar"] .page-cakes .ja-left .ja-menu {
    right: 0 !important;
    left: auto !important;
    top: 56px !important;
  }
}
/* ===== Fullscreen white panel (About/Contact) ===== */
.ja-fs-panel {
  position: fixed; inset: 0; z-index: 14000;
  display: none;
}
.ja-fs-panel.is-open { display: block; }

.ja-fs-backdrop {
  position: absolute; inset: 0;
  background: rgba(0,0,0,.18);
  backdrop-filter: blur(2px);
}

.ja-fs-sheet {
  position: absolute; inset: 0;
  background: #fff; color: #111;
  display: grid; grid-template-rows: auto 1fr;
}

.ja-fs-close {
  position: absolute; top: 14px; left: 14px;
  width: 40px; height: 40px;
  border-radius: 50%;
  border: 1px solid #e6e6e6;
  background: #fff; color: #111;
  font-size: 24px; line-height: 1;
  cursor: pointer;
}

.ja-fs-header {
  display: flex; align-items: center; gap: 12px;
  padding: 16px 22px 10px 68px; /* space for close btn */
  border-bottom: 1px solid #eee;
}
.ja-fs-header h2 {
  margin: 0; font-size: 1.1rem; font-weight: 600; letter-spacing: .02em;
}

.ja-fs-content {
  padding: 26px 22px 40px 68px;
  overflow: auto;
  max-width: 900px;
}

/* Large, modern typographic look (black on white) */
.ja-fs-content h3 { font-size: clamp(1.4rem, 1.2vw + 1rem, 1.9rem); margin: 0 0 8px; }
.ja-fs-content p  { font-size: 1.06rem; line-height: 1.7; margin: 0 0 14px; color: #222; }
.ja-fs-content ul { margin: 12px 0 16px 20px; }
.ja-fs-content li { margin: 6px 0; }

/* Optional: lock scroll when panel is open */
body.ja-no-scroll { overflow: hidden; }

/* Mobile tweaks */
@media (max-width: 768px) {
  .ja-fs-header { padding-left: 56px; }
  .ja-fs-content { padding: 18px 16px 28px 56px; }
  .ja-fs-close { top: 10px; left: 10px; width: 36px; height: 36px; font-size: 22px; }
}
/* 🚫 TEMP: hide lead time */
.lead-time {
  display: none !important;
}
/* === RTL (Arabic) fix: move close + title to the right === */
html[dir="rtl"] .ja-fs-header {
  display: flex !important;
  flex-direction: row-reverse !important;
  justify-content: flex-start !important;
  align-items: center !important;
  text-align: right !important;
  padding-right: 1rem !important;
}

html[dir="rtl"] .ja-fs-header h2 {
  order: 1 !important;
  margin: 0 0.5rem 0 0 !important;
}

html[dir="rtl"] .ja-fs-close {
  order: 0 !important;
  margin-left: 0.5rem !important;
  margin-right: 0 !important;
}
/* === FINAL RTL FIX — Contact/About fullscreen panel === */
html[dir="rtl"] .ja-fs-close {
  left: auto !important;    /* remove the left anchor */
  right: 14px !important;   /* move it to the right edge */
}

html[dir="rtl"] .ja-fs-header {
  flex-direction: row-reverse !important;
  justify-content: flex-end !important;
  padding-right: 68px !important; /* mirror the LTR left padding */
  padding-left: 22px !important;
}

html[dir="rtl"] .ja-fs-header h2 {
  text-align: right !important;
}
