/* Ảnh mẫu: gallery, filters, photo page, menu panel counts (gallery/DECISIONS.md 2026-11-14; mockup approved that day).
   Sizes in px, nothing below 14px, body text 18-20px (readers 40+). */

/* menu panel: counts beside each value (loaded on every page, the panel sits in the main menu) */
.menu-panel.photos-panel li a { display: flex; justify-content: space-between; gap: 12px; }
.menu-panel.photos-panel li a .n { color: var(--text-2); font-size: 15px; font-weight: 400; font-variant-numeric: tabular-nums; }
@media (min-width: 900px) { .menu-panel.photos-panel .panel-cols { gap: 18px 48px; } }

/* ---------- gallery ---------- */
.zone-photos .wrap-wide { width: min(100% - 2 * var(--gutter), 1440px); }
.photos-intro { padding-block: clamp(24px, 4vw, 48px) 8px; }
.photos-intro h1 { margin: 0 0 6px; }
.photos-sub { margin: 0 0 20px; color: var(--text-2); font-size: clamp(18px, 17px + .3vw, 20px); max-width: 60ch; }

.filters { display: flex; flex-wrap: wrap; gap: 12px; align-items: flex-start; margin-bottom: 10px; position: relative; }
.fgroup { position: relative; }
.fgroup > summary { list-style: none; }
.fgroup > summary::-webkit-details-marker { display: none; }
.fbtn { display: inline-flex; align-items: center; gap: 8px; font-size: 17px; font-weight: 600; padding: 10px 16px; min-height: 44px; border: 1px solid #A9B3C1; border-radius: 8px; background: var(--bg); color: var(--text); cursor: pointer; user-select: none; }
.fbtn:hover { border-color: var(--text); }
.fbtn:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.fgroup[open] > .fbtn { border-color: var(--text); box-shadow: inset 0 0 0 1px var(--text); }
.fgroup[open] > .fbtn .menu-caret svg { transform: rotate(180deg); }
.fsel { display: inline-flex; align-items: center; justify-content: center; min-width: 22px; height: 22px; padding: 0 6px; border-radius: 11px; background: var(--text); color: #fff; font-size: 14px; }
.fpanel { position: absolute; z-index: 30; top: calc(100% + 6px); left: 0; width: 320px; max-height: min(420px, 70vh); overflow: auto; background: var(--bg); border: 1px solid var(--line); border-radius: 8px; box-shadow: 0 10px 30px rgba(11,26,51,.12); padding: 8px 14px; }
.fpanel-head { display: none; }
.fopts { list-style: none; margin: 0; padding: 0; }
.fopt { display: flex; align-items: center; gap: 10px; padding: 8px 8px; margin: 0 -8px; border-radius: 6px; min-height: 44px; color: var(--text); text-decoration: none; font-size: 17px; }
.fopt:hover .fname { text-decoration: underline; text-decoration-color: var(--accent-2); text-underline-offset: 4px; }
.fopt:focus-visible { outline: 2px solid var(--accent); outline-offset: -2px; }
.fopt[aria-checked="true"] { background: var(--bg-2); }   /* owner 2026-11-18: "remove checkbox from 3 categories"; chosen = semibold + quiet background */
.fopt[aria-checked="true"] .fname { font-weight: 600; }
.fopt .fname { flex: 1; }
.fopt .c { color: var(--text-2); font-size: 15px; font-variant-numeric: tabular-nums; }
.fpanel-foot { display: none; }

.applied { list-style: none; display: flex; flex-wrap: wrap; gap: 8px; margin: 10px 0 6px; padding: 0; }
.chip { display: inline-flex; align-items: center; gap: 6px; min-height: 36px; padding: 4px 14px; border: 1px solid #A9B3C1; border-radius: 18px; background: var(--bg-2); color: var(--text); text-decoration: none; font-size: 16px; }
.chip:hover { border-color: var(--text); text-decoration: none; }
.chip span { font-size: 18px; line-height: 1; }
.chip-clear { background: transparent; border-color: transparent; text-decoration: underline; text-underline-offset: 4px; }
.photos-count { color: var(--text-2); font-size: 16px; margin: 8px 0 14px; }
.photos-none { padding: 40px 0 80px; font-size: 18px; }

/* justified rows, copied from the prints gallery (prints.css "gallery layout B"), denser as in the mockup */
.zone-photos .masonry { --row-h: 240px; --gap: 8px; display: flex; flex-wrap: wrap; gap: var(--gap); margin-bottom: clamp(40px, 6vw, 88px); }
.zone-photos .masonry::after { content: ""; flex-grow: 999999; }
.zone-photos .masonry.fill-last::after { flex-grow: 0; }
@media (min-width: 1100px) { .zone-photos .masonry { --row-h: 280px; } }
.zone-photos .tile { flex: var(--r) 1 calc(var(--r) * var(--row-h)); min-width: 0; margin: 0; }
@media (max-width: 599px) { .zone-photos .tile { flex: 1 1 100%; } }
.zone-photos .tile-link { display: block; }
.zone-photos .tile-img { display: block; width: 100%; aspect-ratio: var(--r); background: var(--bg-3); overflow: hidden; border-radius: 2px; }
.zone-photos .tile-img img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform .6s ease; }
@media (hover: hover) { .zone-photos .tile-link:hover .tile-img img { transform: scale(1.015); } }
.zone-photos .tile-link:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; }

/* phones: the open filter becomes a tray over the grid with a live count and one Apply button (NN/g, mobile faceted search) */
@media (max-width: 899px) {
  .fgroup { position: static; }
  .fpanel { position: fixed; left: 0; right: 0; bottom: 0; top: auto; width: auto; max-height: 75vh; border-radius: 14px 14px 0 0; padding: 0 16px; box-shadow: 0 -10px 40px rgba(11,26,51,.25); display: flex; flex-direction: column; }
  .fpanel-head { display: block; position: sticky; top: 0; background: var(--bg); margin: 0; padding: 16px 0 8px; font-size: 18px; font-weight: 700; border-bottom: 1px solid var(--line); }
  .fopts { overflow: auto; flex: 1; margin: 0 -8px; padding: 0 8px; }   /* room for the row background inside the scroll box */
  .filters.is-js .fpanel-foot { display: block; position: sticky; bottom: 0; background: var(--bg); padding: 12px 0 calc(12px + env(safe-area-inset-bottom)); border-top: 1px solid var(--line); }
  .fapply { display: block; width: 100%; text-align: center; background: var(--button); color: #fff; border-radius: 8px; font-size: 17px; padding: 14px; }
  .fgroup[open]::before { content: ""; position: fixed; inset: 0; background: rgba(11,26,51,.35); z-index: 29; }
}

/* ---------- photo page ---------- */
.photo-back { margin: 18px 0 10px; font-size: 17px; }
.photo-back a { color: var(--text); }
.photo-hero { margin: 0 auto 8px; }
.photo-also { margin-top: 20px; }   /* other versions of the same shot, under the main one (owner 2026-11-15) */
.photo-body { max-width: 980px; margin-inline: auto; }
.photo-title { font-size: clamp(1.5rem, 1.2rem + 1.4vw, 2.2rem); line-height: 1.25; margin: 18px 0 8px; }

/* facts box: the mockup's CSS (Tovrez highlighted panel adapted: gold tint, gold left bar), decision 4 */
.info { background: #FFFFFF; border-radius: 10px; overflow: hidden; box-shadow: inset 0 0 0 1px #CFCCC6; margin: 14px 0 26px; }
.info.hl { background: rgba(201,162,75,.08); box-shadow: inset 3px 0 0 #C9A24B, inset 0 0 0 1px rgba(201,162,75,.45); }
.info .head { background: #F1F0ED; padding: 8px 18px; }
.info.hl .head { background: rgba(201,162,75,.14); }
.info .head h2, .info h3, body:not(.zone-prints) .info :is(h2, h3) { font-size: 14px; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; color: var(--text-2); margin: 0; font-family: var(--font); letter-spacing: .08em; font-weight: 600; }
.info .body { display: grid; grid-template-columns: repeat(3, auto); justify-content: space-between; gap: 14px 24px; padding: 14px 18px 16px; }
@media (max-width: 640px) { .info .body { grid-template-columns: 1fr; } }
body .info .info-group h3 { margin: 0 0 8px; }
.info dl { display: grid; grid-template-columns: auto 1fr; gap: 5px 12px; margin: 0; font-size: 16px; line-height: 1.5; }   /* owner 2026-11-14: 16px, smaller than the note text */
.info dt { color: var(--text-2); }
.info dd { margin: 0; font-variant-numeric: tabular-nums; overflow-wrap: anywhere; min-width: 0; max-width: 26ch; }   /* long values (filters, equipment) wrap */
@media (max-width: 640px) { .info dd { max-width: none; } }
.info dd a { color: var(--text); }

.photo-note { font-size: clamp(18px, 17px + .35vw, 20px); line-height: 1.7; }
.photo-pn { display: flex; justify-content: space-between; gap: 16px; margin: 32px 0 56px; padding-top: 16px; border-top: 1px solid var(--line); font-size: 17px; }
.photo-pn a { color: var(--text); font-weight: 600; }
