.my-orders-noon-shell {
  --orders-bg: linear-gradient(180deg, #fafbfd 0%, #f7f8fb 28%, #f7f8fb 100%);
  --orders-card-border: var(--noon-border, #e4e8f0);
  --orders-card-shadow: 0 10px 22px rgba(15, 23, 42, 0.08);
  --orders-text: var(--noon-text, #102c43);
  --orders-muted: var(--noon-muted, #6b7c93);
  --orders-separator: #e6ebf3;
  --orders-express: var(--noon-yellow, #ffe600);
  --orders-accent: var(--noon-blue, #3866df);
  min-height: 100vh;
  padding-bottom: 0 !important;
  background: var(--orders-bg);
  overflow-x: hidden;
}

.my-orders-noon-shell,
.my-orders-noon-shell *,
.my-orders-noon-shell *::before,
.my-orders-noon-shell *::after {
  box-sizing: border-box;
}

.my-orders-noon-shell .app-header,
.my-orders-noon-shell .bottom-nav {
  display: none !important;
}

.my-orders-noon-main {
  width: 100%;
  max-width: 900px;
  margin-inline: auto;
  padding: 8px clamp(6px, 2.8vw, 10px) 18px;
  display: grid;
  gap: 12px;
  box-sizing: border-box;
}

.orders-page-header {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  padding: 30px 2px 0;
}

.orders-page-header h1 {
  margin: 0;
  color: var(--noon-blue-strong, #2b4db2);
  font-size: clamp(1.3rem, 4.6vw, 1.65rem);
  font-weight: 900;
  line-height: 1;
}

.orders-top-controls {
  border: 1px solid #dbe4f3;
  border-radius: 14px;
  background: #ffffff;
  padding: 8px;
  box-shadow: 0 8px 18px rgba(56, 102, 223, 0.08);
}

.orders-status-tabs {
  display: flex;
  gap: 6px;
  overflow-x: auto;
  padding: 4px 0;
  scrollbar-width: none;
}

.orders-status-tabs::-webkit-scrollbar {
  display: none;
}

.orders-tab {
  flex: 0 0 auto;
  min-height: 36px;
  padding: 0 12px;
  border: 1px solid #dbe4f3;
  border-radius: 18px;
  background: #ffffff;
  color: #4a5568;
  font-family: inherit;
  font-size: 0.82rem;
  font-weight: 700;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  transition: background 0.15s ease, color 0.15s ease, border-color 0.15s ease;
  white-space: nowrap;
}

.orders-tab:hover {
  background: #edf3ff;
  border-color: #c8d6f0;
}

.orders-tab.active {
  background: #3866df;
  color: #ffffff;
  border-color: #3866df;
}

.orders-tab-count {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 18px;
  height: 18px;
  border-radius: 999px;
  background: rgba(0, 0, 0, 0.08);
  font-size: 0.72rem;
  font-weight: 800;
  padding: 0 4px;
}

.orders-tab.active .orders-tab-count {
  background: rgba(255, 255, 255, 0.25);
}

.status-note {
  margin: 0;
}

.orders-control-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(130px, 0.66fr);
  gap: 8px;
}

.orders-control {
  position: relative;
  min-height: 47px;
  border: 1px solid #d8e0ee;
  border-radius: 9px;
  background: #fcfdff;
  box-shadow: inset 0 0 0 1px rgba(255, 230, 0, 0.16);
}

.orders-control-search span,
.orders-control-period span {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  color: #64758b;
}

.orders-control-search span {
  right: 10px;
  font-size: 20px;
}

.orders-control-period span {
  left: 8px;
  pointer-events: none;
  font-size: 19px;
}

.orders-control-search input,
.orders-control-period select {
  width: 100%;
  height: 100%;
  border: 0;
  outline: 0;
  background: transparent;
  color: var(--orders-text);
  font-family: inherit;
  font-size: 0.95rem;
}

.orders-control-search input {
  padding: 0 36px 0 10px;
}

.orders-control-period select {
  appearance: none;
  padding: 0 10px 0 30px;
}

.orders-control-search input::placeholder {
  color: #8a9ab2;
}

.orders-list {
  display: grid;
  gap: 12px;
}

.orders-group {
  display: grid;
  gap: 8px;
}

.orders-group-title {
  margin: 0;
  color: var(--noon-blue-strong, #2b4db2);
  font-size: 1.05rem;
  font-weight: 900;
  padding: 0 3px;
}

.orders-group-title::after {
  content: "";
  display: block;
  width: 34px;
  height: 4px;
  border-radius: 999px;
  background: var(--noon-yellow, #ffe600);
  margin-top: 4px;
}

.orders-group-list {
  display: grid;
  gap: 10px;
}

.noon-order-card {
  position: relative;
  border: 1px solid var(--orders-card-border);
  border-radius: 18px;
  background: #ffffff;
  box-shadow: var(--orders-card-shadow);
  padding: 10px;
  overflow: visible;
}

.noon-order-card::before {
  content: "";
  position: absolute;
  top: 8px;
  bottom: 8px;
  inset-inline-start: 0;
  width: 3px;
  border-radius: 999px;
  background: linear-gradient(180deg, #4e8cff 0%, #2f6fe4 100%);
}

.noon-order-top {
  display: grid;
  grid-template-columns: 32px minmax(0, 1fr) 32px;
  grid-template-areas: "menu status state";
  gap: 8px;
  align-items: center;
  direction: ltr;
}

.noon-order-top > * {
  min-width: 0;
}

.noon-order-menu-wrap {
  grid-area: menu;
  position: relative;
  justify-self: start;
  direction: ltr;
}

.noon-menu-btn {
  width: 30px;
  height: 30px;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: #8b94a8;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.noon-menu-btn:hover,
.noon-menu-btn:focus-visible {
  background: #edf3ff;
}

.noon-menu-btn .material-icons-outlined {
  font-size: 22px;
}

.noon-order-menu {
  position: absolute;
  top: calc(100% + 4px);
  left: 0;
  right: auto;
  width: 176px;
  max-width: min(176px, calc(100vw - 16px));
  border: 1px solid #d8e2f1;
  border-radius: 10px;
  background: #fff;
  box-shadow: 0 14px 28px rgba(15, 23, 42, 0.16);
  padding: 4px;
  display: none;
  z-index: 20;
  overflow: hidden;
}

.noon-order-menu.is-open {
  display: grid;
}

.noon-order-menu.is-flip-inline-end {
  left: auto;
  right: 0;
}

.noon-order-menu button {
  min-height: 34px;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: #273b5f;
  font-family: inherit;
  font-size: 0.83rem;
  font-weight: 800;
  text-align: right;
  cursor: pointer;
  padding: 0 9px;
  display: flex;
  align-items: center;
  gap: 6px;
}

.noon-order-menu button .material-icons-outlined {
  font-size: 17px;
  color: #51668b;
}

.noon-order-menu button:hover {
  background: #edf3ff;
}

.noon-order-menu button.is-danger {
  color: #a3132e;
}

.noon-order-menu button.is-danger .material-icons-outlined {
  color: #a3132e;
}

.noon-order-menu button.is-danger:hover {
  background: #fff2f4;
}

.noon-order-status-line {
  grid-area: status;
  margin: 4px 0 0;
  color: #17325c;
  font-size: clamp(0.9rem, 2.8vw, 0.99rem);
  font-weight: 900;
  line-height: 1.45;
  direction: rtl;
  text-align: right;
  min-width: 0;
}

.noon-order-state-icon {
  grid-area: state;
  width: 32px;
  height: 32px;
  border-radius: 11px;
  background: #ebf1ff;
  color: var(--orders-accent);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-top: 2px;
  justify-self: end;
}

.noon-order-state-icon .material-icons-outlined {
  font-size: 19px;
}

.noon-order-state-icon.is-delivered {
  background: #e8f9ed;
  color: #1f7a39;
}

.noon-order-state-icon.is-cancelled {
  background: #f5eee7;
  color: #5b6475;
}

.noon-order-state-icon.is-confirmed {
  background: #dcfce7;
  color: #166534;
}

.noon-order-state-icon.is-onhold {
  background: #fef9c3;
  color: #854d0e;
}

.noon-order-state-icon.is-returned {
  background: #f3e8ff;
  color: #6b21a8;
}

.noon-order-state-icon.is-pending,
.noon-order-state-icon.is-preparing,
.noon-order-state-icon.is-shipped,
.noon-order-state-icon.is-in_transit {
  background: #e7efff;
  color: var(--orders-accent);
}

.noon-review-action-wrap {
  margin-top: 8px;
}

.noon-review-action-btn {
  width: 100%;
  min-height: 30px;
  border: 0;
  border-radius: 20px;
  background: #29486a;
  color: #fff;
  font-family: inherit;
  font-size: 0.95rem;
  font-weight: 900;
  letter-spacing: 0.1px;
  cursor: pointer;
  transition: transform 0.12s ease, filter 0.12s ease;
}

.noon-review-action-btn:hover,
.noon-review-action-btn:focus-visible {
  filter: brightness(0.95);
}

.noon-review-action-btn:active {
  transform: translateY(1px);
}

.noon-order-product {
  margin-top: 8px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 92px;
  gap: 10px;
  align-items: center;
  direction: ltr;
}

.noon-order-image {
  width: 92px;
  height: 92px;
  border: 1px solid #e0e6f1;
  border-radius: 10px;
  background: #fafbfd;
  overflow: hidden;
}

.noon-order-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.noon-order-image img.is-fallback-image {
  object-fit: contain;
}

.noon-order-copy {
  min-width: 0;
  direction: rtl;
  text-align: right;
  color: #2a3f64;
}

.noon-order-copy small {
  display: block;
  color: #8f98ac;
  font-size: 0.78rem;
  font-weight: 700;
  margin-bottom: 1px;
}

.noon-order-title {
  margin: 0;
  font-size: clamp(0.92rem, 3.2vw, 1.02rem);
  line-height: 1.35;
  font-weight: 900;
  color: #243f63;
  display: -webkit-box;
  overflow: hidden;
  text-overflow: ellipsis;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

.noon-order-price {
  margin: 2px 0 0;
  color: #1f304d;
  font-size: clamp(1.18rem, 4.5vw, 1.42rem);
  font-weight: 700;
  line-height: 1.3;
}

.noon-order-more {
  margin: 2px 0 0;
  color: #6e7990;
  font-size: 0.76rem;
  font-weight: 800;
}

.noon-order-variant {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin: 4px 0 0;
  padding: 2px 10px;
  background: #eef2ff;
  border: 1px solid #e0e7ff;
  border-radius: 999px;
  color: #4338ca;
  font-size: 0.74rem;
  font-weight: 800;
  line-height: 1.6;
}

.noon-order-variant-swatch {
  width: 14px;
  height: 14px;
  border-radius: 50%;
  flex-shrink: 0;
  box-shadow: 0 0 0 1px #c7d2fe;
}

.noon-old-price {
  margin: 2px 0 0;
  color: #94a3b8;
  font-size: 0.82rem;
  font-weight: 500;
  text-decoration: line-through;
  text-decoration-color: #cbd5e1;
}

.noon-discount-pill {
  display: inline-block;
  margin-top: 3px;
  padding: 1px 7px;
  border-radius: 999px;
  background: #fee2e2;
  color: #b91c1c;
  font-size: 0.7rem;
  font-weight: 800;
  letter-spacing: 0.3px;
}

.noon-order-footer {
  margin-top: 9px;
  padding-top: 8px;
  border-top: 1px solid var(--orders-separator);
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 8px;
  min-width: 0;
}

.noon-express-pill {
  min-height: 20px;
  border-radius: 999px;
  background: var(--orders-express);
  color: #443c00;
  padding: 0 11px;
  font-size: 0.81rem;
  font-weight: 900;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  white-space: nowrap;
}

.noon-order-ref {
  color: #7f8ea8;
  font-size: 0.8rem;
  font-weight: 700;
  white-space: nowrap;
  max-width: 100%;
  min-width: 0;
  flex: 1 1 auto;
  text-align: left;
  overflow: hidden;
}

.noon-order-ref-code {
  display: inline-block;
  max-width: 10ch;
  direction: ltr;
  text-overflow: ellipsis;
  overflow: hidden;
  vertical-align: bottom;
}

.my-order-empty,
.my-order-filter-empty {
    border: 1px dashed #000000;
    border-radius: 100px;
    background: #ffffff;
    padding: 250px 12px;
    text-align: center;
    color: #000000;
    display: grid;
    gap: 11px;
}

.my-order-empty h3,
.my-order-filter-empty h3 {
  margin: 0;
  font-size: 1rem;
  color: var(--noon-blue-strong, #2b4db2);
}

.my-order-empty p,
.my-order-filter-empty p {
  margin: 0;
  font-size: 0.84rem;
}

.my-order-empty .btn-primary,
.my-order-filter-empty .btn-secondary {
  width: fit-content;
  justify-self: center;
}

@media (max-width: 480px) {
  .orders-control-grid {
    grid-template-columns: 1fr 0.74fr;
  }
}

@media (max-width: 430px) {
  .my-orders-noon-main {
    padding-inline: 8px;
  }

  .orders-page-header h1 {
    font-size: 1.28rem;
  }

  .orders-top-controls {
    padding: 7px;
    border-radius: 12px;
  }

  .noon-order-product {
    grid-template-columns: minmax(0, 1fr) 86px;
    gap: 8px;
  }

  .noon-order-image {
    width: 86px;
    height: 86px;
  }
}

@media (max-width: 390px) {
  .orders-control-grid {
    grid-template-columns: minmax(0, 1fr) minmax(112px, 0.7fr);
    gap: 7px;
  }

  .orders-control {
    min-height: 44px;
  }

  .noon-order-card {
    border-radius: 16px;
    padding: 9px;
  }

  .noon-order-status-line {
    font-size: 0.88rem;
    line-height: 1.4;
  }
}

@media (max-width: 360px) {
  .my-orders-noon-main {
    padding-inline: 6px;
  }

  .noon-order-menu {
    width: 164px;
  }

  .noon-order-product {
    grid-template-columns: minmax(0, 1fr) 80px;
    gap: 7px;
  }

  .noon-order-image {
    width: 80px;
    height: 80px;
  }

  .noon-order-title {
    font-size: 0.89rem;
  }

  .noon-order-price {
    font-size: 1.12rem;
  }
}

@media (max-width: 320px) {
  .my-orders-noon-main {
    padding-inline: 5px;
  }

  .orders-page-header h1 {
    font-size: 1.14rem;
  }

  .orders-control-grid {
    grid-template-columns: minmax(0, 1fr) minmax(104px, 0.7fr);
    gap: 6px;
  }

  .noon-order-menu {
    width: 154px;
  }

  .noon-order-product {
    grid-template-columns: minmax(0, 1fr) 72px;
    gap: 6px;
  }

  .noon-order-image {
    width: 72px;
    height: 72px;
  }
}

@media (min-width: 1200px) {
  .my-orders-noon-shell .app-header {
    display: block !important;
  }
  .my-orders-noon-main {
    max-width: 1440px !important;
    padding: 20px 24px !important;
  }
}
