.ahangar-archive {
  display: block;
  width: 100%;
}

.ahangar-switcher {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 0 0 20px;
}

.ahangar-switcher__item {
  border: 1px solid #d7dde3;
  border-radius: 6px;
  color: #22303c;
  display: inline-flex;
  font-size: 14px;
  line-height: 1.4;
  padding: 8px 12px;
  text-decoration: none;
  transition:
    background-color 0.15s ease,
    border-color 0.15s ease,
    color 0.15s ease;
}

.ahangar-switcher__item:hover,
.ahangar-switcher__item:focus {
  border-color: #7a8794;
  color: #111820;
}

.ahangar-switcher__item.is-active {
  background: #313440;
  border-color: #313440;
  color: #fff;
}

.ahangar-group {
  margin: 0 0 28px;
}

.ahangar-group__header {
  background: #1d3abb;
  border-radius: 6px;
  margin: 0 0 14px;
  padding: 14px 18px;
}

.ahangar-group__title {
  color: #fff;
  font-size: 20px;
  font-weight: 700;
  line-height: 1.35;
  margin: 0;
}

.ahangar-table-wrap {
  overflow-x: auto;
  padding: 0 0 4px;
  width: 100%;
}

.ahangar-table {
  border-collapse: collapse;
  font-size: 14px;
  min-width: 100%;
  table-layout: auto;
  width: max-content;
}

.ahangar-table th,
.ahangar-table td {
  border: none !important;
  padding: 16px 14px;
  text-align: start;
  vertical-align: middle;
  white-space: nowrap;
  background: #fff;
}

.ahangar-table th {
  background: #f4f6f8;
  color: #17202a;
  font-weight: 700;
  white-space: nowrap;
}

.ahangar-table tbody>tr:nth-child(odd)>td,
.ahangar-table tbody>tr:nth-child(odd)>th {
  background: #efefef;
}

.ahangar-price-heading {
  align-items: flex-start;
  display: inline-flex;
  flex-direction: column;
  gap: 3px;
  line-height: 1.35;
}

.ahangar-price-heading span {
  color: #64717d;
  font-size: 11px;
  font-weight: 500;
  white-space: normal;
}

.ahangar-table td {
  color: #2c3a46;
  font-weight: 700;
}

.ahangar-table tbody tr:nth-child(odd) td {
  background: #fff;
}

.ahangar-table tbody tr:nth-child(even) td {
  background: #f4f5f7;
}

.ahangar-table tbody tr:first-child td:first-child {
  border-start-start-radius: 8px;
}

.ahangar-table tbody tr:first-child td:last-child {
  border-start-end-radius: 8px;
}

.ahangar-table-actions {
  align-items: center;
  display: inline-flex;
  gap: 8px;
}

.ahangar-table-actions .product-chart {
  background: #fbe7e7;
  border-radius: 8px;
  color: #806060;
  min-height: 34px;
  min-width: 34px;
}

.ahangar-table-details {
  align-items: center;
  background: #f05023;
  border-radius: 7px;
  color: #fff !important;
  display: inline-flex;
  font-size: 13px;
  font-weight: 800;
  min-height: 34px;
  padding: 7px 10px;
  text-decoration: none !important;
}

.ahangar-archive-shell__loading {
  color: #5b6772;
  margin: 16px 0;
}

.ahangar-mobile-products {
  display: none;
}

.ahangar-table a {
  color: #f05023;
  text-decoration: none;
}

.ahangar-table a:hover,
.ahangar-table a:focus {
  text-decoration: underline;
}

.product-chart {
  align-items: center;
  color: #145da0;
  cursor: pointer;
  display: inline-flex;
  font-size: 18px;
  justify-content: center;
  min-height: 24px;
  min-width: 24px;
}

.product-chart:hover,
.product-chart:focus {
  color: #806060;
}

.ahangar-price-history {
  background: #fff;
  border: 1px solid #e4e8ec;
  border-radius: 8px;
  padding: 18px;
  width: 100%;
}

.ahangar-price-history__toolbar {
  display: flex;
  justify-content: flex-start;
  margin: 0 0 16px;
}

.ahangar-price-history__range {
  background: #f6f8fa;
  border: 1px solid #d7dde3;
  border-radius: 6px;
  color: #17202a;
  font-size: 14px;
  font-weight: 700;
  min-width: 130px;
  padding: 8px 12px;
}

.ahangar-price-history__body {
  min-height: 310px;
}

.ahangar-price-history__chart {
  height: 300px;
  min-height: 0;
  position: relative;
  width: 100%;
}

.ahangar-price-history__canvas {
  display: block;
  height: 100% !important;
  max-width: 100%;
  width: 100% !important;
}

.ahangar-price-history__summary {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 12px 0 0;
}

.ahangar-price-history__summary span {
  background: #f6f8fa;
  border-radius: 6px;
  color: #2c3a46;
  font-size: 12px;
  padding: 6px 8px;
}

.ahangar-price-history__empty,
.ahangar-price-history__loading {
  align-items: center;
  color: #5b6772;
  display: flex;
  justify-content: center;
  margin: 0;
  min-height: 220px;
  text-align: center;
}

.ahangar-chart-modal {
  align-items: center;
  display: none;
  inset: 0;
  justify-content: center;
  padding: 20px;
  position: fixed;
  z-index: 99999;
}

.ahangar-chart-modal.is-open {
  display: flex;
}

.ahangar-chart-modal__backdrop {
  background: rgba(17, 24, 32, 0.56);
  inset: 0;
  position: absolute;
}

.ahangar-chart-modal__panel {
  background: #fff;
  border-radius: 10px;
  box-shadow: 0 18px 60px rgba(17, 24, 32, 0.28);
  max-height: min(720px, calc(100vh - 40px));
  max-width: 920px;
  overflow: auto;
  padding: 22px;
  position: relative;
  width: min(920px, calc(100vw - 40px));
  z-index: 1;
}

.ahangar-chart-modal__close {
  align-items: center;
  background: #f6f8fa;
  border: 1px solid #d7dde3;
  border-radius: 50%;
  color: #17202a;
  cursor: pointer;
  display: inline-flex;
  font-size: 26px;
  height: 36px;
  justify-content: center;
  line-height: 1;
  position: absolute;
  right: 14px;
  top: 14px;
  width: 36px;
  z-index: 2;
}

[dir="rtl"] .ahangar-chart-modal__close,
.rtl .ahangar-chart-modal__close {
  left: 14px;
  right: auto;
}

.ahangar-modal-open {
  overflow: hidden;
}

.ahangar-empty {
  color: #5b6772;
  margin: 16px 0;
}

.ahangar-pagination {
  align-items: center;
  display: flex;
  gap: 12px;
  justify-content: center;
  margin: 28px 0 0;
}

.ahangar-pagination__link,
.ahangar-pagination__current {
  border: 1px solid #d7dde3;
  border-radius: 6px;
  color: #22303c;
  display: inline-flex;
  font-size: 14px;
  line-height: 1.4;
  padding: 8px 12px;
  text-decoration: none;
}

.ahangar-pagination__current {
  background: #f6f8fa;
}

.ahangar-vat-switcher {
  align-items: center;
  color: #22303c;
  display: inline-flex;
  gap: 10px;
  margin: 0 0 18px;
  text-decoration: none;
}

.ahangar-vat-switcher__control {
  background: #d8dee5;
  border-radius: 999px;
  display: inline-flex;
  height: 28px;
  position: relative;
  transition: background-color 0.15s ease;
  width: 52px;
}

.ahangar-vat-switcher__control::before {
  background: #fff;
  border-radius: 50%;
  box-shadow: 0 1px 4px rgba(23, 32, 42, 0.2);
  content: "";
  height: 22px;
  inset-block-start: 3px;
  inset-inline-start: 3px;
  position: absolute;
  transition: transform 0.15s ease;
  width: 22px;
}

.ahangar-vat-switcher__label {
  font-size: 14px;
  font-weight: 700;
  line-height: 1.5;
}

.ahangar-vat-switcher.is-active .ahangar-vat-switcher__control {
  background: #f05023;
}

.ahangar-vat-switcher.is-active .ahangar-vat-switcher__control::before {
  transform: translateX(24px);
}

[dir="rtl"] .ahangar-vat-switcher.is-active .ahangar-vat-switcher__control::before,
.rtl .ahangar-vat-switcher.is-active .ahangar-vat-switcher__control::before {
  transform: translateX(-24px);
}

.ahangar-other-suppliers-price {
  align-items: center;
  background: #2b3fb8;
  border-radius: 10px;
  color: #fff;
  display: flex;
  flex-direction: row;
  gap: 24px;
  justify-content: space-between;
  margin: 24px 0;
  padding: 28px 36px;
  width: 100%;
}

.ahangar-other-suppliers-price span {
  color: #fff;
  font-size: 28px;
  font-weight: 800;
  line-height: 1.45;
  text-align: right;
}

.ahangar-other-suppliers-price a {
  align-items: center;
  background: #fff;
  border-radius: 4px;
  color: #e45f3d;
  display: inline-flex;
  flex: 0 0 auto;
  font-size: 18px;
  font-weight: 700;
  gap: 8px;
  line-height: 1.4;
  min-height: 60px;
  padding: 14px 32px;
  text-decoration: none;
  transition:
    color 0.15s ease,
    transform 0.15s ease;
}

.ahangar-other-suppliers-price a::before {
  border-color: currentColor;
  border-style: solid;
  border-width: 0 0 2px 2px;
  content: "";
  display: inline-block;
  height: 9px;
  transform: rotate(45deg);
  width: 9px;
}

.ahangar-other-suppliers-price a:hover,
.ahangar-other-suppliers-price a:focus {
  color: #c4492c;
  transform: translateY(-1px);
}

@media (max-width: 640px) {
  .ahangar-group__title {
    font-size: 18px;
  }

  .ahangar-table-wrap {
    display: none;
  }

  .ahangar-mobile-products {
    display: block;
    direction: rtl;
  }

  .ahangar-mobile-products__header,
  .ahangar-mobile-product__summary {
    display: grid;
    grid-template-columns:
      minmax(86px, 1.3fr) minmax(64px, 1fr) minmax(86px, 1.1fr) 44px;
    text-align: center;
  }

  .ahangar-mobile-products.no-chart .ahangar-mobile-products__header,
  .ahangar-mobile-products.no-chart .ahangar-mobile-product__summary {
    grid-template-columns:
      minmax(86px, 1.3fr) minmax(64px, 1fr) minmax(86px, 1.1fr) 44px;
  }

  .ahangar-mobile-products__header {
    color: #f05023;
    font-size: 13px;
    font-weight: 800;
    gap: 0;
    line-height: 1.25;
    margin: 0 0 8px;
    padding: 0 8px;
  }

  .ahangar-mobile-products__header span {
    align-items: center;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    min-height: 42px;
  }

  .ahangar-mobile-products__header small {
    font-size: 12px;
    font-weight: 700;
  }

  .ahangar-mobile-product {
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 2px 0 #d9dee6;
    margin: 0 0 12px;
    overflow: hidden;
  }

  .ahangar-mobile-product__summary {
    border-bottom: 1px solid #eef1f4;
    min-height: 80px;
  }

  .ahangar-mobile-product__summary>span,
  .ahangar-mobile-product__summary>strong,
  .ahangar-mobile-product__toggle {
    align-items: center;
    border-inline-start: 1px solid #eef1f4;
    color: #4d5866;
    display: flex;
    font-size: 16px;
    font-weight: 800;
    justify-content: center;
    min-width: 0;
    padding: 10px 8px;
  }

  .ahangar-mobile-product__toggle:focus,
  .ahangar-mobile-product__toggle:hover {
    background-color: #f05023;
  }

  .ahangar-mobile-product__summary>span:first-child {
    color: #17202a;
    font-size: 16px;
    line-height: 1.45;
  }

  .ahangar-mobile-product__summary .product-chart {
    border-inline-start: 1px solid #eef1f4;
    color: #66717f;
    font-size: 24px;
    min-height: auto;
    min-width: 0;
  }

  .ahangar-mobile-product__toggle {
    background: transparent;
    border-block: 0;
    border-inline-end: 0;
    cursor: pointer;
    font-size: 18px;
  }

  .ahangar-mobile-product__toggle i {
    transition: transform 0.15s ease;
  }

  .ahangar-mobile-product.is-open .ahangar-mobile-product__toggle i {
    transform: rotate(180deg);
  }

  .ahangar-mobile-product__details {
    background: #f6f8fb;
    display: grid;
    gap: 14px;
    grid-template-columns: 1fr auto;
    padding: 18px 14px;
  }

  .ahangar-mobile-product__details[hidden] {
    display: none;
  }

  .ahangar-mobile-product__title {
    color: #3f4a58;
    font-size: 18px;
    font-weight: 800;
    grid-column: 1 / -1;
    line-height: 1.5;
    margin: 0;
  }

  .ahangar-mobile-product__title a {
    color: inherit;
    text-decoration: none;
  }

  .ahangar-mobile-product__meta {
    display: grid;
    gap: 10px;
    margin: 0;
  }

  .ahangar-mobile-product__meta div {
    align-items: center;
    display: grid;
    gap: 10px;
    grid-template-columns: 88px 1fr;
  }

  .ahangar-mobile-product__meta dt,
  .ahangar-mobile-product__meta dd {
    color: #4d5866;
    font-size: 15px;
    font-weight: 800;
    margin: 0;
  }

  .ahangar-mobile-product__chart dd {
    align-items: center;
    display: flex;
  }

  .ahangar-mobile-product__chart .product-chart {
    color: #66717f;
    font-size: 24px;
  }

  .ahangar-mobile-product__button {
    align-items: center;
    align-self: end;
    background: #f05023;
    border-radius: 8px;
    color: #fff;
    display: inline-flex;
    font-size: 16px;
    font-weight: 800;
    gap: 8px;
    justify-content: center;
    min-width: 120px;
    padding: 10px 14px;
    text-decoration: none;
  }

  .ahangar-mobile-product__button:hover,
  .ahangar-mobile-product__button:focus {
    color: #fff;
  }

  .ahangar-other-suppliers-price {
    align-items: stretch;
    flex-direction: column;
    gap: 16px;
    padding: 22px 20px;
    text-align: center;
  }

  .ahangar-other-suppliers-price span {
    font-size: 21px;
  }

  .ahangar-other-suppliers-price a {
    justify-content: center;
    min-height: 52px;
    width: 100%;
  }

  .ahangar-chart-modal {
    padding: 12px;
  }

  .ahangar-chart-modal__panel {
    max-height: calc(100vh - 24px);
    padding: 16px;
    width: calc(100vw - 24px);
  }

  .ahangar-price-history {
    padding: 14px;
  }

  .ahangar-price-history__body {
    min-height: 300px;
  }

  .ahangar-price-history__chart {
    height: 300px;
    min-height: 0;
  }
}

/**
 * Supplier products shortcode styling
 */
.ahangar-supplier-products {
  display: flex;
  flex-direction: column;
  gap: 40px;
  margin: 30px 0;
}

.ahangar-category-section {
  border: 1px solid #eef1f4;
  border-radius: 12px;
  overflow: hidden;
  padding: 24px;
  background: #fcfdfe;
}

.ahangar-category-title {
  color: #17202a;
  font-size: 24px;
  font-weight: 800;
  margin: 0 0 20px;
  padding-bottom: 12px;
  border-bottom: 2px solid #f05023;
  display: inline-block;
}

@media (max-width: 640px) {
  .ahangar-category-title {
    font-size: 20px;
  }

  .ahangar-category-section {
    padding: 16px;
  }
}

.ahangar-category-more {
  display: flex;
  justify-content: center;
  margin-top: 24px;
}

.ahangar-category-more-btn {
  background: #f05023;
  border-radius: 8px;
  color: #fff !important;
  display: inline-flex;
  font-size: 15px;
  font-weight: 800;
  padding: 10px 24px;
  text-decoration: none !important;
  transition:
    background-color 0.15s ease,
    transform 0.15s ease;
}

.ahangar-category-more-btn:hover {
  background-color: #d1411a;
  transform: translateY(-2px);
}
