/* ============================================================
   page-common.css
   Shared styles for: inquiry-sheet, cart, personal-center/orders
   Design tokens follow the Easoon brand palette:
     Primary blue  : #003f74
     Accent orange : #E84D1C
     Border light  : #e8ecf2
     BG tint       : #f5f8fc
   ============================================================ */

/* ----------------------------------------------------------
   CSS Custom Properties (tokens)
   ---------------------------------------------------------- */
:root {
  --pc-brand: #003f74;
  --pc-accent: #e84d1c;
  --pc-accent-hover: #d0400f;
  --pc-border: #e8ecf2;
  --pc-border-light: #f0f3f8;
  --pc-bg-card: #ffffff;
  --pc-bg-tint: #f5f8fc;
  --pc-bg-foot: #fafbfd;
  --pc-text-primary: #2d3748;
  --pc-text-muted: #8a9bb5;
  --pc-text-sub: #a0aec0;
  --pc-text-body: #4a5568;
  --pc-radius-card: 10px;
  --pc-radius-inner: 6px;
  --pc-shadow-hover: 0 4px 16px rgba(0, 63, 116, 0.08);
  --pc-page-max: 1580px;
  --pc-page-pad-x: 32px;
  --pc-page-pad-y: 36px;
}

body {
  min-width: 1380px;
  background:
    radial-gradient(100% 100% at 0% 0%, #0070cc 10%, rgba(0, 170, 255, 0) 100%),
    #edf3ff;
  background-size: 100% 100%;
  background-repeat: no-repeat;
  background-attachment: fixed;

  a {
    text-decoration: none;
  }

  main {
    min-height: calc(100vh - 300px);
  }
}

.container,
.container-lg,
.container-xl {
  max-width: 1580px;
}

.action-bar {
  width: 100%;
  background-color: #003f74;

  .action-bar__container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 36px;
    line-height: 36px;
    color: #fff;
    font-size: 14px;

    .left {
      display: flex;
      justify-content: space-between;
      align-items: center;
      min-width: 340px;

      .left__message {
        color: #fff;
      }

      .mb-menu-btn {
        display: none;
      }
    }

    .right {
      display: flex;
      color: #fff;
      align-items: center;
    }
  }
}

.decorated {
  width: 100%;
  height: 16px;
  background-color: #e84d1c;
}

.navigate__container {
  height: 140px;
  display: flex;
  justify-content: space-between;
  align-items: end;

  .navigate__logo {
    display: flex;
    align-items: center;
    justify-content: center;
    padding-right: 10px;
    flex-shrink: 0;

    img {
      display: block;
      width: 100px;
      height: 100px;
      object-fit: contain;
      margin-right: 10px;
      flex-shrink: 0;
      transition: transform 0.3s ease-in-out;
    }
  }

  .navigate__content {
    width: calc(100% - 100px);
  }

  .navigate__content > .top-area {
    display: flex;
    justify-content: space-between;
    align-items: center;

    .query {
      margin: 0 20px;
      width: 100%;

      .query__input {
        display: flex;

        input {
          border: none;
          outline: none;
          width: 100%;
          background: rgba(255, 255, 255, 0.2);
          padding: 0 20px;
          font-size: 16px;
          color: #fff;
          border-radius: 4px 0px 0px 4px;
        }

        input::placeholder {
          color: #ececec;
        }

        .query__btn {
          width: 48px;
          height: 48px;
          background-color: #fff;
          display: flex;
          justify-content: center;
          align-items: center;
          cursor: pointer;
          border-radius: 0px 4px 4px 0px;
        }
      }

      .query__input:hover {
        box-shadow: 0 0 10px rgba(0, 0, 0, 0.5);
      }
    }

    .action {
      display: flex;
      justify-content: space-between;
      align-items: center;
      min-width: 510px;

      .action__item {
        width: 248px;
        height: 48px;
        display: flex;
        justify-content: center;
        align-items: center;
        border-radius: 4px;
        cursor: pointer;

        img {
          margin-right: 10px;
        }
      }

      .action__item:hover {
        transform: scale(1.02);
        box-shadow: 0 0 10px rgba(0, 0, 0, 0.5);
      }

      .btn-1 {
        background-color: #f7f7f7;
        background-image: url("/assets/images/btn1.png");
        background-size: 100% 100%;
        background-repeat: no-repeat;
        background-position: center;
        position: relative;
      }

      .btn-2 {
        background-color: #f7f7f7;
        background-image: url("/assets/images/btn2.png");
        background-size: 100% 100%;
        background-repeat: no-repeat;
        background-position: center;
        position: relative;
      }

      .inquiry-badge,
      .cart-badge {
        position: absolute;
        top: -8px;
        right: -8px;
        background-color: #dc3545;
        color: #fff;
        font-size: 12px;
        font-weight: 600;
        min-width: 20px;
        height: 20px;
        border-radius: 10px;
        display: flex;
        align-items: center;
        justify-content: center;
        padding: 0 5px;
      }
    }
  }

  .navigate__content > .recommend-area {
    display: flex;
    justify-content: flex-start;
    align-items: center;
    margin-top: 10px;
    margin-left: 20px;
    font-size: 12px;
    color: rgba(255, 255, 255, 0.5);

    .item {
      margin-left: 20px;
      font-size: 12px;
      color: rgba(255, 255, 255, 0.5);
    }
  }
}

.small-bar {
  height: 100px;
  margin-top: 20px;
}

.menu__container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  height: 100px;

  .menu {
    display: flex;
    justify-content: space-between;
    align-items: center;
    max-width: calc(100% - 220px);

    .menu__item {
      margin-left: 20px;
      display: flex;
      min-width: 70px;
      justify-content: space-between;
      align-items: center;

      a {
        font-size: 16px;
        color: #003f74;
        font-weight: 500;
      }
    }
  }
}

.route__container {
  margin-top: 20px;

  .breadcrumb {
    color: #fff;
    --bs-breadcrumb-divider: "/";
    font-size: 16px;
    font-weight: 500;
    color: #fff;
    text-transform: uppercase;

    a {
      color: #fff;
    }

    .breadcrumb-item::before {
      font-size: 16px;
      font-weight: 500;
      color: #fff;
    }
  }
}

.empty__container {
  height: calc(100vh - 360px);
  display: flex;
  justify-content: center;
  align-items: center;
  background-color: #edf3ff;
  border-radius: 4px;

  .empty__content {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
  }
}

.catalogue {
  position: relative;
  display: inline-block;
  color: #fff;
}

.catalogue .btn {
  background-color: transparent;
  border: none;
  color: #fff;
  font-size: 16px;
  font-weight: 500;
  cursor: pointer;
  padding: 8px 16px;
  display: flex;
  align-items: center;
}

.categories-container {
  position: absolute;
  top: 100%;
  left: 0;
  z-index: 1000;
  display: none;
  background-color: #fff;
  border: 1px solid rgba(0, 0, 0, 0.15);
  border-radius: 0.25rem;
  box-shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.175);
  min-width: 250px;
}

.catalogue:hover .categories-container {
  display: block;
}

.main-categories {
  list-style: none;
  margin: 0;
  padding: 0;
  min-width: 250px;
}

.category-item {
  position: relative;
  height: auto;
}

.category-link {
  display: flex;
  align-items: center;
  padding: 12px 16px;
  color: #212529;
  text-decoration: none;
  font-weight: 400;
  transition: all 0.2s ease;
  height: auto;
  min-height: 40px;
}

.category-link:hover {
  background-color: #f8f9fa;
  color: #000;
}

.category-icon {
  margin-right: 12px;
  font-size: 16px;
  opacity: 0.6;
}

.category-link .bi-chevron-right {
  margin-left: auto;
  font-size: 12px;
  opacity: 0.6;
}

.category-image {
  width: 40px;
  height: 40px;
  object-fit: cover;
  margin-right: 12px;
  border-radius: 4px;
}

.subcategories {
  position: absolute;
  top: 0;
  left: 100%;
  min-width: 300px;
  max-width: 400px;
  height: auto;
  background-color: #fff;
  border: 1px solid rgba(0, 0, 0, 0.15);
  border-radius: 0 0.25rem 0.25rem 0;
  box-shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.175);
  padding: 20px;
  display: none;
  z-index: 1001;
}

.category-item:hover .subcategories {
  display: block;
}

.subcategories h3 {
  margin-top: 0;
  margin-bottom: 16px;
  font-size: 18px;
  font-weight: 600;
  color: #000;
}

.subcategories ul {
  list-style: none;
  margin: 0;
  padding: 0;
}

.subcategories ul li {
  margin-bottom: 8px;
}

.subcategories ul li a {
  display: flex;
  align-items: center;
  color: #212529;
  text-decoration: none;
  padding: 4px 0;
  transition: all 0.2s ease;
}

.subcategories ul li a:hover {
  color: #000;
  padding-left: 8px;
}

.subcategories ul li a::before {
  content: "•";
  margin-right: 12px;
  color: #6c757d;
}

/* ----------------------------------------------------------
   Page wrapper  —  used by cart & inquiry-sheet
   ---------------------------------------------------------- */
.page-wrapper {
  max-width: var(--pc-page-max);
}

/* ----------------------------------------------------------
   Page header  (title + subtitle banner)
   ---------------------------------------------------------- */
.page-header {
  margin-bottom: 28px;
  padding-bottom: 20px;
  border-bottom: 2px solid var(--pc-border);
}

.page-header__title {
  font-size: 26px;
  font-weight: 700;
  color: var(--pc-brand);
  margin-bottom: 6px;
  letter-spacing: -0.3px;
}

.page-header__subtitle {
  font-size: 14px;
  color: #f0f0f0;
  margin: 0;
}

/* ----------------------------------------------------------
   Section card  (white card with border)
   ---------------------------------------------------------- */
.section-card {
  background: var(--pc-bg-card);
  border: 1px solid var(--pc-border);
  border-radius: var(--pc-radius-card);
  margin-bottom: 20px;
  overflow: hidden;
}

.section-card__head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 16px 24px;
  border-bottom: 1px solid var(--pc-border-light);
}

.section-card__head h3,
.section-card__head .section-card__title {
  font-size: 16px;
  font-weight: 600;
  color: var(--pc-brand);
  margin: 0;
}

.section-card__body {
  padding: 20px 24px;
}

/* ----------------------------------------------------------
   Item row  (product line in cart / inquiry / order)
   ---------------------------------------------------------- */
.item-row {
  display: flex;
  align-items: center;
  padding: 14px 0;
  border-bottom: 1px solid var(--pc-border-light);
  transition: background-color 0.15s;
}

.item-row:last-child {
  border-bottom: none;
}

.item-row:hover {
  background-color: #fafbfe;
  margin: 0 -24px;
  padding-left: 24px;
  padding-right: 24px;
}

.item-row__img {
  width: 72px;
  height: 72px;
  object-fit: cover;
  border-radius: var(--pc-radius-inner);
  flex-shrink: 0;
  margin-right: 16px;
  background-color: var(--pc-bg-tint);
  border: 1px solid var(--pc-border-light);
}

.item-row__info {
  flex: 1;
  min-width: 0;
}

.item-row__name {
  font-size: 15px;
  font-weight: 600;
  color: var(--pc-text-primary);
  margin-bottom: 4px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.item-row__spec {
  font-size: 13px;
  color: var(--pc-text-muted);
  margin-bottom: 4px;
}

.item-row__sku {
  font-size: 12px;
  color: var(--pc-text-sub);
}

.item-row__weight {
  font-size: 12px;
  font-weight: 700;
  color: var(--pc-text-sub);
}

/* quantity stepper */
.item-row__qty {
  display: flex;
  align-items: center;
  gap: 0;
  margin: 0 28px;
  flex-shrink: 0;
}

.item-row__qty input[type="number"] {
  width: 60px;
  height: 32px;
  text-align: center;
  padding: 0 8px;
  border: 1px solid var(--pc-border);
  border-radius: var(--pc-radius-inner);
  font-size: 14px;
  color: var(--pc-text-primary);
  background: #fff;
  appearance: textfield;
  -moz-appearance: textfield;
  outline: none;
  transition: border-color 0.15s;
}

.item-row__qty input[type="number"]::-webkit-inner-spin-button,
.item-row__qty input[type="number"]::-webkit-outer-spin-button {
  -webkit-appearance: none;
}

.item-row__qty input[type="number"]:focus {
  border-color: var(--pc-brand);
}

/* price */
.item-row__price {
  font-size: 16px;
  font-weight: 700;
  color: var(--pc-accent);
  min-width: 90px;
  text-align: right;
  flex-shrink: 0;
  margin-right: 20px;
}

/* remove button */
.item-row__remove {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  cursor: pointer;
  color: var(--pc-text-muted);
  font-size: 16px;
  transition:
    color 0.15s,
    background-color 0.15s;
  flex-shrink: 0;
}

.item-row__remove:hover {
  color: #dc3545;
  background-color: #fff1f0;
}

/* ----------------------------------------------------------
   Empty state
   ---------------------------------------------------------- */
.empty-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 64px 20px;
  color: var(--pc-text-muted);
}

.empty-state__icon {
  font-size: 52px;
  color: #d0d8e8;
  margin-bottom: 16px;
  line-height: 1;
}

.empty-state__text {
  font-size: 16px;
  color: var(--pc-text-muted);
  margin-bottom: 16px;
}

/* ----------------------------------------------------------
   Page-level footer bar  (total row + action buttons)
   ---------------------------------------------------------- */
.page-footer-bar {
  background: var(--pc-bg-card);
  border: 1px solid var(--pc-border);
  border-radius: var(--pc-radius-card);
  padding: 16px 24px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
}

.page-footer-bar__info {
  font-size: 16px;
  color: var(--pc-text-body);
}

.page-footer-bar__info strong {
  font-size: 20px;
  font-weight: 700;
  color: var(--pc-brand);
}

.page-footer-bar__actions {
  display: flex;
  gap: 12px;
  align-items: center;
}

/* ----------------------------------------------------------
   Primary / secondary action buttons (brand-aware)
   ---------------------------------------------------------- */
.btn-brand {
  background-color: var(--pc-accent);
  border-color: var(--pc-accent);
  color: #fff;
  font-size: 14px;
  font-weight: 500;
  padding: 10px 28px;
  border-radius: var(--pc-radius-inner);
  transition:
    background-color 0.15s,
    border-color 0.15s,
    box-shadow 0.15s;
}

.btn-brand:hover,
.btn-brand:focus {
  background-color: var(--pc-accent-hover);
  border-color: var(--pc-accent-hover);
  color: #fff;
  box-shadow: 0 2px 8px rgba(232, 77, 28, 0.25);
}

.btn-brand:disabled {
  opacity: 0.65;
  cursor: not-allowed;
}

/* ----------------------------------------------------------
   Feedback modal overlay  (replaces inline .modal-overlay)
   ---------------------------------------------------------- */
.feedback-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(255, 255, 255, 0.72);
  backdrop-filter: blur(4px);
  z-index: 1050;
  align-items: center;
  justify-content: center;
}

.feedback-overlay.show {
  display: flex;
}

.feedback-modal {
  background: #fff;
  border-radius: 16px;
  padding: 40px 32px 32px;
  max-width: 420px;
  width: 90%;
  text-align: center;
  box-shadow:
    0 20px 56px rgba(0, 0, 0, 0.12),
    0 0 0 1px rgba(0, 0, 0, 0.04);
  animation: feedbackFadeIn 0.3s ease-out;
}

@keyframes feedbackFadeIn {
  from {
    opacity: 0;
    transform: translateY(16px) scale(0.97);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

/* icon with circle background */
.feedback-modal__icon-wrap {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 64px;
  height: 64px;
  border-radius: 50%;
  margin-bottom: 20px;
}

.feedback-modal__icon-wrap.success {
  background: #f0fdf4;
  color: #52c41a;
}

.feedback-modal__icon-wrap.error {
  background: #fef2f2;
  color: #dc3545;
}

.feedback-modal__icon-wrap.info {
  background: #eff6ff;
  color: #0066cc;
}

.feedback-modal__icon-wrap i {
  font-size: 32px;
  line-height: 1;
}

/* legacy bare icon (kept for backward compat) */
.feedback-modal__icon {
  font-size: 52px;
  margin-bottom: 16px;
  line-height: 1;
}

.feedback-modal__icon.success {
  color: #52c41a;
}
.feedback-modal__icon.error {
  color: #dc3545;
}
.feedback-modal__icon.info {
  color: #0066cc;
}

.feedback-modal__title {
  font-size: 20px;
  font-weight: 700;
  color: #1a202c;
  margin-bottom: 8px;
}

.feedback-modal__body {
  font-size: 14px;
  color: #718096;
  margin-bottom: 20px;
  line-height: 1.6;
}

/* order-number highlight */
.feedback-modal__order-no {
  display: inline-block;
  background: #f7f8fa;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  padding: 8px 16px;
  font-size: 15px;
  font-weight: 600;
  color: #2d3748;
  margin-bottom: 20px;
  letter-spacing: 0.5px;
}

/* note: info-box style */
.feedback-modal__note {
  background: #fffbeb;
  border: 1px solid #fde68a;
  border-radius: 8px;
  padding: 12px 16px;
  font-size: 13px;
  color: #92400e;
  margin-bottom: 24px;
  line-height: 1.6;
  text-align: left;
}

.feedback-modal__note i {
  font-size: 16px;
  margin-right: 6px;
  color: #d97706;
  vertical-align: -2px;
}

.feedback-modal__actions {
  display: flex;
  gap: 12px;
  justify-content: center;
}

/* ----------------------------------------------------------
   Status badge chips  (order / inquiry status)
   ---------------------------------------------------------- */
.status-badge {
  display: inline-flex;
  align-items: center;
  padding: 3px 12px;
  border-radius: 20px;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.3px;
}

.status-badge.pending {
  background: #fff7e6;
  color: #fa8c16;
}
.status-badge.paid {
  background: #f6ffed;
  color: #52c41a;
}
.status-badge.shipped {
  background: #e6f7ff;
  color: #1890ff;
}
.status-badge.completed {
  background: #f0f0f0;
  color: #595959;
}
.status-badge.cancelled {
  background: #fff1f0;
  color: #f5222d;
}
.status-badge.quoted {
  background: #e6fffb;
  color: #13c2c2;
}

.fixed {
  position: fixed;
  top: 0;
  z-index: 1000;
  left: 50%;
  transform: translate(-50%, 0);
  background-color: #003f74;
  padding: 10px 12px;
  height: 100px;
  max-width: 1580px;
  width: 100%;

  .navigate__logo {
    display: none;
  }
}
