@font-face {
  font-family: "Vazirmatn";
  src: url("../assets/libs/vazirmatn/Vazirmatn-Regular.woff2") format("woff2");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Vazirmatn";
  src: url("../assets/libs/vazirmatn/Vazirmatn-Bold.woff2") format("woff2");
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}


/* =========================
   Base
========================= */

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;

  background: linear-gradient(
    180deg,
    #f5f9fd 0%,
    #eef4f9 100%
  );

  color: #172b3a;

  font-family:
    Vazirmatn,
    Tahoma,
    Arial,
    sans-serif;

  line-height: 1.8;
  direction: rtl;
}

button,
input {
  font: inherit;
}


/* =========================
   Orders Page
========================= */

.my-orders-page {
  min-height: 100vh;
  padding: 32px 16px;
}

.orders-shell {
  width: min(1050px, 100%);
  margin: auto;
}


/* =========================
   Orders Header
========================= */

.orders-header {
  background: linear-gradient(
    135deg,
    #ffffff 0%,
    #f8fbff 100%
  );

  border: 1px solid #e1e7ef;
  border-radius: 20px;

  padding: 26px 28px;
  margin-bottom: 14px;

  box-shadow:
    0 8px 26px rgba(20, 45, 70, 0.055);
}

.eyebrow {
  display: inline-block;

  font-size: 12px;
  font-weight: 700;

  color: #5b7cfa;
  background: #eef2ff;

  padding: 4px 9px;
  border-radius: 7px;

  margin-bottom: 7px;
}

.orders-header h1 {
  margin: 0 0 7px;

  font-size: 28px;
  line-height: 1.5;

  color: #172b3a;
}

.orders-header p {
  margin: 0;

  color: #667085;
  font-size: 14px;
}


/* =========================
   Phone Form
========================= */

.phone-form {
  position: relative;

  background: linear-gradient(
    135deg,
    #ffffff 0%,
    #f9fbff 100%
  );

  border: 1px solid #dfe6ef;
  border-radius: 20px;

  padding: 22px 24px 19px;
  margin-bottom: 16px;

  box-shadow:
    0 9px 28px rgba(20, 45, 70, 0.055);
}

.phone-form::before {
  content: "";

  position: absolute;

  top: 0;
  right: 24px;
  left: 24px;

  height: 3px;

  border-radius: 0 0 6px 6px;

  background: linear-gradient(
    90deg,
    #5b7cfa,
    #7c9cff
  );
}

.phone-form label {
  display: block;

  font-size: 14px;
  font-weight: 800;

  color: #263746;

  margin-bottom: 10px;
}

.phone-row {
  display: flex;

  gap: 10px;
  align-items: stretch;
}


/* =========================
   Phone Input
========================= */

.phone-row input {
  flex: 1;
  min-width: 0;

  height: 54px;
  box-sizing: border-box;

  border: 1px solid #cfd8e3;
  border-radius: 12px;

  padding: 0 16px;

  outline: none;

  direction: ltr;
  text-align: left;

  background: #ffffff;
  color: #172b3a;

  font-size: 16px;
  font-weight: 500;

  box-shadow:
    inset 0 1px 2px rgba(20, 40, 60, 0.025),
    0 2px 6px rgba(20, 40, 60, 0.025);

  transition:
    border-color 0.2s ease,
    box-shadow 0.2s ease,
    background 0.2s ease;
}

.phone-row input::placeholder {
  color: #9aa5b1;
  font-weight: 400;
}

.phone-row input:hover {
  border-color: #b9c5d3;
}

.phone-row input:focus {
  background: #ffffff;

  border-color: #5b7cfa;

  box-shadow:
    0 0 0 4px rgba(91, 124, 250, 0.10),
    0 5px 14px rgba(91, 124, 250, 0.08);
}


/* =========================
   Submit Button
========================= */

.phone-row button {
  height: 54px;
  box-sizing: border-box;

  border: 0;
  border-radius: 12px;

  padding: 0 24px;

  background: linear-gradient(
    135deg,
    #263342 0%,
    #182431 100%
  );

  color: #ffffff;

  font-size: 14px;
  font-weight: 800;

  cursor: pointer;

  box-shadow:
    0 5px 12px rgba(24, 36, 49, 0.14);

  transition:
    transform 0.15s ease,
    box-shadow 0.15s ease,
    background 0.2s ease;
}

.phone-row button:hover {
  background: linear-gradient(
    135deg,
    #334354 0%,
    #202f3e 100%
  );

  box-shadow:
    0 7px 16px rgba(24, 36, 49, 0.18);

  transform: translateY(-1px);
}

.phone-row button:active {
  transform: translateY(0);

  box-shadow:
    0 3px 8px rgba(24, 36, 49, 0.14);
}

.phone-row button:disabled {
  opacity: 0.6;
  cursor: wait;
  transform: none;
}


/* =========================
   Privacy Note
========================= */

.phone-form small {
  display: block;

  color: #7b8491;

  font-size: 11.5px;
  line-height: 1.8;

  margin-top: 10px;
  padding: 0 2px;
}


/* =========================
   Messages
========================= */

.message {
  padding: 13px 15px;

  border-radius: 12px;
  margin-bottom: 16px;

  background: #fff4e5;
  color: #8a5600;

  border: 1px solid #f3d29b;
}

.message.success {
  background: #edf8f0;
  color: #246b3b;

  border-color: #b9e2c4;
}


/* =========================
   Orders Summary
========================= */

.orders-summary {
  font-size: 14px;
  font-weight: 700;

  color: #475467;

  margin: 0 4px 12px;
}


/* =========================
   Orders List
========================= */

.orders-list {
  display: grid;

  grid-template-columns:
    repeat(2, minmax(0, 1fr));

  gap: 16px;
}


/* =========================
   Order Card
========================= */

.order-card {
  background: #ffffff;

  border: 1px solid #e0e5eb;
  border-radius: 18px;

  overflow: hidden;

  box-shadow:
    0 8px 24px rgba(0, 0, 0, 0.05);
}

.order-top {
  padding: 17px 18px;

  border-bottom: 1px solid #edf0f3;

  display: flex;

  justify-content: space-between;

  gap: 12px;
  align-items: flex-start;
}

.order-title {
  font-weight: 800;
  font-size: 16px;

  margin-bottom: 5px;
}

.order-code {
  font-size: 12px;

  color: #77808c;

  direction: ltr;
  text-align: right;
}

.badge {
  padding: 6px 9px;

  border-radius: 999px;

  font-size: 11px;
  font-weight: 700;

  white-space: nowrap;

  background: #eef2f6;
  color: #495465;
}

.badge.paid,
.badge.processing {
  background: #eaf5ff;
  color: #145b88;
}

.badge.completed {
  background: #eaf8ef;
  color: #25713e;
}

.badge.canceled {
  background: #fff0f0;
  color: #a53b3b;
}

.badge.pending {
  background: #fff7df;
  color: #8b6500;
}


/* =========================
   Order Body
========================= */

.order-body {
  padding: 17px 18px;
}

.meta-grid {
  display: grid;

  grid-template-columns:
    repeat(2, minmax(0, 1fr));

  gap: 10px;

  margin-bottom: 15px;
}

.meta {
  background: #f7f8fa;

  border-radius: 10px;

  padding: 10px 11px;

  min-width: 0;
}

.meta span {
  display: block;

  font-size: 11px;

  color: #7b8491;

  margin-bottom: 4px;
}

.meta strong {
  display: block;

  font-size: 13px;

  overflow-wrap: anywhere;
}


/* =========================
   Order Description
========================= */

.order-description {
  font-size: 13px;
  line-height: 1.8;

  color: #4b5563;

  background: #fafafa;

  border-radius: 10px;

  padding: 10px 11px;

  margin-bottom: 15px;
}


/* =========================
   Items
========================= */

.items {
  border-top: 1px solid #edf0f3;

  padding-top: 13px;
}

.items-title {
  font-weight: 800;
  font-size: 13px;

  margin-bottom: 8px;
}

.item {
  border: 1px solid #e8ebef;

  border-radius: 11px;

  padding: 10px;

  margin-top: 8px;
}

.item-main {
  display: flex;

  justify-content: space-between;

  gap: 10px;

  font-size: 12px;
}

.item-details {
  color: #667085;

  line-height: 1.9;

  margin-top: 5px;

  font-size: 11px;
}


/* =========================
   Address
========================= */

.address-box {
  margin-top: 15px;

  border-top: 1px solid #edf0f3;

  padding-top: 13px;
}

.address-row {
  display: flex;

  align-items: center;

  justify-content: space-between;

  gap: 10px;

  margin-top: 8px;

  font-size: 12px;
}

.address-value {
  color: #59636f;

  line-height: 1.8;

  overflow-wrap: anywhere;
}

.clear-address {
  border: 1px solid #e1b4b4;

  background: #fff7f7;

  color: #a13d3d;

  border-radius: 8px;

  padding: 7px 10px;

  font-size: 11px;

  cursor: pointer;

  white-space: nowrap;
}

.clear-address:hover {
  background: #fff0f0;
}

.clear-address:disabled {
  opacity: 0.55;
  cursor: wait;
}


/* =========================
   Order Footer
========================= */

.order-footer {
  border-top: 1px solid #edf0f3;

  padding: 14px 18px;

  display: flex;

  justify-content: space-between;
  align-items: center;

  gap: 12px;

  flex-wrap: wrap;
}

.total-wrap {
  display: flex;

  align-items: center;

  gap: 8px;
}

.total-label {
  font-size: 12px;

  color: #737d89;
}

.total {
  font-size: 17px;

  font-weight: 900;
}


/* =========================
   Hide Order
========================= */

.hide-order {
  border: 1px solid #fecaca;

  background: #fff1f2;

  color: #b42318;

  border-radius: 8px;

  padding: 9px 13px;

  font-family: inherit;

  font-size: 12px;
  font-weight: 700;

  cursor: pointer;
}

.hide-order:hover {
  background: #ffe4e6;
}


/* =========================
   Empty State
========================= */

.empty {
  background: #ffffff;

  border: 1px dashed #cbd2da;

  border-radius: 16px;

  padding: 35px 20px;

  text-align: center;

  color: #667085;

  grid-column: 1 / -1;
}


/* =========================
   Mobile
========================= */

@media (max-width: 700px) {

  .my-orders-page {
    min-height: 100vh;

    padding: 10px 8px;
  }


  /* Header */

  .orders-header {
    border-radius: 16px;

    padding: 16px 15px;

    margin-bottom: 10px;
  }

  .eyebrow {
    font-size: 11px;

    padding: 3px 8px;

    margin-bottom: 5px;
  }

  .orders-header h1 {
    font-size: 22px;

    line-height: 1.4;

    margin-bottom: 3px;
  }

  .orders-header p {
    font-size: 12px;

    line-height: 1.75;
  }


  /* Phone Form */

  .phone-form {
    border-radius: 16px;

    padding: 17px 14px 14px;

    margin-bottom: 12px;
  }

  .phone-form::before {
    right: 18px;
    left: 18px;

    height: 3px;
  }

  .phone-form label {
    font-size: 13px;

    margin-bottom: 8px;
  }

  .phone-row {
    flex-direction: column;

    gap: 8px;
  }


  /* Phone Input */

  .phone-row input {
    width: 100%;

    height: 62px;

    box-sizing: border-box;

    border-radius: 15px;

    padding: 0 17px;

    font-size: 20px;

    background: #ffffff;

    border: 1px solid #cbd6e2;

    box-shadow:
      inset 0 1px 2px rgba(20, 40, 60, 0.025),
      0 3px 10px rgba(30, 55, 80, 0.045);
  }

  .phone-row input::placeholder {
    font-size: 20px;

    color: #9aa6b4;
  }

  .phone-row input:focus {
    border-color: #5b7cfa;

    box-shadow:
      0 0 0 4px rgba(91, 124, 250, 0.10),
      0 5px 14px rgba(91, 124, 250, 0.08);
  }


  /* Button */

  .phone-row button {
    width: 100%;

    height: 50px;

    border-radius: 13px;

    padding: 0 18px;

    font-size: 14px;
  }


  /* Privacy */

  .phone-form small {
    font-size: 10.5px;

    line-height: 1.75;

    margin-top: 8px;
  }


  /* Orders */

  .orders-list {
    grid-template-columns: 1fr;

    gap: 12px;
  }

  .order-top {
    padding: 14px;
  }

  .order-body {
    padding: 14px;
  }

  .order-footer {
    padding: 13px 14px;

    align-items: stretch;
  }

  .meta-grid {
    grid-template-columns: 1fr;
  }

  .address-row {
    align-items: flex-start;

    flex-direction: column;
  }

  .clear-address {
    width: 100%;
  }

  .total-wrap,
  .hide-order {
    width: 100%;
  }

  .total-wrap {
    justify-content: space-between;
  }

  .hide-order {
    min-height: 42px;
  }
}


/* =========================
   Very Small Phones
========================= */

@media (max-width: 380px) {

  .my-orders-page {
    padding: 8px 7px;
  }

  .orders-header {
    padding: 15px 13px;
  }

  .orders-header h1 {
    font-size: 20px;
  }

  .phone-form {
    padding: 16px 12px 13px;
  }

  .phone-row input {
    height: 60px;

    font-size: 19px;
  }

  .phone-row input::placeholder {
    font-size: 19px;
  }

  .phone-row button {
    height: 48px;
  }

  .phone-form small {
    font-size: 10px;
  }
}
/* =========================================================
   MOBILE ORDER CARD - COMPACT VERSION
   کاهش ارتفاع کارت سفارش بدون کاهش محسوس خوانایی
========================================================= */

@media (max-width: 700px) {

  /* -------------------------
     Order Card
  ------------------------- */

  .order-card {
    border-radius: 16px;
  }


  /* -------------------------
     Order Header
  ------------------------- */

  .order-top {
    padding: 13px 14px 11px;
    gap: 8px;
  }

  .order-title {
    font-size: 15px;
    margin-bottom: 2px;
  }

  .order-code {
    font-size: 11px;
  }

  .badge {
    padding: 5px 8px;
    font-size: 10px;
  }


  /* -------------------------
     Order Body
  ------------------------- */

  .order-body {
    padding: 12px 14px;
  }


  /* -------------------------
     Meta Information
     دو ستونه روی موبایل
  ------------------------- */

  .meta-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
    margin-bottom: 11px;
  }

  .meta {
    border-radius: 10px;
    padding: 8px 9px;
  }

  .meta span {
    font-size: 10px;
    margin-bottom: 2px;
  }

  .meta strong {
    font-size: 12px;
    line-height: 1.6;
  }


  /* -------------------------
     Description
  ------------------------- */

  .order-description {
    font-size: 12px;
    line-height: 1.7;

    padding: 8px 10px;
    margin-bottom: 11px;

    border-radius: 9px;
  }


  /* -------------------------
     Items Section
  ------------------------- */

  .items {
    padding-top: 10px;
  }

  .items-title {
    font-size: 13px;
    margin-bottom: 6px;
  }


  /* -------------------------
     Individual Item
  ------------------------- */

  .item {
    border-radius: 10px;

    padding: 8px 10px;

    margin-top: 6px;
  }

  .item-main {
    gap: 8px;
    font-size: 12px;
    line-height: 1.6;
  }

  .item-details {
    font-size: 10.5px;
    line-height: 1.7;

    margin-top: 3px;
  }


  /* -------------------------
     Address
  ------------------------- */

  .address-box {
    margin-top: 11px;
    padding-top: 10px;
  }

  .address-row {
    margin-top: 6px;
    gap: 7px;

    font-size: 11px;
  }

  .address-value {
    line-height: 1.7;
  }

  .clear-address {
    padding: 6px 9px;
    font-size: 10.5px;
  }


  /* -------------------------
     Footer
  ------------------------- */

  .order-footer {
    padding: 11px 14px;

    gap: 8px;
  }

  .total-wrap {
    gap: 6px;
  }

  .total-label {
    font-size: 11px;
  }

  .total {
    font-size: 16px;
  }

  .hide-order {
    min-height: 38px;
    padding: 8px 12px;
    font-size: 11px;
  }
}


/* =========================================================
   VERY SMALL PHONES
========================================================= */

@media (max-width: 380px) {

  .order-top {
    padding: 11px 12px 10px;
  }

  .order-body {
    padding: 10px 12px;
  }

  .meta-grid {
    gap: 6px;
  }

  .meta {
    padding: 7px 8px;
  }

  .meta span {
    font-size: 9.5px;
  }

  .meta strong {
    font-size: 11.5px;
  }

  .item {
    padding: 7px 9px;
    margin-top: 5px;
  }

  .item-main {
    font-size: 11.5px;
  }

  .item-details {
    font-size: 10px;
  }

  .order-footer {
    padding: 10px 12px;
  }
  .phone-form input[type="tel"] {
  flex: 1;
  padding: 0.65rem 0.875rem;
  font-size: 0.9rem;
  border: 1px solid #cbd5e1;
  border-radius: 0.75rem;
  outline: none;
  transition: all 0.2s ease;
  background-color: #fff;
  direction: ltr; /* راحت‌تر برای تایپ شماره */
  text-align: right;
}

.phone-form input[type="tel"]:focus {
  border-color: #3b82f6;
  box-shadow: 0 0 0 3px rgb(59 130 246 / 15%);
}

.phone-form button[type="submit"] {
  background-color: #3b82f6;
  color: #fff;
  border: none;
  border-radius: 0.75rem;
  padding: 0 1rem;
  font-size: 0.825rem;
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
  transition: background-color 0.2s ease;
}

.phone-form button[type="submit"]:hover {
  background-color: #2563eb;
}

.phone-form small {
  font-size: 0.7rem;
  color: #94a3b8;
  line-height: 1.35;
  margin-top: 0.2rem;
}
}