:root {
  --red: #a84456;
  --green: #47705c;
  --ink: #33443c;
  --line: #e7ece7;
  --muted: #66776d;
}

* {
  box-sizing: border-box;
}

html {
  color-scheme: light;
  scroll-behavior: smooth;
}

body {
  overflow-x: clip;
  min-width: 320px;
  margin: 0;
  padding-bottom: 76px;
  color: var(--ink);
  background-color: #f0f3f1;
  font: 16px/1.5 Arial, sans-serif;
  letter-spacing: 0;
}

a {
  color: inherit;
  text-decoration: none;
}

a:hover {
  color: var(--red);
}

button,
input,
textarea {
  font: inherit;
}

button {
  padding: 10px 17px;
  color: var(--ink);
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 6px;
  cursor: pointer;
}

button:hover {
  border-color: var(--green);
}

button:disabled {
  opacity: 0.6;
  cursor: wait;
}

input {
  width: 100%;
  padding: 12px 14px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 6px;
}

button,
a,
input,
textarea {
  transition:
    background-color 0.18s,
    border-color 0.18s,
    box-shadow 0.18s,
    color 0.18s;
}

button:focus-visible,
a:focus-visible,
input:focus-visible,
textarea:focus-visible {
  outline: 3px solid #83b59a;
  outline-offset: 3px;
}

textarea {
  width: 100%;
  min-height: 112px;
  resize: vertical;
  padding: 12px 14px;
  color: var(--ink);
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 6px;
}

header,
main,
footer {
  position: relative;
  z-index: 1;
  width: calc(100% - 48px);
  max-width: 1640px;
  margin-right: auto;
  margin-left: auto;
}

header {
  min-height: 76px;
  margin-top: 24px;
  margin-bottom: 18px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 14px 32px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 16px;
}

main {
  margin-bottom: 32px;
  animation: page-enter 0.22s ease-out;
}

footer {
  margin-bottom: 24px;
  display: grid;
  grid-template-columns: 1.2fr 1fr 1fr;
  gap: 18px 32px;
  align-items: start;
  padding: 26px 32px 20px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 20px;
}

footer h3 {
  margin: 0 0 10px;
  font-size: 14px;
}

footer div > a {
  display: block;
  margin: 8px 0;
  font-size: 14px;
}

footer p {
  margin: 12px 0 0;
  color: var(--muted);
  font-size: 13px;
}

footer a,
.account a,
.contact-page a {
  overflow-wrap: anywhere;
}

.brand {
  color: var(--red);
  font-size: 24px;
  font-weight: 800;
  white-space: nowrap;
}

.brand small {
  display: block;
  margin-top: 6px;
  color: var(--green);
  font-size: 11px;
  font-weight: 400;
  text-align: center;
}

footer > .brand {
  justify-self: start;
}

footer .brand small {
  text-align: left;
}

nav,
.actions {
  display: flex;
  align-items: center;
  gap: 26px;
  font-size: 14px;
}

nav a {
  position: relative;
  padding-bottom: 5px;
}

nav a::after {
  position: absolute;
  right: 0;
  bottom: 0;
  left: 0;
  height: 2px;
  background: currentColor;
  border-radius: 999px;
  content: "";
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.18s ease;
}

nav a:hover::after,
nav a[aria-current="page"]::after {
  transform: scaleX(1);
}

.actions {
  flex-wrap: wrap;
}

.actions b {
  margin-left: 10px;
  padding: 3px 7px;
  background: #ffffff26;
  border-radius: 4px;
}

.like-counter {
  min-width: 68px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

.like-counter b {
  margin-left: 0;
}

h1,
h2 {
  margin-top: 0;
  font-family: Arial, sans-serif;
  font-weight: 700;
  letter-spacing: 0;
}

h1 {
  margin-bottom: 15px;
  color: var(--red);
  font-size: 48px;
  line-height: 1.1;
}

h2 {
  margin-bottom: 20px;
  font-size: 26px;
  line-height: 1.2;
}

sup {
  color: var(--muted);
  font-size: 12px;
}

label {
  display: block;
  margin: 18px 0;
  font-size: 14px;
}

label input {
  margin-top: 7px;
}

.primary {
  color: #fff;
  background: var(--red);
  border-color: var(--red);
}

.primary:hover {
  background: #923748;
  border-color: #923748;
}

.wide {
  width: 100%;
}

.muted {
  color: var(--muted);
  font-size: 14px;
}

.eyebrow {
  color: var(--green);
  font-size: 13px;
  font-weight: 700;
}

[hidden] {
  display: none !important;
}

[aria-current="page"] {
  color: var(--red);
  font-weight: 700;
}

.copyright {
  grid-column: 1 / -1;
  padding-top: 14px;
  color: var(--muted);
  border-top: 1px solid var(--line);
}

.brand-banner {
  margin: 0;
  position: relative;
  overflow: hidden;
  background: linear-gradient(135deg, #fff 0%, #fff7e5 100%);
  border: 1px solid var(--line);
  border-radius: 24px;
  box-shadow: 0 22px 55px #7b1b2c12;
}

.brand-banner a,
.brand-banner img {
  display: block;
}

.brand-banner img {
  width: 100%;
  height: auto;
}

.shop-note {
  display: flex;
  justify-content: space-around;
  gap: 20px;
  padding: 26px 20px;
  color: #5c4554;
  font-weight: 600;
  border-bottom: 1px solid var(--line);
}

.catalog {
  padding: 44px 12px 60px;
}

.section-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}

.section-heading h2 {
  margin: 0;
}

.section-heading input {
  width: 260px;
  font-size: 14px;
}

.filters {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin: 26px 0;
}

.filters button {
  padding: 10px 20px;
  font-size: 13px;
  font-weight: 600;
  border-radius: 22px;
}

.selected {
  color: #355b44;
  background: #e6eee8;
  border-color: #c9d9ce;
}

.grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 30px;
}

.product {
  overflow: hidden;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 8px;
  transition:
    border-color 0.2s,
    box-shadow 0.2s;
}

.photo {
  display: block;
  width: 100%;
  padding: 0;
  background: #fff;
  border: 0;
  border-radius: 0;
}

.photo img {
  display: block;
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  object-position: center;
}

.product-body {
  padding: 22px;
}

.meta {
  display: flex;
  justify-content: space-between;
  color: var(--muted);
  font-size: 12px;
}

.product h3 {
  min-height: 56px;
  margin: 10px 0;
  font-size: 20px;
  font-weight: 600;
  line-height: 1.4;
}

.product-bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-top: 15px;
}

.product-bottom span {
  color: var(--muted);
  font-size: 12px;
}

.product-bottom button {
  font-size: 13px;
}

dialog {
  width: calc(100% - 32px);
  max-width: 640px;
  max-height: 90vh;
  overflow: auto;
  padding: 32px;
  color: var(--ink);
  border: 1px solid var(--line);
  border-radius: 8px;
}

dialog[open] {
  animation: page-enter 0.18s ease-out;
}

dialog::backdrop {
  background: #14251a88;
}

dialog h2 {
  font-size: 28px;
}

.close {
  position: absolute;
  top: 8px;
  right: 10px;
  padding: 0 8px;
  background: #fff;
  border: 0;
  font-size: 26px;
}

.detail-image {
  width: 100%;
  height: 330px;
  object-fit: contain;
}

.dialog-actions {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  margin-top: 18px;
}

.like-row,
.cart-row {
  display: grid;
  grid-template-columns: 55px 1fr auto;
  align-items: center;
  gap: 12px;
  padding: 15px 0;
  border-bottom: 1px solid var(--line);
}

.like-row img,
.cart-row img {
  width: 55px;
  height: 55px;
  object-fit: contain;
}

.like-row strong,
.cart-row strong {
  font-size: 14px;
}

.like-row button {
  white-space: nowrap;
}

.confirm-row {
  display: grid;
  grid-template-columns: 52px 1fr auto;
  align-items: center;
  gap: 12px;
  padding: 12px 0;
  border-bottom: 1px solid var(--line);
}

.confirm-row img {
  width: 52px;
  height: 52px;
  object-fit: contain;
}

.quantity {
  display: flex;
  align-items: center;
  gap: 10px;
}

.quantity button {
  padding: 4px 9px;
}

.auth-page,
.about-page,
.account {
  min-height: 520px;
  padding: 42px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 24px;
}

.auth {
  max-width: 440px;
  margin: 0 auto;
}

.account h1,
.auth h1 {
  color: #922442;
  font-size: 38px;
}

.account-hero {
  max-width: 880px;
  margin-bottom: 34px;
}

.account-hero p {
  max-width: 690px;
  margin: 0 0 22px;
  color: var(--muted);
  font-size: 18px;
  line-height: 1.75;
}

.account-summary {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
}

.account-summary article {
  padding: 18px;
  background: #fdf9fb;
  border: 1px solid var(--line);
  border-radius: 8px;
}

.account-summary strong {
  display: block;
  margin-bottom: 5px;
  color: #922442;
  font-size: 26px;
  line-height: 1.2;
}

.account-summary span {
  color: var(--muted);
  font-size: 13px;
}

.account-layout {
  display: grid;
  grid-template-columns: 210px 1fr;
  gap: 40px;
}

aside {
  display: flex;
  flex-direction: column;
  align-items: start;
  gap: 18px;
  align-self: start;
  padding: 18px;
  background: #fdf9fb;
  border: 1px solid var(--line);
  border-radius: 8px;
}

.account section {
  margin-bottom: 30px;
  padding-bottom: 25px;
  border-bottom: 1px solid var(--line);
}

.order {
  margin: 15px 0;
  padding: 18px;
  background: #fdf9fb;
  border: 1px solid var(--line);
  border-radius: 6px;
}

.order-topline {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
}

.order-topline span {
  padding: 5px 10px;
  color: #922442;
  background: #f6e1e8;
  border-radius: 999px;
  font-size: 12px;
}

.order-items {
  margin: 14px 0;
  padding: 0;
  list-style: none;
}

.order-items li {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 8px 0;
  border-bottom: 1px solid var(--line);
}

.about-heading {
  max-width: 1120px;
  margin-right: auto;
  margin-bottom: 32px;
  margin-left: auto;
  padding-bottom: 26px;
  border-bottom: 1px solid var(--line);
}

.about-heading h1 {
  color: #922442;
}

.about-story {
  max-width: 1120px;
  margin: 0 auto;
  display: grid;
  gap: 30px;
}

.about-story p {
  margin: 0;
  color: #453b43;
  font-size: 21px;
  line-height: 1.9;
}

.story-video {
  min-width: 0;
  margin: 8px 0 12px;
}

.story-video video {
  display: block;
  width: 100%;
  aspect-ratio: 16 / 9;
  background: #f1e9f4;
  border-radius: 8px;
  object-fit: contain;
}

.story-video figcaption {
  margin-top: 12px;
  color: #8a3553;
  font-size: 15px;
  font-weight: 600;
}

.about-catalog-link {
  display: block;
  max-width: 1120px;
  margin: 28px auto 0;
  color: var(--red);
  font-weight: 600;
}

.contact-page {
  min-height: 440px;
  background: #fff url("../images/yougurt.png") right center / auto 100% no-repeat;
}

.contact-page h1 {
  max-width: 480px;
  color: #922442;
  font-size: 44px;
}

.contact-page > p {
  max-width: 430px;
  font-size: 18px;
}

#toast {
  position: fixed;
  bottom: 25px;
  left: 50%;
  z-index: 5;
  display: none;
  max-width: 90%;
  padding: 12px 20px;
  color: #fff;
  background: var(--green);
  border-radius: 6px;
  transform: translateX(-50%);
}

@keyframes page-enter {
  from {
    opacity: 0;
    transform: translateY(5px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@view-transition {
  navigation: auto;
}

::view-transition-old(root),
::view-transition-new(root) {
  animation-duration: 0.18s;
}

@media (min-width: 1450px) {
  .grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
}

@media (max-width: 1100px) {
  .contact-page {
    background-image: none;
  }
}

@media (max-width: 850px) {
  header {
    flex-wrap: wrap;
    gap: 16px;
    padding: 18px 24px;
  }

  header nav {
    display: flex;
    flex-wrap: wrap;
    gap: 14px;
  }

  header .actions {
    width: auto;
    margin-left: auto;
  }

  .grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 18px;
  }

  .catalog {
    padding: 34px 4px 44px;
  }

  .about-page,
  .account,
  .auth-page {
    padding: 30px 24px;
  }

  .about-story p {
    font-size: 20px;
  }

  .account-layout {
    grid-template-columns: 1fr;
    gap: 25px;
  }

  aside {
    flex-direction: row;
    flex-wrap: wrap;
  }

  .account-summary {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  footer {
    grid-template-columns: 1fr 1fr;
    padding: 24px;
  }

  footer > .brand {
    grid-column: 1 / -1;
  }
}

@media (max-width: 520px) {
  header,
  main,
  footer {
    width: calc(100% - 24px);
  }

  header {
    margin-top: 12px;
    gap: 14px;
    padding: 16px 20px;
    border-radius: 20px;
  }

  header .brand {
    font-size: 22px;
  }

  header nav {
    width: 100%;
    order: 3;
  }

  header .actions {
    width: 100%;
    justify-content: space-between;
    margin-left: 0;
  }

  h1 {
    font-size: 40px;
  }

  h2 {
    font-size: 24px;
  }

  .brand-banner {
    border-radius: 20px;
  }

  .shop-note {
    flex-wrap: wrap;
    justify-content: center;
    gap: 12px;
    padding: 20px 6px;
    font-size: 12px;
  }

  .section-heading {
    flex-direction: column;
    align-items: start;
  }

  .section-heading h2 {
    font-size: 28px;
  }

  .section-heading input {
    width: 100%;
  }

  .filters {
    gap: 8px;
  }

  .filters button {
    padding: 9px 13px;
    font-size: 12px;
  }

  .grid {
    gap: 14px 10px;
  }

  .product-body {
    padding: 12px;
  }

  .product h3 {
    min-height: 65px;
    font-size: 16px;
  }

  .meta {
    font-size: 10px;
  }

  .product-bottom {
    flex-direction: column;
    align-items: stretch;
  }

  .product-bottom button {
    width: 100%;
  }

  .like-row,
  .cart-row {
    grid-template-columns: 45px 1fr;
  }

  .like-row button {
    grid-column: 2;
    width: 100%;
  }

  .quantity {
    grid-column: 2;
  }

  .detail-image {
    height: 260px;
  }

  .about-page,
  .account,
  .auth-page {
    padding: 28px 20px;
    border-radius: 20px;
  }

  .about-heading {
    margin-bottom: 24px;
  }

  .about-heading h1,
  .contact-page h1 {
    font-size: 36px;
  }

  .account h1,
  .auth h1 {
    font-size: 30px;
  }

  .account-summary {
    grid-template-columns: 1fr;
  }

  .order-topline {
    align-items: start;
    flex-direction: column;
  }

  .confirm-row {
    grid-template-columns: 44px 1fr;
  }

  .confirm-row strong {
    grid-column: 2;
  }

  .about-story p {
    font-size: 18px;
    line-height: 1.85;
  }

  .contact-page {
    min-height: 390px;
  }

  .contact-page > p {
    font-size: 16px;
  }

  footer {
    grid-template-columns: 1fr;
    gap: 20px;
    padding: 22px 20px;
    border-radius: 20px;
  }

  footer > .brand {
    grid-column: auto;
  }

  .copyright {
    grid-column: 1 / -1;
  }

  dialog {
    padding: 24px;
  }

  dialog h2 {
    font-size: 25px;
  }

  .dialog-actions {
    grid-template-columns: 1fr;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    animation: none !important;
    transition: none !important;
  }

  ::view-transition-old(root),
  ::view-transition-new(root) {
    animation: none;
  }
}
