﻿:root {
  --bg: #f6f2ea;
  --paper: #fffdf8;
  --text: #1f1b16;
  --muted: #6e6256;
  --line: #d8cfc2;
  --accent: #b77936;
  --accent-dark: #7a4f1e;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: "Trebuchet MS", "Segoe UI", Arial, sans-serif;
  color: var(--text);
  background:
    radial-gradient(circle at 8% 12%, #e9dccb 0, transparent 32%),
    radial-gradient(circle at 92% 8%, #ead8c1 0, transparent 28%),
    var(--bg);
}

.container {
  width: min(1160px, 92%);
  margin: 0 auto;
}

nav {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 18px 0;
}

.logo {
  font-size: 28px;
  font-weight: 700;
  letter-spacing: 0.6px;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 12px;
}

nav a {
  color: var(--text);
  text-decoration: none;
  font-size: 14px;
  border-bottom: 1px solid transparent;
}

nav a:hover {
  border-bottom-color: var(--accent-dark);
}

.cart-open {
  border: 1px solid var(--accent-dark);
  background: var(--accent-dark);
  color: #fff;
  border-radius: 999px;
  padding: 8px 14px;
  cursor: pointer;
}

.about-link {
  display: inline-block;
  margin-top: 16px;
  color: var(--accent-dark);
  text-decoration-thickness: 1px;
}

.products {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  gap: 14px;
  padding-bottom: 14px;
}

.card {
  border: 1px solid var(--line);
  background: var(--paper);
  border-radius: 14px;
  overflow: hidden;
  box-shadow: 0 10px 20px rgba(72, 49, 23, 0.07);
}

.card:nth-child(1) {
  grid-column: span 6;
}

.card:nth-child(2),
.card:nth-child(3) {
  grid-column: span 3;
}

.card:nth-child(4),
.card:nth-child(5) {
  grid-column: span 6;
}

.card img {
  width: 100%;
  height: 230px;
  object-fit: cover;
  display: block;
}

.card-body {
  padding: 14px;
}

.card h3 {
  margin: 0 0 6px;
  font-size: 18px;
}

.card .meta {
  margin: 0 0 8px;
  color: var(--muted);
  font-size: 14px;
  min-height: 38px;
}

.price {
  margin: 0 0 10px;
  font-size: 18px;
  font-weight: 700;
  color: var(--accent-dark);
}

.buy-btn {
  width: 100%;
  border: 1px solid var(--accent-dark);
  background: var(--accent);
  color: #fff;
  border-radius: 8px;
  padding: 10px 12px;
  font-weight: 600;
  cursor: pointer;
}

footer {
  margin-top: 26px;
  padding: 18px 0 26px;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 14px;
}

.modal {
  position: fixed;
  inset: 0;
  background: rgba(38, 27, 16, 0.5);
  display: none;
  align-items: center;
  justify-content: center;
  padding: 16px;
  z-index: 50;
}

.modal.open {
  display: flex;
}

.modal-card {
  width: min(760px, 100%);
  max-height: 92vh;
  overflow: auto;
  background: #fff;
  border-radius: 12px;
  border: 1px solid var(--line);
  padding: 16px;
}

.modal-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 12px;
}

.modal-head h2 {
  margin: 0;
  font-size: 26px;
}

.close-modal {
  border: 1px solid var(--line);
  background: #fff;
  border-radius: 8px;
  padding: 7px 11px;
  cursor: pointer;
}

#cart-items {
  margin: 0 0 12px;
  padding-left: 18px;
}

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

.qty-controls {
  display: flex;
  gap: 6px;
}

.qty-controls button {
  border: 1px solid var(--line);
  background: #fff;
  border-radius: 6px;
  padding: 3px 8px;
  cursor: pointer;
}

.total {
  font-weight: 700;
  margin: 8px 0 14px;
}

.order-form {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.order-form .full {
  grid-column: 1 / -1;
}

.order-form input,
.order-form textarea {
  width: 100%;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  font: inherit;
}

.order-form textarea {
  min-height: 92px;
  resize: vertical;
}

.order-submit {
  border: 1px solid var(--accent-dark);
  border-radius: 8px;
  background: var(--accent-dark);
  color: #fff;
  padding: 11px 14px;
  cursor: pointer;
}

.form-note {
  color: var(--muted);
  font-size: 13px;
  margin: 6px 0 0;
}

@media (max-width: 920px) {

  .card:nth-child(1),
  .card:nth-child(2),
  .card:nth-child(3),
  .card:nth-child(4),
  .card:nth-child(5) {
    grid-column: span 6;
  }
}

@media (max-width: 700px) {
  nav {
    flex-direction: column;
    align-items: flex-start;
    gap: 8px;
  }

  .products {
    grid-template-columns: 1fr;
  }

  .card:nth-child(n) {
    grid-column: auto;
  }

  .order-form {
    grid-template-columns: 1fr;
  }
}

/* Global responsive patch */
@media (max-width: 1024px) {
  .container { width: min(100%, 94%); }
  
  .card img { height: 210px; }
}

@media (max-width: 860px) {
  nav {
    flex-direction: column;
    align-items: flex-start;
    gap: 10px;
  }

  .nav-links {
    width: 100%;
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
  }

  .modal {
    padding: 10px;
  }

  .modal-card {
    width: 100%;
    max-height: 94vh;
    padding: 14px;
  }

  .order-form {
    grid-template-columns: 1fr;
  }

  .order-form .full {
    grid-column: auto;
  }
}

@media (max-width: 680px) {
  .products {
    grid-template-columns: 1fr !important;
    gap: 12px;
    columns: 1 !important;
    display: grid !important;
    overflow: visible !important;
    scroll-snap-type: none !important;
  }

  .card,
  .card:nth-child(n) {
    grid-column: auto !important;
    min-width: 0 !important;
    transform: none !important;
    margin: 0 !important;
  }

  .card img {
    height: 190px !important;
  }

  .modal-head {
    align-items: flex-start;
    gap: 10px;
  }

  .modal-head h2 {
    font-size: 22px;
  }

  .cart-row {
    align-items: flex-start;
    flex-direction: column;
  }
}

@media (max-width: 420px) {
  .logo { font-size: 22px; }
  nav a { font-size: 13px; }
  .cart-open { padding: 7px 11px; }
  
  .card-body { padding: 10px; }
  .card h3 { font-size: 16px; }
  .price { font-size: 16px; }
  .buy-btn, .order-submit { padding: 9px 10px; }
}

.hero-sand{padding:24px 0 20px;display:grid;grid-template-columns:1fr auto;gap:14px;align-items:end}.hero-kicker{margin:0 0 8px;color:var(--accent-dark);font-weight:700;letter-spacing:.8px}.hero-sand h1{margin:0 0 10px;font-size:clamp(30px,5vw,54px)}.hero-sand p{margin:0;color:var(--muted)}.hero-sand-note{padding:10px 14px;border:1px solid var(--line);border-radius:999px;background:#f3e8d8;font-weight:600;color:var(--accent-dark)}@media (max-width:840px){.hero-sand{grid-template-columns:1fr}}

/* about-site4-start */
.about4-wrap{padding:26px 0 14px;display:grid;grid-template-columns:1fr auto;gap:14px;align-items:end;animation:a4Fade .75s ease both}
.about4-kicker{margin:0 0 8px;color:var(--accent-dark);font-size:12px;letter-spacing:.9px}
.about4-wrap h1{margin:0 0 10px;font-size:clamp(30px,5vw,54px)}
.about4-wrap p{margin:0;color:var(--muted)}
.about4-note{padding:10px 14px;border:1px solid var(--line);border-radius:999px;background:#f3e8d8;color:var(--accent-dark);font-weight:600;animation:a4Float 2.2s ease-in-out infinite}
.about4-cards{display:grid;grid-template-columns:repeat(3,1fr);gap:12px;padding-bottom:10px}
.about4-cards article{border:1px solid var(--line);border-radius:12px;padding:14px;background:var(--paper);animation:a4Fade .7s ease both}
.about4-cards article:nth-child(2){animation-delay:.12s}.about4-cards article:nth-child(3){animation-delay:.24s}
.about4-cards h3{margin:0 0 8px}
@keyframes a4Fade{from{opacity:0;transform:translateY(16px)}to{opacity:1;transform:none}}
@keyframes a4Float{0%,100%{transform:translateY(0)}50%{transform:translateY(-4px)}}
@media (max-width:900px){.about4-wrap{grid-template-columns:1fr}.about4-cards{grid-template-columns:1fr}}
/* about-site4-end */

/* main-anim-start */
section[class^="hero-"] {
  animation: mainHeroIn .82s cubic-bezier(.2,.7,.2,1) both;
}

.products .card {
  opacity: 0;
  transform: translateY(22px) scale(.99);
  animation: mainCardIn .68s ease forwards;
}

.products .card:nth-child(1) { animation-delay: .08s; }
.products .card:nth-child(2) { animation-delay: .16s; }
.products .card:nth-child(3) { animation-delay: .24s; }
.products .card:nth-child(4) { animation-delay: .32s; }
.products .card:nth-child(5) { animation-delay: .40s; }

.products .card {
  transition: transform .24s ease, box-shadow .24s ease;
}

.products .card:hover {
  transform: translateY(-4px);
  box-shadow: 0 14px 28px rgba(0,0,0,.14);
}

footer {
  animation: mainFooterIn .75s ease .35s both;
}

@keyframes mainHeroIn {
  from { opacity: 0; transform: translateY(14px); }
  to { opacity: 1; transform: none; }
}

@keyframes mainCardIn {
  from { opacity: 0; transform: translateY(22px) scale(.99); }
  to { opacity: 1; transform: none; }
}

@keyframes mainFooterIn {
  from { opacity: 0; transform: translateY(12px); }
  to { opacity: 1; transform: none; }
}

@media (max-width: 700px) {
  .products .card:hover {
    transform: none;
    box-shadow: none;
  }
}

@media (prefers-reduced-motion: reduce) {
  section[class^="hero-"],
  .products .card,
  footer {
    animation: none !important;
    opacity: 1 !important;
    transform: none !important;
  }
}
/* main-anim-end */

/* ux-patch-start */
html { scroll-behavior: smooth; }

body { line-height: 1.45; }

.nav-links a[aria-current="page"] {
  text-decoration: underline;
  text-underline-offset: 4px;
}

button,
.cart-open,
nav a,
.about-link,
.order-submit,
.buy-btn,
.close-modal,
.secondary-btn {
  min-height: 42px;
}

:focus-visible {
  outline: 2px solid var(--btn);
  outline-offset: 2px;
}

.modal-card {
  scrollbar-gutter: stable;
}

#cart-items {
  max-height: 220px;
  overflow: auto;
  padding-right: 4px;
}

.cart-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 8px 0 12px;
}

.secondary-btn {
  border: 1px solid var(--line);
  background: transparent;
  color: inherit;
  border-radius: 8px;
  padding: 9px 12px;
  cursor: pointer;
}

.form-status {
  margin: 8px 0 0;
  font-size: 14px;
}

.form-status.info { color: var(--muted); }
.form-status.ok { color: #16a34a; }
.form-status.error { color: #dc2626; }

.order-submit[disabled] {
  opacity: .55;
  cursor: not-allowed;
}

@media (max-width: 700px) {
  .modal {
    align-items: flex-end;
    padding: 0;
  }

  .modal-card {
    width: 100%;
    max-height: 95vh;
    border-radius: 14px 14px 0 0;
  }

  .cart-actions button,
  .order-submit {
    width: 100%;
  }
}
/* ux-patch-end */

