/* Hide spinner for shop page */
#spinner {
  display: none !important;
  visibility: hidden !important;
  opacity: 0 !important;
  pointer-events: none !important;
}

:root {
  --brand-navy: #0f1f4d;
  --brand-orange: #ff7a00;
  --brand-orange-dark: #dd6700;
  --brand-ice: #f4f8fc;
  --brand-surface: #ffffff;
  --brand-border: #dbe4f0;
  --brand-text: #24324a;
  --brand-muted: #6d7a8f;
  --brand-success: #228b4e;
  --brand-danger: #c53d36;
}

* {
  box-sizing: border-box;
}

body.shop-shell {
  margin: 0;
  font-family: "Segoe UI", Arial, sans-serif;
  color: var(--brand-text);
  background:
    radial-gradient(circle at top right, rgba(255, 122, 0, 0.16), transparent 22%),
    linear-gradient(180deg, #eef3f8 0%, #f9fbfd 100%);
}

.shop-header {
  position: sticky;
  top: 0;
  z-index: 20;
  background: rgba(255, 255, 255, 0.94);
  color: var(--brand-navy);
  backdrop-filter: blur(10px);
  box-shadow: 0 10px 30px rgba(15, 31, 77, 0.08);
  border-bottom: 1px solid rgba(219, 228, 240, 0.85);
}

.shop-header__inner,
.shop-container {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
}

.shop-header__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 14px 0;
}

.shop-brand {
  display: flex;
  align-items: center;
  gap: 12px;
  color: var(--brand-navy);
  text-decoration: none;
  font-weight: 700;
  min-width: 0;
}

.shop-brand img {
  width: 58px;
  height: 58px;
  object-fit: contain;
  flex: 0 0 auto;
}

.shop-brand__text {
  display: grid;
  min-width: 0;
}

.shop-brand__text strong {
  font-size: 1rem;
  line-height: 1.2;
}

.shop-nav {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: nowrap;
}

.shop-nav a,
.shop-nav button {
  color: var(--brand-navy);
  text-decoration: none;
  background: transparent;
  border: 1px solid transparent;
  padding: 10px 12px;
  border-radius: 999px;
  cursor: pointer;
  font-weight: 600;
  white-space: nowrap;
}

.shop-nav a:hover,
.shop-nav a.is-active,
.shop-nav button:hover,
.shop-nav button.is-active {
  border-color: rgba(4, 107, 210, 0.12);
  background: rgba(4, 107, 210, 0.08);
}

.shop-nav .is-accent {
  background: var(--brand-orange);
}

.shop-hero {
  padding: 44px 0 26px;
}

.shop-hero__card,
.panel {
  background: var(--brand-surface);
  border: 1px solid rgba(219, 228, 240, 0.8);
  border-radius: 24px;
  box-shadow: 0 18px 50px rgba(15, 31, 77, 0.08);
}

.shop-hero__card {
  padding: 32px;
  display: grid;
  gap: 12px;
}

.shop-hero__eyebrow {
  color: var(--brand-orange);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-size: 0.82rem;
}

.shop-hero h1,
.page-title {
  margin: 0;
  color: var(--brand-navy);
}

.shop-layout {
  display: grid;
  grid-template-columns: 260px 1fr;
  gap: 24px;
  padding-bottom: 40px;
}

.panel {
  padding: 24px;
}

.filter-list,
.admin-list {
  list-style: none;
  margin: 0;
  padding: 0;
}

.filter-list li + li,
.admin-list li + li {
  margin-top: 10px;
}

.filter-link {
  display: block;
  padding: 12px 14px;
  border-radius: 14px;
  text-decoration: none;
  color: var(--brand-text);
  background: var(--brand-ice);
  font-weight: 600;
}

.filter-link.is-active,
.filter-link:hover {
  background: var(--brand-navy);
  color: #fff;
}

.product-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 20px;
}

.product-card {
  position: relative;
  overflow: hidden;
  display: grid;
  background: var(--brand-surface);
  border: 1px solid var(--brand-border);
  border-radius: 22px;
  box-shadow: 0 14px 36px rgba(15, 31, 77, 0.08);
}

.product-card__image {
  width: 100%;
  height: 220px;
  object-fit: cover;
  background: #eef2f8;
}

.product-card__body {
  padding: 18px;
  display: grid;
  gap: 10px;
}

.product-card__title {
  margin: 0;
  font-size: 1.05rem;
  color: var(--brand-navy);
}

.product-card__meta {
  color: var(--brand-muted);
  font-size: 0.95rem;
}

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

.price-row strong {
  color: var(--brand-orange);
  font-size: 1.18rem;
}

.price-row s {
  color: var(--brand-muted);
}

.badge,
.stock-pill {
  display: inline-flex;
  align-items: center;
  width: fit-content;
  padding: 6px 10px;
  border-radius: 999px;
  font-size: 0.82rem;
  font-weight: 700;
}

.badge {
  position: absolute;
  top: 14px;
  right: 14px;
  background: var(--brand-orange);
  color: #fff;
}

.stock-pill.in-stock {
  color: var(--brand-success);
  background: rgba(34, 139, 78, 0.12);
}

.stock-pill.out-of-stock {
  color: var(--brand-danger);
  background: rgba(197, 61, 54, 0.12);
}

.button-row {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 16px;
  border: 0;
  border-radius: 14px;
  text-decoration: none;
  cursor: pointer;
  font-weight: 700;
}

.btn-primary {
  background: var(--brand-orange);
  color: #fff;
}

.btn-primary:hover {
  background: var(--brand-orange-dark);
}

.btn-secondary {
  background: var(--brand-navy);
  color: #fff;
}

.btn-ghost {
  background: #edf2f8;
  color: var(--brand-navy);
}

.btn-success {
  background: #1f9f54;
  color: #fff;
}

.btn-danger {
  background: #ca4d43;
  color: #fff;
}

.btn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

.floating-cart {
  position: fixed;
  right: 22px;
  bottom: 22px;
  z-index: 30;
}

.floating-cart .btn {
  border-radius: 999px;
  box-shadow: 0 16px 40px rgba(15, 31, 77, 0.22);
}

.alert {
  padding: 14px 16px;
  border-radius: 14px;
  margin-bottom: 18px;
}

.alert-info {
  background: #eaf3ff;
  color: #275388;
}

.alert-error {
  background: #fdeceb;
  color: #a53831;
}

.alert-success {
  background: #ebf7ef;
  color: #216f44;
}

.cart-table,
.admin-table {
  width: 100%;
  border-collapse: collapse;
}

.cart-table th,
.cart-table td,
.admin-table th,
.admin-table td {
  padding: 14px 12px;
  border-bottom: 1px solid var(--brand-border);
  text-align: left;
  vertical-align: top;
}

.cart-product {
  display: flex;
  gap: 14px;
  align-items: center;
}

.cart-product img,
.detail-image {
  width: 88px;
  height: 88px;
  border-radius: 16px;
  object-fit: cover;
  background: #edf2f8;
}

.summary-box {
  display: grid;
  gap: 12px;
  background: var(--brand-ice);
  border-radius: 18px;
  padding: 20px;
}

.summary-line {
  display: flex;
  justify-content: space-between;
  gap: 16px;
}

.summary-line.total {
  padding-top: 12px;
  border-top: 1px solid var(--brand-border);
  font-weight: 700;
  color: var(--brand-navy);
}

.two-col {
  display: grid;
  grid-template-columns: 1.2fr 0.8fr;
  gap: 24px;
}

.form-grid {
  display: grid;
  gap: 16px;
}

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

.field label {
  display: block;
  margin-bottom: 8px;
  font-weight: 700;
  color: var(--brand-navy);
}

.field input,
.field textarea,
.field select {
  width: 100%;
  padding: 12px 14px;
  border: 1px solid var(--brand-border);
  border-radius: 14px;
  font: inherit;
  background: #fff;
}

.field textarea {
  min-height: 120px;
  resize: vertical;
}

.payment-note,
.status-chip {
  border-radius: 14px;
  padding: 12px 14px;
}

.payment-note {
  background: #eaf3ff;
  color: #24496f;
}

.status-chip {
  display: inline-flex;
  font-weight: 700;
  background: #eef3f8;
}

.status-chip.paid,
.status-chip.delivered {
  color: var(--brand-success);
  background: rgba(34, 139, 78, 0.12);
}

.status-chip.pending,
.status-chip.processing {
  color: #a46a00;
  background: rgba(243, 181, 58, 0.18);
}

.status-chip.shipped {
  color: #2a5daa;
  background: rgba(42, 93, 170, 0.12);
}

.detail-layout {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 28px;
  align-items: start;
}

.detail-image {
  width: 100%;
  height: 420px;
}

.muted {
  color: var(--brand-muted);
}

@media (max-width: 900px) {
  .shop-layout,
  .two-col,
  .detail-layout,
  .form-grid.two {
    grid-template-columns: 1fr;
  }

  .shop-header__inner {
    align-items: flex-start;
    flex-direction: column;
  }

  .shop-nav {
    flex-wrap: wrap;
  }
}
