:root {
  --navy: #14233d;
  --navy-2: #1c3258;
  --gold: #c5a059;
  --gold-2: #d4b36e;
  --cream: #f4efe6;
  --paper: #e8e6e2;
  --card: #fffcf7;
  --ink: #14233d;
  --muted: #5c6573;
  --line: #e4d8c4;
  --red: #b71c1c;
  --ok: #3d6b4f;
  --no: #9a3b32;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  color: var(--ink);
  font-family: "Segoe UI", Arial, sans-serif;
  background-color: var(--paper);
}

img {
  max-width: 100%;
  display: block;
}

a {
  color: inherit;
  text-decoration: none;
}

button,
input,
select {
  font: inherit;
}

.wrap {
  width: min(1680px, calc(100% - 28px));
  margin: 0 auto;
}

.header-facts a,
.contact-list a,
.site-footer a {
  color: inherit;
  text-decoration: none;
}

.header-facts a:hover,
.contact-list a:hover,
.site-footer a:hover {
  color: var(--gold);
}

.site-header {
  position: relative;
  overflow: hidden;
  background: var(--cream);
  color: var(--ink);
  border-bottom: 1px solid var(--gold);
  box-shadow: inset 0 4px 0 var(--navy);
}

.header-flourish {
  position: absolute;
  top: 0;
  left: 0;
  width: 118px;
  height: 86px;
  background:
    linear-gradient(135deg, var(--gold) 0 10px, transparent 10px),
    linear-gradient(135deg, var(--navy) 0 100%);
  clip-path: polygon(0 0, 100% 0, 0 100%);
  pointer-events: none;
}

.header-inner {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 18px 0 16px;
}

.logo {
  display: flex;
  align-items: center;
  gap: 16px;
  min-width: 0;
}

.logo-mark {
  width: 58px;
  height: 68px;
  flex: none;
  display: block;
}

.logo-mark svg {
  width: 100%;
  height: 100%;
  display: block;
}

.logo-text {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.site-title {
  margin: 0;
  font-family: "Playfair Display", Georgia, "Times New Roman", serif;
  font-size: 30px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  line-height: 1.1;
  color: var(--navy);
  text-shadow: 0.6px 0.6px 0 var(--gold);
}

.logo-text em {
  font-style: normal;
  font-size: 13px;
  letter-spacing: 0.04em;
  color: var(--muted);
}

.logo-text em .dot {
  color: var(--red);
  padding: 0 4px;
  font-weight: 700;
}

.header-facts {
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: flex-end;
  gap: 0;
  margin: 0;
  padding: 0 0 0 16px;
  list-style: none;
  min-width: 0;
  flex: 1 1 auto;
  border-left: 1px solid var(--gold);
}

.header-facts li {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 4px 16px;
  border-right: 1px solid var(--gold);
  min-width: 0;
}

.header-facts li:last-child {
  border-right: 0;
  padding-right: 0;
}

.contact-list li {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 8px 0;
  border-bottom: 1px solid var(--gold);
}

.contact-list li:last-child {
  border-bottom: 0;
}

.contact-icon {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: var(--navy);
  box-shadow: 0 0 0 2px var(--gold);
  display: grid;
  place-items: center;
  flex: none;
}

.contact-icon svg {
  width: 16px;
  height: 16px;
  fill: var(--gold);
}

.contact-text {
  min-width: 0;
  font-size: 14px;
  line-height: 1.3;
}

.contact-text span {
  display: block;
  color: var(--muted);
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.main-nav {
  background: var(--navy);
  border-bottom: 3px solid var(--gold);
}

.nav-inner {
  display: flex;
  width: 100%;
}

.nav-inner a {
  flex: 1;
  color: var(--cream);
  padding: 12px 8px;
  font-size: 13px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  text-align: center;
}

.nav-inner a:hover {
  color: var(--gold);
  background: rgba(255, 255, 255, 0.04);
}

.layout {
  display: grid;
  grid-template-columns: 200px minmax(0, 1fr) 200px;
  gap: 14px;
  padding: 14px 0 36px;
  align-items: start;
}

.side,
.banner,
.catalog,
.about,
.info-box,
.card {
  background: var(--card);
  border: 1px solid var(--line);
}

.side {
  padding: 0;
}

.side h2,
.catalog-head h2,
.about h2 {
  margin: 0;
  padding: 11px 14px;
  background: var(--navy);
  color: var(--cream);
  font-size: 15px;
  font-weight: 700;
  font-family: "Playfair Display", Georgia, "Times New Roman", serif;
  letter-spacing: 0.06em;
  border-bottom: 2px solid var(--gold);
}

.cat-menu a,
.cat-menu button {
  display: block;
  width: 100%;
  text-align: left;
  border: 0;
  border-top: 1px solid #efe6d6;
  background: transparent;
  color: var(--ink);
  padding: 10px 14px;
  cursor: pointer;
  font-size: 14px;
}

.cat-menu a:hover,
.cat-menu button:hover,
.cat-menu a.active,
.cat-menu button.active {
  background: #efe7d6;
  color: var(--navy);
}

.cat-menu button.active {
  box-shadow: inset 3px 0 0 var(--gold);
}

.cat-menu small {
  display: block;
  color: var(--muted);
  font-size: 11px;
  margin-top: 2px;
}

.banner {
  position: relative;
  overflow: hidden;
  padding: 26px 28px 24px;
  background: var(--cream);
  border-top: 3px solid var(--gold);
}

.banner-kicker {
  margin: 0 0 8px;
  color: var(--gold);
  font-size: 12px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.banner p {
  margin: 0;
  max-width: 58ch;
  color: var(--muted);
  line-height: 1.55;
}

.catalog,
.about {
  margin-top: 16px;
}

.catalog-head {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: baseline;
  background: var(--navy);
  color: var(--cream);
}

.catalog-head p {
  margin: 0;
  padding-right: 14px;
  font-size: 12px;
  color: var(--gold-2);
}

.grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1px;
  padding: 1px;
  background: var(--line);
}

.card {
  border: 0;
  padding: 10px;
  cursor: pointer;
  text-align: left;
  color: inherit;
  min-height: 0;
  display: flex;
  flex-direction: column;
  background: var(--card);
}

.card:hover h3 {
  color: var(--gold);
}

.card h3 {
  margin: 0 0 8px;
  min-height: 0;
  font-size: 13px;
  font-weight: 700;
  line-height: 1.3;
  font-family: "Playfair Display", Georgia, "Times New Roman", serif;
}

.thumb {
  aspect-ratio: 3 / 4;
  height: auto;
  min-height: 0;
  background: var(--cream);
  border: 1px solid var(--line);
  display: grid;
  place-items: center;
  color: var(--muted);
  font-size: 12px;
  overflow: hidden;
}

.thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center center;
}

.meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
  margin-top: 12px;
}

.price {
  color: var(--navy);
  font-weight: 700;
  font-size: 15px;
}

.stock {
  font-size: 11px;
  padding: 5px 8px;
  border: 1px solid currentColor;
}

.stock.in {
  color: var(--ok);
}

.stock.out {
  color: var(--no);
}

.badge {
  display: inline-block;
  margin-bottom: 8px;
  font-size: 10px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--gold);
}

.empty {
  padding: 28px 16px;
  color: var(--muted);
}

.about {
  padding-bottom: 8px;
}

.about p,
.about-list {
  padding: 0 16px;
  color: var(--muted);
  line-height: 1.55;
}

.about-list {
  margin: 0 0 16px;
  padding-left: 34px;
}

.about-list li::marker {
  color: var(--red);
}

.right-side {
  padding-bottom: 14px;
}

.right-side input,
.right-side select,
.reset {
  display: block;
  width: calc(100% - 24px);
  margin: 10px 12px 0;
  border: 1px solid var(--line);
  background: #fff;
  padding: 9px 10px;
}

.right-side input:focus,
.right-side select:focus {
  outline: 2px solid var(--gold);
  outline-offset: 1px;
}

.reset {
  margin-top: 10px;
  background: var(--navy);
  color: var(--cream);
  border-color: var(--gold);
  cursor: pointer;
}

.reset:hover {
  color: var(--gold);
}

.info-box {
  margin: 12px;
  padding: 4px 12px 8px;
  font-size: 13px;
  color: var(--muted);
  line-height: 1.45;
}

.contact-list {
  margin: 0;
  padding: 0;
  list-style: none;
}

.site-footer {
  background: var(--cream);
  color: var(--muted);
  padding: 0;
  border-top: 1px solid var(--gold);
  box-shadow: inset 0 4px 0 var(--navy);
}

.footer-inner {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  font-size: 13px;
  padding: 22px 0 24px;
}

.footer-inner strong {
  display: block;
  color: var(--navy);
  font-family: "Playfair Display", Georgia, "Times New Roman", serif;
  font-size: 18px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  margin-bottom: 6px;
}

.footer-inner p {
  margin: 0;
}

.footer-stripes {
  height: 14px;
  background: repeating-linear-gradient(
    -45deg,
    var(--navy) 0 11px,
    var(--red) 11px 22px,
    var(--cream) 22px 33px
  );
}

.modal {
  position: fixed;
  inset: 0;
  background: rgba(20, 35, 61, 0.48);
  display: none;
  place-items: center;
  padding: 20px;
  z-index: 40;
}

.modal.open {
  display: grid;
}

.modal-card {
  width: min(760px, 100%);
  background: var(--card);
  border: 1px solid var(--gold);
  display: grid;
  grid-template-columns: 1fr 1.1fr;
}

.modal-photo {
  min-height: 280px;
  background: var(--cream);
  display: grid;
  place-items: center;
  color: var(--muted);
}

.modal-photo img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.modal-body {
  padding: 22px;
}

.modal-cat {
  margin: 0 0 6px;
  color: var(--gold);
  font-size: 12px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.modal-body h3 {
  margin: 0 0 10px;
  font-family: "Playfair Display", Georgia, "Times New Roman", serif;
  font-size: 24px;
}

.modal-body p {
  color: var(--muted);
  line-height: 1.5;
}

.close {
  float: right;
  border: 0;
  background: transparent;
  font-size: 22px;
  cursor: pointer;
  color: var(--muted);
}

@media (min-width: 1540px) {
  .grid {
    grid-template-columns: repeat(5, 1fr);
  }
}

@media (max-width: 1280px) {
  .layout {
    grid-template-columns: 180px minmax(0, 1fr) 180px;
  }

  .grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

@media (max-width: 960px) {
  .layout,
  .header-inner,
  .modal-card,
  .footer-inner,
  .catalog-head {
    display: block;
  }

  .header-facts {
    justify-content: flex-start;
    flex-wrap: wrap;
    margin-top: 14px;
    padding-left: 0;
    border-left: 0;
    border-top: 1px solid var(--gold);
  }

  .header-facts li {
    padding: 10px 16px 10px 0;
  }

  .grid {
    grid-template-columns: 1fr 1fr;
  }

  .nav-inner a {
    flex: 1 0 auto;
    white-space: nowrap;
    padding: 11px 14px;
  }

  .nav-inner {
    overflow-x: auto;
  }
}

@media (max-width: 640px) {
  .grid {
    grid-template-columns: 1fr;
    display: block;
    background: transparent;
    gap: 0;
    padding: 0;
  }

  .header-facts {
    flex-direction: column;
    align-items: stretch;
  }

  .header-facts li {
    border-right: 0;
    border-bottom: 1px solid var(--gold);
    padding: 8px 0;
  }

  .site-title {
    font-size: 22px;
    letter-spacing: 0.05em;
  }

  .card {
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }
}
