/* DomTexCare: shop for laundry and cleaning products. Hand-written, no framework. */

:root {
  --ink: #16241d;
  --ink-2: #55635b;
  --line: #e1e6df;
  --soft: #f3f5ef;
  --brand: #1b7a4e;
  --brand-dark: #14613d;
  --deep: #123b2b;       /* first screen and footer */
  --sun: #ffd84d;        /* the one accent: the button on the dark first screen */
  --white: #fff;
  --red: #b42318;
  --wrap: 1240px;
  --pad: 16px;
  --text: "Onest", system-ui, -apple-system, sans-serif;
}
@media (min-width: 900px) { :root { --pad: 32px; } }

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-padding-top: 120px; }
body { margin: 0; background: var(--soft); color: var(--ink); font: 400 16px/1.5 var(--text); -webkit-font-smoothing: antialiased; }
img { display: block; max-width: 100%; }
a { color: inherit; }
button, input, select, textarea { font: inherit; color: inherit; }
h1, h2, h3, p { margin: 0; }
ul { margin: 0; padding: 0; list-style: none; }
:focus-visible { outline: 2px solid var(--brand); outline-offset: 2px; }
svg { fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }

.vh { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip { position: absolute; left: 12px; top: -60px; z-index: 40; background: var(--white); padding: 8px 14px; border-radius: 8px; }
.skip:focus { top: 12px; }

/* ---------- buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  min-height: 48px; padding: 0 24px; border: 0; border-radius: 999px;
  background: var(--brand); color: var(--white); font: 600 16px/1 var(--text);
  text-decoration: none; cursor: pointer; transition: background-color .2s, transform .16s;
}
.btn:hover { background: var(--brand-dark); }
.btn:active { transform: scale(.97); }
.btn svg { width: 18px; height: 18px; flex: none; }
.btn-sm { min-height: 40px; padding: 0 16px; font-size: 15px; }
.btn-line { background: var(--white); color: var(--ink); box-shadow: inset 0 0 0 1.5px var(--line); }
.btn-line:hover { background: var(--soft); }
.link-btn { padding: 8px; border: 0; background: none; color: var(--ink-2); text-decoration: underline; cursor: pointer; }

/* ---------- header: one compact row, category menu under it */
.top { position: sticky; top: 0; z-index: 30; background: var(--white); border-bottom: 1px solid var(--line); }
.top-in {
  display: grid; grid-template-columns: auto auto 1fr auto auto; grid-template-areas: "menu brand . orders cart" "search search search search search";
  align-items: center; gap: 6px 2px; max-width: var(--wrap); margin: 0 auto; padding: 6px var(--pad) 10px calc(var(--pad) - 8px);
}
.menu-btn { grid-area: menu; }
.brand { grid-area: brand; margin-left: 4px; display: block; }
.brand img { height: 36px; width: auto; }
.compact .brand img { height: 32px; }
.icon-btn { position: relative; display: grid; place-items: center; width: 44px; height: 44px; padding: 0; border: 0; border-radius: 50%; background: none; cursor: pointer; }
.icon-btn:hover { background: var(--soft); }
.icon-btn svg { width: 24px; height: 24px; }
[data-open-orders] { grid-area: orders; }
.cart-btn { grid-area: cart; }
.badge { position: absolute; top: 3px; right: 1px; min-width: 19px; height: 19px; padding: 0 5px; border-radius: 10px; background: var(--brand); color: var(--white); font: 700 11px/19px var(--text); text-align: center; }
.badge[hidden] { display: none; }
.top-phone { display: none; }

.search { grid-area: search; position: relative; }
.search input {
  width: 100%; height: 44px; padding: 0 46px 0 18px; border: 1.5px solid var(--line); border-radius: 999px;
  background: var(--white); font-size: 16px; outline: none; -webkit-appearance: none; appearance: none;
}
.search input::placeholder { color: #6c7a71; }
.search input:focus { border-color: var(--brand); }
.search input::-webkit-search-cancel-button { display: none; }
.search > button { position: absolute; right: 3px; top: 2px; display: grid; place-items: center; width: 40px; height: 40px; border: 0; border-radius: 50%; background: none; cursor: pointer; }
.search > button svg { width: 21px; height: 21px; }

.suggest { position: absolute; left: 0; right: 0; top: calc(100% + 6px); z-index: 31; padding: 6px; border-radius: 14px; background: var(--white);
  box-shadow: 0 18px 40px -14px rgba(18, 38, 28, .28), 0 0 0 1px var(--line); max-height: 70vh; overflow: auto; }
.suggest[hidden] { display: none; }
.sg { display: grid; grid-template-columns: 48px 1fr auto; align-items: center; gap: 12px; width: 100%; padding: 6px 8px; border: 0; border-radius: 10px; background: none; text-align: left; cursor: pointer; }
.sg:hover, .sg[aria-selected="true"] { background: var(--soft); }
.sg img { width: 48px; height: 48px; object-fit: contain; }
.sg span { font-size: 15px; line-height: 1.3; }
.sg small { display: block; color: var(--ink-2); font-size: 13px; }
.sg b { font-weight: 700; }
.sg-all { display: block; padding: 12px 10px 8px; color: var(--brand); font-weight: 600; text-decoration: none; }
.sg-none { padding: 12px 10px; color: var(--ink-2); font-size: 15px; }

.catnav { display: none; }

/* after scrolling down the header becomes one row; the search field hides behind an icon */
.search-btn { display: none; grid-area: sbtn; }
.compact .top-in { grid-template-columns: auto auto 1fr auto auto; grid-template-areas: "menu brand . sbtn cart" "search search search search search"; padding-top: 4px; padding-bottom: 4px; }
.compact [data-open-orders] { display: none; }
.compact .search-btn { display: grid; }
.compact:not(.search-open) .search { display: none; }
.compact.search-open .top-in { padding-bottom: 10px; }

@media (min-width: 900px) {
  html { scroll-padding-top: 130px; }
  .top-in { grid-template-columns: auto minmax(220px, 560px) 1fr auto auto; grid-template-areas: "brand search phone orders cart"; gap: 28px; padding: 12px var(--pad); }
  .menu-btn { display: none; }
  .brand { margin: 0; }
  .brand img { height: 50px; }
  .compact .brand img { height: 40px; }
  .search input { height: 46px; background: var(--soft); border-color: transparent; }
  .search input:focus { background: var(--white); border-color: var(--brand); }
  .top-phone { grid-area: phone; justify-self: end; display: flex; align-items: center; gap: 8px; font-weight: 600; text-decoration: none; white-space: nowrap; }
  .top-phone svg { width: 19px; height: 19px; color: var(--brand); }
  [data-open-orders] { margin-right: -20px; }

  .catnav { display: block; border-top: 1px solid var(--line); }
  .catnav-in { display: flex; gap: 2px; max-width: var(--wrap); margin: 0 auto; padding: 0 calc(var(--pad) - 12px); }
  .catnav-in > li > a { display: block; padding: 11px 12px; color: var(--ink); font-size: 15px; font-weight: 500; text-decoration: none; white-space: nowrap; }
  .catnav-in > li > a:hover { color: var(--brand); }
  .catnav-end { margin-left: auto; }
  .catnav-end a { color: var(--ink-2) !important; }
}
@media (min-width: 900px) {
  .compact .top-in { grid-template-columns: auto minmax(220px, 560px) 1fr auto auto; grid-template-areas: "brand search phone orders cart"; gap: 28px; padding-top: 8px; padding-bottom: 8px; }
  .compact [data-open-orders] { display: grid; }
  .compact .search-btn { display: none; }
  .compact:not(.search-open) .search { display: block; }
  .compact .catnav { display: none; }
}
@media (min-width: 900px) and (max-width: 1099px) { .top-phone span { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); } }

/* ---------- first screen: a dark green band, four products standing on its lower edge */
.hero { background: var(--deep); color: var(--white); overflow: hidden; }
.hero-in { display: grid; gap: 26px; max-width: var(--wrap); margin: 0 auto; padding: 32px var(--pad) 0; }
h1 { font: 800 clamp(34px, 4.8vw, 60px)/1.03 var(--text); letter-spacing: -.035em; max-width: 12ch; }
.lead { margin: 14px 0 22px; max-width: 34ch; font-size: 16px; line-height: 1.5; color: rgba(255, 255, 255, .78); }
.hero .btn { background: var(--sun); color: var(--ink); }
.hero .btn:hover { background: #ffe37a; }
.hero :focus-visible { outline-color: var(--sun); }
.hero-pic { --hh: 170px; display: flex; align-items: flex-end; justify-content: center; gap: 4%; height: var(--hh); }
.hp { height: calc(var(--hh) * var(--h)); }
.hp img { height: 100%; width: auto; max-width: none; }
@media (min-width: 900px) {
  .hero-in { grid-template-columns: minmax(0, .9fr) minmax(0, 1.1fr); align-items: center; gap: 40px; min-height: 440px; padding-top: 0; }
  .lead { font-size: 19px; margin-bottom: 30px; }
  .hero-pic { --hh: clamp(210px, 27vw, 350px); align-self: end; gap: 5%; }
}

/* ---------- sections */
.sec { max-width: var(--wrap); margin: 0 auto; padding: 44px var(--pad) 0; }
.sec > h2, .list h1 { font: 800 26px/1.1 var(--text); letter-spacing: -.03em; margin-bottom: 16px; }
@media (min-width: 900px) { .sec { padding-top: 64px; } .sec > h2 { font-size: 36px; margin-bottom: 22px; } }

/* product grid and card */
.grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
@media (min-width: 700px) { .grid { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; } }
@media (min-width: 1000px) { .grid { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
.card { display: flex; flex-direction: column; min-width: 0; border-radius: 18px; background: var(--white); overflow: hidden; }
.card[hidden] { display: none; }
.card-open { display: block; width: 100%; padding: 0; border: 0; background: none; cursor: pointer; }
.card-pic { display: flex; align-items: center; justify-content: center; aspect-ratio: 1; padding: 11% 11% 5%; }
.card-pic img { width: 100%; height: 100%; object-fit: contain; transition: transform .3s cubic-bezier(.2, .8, .2, 1); }
.card-open:hover img { transform: scale(1.04); }
.card-body { display: flex; flex-direction: column; flex: 1; padding: 12px; }
.card-name { font: 500 15px/1.3 var(--text); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; min-height: 2.6em; }
.card-price { margin-top: 6px; font: 800 20px/1.2 var(--text); letter-spacing: -.01em; }
.card-price small { display: block; margin-top: 2px; font-size: 12.5px; font-weight: 400; letter-spacing: 0; color: var(--ink-2); }
.add { margin-top: auto; padding-top: 12px; }
.add-btn { width: 100%; height: 42px; padding: 0 6px; border: 0; border-radius: 999px; background: var(--ink); color: var(--white); font: 600 14px var(--text); white-space: nowrap; cursor: pointer; transition: background-color .2s, transform .16s; }
.add-btn:hover { background: var(--brand); }
.add-btn:active { transform: scale(.97); }
.step { display: grid; grid-template-columns: 42px 1fr 42px; align-items: center; height: 42px; border-radius: 999px; background: var(--brand); color: var(--white); }
.step button { height: 42px; padding: 0; border: 0; background: none; color: inherit; font-size: 20px; cursor: pointer; }
.step output { text-align: center; font-size: 14px; white-space: nowrap; }
.step output b { font-size: 16px; }
@media (max-width: 699px) { .step { grid-template-columns: 40px 1fr 40px; } .step output span { display: none; } }
@media (min-width: 900px) { .add-btn { font-size: 15px; } .card-body { padding: 14px 16px 16px; } .card-name { font-size: 16px; } .card-price { font-size: 22px; } .card-price small { font-size: 14px; } }
@media (max-width: 699px) {
  .card-pic { aspect-ratio: 5 / 4; padding: 8% 10% 3%; }
  .card-body { padding: 10px 10px 10px; }
  .card-name { font-size: 14.5px; }
  .card-price { font-size: 19px; }
  .add { padding-top: 10px; }
  .add-btn, .step, .step button { height: 40px; }
}
@media (max-width: 379px) { .add-btn { padding: 0 2px; font-size: 13px; letter-spacing: -.01em; } }

/* contact: one white panel, the phone is the biggest thing in it */
.contact { padding-bottom: 72px; }
.contact-in { display: grid; gap: 22px; padding: 26px 22px; border-radius: 22px; background: var(--white); }
.contact h2 { font: 800 26px/1.1 var(--text); letter-spacing: -.03em; }
.contact-line { margin-top: 8px; max-width: 38ch; color: var(--ink-2); }
.owner { margin-bottom: 4px; font-weight: 600; color: var(--ink-2); }
.phone a { font: 800 clamp(32px, 4.4vw, 52px)/1.05 var(--text); text-decoration: none; letter-spacing: -.03em; }
.mail { margin-top: 6px; }
.mail a { color: var(--ink-2); }
.actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 20px; }
@media (min-width: 900px) {
  .contact { padding-bottom: 96px; }
  .contact-in { grid-template-columns: 1fr auto; align-items: center; gap: 48px; padding: 44px 48px; }
  .contact h2 { font-size: 36px; }
  .contact-side { text-align: right; }
  .actions { justify-content: flex-end; }
}

/* footer */
.foot { background: var(--deep); padding: 36px var(--pad) 28px; font-size: 14px; color: rgba(255, 255, 255, .72); }
.foot-in { display: grid; gap: 24px; max-width: var(--wrap); margin: 0 auto; }
.foot-logo { width: 132px; height: auto; margin-bottom: 14px; padding: 10px; border-radius: 16px; background: var(--white); }
.foot a { color: inherit; text-decoration: none; }
.foot a:hover { color: var(--white); text-decoration: underline; }
.foot ul { display: grid; gap: 6px; }
.foot-end { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 8px 24px; max-width: var(--wrap); margin: 28px auto 0; padding-top: 18px; border-top: 1px solid rgba(255, 255, 255, .16); font-size: 13px; }
.coltcode-credit a { display: inline-flex; align-items: center; gap: .35em; color: inherit; text-decoration: none; }
.coltcode-credit img { flex: none; display: block; height: 20px; width: auto; }
.coltcode-credit span { text-decoration: underline; text-underline-offset: 3px; }
.has-cart .foot { padding-bottom: 104px; }
@media (min-width: 900px) { .foot-in { grid-template-columns: 1fr 1fr; } .foot ul { grid-template-columns: 1fr 1fr; } .has-cart .foot { padding-bottom: 28px; } }

/* ---------- listing pages */
.list { max-width: var(--wrap); margin: 0 auto; padding: 18px var(--pad) 72px; }
.crumbs { display: flex; gap: 8px; margin-bottom: 14px; font-size: 13px; color: var(--ink-2); }
.crumbs a { color: inherit; }
.list h1 { margin-bottom: 4px; max-width: none; }
.list-line { color: var(--ink-2); }
.filters { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px; margin: 0 0 18px; }
.chips { display: flex; gap: 8px; overflow-x: auto; scrollbar-width: none; margin-inline: calc(var(--pad) * -1); padding-inline: var(--pad); max-width: calc(100% + var(--pad) * 2); }
.chips::-webkit-scrollbar { display: none; }
.chip { flex: none; height: 40px; padding: 0 16px; border: 1px solid var(--line); border-radius: 999px; background: var(--white); font-size: 14px; font-weight: 500; cursor: pointer; white-space: nowrap; }
.chip:hover { border-color: var(--brand); }
.chip[aria-pressed="true"] { background: var(--brand); border-color: var(--brand); color: var(--white); }
.sort { display: flex; align-items: center; gap: 8px; font-size: 14px; color: var(--ink-2); }
.sort select { height: 40px; padding: 0 12px; border: 1px solid var(--line); border-radius: 999px; background: var(--white); color: var(--ink); font-size: 14px; }
.shown { margin-top: 36px; text-align: center; font-size: 14px; color: var(--ink-2); }
.none { display: grid; justify-items: start; gap: 16px; margin-top: 12px; max-width: 40ch; }
.none[hidden] { display: none; }
@media (min-width: 900px) { .list { padding-top: 26px; } .list h1 { font-size: 38px; } .chips { margin: 0; padding: 0; max-width: 100%; } }

.nf-main { display: grid; justify-items: start; gap: 18px; max-width: var(--wrap); margin: 0 auto; padding: 72px var(--pad) 120px; }

/* ---------- cart bar (phones): the cart stays one tap away */
.cartbar { position: fixed; z-index: 29; left: 10px; right: 10px; bottom: max(10px, env(safe-area-inset-bottom)); animation: up .4s cubic-bezier(.2, .8, .2, 1); }
.cartbar[hidden] { display: none; }
.cartbar-in { display: flex; align-items: center; gap: 14px; width: 100%; min-height: 62px; padding: 0 10px 0 22px; border: 0; border-radius: 999px; background: var(--ink); color: var(--white); cursor: pointer; text-align: left; box-shadow: 0 14px 30px -12px rgba(18, 38, 28, .5); }
.cb-n { font-size: 14px; opacity: .8; }
.cb-sum { margin-left: auto; font: 700 19px var(--text); }
.cartbar .btn { pointer-events: none; }
@keyframes up { from { transform: translateY(130%); } }
@media (min-width: 900px) { .cartbar { display: none; } }
.bump { animation: bump .35s ease; }
@keyframes bump { 40% { transform: scale(1.12); } }

/* ---------- sheets: bottom sheet on phones, panel on desktop */
.sheet {
  width: 100%; max-width: 100%; max-height: 92dvh; margin: auto 0 0; padding: 22px 20px calc(24px + env(safe-area-inset-bottom));
  border: 0; border-radius: 18px 18px 0 0; background: var(--white); color: var(--ink); overflow: auto;
}
.sheet:focus { outline: none; }
.sheet[open] { animation: sheet-in .36s cubic-bezier(.2, .8, .2, 1); }
.sheet::backdrop { background: rgba(18, 38, 28, .4); }
@keyframes sheet-in { from { transform: translateY(40%); opacity: 0; } }
@media (min-width: 700px) {
  .sheet { width: 460px; margin: auto; border-radius: 18px; padding: 26px 28px 28px; }
  @keyframes sheet-in { from { transform: translateY(20px); opacity: 0; } }
}
.x-wrap { position: absolute; top: 10px; right: 10px; z-index: 1; }
.x { width: 40px; height: 40px; border: 0; border-radius: 50%; background: var(--soft); font-size: 22px; line-height: 1; cursor: pointer; }
.sheet h2 { font: 800 22px/1.2 var(--text); letter-spacing: -.02em; padding-right: 44px; }

.menu-more { margin-top: 10px; }
.menu-more a { display: flex; align-items: center; justify-content: space-between; padding: 14px 0; border-bottom: 1px solid var(--line); font-weight: 600; text-decoration: none; color: var(--ink); }
.menu-more a::after { content: ""; width: 8px; height: 8px; margin-right: 4px; border-right: 2px solid var(--ink-2); border-top: 2px solid var(--ink-2); transform: rotate(45deg); }
.menu-phone { width: 100%; margin-top: 18px; }

.dp-pic { display: flex; align-items: center; justify-content: center; height: 280px; margin: -22px -20px 18px; padding: 28px; background: var(--soft); }
.dp-pic img { width: 100%; height: 100%; object-fit: contain; }
.dp-cat { margin-bottom: 4px; font-size: 14px; color: var(--ink-2); }
.dp-unit { margin-top: 4px; color: var(--ink-2); }
.dp-price { margin-top: 12px; font: 800 30px var(--text); }
.dp-buy { display: flex; gap: 10px; margin-top: 18px; }
.dp-buy .btn { flex: 1; }
.dp-desc { margin-top: 18px; padding-top: 16px; border-top: 1px solid var(--line); line-height: 1.55; }
.dp-desc[hidden] { display: none; }
.dp-spec { margin-top: 12px; padding-left: 18px; list-style: disc; color: var(--ink-2); font-size: 15px; }
.dp-spec li { margin: 2px 0; }
.dp-desc details { margin-top: 10px; border-top: 1px solid var(--line); }
.dp-desc summary { display: flex; align-items: center; justify-content: space-between; min-height: 46px; font-weight: 600; cursor: pointer; list-style: none; }
.dp-desc summary::-webkit-details-marker { display: none; }
.dp-desc summary::after { content: "+"; font-size: 20px; color: var(--ink-2); }
.dp-desc details[open] summary::after { content: "−"; }
.dp-desc details p { padding-bottom: 12px; color: var(--ink-2); font-size: 15px; }
@media (min-width: 700px) { .dp-pic { margin: -26px -28px 20px; border-radius: 18px 18px 0 0; } }

.qty { display: inline-flex; align-items: center; border-radius: 999px; box-shadow: inset 0 0 0 1.5px var(--line); }
.qty button { width: 44px; height: 48px; border: 0; background: none; font-size: 20px; cursor: pointer; }
.qty output { min-width: 24px; text-align: center; font-weight: 700; }

.dc-list { margin-top: 14px; }
.dc-list li { display: grid; grid-template-columns: 56px 1fr auto; grid-template-areas: "pic name price" "pic qty qty"; gap: 4px 12px; align-items: center; padding: 12px 0; border-top: 1px solid var(--line); }
.dc-list img { grid-area: pic; width: 56px; height: 56px; object-fit: contain; }
.dc-list .n { grid-area: name; font-size: 15px; line-height: 1.3; }
.dc-list .n small { display: block; color: var(--ink-2); font-size: 13px; }
.dc-list .pr { grid-area: price; font-weight: 700; }
.dc-list .qty { grid-area: qty; justify-self: start; }
.dc-list .qty button { width: 38px; height: 36px; }
.dc-sum { display: flex; justify-content: space-between; align-items: baseline; padding-top: 14px; border-top: 1px solid var(--line); color: var(--ink-2); }
.dc-sum b { font: 700 24px var(--text); color: var(--ink); }
.dc-actions { display: grid; gap: 10px; margin-top: 18px; }
.dc-view[hidden] { display: none; }
.dc-note { margin: 8px 0 14px; color: var(--ink-2); font-size: 15px; }
.dc-form label { display: grid; gap: 6px; margin-bottom: 12px; font-size: 14px; font-weight: 500; }
.dc-form input, .dc-form textarea { width: 100%; min-height: 46px; padding: 10px 12px; border: 1.5px solid var(--line); border-radius: 10px; background: var(--white); font-size: 16px; }
.dc-form input:focus, .dc-form textarea:focus { border-color: var(--brand); outline: none; }
.dc-form [aria-invalid="true"] { border-color: var(--red); }
.dc-err { margin-bottom: 10px; color: var(--red); font-size: 14px; }
.dc-err[hidden] { display: none; }

.do-list li { padding: 14px 0; border-top: 1px solid var(--line); }
.do-list li:first-child { margin-top: 12px; }
.do-head { display: flex; justify-content: space-between; font-weight: 600; }
.do-items { margin: 4px 0 10px; font-size: 14px; color: var(--ink-2); }
.do-empty { margin-top: 10px; color: var(--ink-2); }
.do-empty[hidden] { display: none; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}

/* ---------- products without a photo yet: a quiet box outline in the picture area */
.ph { display: grid; place-items: center; width: 100%; height: 100%; color: #c5ced9; }
.ph svg { width: 34%; height: 34%; stroke-width: 1.4; }
.card-pic .ph { aspect-ratio: 1; }
.sg .ph, .dc-list .ph { width: 48px; height: 48px; border-radius: 8px; background: var(--soft); }
.dc-list .ph { grid-area: pic; width: 56px; height: 56px; }
.sg .ph svg, .dc-list .ph svg { width: 50%; height: 50%; }
.dp-pic .ph svg { width: 22%; height: 22%; }
