/* A shop's own design (see js/theme.js). The theme sets the site's colour
   variables on a scope element (.themed) and adds classes:
   lay-* (item layout), shape-* (picture shape), hv-* (hover), cs-* (card style),
   logo-* and hero-*. */

.themed { color: var(--ink); font-family: var(--font-body); position: relative; }
.themed h1, .themed h2, .themed .t-head { font-family: var(--font-head); }
.themed .btn { border-radius: var(--btn-radius, 999px); }
.themed .input, .themed .kids a, .themed .kids button { border-radius: min(var(--btn-radius, 999px), 14px); }
.themed .kids a, .themed .kids button { border-radius: var(--btn-radius, 999px); }

/* card styles */
.themed.cs-outline .card { box-shadow: none; border: 1.5px solid var(--line-strong); }
.themed.cs-flat .card { box-shadow: none; border-color: transparent; }
.themed.cs-glass .card {
  background: color-mix(in srgb, var(--card) 62%, transparent); border-color: color-mix(in srgb, var(--ink) 12%, transparent);
  backdrop-filter: blur(14px) saturate(1.4); -webkit-backdrop-filter: blur(14px) saturate(1.4);
}

/* ---- the background layer ---- */
.tbg { inset: 0; overflow: hidden; pointer-events: none; background: var(--b); background-size: cover; background-position: center; }
.tbg.fixed { position: fixed; z-index: -1; }
.tbg.contained { position: absolute; z-index: 0; border-radius: inherit; }
.tbg.bg-gradient { background: linear-gradient(160deg, color-mix(in srgb, var(--b) 82%, var(--p)) 0%, var(--b) 45%, color-mix(in srgb, var(--b) 80%, var(--a)) 100%); }
.tbg .ov { position: absolute; inset: 0; background: var(--b); }

/* patterns */
.tbg.pat-dots { background-image: radial-gradient(var(--pc) 2.5px, transparent 3px); background-size: 22px 22px; }
.tbg.pat-stripes { background-image: repeating-linear-gradient(45deg, var(--pc) 0 12px, transparent 12px 28px); }
.tbg.pat-grid { background-image: linear-gradient(var(--pc) 1.5px, transparent 1.5px), linear-gradient(90deg, var(--pc) 1.5px, transparent 1.5px); background-size: 28px 28px; }
.tbg.pat-checks { background-image: conic-gradient(var(--pc) 25%, transparent 0 50%, var(--pc) 0 75%, transparent 0); background-size: 44px 44px; }
.tbg.pat-zigzag {
  background-image: linear-gradient(135deg, var(--pc) 25%, transparent 25%), linear-gradient(225deg, var(--pc) 25%, transparent 25%);
  background-size: 36px 36px; background-position: 0 0, 18px 0;
}
.tbg.pat-waves { background-image: radial-gradient(circle at 50% 100%, transparent 14px, var(--pc) 15px 17px, transparent 18px); background-size: 40px 22px; }
.tbg.pat-triangles { background-image: linear-gradient(60deg, var(--pc) 25%, transparent 25.5%, transparent 75%, var(--pc) 75%), linear-gradient(120deg, var(--ac) 25%, transparent 25.5%, transparent 75%, var(--ac) 75%); background-size: 40px 70px; }
.tbg.pat-confetti {
  background-image:
    radial-gradient(circle, var(--p) 2.5px, transparent 3px), radial-gradient(circle, var(--a) 2.5px, transparent 3px),
    linear-gradient(45deg, transparent 46%, var(--ac) 46% 54%, transparent 54%);
  background-size: 70px 70px, 90px 90px, 50px 50px; background-position: 0 0, 35px 45px, 10px 20px;
  opacity: 1;
}
.tbg.pat-confetti, .tbg.pat-dots, .tbg.pat-grid, .tbg.pat-stripes, .tbg.pat-checks, .tbg.pat-zigzag, .tbg.pat-waves, .tbg.pat-triangles { background-color: var(--b); }

/* moving backgrounds — only transform / opacity move, so phones stay smooth */
.tbg.anim-flow {
  background: linear-gradient(120deg, var(--b), color-mix(in srgb, var(--b) 65%, var(--p)), var(--b), color-mix(in srgb, var(--b) 65%, var(--a)), var(--b));
  background-size: 400% 400%; animation: flow 22s ease-in-out infinite;
}
@keyframes flow { 0% { background-position: 0% 50%; } 50% { background-position: 100% 50%; } 100% { background-position: 0% 50%; } }
.tbg .bub { position: absolute; top: 110%; border-radius: 50%; opacity: .22; animation: rise-up linear infinite; filter: blur(.5px); }
.tbg .emo { position: absolute; top: 110%; opacity: .55; animation: rise-up linear infinite; }
@keyframes rise-up {
  0% { top: 110%; transform: translateX(0) rotate(0deg); }
  50% { transform: translateX(26px) rotate(12deg); }
  100% { top: -12%; transform: translateX(-14px) rotate(-8deg); }
}
.tbg .spk { position: absolute; width: 5px; height: 5px; border-radius: 50%; animation: twinkle ease-in-out infinite; box-shadow: 0 0 8px currentColor; }
@keyframes twinkle { 0%, 100% { opacity: 0; transform: scale(.4); } 50% { opacity: .9; transform: scale(1.2); } }
.tbg .blob { position: absolute; border-radius: 50%; filter: blur(70px); opacity: .32; animation: drift2 20s ease-in-out infinite alternate; }
@keyframes drift2 { 0% { transform: translate(0, 0) scale(1); } 50% { transform: translate(8vw, 6vh) scale(1.15); } 100% { transform: translate(-6vw, 10vh) scale(.9); } }
.tbg .wave {
  position: absolute; left: -128px; right: -128px; bottom: 0; height: 34%; animation: slide 18s linear infinite;
  background: var(--wc); -webkit-mask: radial-gradient(64px 38px at 50% 0, transparent 98%, #000 100%) 0 0 / 128px 100% repeat-x; mask: radial-gradient(64px 38px at 50% 0, transparent 98%, #000 100%) 0 0 / 128px 100% repeat-x; }
.tbg .wave.w2 { height: 26%; animation-duration: 12s; animation-direction: reverse; }
.tbg .wave.w3 { height: 18%; animation-duration: 26s; }
@keyframes slide { from { transform: translateX(0); } to { transform: translateX(128px); } }

@media (prefers-reduced-motion: reduce) {
  .tbg .bub, .tbg .emo, .tbg .spk { display: none; }
}
/* "עצירת אנימציה" (a11y.css stops every animation): the floating bits would freeze
   in odd places, so they go away; flow / aurora / waves simply stand still. */
html.a11y-still .tbg .bub, html.a11y-still .tbg .emo, html.a11y-still .tbg .spk { display: none; }

/* ---- shop header with banner ---- */
.shop-hero { position: relative; overflow: hidden; margin-top: 10px; padding: 0; }
.shop-hero .banner { height: clamp(140px, 24vw, 260px); background: var(--grad-sea); background-size: cover; background-position: center; }
.shop-hero .hbody { display: flex; gap: 18px; padding: 0 22px 22px; align-items: flex-start; }
.shop-hero .slogo {
  width: 112px; height: 112px; border-radius: 26px; font-size: 48px; margin-top: -48px; border: 4px solid var(--card);
  box-shadow: var(--shadow-lg); background: var(--accent-soft);
}
.shop-hero .htext { flex: 1; min-width: 0; padding-top: 14px; }
.shop-hero h1 { margin: 0 0 4px; font-size: clamp(26px, 4.6vw, 42px); }
.shop-hero p.d { margin: 0 0 10px; white-space: pre-line; max-width: 720px; }
.shop-hero .facts { font-size: 14px; color: var(--muted); display: flex; gap: 14px; flex-wrap: wrap; align-items: center; }
.shop-hero .row2 { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; margin-top: 12px; }
.shop-search { display: flex; gap: 8px; margin-top: 14px; max-width: 480px; }
.themed.hero-center .shop-hero .hbody { flex-direction: column; align-items: center; text-align: center; }
.themed.hero-center .shop-hero .htext { padding-top: 0; }
.themed.hero-center .shop-hero .facts, .themed.hero-center .shop-hero .row2, .themed.hero-center .socials { justify-content: center; }
.themed.hero-center .shop-search { margin-inline: auto; }
.themed.hero-center .shop-hero p.d { margin-inline: auto; }
.logo-circle .slogo, .slogo.logo-circle { border-radius: 50% !important; }
.logo-square .slogo, .slogo.logo-square { border-radius: 6px !important; }

.socials { display: flex; gap: 8px; flex-wrap: wrap; }
.socials a {
  width: 40px; height: 40px; border-radius: 50%; display: grid; place-items: center; text-decoration: none; color: #fff; font-weight: 800;
  font-size: 16px; transition: transform .2s var(--bounce); box-shadow: 0 3px 10px rgba(0, 0, 0, .15);
}
.socials a:hover { transform: translateY(-3px) scale(1.08); }
.socials svg { width: 20px; height: 20px; }
.socials .ig { background: radial-gradient(circle at 30% 107%, #fdf497 0%, #fd5949 45%, #d6249f 60%, #285aeb 90%); }
.socials .fb { background: #1877f2; }
.socials .tt { background: #111; }
.socials .wa2 { background: #25d366; }
.socials .web { background: var(--grad-primary); }

@media (max-width: 640px) {
  .shop-hero .hbody { flex-direction: column; align-items: center; text-align: center; padding: 0 14px 16px; gap: 6px; }
  .shop-hero .slogo { width: 92px; height: 92px; font-size: 40px; margin-top: -46px; }
  .shop-hero .htext { padding-top: 0; }
  .shop-hero .facts, .shop-hero .row2, .shop-hero .socials { justify-content: center; }
  .shop-search { margin-inline: auto; }
}

/* ---- item layouts (the grid gets the scope's lay-* class) ---- */
.themed .igrid { grid-template-columns: repeat(auto-fill, minmax(var(--card-min, 210px), 1fr)); }
@media (max-width: 760px) {
  .themed .igrid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .themed.lay-grid .igrid { grid-template-columns: repeat(auto-fill, minmax(min(var(--card-min, 210px), 45%), 1fr)); }
}

/* picture shapes */
.themed.shape-rounded .icard .ph { margin: 8px 8px 0; border-radius: calc(var(--radius) - 6px); }
.themed.shape-circle .icard .ph { margin: 12px 12px 0; border-radius: 50%; aspect-ratio: 1; }
.themed.shape-arch .icard .ph { margin: 10px 10px 0; border-radius: 999px 999px 14px 14px; }
.themed.shape-circle .icard .body, .themed.shape-arch .icard .body { text-align: center; align-items: center; }

/* masonry: pictures keep their own height */
.themed.lay-masonry .igrid { display: block; columns: var(--card-min, 210px) auto; column-gap: 16px; }
.themed.lay-masonry .icard { break-inside: avoid; margin-bottom: 16px; display: flex; }
.themed.lay-masonry .icard .ph { aspect-ratio: auto; }
.themed.lay-masonry .icard .ph img.a { position: static; height: auto; }
.themed.lay-masonry .icard .ph .none { position: static; height: 180px; }
@media (max-width: 760px) { .themed.lay-masonry .igrid { columns: 2; column-gap: 10px; } .themed.lay-masonry .icard { margin-bottom: 10px; } }

/* magazine: the first item big */
.themed.lay-magazine .igrid > .icard:first-child { grid-column: span 2; grid-row: span 2; }
.themed.lay-magazine .igrid > .icard:first-child .t { font-size: 22px; font-family: var(--font-head); }
.themed.lay-magazine .igrid > .icard:first-child .p { font-size: 24px; }
.themed.lay-magazine .igrid > .icard:first-child .ph { aspect-ratio: auto; flex: 1; min-height: 240px; }

/* polaroid: a white frame, slightly tilted, the caption in the heading font */
.themed.lay-polaroid .icard { background: #fffdf8; color: #222; border: 0; border-radius: 4px; padding: 10px 10px 0; box-shadow: 0 6px 18px rgba(0, 0, 0, .16); transform: rotate(var(--rot, -1.4deg)); }
.themed.lay-polaroid .icard:nth-child(even) { --rot: 1.2deg; }
.themed.lay-polaroid .icard:nth-child(3n) { --rot: -.6deg; }
.themed.lay-polaroid .icard:hover { transform: rotate(0) translateY(-4px) scale(1.02); }
.themed.lay-polaroid .icard .ph { margin: 0; border-radius: 2px; }
.themed.lay-polaroid .icard .body { text-align: center; align-items: center; padding: 10px 6px 14px; }
.themed.lay-polaroid .icard .t { font-family: var(--font-head); font-size: 17px; }
.themed.lay-polaroid .icard .s { color: #777; }
.themed.lay-polaroid .icard .p { color: #222; }

/* list: a picture and the details beside it */
.themed.lay-list .igrid { grid-template-columns: 1fr !important; gap: 12px; }
.themed.lay-list .icard .cover { flex-direction: row; }
.themed.lay-list .icard .ph { width: clamp(110px, 22vw, 180px); flex: 0 0 auto; margin: 8px; }
.themed.lay-list .icard .body { justify-content: center; padding: 14px 8px 14px 50px; }
.themed.lay-list .icard .t { font-size: 18px; -webkit-line-clamp: 3; }
.themed.lay-list .icard .p { margin-top: 6px; }

/* carousel: one row that scrolls sideways */
.themed.lay-carousel .igrid {
  display: flex; overflow-x: auto; scroll-snap-type: x mandatory; padding: 6px 4px 18px; gap: 16px; scrollbar-width: thin;
}
.themed.lay-carousel .igrid > .icard { flex: 0 0 calc(var(--card-min, 210px) * 1.15); scroll-snap-align: start; }
@media (max-width: 760px) { .themed.lay-carousel .igrid > .icard { flex-basis: 72%; } }
.themed.lay-carousel .igrid > .empty-state { flex: 1 0 100%; }

/* hover effects (the site default zooms the picture and shows the second one) */
.themed.hv-none .icard:hover, .themed.hv-swap .icard:hover, .themed.hv-zoom .icard:hover { transform: none; box-shadow: var(--shadow); }
.themed.hv-none .icard:hover .ph img.a, .themed.hv-swap .icard:hover .ph img.a,
.themed.hv-lift .icard:hover .ph img.a, .themed.hv-tilt .icard:hover .ph img.a { transform: none; }
.themed:not(.hv-swap):not(.hv-zoom) .icard.has2:hover .ph img.b { opacity: 0; }
.themed.hv-zoom .icard.has2:hover .ph img.b { opacity: 0; }
.themed.hv-zoom .icard:hover .ph img.a { transform: scale(1.1); }
.themed.hv-lift .icard:hover { transform: translateY(-8px); box-shadow: var(--shadow-lg); }
.themed.hv-tilt .icard:hover { transform: rotate(-1.5deg) scale(1.03); box-shadow: var(--shadow-lg); }
.themed.lay-polaroid.hv-tilt .icard:hover { transform: rotate(2deg) scale(1.04); }

/* On a shop's own background the site's bar is solid, so it never turns murky over dark colours. */
body.shop-themed .site-head, body.shop-themed .bnav { background: var(--card); }
