
/* ROAST. COFFEE STORE */

:root {
  --cream: #f6f0e5;
  --paper: #fffcf5;
  --brown: #32251e;
  --muted: #82756b;
  --orange: #d96639;
  --line: #dfd3c4;
}

* {
  box-sizing: border-box;
}

[hidden] {
  display: none !important;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--cream);
  color: var(--brown);
  font-family: "Segoe UI", Arial, sans-serif;
  line-height: 1.5;
}

body.locked {
  overflow: hidden;
}

a {
  color: inherit;
  text-decoration: none;
}

button,
input,
select,
textarea {
  font: inherit;
}

button {
  cursor: pointer;
}

button:disabled {
  cursor: not-allowed;
  opacity: 0.5;
}

.container {
  width: min(1220px, 90%);
  margin: auto;
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}

a:focus-visible,
button:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible,
summary:focus-visible {
  outline: 3px solid var(--orange);
  outline-offset: 3px;
}

/* HEADER */

.header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(246, 240, 229, 0.97);
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(12px);
}

.header-inner {
  min-height: 84px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 25px;
}

.logo,
.footer-logo {
  font-size: 32px;
  font-weight: 950;
  letter-spacing: -2px;
}

.logo span,
.footer-logo span {
  color: var(--orange);
}

.header nav {
  display: flex;
  gap: 32px;
}

.header nav a {
  font-size: 14px;
  font-weight: 700;
}

.header nav a:hover {
  color: var(--orange);
}

.cart-open {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 11px 16px;
  background: transparent;
  border: 1px solid var(--brown);
  font-weight: 700;
}

.cart-open span {
  display: grid;
  place-items: center;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: var(--brown);
  color: white;
  font-size: 12px;
}

/* HERO */

.hero {
  overflow: hidden;
  border-bottom: 1px solid var(--line);
}

.hero-grid {
  min-height: 650px;
  display: grid;
  grid-template-columns: 1fr 1fr;
}

.hero-content {
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 75px 35px 55px 0;
}

.eyebrow {
  color: var(--orange);
  font-size: 11px;
  letter-spacing: 2px;
  font-weight: 900;
}

h1,
h2 {
  font-family: Impact, "Arial Narrow", Arial, sans-serif;
  line-height: 1.04;
  letter-spacing: -1px;
}

.hero h1 {
  font-size: clamp(72px, 8vw, 120px);
  margin: 27px 0;
}

h1 em,
h2 em {
  color: var(--orange);
  font-style: normal;
}

.hero-content > p {
  max-width: 440px;
  font-size: 17px;
  color: var(--muted);
  line-height: 1.9;
  margin-bottom: 30px;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 30px;
  padding: 17px 24px;
  border: 1px solid var(--brown);
  font-weight: 800;
  font-size: 14px;
  transition: 0.2s ease;
}

.button-dark {
  background: var(--brown);
  color: white;
}

.button-dark:hover:not(:disabled) {
  background: var(--orange);
  border-color: var(--orange);
  transform: translateY(-2px);
}

.hero-content .button {
  align-self: flex-start;
}

.hero-note {
  margin-top: 65px;
  display: flex;
  justify-content: space-between;
  gap: 15px;
  color: var(--muted);
  font-size: 10px;
  letter-spacing: 1.5px;
}

.hero-art {
  position: relative;
  display: flex;
  justify-content: center;
  align-items: center;
  min-height: 650px;
  background: #dcb78a;
  overflow: hidden;
  isolation: isolate;
}

.hero-circle {
  position: absolute;
  width: 600px;
  height: 600px;
  border: 1px solid #ffffff80;
  border-radius: 50%;
  box-shadow:
    0 0 0 80px #ffffff18,
    0 0 0 160px #ffffff13;
}

.hero-stamp {
  position: absolute;
  top: 35px;
  right: 30px;
  font-size: 10px;
  font-weight: 900;
  letter-spacing: 2px;
  writing-mode: vertical-rl;
}

.hero-art-caption {
  position: absolute;
  bottom: 30px;
  left: 30px;
  font-size: 11px;
  letter-spacing: 2px;
  font-weight: 800;
}

/* CSS КОФЕЙНАЯ УПАКОВКА */

.coffee-bag {
  --bag: #543226;
  --ink: #f4ddab;

  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: space-between;

  width: 165px;
  height: 225px;
  padding: 22px 12px 20px;

  background: var(--bag);
  color: var(--ink);
  text-align: center;

  border-radius: 7px 7px 12px 12px;
  box-shadow:
    inset 9px 0 15px #00000018,
    inset -9px 0 15px #00000018,
    12px 22px 28px #00000025;

  clip-path: polygon(
    5% 0%, 95% 0%,
    100% 8%, 98% 100%,
    2% 100%, 0% 8%
  );

  transition: transform 0.35s ease;
}

.bag-top {
  position: absolute;
  top: 12px;
  left: 10%;
  width: 80%;
  border-top: 2px solid currentColor;
  opacity: 0.3;
}

.bag-brand {
  font-size: 21px;
  font-weight: 950;
  letter-spacing: -1px;
}

.bag-symbol {
  font-size: 57px;
  line-height: 1;
}

.bag-name {
  font-family: Impact, Arial, sans-serif;
  font-size: 24px;
  line-height: 1.05;
  letter-spacing: 0.2px;
}

.bag-bottom {
  font-size: 7px;
  font-weight: 800;
  letter-spacing: 1.2px;
}

.hero-bag {
  z-index: 1;
  width: 290px;
  height: 400px;
  padding: 48px 25px 35px;
  transform: rotate(-8deg);
}

.hero-bag .bag-brand {
  font-size: 37px;
}

.hero-bag .bag-symbol {
  font-size: 110px;
}

.hero-bag .bag-name {
  font-size: 45px;
}

.hero-bag .bag-bottom {
  font-size: 10px;
}

/* TICKER */

.ticker {
  background: var(--brown);
  color: var(--cream);
}

.ticker-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  min-height: 64px;
  gap: 15px;
  padding: 12px 0;
}

.ticker span {
  font-size: 11px;
  font-weight: 900;
  letter-spacing: 2px;
}

.ticker b {
  color: var(--orange);
  font-size: 25px;
}

/* CATALOG */

.section {
  padding: 105px 0;
  scroll-margin-top: 100px;
}

.section-heading {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 35px;
  margin-bottom: 55px;
}

.section-heading h2,
.about-section h2,
.faq-section h2 {
  font-size: clamp(52px, 6.5vw, 88px);
  margin: 18px 0 0;
}

.section-heading > p {
  max-width: 320px;
  color: var(--muted);
  line-height: 1.9;
}

.catalog-controls {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 20px;
  padding: 24px 0;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.filters {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.filter {
  border: 1px solid var(--line);
  background: transparent;
  padding: 11px 15px;
  color: var(--brown);
  font-size: 13px;
}

.filter:hover,
.filter.active {
  background: var(--brown);
  border-color: var(--brown);
  color: white;
}

.search-sort {
  display: flex;
  gap: 10px;
}

.search-sort input,
.search-sort select {
  min-width: 0;
  padding: 11px 12px;
  border: 1px solid var(--line);
  background: var(--paper);
  color: var(--brown);
  font-size: 13px;
}

.search-sort input {
  width: 175px;
}

.results-count {
  margin: 22px 0;
  font-size: 13px;
  color: var(--muted);
}

/* PRODUCT CARDS */

.product-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 30px 18px;
}

.product-card {
  min-width: 0;
}

.product-visual {
  position: relative;
  height: 310px;
  display: grid;
  place-items: center;
  background: var(--tile, #e5d2b9);
  overflow: hidden;
}

.product-visual::before {
  content: "";
  position: absolute;
  width: 260px;
  height: 260px;
  border: 1px solid #ffffff70;
  border-radius: 50%;
}

.product-card:hover .coffee-bag {
  transform: translateY(-9px) rotate(-3deg);
}

.product-label {
  position: absolute;
  top: 15px;
  left: 15px;
  background: var(--paper);
  color: var(--brown);
  padding: 6px 10px;
  font-size: 10px;
  font-weight: 800;
  z-index: 1;
}

.product-info {
  padding: 18px 0;
}

.product-origin {
  display: block;
  color: var(--orange);
  font-weight: 800;
  font-size: 10px;
  letter-spacing: 1.5px;
  text-transform: uppercase;
}

.product-info h3 {
  font-size: 20px;
  line-height: 1.3;
  margin: 9px 0;
}

.product-info p {
  font-size: 13px;
  color: var(--muted);
  min-height: 40px;
  margin: 0 0 18px;
}

.product-bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.product-bottom strong {
  font-size: 21px;
}

.add-button {
  background: var(--brown);
  color: white;
  border: none;
  padding: 11px 14px;
  font-weight: 700;
  font-size: 12px;
}

.add-button:hover {
  background: var(--orange);
}

.empty-results {
  grid-column: 1 / -1;
  padding: 80px 20px;
  text-align: center;
  border: 1px solid var(--line);
}

.empty-results h3 {
  font-size: 25px;
}

.catalog-disclaimer {
  margin-top: 45px;
  color: var(--muted);
  font-size: 12px;
}

/* ABOUT */

.about-section {
  padding: 105px 0;
  background: #d7b88f;
  scroll-margin-top: 100px;
}

.about-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  align-items: center;
  gap: 100px;
}

.about-section .eyebrow {
  color: #71402d;
}

.about-section h2 {
  font-size: clamp(52px, 6vw, 85px);
}

.about-section h2 em {
  color: #fff5df;
}

.about-copy > p {
  max-width: 500px;
  line-height: 2;
  font-size: 17px;
}

.about-features {
  margin-top: 35px;
  border-top: 1px solid #987957;
}

.about-features > div {
  display: flex;
  gap: 25px;
  border-bottom: 1px solid #987957;
  padding: 16px 0;
}

.about-features strong {
  color: #fff5df;
}

.about-features span {
  font-size: 14px;
  font-weight: 700;
}

/* FAQ */

.faq-grid {
  display: grid;
  grid-template-columns: 0.8fr 1.2fr;
  gap: 70px;
}

.faq-section h2 {
  font-size: clamp(43px, 5vw, 70px);
}

.faq-items {
  border-top: 1px solid var(--line);
}

.faq-items details {
  border-bottom: 1px solid var(--line);
}

.faq-items summary {
  cursor: pointer;
  padding: 24px 5px;
  font-weight: 800;
}

.faq-items details p {
  color: var(--muted);
  line-height: 1.8;
  margin: 0;
  padding: 0 5px 25px;
}

/* FOOTER */

.footer {
  padding: 50px 0;
  background: var(--brown);
  color: var(--cream);
}

.footer-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 25px;
}

.footer p {
  font-size: 12px;
  color: #bcae9e;
}

.footer a {
  font-size: 13px;
}

/* CART DRAWER */

.overlay {
  position: fixed;
  inset: 0;
  z-index: 80;
  background: #160e0acc;
}

.cart-drawer {
  position: fixed;
  top: 0;
  right: 0;
  bottom: 0;
  z-index: 90;

  width: min(490px, 100%);
  background: var(--paper);
  box-shadow: -20px 0 40px #00000022;

  display: flex;
  flex-direction: column;
  transform: translateX(105%);
  transition: transform 0.3s ease;
  visibility: hidden;
}

.cart-drawer.open {
  transform: translateX(0);
  visibility: visible;
}

.cart-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 15px;
  border-bottom: 1px solid var(--line);
  padding: 28px;
}

.cart-header h2 {
  font-size: 30px;
  margin: 0;
}

.cart-header button,
.dialog-head button {
  border: 0;
  background: transparent;
  color: var(--brown);
  font-size: 22px;
}

.cart-items {
  flex: 1;
  overflow-y: auto;
  padding: 22px 28px;
}

.cart-empty {
  text-align: center;
  padding: 75px 15px;
  color: var(--muted);
}

.cart-item {
  display: grid;
  grid-template-columns: 70px 1fr;
  gap: 16px;
  padding: 20px 0;
  border-bottom: 1px solid var(--line);
}

.cart-item-color {
  height: 85px;
  background: var(--item-color);
  border-radius: 4px;
  display: grid;
  place-items: center;
  font-weight: 900;
  color: #ffffff;
  letter-spacing: -1px;
}

.cart-item-info {
  min-width: 0;
}

.cart-item-info h3 {
  font-size: 15px;
  margin: 0 0 5px;
}

.cart-item-info p {
  color: var(--muted);
  font-size: 12px;
  margin: 0 0 10px;
}

.cart-item-actions {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 9px;
}

.cart-item-actions button {
  width: 29px;
  height: 29px;
  background: transparent;
  border: 1px solid var(--line);
}

.cart-item-actions .remove-button {
  width: auto;
  padding: 0 8px;
  font-size: 12px;
  color: var(--muted);
}

.cart-footer {
  border-top: 1px solid var(--line);
  padding: 25px 28px 30px;
}

.cart-line {
  display: flex;
  justify-content: space-between;
  gap: 15px;
  margin: 10px 0;
  font-size: 14px;
}

.cart-total {
  padding-top: 17px;
  border-top: 1px solid var(--line);
  font-size: 20px;
  font-weight: 900;
}

.shipping-message {
  color: var(--orange);
  font-size: 12px;
}

.checkout-button {
  width: 100%;
  margin: 20px 0 13px;
}

.cart-footer small {
  display: block;
  color: var(--muted);
  font-size: 11px;
}

/* ORDER DIALOG */

.order-dialog {
  width: min(580px, 94vw);
  max-height: 90vh;
  overflow-y: auto;
  padding: 30px;
  border: 1px solid var(--line);
  background: var(--paper);
  color: var(--brown);
}

.order-dialog::backdrop {
  background: #160e0add;
}

.dialog-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.dialog-head h2 {
  font-size: 38px;
  margin: 0;
}

.order-dialog > p {
  font-size: 13px;
  color: var(--muted);
}

.order-dialog label {
  display: block;
  font-weight: 800;
  margin-bottom: 9px;
}

.order-dialog textarea {
  width: 100%;
  min-height: 220px;
  resize: vertical;
  padding: 14px;
  border: 1px solid var(--line);
  background: white;
  color: var(--brown);
  margin-bottom: 15px;
}

.order-dialog .button {
  width: 100%;
}

#copyStatus {
  color: var(--orange);
}

/* TOAST */

.toast {
  position: fixed;
  bottom: 24px;
  left: 50%;
  z-index: 120;

  background: var(--brown);
  color: white;
  padding: 13px 20px;
  font-size: 13px;

  opacity: 0;
  pointer-events: none;
  transform: translate(-50%, 20px);
  transition: 0.25s;
}

.toast.visible {
  opacity: 1;
  transform: translate(-50%, 0);
}

/* TABLET */

@media (max-width: 1100px) {
  .product-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .about-grid {
    gap: 45px;
  }
}

@media (max-width: 850px) {
  .hero-grid,
  .about-grid,
  .faq-grid {
    grid-template-columns: 1fr;
  }

  .hero-content {
    padding: 70px 0;
  }

  .hero-art {
    min-height: 480px;
  }

  .section-heading {
    align-items: start;
    flex-direction: column;
    gap: 10px;
  }

  .product-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .faq-grid {
    gap: 30px;
  }
}

/* MOBILE */

@media (max-width: 600px) {
  .container {
    width: 92%;
  }

  .header-inner {
    min-height: 72px;
  }

  .header nav {
    display: none;
  }

  .logo {
    font-size: 27px;
  }

  .hero h1 {
    font-size: clamp(58px, 12vw, 85px);
  }

  .hero-art {
    min-height: 430px;
  }

  .hero-bag {
    width: 220px;
    height: 315px;
  }

  .hero-bag .bag-brand {
    font-size: 29px;
  }

  .hero-bag .bag-symbol {
    font-size: 80px;
  }

  .hero-bag .bag-name {
    font-size: 34px;
  }

  .hero-circle {
    width: 390px;
    height: 390px;
  }

  .hero-note {
    margin-top: 45px;
  }

  .section,
  .about-section {
    padding: 75px 0;
  }

  .section-heading h2,
  .about-section h2 {
    font-size: 55px;
  }

  .catalog-controls {
    align-items: stretch;
  }

  .search-sort {
    width: 100%;
  }

  .search-sort input,
  .search-sort select {
    flex: 1;
    width: 50%;
  }

  .product-grid {
    gap: 25px 12px;
  }

  .product-visual {
    height: 245px;
  }

  .product-visual .coffee-bag {
    transform: scale(0.8);
  }

  .product-card:hover .coffee-bag {
    transform: scale(0.8) translateY(-7px);
  }

  .product-info h3 {
    font-size: 16px;
  }

  .product-info p {
    font-size: 12px;
    min-height: 55px;
  }

  .product-bottom {
    align-items: flex-start;
    flex-direction: column;
  }

  .product-bottom strong {
    font-size: 19px;
  }

  .add-button {
    width: 100%;
  }

  .about-grid {
    gap: 15px;
  }

  .footer-inner {
    flex-direction: column;
    align-items: flex-start;
  }
}

@media (max-width: 370px) {
  .product-grid {
    grid-template-columns: 1fr;
  }

  .product-visual {
    height: 310px;
  }

  .product-visual .coffee-bag {
    transform: none;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
  }
}
