/* Study Café — Shop styles.
   Scoped to #view-shop (listing) and #view-shop-product (detail) so the
   existing landing, dashboard, community and profile styles stay untouched. */

#view-shop,
#view-shop-product,
#view-shop-cart,
#view-shop-orders {
  --shop-surface: #111622;
  --shop-surface-2: #151C2A;
  --shop-border: #232C40;
  --shop-gold-soft: rgba(198, 150, 46, 0.12);
  --shop-radius: 16px;
}

#view-shop {
  padding-bottom: 96px;
}

#view-shop [hidden],
#view-shop-product [hidden],
#view-shop-cart [hidden],
#view-shop-orders [hidden] {
  display: none !important;
}

#view-shop .sr-only,
#view-shop-product .sr-only,
#view-shop-cart .sr-only,
#view-shop-orders .sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* --------------------------------------------------------------------------
   Header, search, demo note
   -------------------------------------------------------------------------- */

#view-shop .shop-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  margin: 8px 0 14px;
}

#view-shop .shop-header-copy {
  min-width: 0;
}

#view-shop .shop-header-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex: 0 0 auto;
}

#view-shop .shop-orders-btn {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  height: 44px;
  padding: 0 13px;
  border: 1px solid var(--shop-border);
  border-radius: 14px;
  background: var(--shop-surface);
  color: #dbe1eb;
  font: inherit;
  font-size: 0.74rem;
  font-weight: 600;
  cursor: pointer;
}

#view-shop .shop-orders-btn:hover,
#view-shop .shop-orders-btn:focus-visible {
  border-color: rgba(198, 150, 46, 0.65);
  color: var(--gold-primary);
  outline: none;
}

#view-shop .shop-orders-btn i {
  color: var(--gold-primary);
  font-size: 1.05rem;
}

#view-shop .shop-cart-btn,
#view-shop-product .product-cart-btn {
  position: relative;
  flex: 0 0 auto;
  width: 44px;
  height: 44px;
  border: 1px solid var(--shop-border);
  border-radius: 14px;
  background: var(--shop-surface);
  color: var(--text-white);
  font-size: 1rem;
  display: grid;
  place-items: center;
  cursor: pointer;
}

#view-shop .shop-cart-btn:hover,
#view-shop .shop-cart-btn:focus-visible,
#view-shop-product .product-cart-btn:hover,
#view-shop-product .product-cart-btn:focus-visible {
  border-color: rgba(198, 150, 46, 0.65);
  color: var(--gold-primary);
  outline: none;
}

#view-shop-product .product-cart-btn {
  width: 38px;
  height: 38px;
  border-radius: 50%;
}

.shop-cart-count {
  position: absolute;
  top: -6px;
  right: -6px;
  min-width: 19px;
  height: 19px;
  padding: 0 5px;
  border-radius: 999px;
  background: var(--gold-gradient);
  color: #1a1305;
  font-size: 0.64rem;
  font-weight: 800;
  line-height: 19px;
  text-align: center;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.45);
}

#view-shop .shop-header h2 {
  font-family: Georgia, serif;
  color: var(--gold-primary);
  font-size: 1.7rem;
  letter-spacing: 0.01em;
}

#view-shop .shop-sub {
  color: var(--text-muted);
  font-size: 0.9rem;
  margin-top: 4px;
}

#view-shop .shop-demo-note {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  margin: 0 0 14px;
  padding: 9px 12px;
  border: 1px solid rgba(198, 150, 46, 0.28);
  border-radius: 10px;
  background: var(--shop-gold-soft);
  color: #c8b28c;
  font-size: 0.76rem;
  line-height: 1.45;
}

#view-shop .shop-demo-note i {
  color: var(--gold-primary);
  margin-top: 2px;
}

#view-shop .shop-search-wrap {
  position: relative;
  display: flex;
  align-items: center;
  background: var(--shop-surface);
  border: 1px solid var(--shop-border);
  border-radius: 14px;
  padding: 0 44px 0 44px;
  height: 48px;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

#view-shop .shop-search-wrap:focus-within {
  border-color: rgba(198, 150, 46, 0.65);
  box-shadow: 0 0 0 3px rgba(198, 150, 46, 0.12);
}

#view-shop .shop-search-wrap > i {
  position: absolute;
  left: 16px;
  color: var(--text-muted);
  font-size: 0.9rem;
  pointer-events: none;
}

#view-shop .shop-search-input {
  width: 100%;
  height: 100%;
  border: none;
  outline: none;
  background: transparent;
  color: var(--text-white);
  font-size: 0.92rem;
}

#view-shop .shop-search-input::placeholder {
  color: #64708a;
}

#view-shop .shop-search-input::-webkit-search-cancel-button {
  display: none;
}

#view-shop .shop-search-clear {
  position: absolute;
  right: 8px;
  width: 32px;
  height: 32px;
  border: none;
  border-radius: 50%;
  background: transparent;
  color: var(--text-muted);
  cursor: pointer;
  display: grid;
  place-items: center;
}

#view-shop .shop-search-clear:hover,
#view-shop .shop-search-clear:focus-visible {
  color: var(--gold-primary);
  background: rgba(198, 150, 46, 0.1);
  outline: none;
}

/* --------------------------------------------------------------------------
   Breadcrumb, category home, chips
   -------------------------------------------------------------------------- */

#view-shop .shop-breadcrumb {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 4px;
  margin: 16px 0 6px;
  font-size: 0.78rem;
  color: var(--text-muted);
}

#view-shop .shop-breadcrumb button {
  border: none;
  background: transparent;
  color: #a8b2c4;
  font: inherit;
  padding: 3px 2px;
  cursor: pointer;
  border-radius: 4px;
}

#view-shop .shop-breadcrumb .shop-breadcrumb-back {
  flex: 0 0 auto;
  width: 28px;
  height: 28px;
  margin-right: 2px;
  padding: 0;
  display: grid;
  place-items: center;
  border: 1px solid var(--shop-border);
  border-radius: 50%;
  background: var(--shop-surface);
  color: var(--text-white);
  font-size: 0.72rem;
}

#view-shop .shop-breadcrumb .shop-breadcrumb-back:hover,
#view-shop .shop-breadcrumb .shop-breadcrumb-back:focus-visible {
  border-color: rgba(198, 150, 46, 0.6);
  background: var(--shop-gold-soft);
  color: var(--gold-primary);
  text-decoration: none;
}

#view-shop .shop-breadcrumb button:hover,
#view-shop .shop-breadcrumb button:focus-visible {
  color: var(--gold-primary);
  outline: none;
  text-decoration: underline;
}

#view-shop .shop-breadcrumb-sep {
  color: #4b5568;
  padding: 0 2px;
}

#view-shop .shop-breadcrumb-current {
  color: var(--gold-primary);
  font-weight: 600;
  padding: 3px 2px;
}

#view-shop .shop-category-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  margin-top: 16px;
}

#view-shop .shop-category-tile {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 8px;
  min-height: 112px;
  padding: 16px;
  border: 1px solid var(--shop-border);
  border-radius: var(--shop-radius);
  background:
    radial-gradient(120% 100% at 100% 0%, rgba(198, 150, 46, 0.12), transparent 60%),
    var(--shop-surface);
  color: var(--text-white);
  font: inherit;
  text-align: left;
  cursor: pointer;
  overflow: hidden;
  transition: transform 0.18s ease, border-color 0.18s ease, background 0.18s ease;
}

#view-shop .shop-category-tile::after {
  content: "";
  position: absolute;
  right: -22px;
  bottom: -30px;
  width: 90px;
  height: 90px;
  border-radius: 50%;
  border: 1px solid rgba(198, 150, 46, 0.16);
}

#view-shop .shop-category-tile:hover,
#view-shop .shop-category-tile:focus-visible {
  transform: translateY(-2px);
  border-color: rgba(198, 150, 46, 0.55);
  outline: none;
}

#view-shop .shop-category-tile > i {
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  border-radius: 11px;
  background: var(--shop-gold-soft);
  color: var(--gold-primary);
  font-size: 1rem;
}

#view-shop .shop-category-name {
  font-family: Georgia, serif;
  font-size: 1rem;
  line-height: 1.25;
}

#view-shop .shop-category-count {
  color: var(--text-muted);
  font-size: 0.72rem;
}

#view-shop .shop-chip-row {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding: 2px 1px 10px;
  margin: 4px 0 2px;
  scrollbar-width: none;
}

#view-shop .shop-chip-row::-webkit-scrollbar {
  display: none;
}

#view-shop .shop-chip {
  flex: 0 0 auto;
  border: 1px solid var(--shop-border);
  border-radius: 999px;
  background: var(--shop-surface);
  color: #c3cbd9;
  font: inherit;
  font-size: 0.76rem;
  padding: 8px 13px;
  cursor: pointer;
  white-space: nowrap;
  transition: border-color 0.18s ease, color 0.18s ease, background 0.18s ease;
}

#view-shop .shop-chip:hover,
#view-shop .shop-chip:focus-visible {
  border-color: rgba(198, 150, 46, 0.6);
  color: var(--gold-primary);
  background: var(--shop-gold-soft);
  outline: none;
}

#view-shop .shop-category-heading {
  margin: 18px 0 2px;
}

#view-shop .shop-category-heading h3 {
  font-family: Georgia, serif;
  font-size: 1.35rem;
  color: var(--text-white);
}

#view-shop .shop-category-heading p {
  color: var(--text-muted);
  font-size: 0.8rem;
  margin-top: 3px;
}

/* --------------------------------------------------------------------------
   Results header, filter bar, sort
   -------------------------------------------------------------------------- */

#view-shop .shop-results-head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 8px 10px;
  margin: 16px 0 10px;
}

#view-shop .shop-results-count {
  flex: 1 1 140px;
  color: #b7c0cf;
  font-size: 0.8rem;
  line-height: 1.3;
}

#view-shop .shop-results-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-left: auto;
}

#view-shop .shop-filter-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 36px;
  border: 1px solid var(--shop-border);
  border-radius: 10px;
  background: var(--shop-surface);
  color: #d4dae4;
  font: inherit;
  font-size: 0.75rem;
  padding: 8px 11px;
  cursor: pointer;
  transition: border-color 0.18s ease, color 0.18s ease, background 0.18s ease;
}

#view-shop .shop-filter-btn:hover,
#view-shop .shop-filter-btn:focus-visible {
  border-color: rgba(198, 150, 46, 0.65);
  color: var(--gold-primary);
  outline: none;
}

#view-shop .shop-filter-btn.is-active {
  border-color: rgba(198, 150, 46, 0.65);
  background: var(--shop-gold-soft);
  color: var(--gold-primary);
}

#view-shop .shop-filter-btn:disabled {
  opacity: 0.5;
  cursor: default;
}

#view-shop .shop-filter-count {
  display: inline-grid;
  place-items: center;
  min-width: 18px;
  height: 18px;
  padding: 0 5px;
  border-radius: 999px;
  background: var(--gold-primary);
  color: #15100a;
  font-size: 0.62rem;
  font-weight: 700;
  line-height: 1;
}

#view-shop .shop-sort-wrap {
  flex: 0 0 auto;
}

#view-shop .shop-sort {
  appearance: none;
  -webkit-appearance: none;
  border: 1px solid var(--shop-border);
  border-radius: 10px;
  background:
    linear-gradient(45deg, transparent 50%, #8a94a6 50%) calc(100% - 15px) 50% / 5px 5px no-repeat,
    linear-gradient(135deg, #8a94a6 50%, transparent 50%) calc(100% - 10px) 50% / 5px 5px no-repeat,
    var(--shop-surface);
  color: #d4dae4;
  font: inherit;
  font-size: 0.75rem;
  padding: 9px 28px 9px 11px;
  min-height: 36px;
  cursor: pointer;
  outline: none;
}

#view-shop .shop-sort:focus-visible {
  border-color: rgba(198, 150, 46, 0.65);
  box-shadow: 0 0 0 3px rgba(198, 150, 46, 0.12);
}

#view-shop .shop-sort:disabled {
  opacity: 0.5;
  cursor: default;
}

#view-shop .shop-filter-summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin: -2px 0 12px;
  padding: 8px 10px;
  border: 1px solid rgba(198, 150, 46, 0.22);
  border-radius: 10px;
  background: rgba(198, 150, 46, 0.06);
  color: #c8b28c;
  font-size: 0.74rem;
  line-height: 1.35;
}

#view-shop .shop-filter-summary p {
  min-width: 0;
}

#view-shop .shop-filter-clear {
  flex: 0 0 auto;
  border: none;
  background: transparent;
  color: var(--gold-primary);
  font: inherit;
  font-size: 0.72rem;
  font-weight: 600;
  padding: 4px 2px;
  cursor: pointer;
  text-decoration: underline;
}

#view-shop .shop-filter-clear:hover,
#view-shop .shop-filter-clear:focus-visible {
  color: #f2d39a;
  outline: none;
}

/* --------------------------------------------------------------------------
   Filter sheet
   -------------------------------------------------------------------------- */

body.shop-filter-open {
  overflow: hidden;
}

#view-shop .shop-filter-backdrop {
  position: fixed;
  inset: 0;
  z-index: 1190;
  background: rgba(4, 6, 10, 0.68);
  backdrop-filter: blur(3px);
  -webkit-backdrop-filter: blur(3px);
  animation: shopFilterFade 0.18s ease;
}

#view-shop .shop-filter-sheet {
  position: fixed;
  inset: 0;
  z-index: 1200;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  pointer-events: none;
}

#view-shop .shop-filter-card {
  pointer-events: auto;
  display: flex;
  flex-direction: column;
  width: 100%;
  max-width: 480px;
  max-height: 88vh;
  background: var(--shop-surface);
  border: 1px solid var(--shop-border);
  border-bottom: none;
  border-radius: 22px 22px 0 0;
  box-shadow: 0 -24px 70px rgba(0, 0, 0, 0.6);
  outline: none;
  animation: shopFilterUp 0.24s ease;
}

#view-shop .shop-filter-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  padding: 18px 18px 14px;
  border-bottom: 1px solid rgba(35, 44, 64, 0.8);
}

#view-shop .shop-filter-head h3 {
  font-family: Georgia, serif;
  font-size: 1.25rem;
  color: var(--text-white);
}

#view-shop .shop-filter-head p {
  margin-top: 3px;
  color: var(--text-muted);
  font-size: 0.76rem;
}

#view-shop .shop-filter-close {
  flex: 0 0 auto;
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  border: 1px solid var(--shop-border);
  border-radius: 50%;
  background: transparent;
  color: var(--text-muted);
  cursor: pointer;
}

#view-shop .shop-filter-close:hover,
#view-shop .shop-filter-close:focus-visible {
  border-color: rgba(198, 150, 46, 0.6);
  color: var(--gold-primary);
  outline: none;
}

#view-shop .shop-filter-body {
  overflow-y: auto;
  overscroll-behavior: contain;
  padding: 4px 18px 18px;
}

#view-shop .shop-filter-section {
  padding: 16px 0;
  border-bottom: 1px solid rgba(35, 44, 64, 0.7);
}

#view-shop .shop-filter-section:last-of-type {
  border-bottom: none;
}

#view-shop .shop-filter-section h4,
#view-shop .shop-filter-fieldset legend {
  margin-bottom: 10px;
  color: #e8ecf3;
  font-size: 0.82rem;
  font-weight: 600;
}

#view-shop .shop-filter-section-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 10px;
}

#view-shop .shop-filter-section-head h4 {
  margin-bottom: 0;
}

#view-shop .shop-filter-mini-actions {
  display: flex;
  gap: 4px;
}

#view-shop .shop-filter-mini-actions button {
  border: none;
  background: transparent;
  color: var(--gold-primary);
  font: inherit;
  font-size: 0.7rem;
  padding: 4px 3px;
  cursor: pointer;
}

#view-shop .shop-filter-mini-actions button:hover,
#view-shop .shop-filter-mini-actions button:focus-visible {
  color: #f2d39a;
  outline: none;
  text-decoration: underline;
}

#view-shop .shop-filter-price-row {
  display: flex;
  align-items: flex-end;
  gap: 8px;
}

#view-shop .shop-filter-price-field {
  flex: 1 1 0;
  display: flex;
  flex-direction: column;
  gap: 5px;
  min-width: 0;
  color: var(--text-muted);
  font-size: 0.7rem;
}

#view-shop .shop-filter-price-field input {
  width: 100%;
  height: 42px;
  border: 1px solid var(--shop-border);
  border-radius: 10px;
  background: #0d121d;
  color: var(--text-white);
  font: inherit;
  font-size: 0.88rem;
  padding: 0 11px;
  outline: none;
}

#view-shop .shop-filter-price-field input:focus {
  border-color: rgba(198, 150, 46, 0.65);
  box-shadow: 0 0 0 3px rgba(198, 150, 46, 0.1);
}

#view-shop .shop-filter-price-field input::placeholder {
  color: #64708a;
}

#view-shop .shop-filter-price-dash {
  padding-bottom: 12px;
  color: #64708a;
}

#view-shop .shop-filter-presets {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  margin-top: 10px;
}

#view-shop .shop-filter-presets button {
  border: 1px solid var(--shop-border);
  border-radius: 999px;
  background: transparent;
  color: #aab4c5;
  font: inherit;
  font-size: 0.69rem;
  padding: 6px 10px;
  cursor: pointer;
}

#view-shop .shop-filter-presets button:hover,
#view-shop .shop-filter-presets button:focus-visible,
#view-shop .shop-filter-presets button.is-active {
  border-color: rgba(198, 150, 46, 0.6);
  background: var(--shop-gold-soft);
  color: var(--gold-primary);
  outline: none;
}

#view-shop .shop-filter-error {
  margin-top: 9px;
  color: #ef9a9a;
  font-size: 0.72rem;
}

#view-shop .shop-filter-brands {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 7px;
}

#view-shop .shop-filter-empty {
  grid-column: 1 / -1;
  padding: 10px 0;
  color: var(--text-muted);
  font-size: 0.75rem;
}

#view-shop .shop-filter-brand {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
  padding: 8px 9px;
  border: 1px solid var(--shop-border);
  border-radius: 10px;
  background: var(--shop-surface-2);
  cursor: pointer;
  transition: border-color 0.15s ease, background 0.15s ease;
}

#view-shop .shop-filter-brand:has(input:checked) {
  border-color: rgba(198, 150, 46, 0.55);
  background: var(--shop-gold-soft);
}

#view-shop .shop-filter-brand input {
  flex: 0 0 auto;
  width: 16px;
  height: 16px;
  margin: 0;
  accent-color: var(--gold-primary);
  cursor: pointer;
}

#view-shop .shop-filter-brand-mark {
  flex: 0 0 auto;
  width: 22px;
  height: 22px;
  display: grid;
  place-items: center;
  overflow: hidden;
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.04);
}

#view-shop .shop-filter-brand-mark img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

#view-shop .shop-filter-brand-initial {
  color: var(--gold-primary);
  font-family: Georgia, serif;
  font-size: 0.75rem;
}

#view-shop .shop-filter-brand-name {
  min-width: 0;
  overflow: hidden;
  color: #d7dde7;
  font-size: 0.74rem;
  text-overflow: ellipsis;
  white-space: nowrap;
}

#view-shop .shop-filter-fieldset {
  border: 0;
  border-bottom: 1px solid rgba(35, 44, 64, 0.7);
  margin: 0;
  padding-left: 0;
  padding-right: 0;
}

#view-shop .shop-filter-fieldset legend {
  padding: 0;
}

#view-shop .shop-filter-segment {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 6px;
}

#view-shop .shop-filter-segment label {
  position: relative;
  display: block;
  cursor: pointer;
}

#view-shop .shop-filter-segment input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

#view-shop .shop-filter-segment span {
  display: grid;
  place-items: center;
  min-height: 38px;
  padding: 6px 4px;
  border: 1px solid var(--shop-border);
  border-radius: 9px;
  background: var(--shop-surface-2);
  color: #aab4c5;
  font-size: 0.7rem;
  text-align: center;
  transition: border-color 0.15s ease, background 0.15s ease, color 0.15s ease;
}

#view-shop .shop-filter-segment input:checked + span {
  border-color: rgba(198, 150, 46, 0.6);
  background: var(--shop-gold-soft);
  color: var(--gold-primary);
}

#view-shop .shop-filter-segment input:focus-visible + span {
  outline: 2px solid rgba(198, 150, 46, 0.5);
  outline-offset: 1px;
}

#view-shop .shop-filter-label {
  display: block;
  margin-bottom: 7px;
  color: #e8ecf3;
  font-size: 0.82rem;
  font-weight: 600;
}

#view-shop .shop-filter-select {
  width: 100%;
  height: 42px;
  border: 1px solid var(--shop-border);
  border-radius: 10px;
  background: var(--shop-surface-2);
  color: #d7dde7;
  font: inherit;
  font-size: 0.8rem;
  padding: 0 10px;
  outline: none;
  cursor: pointer;
}

#view-shop .shop-filter-select:focus-visible {
  border-color: rgba(198, 150, 46, 0.65);
  box-shadow: 0 0 0 3px rgba(198, 150, 46, 0.1);
}

#view-shop .shop-filter-toggle {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 14px;
  padding: 11px 12px;
  border: 1px solid var(--shop-border);
  border-radius: 11px;
  background: var(--shop-surface-2);
  cursor: pointer;
}

#view-shop .shop-filter-toggle input {
  flex: 0 0 auto;
  width: 20px;
  height: 20px;
  margin: 0;
  accent-color: var(--gold-primary);
  cursor: pointer;
}

#view-shop .shop-filter-toggle-copy {
  display: flex;
  flex-direction: column;
  gap: 1px;
  min-width: 0;
}

#view-shop .shop-filter-toggle-copy strong {
  color: #e8ecf3;
  font-size: 0.78rem;
  font-weight: 600;
}

#view-shop .shop-filter-toggle-copy small {
  color: var(--text-muted);
  font-size: 0.68rem;
}

#view-shop .shop-filter-actions {
  display: flex;
  gap: 10px;
  padding: 14px 18px calc(16px + env(safe-area-inset-bottom));
  border-top: 1px solid rgba(35, 44, 64, 0.8);
  background: var(--shop-surface);
}

#view-shop .shop-filter-actions .btn {
  flex: 1 1 0;
  min-height: 44px;
  font-size: 0.84rem;
}

#view-shop .shop-filter-actions .btn-outline {
  flex: 0 0 auto;
  padding-left: 15px;
  padding-right: 15px;
}

@media (min-width: 720px) {
  #view-shop .shop-filter-sheet {
    align-items: center;
    padding: 24px;
  }

  #view-shop .shop-filter-card {
    max-height: 82vh;
    border-bottom: 1px solid var(--shop-border);
    border-radius: 22px;
  }
}

@keyframes shopFilterFade {
  from { opacity: 0; }
  to { opacity: 1; }
}

@keyframes shopFilterUp {
  from { opacity: 0; transform: translateY(24px); }
  to { opacity: 1; transform: translateY(0); }
}

/* --------------------------------------------------------------------------
   Product grid and cards
   -------------------------------------------------------------------------- */

#view-shop .shop-product-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

#view-shop .shop-product-card {
  display: flex;
  flex-direction: column;
  min-width: 0;
  padding: 0;
  border: 1px solid var(--shop-border);
  border-radius: var(--shop-radius);
  background: var(--shop-surface);
  color: var(--text-white);
  font: inherit;
  text-align: left;
  overflow: hidden;
  transition: transform 0.18s ease, border-color 0.18s ease, box-shadow 0.18s ease;
}

#view-shop .shop-product-card:hover,
#view-shop .shop-product-card:focus-visible {
  transform: translateY(-2px);
  border-color: rgba(198, 150, 46, 0.5);
  box-shadow: 0 10px 26px rgba(0, 0, 0, 0.28);
  outline: none;
}

/* Card body is now a button that opens the product detail. */
#view-shop .shop-card-link {
  display: flex;
  flex-direction: column;
  flex: 1;
  width: 100%;
  min-width: 0;
  padding: 0;
  border: none;
  background: transparent;
  color: inherit;
  font: inherit;
  text-align: left;
  cursor: pointer;
}

#view-shop .shop-card-link:hover,
#view-shop .shop-card-link:focus-visible {
  outline: none;
}

/* Add-to-cart button sits below the card body. */
#view-shop .shop-card-add {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  width: 100%;
  min-height: 38px;
  border: none;
  border-top: 1px solid var(--shop-border);
  border-radius: 0 0 var(--shop-radius) var(--shop-radius);
  background: var(--shop-surface-2, #111826);
  color: var(--gold-primary);
  font: inherit;
  font-weight: 600;
  font-size: 0.78rem;
  cursor: pointer;
  transition: background 0.15s ease, color 0.15s ease;
}

#view-shop .shop-card-add:hover,
#view-shop .shop-card-add:focus-visible {
  background: rgba(198, 150, 46, 0.12);
  outline: 2px solid rgba(198, 150, 46, 0.5);
  outline-offset: -2px;
}

#view-shop .shop-card-add:disabled,
#view-shop .shop-card-add.is-added {
  background: #1b2231;
  color: #6f7a8e;
  cursor: not-allowed;
}

#view-shop .shop-card-add.is-added {
  background: linear-gradient(135deg, #34d399 0%, #0f9d58 100%);
  color: #06170d;
}

#view-shop .shop-card-add.is-added i {
  color: inherit;
}

#view-shop .shop-card-media {
  position: relative;
  display: block;
  aspect-ratio: 1 / 1;
  width: 100%;
  background:
    radial-gradient(90% 90% at 50% 20%, rgba(198, 150, 46, 0.08), transparent 70%),
    #0d121c;
  overflow: hidden;
}

#view-shop .shop-card-media img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
}

#view-shop .shop-card-fallback {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 3px;
  color: #5f6a7f;
}

#view-shop .shop-card-fallback i {
  font-size: 1.4rem;
}

#view-shop .shop-card-fallback span {
  font-family: Georgia, serif;
  font-size: 1.3rem;
  color: rgba(198, 150, 46, 0.55);
}

#view-shop .shop-card-body {
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: 8px 10px 9px;
  min-width: 0;
}

#view-shop .shop-card-brand {
  color: var(--gold-primary);
  font-size: 0.62rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

#view-shop .shop-card-name {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  min-height: 1.2em;
  color: #eef1f6;
  font-size: 0.8rem;
  font-weight: 500;
  line-height: 1.15;
}

#view-shop .shop-card-body .shop-price-row {
  margin-top: 1px;
}

#view-shop .shop-availability {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  margin-top: 1px;
  color: var(--text-muted);
  font-size: 0.64rem;
}

#view-shop .shop-availability::before {
  content: "";
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: currentColor;
}

#view-shop .shop-availability.is-in-stock {
  color: #5bd39a;
}

#view-shop .shop-availability.is-low-stock {
  color: #C6962E;
}

#view-shop .shop-availability.is-out-of-stock {
  color: #ef6b6b;
}

/* --------------------------------------------------------------------------
   Prices
   -------------------------------------------------------------------------- */

.shop-price-row {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 5px;
}

.shop-price-current {
  color: var(--gold-primary);
  font-weight: 700;
  font-size: 0.98rem;
}

.shop-price-old {
  color: #6f7a8e;
  font-size: 0.74rem;
  text-decoration: line-through;
}

.shop-discount {
  border-radius: 5px;
  background: rgba(91, 211, 154, 0.12);
  color: #5bd39a;
  font-size: 0.66rem;
  font-weight: 700;
  padding: 1px 5px;
}

/* --------------------------------------------------------------------------
   Loading, empty and error states
   -------------------------------------------------------------------------- */

#view-shop .shop-skeleton {
  border: 1px solid var(--shop-border);
  background: var(--shop-surface);
  overflow: hidden;
  position: relative;
}

#view-shop .shop-skeleton::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(100deg, transparent 20%, rgba(255, 255, 255, 0.045) 45%, transparent 70%);
  transform: translateX(-100%);
  animation: shop-shimmer 1.4s infinite;
}

#view-shop .shop-skeleton--tile {
  min-height: 112px;
  border-radius: var(--shop-radius);
}

#view-shop .shop-skeleton--card {
  min-height: 250px;
  border-radius: var(--shop-radius);
}

@keyframes shop-shimmer {
  to { transform: translateX(100%); }
}

#view-shop .shop-empty {
  grid-column: 1 / -1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  padding: 44px 18px;
  border: 1px dashed var(--shop-border);
  border-radius: var(--shop-radius);
  color: var(--text-muted);
  text-align: center;
  font-size: 0.86rem;
}

#view-shop .shop-empty i {
  color: #59657b;
  font-size: 1.8rem;
}

#view-shop .shop-error {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  padding: 28px 18px;
  border: 1px solid rgba(239, 107, 107, 0.28);
  border-radius: var(--shop-radius);
  background: rgba(239, 107, 107, 0.06);
  color: #e9a8a8;
  text-align: center;
  font-size: 0.84rem;
}

#view-shop .shop-error i {
  color: #ef6b6b;
  font-size: 1.3rem;
}

#view-shop #shop-load-more {
  margin-top: 16px;
}

#view-shop #shop-load-more:disabled {
  opacity: 0.5;
  cursor: default;
}

/* --------------------------------------------------------------------------
   Product detail — shell and top bar
   -------------------------------------------------------------------------- */

#view-shop-product {
  position: relative;
  min-height: 100vh;
  max-width: 480px;
  padding: 0;
  padding-bottom: 168px;
  background: var(--bg-dark);
}

#view-shop-product .product-topbar {
  position: sticky;
  top: 0;
  z-index: 30;
  display: grid;
  grid-template-columns: 40px minmax(0, 1fr) 40px;
  align-items: center;
  gap: 8px;
  min-height: 58px;
  padding: 8px 14px;
  background: rgba(8, 11, 17, 0.86);
  border-bottom: 1px solid rgba(35, 44, 64, 0.7);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
}

#view-shop-product .product-back-btn {
  width: 38px;
  height: 38px;
  border: 1px solid var(--shop-border);
  border-radius: 50%;
  background: var(--shop-surface);
  color: var(--text-white);
  font-size: 0.92rem;
  cursor: pointer;
  display: grid;
  place-items: center;
}

#view-shop-product .product-back-btn:hover,
#view-shop-product .product-back-btn:focus-visible {
  border-color: rgba(198, 150, 46, 0.65);
  color: var(--gold-primary);
  outline: none;
}

#view-shop-product .product-topbar-title {
  margin: 0;
  font-family: Inter, 'Segoe UI', sans-serif;
  font-size: 0.88rem;
  font-weight: 600;
  color: #dbe1eb;
  text-align: center;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

#view-shop-product .product-detail-content {
  padding: 0 20px;
}

/* --------------------------------------------------------------------------
   Product detail — gallery
   -------------------------------------------------------------------------- */

#view-shop-product .product-gallery {
  position: relative;
  margin: 0 -20px 18px;
  background: #0d121c;
}

#view-shop-product .product-gallery-track {
  display: flex;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  scrollbar-width: none;
  outline: none;
}

#view-shop-product .product-gallery-track::-webkit-scrollbar {
  display: none;
}

#view-shop-product .product-gallery-track:focus-visible {
  box-shadow: inset 0 0 0 2px rgba(198, 150, 46, 0.65);
}

#view-shop-product .product-gallery-slide {
  position: relative;
  flex: 0 0 100%;
  width: 100%;
  aspect-ratio: 1 / 1;
  scroll-snap-align: start;
  display: grid;
  place-items: center;
  overflow: hidden;
}

#view-shop-product .product-gallery-slide img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
}

#view-shop-product .product-gallery-fallback {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
  color: #5f6a7f;
  font-size: 0.78rem;
}

#view-shop-product .product-gallery-fallback i {
  font-size: 3rem;
  color: rgba(198, 150, 46, 0.6);
}

#view-shop-product .product-gallery--empty {
  aspect-ratio: 1 / 1;
  display: grid;
  place-items: center;
}

#view-shop-product .product-gallery-slide--empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  color: #5f6a7f;
  font-size: 0.8rem;
}

#view-shop-product .product-gallery-slide--empty i {
  color: rgba(198, 150, 46, 0.55);
  font-size: 3rem;
}

#view-shop-product .product-gallery-count {
  position: absolute;
  right: 14px;
  bottom: 14px;
  border-radius: 999px;
  background: rgba(8, 11, 17, 0.7);
  border: 1px solid rgba(255, 255, 255, 0.12);
  color: #e8ecf3;
  font-size: 0.7rem;
  padding: 4px 10px;
  backdrop-filter: blur(8px);
}

#view-shop-product .product-thumbs {
  display: flex;
  gap: 9px;
  margin: 0 0 18px;
  overflow-x: auto;
  scrollbar-width: none;
}

#view-shop-product .product-thumbs::-webkit-scrollbar {
  display: none;
}

#view-shop-product .product-thumb {
  flex: 0 0 58px;
  width: 58px;
  height: 58px;
  padding: 0;
  overflow: hidden;
  border: 1px solid var(--shop-border);
  border-radius: 10px;
  background: #0d121c;
  cursor: pointer;
  opacity: 0.65;
  transition: border-color 0.18s ease, opacity 0.18s ease;
}

#view-shop-product .product-thumb img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

#view-shop-product .product-thumb.active {
  border-color: var(--gold-primary);
  opacity: 1;
}

#view-shop-product .product-thumb:focus-visible {
  outline: 2px solid rgba(198, 150, 46, 0.65);
  outline-offset: 2px;
}

/* --------------------------------------------------------------------------
   Product detail — content blocks
   -------------------------------------------------------------------------- */

#view-shop-product .product-brand-row {
  display: flex;
  align-items: center;
  gap: 9px;
  margin-bottom: 8px;
}

#view-shop-product .product-brand-logo {
  display: inline-grid;
  place-items: center;
  width: 28px;
  height: 28px;
  border-radius: 7px;
  object-fit: contain;
  background: var(--shop-surface);
  border: 1px solid var(--shop-border);
}

#view-shop-product .product-brand-logo--fallback {
  background: var(--shop-gold-soft);
  border-color: rgba(198, 150, 46, 0.28);
  color: var(--gold-primary);
  font-family: Georgia, serif;
  font-size: 0.85rem;
  font-weight: 700;
}

#view-shop-product .product-brand-name {
  color: #aab4c5;
  font-size: 0.76rem;
  letter-spacing: 0.09em;
  text-transform: uppercase;
}

#view-shop-product .product-detail-name {
  font-family: Georgia, serif;
  font-size: 1.55rem;
  line-height: 1.25;
  color: #f4f6fa;
  margin: 0 0 12px;
}

#view-shop-product .product-detail-price-line {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  margin-bottom: 10px;
}

#view-shop-product .shop-price-row--detail {
  gap: 8px;
}

#view-shop-product .shop-price-row--detail .shop-price-current {
  font-size: 1.75rem;
}

#view-shop-product .shop-price-row--detail .shop-price-old {
  font-size: 0.92rem;
}

#view-shop-product .shop-price-row--detail .shop-discount {
  font-size: 0.75rem;
  padding: 2px 7px;
}

#view-shop-product .product-detail-availability {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  margin-bottom: 22px;
  border-radius: 999px;
  padding: 5px 11px;
  font-size: 0.73rem;
  font-weight: 600;
  background: var(--shop-surface);
  border: 1px solid var(--shop-border);
  color: #aab4c5;
}

#view-shop-product .product-detail-availability.is-in-stock {
  color: #5bd39a;
  border-color: rgba(91, 211, 154, 0.28);
  background: rgba(91, 211, 154, 0.07);
}

#view-shop-product .product-detail-availability.is-low-stock {
  color: #C6962E;
  border-color: rgba(198, 150, 46, 0.3);
  background: var(--shop-gold-soft);
}

#view-shop-product .product-detail-availability.is-out-of-stock {
  color: #ef6b6b;
  border-color: rgba(239, 107, 107, 0.3);
  background: rgba(239, 107, 107, 0.07);
}

#view-shop-product .product-availability-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: currentColor;
}

#view-shop-product .product-description-section,
#view-shop-product .product-brand-section {
  margin-bottom: 22px;
}

#view-shop-product .product-section-title {
  margin: 0 0 8px;
  color: #8a94a6;
  font-family: Inter, 'Segoe UI', sans-serif;
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

#view-shop-product .product-detail-desc {
  color: #c3cbd9;
  font-size: 0.88rem;
  line-height: 1.68;
}

#view-shop-product .product-brand-card {
  display: flex;
  align-items: center;
  gap: 12px;
  border: 1px solid var(--shop-border);
  border-radius: 13px;
  background: var(--shop-surface);
  padding: 12px;
}

#view-shop-product .product-brand-card-logo {
  width: 42px;
  height: 42px;
  border-radius: 10px;
  flex: 0 0 auto;
}

#view-shop-product .product-brand-card-copy {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}

#view-shop-product .product-brand-card-copy strong {
  color: #e8ecf3;
  font-size: 0.9rem;
}

#view-shop-product .product-brand-card-copy span {
  color: var(--text-muted);
  font-size: 0.74rem;
}

#view-shop-product .product-detail-breadcrumb {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 3px;
  margin: 4px 0 6px;
  padding-top: 14px;
  border-top: 1px solid rgba(35, 44, 64, 0.7);
  font-size: 0.73rem;
  color: var(--text-muted);
}

#view-shop-product .product-detail-breadcrumb button {
  border: none;
  background: transparent;
  color: #a8b2c4;
  font: inherit;
  padding: 3px 2px;
  cursor: pointer;
  border-radius: 4px;
}

#view-shop-product .product-detail-breadcrumb button:hover,
#view-shop-product .product-detail-breadcrumb button:focus-visible {
  color: var(--gold-primary);
  outline: none;
  text-decoration: underline;
}

#view-shop-product .product-detail-breadcrumb .shop-breadcrumb-current {
  color: var(--gold-primary);
  font-weight: 600;
  padding: 3px 2px;
}

/* --------------------------------------------------------------------------
   Product detail — add-to-cart CTA
   -------------------------------------------------------------------------- */

#view-shop-product .product-cta-bar {
  position: fixed;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  z-index: 40;
  width: 100%;
  max-width: 480px;
  padding: 12px 20px max(14px, env(safe-area-inset-bottom));
  background: linear-gradient(180deg, rgba(8, 11, 17, 0.55) 0%, rgba(8, 11, 17, 0.96) 34%, #080b11 100%);
  border-top: 1px solid rgba(35, 44, 64, 0.7);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
}

#view-shop-product .product-cta-bar {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

#view-shop-product .product-cta {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  flex: 1;
  min-width: 140px;
  min-height: 48px;
  border: none;
  border-radius: 12px;
  background: var(--gold-gradient);
  color: #1a1305;
  font-size: 0.92rem;
  font-weight: 700;
  text-decoration: none;
  cursor: pointer;
}



#view-shop-product .product-cta.is-added {
  background: linear-gradient(135deg, #34d399 0%, #0f9d58 100%);
  color: #06170d;
}

#view-shop-product .product-cta i {
  font-size: 1.15rem;
}

#view-shop-product .product-cta:hover,
#view-shop-product .product-cta:focus-visible {
  filter: brightness(1.06);
  outline: 2px solid rgba(198, 150, 46, 0.55);
  outline-offset: 2px;
}

#view-shop-product .product-cta--disabled,
#view-shop-product .product-cta:disabled {
  background: #1b2231;
  border: 1px solid var(--shop-border);
  color: #6f7a8e;
  cursor: not-allowed;
  filter: none;
}

#view-shop-product .product-cta-link {
  border: none;
  background: none;
  padding: 0;
  color: var(--gold-primary);
  font: inherit;
  font-weight: 600;
  text-decoration: underline;
  cursor: pointer;
}

#view-shop-product .product-cta-note {
  margin: 7px 0 0;
  color: #7b8598;
  font-size: 0.66rem;
  line-height: 1.4;
  text-align: center;
}

#view-shop-product .shop-empty--detail {
  margin: 28px 0;
  padding: 48px 20px;
}

/* --------------------------------------------------------------------------
   Small-screen and motion preferences
   -------------------------------------------------------------------------- */

@media (max-width: 360px) {
  #view-shop .shop-product-grid {
    gap: 9px;
  }

  #view-shop .shop-card-name {
    font-size: 0.79rem;
  }

  #view-shop-product .product-detail-name {
    font-size: 1.35rem;
  }

  #view-shop-product .shop-price-row--detail .shop-price-current {
    font-size: 1.5rem;
  }
}

@media (prefers-reduced-motion: reduce) {
  #view-shop .shop-skeleton::after {
    animation: none;
  }

  #view-shop .shop-product-card,
  #view-shop .shop-category-tile {
    transition: none;
  }

  #view-shop .shop-filter-backdrop,
  #view-shop .shop-filter-card {
    animation: none;
  }
}

/* --------------------------------------------------------------------------
   Cart / order request
   -------------------------------------------------------------------------- */

#view-shop-cart,
#view-shop-orders {
  position: relative;
  width: 100%;
  max-width: 480px;
  min-height: 100vh;
  padding: 0 20px 40px;
  background: var(--bg-dark);
}

#view-shop-cart .product-topbar,
#view-shop-orders .product-topbar {
  position: sticky;
  top: 0;
  z-index: 30;
  display: grid;
  grid-template-columns: 40px minmax(0, 1fr) 40px;
  align-items: center;
  gap: 8px;
  min-height: 58px;
  margin: 0 -20px 18px;
  padding: 8px 14px;
  background: rgba(8, 11, 17, 0.9);
  border-bottom: 1px solid rgba(35, 44, 64, 0.7);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
}

#view-shop-cart .product-back-btn,
#view-shop-orders .product-back-btn,
#view-shop-cart .product-orders-btn,
#view-shop-orders .product-cart-btn {
  width: 38px;
  height: 38px;
  border: 1px solid var(--shop-border);
  border-radius: 50%;
  background: var(--shop-surface);
  color: var(--text-white);
  font-size: 0.92rem;
  cursor: pointer;
  display: grid;
  place-items: center;
}

#view-shop-cart .product-back-btn:hover,
#view-shop-cart .product-back-btn:focus-visible,
#view-shop-orders .product-back-btn:hover,
#view-shop-orders .product-back-btn:focus-visible,
#view-shop-cart .product-orders-btn:hover,
#view-shop-cart .product-orders-btn:focus-visible,
#view-shop-orders .product-cart-btn:hover,
#view-shop-orders .product-cart-btn:focus-visible {
  border-color: rgba(198, 150, 46, 0.65);
  color: var(--gold-primary);
  outline: none;
}

#view-shop-cart .product-orders-btn,
#view-shop-orders .product-cart-btn {
  position: relative;
  justify-self: end;
}

#view-shop-orders .product-cart-btn .shop-cart-count {
  top: -5px;
  right: -5px;
}

#view-shop-cart .product-topbar-title,
#view-shop-orders .product-topbar-title {
  margin: 0;
  font-family: Inter, 'Segoe UI', sans-serif;
  font-size: 0.88rem;
  font-weight: 600;
  color: #dbe1eb;
  text-align: center;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

#view-shop-cart .shop-cart-notice {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  margin-bottom: 14px;
  padding: 10px 12px;
  border: 1px solid rgba(198, 150, 46, 0.28);
  border-radius: 10px;
  background: var(--shop-gold-soft);
  color: #c8b28c;
  font-size: 0.76rem;
  line-height: 1.45;
}

#view-shop-cart .shop-cart-heading {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 14px;
}

#view-shop-cart .shop-cart-title {
  font-family: Georgia, serif;
  font-size: 1.55rem;
  color: var(--gold-primary);
}

#view-shop-cart .shop-cart-heading p {
  margin-top: 3px;
  color: var(--text-muted);
  font-size: 0.8rem;
}

#view-shop-cart .shop-cart-clear {
  border: none;
  background: none;
  padding: 4px;
  color: var(--text-muted);
  font-size: 0.76rem;
  text-decoration: underline;
  cursor: pointer;
}

#view-shop-cart .shop-cart-clear:hover,
#view-shop-cart .shop-cart-clear:focus-visible {
  color: var(--danger);
  outline: none;
}

#view-shop-cart .shop-cart-lines {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

#view-shop-cart .shop-cart-line {
  display: grid;
  grid-template-columns: 84px minmax(0, 1fr);
  gap: 12px;
  padding: 12px;
  border: 1px solid var(--shop-border);
  border-radius: var(--shop-radius);
  background: var(--shop-surface);
}

#view-shop-cart .shop-cart-line.is-unavailable {
  border-color: rgba(239, 68, 68, 0.35);
  background: rgba(239, 68, 68, 0.035);
}

#view-shop-cart .shop-cart-line.is-unavailable .shop-cart-line-media img {
  opacity: 0.6;
}

#view-shop-cart .shop-cart-line.is-unavailable .shop-cart-line-name {
  color: #c3c9d4;
}

#view-shop-cart .shop-cart-line-media {
  width: 84px;
  height: 84px;
  border-radius: 12px;
  overflow: hidden;
  background: #0d121c;
  display: grid;
  place-items: center;
  color: #5f6a7f;
}

#view-shop-cart .shop-cart-line-media img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

#view-shop-cart .shop-cart-line-body {
  min-width: 0;
}

#view-shop-cart .shop-cart-line-brand {
  color: #aab4c5;
  font-size: 0.66rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

#view-shop-cart .shop-cart-line-name {
  margin: 2px 0 5px;
  color: #f4f6fa;
  font-size: 0.88rem;
  line-height: 1.35;
}

#view-shop-cart .shop-cart-line-price {
  color: var(--text-muted);
  font-size: 0.76rem;
}

#view-shop-cart .shop-cart-line-total {
  margin-left: 6px;
  color: var(--gold-primary);
  font-weight: 700;
}

#view-shop-cart .shop-availability {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-top: 5px;
  font-size: 0.66rem;
  font-weight: 600;
}

#view-shop-cart .shop-availability::before {
  content: '';
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: currentColor;
}

#view-shop-cart .shop-availability.is-in-stock {
  color: #34d399;
}

#view-shop-cart .shop-availability.is-low-stock {
  color: #fbbf24;
}

#view-shop-cart .shop-availability.is-out-of-stock {
  color: #f87171;
}

#view-shop-cart .shop-cart-line-warning {
  margin-top: 3px;
  color: #f87171;
  font-size: 0.68rem;
}

#view-shop-cart .shop-cart-line-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-top: 9px;
}

#view-shop-cart .shop-cart-qty {
  display: inline-flex;
  align-items: center;
  border: 1px solid var(--shop-border);
  border-radius: 9px;
  overflow: hidden;
  background: #0d121c;
}

#view-shop-cart .shop-cart-qty button {
  width: 34px;
  height: 34px;
  border: none;
  background: transparent;
  color: var(--text-white);
  cursor: pointer;
  display: grid;
  place-items: center;
  font-size: 0.72rem;
}

#view-shop-cart .shop-cart-qty button:hover:not(:disabled),
#view-shop-cart .shop-cart-qty button:focus-visible {
  color: var(--gold-primary);
  background: rgba(198, 150, 46, 0.08);
  outline: none;
}

#view-shop-cart .shop-cart-qty button:disabled {
  color: #495368;
  cursor: not-allowed;
}

#view-shop-cart .shop-cart-qty-value {
  min-width: 30px;
  text-align: center;
  font-size: 0.8rem;
  font-weight: 700;
  color: #f4f6fa;
}

#view-shop-cart .shop-cart-remove {
  border: none;
  background: none;
  padding: 4px;
  color: #8a94a6;
  font-size: 0.72rem;
  text-decoration: underline;
  cursor: pointer;
}

#view-shop-cart .shop-cart-remove:hover,
#view-shop-cart .shop-cart-remove:focus-visible {
  color: var(--danger);
  outline: none;
}

#view-shop-cart .shop-cart-summary {
  margin-top: 18px;
  padding: 16px;
  border: 1px solid var(--shop-border);
  border-radius: var(--shop-radius);
  background: var(--shop-surface-2);
}

#view-shop-cart .shop-cart-summary h2,
#view-shop-cart .shop-order-form h2 {
  font-size: 0.98rem;
  margin-bottom: 12px;
}

#view-shop-cart .shop-cart-summary-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 5px 0;
  color: var(--text-muted);
  font-size: 0.84rem;
}

#view-shop-cart .shop-cart-summary-row strong {
  color: var(--gold-primary);
  font-size: 1.05rem;
}

#view-shop-cart .shop-cart-summary-row--warning {
  color: #f87171;
}

#view-shop-cart .shop-cart-summary-note {
  margin-top: 10px;
  padding-top: 10px;
  border-top: 1px solid var(--shop-border);
  color: #7b8598;
  font-size: 0.7rem;
  line-height: 1.5;
}

#view-shop-cart .shop-cart-delivery {
  margin-top: 18px;
  padding: 16px;
  border: 1px solid var(--shop-border);
  border-radius: var(--shop-radius);
  background: var(--shop-surface-2);
}

#view-shop-cart .shop-cart-delivery-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
}

#view-shop-cart .shop-cart-delivery-head h2 {
  font-size: 0.98rem;
}

#view-shop-cart .shop-cart-address-edit {
  font-size: 0.74rem;
  padding: 5px 10px;
}

#view-shop-cart .shop-cart-address-edit:hover,
#view-shop-cart .shop-cart-address-edit:focus-visible {
  border-color: rgba(198, 150, 46, 0.65);
  color: var(--gold-primary);
  outline: none;
}

#view-shop-cart .shop-cart-delivery .delivery-address-card {
  background: #0d121d;
  border-color: var(--shop-border);
}

#view-shop-cart .shop-order-form {
  margin-top: 14px;
}

#view-shop-cart .shop-order-form .btn {
  width: 100%;
}

#view-shop-cart .shop-order-stock-note {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  padding: 9px 11px;
  border: 1px solid rgba(239, 68, 68, 0.3);
  border-radius: 9px;
  background: rgba(239, 68, 68, 0.08);
  color: #fca5a5;
  font-size: 0.74rem;
  line-height: 1.45;
}

#view-shop-cart .shop-order-field {
  display: flex;
  flex-direction: column;
  gap: 6px;
  color: var(--text-muted);
  font-size: 0.76rem;
}

#view-shop-cart .shop-order-field small {
  color: #64708a;
  font-size: 0.7rem;
}

#view-shop-cart .shop-order-field input,
#view-shop-cart .shop-order-field textarea {
  width: 100%;
  padding: 11px 12px;
  border: 1px solid var(--shop-border);
  border-radius: 10px;
  background: #0d121d;
  color: var(--text-white);
  font: inherit;
  font-size: 0.84rem;
  outline: none;
  resize: vertical;
}

#view-shop-cart .shop-order-field input:focus,
#view-shop-cart .shop-order-field textarea:focus {
  border-color: rgba(198, 150, 46, 0.65);
  box-shadow: 0 0 0 3px rgba(198, 150, 46, 0.1);
}

#view-shop-cart .shop-order-field input[aria-invalid="true"],
#view-shop-cart .shop-order-field textarea[aria-invalid="true"] {
  border-color: rgba(239, 68, 68, 0.7);
}

#view-shop-cart .shop-order-error {
  padding: 9px 11px;
  border: 1px solid rgba(239, 68, 68, 0.35);
  border-radius: 9px;
  background: rgba(239, 68, 68, 0.1);
  color: #fca5a5;
  font-size: 0.76rem;
  line-height: 1.45;
}

#view-shop-cart .shop-order-form .btn[disabled] {
  opacity: 0.6;
  cursor: not-allowed;
}

#view-shop-cart .shop-empty--cart {
  margin-top: 34px;
  padding: 48px 20px;
  text-align: center;
}

#view-shop-cart .shop-empty--cart i {
  font-size: 2.4rem;
  color: rgba(198, 150, 46, 0.6);
}

#view-shop-cart .shop-empty--cart h2 {
  margin: 10px 0 6px;
  font-family: Georgia, serif;
  color: var(--gold-primary);
  font-size: 1.3rem;
}

#view-shop-cart .shop-empty--cart p {
  max-width: 320px;
  margin: 0 auto 18px;
  color: var(--text-muted);
  font-size: 0.82rem;
  line-height: 1.5;
}

#view-shop-cart .shop-order-success {
  margin: 26px auto 0;
  max-width: 380px;
  text-align: center;
}

#view-shop-cart .shop-order-success-icon {
  width: 68px;
  height: 68px;
  margin: 0 auto 16px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: rgba(16, 185, 129, 0.12);
  border: 1px solid rgba(16, 185, 129, 0.35);
  color: #34d399;
  font-size: 1.7rem;
}

#view-shop-cart .shop-order-success h2 {
  font-family: Georgia, serif;
  color: var(--gold-primary);
  font-size: 1.45rem;
  margin-bottom: 8px;
}

#view-shop-cart .shop-order-success > p {
  color: var(--text-muted);
  font-size: 0.84rem;
  line-height: 1.55;
}

#view-shop-cart .shop-order-success-details {
  margin: 20px 0;
  padding: 14px;
  border: 1px solid var(--shop-border);
  border-radius: var(--shop-radius);
  background: var(--shop-surface);
  text-align: left;
}

#view-shop-cart .shop-order-success-details div {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 6px 0;
}

#view-shop-cart .shop-order-success-details dt {
  color: var(--text-muted);
  font-size: 0.76rem;
}

#view-shop-cart .shop-order-success-details dd {
  color: #f4f6fa;
  font-size: 0.82rem;
  font-weight: 700;
}

#view-shop-cart .shop-order-success-note {
  margin-bottom: 18px;
  color: #7b8598;
  font-size: 0.72rem;
}

#view-shop-cart .shop-order-success .shop-order-success-stock-note {
  display: flex;
  align-items: flex-start;
  gap: 7px;
  margin: 0 0 18px;
  padding: 9px 11px;
  border: 1px solid rgba(198, 150, 46, 0.28);
  border-radius: 9px;
  background: var(--shop-gold-soft);
  color: #c8b28c;
  font-size: 0.74rem;
  line-height: 1.45;
  text-align: left;
}

#view-shop-cart .shop-order-success-actions {
  display: flex;
  flex-direction: column;
  gap: 9px;
}

/* --------------------------------------------------------------------------
   My Orders
   -------------------------------------------------------------------------- */

#view-shop-orders .shop-orders-content {
  display: flex;
  flex-direction: column;
  gap: 15px;
}

#view-shop-orders .shop-orders-loading {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 220px;
  color: var(--text-muted);
  font-size: 0.82rem;
}

#view-shop-orders .shop-orders-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 12px;
}

#view-shop-orders .shop-orders-head h2 {
  font-family: Georgia, serif;
  color: var(--gold-primary);
  font-size: 1.55rem;
}

#view-shop-orders .shop-orders-head p {
  margin-top: 3px;
  color: var(--text-muted);
  font-size: 0.78rem;
}

#view-shop-orders .shop-orders-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

#view-shop-orders .shop-order-card {
  display: flex;
  flex-direction: column;
  gap: 11px;
  padding: 14px;
  border: 1px solid var(--shop-border);
  border-radius: var(--shop-radius);
  background: var(--shop-surface);
}

#view-shop-orders .shop-order-card-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
  padding-bottom: 10px;
  border-bottom: 1px solid rgba(35, 44, 64, 0.75);
}

#view-shop-orders .shop-order-card-head div {
  display: flex;
  flex-direction: column;
  gap: 3px;
  min-width: 0;
}

#view-shop-orders .shop-order-card-head strong {
  color: #f4f6fa;
  font-size: 0.86rem;
  letter-spacing: 0.02em;
}

#view-shop-orders .shop-order-card-head span {
  color: var(--text-muted);
  font-size: 0.68rem;
}

#view-shop-orders .shop-order-status {
  flex: 0 0 auto;
  padding: 4px 9px;
  border: 1px solid transparent;
  border-radius: 999px;
  font-size: 0.64rem !important;
  font-weight: 700;
}

#view-shop-orders .shop-order-status.is-new {
  border-color: rgba(198, 150, 46, 0.35);
  background: rgba(198, 150, 46, 0.1);
  color: #C6962E !important;
}

#view-shop-orders .shop-order-status.is-confirmed {
  border-color: rgba(96, 165, 250, 0.35);
  background: rgba(96, 165, 250, 0.1);
  color: #93c5fd !important;
}

#view-shop-orders .shop-order-status.is-completed {
  border-color: rgba(16, 185, 129, 0.35);
  background: rgba(16, 185, 129, 0.1);
  color: #6ee7b7 !important;
}

#view-shop-orders .shop-order-status.is-cancelled {
  border-color: rgba(239, 68, 68, 0.35);
  background: rgba(239, 68, 68, 0.1);
  color: #fca5a5 !important;
}

#view-shop-orders .shop-order-items {
  display: flex;
  flex-direction: column;
  gap: 6px;
  list-style: none;
  margin: 0;
  padding: 0;
}

#view-shop-orders .shop-order-items li {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  color: #b9c2d0;
  font-size: 0.75rem;
}

#view-shop-orders .shop-order-items li strong {
  flex: 0 0 auto;
  color: #e8ecf3;
  font-size: 0.75rem;
}

#view-shop-orders .shop-order-cancel-reason {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  padding: 9px 11px;
  border: 1px solid rgba(239, 68, 68, 0.28);
  border-radius: 9px;
  background: rgba(239, 68, 68, 0.08);
  color: #fca5a5;
  font-size: 0.72rem;
  line-height: 1.5;
}

#view-shop-orders .shop-order-cancel-reason i {
  margin-top: 2px;
}

#view-shop-orders .shop-order-cancel-reason span {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

#view-shop-orders .shop-order-cancel-reason small {
  color: #a97a7a;
  font-size: 0.65rem;
}

#view-shop-orders .shop-order-card-foot {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  padding-top: 10px;
  border-top: 1px solid rgba(35, 44, 64, 0.75);
}

#view-shop-orders .shop-order-card-foot span {
  color: var(--text-muted);
  font-size: 0.7rem;
}

#view-shop-orders .shop-order-card-foot strong {
  color: var(--gold-primary);
  font-size: 0.98rem;
}

#view-shop-orders .shop-empty--orders {
  margin-top: 18px;
  padding: 44px 20px;
  text-align: center;
}

#view-shop-orders .shop-empty--orders i {
  font-size: 2.4rem;
  color: rgba(198, 150, 46, 0.6);
}

#view-shop-orders .shop-empty--orders h2 {
  margin: 10px 0 6px;
  font-family: Georgia, serif;
  color: var(--gold-primary);
  font-size: 1.3rem;
}

#view-shop-orders .shop-empty--orders p {
  max-width: 320px;
  margin: 0 auto 18px;
  color: var(--text-muted);
  font-size: 0.82rem;
  line-height: 1.5;
}

@media (max-width: 380px) {
  #view-shop .shop-orders-btn span {
    display: none;
  }

  #view-shop .shop-orders-btn {
    width: 44px;
    padding: 0;
    justify-content: center;
  }
}

.shop-toast {
  position: fixed;
  left: 50%;
  bottom: 92px;
  z-index: 1200;
  transform: translate(-50%, 12px);
  max-width: min(420px, calc(100vw - 32px));
  padding: 11px 16px;
  border: 1px solid rgba(16, 185, 129, 0.35);
  border-radius: 11px;
  background: rgba(13, 25, 20, 0.96);
  color: #d1fae5;
  font-size: 0.8rem;
  line-height: 1.4;
  text-align: center;
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.45);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.18s ease, transform 0.18s ease;
}

.shop-toast[data-type="error"] {
  border-color: rgba(239, 68, 68, 0.4);
  background: rgba(35, 13, 16, 0.96);
  color: #fecaca;
}

.shop-toast.is-visible {
  opacity: 1;
  transform: translate(-50%, 0);
}

.shop-toast[hidden] {
  display: none !important;
}

@media (max-width: 360px) {
  #view-shop-cart .shop-cart-line {
    grid-template-columns: 70px minmax(0, 1fr);
  }

  #view-shop-cart .shop-cart-line-media {
    width: 70px;
    height: 70px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .shop-toast {
    transition: none;
  }
}
