:root {
  --bg: #f8f7f5;
  --paper: #ffffff;
  --ink: #171514;
  --muted: #6d665f;
  --line: #dcd5cf;
  --accent: #4d2d1e;
  --accent-2: #8f5637;
  --accent-soft: #efe4dc;
  --scroll-progress: 0;
  --radius: 16px;
  --shadow: 0 20px 40px rgba(13, 12, 10, 0.08);
}

:root[data-theme="sand"] {
  --bg: #f8f7f5;
  --paper: #ffffff;
  --ink: #171514;
  --muted: #6d665f;
  --line: #dcd5cf;
  --accent: #4d2d1e;
  --accent-2: #8f5637;
  --accent-soft: #efe4dc;
}

:root[data-theme="clay"] {
  --bg: #f5efeb;
  --paper: #fffdfb;
  --ink: #1f1714;
  --muted: #78645a;
  --line: #e0cfc4;
  --accent: #7a3922;
  --accent-2: #c26735;
  --accent-soft: #f6e4d9;
}

:root[data-theme="olive"] {
  --bg: #f3f5ef;
  --paper: #fcfdf9;
  --ink: #171c14;
  --muted: #5f6c57;
  --line: #d3ddcb;
  --accent: #3b5c2a;
  --accent-2: #65874f;
  --accent-soft: #e8f0e0;
}

:root[data-theme="night"] {
  --bg: #161a21;
  --paper: #1f2630;
  --ink: #edf1f5;
  --muted: #b8c2cf;
  --line: #333f50;
  --accent: #f4b082;
  --accent-2: #ffd3b4;
  --accent-soft: #2a3443;
  --shadow: 0 20px 40px rgba(5, 8, 12, 0.42);
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  padding: 0;
}

body {
  font-family: "Manrope", sans-serif;
  color: var(--ink);
  background:
    radial-gradient(1000px 380px at 12% -8%, rgba(126, 97, 74, 0.16), transparent 60%),
    radial-gradient(900px 300px at 88% 8%, rgba(202, 181, 159, 0.2), transparent 58%),
    var(--bg);
  line-height: 1.5;
  transition: background 0.45s ease, color 0.35s ease;
}

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

.announcement-bar {
  text-align: center;
  letter-spacing: 0.18em;
  font-size: 0.72rem;
  padding: 0.6rem 1rem;
  border-bottom: 1px solid var(--line);
  background: var(--paper);
}

.scroll-progress {
  position: fixed;
  left: 0;
  top: 0;
  z-index: 90;
  width: 100%;
  height: 3px;
  background: linear-gradient(90deg, var(--accent), var(--accent-2));
  transform-origin: left;
  transform: scaleX(var(--scroll-progress));
  transition: transform 0.1s linear;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  display: grid;
  grid-template-columns: auto 1fr auto auto;
  gap: 1rem;
  align-items: center;
  padding: 0.9rem 1.2rem;
  border-bottom: 1px solid var(--line);
  background: rgba(248, 247, 245, 0.92);
  backdrop-filter: blur(10px);
}

.menu-toggle {
  border: 1px solid var(--line);
  background: var(--paper);
  padding: 0.45rem 0.75rem;
  border-radius: 999px;
  cursor: pointer;
  font-size: 0.78rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  transition: transform 0.2s ease, border-color 0.2s ease;
}

.menu-toggle:hover {
  transform: translateY(-1px);
  border-color: var(--accent);
}

.brand {
  display: grid;
  justify-items: center;
  line-height: 1;
  text-align: center;
}

.brand span {
  font-family: "Bodoni Moda", serif;
  font-size: clamp(1.1rem, 2.7vw, 1.65rem);
  letter-spacing: 0.2em;
  text-transform: uppercase;
}

.brand small {
  font-size: 0.58rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}

.desktop-nav {
  display: none;
  gap: 1rem;
  justify-self: center;
  font-size: 0.78rem;
  letter-spacing: 0.06em;
}

.desktop-nav a,
.cart-link,
.mobile-nav a,
.text-link,
.footer-grid a {
  position: relative;
}

.desktop-nav a::after,
.cart-link::after,
.mobile-nav a::after,
.text-link::after,
.footer-grid a::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: -0.2rem;
  width: 100%;
  height: 1px;
  background: currentColor;
  transform-origin: left;
  transform: scaleX(0);
  transition: transform 0.25s ease;
}

.desktop-nav a:hover::after,
.cart-link:hover::after,
.mobile-nav a:hover::after,
.text-link:hover::after,
.footer-grid a:hover::after {
  transform: scaleX(1);
}

.cart-link {
  font-size: 0.82rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.mobile-nav {
  display: grid;
  gap: 0.8rem;
  padding: 0 1.2rem;
  max-height: 0;
  overflow: hidden;
  border-bottom: 1px solid transparent;
  transition: max-height 0.35s ease, padding 0.35s ease, border-color 0.35s ease;
  background: var(--paper);
}

.mobile-nav.open {
  max-height: 240px;
  padding: 1rem 1.2rem;
  border-bottom-color: var(--line);
}

.mobile-nav a {
  font-size: 0.82rem;
  letter-spacing: 0.06em;
}

main {
  padding: 0 1rem 7rem;
}

.hero {
  margin: 1.1rem auto 3rem;
  min-height: 76vh;
  border-radius: var(--radius);
  position: relative;
  overflow: hidden;
  display: flex;
  align-items: end;
  box-shadow: var(--shadow);
}

.hero-media,
.hero-media img,
.hero-backdrop {
  position: absolute;
  inset: 0;
}

.hero-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transform: scale(1.04);
}

.hero-backdrop {
  background:
    linear-gradient(120deg, rgba(35, 21, 16, 0.78), rgba(35, 21, 16, 0.2)),
    linear-gradient(155deg, rgba(79, 58, 46, 0.72), rgba(255, 255, 255, 0));
}

.hero-content {
  position: relative;
  z-index: 1;
  color: #fff;
  max-width: 640px;
  padding: clamp(1.4rem, 3vw, 2.6rem);
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
}

.theme-pills {
  margin-top: 1rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
}

.theme-pill {
  border: 1px solid rgba(255, 255, 255, 0.48);
  background: rgba(255, 255, 255, 0.12);
  color: #fff;
  border-radius: 999px;
  padding: 0.35rem 0.7rem;
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  cursor: pointer;
  transition: transform 0.2s ease, background 0.2s ease, border-color 0.2s ease;
}

.theme-pill:hover {
  transform: translateY(-1px);
  border-color: rgba(255, 255, 255, 0.85);
}

.theme-pill.active {
  background: rgba(255, 255, 255, 0.28);
  border-color: rgba(255, 255, 255, 0.95);
}

.orders-page .theme-pill {
  color: var(--ink);
  background: var(--paper);
  border-color: var(--line);
}

.orders-page .theme-pill.active {
  border-color: var(--accent);
  background: var(--accent-soft);
}

.eyebrow {
  text-transform: uppercase;
  letter-spacing: 0.14em;
  font-size: 0.72rem;
  margin: 0 0 0.6rem;
}

h1,
h2,
h3,
h4 {
  margin: 0;
  line-height: 1.1;
  font-family: "Bodoni Moda", serif;
  font-weight: 700;
}

h1 {
  font-size: clamp(2rem, 6vw, 4.2rem);
  max-width: 14ch;
}

h2 {
  font-size: clamp(1.45rem, 4.6vw, 2.8rem);
}

h3 {
  font-size: clamp(1.1rem, 3.3vw, 1.6rem);
}

h4 {
  font-size: 0.95rem;
}

.hero-copy {
  max-width: 48ch;
  color: rgba(255, 255, 255, 0.9);
}

.btn {
  display: inline-block;
  margin-top: 0.8rem;
  padding: 0.7rem 1.1rem;
  border-radius: 999px;
  background: var(--paper);
  color: var(--ink);
  font-size: 0.82rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  border: 1px solid transparent;
  transition: transform 0.25s ease, background 0.25s ease;
}

.btn:hover {
  transform: translateY(-2px);
}

.btn-outline {
  background: transparent;
  border-color: var(--line);
}

.btn-outline.light {
  color: #fff;
  border-color: rgba(255, 255, 255, 0.6);
}

.section-head {
  text-align: center;
  max-width: 760px;
  margin: 0 auto 1.4rem;
}

.section-head p:last-child {
  color: var(--muted);
}

.collection-tools {
  margin: 0 auto 1rem;
  width: min(980px, 100%);
  display: grid;
  gap: 0.55rem;
}

.account-main {
  padding: 1.2rem 0 4rem;
}

.account-grid {
  width: min(1020px, 100%);
  margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1rem;
}

.account-card {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: 1rem;
  box-shadow: var(--shadow);
}

.account-session {
  width: min(1020px, 100%);
  margin: 1rem auto 0;
}

.account-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
  margin-top: 0.4rem;
}

.account-card .stacked-form {
  display: grid;
  gap: 0.5rem;
}

.account-card input,
.account-card button {
  font: inherit;
}

.account-card input {
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 0.6rem 0.75rem;
  background: var(--paper);
  color: var(--ink);
}

.account-card button {
  border: 1px solid var(--accent);
  background: var(--accent);
  color: #fff;
  border-radius: 999px;
  padding: 0.6rem 0.9rem;
  cursor: pointer;
}

.account-card button:hover {
  opacity: 0.92;
}

.collection-tools input,
.collection-tools select {
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 0.62rem 0.88rem;
  font: inherit;
  background: var(--paper);
  color: var(--ink);
}

.carousel-controls {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.8rem;
  margin-bottom: 0.9rem;
}

.carousel-controls button {
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--paper);
  padding: 0.35rem 0.8rem;
  cursor: pointer;
  text-transform: uppercase;
  font-size: 0.74rem;
  letter-spacing: 0.08em;
}

.carousel-controls p {
  margin: 0;
  color: var(--muted);
  font-size: 0.82rem;
  letter-spacing: 0.05em;
}

.product-rail {
  overflow: hidden;
}

.product-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.85rem;
}

.product-card {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 14px;
  overflow: hidden;
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.empty-card {
  display: grid;
  align-items: center;
  min-height: 220px;
}

.product-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 10px 18px rgba(24, 18, 14, 0.08);
}

.product-image-wrap {
  aspect-ratio: 5 / 6;
  position: relative;
  overflow: hidden;
}

.product-image-wrap img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.4s ease;
}

.product-card:hover .product-image-wrap img {
  transform: scale(1.04);
}

.product-meta {
  padding: 0.75rem;
}

.product-name {
  margin: 0;
  font-size: 0.9rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.product-price {
  margin: 0.35rem 0;
  color: var(--muted);
  font-size: 0.82rem;
}

.badge {
  display: inline-block;
  padding: 0.22rem 0.48rem;
  font-size: 0.68rem;
  letter-spacing: 0.08em;
  border-radius: 999px;
  text-transform: uppercase;
  background: var(--accent-soft);
  color: var(--accent);
}

.product-actions {
  margin-top: 0.7rem;
  display: flex;
  gap: 0.4rem;
}

.product-actions button {
  border: 1px solid var(--line);
  background: var(--paper);
  border-radius: 999px;
  padding: 0.38rem 0.62rem;
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  cursor: pointer;
}

.product-actions button:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}

.collection-link-wrap {
  text-align: center;
  margin-top: 1rem;
}

.text-link {
  font-size: 0.86rem;
  letter-spacing: 0.03em;
}

.details {
  margin: 4rem 0;
  display: grid;
  gap: 0.9rem;
}

.details article {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 1rem;
}

.details p:last-child {
  margin-bottom: 0;
  color: var(--muted);
}

.story {
  margin: 2.5rem 0 3rem;
  display: grid;
  gap: 1rem;
}

.story-card,
.benefits li,
.vip,
.contact-box,
.tracking-box,
.site-footer {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius);
}

.story-card {
  padding: 1.4rem;
}

.story-card p {
  color: var(--muted);
}

.benefits {
  margin: 0;
  padding: 0;
  list-style: none;
  display: grid;
  gap: 0.8rem;
}

.benefits li {
  padding: 1rem;
}

.benefits p {
  margin-bottom: 0;
  color: var(--muted);
  font-size: 0.9rem;
}

.vip {
  text-align: center;
  padding: clamp(1.2rem, 3.5vw, 2rem);
  margin-bottom: 2rem;
}

.vip h2 {
  max-width: 24ch;
  margin: 0 auto;
}

.vip-form {
  margin: 1rem auto 0;
  max-width: 520px;
  display: grid;
  gap: 0.6rem;
}

.vip-form input,
.vip-form button {
  width: 100%;
  border-radius: 999px;
  border: 1px solid var(--line);
  padding: 0.72rem 0.9rem;
  font: inherit;
}

.vip-form button {
  background: var(--ink);
  color: #fff;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  cursor: pointer;
}

.form-message {
  min-height: 1.2rem;
  margin-top: 0.6rem;
  color: var(--muted);
  font-size: 0.9rem;
}

.contact-box {
  padding: clamp(1.2rem, 3.5vw, 2rem);
  margin-bottom: 2rem;
}

.contact-box h2 {
  margin-bottom: 0.8rem;
}

.contact-box p {
  margin: 0.45rem 0;
  color: var(--muted);
}

.contact-box a {
  color: var(--ink);
  text-decoration: underline;
  text-underline-offset: 0.16rem;
}

.tracking-box {
  padding: clamp(1.2rem, 3.5vw, 2rem);
  margin-bottom: 2rem;
}

.orders-hero {
  margin: 1.2rem 0 1.4rem;
  padding: clamp(1.1rem, 3.2vw, 1.9rem);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background:
    linear-gradient(145deg, var(--paper), var(--accent-soft)),
    var(--paper);
  display: grid;
  gap: 0.9rem;
}

.orders-hero-badge {
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 0.9rem;
  background: var(--paper);
}

.orders-hero-badge p {
  margin: 0;
}

.orders-metrics {
  margin-bottom: 1rem;
  display: grid;
  gap: 0.65rem;
}

.orders-metrics article {
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 0.9rem;
  background: var(--paper);
}

.orders-metrics article h3 {
  font-size: clamp(1.15rem, 3vw, 1.7rem);
}

.orders-metrics article p:last-child {
  margin: 0.25rem 0 0;
  color: var(--muted);
}

.tracking-box h2 {
  margin-bottom: 0.8rem;
}

.tracking-form {
  display: grid;
  gap: 0.55rem;
}

.tracking-form input,
.tracking-form button {
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 0.72rem 0.9rem;
  font: inherit;
}

.tracking-form button {
  background: var(--ink);
  color: #fff;
  cursor: pointer;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

#clearMyOrdersBtn {
  background: #fff;
  color: var(--ink);
}

.tracking-result {
  margin-top: 0.9rem;
  color: var(--muted);
  min-height: 1.2rem;
}

.timeline {
  margin-top: 0.8rem;
  display: grid;
  gap: 0.45rem;
}

.timeline-step {
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 0.5rem 0.7rem;
  font-size: 0.88rem;
}

.timeline-step.active {
  border-color: var(--accent);
  color: var(--ink);
  background: #f7f0ea;
}

.my-orders-list {
  margin-top: 0.8rem;
  display: grid;
  gap: 0.6rem;
}

.my-order-card {
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 0.72rem 0.8rem;
  background: #fff;
  display: grid;
  gap: 0.38rem;
}

.my-order-card h3,
.my-order-card p {
  margin: 0;
}

.my-order-card h3 {
  font-size: 0.95rem;
}

.my-order-card p {
  color: var(--muted);
  font-size: 0.86rem;
}

.sticky-cart {
  position: fixed;
  z-index: 60;
  left: 0.75rem;
  right: 0.75rem;
  bottom: 0.75rem;
  padding: 0.7rem 0.9rem;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(8px);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.8rem;
  box-shadow: 0 8px 20px rgba(18, 16, 14, 0.08);
}

.sticky-cart p {
  margin: 0;
  font-size: 0.86rem;
  color: var(--muted);
}

.sticky-cart button {
  border: none;
  border-radius: 999px;
  padding: 0.58rem 0.9rem;
  background: var(--ink);
  color: #fff;
  font-size: 0.74rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  cursor: pointer;
}

.site-footer {
  padding: 1.2rem;
}

.footer-grid {
  display: grid;
  gap: 1rem;
}

.footer-grid ul {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  gap: 0.4rem;
}

.footer-grid a {
  font-size: 0.92rem;
}

.payments {
  margin-top: 1rem;
}

.copyright {
  margin-top: 1.2rem;
  font-size: 0.84rem;
  color: var(--muted);
}

.modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 70;
  background: rgba(0, 0, 0, 0.55);
  display: grid;
  place-items: center;
  padding: 0.8rem;
}

.quick-view {
  width: min(880px, 100%);
  max-height: 92vh;
  background: var(--paper);
  border-radius: var(--radius);
  border: 1px solid var(--line);
  display: grid;
  position: relative;
  overflow: auto;
}

.modal-close {
  position: absolute;
  top: 0.7rem;
  right: 0.7rem;
  border: 1px solid var(--line);
  background: var(--paper);
  min-width: 68px;
  height: 34px;
  border-radius: 999px;
  cursor: pointer;
  text-transform: uppercase;
  font-size: 0.7rem;
  letter-spacing: 0.06em;
}

.quick-view-media {
  min-height: 280px;
}

.quick-view-media img {
  width: 100%;
  height: min(58vh, 560px);
  object-fit: cover;
  display: block;
}

.quick-view-body {
  padding: 1.1rem;
}

.quick-view-body p {
  color: var(--muted);
}

.quick-view-form {
  display: grid;
  gap: 0.45rem;
}

.quick-view-form select,
.quick-view-form input {
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 0.58rem 0.62rem;
  font: inherit;
}

.add-to-cart-modal {
  width: 100%;
  text-align: center;
}

.quick-view-actions {
  display: grid;
  gap: 0.5rem;
}

.checkout-modal {
  width: min(640px, 100%);
  max-height: 92vh;
  overflow: auto;
  border-radius: var(--radius);
  border: 1px solid var(--line);
  background: var(--paper);
  position: relative;
}

.checkout-body {
  padding: 1.1rem;
}

.checkout-note {
  color: var(--muted);
  font-size: 0.9rem;
}

.checkout-form {
  display: grid;
  gap: 0.55rem;
}

.checkout-form input,
.checkout-form button {
  font: inherit;
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 0.62rem 0.7rem;
}

.checkout-form button {
  cursor: pointer;
}

.checkout-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.55rem;
}

.checkout-actions {
  display: grid;
  gap: 0.55rem;
}

.checkout-actions button[type="submit"] {
  background: var(--ink);
  color: #fff;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.assistant-toggle {
  position: fixed;
  right: 0.95rem;
  bottom: 5.2rem;
  z-index: 72;
  border: none;
  border-radius: 999px;
  padding: 0.62rem 0.88rem;
  background: var(--ink);
  color: #fff;
  font-size: 0.76rem;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  cursor: pointer;
}

.back-to-top {
  position: fixed;
  right: 1rem;
  bottom: 8.9rem;
  z-index: 73;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--paper);
  color: var(--ink);
  min-width: 62px;
  padding: 0.45rem 0.72rem;
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  cursor: pointer;
  opacity: 0;
  transform: translateY(10px);
  pointer-events: none;
  transition: opacity 0.22s ease, transform 0.22s ease, border-color 0.22s ease;
}

.back-to-top.visible {
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
}

.back-to-top:hover {
  border-color: var(--accent);
}

.pulse {
  animation: cartPulse 0.45s ease;
}

@keyframes cartPulse {
  0% { transform: translateY(0); }
  35% { transform: translateY(-2px); }
  100% { transform: translateY(0); }
}

.assistant-panel {
  position: fixed;
  right: 0.95rem;
  bottom: 8.2rem;
  width: min(360px, calc(100vw - 1.9rem));
  max-height: min(70vh, 620px);
  overflow: hidden;
  z-index: 72;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--paper);
  box-shadow: 0 12px 24px rgba(17, 15, 13, 0.12);
  display: grid;
  grid-template-rows: auto 1fr auto auto;
}

.assistant-panel header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.7rem 0.75rem;
  border-bottom: 1px solid var(--line);
}

.assistant-panel h3 {
  font-size: 1rem;
}

.assistant-panel header button {
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--paper);
  width: 28px;
  height: 28px;
  cursor: pointer;
}

.assistant-messages {
  padding: 0.7rem 0.75rem;
  overflow: auto;
  display: grid;
  gap: 0.45rem;
}

.assistant-message {
  font-size: 0.86rem;
  padding: 0.45rem 0.55rem;
  border-radius: 10px;
  max-width: 90%;
}

.assistant-message.user {
  justify-self: end;
  background: #f2ece6;
}

.assistant-message.bot {
  justify-self: start;
  background: #f7f7f7;
}

.assistant-context,
.assistant-form {
  padding: 0.55rem 0.75rem;
  display: grid;
  gap: 0.4rem;
}

.assistant-context {
  border-top: 1px solid var(--line);
}

.assistant-context input,
.assistant-form input,
.assistant-form button {
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 0.52rem 0.58rem;
  font: inherit;
  font-size: 0.86rem;
}

.assistant-form {
  grid-template-columns: 1fr auto;
  border-top: 1px solid var(--line);
}

.assistant-form button {
  background: var(--ink);
  color: #fff;
  cursor: pointer;
}

[hidden] {
  display: none !important;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
}

.reveal {
  opacity: 0;
  transform: translateY(18px);
  transition: opacity 0.6s ease var(--reveal-delay, 0ms), transform 0.6s ease var(--reveal-delay, 0ms);
}

.reveal.visible {
  opacity: 1;
  transform: translateY(0);
}

:is(button, a, input, select, textarea):focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation: none !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}

@media (max-width: 719px) {
  .product-rail {
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    scrollbar-width: thin;
    padding-bottom: 0.25rem;
  }

  .product-grid {
    grid-auto-flow: column;
    grid-template-columns: none;
    grid-auto-columns: minmax(74vw, 1fr);
  }

  .product-card {
    scroll-snap-align: start;
  }
}

@media (max-width: 420px) {
  .site-header {
    gap: 0.55rem;
    padding: 0.75rem 0.7rem;
  }

  .brand small {
    display: none;
  }

  .brand span {
    font-size: 0.94rem;
    letter-spacing: 0.12em;
  }

  .cart-link {
    font-size: 0.69rem;
  }

  .sticky-cart {
    flex-direction: column;
    align-items: stretch;
    gap: 0.45rem;
  }

  .sticky-cart button {
    width: 100%;
  }

  .assistant-panel {
    right: 0.5rem;
    width: calc(100vw - 1rem);
    bottom: 8rem;
  }

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

  .assistant-form button {
    width: 100%;
  }

  .back-to-top {
    right: 0.7rem;
    bottom: 8.4rem;
  }

  .orders-page .back-to-top {
    bottom: 11.5rem;
  }
}

@media (min-width: 720px) {
  .menu-toggle {
    display: none;
  }

  .desktop-nav {
    display: flex;
  }

  .site-header {
    grid-template-columns: auto 1fr auto;
  }

  .brand {
    justify-self: start;
  }

  .carousel-controls {
    display: none;
  }

  .product-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 1rem;
  }

  .collection-tools {
    grid-template-columns: 1.2fr 0.8fr 0.8fr;
  }

  .details {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .vip-form {
    grid-template-columns: 1fr auto;
    align-items: center;
  }

  .vip-form button {
    width: auto;
    min-width: 140px;
  }

  .tracking-form {
    grid-template-columns: 1fr 1fr auto;
    align-items: end;
  }

  .orders-hero {
    grid-template-columns: 1.4fr 0.8fr;
    align-items: center;
  }

  .orders-metrics {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .tracking-form label {
    grid-column: span 1;
  }

  .tracking-form button {
    align-self: end;
    min-width: 160px;
  }

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

  .footer-grid {
    grid-template-columns: 1.5fr 1fr 1fr;
  }

  .quick-view {
    grid-template-columns: 1fr 1fr;
  }

  .quick-view-media {
    min-height: 500px;
  }

  .sticky-cart {
    left: 1.2rem;
    right: 1.2rem;
    bottom: 1rem;
  }

  .back-to-top {
    right: 1.2rem;
    bottom: 1rem;
  }
}

@media (min-width: 1040px) {
  main {
    width: min(1140px, 94vw);
    margin: 0 auto;
  }

  .product-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }

  .story {
    grid-template-columns: 1fr 1.2fr;
    align-items: start;
  }

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

  .sticky-cart {
    left: max(2rem, calc((100vw - 1140px) / 2));
    right: max(2rem, calc((100vw - 1140px) / 2));
  }

  .back-to-top {
    right: max(2rem, calc((100vw - 1140px) / 2));
  }
}
