/* Public site: page CSS on top of the kit (system.css). Colours come from src/app.css (--p-*); only the
   derived inverse-action tokens and the font are set here. */
:root {
  --p-inv-accent: var(--p-inv-ink);
  --p-inv-accent-ink: var(--p-inv-bg);
  --p-inv-action: var(--p-inv-ink);
  --p-inv-action-ink: var(--p-inv-bg);
  --font-display: 'Be Vietnam Pro', system-ui, sans-serif;
  --font-text: 'Be Vietnam Pro', system-ui, sans-serif;
  --display-weight: 500;
  --display-tracking: -0.02em;
  --r-sm: 6px; --r-md: 10px; --r-lg: 10px; --r-btn: 10px;
}
body { background: var(--p-bg); color: var(--p-ink); }

/* type moment: the name across the close (close--word) keeps the kit's rule; tabular prices */
.rows__value, .price, .tnum { font-variant-numeric: tabular-nums; }
.rows__name small { display: block; font-size: 16px; line-height: 24px; color: var(--muted); font-weight: 400; }
.rows a.rows__name { color: inherit; text-decoration: none; }
.rows a.rows__name:hover span:first-child { text-decoration: underline; text-underline-offset: 3px; }
.rows > li { min-height: 44px; }

/* offer: the detail strip under the groups (four 1:1 on span-3) */
.strip { margin-top: var(--s-7, 40px); }
.strip > a { display: block; overflow: hidden; aspect-ratio: 1 / 1; border-radius: var(--r-md); }
.strip img { width: 100%; height: 100%; object-fit: cover; transition: transform 600ms var(--ease); }
@media (hover: hover) and (pointer: fine) { .strip > a:hover img { transform: scale(1.03); } }
@media (max-width: 639px) { .strip > a { grid-column: auto / span 6; } .strip > a:nth-child(n + 5) { display: none; } }

/* story with the developing picture */
.story-photo { aspect-ratio: 4 / 3; border-radius: var(--r-md); overflow: hidden; margin: 0; }
.story-photo img { width: 100%; height: 100%; object-fit: cover; }
.story-list { list-style: none; padding: 0; margin: 0; }
.story-list li { border-bottom: 1px solid var(--line); }
.story-list a { display: flex; justify-content: space-between; gap: 16px; align-items: center; min-height: 56px; color: inherit; text-decoration: none; font-weight: 500; }
.story-list a span:last-child { color: var(--muted); font-weight: 400; font-size: 14px; white-space: nowrap; }
.story-list a:hover span:first-child { text-decoration: underline; text-underline-offset: 3px; }

/* goods cards */
.goods-card { display: grid; gap: 12px; align-content: start; background: var(--p-surface); border-radius: var(--r-md); padding: 0 0 16px; overflow: hidden; color: inherit; text-decoration: none; transition: transform 200ms var(--ease); }
.goods-card__media { aspect-ratio: 1 / 1; overflow: hidden; }
.goods-card__media img { width: 100%; height: 100%; object-fit: cover; transition: transform 600ms var(--ease); }
.goods-card__name, .goods-card__price { padding-inline: 16px; margin: 0; }
.goods-card__name { font-weight: 500; font-size: 16px; line-height: 24px; min-height: 48px; }
.goods-card__price { font-variant-numeric: tabular-nums; color: var(--muted); }
@media (hover: hover) and (pointer: fine) { a.goods-card:hover { transform: translateY(-2px); } a.goods-card:hover img { transform: scale(1.03); } }
@media (max-width: 639px) { .grid > .goods-card { grid-column: auto / span 6; } }

/* pages below the home: plain sections that grow with content */
.page-head { padding-top: calc(var(--nav) + 48px); padding-bottom: 32px; }
.page-head h1 { font-size: var(--t-h1); margin: 0 0 12px; }
.page-head p { color: var(--muted); max-width: 60ch; margin: 0; }
.page-body { padding-bottom: 96px; }
.page-body .prose { max-width: 68ch; white-space: pre-line; }
.crumbs { font-size: 14px; margin-bottom: 16px; }
.crumbs a { color: var(--muted); }
.filters { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 32px; }
.filters a { display: inline-flex; align-items: center; min-height: 44px; padding: 0 16px; border: 1px solid var(--line-strong); border-radius: var(--r-btn); color: inherit; text-decoration: none; font-weight: 500; font-size: 15px; }
.filters a[aria-current='page'] { background: var(--p-ink); color: var(--p-bg); border-color: var(--p-ink); }
.detail-photo { aspect-ratio: 4 / 3; border-radius: var(--r-md); overflow: hidden; margin: 0; }
.detail-photo img { width: 100%; height: 100%; object-fit: cover; }
.facts { display: grid; gap: 8px; margin: 24px 0; }
.facts dt { font-size: 13px; color: var(--muted); }
.facts dd { margin: 0 0 8px; font-weight: 500; font-size: 20px; font-variant-numeric: tabular-nums; }
.ba { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; }
.ba figure { margin: 0; }
.ba .ba__img { aspect-ratio: 4 / 3; border-radius: var(--r-md); overflow: hidden; }
.ba .ba__img img { width: 100%; height: 100%; object-fit: cover; }
.ba .t-label { display: block; margin-bottom: 8px; }
@media (max-width: 639px) { .ba { grid-template-columns: 1fr; } }

/* forms (SvelteKit actions; not .form, which system.js would take over) */
.site-form { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px 16px; }
.site-form > .field--full, .site-form > .btn-row, .site-form > p { grid-column: 1 / -1; }
.site-form { --error: var(--p-danger); }
.site-form .field :is(input, select, textarea) { min-height: 48px; }
.site-form fieldset { border: 0; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 8px 20px; }
.site-form fieldset legend { font-size: var(--t-small); font-weight: 500; margin-bottom: 8px; padding: 0; }
.site-form .choice { display: inline-flex; align-items: center; gap: 8px; min-height: 44px; font-weight: 400; font-size: 16px; }
.site-form .choice input { width: 20px; height: 20px; min-height: 0; accent-color: var(--p-accent); }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.form-panel { background: var(--p-surface); border-radius: var(--r-md); padding: 40px; }
.notice-ok { color: var(--p-ok); padding: 16px 20px; background: var(--p-surface); border-radius: var(--r-sm); }
.form-error { color: var(--p-danger); font-weight: 500; }
@media (max-width: 639px) { .site-form { grid-template-columns: 1fr; } .form-panel { padding: 24px; } }

/* cart */
.cart-table { width: 100%; border-collapse: collapse; }
.cart-table th { text-align: left; font-size: 13px; color: var(--muted); font-weight: 500; padding: 8px 0; border-bottom: 1px solid var(--line); }
.cart-table td { padding: 16px 8px 16px 0; border-bottom: 1px solid var(--line); vertical-align: middle; }
.cart-table td.num, .cart-table th.num { text-align: right; font-variant-numeric: tabular-nums; }
.qty { display: inline-flex; gap: 8px; align-items: center; }
.qty input { width: 64px; min-height: 44px; text-align: center; border: 1px solid var(--line-strong); border-radius: var(--r-sm); background: var(--p-bg); font: inherit; }
.linkbtn { background: none; border: 0; padding: 0 4px; min-height: 44px; font: inherit; color: var(--muted); text-decoration: underline; cursor: pointer; }
.total-row { display: flex; justify-content: space-between; font-weight: 600; font-size: 20px; padding: 20px 0; }
@media (max-width: 639px) {
  .cart-table thead { display: none; }
  .cart-table tr { display: grid; grid-template-columns: 1fr auto; gap: 8px; padding: 16px 0; border-bottom: 1px solid var(--line); }
  .cart-table td { border: 0; padding: 0; }
}

/* map */
.map-frame { width: 100%; aspect-ratio: 4 / 3; border: 0; border-radius: var(--r-md); background: var(--p-surface); }

/* phone bar: three actions */
.actionbar.actionbar--three { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.actionbar--three .btn { padding-inline: 8px; font-size: 15px; }

/* the name across the close: capped so "Huy Hoàng Decal" fits the .wrap */
.close__word { font-size: min(9.6vw, 136px); white-space: nowrap; }
@media (max-width: 639px) { .close__word { font-size: 11.4vw; } }
.section-head--split { margin-bottom: var(--head-gap, 48px); align-items: baseline; }
.closing__cta > .section-head--split { margin-bottom: 0; }

/* inner pages: one section that grows with its content (lists, details, forms) */
main > section.page { height: auto; min-height: 100vh; min-height: 100svh; padding-top: calc(var(--nav) + 48px); }
main > section.page > .wrap { height: auto; }
.page h1 { font-size: var(--t-h1); margin: 0 0 12px; }
.page .lead { color: var(--muted); max-width: 62ch; margin: 0 0 40px; font-size: var(--t-lead); }
.page h2 { margin: 48px 0 16px; }
.cards { row-gap: 40px; }
footer.closing.closing--plain { height: auto; min-height: 0; }
.strip > a { aspect-ratio: 4 / 3; }
.strip { margin-top: 32px; }
@media (max-width: 639px) { .close__word { font-size: 9.4vw; } }
#visit h2.section-head { margin: 0 0 var(--head-gap, 48px); }
.strip > a { aspect-ratio: 3 / 2; }
.strip { margin-top: 24px; }
#dich-vu .section-head--split { margin-bottom: 32px; }
.close__word { line-height: 1.08; padding-top: .06em; overflow: visible; }
.head-row { align-items: baseline; margin-bottom: 32px; }
.head-row > * { margin: 0; }
#cong-trinh .story-photo { aspect-ratio: 1 / 1; }
@media (max-width: 639px) { #cong-trinh .story-photo { aspect-ratio: 4 / 3; } }
.pl-photo > img { max-width: 100%; }

/* Smooth full-page navigations (pages reload for the kit scripts): cross-document view transition. */
@view-transition { navigation: auto; }
::view-transition-old(root), ::view-transition-new(root) { animation-duration: 180ms; }
@media (prefers-reduced-motion: reduce) { @view-transition { navigation: none; } }

/* the closing band sizes to its content: a full empty screen at the foot of every page read as "nothing here" */
footer.closing { min-height: 0 !important; height: auto !important; padding-block: 64px 32px; }
footer.closing > .wrap { row-gap: 48px !important; }

/* Notches and the home indicator (iPhone, Android cut-outs). viewport-fit=cover lets the page run edge to edge;
   these keep text and controls inside the safe area while backgrounds still reach the edges.
   All env() values are 0 on devices without a notch, so nothing changes there. */
.wrap, .container {
  width: min(100% - 2 * var(--gut) - env(safe-area-inset-left) - env(safe-area-inset-right), var(--container));
}
nav.actionbar {
  padding-left: calc(var(--gut) + env(safe-area-inset-left));
  padding-right: calc(var(--gut) + env(safe-area-inset-right));
}
.nav.is-open .nav__actions {
  padding-left: calc(var(--gut) + env(safe-area-inset-left));
  padding-right: calc(var(--gut) + env(safe-area-inset-right));
}
