/* ==========================================================================
   "מארזים שהכנו" (19.11.2026) – inc/works.php
   The gallery, one item, and the rows on the home page and the gift page. Wood design palette:
   page #FBF6EE · cards #FFF + border #DCC2A0 · text #2B1A10 / #4A3324 / #6B5040 · accent #B8501A · buttons #A1181E
   ========================================================================== */

/* ---------- Gallery head ---------- */
.pg-wk-list { padding-top: clamp(28px, 5vw, 48px); }
.pg-wk-title { margin: 0 0 12px; color: #A1181E; font-family: var(--pg-font-d); font-size: clamp(2.2rem, 6vw, 3.4rem); font-weight: 900; line-height: 1.1; }
.pg-wk-lead { max-width: 62ch; margin: 0 0 22px; color: #4A3324; font-size: clamp(1.05rem, 2.2vw, 1.25rem); line-height: 1.6; }

/* Type buttons */
.pg-wk-filter { margin: 0 0 26px; }
.pg-wk-filter ul { display: flex; flex-wrap: wrap; gap: 8px; margin: 0; padding: 0; list-style: none; }
.pg-wk-chip { display: inline-flex; align-items: center; min-height: 44px; padding: 8px 18px; border: 1.5px solid #D9C6AC; border-radius: 999px; background: #fff; color: #4A3324; font-size: .95rem; font-weight: 700; line-height: 1.2; text-decoration: none; transition: border-color .2s, color .2s, background-color .2s; }
.pg-wk-chip:hover { border-color: #A1181E; color: #A1181E; }
.pg-wk-chip[aria-current="page"] { border-color: #A1181E; background: #A1181E; color: #fff; }
.pg-wk-chip:focus-visible { outline: 3px solid #A1181E; outline-offset: 2px; }

/* ---------- Cards ---------- */
.pg-wk-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 20px; margin: 0; padding: 0; list-style: none; }
.pg-wk-grid--3,
.pg-wk-grid--row { grid-template-columns: repeat(3, minmax(0, 1fr)); }
@media (max-width: 1100px) { .pg-wk-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (max-width: 700px) { .pg-wk-grid, .pg-wk-grid--3 { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; } }

.pg-wk-card { position: relative; display: flex; flex-direction: column; min-width: 0; overflow: hidden; border: 1px solid #DCC2A0; border-radius: 18px; background: #fff; transition: transform .25s var(--pg-ease), box-shadow .25s; }
.pg-wk-card:hover { transform: translateY(-3px); box-shadow: 0 10px 24px rgba(91, 52, 20, .14); }
.pg-wk-card:focus-within { outline: 3px solid #A1181E; outline-offset: 3px; }
.pg-wk-card__media { aspect-ratio: 1; overflow: hidden; background: #F3E6D3; }
.pg-wk-card__img { display: block; width: 100%; height: 100%; object-fit: cover; }
.pg-wk-card__body { display: grid; gap: 4px; padding: 14px 16px 16px; }
.pg-wk-card__title { margin: 0; color: #2B1A10; font-family: var(--pg-font-d); font-size: 1.15rem; line-height: 1.3; }
.pg-wk-card__link { color: inherit; text-decoration: none; }
.pg-wk-card__link:hover { color: #A1181E; }
.pg-wk-card__link:focus { outline: none; } /* the whole card gets the focus ring (:focus-within) */
.pg-wk-card__link::after { content: ""; position: absolute; inset: 0; z-index: 1; } /* the whole card is the link */
.pg-wk-card__type { margin: 0; color: #B8501A; font-size: .9rem; font-weight: 700; }
.pg-wk-card__text { margin: 0; overflow: hidden; color: #4A3324; font-size: .95rem; line-height: 1.5; white-space: nowrap; text-overflow: ellipsis; }
@media (max-width: 700px) {
  .pg-wk-card { border-radius: 14px; }
  .pg-wk-card__body { padding: 10px 12px 12px; }
  .pg-wk-card__title { font-size: 1.02rem; }
  .pg-wk-card__type { font-size: .85rem; }
  .pg-wk-card__text { font-size: .9rem; }
}
@media (prefers-reduced-motion: reduce) { .pg-wk-card, .pg-wk-card:hover { transform: none; transition: none; } }

/* Row of 3 (home page, more of the same type): one row; on phones a row you swipe */
@media (max-width: 700px) {
  .pg-wk-grid--row { display: flex; gap: 12px; margin-inline: calc(var(--pg-gutter, 16px) * -1); padding: 4px var(--pg-gutter, 16px) 10px; overflow-x: auto; overscroll-behavior-x: contain; scroll-snap-type: x mandatory; scroll-padding-inline: var(--pg-gutter, 16px); scrollbar-width: none; }
  .pg-wk-grid--row::-webkit-scrollbar { display: none; } /* the next card peeking in shows it scrolls */
  .pg-wk-grid--row > li { flex: 0 0 72%; scroll-snap-align: start; }
}

/* ---------- "טען עוד מארזים" + page numbers (without JavaScript) ---------- */
.pg-wk-more { display: flex; justify-content: center; margin: 28px 0 4px; }
.pg-wk-more__btn { min-width: 220px; }
.pg-wk-more__btn.is-busy { opacity: .6; pointer-events: none; }
.pg-wk-js .pg-wk-pages { display: none; }
.pg-wk-pages ul { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; margin: 18px 0 0; padding: 0; list-style: none; }
.pg-wk-pages .page-numbers { display: inline-flex; align-items: center; justify-content: center; min-width: 44px; min-height: 44px; padding: 0 14px; border: 1px solid #DCC2A0; border-radius: 999px; background: #fff; color: #2B1A10; font-weight: 700; text-decoration: none; }
.pg-wk-pages .page-numbers.current { border-color: #A1181E; background: #A1181E; color: #fff; }
.pg-wk-pages .page-numbers.dots { border: 0; background: transparent; }

.pg-wk-empty { margin: 4px 0 0; color: #4A3324; font-size: 1.1rem; }
.pg-wk-empty a { color: #A1181E; font-weight: 700; }

/* ---------- One item ---------- */
.pg-wk-item { padding-top: clamp(16px, 3vw, 28px); }
.pg-wk-item__in { max-width: 980px; }
.pg-wk-crumbs ol { display: flex; flex-wrap: wrap; align-items: center; gap: 0 8px; margin: 0 0 4px; padding: 0; list-style: none; color: #6B5040; font-size: .95rem; }
.pg-wk-crumbs li + li::before { content: "›"; margin-inline-end: 8px; }
.pg-wk-crumbs a { display: inline-flex; align-items: center; min-height: 44px; color: #A1181E; font-weight: 700; text-decoration: none; }
.pg-wk-crumbs a:hover { text-decoration: underline; }
.pg-wk-item__title { margin: 0 0 20px; color: #2B1A10; font-family: var(--pg-font-d); font-size: clamp(2rem, 5vw, 3rem); line-height: 1.15; }
.pg-wk-item__main { margin: 0; }
.pg-wk-item__main img { display: block; width: 100%; height: auto; max-height: 85vh; border-radius: 20px; background: #fff; object-fit: contain; }
.pg-wk-item__more { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; margin: 16px 0 0; padding: 0; list-style: none; }
.pg-wk-item__more img { display: block; width: 100%; height: auto; border-radius: 16px; background: #fff; }
@media (max-width: 700px) {
  .pg-wk-item__main img { border-radius: 16px; }
  .pg-wk-item__more { grid-template-columns: 1fr; gap: 12px; margin-top: 12px; }
}
.pg-wk-item__text { max-width: 65ch; margin: 24px 0 0; color: #2B1A10; font-size: 1.15rem; line-height: 1.75; }
.pg-wk-item__text p { margin: 0 0 12px; }
.pg-wk-item__text a { color: #A1181E; }

/* "רוצים מארז כזה?" – same box as the gift strips (.pg-wgift in site.css) */
.pg-wk-cta { margin-top: clamp(28px, 5vw, 44px); }
.pg-wk-cta .pg-wgift__body { gap: 14px; }
.pg-wk-cta .pg-btn .pg-i { flex: none; }
.pg-wk-cta__more { display: inline-flex; align-items: center; gap: 6px; justify-self: start; min-height: 44px; color: #F6D9B8; font-weight: 700; text-decoration: underline; text-underline-offset: 3px; }
.pg-wk-cta__more:hover { color: #fff; }
@media (max-width: 520px) { .pg-wk-cta .pg-wgift__cta .pg-btn { flex: 1 1 100%; } }

/* ---------- On other pages ---------- */
.pg-wk-home { display: grid; gap: 8px; margin-top: clamp(20px, 3vw, 28px); }
.pg-wk-home__more { justify-self: start; }
.pg-wk-home__more, .pg-wk-sec .pg-wsec__more { gap: 6px; }
.pg-wk-sec .pg-wsec__head { margin-bottom: 20px; }
