/* =========================== */
/* ========= FONTS ========= */
/* =========================== */
@font-face {
  font-family: "ZenMaruGothic";
  src: url("../fonts/ZenMaruGothic/ZenMaruGothic-Regular.ttf");
}

@font-face {
  font-family: "DigiHekayat";
  src: url("../fonts/DigiHekayat/DigiHekayat-Bold.ttf");
}

@font-face {
  font-family: "BYekan";
  src: url("../fonts/BYekan/BYekan.ttf");
}

/* =========================== */
/* ========= TYPOGRAPHY ========= */
/* =========================== */
.h1 {
  font-size: 28px;
}

.title {
  font-size: 18px;
}

.title2 {
  font-size: 20px;
}

.body {
  font-size: 16px;
}

.label {
  font-size: 23px;
}

.numbers {
  font-size: 19px;
}

.numbers2 {
  font-size: 24px;
}

/* =========================== */
/* ========= ROOT ========= */
/* =========================== */
:root {
  --primary: #e1803e;
  --main_black: #090302;
  --main_white: #fcfbfb;
  --product-bg: #f3f3f3;
}

/* =========================== */
/* ========= LAYOUT ========= */
/* =========================== */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  background: var(--main_white);
  font-family: DigiHekayat, sans-serif;
  font-size: 23px;
  font-weight: bold;
  color: var(--main_black);
  display: flex;
  justify-content: center;
  min-height: 100vh;
}

body.no-scroll {
  overflow: hidden;
}

.app {
  width: 100%;
  max-width: 430px;
  height: 100vh;

  background: var(--main_white);

  position: relative;

  overflow-x: hidden;
  overflow-y: auto;

  box-shadow: 0 0 30px rgba(0, 0, 0, 0.08);

  scroll-behavior: smooth;
  scrollbar-width: none;
}

/* collpsing animation */
.app.collapsed .hero {
  transform: translateY(-100%);
  opacity: 0;
  pointer-events: none;
}

.app.collapsed .shadowed {
  box-shadow: 0px 8px 8px #0903021a;
}

img {
  user-select: none;
  -webkit-user-drag: none;
}

.circle-btn {
  border: none;
  border-radius: 999px;
  background: var(--main_white);
  display: flex;
  justify-content: center;
  align-items: center;
  cursor: pointer;
  padding: 8px;
  box-shadow:
    inset -20px -20px 20px rgba(255, 255, 255, 0.5),
    inset -19px -20px 19px 11px rgba(255, 255, 255, 0.5),
    inset 5px 5px 7px 0px rgba(0, 0, 0, 0.08);
  filter: drop-shadow(0px 0px 2px rgb(0 0 0 / 10%));
}

.loading {
  text-align: center;
  padding: 40px 0;
}

/* =========================== */
/* ========= HEADER ========= */
/* =========================== */
header {
  padding: 24px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: var(--main_white);
  position: sticky;
  top: 0;
  z-index: 500;
}

.orders-btn {
  border: 1px solid var(--main_black);
  border-radius: 16px;
  background: var(--main_white);
  padding: 8px 16px;
  text-decoration: none;
  color: var(--main_black);
  display: flex;
  justify-content: space-between;
  align-items: center;
  box-shadow: 0 4px 16px #0903021a;
  gap: 4px;
  font-family: DigiHekayat, sans-serif;
}

#logoBtn {
  cursor: pointer;
}

.orders-title {
  padding: 8px 16px;
  text-decoration: none;
  color: var(--main_black);
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 4px;
  font-family: DigiHekayat, sans-serif;
}

.orders-title img {
  width: 32px;
  height: 32px;
}

#backBtn {
  cursor: pointer;
}

/* =========================== */
/* ========= HERO ========= */
/* =========================== */
.hero {
  text-align: center;
  transition:
    transform 1s ease,
    opacity 1s ease;
}

/* =========================== */
/* ========= SUB-CATEGORIES ========= */
/* =========================== */
.sub-categories {
  width: 100%;
  display: flex;
  gap: 12px;
  background: var(--main_white);
  box-shadow: 0px 8px 8px #0903021a;
  padding: 16px 0;
  overflow-x: auto;
  scroll-behavior: smooth;
  -ms-overflow-style: none;
  scrollbar-width: none;
  position: sticky;
  top: 102px;
  z-index: 500;
}

.sub-categories::-webkit-scrollbar {
  display: none;
}

.sub-category-tab {
  display: flex;
  align-items: center;
  padding: 6px 20px;
  gap: 4px;
  border-radius: 1000px;
  border: none;
  background: var(--main_white);
  box-shadow:
    5px 3px 20px rgba(0, 0, 0, 0.08),
    inset -20px -20px 20px rgba(255, 255, 255, 0.5),
    inset -19px -20px 19px 11px rgba(255, 255, 255, 0.5),
    inset 5px 5px 7px 0px rgba(0, 0, 0, 0.08);
  cursor: pointer;
  white-space: nowrap;
  font-family: BYekan, sans-serif;
}

.sub-category-tab:last-child {
  margin-left: 24px;
}

.sub-category-tab:first-child {
  margin-right: 24px;
}

.sub-category-tab.active {
  color: var(--primary);
}

.sub-category-tab.active img {
  filter: invert(42%) sepia(93%) saturate(623%) hue-rotate(346deg)
    brightness(95%) contrast(98%);
}

.sub-category-tab img {
  width: 20px;
  height: 20px;
}

/* =========================== */
/* ========= PRODUCTS ========= */
/* =========================== */
.products {
  padding: 16px;
}

.product-card {
  position: relative;
  border-radius: 16px;
  padding: 16px;
  margin-bottom: 8px;
  background: var(--product-bg);
  border: 1px solid transparent;
}

.product-card:last-child {
  margin-bottom: 114px;
}

.product-card.has-items {
  border-color: var(--primary);
}

.remove-btn {
  position: absolute;
  top: 14px;
  left: 14px;
  border: none;
  display: none;
  justify-content: center;
  align-items: center;
  cursor: pointer;
  background: none;
}

.product-card.has-items .remove-btn {
  display: flex;
}

.product-card.has-items .product-qty {
  color: var(--primary);
}

.product-card-top {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.product-meta {
  flex: 1;
  min-width: 0;
}

.product-title {
  font-family: BYekan, sans-serif;
  font-weight: bold;
}

.product-desc {
  font-family: BYekan, sans-serif;
  color: #09030280;
  margin-top: 8px;
}

.product-price {
  font-family: ZenMaruGothic, sans-serif;
  font-size: 26px;
  font-weight: bold;
  color: var(--primary);
  white-space: nowrap;
}

.product-card-bottom {
  margin-top: 16px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
}

.product-price-badge {
  flex: 1;
  padding: 8px;
  border-radius: 8px;
  background: var(--main_white);
  font-family: ZenMaruGothic, sans-serif;
  font-weight: bold;
  text-align: left;
  color: var(--main_black);
  white-space: nowrap;
  direction: ltr;
  unicode-bidi: embed;
}

.product-counter {
  display: flex;
  align-items: center;
  gap: 12px;
}

.choose-type-btn {
  padding: 6px 20px;
  border-radius: 999px;
  border: 1px solid var(--primary);
  background: var(--main_white);
  color: var(--main_black);
  font-family: BYekan, sans-serif;
  cursor: pointer;
  text-align: center;
}

.choose-type-btn:hover {
  opacity: 0.95;
}

.product-type-summary {
  margin-top: 8px;
  padding-top: 8px;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
  justify-content: flex-start;
  border-top: 1px solid #dddddd;
}

.product-type-summary .product-type-separator {
  margin: 0 6px;
  color: var(--main_black);
}

.product-type-label,
.product-type-count {
  font-family: DigiHekayat, sans-serif;
  font-weight: bold;
}

.product-type-label {
  color: var(--primary);
}

.product-type-count {
  color: var(--main_black);
}

.product-qty {
  font-family: ZenMaruGothic, sans-serif;
  font-weight: 500;
  color: var(--main_black);
  min-width: 30px;
  text-align: center;
}

.type-row {
  display: flex;
  gap: 8px;
  justify-content: center;
  align-items: center;
}

.type-meta {
  flex: 1;
}

.type-title {
  font-family: DigiHekayat, sans-serif;
  font-weight: bold;
  color: var(--main_black);
}

.type-price {
  font-family: ZenMaruGothic, sans-serif;
  font-size: 18px;
  color: var(--main_black);
}

.type-counter {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-top: 8px;
}

/* =========================== */
/* ========= BOTTOM-MENU ========= */
/* =========================== */
.bottom-menu {
  position: fixed;
  inset: auto 0 0;
  width: 100%;
  max-width: 430px;
  margin: 0 auto;
  display: flex;
  justify-content: center;
  z-index: 50;
  pointer-events: none;
  padding: 0 0 32px;
  background: rgb(252 251 251 / 90%);
  border-radius: 999px 999px 0 0;
}

.bottom-menu-inner {
  width: min(100%, 430px);
  margin: 0 16px;
  padding: 4px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  background: rgba(252, 251, 251, 0.96);
  border-radius: 999px;
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.16);
  backdrop-filter: blur(24px);
  pointer-events: auto;
  box-shadow:
    inset -20px -20px 20px rgba(255, 255, 255, 0.5),
    inset -19px -20px 19px 11px rgba(255, 255, 255, 0.5),
    inset 0 0 7px 0px rgba(0, 0, 0, 0.08);
  filter: drop-shadow(0px 0px 2px rgb(0 0 0 / 10%));
}

.bottom-menu-item {
  flex: 1;
  min-width: 0;
  padding: 8px;
  border: none;
  border-radius: 999px;
  background: transparent;
  color: var(--main_black);
  font-family: DigiHekayat, sans-serif;
  font-weight: bold;
  text-align: center;
  cursor: pointer;
  white-space: nowrap;
}

.bottom-menu-item.active {
  background: var(--primary);
  color: var(--main_white);
}

.bottom-menu-item:hover {
  opacity: 0.92;
}

/* =========================== */
/* ========= MODAL ========= */
/* =========================== */
.modal {
  width: 100%;
  max-width: 430px;
  margin: 0 auto;
  position: fixed;
  inset: 0;
  display: flex;
  justify-content: center;
  align-items: flex-end;
  background: #09030229;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  z-index: 999;
}

.hidden {
  display: none;
}

.modal-card {
  width: 100%;
  max-width: 430px;
  background: #ffffffbd;
  border-radius: 34px 34px 58px 58px;
  margin-bottom: 27px;
  position: relative;
  overflow: auto;
  filter: drop-shadow(0 8px 40px #0000001f);
}

.modal-handler {
  width: 36px;
  height: 5px;
  background: #cccccc;
  border-radius: 999px;
  margin: 5px auto;
}

.close-btn {
  position: absolute;
  top: 14px;
  left: 14px;
  border-radius: 999px;
  background: #78788029;
  display: flex;
  padding: 10px;
  align-items: center;
  justify-content: center;
  border: none;
  cursor: pointer;
}

.modal-title {
  font-weight: bold;
  color: var(--primary);
  text-align: center;
  margin-top: 14px;
}

.modal-sub-title {
  font-weight: bold;
  color: var(--main_black);
  text-align: center;
  margin: 14px 100px 0;
}

.modal-desc {
  font-family: DigiHekayat, sans-serif;
  font-weight: bold;
  color: #848180;
  text-align: center;
  margin: 0 38px 32px;
}

.separator {
  width: 100%;
  height: 1px;
  background: #848180;
  margin: 24px 0;
}

.separator:last-child {
  display: none;
}

.close-btn img {
  width: 22px;
  height: 22px;
}

.modal-content {
  width: fit-content;
  margin: 24px auto 62px;
}

#typeModalContent {
  width: 100%;
  max-width: 310px;
  margin: 74px auto 24px;
}

.modal-content li {
  font-family: DigiHekayat, sans-serif;
  font-weight: bold;
  margin: 0 auto;
  direction: rtl;
  text-align: center;
}

/* =========================== */
/* ========= ORDERS ========= */
/* =========================== */
.orders-page {
  padding: 24px 20px 140px;
}

.orders-title {
  display: flex;
  align-items: center;
  gap: 8px;
}

.orders-title h1 {
  font-family: DigiHekayat, sans-serif;
  font-weight: bold;
  font-size: 28px;
}

.empty-orders {
  text-align: center;
  padding-top: 100px;

  color: gray;

  font-family: BYekan;
}
