:root {
  --color-ink: #0f0f12;
  --color-ivory: #f7f4ef;
  --color-silver: #d5d7db;
  --color-graphite: #2b2e34;
  --color-gold: #b8a26b;
  --color-accent: #1f1f23;
  --shadow-soft: 0 0.75rem 2.5rem rgba(0, 0, 0, 0.12);
}

* {
  box-sizing: border-box;
}

html {
  font-size: 100%;
}

body {
  margin: 0;
  font-family: "Source Sans 3", sans-serif;
  font-size: 1rem;
  line-height: 1.45;
  color: var(--color-ink);
  background: radial-gradient(75rem 37.5rem at 10% 0%, #ffffff 0%, #f2efe9 45%, #e9edf2 100%);
  overflow-x: hidden;
}

img,
video {
  max-width: 100%;
  height: auto;
}

main {
  overflow-x: clip;
}

h1,
h2,
h3,
h4 {
  font-family: "Cinzel", serif;
  letter-spacing: 0.02em;
  line-height: 1.25;
  margin: 0 0 0.75rem;
}

p {
  margin: 0 0 0.75rem;
}

a {
  color: inherit;
  text-decoration: none;
  transition: color 0.2s ease, opacity 0.2s ease;
}

a:hover {
  opacity: 0.9;
}

a:focus-visible,
.button:focus-visible,
.input:focus-visible,
select:focus-visible,
textarea:focus-visible,
.nav-toggle:focus-visible {
  outline: 0.125rem solid #0b4b8a;
  outline-offset: 0.125rem;
}

.container {
  width: min(94vw, 75rem);
  margin: 0 auto;
}

.section {
  padding: 2rem 0 2.75rem;
}

.navbar {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(255, 255, 255, 0.9);
  backdrop-filter: blur(0.5rem);
  border-bottom: 0.0625rem solid rgba(0, 0, 0, 0.06);
}

.navbar-inner {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 1rem;
  min-height: 4.125rem;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.625rem;
}

.brand img {
  width: 2.75rem;
  height: 2.75rem;
  object-fit: cover;
  border-radius: 0.5rem;
}

.brand-copy {
  display: grid;
  gap: 0.125rem;
}

.brand-title {
  font-weight: 700;
}

.brand-subtitle {
  font-size: 0.75rem;
  color: #666;
}

.nav-toggle {
  width: 2.75rem;
  height: 2.75rem;
  border: 0.0625rem solid rgba(0, 0, 0, 0.14);
  border-radius: 999rem;
  background: #fff;
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.25rem;
  cursor: pointer;
}

.nav-toggle span {
  width: 1.125rem;
  height: 0.125rem;
  background: var(--color-ink);
  border-radius: 999rem;
}

.nav-links {
  position: absolute;
  left: 0;
  right: 0;
  top: 100%;
  padding: 0.75rem 4vw 1rem;
  background: rgba(255, 255, 255, 0.98);
  border-bottom: 0.0625rem solid rgba(0, 0, 0, 0.08);
  display: none;
  grid-auto-rows: minmax(2.75rem, auto);
  gap: 0.375rem;
}

.nav-links.is-open {
  display: grid;
}

.nav-links > a,
.nav-user {
  min-height: 1.75rem;
  display: inline-flex;
  align-items: center;
  padding: 0.25rem 0;
}

.nav-user {
  display: none;
  white-space: nowrap;
  padding: 0.35rem 0.75rem;
  border-radius: 999rem;
  border: 0.0625rem solid rgba(0, 0, 0, 0.12);
  background: rgba(11, 75, 138, 0.06);
  color: #1d2a3a;
  font-size: 0.875rem;
  font-weight: 500;
  line-height: 1;
}

.nav-links.is-open + .nav-user {
  display: inline-flex;
  min-height: 2.75rem;
}

.nav-chat {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 0.375rem;
}

.nav-chat-icon {
  display: block;
  color: inherit;
}

.nav-chat-icon.is-unread {
  color: #7ee08a;
}

.nav-chat-badge {
  position: absolute;
  top: -0.375rem;
  right: -0.625rem;
  min-width: 1.125rem;
  height: 1.125rem;
  padding: 0 0.3125rem;
  border-radius: 999rem;
  background: #d32f2f;
  color: #fff;
  font-size: 0.6875rem;
  line-height: 1.125rem;
  text-align: center;
}

.hero {
  padding: 1.75rem 0 2.25rem;
}

.hero-grid {
  display: grid;
  gap: 1.25rem;
  grid-template-columns: 1fr;
  align-items: start;
}

.hero-card {
  background: rgba(255, 255, 255, 0.82);
  border-radius: 1rem;
  padding: 1rem;
  box-shadow: var(--shadow-soft);
}

.hero-subtitle {
  text-transform: uppercase;
  font-size: 0.75rem;
  letter-spacing: 0.12em;
  color: var(--color-gold);
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 2.75rem;
  padding: 0.75rem 1.125rem;
  border-radius: 999rem;
  background: var(--color-ink);
  color: #fff;
  border: 0.0625rem solid transparent;
  font-weight: 600;
  cursor: pointer;
  transition: transform 0.15s ease, box-shadow 0.15s ease, background-color 0.2s ease;
}

.button:hover {
  transform: translateY(-0.0625rem);
  box-shadow: 0 0.5rem 1.375rem rgba(15, 15, 18, 0.2);
}

.button:disabled,
.button[aria-disabled="true"] {
  opacity: 0.65;
  cursor: not-allowed;
  transform: none;
  box-shadow: none;
}

.button.secondary {
  background: transparent;
  color: var(--color-ink);
  border-color: var(--color-ink);
}

.button.secondary:hover {
  background: rgba(15, 15, 18, 0.05);
}

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

.card {
  background: #fff;
  border-radius: 1rem;
  overflow: hidden;
  box-shadow: var(--shadow-soft);
  display: flex;
  flex-direction: column;
}

.card img {
  width: 100%;
  height: auto;
  min-height: 12.5rem;
  object-fit: cover;
}

.card-body {
  padding: 1rem;
}

.badge {
  display: inline-block;
  padding: 0.25rem 0.625rem;
  border-radius: 999rem;
  background: var(--color-silver);
  font-size: 0.75rem;
}

.footer {
  background: #111;
  color: #eee;
  padding: 1.5rem 0;
}

.footer-grid {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
}

.footer-col {
  flex: 1 1 13rem;
  min-width: 0;
}

.footer-legal {
  background: #111;
  color: #cfcfcf;
  border-top: 0.0625rem solid rgba(255, 255, 255, 0.15);
  padding: 0.75rem 0 1rem;
  font-size: 0.8125rem;
}

.footer-legal .container {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 1rem;
  flex-wrap: wrap;
  text-align: center;
}

.input,
select,
textarea {
  width: 100%;
  min-height: 2.75rem;
  padding: 0.625rem 0.75rem;
  border-radius: 0.625rem;
  border: 0.0625rem solid #d0d0d0;
  font-size: 1rem;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.input:focus,
select:focus,
textarea:focus {
  border-color: #0b4b8a;
  box-shadow: 0 0 0 0.1875rem rgba(11, 75, 138, 0.12);
}

.form-row {
  display: grid;
  gap: 0.75rem;
  grid-template-columns: 1fr;
}

.table {
  width: 100%;
  display: block;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  border-collapse: collapse;
  background: #fff;
  border-radius: 0.75rem;
}

.table thead,
.table tbody,
.table tr {
  width: 100%;
}

.table th,
.table td {
  text-align: left;
  padding: 0.75rem 0.875rem;
  border-bottom: 0.0625rem solid #eee;
  white-space: nowrap;
  vertical-align: middle;
}

.alert {
  background: #fdf6e3;
  border: 0.0625rem solid #f0e2b6;
  padding: 0.625rem 0.75rem;
  border-radius: 0.625rem;
}

.alert-success {
  background: #ecf7ed;
  border-color: #b7e0bf;
}

.alert-error {
  background: #fdeeee;
  border-color: #f0b5b5;
}

.logistics-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 0.625rem;
  margin: 0.75rem 0 1.25rem;
  align-items: center;
}

.status-badge {
  display: inline-flex;
  align-items: center;
  padding: 0.25rem 0.625rem;
  border-radius: 999rem;
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: lowercase;
}

.status-pending { background: #e6e8eb; color: #4a4f55; }
.status-paid { background: #d8e9ff; color: #1b4f9c; }
.status-processing { background: #ffe1c2; color: #9a4d00; }
.status-shipped { background: #e9dbff; color: #5a2e9a; }
.status-delivered { background: #d8f5d9; color: #1b6b2a; }
.status-cancelled { background: #ffd6d6; color: #8d1f1f; }

.action-stack,
.tracking-form {
  display: grid;
  gap: 0.5rem;
}

.tracking-form.is-hidden {
  display: none;
}

.modal {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.5);
  z-index: 9999;
  display: flex;
  align-items: flex-start;
  justify-content: center;
  padding: 8vh 0.75rem;
}

.modal-card {
  background: #fff;
  border-radius: 0.875rem;
  width: min(56.25rem, 92vw);
  box-shadow: var(--shadow-soft);
  display: flex;
  flex-direction: column;
  max-height: 82vh;
}

.modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  padding: 1rem 1rem 0;
}

.modal-body {
  padding: 0.75rem 1rem 1.25rem;
  overflow: auto;
}

.details-grid {
  display: grid;
  gap: 0.5rem 1rem;
  grid-template-columns: 1fr;
  margin-bottom: 0.75rem;
}

.details-section {
  margin-top: 0.75rem;
  display: grid;
  gap: 0.375rem;
}

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

.shipping-notice {
  margin-top: 1rem;
  padding: 0.875rem 1rem;
  border-radius: 0.75rem;
  border: 0.0625rem solid #e7dbc0;
  background: #fbf8f1;
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 0.75rem;
  align-items: center;
}

.shipping-notice-icon {
  width: 1.5rem;
  height: 1.5rem;
  border-radius: 999rem;
  background: #f5d38a;
  color: #5f4300;
  font-size: 0.875rem;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.shipping-notice-content strong {
  display: block;
  font-size: 0.98rem;
  color: #2b2e34;
}

.shipping-notice-content p {
  margin: 0.25rem 0 0;
  color: #4f4f54;
}

.shipping-notice-content a.shipping-notice-link {
  color: #0b4b8a;
  text-decoration: underline;
  text-underline-offset: 0.125rem;
  font-weight: 700;
}

.shipping-notice-content a.shipping-notice-link:hover {
  color: #083866;
}

.cart-actions {
  margin-top: 1rem;
}

.checkout-hint {
  color: #666;
}

.checkout-shipping-row {
  align-items: end;
}

.checkout-shipping-field {
  display: grid;
  gap: 0.375rem;
  max-width: 10rem;
}

.checkout-summary {
  display: grid;
  gap: 0.25rem;
  padding: 0.75rem 0.875rem;
  border: 0.0625rem solid #e4e4e4;
  border-radius: 0.75rem;
  background: rgba(255, 255, 255, 0.8);
}

.checkout-summary-total {
  font-size: 1.08rem;
}

@media (max-width: 40rem) {
  h1 {
    font-size: 1.7rem;
    line-height: 1.2;
  }

  h2 {
    font-size: 1.35rem;
  }

  .section {
    padding: 1.5rem 0 2rem;
  }

  .navbar-inner {
    min-height: 3.85rem;
  }

  .brand-title {
    font-size: 0.98rem;
  }

  .brand-subtitle {
    font-size: 0.7rem;
  }

  .nav-links {
    padding: 0.625rem 4vw 0.875rem;
    max-height: calc(100vh - 4.5rem);
    overflow: auto;
  }

  .nav-links > a,
  .nav-user {
    min-height: 2.9rem;
  }

  .table th,
  .table td {
    padding: 0.625rem 0.625rem;
    font-size: 0.94rem;
    white-space: normal;
  }

  .button {
    min-height: 2.875rem;
  }
}

@media (min-width: 48rem) {
  .section {
    padding: 2.5rem 0 3.25rem;
  }

  .nav-toggle {
    display: none;
  }

  .nav-links {
    position: static;
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-left: auto;
    padding: 0;
    background: transparent;
    border: 0;
  }

  .nav-user {
    display: inline-flex;
    min-height: 2.75rem;
    align-items: center;
    margin-left: auto;
  }

  .hero-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 1.5rem;
    align-items: center;
  }

  .hero {
    padding: 3.25rem 0 2.75rem;
  }

  .hero-card {
    border-radius: 1.5rem;
    padding: 1.5rem;
  }

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

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

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

  .shipping-notice {
    grid-template-columns: auto 1fr;
  }
}

@media (min-width: 64rem) {
  .cards {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .navbar-inner {
    min-height: 4.5rem;
  }

  .nav-links {
    gap: 1.25rem;
  }
}
