
:root{--b1:#06377e;--b2:#0d69c8;--cyan:#22c9e8;--gold:#ffb300;--ink:#12266c}
*{box-sizing:border-box}
body{margin:0;background:#e9eef5;font-family:Arial,"Noto Sans Hebrew",sans-serif;color:#111}
.topbar{position:sticky;top:0;z-index:50;background:#07142b;color:#fff;padding:10px 14px;display:flex;gap:10px;align-items:center;justify-content:center;flex-wrap:wrap;box-shadow:0 2px 8px #0004}
.topbar button,.topbar select,.topbar label{border:0;border-radius:9px;padding:9px 14px;font-weight:700;background:#fff;color:#07142b;cursor:pointer}
.topbar .primary{background:#0d69c8;color:#fff}
.topbar input{display:none}
.status{font-size:13px;opacity:.9}

.pager{display:flex;gap:5px;align-items:center;justify-content:center;flex-wrap:wrap;max-width:100%}
.page-chip{border:1px solid #6aa3d5!important;background:#fff!important;color:#073e8a!important;min-width:34px;padding:7px 9px!important;border-radius:8px!important;font-weight:800!important}
.page-chip.active{background:#ffb300!important;color:#07142b!important;border-color:#ffb300!important}
.pager-gap{opacity:.7;padding:0 2px}

.stage{padding:18px;display:flex;justify-content:center}
.page{width:min(1024px,96vw);aspect-ratio:1024/1448;background:#fff;display:flex;flex-direction:column;box-shadow:0 10px 35px #0003;overflow:hidden}
.header{height:8.7%;min-height:100px;display:flex;align-items:center;justify-content:space-between;gap:18px;padding:12px 34px;background:radial-gradient(circle at 18% 12%,rgba(255,255,255,.95) 0 16%,rgba(234,248,255,.9) 17%,rgba(234,248,255,.55) 28%,transparent 42%),linear-gradient(135deg,#eef7fb 0 50%,#1559a7 50% 100%);border-bottom:5px solid var(--gold)}
.logo{width:36%;min-width:230px;max-width:365px;height:68px;object-fit:contain;background:#fff;border-radius:999px;padding:6px 20px;box-shadow:0 5px 15px #0002}
.headtxt{width:57%;max-width:590px;color:#fff;text-align:right;background:linear-gradient(135deg,rgba(7,55,126,.94),rgba(17,105,193,.84));border-radius:18px;padding:10px 18px;box-shadow:0 6px 18px #0002}
.catalog-label{margin:0 0 3px;font-size:15px;font-weight:700;color:#d8f5ff}
.headtxt h1{font-size:27px;line-height:1.12;margin:0 0 3px;color:#fff;font-weight:800;text-shadow:0 2px 4px #0003}
.headtxt h2{font-size:14px;margin:0;color:#6de2ff;font-weight:600}
.grid{flex:1;min-height:0;padding:10px 22px 6px;display:grid;grid-template-columns:1fr 1fr;grid-template-rows:repeat(4,minmax(0,1fr));gap:7px;background:radial-gradient(circle at 45% 40%,#fff 0 23%,#effbff 63%,#dff8ff 100%)}
.card{border:1.5px solid var(--cyan);border-radius:11px;padding:5px;background:#fff;display:flex;flex-direction:column;min-height:0;overflow:hidden}
.card-title{background:linear-gradient(#0e6ac9,#083e8b);color:#fff;text-align:center;font-size:13.5px;line-height:1.15;font-weight:800;padding:5px 7px;border-radius:8px 8px 5px 5px;white-space:normal;min-height:28px;max-height:34px;overflow:hidden;display:flex;align-items:center;justify-content:center}
.imgbox{
  flex:1 1 auto;
  min-height:108px;
  margin:4px 3px 5px;
  border-radius:8px;
  overflow:hidden;
  background:#fff;
  border:1px solid #e5edf6;
  padding:2px;
  display:flex;
  align-items:center;
  justify-content:center;
  cursor:zoom-in;
}
.imgbox img{
  display:block;
  width:100%;
  height:100%;
  max-width:100%;
  max-height:100%;
  object-fit:contain;
  object-position:center;
  image-rendering:auto;
  -webkit-font-smoothing:antialiased;
  transform:translateZ(0);
}
.placeholder{font-size:16px;color:#6a7c95;text-align:center;border:2px dashed #bfd6e6;padding:18px;border-radius:12px}
.meta{font-size:11.25px;line-height:1.18;color:#17347d;flex:0 0 auto;font-weight:600}
.row{display:grid;grid-template-columns:40% 60%;min-height:17px;align-items:center;padding:2px 6px}
.row:nth-child(odd){background:#eaf6ff;border-radius:7px}
.label{text-align:right;white-space:normal;color:#37557d;font-size:11px;font-weight:700}.val{text-align:start;font-weight:900;color:#101b74;font-size:11.25px;white-space:normal;overflow:visible;text-overflow:clip;word-break:normal;unicode-bidi:plaintext}
.gold{height:2px;background:var(--gold);border-radius:2px;margin:3px 3px 0}
.footer{height:4.8%;min-height:48px;display:flex;align-items:center;justify-content:space-between;padding:0 34px;color:#fff;background:linear-gradient(155deg,#0c61ad,#062e70 55%,#05265f);border-top:5px solid var(--gold)}
.website{direction:ltr;font-size:20px;font-weight:900}.pageno{font-size:18px;font-weight:800;direction:ltr}
.admin-wrap{max-width:1100px;margin:22px auto;padding:0 16px}
.panel{background:#fff;border-radius:16px;padding:18px;margin-bottom:16px;box-shadow:0 5px 20px #0002}
.panel h2{margin-top:0;color:#073e8a}.panel p{line-height:1.6}
.admin-grid{display:grid;grid-template-columns:1fr 1fr;gap:16px}
.big-upload{display:block;border:2px dashed #6aa3d5;border-radius:12px;padding:18px;text-align:center;cursor:pointer;font-weight:700}
.note{font-size:13px;color:#556}
.table-wrap{overflow:auto}.admin-table{width:100%;border-collapse:collapse;font-size:14px}.admin-table th,.admin-table td{border:1px solid #d8e1ea;padding:8px}.admin-table th{background:#083e8b;color:#fff}
.good{color:#087f23;font-weight:700}.bad{color:#b42318;font-weight:700}

.page-note{margin:0 22px 8px;min-height:78px;border:3px solid var(--gold);border-radius:14px;background:linear-gradient(90deg,#fff9e8,#ffffff,#eefaff);display:flex;align-items:center;gap:14px;padding:10px 16px;color:#073e8a;direction:rtl;flex:0 0 auto}
.page-note-title{font-size:19px;line-height:1.15;font-weight:900;color:#073e8a}
.page-note-text{display:flex;flex-direction:column;gap:3px;min-width:0;flex:1}
.page-note-icon{font-size:28px;line-height:1;color:#d79a00;flex:0 0 auto}
.admin-note-editor textarea{width:100%;min-height:95px;border:1px solid #b7c9da;border-radius:9px;padding:10px;font-family:inherit;font-size:14px;direction:rtl}
.admin-note-editor input{width:100%;border:1px solid #b7c9da;border-radius:9px;padding:9px;font-family:inherit;font-size:14px;direction:rtl;margin-bottom:9px}

@media(max-width:760px){
  body{background:#eef3f8}
  .topbar{position:sticky;top:0;z-index:50;padding:7px;gap:5px}
  .topbar button,.topbar select{padding:8px 10px;font-size:12px}
  .status{width:100%;text-align:center;font-size:10.5px}.pager{width:100%;order:10}
  .stage{padding:6px}
  .page{width:100%;aspect-ratio:auto;min-height:auto;overflow:visible;box-shadow:0 5px 18px #0002}
  .header{min-height:92px;height:auto;padding:8px 10px;gap:8px}
  .logo{min-width:0;width:39%;max-width:160px;height:56px;padding:4px 8px}
  .headtxt{width:58%;padding:9px 10px;border-radius:12px}
  .catalog-label{font-size:10px;margin-bottom:3px}
  .headtxt h1{font-size:16px;line-height:1.15;margin:0 0 3px}
  .headtxt h2{font-size:9px}
  .grid{flex:none;padding:7px;grid-template-columns:1fr 1fr;grid-template-rows:none;grid-auto-rows:auto;gap:7px;align-items:stretch}
  .card{min-height:0;height:auto;padding:5px;overflow:visible}
  .card-title{font-size:10.7px;line-height:1.2;min-height:34px;max-height:none;padding:5px;overflow:visible;white-space:normal}
  .imgbox{flex:none;height:155px;min-height:155px;margin:4px 2px;padding:3px;overflow:hidden}
  .imgbox img{width:100%;height:100%;object-fit:contain;object-position:center}
  .meta{display:block!important;flex:none;font-size:11px;line-height:1.28;color:#17347d;overflow:visible;font-weight:600}
  .row{display:grid!important;grid-template-columns:40% 60%;min-height:22px;height:auto;padding:3px 5px;align-items:start}
  .label{display:block!important;white-space:normal;overflow:visible;font-size:10.7px;font-weight:700}
  .val{display:block!important;white-space:normal;overflow:visible;text-overflow:clip;word-break:break-word;font-size:10.9px;line-height:1.3;font-weight:900}
  .gold{height:2px;margin:4px 2px 0}
  .page-note{margin:3px 8px 5px;min-height:42px;padding:5px 8px;gap:6px;align-items:flex-start}
  .page-note-icon{font-size:15px}
  .page-note-title{font-size:8.8px;white-space:normal}
  .page-note-text{font-size:7.7px;line-height:1.25}
  .footer{min-height:44px;height:auto;padding:0 12px}
  .website,.pageno{font-size:14px}
}

@media print{.topbar{display:none}.stage{padding:0}.page{width:210mm;height:297mm;aspect-ratio:auto;box-shadow:none}}

.image-lightbox{
  position:fixed;
  inset:0;
  z-index:9999;
  background:rgba(4,18,44,.88);
  display:none;
  align-items:center;
  justify-content:center;
  padding:22px;
  backdrop-filter:blur(3px);
}
.image-lightbox.open{display:flex}
.image-lightbox-card{
  width:min(980px,96vw);
  max-height:94vh;
  background:#fff;
  border-radius:18px;
  box-shadow:0 22px 80px rgba(0,0,0,.35);
  padding:14px;
  display:flex;
  flex-direction:column;
  gap:10px;
}
.image-lightbox-head{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:12px;
  color:#073e8a;
  font-weight:900;
}
.image-lightbox-title{font-size:16px}
.image-lightbox-close{
  border:0;
  background:#eef4fb;
  color:#073e8a;
  font-size:24px;
  width:38px;
  height:38px;
  border-radius:50%;
  cursor:pointer;
}
.image-lightbox-stage{
  min-height:280px;
  max-height:78vh;
  display:flex;
  align-items:center;
  justify-content:center;
  overflow:hidden;
  background:#fff;
  border-radius:12px;
}
.image-lightbox-stage img{
  display:block;
  max-width:100%;
  max-height:78vh;
  width:auto;
  height:auto;
  object-fit:contain;
  image-rendering:auto;
}
@media(max-width:760px){
  .image-lightbox{padding:8px}
  .image-lightbox-card{width:98vw;padding:9px;border-radius:14px}
  .image-lightbox-title{font-size:13px}
  .image-lightbox-stage{min-height:220px;max-height:82vh}
  .image-lightbox-stage img{max-height:82vh}
}


.grid.cover-mode{
  display:block;
  padding:10px 20px 12px;
}
.cover-page-card{
  height:100%;
  min-height:100%;
  border:1.5px solid var(--cyan);
  border-radius:14px;
  background:#fff;
  overflow:hidden;
  display:flex;
  align-items:center;
  justify-content:center;
  padding:10px;
}
.cover-image-wrap{
  width:100%;
  height:100%;
  min-height:100%;
  display:flex;
  align-items:center;
  justify-content:center;
  border-radius:10px;
  overflow:hidden;
  background:#fff;
  cursor:zoom-in;
}
.cover-image-wrap img{
  display:block;
  width:100%;
  height:100%;
  object-fit:contain;
  object-position:center;
  image-rendering:auto;
}
@media(max-width:760px){
  .grid.cover-mode{
    padding:8px;
  }
  .cover-page-card{
    padding:7px;
  }
}


/* Final prominent customization note */
.page-note{
  margin:0 22px 8px !important;
  min-height:78px !important;
  border:3px solid var(--gold) !important;
  border-radius:14px !important;
  padding:10px 16px !important;
  gap:14px !important;
}
.page-note .note-icon,
.page-note-icon{
  font-size:28px !important;
  flex:0 0 auto;
}
#pageNoteTitle,
.page-note-title{
  font-size:19px !important;
  line-height:1.15 !important;
  font-weight:900 !important;
  color:#073e8a !important;
}
#pageNoteText,
.page-note-body{
  font-size:16.5px !important;
  line-height:1.35 !important;
  font-weight:800 !important;
  color:#17347d !important;
  white-space:normal !important;
}
@media(max-width:760px){
  .page-note{
    min-height:92px !important;
    padding:10px 12px !important;
  }
  #pageNoteTitle,
  .page-note-title{
    font-size:17px !important;
  }
  #pageNoteText,
  .page-note-body{
    font-size:14px !important;
    line-height:1.4 !important;
  }
}

/* Final note wording: one large line only */
#pageNoteTitle,
.page-note-title{
  font-size:22px !important;
  line-height:1.2 !important;
  font-weight:900 !important;
}
#pageNoteText,
.page-note-body{
  display:none !important;
}
.page-note{
  min-height:72px !important;
  justify-content:center !important;
}

/* FINAL SPEC TABLE */
.meta{
  width:100% !important;
  font-size:13px !important;
  line-height:1.25 !important;
  font-weight:700 !important;
  color:#17347d !important;
  flex:0 0 auto !important;
}
.meta .row{
  display:grid !important;
  grid-template-columns:38% 62% !important;
  align-items:center !important;
  min-height:24px !important;
  padding:3px 8px !important;
  column-gap:8px !important;
  box-sizing:border-box !important;
}
.meta .row:nth-child(odd){
  background:#eaf6ff !important;
  border-radius:7px !important;
}
.meta .label{
  display:block !important;
  direction:rtl !important;
  text-align:right !important;
  font-size:12.8px !important;
  line-height:1.2 !important;
  font-weight:800 !important;
  color:#37557d !important;
  white-space:normal !important;
  padding:0 !important;
  margin:0 !important;
}
.meta .val{
  display:block !important;
  text-align:left !important;
  font-size:13px !important;
  line-height:1.2 !important;
  font-weight:900 !important;
  color:#101b74 !important;
  white-space:normal !important;
  overflow:visible !important;
  text-overflow:clip !important;
  word-break:normal !important;
  unicode-bidi:plaintext !important;
  padding:0 !important;
  margin:0 !important;
}

/* FINAL CUSTOM NOTE */
.page-note{
  min-height:76px !important;
  justify-content:center !important;
  padding:10px 18px !important;
  border:3px solid var(--gold) !important;
}
#pageNoteTitle,
.page-note-title{
  font-size:22px !important;
  line-height:1.2 !important;
  font-weight:900 !important;
  color:#073e8a !important;
  text-align:center !important;
}
#pageNoteText,
.page-note-body{
  display:none !important;
}

@media(max-width:760px){
  .meta{
    font-size:12px !important;
    line-height:1.28 !important;
  }
  .meta .row{
    grid-template-columns:40% 60% !important;
    min-height:25px !important;
    padding:3px 6px !important;
    column-gap:6px !important;
  }
  .meta .label{
    font-size:11.8px !important;
  }
  .meta .val{
    font-size:12px !important;
  }
  #pageNoteTitle,
  .page-note-title{
    font-size:18px !important;
  }
}

/* Unused product slots stay completely blank until Excel contains a product */
.card.empty-card{
  background:#fff !important;
}
.card.empty-card::before,
.card.empty-card::after{
  content:none !important;
}
.card.empty-card .placeholder{
  display:none !important;
}

/* FINAL SPEC TABLE FIX — no clipped rows, larger text, strict alignment */
.card{
  overflow:hidden !important;
}

.card-title{
  font-size:14.2px !important;
  line-height:1.1 !important;
  min-height:27px !important;
  max-height:31px !important;
  padding:4px 6px !important;
}

.imgbox{
  flex:1 1 82px !important;
  min-height:82px !important;
  margin:3px 3px 4px !important;
  padding:1px !important;
}

.meta{
  flex:0 0 auto !important;
  width:100% !important;
  font-size:14px !important;
  line-height:1.08 !important;
  font-weight:800 !important;
}

.meta .row{
  display:grid !important;
  grid-template-columns:36% 64% !important;
  align-items:center !important;
  min-height:20px !important;
  height:auto !important;
  padding:2px 7px !important;
  column-gap:7px !important;
  box-sizing:border-box !important;
}

.meta .row:nth-child(odd){
  background:#eaf6ff !important;
  border-radius:6px !important;
}

.meta .label{
  display:block !important;
  direction:rtl !important;
  text-align:right !important;
  font-size:13.4px !important;
  line-height:1.08 !important;
  font-weight:800 !important;
  color:#37557d !important;
  white-space:normal !important;
  overflow:visible !important;
}

.meta .val{
  display:block !important;
  text-align:left !important;
  font-size:14px !important;
  line-height:1.08 !important;
  font-weight:900 !important;
  color:#101b74 !important;
  white-space:normal !important;
  overflow:visible !important;
  text-overflow:clip !important;
  word-break:normal !important;
  unicode-bidi:plaintext !important;
}

.gold{
  height:2px !important;
  margin:2px 3px 0 !important;
}

/* Mobile */
@media(max-width:760px){
  .card{
    overflow:visible !important;
  }
  .card-title{
    font-size:11.5px !important;
    min-height:32px !important;
    max-height:none !important;
    line-height:1.15 !important;
  }
  .imgbox{
    flex:none !important;
    height:145px !important;
    min-height:145px !important;
  }
  .meta{
    font-size:12.8px !important;
    line-height:1.14 !important;
  }
  .meta .row{
    grid-template-columns:38% 62% !important;
    min-height:22px !important;
    padding:3px 5px !important;
    column-gap:5px !important;
  }
  .meta .label{
    font-size:12.2px !important;
    line-height:1.12 !important;
  }
  .meta .val{
    font-size:12.8px !important;
    line-height:1.12 !important;
  }
}

/* FINAL: specification labels equal in size/weight to specification values */
.meta .label{
  font-size:14px !important;
  line-height:1.08 !important;
  font-weight:900 !important;
  color:#101b74 !important;
}

@media(max-width:760px){
  .meta .label{
    font-size:12.8px !important;
    line-height:1.12 !important;
    font-weight:900 !important;
    color:#101b74 !important;
  }
}

/* FINAL READABILITY: make specification labels slightly larger than the values */
.meta .label{
  font-size:15.2px !important;
  line-height:1.12 !important;
  font-weight:900 !important;
  color:#101b74 !important;
}

@media(max-width:760px){
  .meta .label{
    font-size:13.7px !important;
    line-height:1.16 !important;
    font-weight:900 !important;
    color:#101b74 !important;
  }
}
