/* Tbili Kutkhe: home and gifts demo shop. Colours only through --md-* roles. */
:root {
  --md-plain-font: "Noto Sans Georgian", "Roboto Condensed", system-ui, sans-serif;
  --md-brand-font: "Noto Sans Georgian", "Roboto Condensed", system-ui, sans-serif;
  --md-latin-font: "Roboto Condensed", "Noto Sans Georgian", system-ui, sans-serif;

  /* the reference red, deepened just enough for 4.5:1 with white text */
  --md-primary: #d43e30;
  --md-on-primary: #ffffff;
  --md-primary-container: #fde3df;
  --md-on-primary-container: #7a1d14;

  /* neutral white and grey surfaces, as in the reference */
  --md-surface: #ffffff;
  --md-on-surface: #1f1d1d;
  --md-on-surface-variant: #5c5757;
  --md-surface-container-lowest: #ffffff;
  --md-surface-container-low: #f8f7f7;
  --md-surface-container: #f3f1f1;
  --md-surface-container-high: #edebeb;
  --md-surface-container-highest: #e6e3e3;
  --md-secondary-container: #fde3df;
  --md-on-secondary-container: #7a1d14;
  --md-tertiary-container: #f1eeee;
  --md-on-tertiary-container: #4a4545;
  --md-outline: #8a8383;
  --md-outline-variant: #e2dddd;
  --md-inverse-surface: #171515;
  --md-inverse-on-surface: #f4efef;

  --md-on-photo: #ffffff;
  --md-scrim: #000000;
  --md-max: 1200px;
}
html, body { overflow-x: clip; }
html { scroll-padding-top: 88px; }
body { -webkit-tap-highlight-color: transparent; }
.nw { white-space: nowrap; }
[hidden] { display: none !important; }

.display-l, .display-m, .display-s, .headline-l, .headline-m, .headline-s { font-weight: 700; font-stretch: 84%; }
.title-l, .title-m { font-weight: 600; }

/* ---------- Top bar ---------- */
.top-bar { border-bottom: 1px solid var(--md-outline-variant); }
.top-bar.scrolled { background: var(--md-surface); }
.bar-main { min-height: 76px; gap: 8px; }
.brand { display: flex; align-items: center; gap: 12px; flex: none; }
.logo { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; color: var(--md-on-surface); font: 700 26px/1 var(--md-latin-font); letter-spacing: .2px; white-space: nowrap; }
.logo__mark { width: 40px; height: 40px; border-radius: 50%; display: grid; place-items: center; background: var(--md-primary); color: var(--md-on-primary); }
.logo__mark .icon { font-size: 22px; }
.bar-nav { margin-inline-start: 20px; }
.bar-cta { margin-inline-start: 4px; }
.only-narrow { display: none !important; }
@media (max-width: 1339px) {
  .only-wide { display: none !important; }
  .only-narrow { display: inline-grid !important; }
  .fab.only-narrow { display: none !important; }
}
@media (max-width: 839px) {
  .bar-main { min-height: 64px; gap: 2px; }
  .logo { font-size: 21px; gap: 8px; }
  .logo__mark { width: 32px; height: 32px; }
  .logo__mark .icon { font-size: 18px; }
  .brand { gap: 8px; }
  .bar-cta { display: none; }
  .fab.only-narrow { display: inline-flex !important; }
}
@media (max-width: 439px) {
  .brand { flex-direction: column; align-items: flex-start; gap: 2px; }
  .demo-tag { height: 18px; padding: 0 6px; }
}

/* ---------- Hero: one still photo, centred type ---------- */
.hero { position: relative; display: grid; align-items: center; min-height: clamp(520px, 50vw, 720px); overflow: hidden; background: var(--md-inverse-surface); color: var(--md-on-photo); text-align: center; }
.hero__bg { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.hero::after { content: ""; position: absolute; inset: 0; background: color-mix(in srgb, var(--md-scrim) 52%, transparent); pointer-events: none; }
.hero__inner { position: relative; z-index: 1; display: grid; justify-items: center; gap: 16px; padding-block: 72px; }
.hero__eyebrow { font-weight: 500; }
.hero h1 { max-width: 16ch; }
.hero__sub { max-width: 56ch; }
.hero__actions { justify-content: center; gap: 12px; margin-top: 12px; }
@media (max-width: 599px) {
  .hero { min-height: 520px; }
  .hero__inner { padding-block: 56px; }
  .hero__actions .btn { width: 100%; }
  .hero__actions { width: 100%; }
}

/* ---------- Category tiles: two columns, staggered heights ---------- */
.tiles-sec { padding-block: 48px 0; }
.tiles { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); grid-template-rows: 230px 100px 230px; gap: var(--md-gutter); }
.tile { position: relative; overflow: hidden; border-radius: var(--md-shape-l); display: grid; place-items: center; color: var(--md-on-photo); text-decoration: none; background: var(--md-inverse-surface); isolation: isolate; }
.tile:nth-child(1) { grid-area: 1 / 1 / 2 / 2; }
.tile:nth-child(2) { grid-area: 1 / 2 / 3 / 3; }
.tile:nth-child(3) { grid-area: 2 / 1 / 4 / 2; }
.tile:nth-child(4) { grid-area: 3 / 2 / 4 / 3; }
.tile img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; z-index: -2; transition: transform var(--md-dur-long) var(--md-ease-standard); }
.tile::before { content: ""; position: absolute; inset: 0; z-index: -1; background: color-mix(in srgb, var(--md-scrim) 34%, transparent); transition: background var(--md-dur-medium) var(--md-ease-standard); }
@media (hover: hover) {
  .tile:hover img { transform: scale(1.04); }
  .tile:hover::before { background: color-mix(in srgb, var(--md-scrim) 46%, transparent); }
}
.tile:focus-visible { outline-offset: -4px; outline-color: var(--md-on-photo); }
.tile__text { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: center; gap: 4px 12px; padding: 16px; text-align: center; }
.tile__small { font: 500 20px/28px var(--md-plain-font); }
.tile__big { font: 700 40px/48px var(--md-brand-font); font-stretch: 84%; }
.tile__note { flex-basis: 100%; font: 500 20px/28px var(--md-latin-font); }
@media (max-width: 839px) {
  .tiles { grid-template-columns: minmax(0, 1fr); grid-template-rows: none; grid-auto-rows: 180px; }
  .tile:nth-child(n) { grid-area: auto; }
  .tile__small { font-size: 16px; line-height: 24px; }
  .tile__big { font-size: 32px; line-height: 40px; }
}

/* ---------- Featured product: framed box, delivery facts in rings ---------- */
.featured-sec { padding-block: 64px; }
.featured { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); align-items: center; gap: 48px; padding: 16px; border: 1px solid var(--md-outline-variant); border-radius: var(--md-shape-xl); outline: 1px solid var(--md-outline-variant); outline-offset: 6px; }
.featured__media { position: relative; aspect-ratio: 1 / 1; overflow: hidden; border-radius: var(--md-shape-l); background: var(--md-surface-container); }
.featured__media img { width: 100%; height: 100%; object-fit: cover; }
.featured__tag { position: absolute; top: 16px; left: 16px; padding: 6px 14px; border-radius: var(--md-shape-full); background: var(--md-primary); color: var(--md-on-primary); }
.featured__body { display: grid; gap: 16px; justify-items: start; padding: 16px 32px 16px 0; }
.featured__price { font: 700 32px/40px var(--md-latin-font); color: var(--md-primary); }
.facts { list-style: none; margin: 8px 0; padding: 0; display: flex; flex-wrap: wrap; gap: 16px; }
.facts li { width: 104px; height: 104px; border-radius: 50%; border: 2px solid var(--md-primary); display: grid; align-content: center; justify-items: center; gap: 2px; padding: 8px; text-align: center; }
.facts__n { font: 700 22px/26px var(--md-latin-font); color: var(--md-on-surface); }
.facts__l { font: 500 11px/14px var(--md-plain-font); color: var(--md-on-surface-variant); max-width: 9ch; }
@media (max-width: 839px) {
  .featured-sec { padding-block: 48px; }
  .featured { grid-template-columns: minmax(0, 1fr); gap: 16px; padding: 12px; }
  .featured__body { padding: 8px 8px 16px; }
}
@media (max-width: 479px) {
  .facts { gap: 8px; }
  .facts li { width: 76px; height: 76px; padding: 4px; }
  .facts__n { font-size: 17px; line-height: 20px; }
  .facts__l { font-size: 10px; line-height: 12px; }
  .featured__body .cluster, .featured__body .cluster .btn-filled { width: 100%; }
}

/* ---------- Red strip ---------- */
.strip { position: relative; overflow: hidden; isolation: isolate; border-radius: var(--md-shape-l); min-height: 200px; display: flex; align-items: center; justify-content: space-between; gap: 24px; padding: 32px 56px; background: var(--md-primary); color: var(--md-on-primary); }
.strip img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; z-index: -2; }
.strip::before { content: ""; position: absolute; inset: 0; z-index: -1; background: color-mix(in srgb, var(--md-primary) 82%, transparent); }
.strip__text { display: grid; gap: 4px; }
.strip__big { font: 700 48px/56px var(--md-latin-font); letter-spacing: 1px; }
.strip .btn { color: var(--md-primary); }
@media (max-width: 839px) {
  .strip { flex-direction: column; align-items: flex-start; padding: 28px 24px; }
  .strip__big { font-size: 34px; line-height: 42px; letter-spacing: 0; }
}

/* ---------- Section heads ---------- */
.section-head { display: grid; justify-items: center; gap: 8px; text-align: center; margin-bottom: 24px; }
.sec-title::after { content: ""; display: block; width: 48px; height: 3px; border-radius: 3px; margin: 12px auto 0; background: var(--md-primary); }
.shop { padding-block: 72px 64px; }
.chips-row { justify-content: center; margin-bottom: 32px; }
.chip { border-radius: var(--md-shape-full); }
.chip[aria-pressed="true"] { background: var(--md-primary); color: var(--md-on-primary); }
@media (max-width: 599px) {
  .chips-row { flex-wrap: nowrap; justify-content: flex-start; overflow-x: auto; margin-inline: calc(-1 * var(--md-margin)); padding: 2px var(--md-margin); scrollbar-width: none; }
  .chips-row::-webkit-scrollbar { display: none; }
  .chip { flex: none; }
}

/* ---------- Product grids ---------- */
.products { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: var(--md-gutter); }
.product .price { font-family: var(--md-latin-font); }
.empty { text-align: center; padding: 32px 0; }
@media (max-width: 1023px) { .products { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (max-width: 719px) { .products { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; } }

/* ---------- Mosaic: big photo banner + 2x2 ---------- */
.mosaic-sec { padding-bottom: var(--md-gutter); }
.mosaic-sec--b { padding-bottom: 0; }
.mosaic { display: grid; grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); gap: var(--md-gutter); align-items: stretch; }
.mosaic--rev { grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); }
.banner { position: relative; overflow: hidden; isolation: isolate; border-radius: var(--md-shape-l); min-height: 420px; display: grid; place-items: center; background: var(--md-inverse-surface); color: var(--md-on-photo); text-align: center; }
.banner img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; z-index: -2; }
.banner::before { content: ""; position: absolute; inset: 0; z-index: -1; background: color-mix(in srgb, var(--md-scrim) 52%, transparent); }
.banner__text { display: grid; justify-items: center; gap: 12px; padding: 40px 32px; max-width: 520px; }
.banner__text .btn { margin-top: 8px; }
.products--mini { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.mosaic .products--mini li.product > .card > .media { aspect-ratio: 1 / 1; }
.steps { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--md-gutter); }
.step { display: grid; align-content: start; gap: 6px; padding: 24px; border-radius: 22px; background: var(--md-surface-container-low); }
.step__icon { width: 48px; height: 48px; border-radius: 50%; display: grid; place-items: center; margin-bottom: 8px; background: var(--md-primary); color: var(--md-on-primary); }
.step__n { color: var(--md-primary); }
@media (max-width: 1023px) {
  .mosaic, .mosaic--rev { grid-template-columns: minmax(0, 1fr); }
  .mosaic--rev .banner { order: -1; }
  .banner { min-height: 360px; }
  .products--mini { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .steps { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}
@media (max-width: 839px) {
  .products--mini, .steps { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
  .step { padding: 16px; }
}
@media (max-width: 439px) { .steps { grid-template-columns: minmax(0, 1fr); } }

/* ---------- Tips (the reference's journal cards) ---------- */
.tips { padding-block: 72px; }
.posts { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--md-gutter); }
.post__media { aspect-ratio: 16 / 9; overflow: hidden; border-radius: var(--md-shape-l); background: var(--md-surface-container); }
.post__media img { width: 100%; height: 100%; object-fit: cover; }
.post__body { display: flex; gap: 16px; padding-top: 16px; }
.post__body > div { display: grid; gap: 6px; align-content: start; }
.post__n { flex: none; width: 48px; height: 56px; border-radius: var(--md-shape-m); display: grid; place-items: center; background: var(--md-primary); color: var(--md-on-primary); font: 700 26px/1 var(--md-latin-font); }
@media (max-width: 839px) { .posts { grid-template-columns: minmax(0, 1fr); gap: 32px; } .tips { padding-block: 56px; } }

/* ---------- Contact: shop photo with a dark card ---------- */
.contact { position: relative; isolation: isolate; padding-block: 72px; background: var(--md-surface-container); }
.contact__bg { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; z-index: -1; }
.contact__card { width: min(100%, 460px); display: grid; gap: 16px; justify-items: start; padding: 32px; border-radius: var(--md-shape-xl); background: color-mix(in srgb, var(--md-inverse-surface) 90%, transparent); color: var(--md-inverse-on-surface); }
.contact__facts { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.contact__facts li { display: flex; align-items: center; gap: 12px; font: 500 14px/20px var(--md-plain-font); }
.contact__facts .icon { color: var(--md-inverse-primary); font-size: 22px; }
@media (max-width: 599px) { .contact { padding-block: 40px; } .contact__card { padding: 24px; } }

/* ---------- Newsletter bar ---------- */
.news { background: var(--md-primary); color: var(--md-on-primary); padding-block: 28px; }
.news__inner { display: flex; align-items: center; justify-content: space-between; gap: 24px 48px; flex-wrap: wrap; }
.news__text { display: grid; gap: 2px; }
.news__form { display: flex; gap: 12px; flex: 1 1 420px; max-width: 560px; }
.news__form .field { flex: 1; min-width: 0; --field-bg: var(--md-primary); }
.news__form .field input { border-color: var(--md-on-primary); color: var(--md-on-primary); border-radius: var(--md-shape-full); padding-inline: 24px; }
.news__form .field input:focus { border-width: 1px; padding: 16px 24px; outline: 2px solid var(--md-on-primary); outline-offset: -1px; }
.news__form .field label { color: var(--md-on-primary); left: 20px; }
.news__form .btn { color: var(--md-primary); }
.news :focus-visible { outline-color: var(--md-on-primary); }
@media (max-width: 479px) { .news__form { flex-direction: column; flex-basis: 100%; } }

/* ---------- Footer (dark, as in the reference) ---------- */
.footer { background: var(--md-inverse-surface); color: var(--md-inverse-on-surface); padding-block: 56px 24px; }
.footer__cols { display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr) minmax(0, 1.3fr) minmax(0, 1.2fr); gap: 40px; }
.footer h2 { margin-bottom: 14px; }
.footer ul { list-style: none; margin: 0; padding: 0; }
.footer__cols > div > ul:not(.thumbs) { display: grid; gap: 10px; font: 400 14px/20px var(--md-plain-font); color: color-mix(in srgb, var(--md-inverse-on-surface) 78%, transparent); }
.footer a:not(.btn):not(.logo) { text-decoration: none; }
@media (hover: hover) { .footer a:not(.btn):not(.logo):hover { color: var(--md-inverse-primary); } }
.footer :focus-visible { outline-color: var(--md-inverse-primary); }
.footer__about { display: grid; gap: 16px; justify-items: start; align-content: start; }
.footer__about p { color: color-mix(in srgb, var(--md-inverse-on-surface) 78%, transparent); max-width: 40ch; }
.logo--footer { color: var(--md-inverse-on-surface); }
.thumbs { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.thumbs img { aspect-ratio: 1 / 1; width: 100%; object-fit: cover; border-radius: var(--md-shape-s); }
.footer__pay { display: flex; align-items: center; flex-wrap: wrap; gap: 12px 20px; margin-top: 40px; padding-top: 24px; border-top: 1px solid color-mix(in srgb, var(--md-inverse-on-surface) 18%, transparent); }
.footer__pay h2 { margin: 0; }
.footer__pay .chip { color: var(--md-inverse-on-surface); border-color: color-mix(in srgb, var(--md-inverse-on-surface) 30%, transparent); cursor: default; }
.footer__bottom { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 8px 24px; margin-top: 24px; color: color-mix(in srgb, var(--md-inverse-on-surface) 70%, transparent); }
@media (max-width: 1023px) { .footer__cols { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 599px) {
  .footer__cols { grid-template-columns: minmax(0, 1fr); gap: 32px; }
  .footer { padding-bottom: 104px; }
}
@media (min-width: 600px) and (max-width: 839px) { .footer { padding-bottom: 104px; } }

/* ---------- Phone FAB + snackbar ---------- */
.fab-order { position: fixed; right: 16px; bottom: calc(16px + env(safe-area-inset-bottom)); z-index: 30; background: var(--md-primary); color: var(--md-on-primary); border-radius: var(--md-shape-full); }
@media (max-width: 839px) { .snackbar { bottom: 88px; } }

/* bar details */
.top-bar nav a, .demo-tag { white-space: nowrap; }
.top-bar nav a { padding: 0 14px; }
@media (max-width: 439px) {
  .step { grid-template-columns: 48px minmax(0, 1fr); column-gap: 14px; }
  .step__icon { grid-row: span 3; margin: 0; }
}

@media (max-width: 479px) {
  .facts { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); width: 100%; }
  .facts li { width: auto; height: auto; aspect-ratio: 1 / 1; }
}
@media (min-width: 600px) and (max-width: 839px) {
  .post { display: grid; grid-template-columns: 240px minmax(0, 1fr); gap: 24px; align-items: center; }
  .post__body { padding-top: 0; }
}
