@font-face {
  font-family: YekanBakh;
  src: url(../assets/fonts/YekanBakhFaNum01Hairline.ttf);
  font-weight: 100;
}
@font-face {
  font-family: YekanBakh;
  src: url(../assets/fonts/YekanBakhFaNum02Thin.ttf);
  font-weight: 200;
}
@font-face {
  font-family: YekanBakh;
  src: url(../assets/fonts/YekanBakhFaNum03Light.ttf);
  font-weight: 300;
}
@font-face {
  font-family: YekanBakh;
  src: url(../assets/fonts/YekanBakhFaNum04Regular.ttf);
  font-weight: 400;
}
@font-face {
  font-family: YekanBakh;
  src: url(../assets/fonts/YekanBakhFaNum05Medium.ttf);
  font-weight: 500;
}
@font-face {
  font-family: YekanBakh;
  src: url(../assets/fonts/YekanBakhFaNum06Bold.ttf);
  font-weight: 700;
}
@font-face {
  font-family: YekanBakh;
  src: url(../assets/fonts/YekanBakhFaNum07Heavy.ttf);
  font-weight: 800;
}
@font-face {
  font-family: YekanBakh;
  src: url(../assets/fonts/YekanBakhFaNum08Fat.ttf);
  font-weight: 900;
}

:root {
  --primary: #2e150a;
  --secondary: #f9f1eb;

  --color-splash: #e9cbb4;

  --fs-xlg: 28px;
  --fs-lg: 20px;
  --fs-md: 18px;
  --fs-text: 16px;
  --fs-sm: 14px;
  --fs-xsm: 12px;

  --fw-heavy: 800;
  --fw-bold: 700;
  --fw-medium: 500;
}

body {
  margin: 0;
  font-family: YekanBakh !important;
  max-width: 500px;
  margin: auto;
  direction: rtl;
}
.view {
  min-height: 100svh;
  display: flex;
  flex-direction: column;
  transition: all 1s;
}
.hidden {
  display: none !important;
  transition: all 1s;
}
a,
button,
input[type="text"] {
  text-decoration: none;
  color: var(--primary);
  font-family: YekanBakh !important;
  cursor: pointer;
  border: none;
  background: unset;
}

.welcome-head {
  text-align: center;
}

.welcome-head .logo {
  width: 200px;
}

.cafe-title {
  font-size: var(--fs-xlg);
  font-weight: var(--fw-heavy);
  color: var(--color-splash);
}

/* Splash */
#splash,
#welcome {
  height: 100svh;
  background: var(--primary);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

.splash-logo {
  animation: splashPulse 0.9s ease-in-out infinite;
}

@keyframes splashPulse {
  0% {
    transform: scale(1);
  }
  50% {
    transform: scale(1.1);
  }
  100% {
    transform: scale(1);
  }
}

.welcome-action {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 10px;
  margin-top: 48px;
}
.welcome-btn {
  width: 260px;
  height: 48px;
  border-radius: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: white;
  font-size: var(--fs-lg);
  font-weight: var(--fw-medium);
}
.social {
  display: flex;
  justify-content: center;
  gap: 16px;
  margin-top: 48px;
}
.portaleto {
  display: flex;
  justify-content: center;
  margin-top: 48px;
  border-top: 1px solid #513f37;
  padding-top: 24px;
}
.portaleto p,
.portaleto a {
  font-weight: 400;
  font-size: var(--fs-sm);
  color: white;
}

/* Header */
.navbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 4px 16px;
  padding-bottom: 0;
}
.navbar > div {
  cursor: pointer;
}
.cart-icon {
  position: relative;
}
#cart-count {
  position: absolute;
  background: #f79009;
  width: 16px;
  height: 16px;
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 10px;
  border-radius: 4px;
  top: -5px;
  right: -5px;
}

.search-box {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  padding: 10px 16px;
}
.search-input {
  flex-grow: 1;
  position: relative;
}
.search-input img {
  position: absolute;
  top: 50%;
  right: 8px;
  transform: translate(0, -50%);
}
.search-input input[type="text"] {
  width: 100%;
  box-sizing: border-box;
  background: #edecec;
  padding: 7px 32px 7px 16px;
  border-radius: 32px;
  font-size: var(--fs-text);
  color: var(--primary) !important;
  font-weight: var(--fw-medium);
}
.search-input::placeholder {
  color: #a6a6a6;
}
#backToWelcome {
  display: flex;
  align-items: center;
  gap: 4px;
  font-size: var(--fs-text);
  font-weight: var(--fw-bold);
  line-height: 100%;
}

/* Category */
.swiper {
  width: 100%;
  position: sticky !important;
  background: white;
  top: 0;
}
.categories-swiper {
  max-width: 100%;
  box-shadow: 0px 4px 4px 0px #f6f6f6;
}
.swiper-wrapper {
  align-items: center;
  padding: 10px 0;
}
.swiper-slide {
  width: auto !important;
  flex-shrink: 0;
}
.category-btn {
  display: flex;
  align-items: center;
  gap: 10px;
  background: var(--secondary);
  border-radius: 32px;
  padding: 6px 4px 6px 8px;
  font-size: var(--fs-sm);
  font-weight: var(--fw-medium);
  cursor: pointer;
  white-space: nowrap;
}
.category-btn.active {
  background: var(--primary);
  color: #ffffff;
}
.category-btn img {
  border: 1px solid var(--primary);
  border-radius: 50%;
  width: 40px;
  height: 40px;
}
.category-btn.active img {
  background: var(--secondary);
}
.category-btn p {
  margin: 0;
}

/* Menu Items */
.item-category {
  margin-block: 14px;
}
.item-category h3 {
  text-align: center;
  color: var(--primary) !important;
  font-size: var(--fs-lg);
  font-weight: var(--fw-bold);
}
.item-category h3::before,
.item-category h3::after {
  content: "";
  background: #d8d6d6;
  display: inline-block;
  width: 40px;
  height: 2px;
  margin-inline: 10px;
}

/* Item body */
#itemsContainer {
  padding: 16px;
  display: grid;
  gap: 10px;
  padding-top: 0;
}
.item-card {
  background: var(--secondary);
  border-radius: 12px;
  padding: 10px;
  display: flex;
  gap: 16px;
  align-items: center;
}
.item-image {
  display: flex;
}
.item-image img {
  border-radius: 5px;
}
.item-title {
  font-size: var(--fs-md);
  font-weight: var(--fw-bold);
  color: var(--primary);
  margin: 0;
}
.item-content {
  flex-grow: 1;
}
.item-description {
  font-size: var(--fs-xsm);
  font-weight: var(--fw-medium);
  color: #707070;
  margin: 0;
}
.item-bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.item-price {
  font-size: var(--fs-text);
  font-weight: var(--fw-bold);
  color: var(--primary);
}
.item-action {
  display: flex;
  align-items: center;
  justify-content: center;
}
.qty-control button,
.item-action button {
  display: flex;
  justify-content: center;
  align-items: center;
}
.item-action .add-btn {
  background: var(--primary);
  width: 80px !important;
  height: 32px !important;
  border-radius: 32px;
  color: white;
  gap: 4px;
}
.qty-control {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: white;
  border-radius: 28px;
  width: 80px;
  height: 32px;
  font-size: var(--fs-sm);
  font-weight: var(--fw-medium);
}

/* order list */

.cart-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.4);
  z-index: 90;
}

.cart-sidebar {
  position: fixed;
  top: 0;
  width: 85%;
  max-width: 400px;
  height: 100vh;
  background: white;
  z-index: 100;
  display: flex;
  flex-direction: column;
  border-top-right-radius: 8px;
  border-bottom-right-radius: 8px;
  padding: 16px;
  animation: leftClose 0.8s ease;
}

.cart-sidebar.open {
  left: 0;
  animation: leftOpen 0.8s ease;
}

@keyframes leftOpen {
  0% {
    left: -100%;
  }
  100% {
    left: 0;
  }
}
@keyframes leftClose {
  0% {
    left: 0;
  }
  100% {
    left: -100%;
  }
}

.cart-overlay.show {
  display: block;
}

.cart-header {
  display: flex;
  justify-content: space-between;
  border-bottom: 1px solid #d4d4d4;
  margin: 0;
}

.cart-body {
  overflow-y: auto;
  padding: 16px;
}

#cartItemsContainer .cart-item {
  border-bottom: 1px solid #f1f2f2;
  padding-bottom: 16px;
}
.item-info {
  display: flex;
  align-items: center;
  gap: 8px;
}
.item-info img {
  width: 46px;
  height: 46px;
}
.item-info h4,
.cart-header h3,
.info-header h3 {
  font-size: var(--fs-md);
  font-weight: var(--fw-bold);
  color: var(--primary);
  margin: 0;
}
.cart-item-bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.cart-item-bottom .qty-control,
.sheet-bottom .qty-control {
  background: var(--secondary);
}
.cart-item-price p {
  margin: 0;
  font-size: var(--fs-text);
  font-weight: var(--fw-bold);
  color: var(--primary);
}

#cartSidebar .cart-size {
  font-size: 14px;
}

/* PDP */

.product-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.4);
  z-index: 120;
}
.product-sheet {
  position: fixed;
  width: 100%;
  max-width: 500px;
  height: 72vh;
  background: white;
  z-index: 130;
  border-radius: 20px 20px 0 0;
  animation: upClose 0.8s ease;
  overflow-y: auto;
}
.product-sheet.open {
  bottom: 0;
  animation: upOpen 0.8s ease;
}
@keyframes upOpen {
  0% {
    bottom: -100%;
  }
  100% {
    bottom: 0;
  }
}
@keyframes upClose {
  0% {
    bottom: 0;
  }
  100% {
    bottom: -100%;
  }
}
#productSheetContent {
  padding: 16px;
}
#productSheetContent .cart-header {
  border-bottom: 0;
  padding-block: 10px;
}
.sheet-image {
  text-align: center;
  border: 1px solid #d4d4d4;
  border-radius: 8px;
}
.sheet-image img {
  width: 358px;
  height: 358px;
}
.sheet-bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.sheet-price {
  font-size: var(--fs-md);
  font-weight: var(--fw-bold);
  color: var(--primary);
}
.sheet-content p {
  font-weight: var(--fw-medium);
  font-size: var(--fs-text);
  color: #333333;
}

/* Info Sidebar */

.info-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.4);
  z-index: 140;
}

.info-sidebar {
  position: fixed;
  top: 0;
  width: 85%;
  max-width: 400px;
  height: 100vh;
  background: white;
  z-index: 150;
  transition: right 0.3s ease;
  display: flex;
  flex-direction: column;
  padding: 16px;
  border-top-left-radius: 8px;
  border-bottom-left-radius: 8px;
  animation: rightClose 0.8s ease;
}
.info-sidebar.open {
  right: 0;
  animation: rightOpen 0.8s ease;
}
@keyframes rightOpen {
  0% {
    right: -100%;
  }
  100% {
    right: 0;
  }
}
@keyframes rightClose {
  0% {
    right: 0;
  }
  100% {
    right: -100%;
  }
}

.info-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 1px solid #d4d4d4;
  padding-block: 0 8px;
}
.info-body {
  flex: 1;
  overflow-y: auto;
  padding-block: 20px;
}

.info-section {
  margin-bottom: 20px;
}
.info-section-title {
  display: flex;
  align-items: center;
  gap: 8px;
  height: 48px;
  background: var(--secondary);
  border-radius: 8px;
  padding-inline: 8px;
  color: var(--primary);
  font-size: var(--fs-text);
  font-weight: var(--fw-bold);
  margin-bottom: 16px;
}
.info-section-text {
  font-size: var(--fs-text);
  font-weight: var(--fw-medium);
  color: #333333;
  margin-top: 16px;
  margin: 0;
  line-height: 180%;
}
.info-direction {
  display: flex;
  justify-content: left;
  align-items: center;
  color: #f79009;
  font-size: var(--fs-sm);
  font-weight: var(--fw-medium);
}

.no-result {
  text-align: center;
  padding: 30px;
  color: #999;
}

.pizza.item-card {
  display: grid;
  grid-template-columns: 1fr 3fr;
}

.pizza .item-bottom-box {
  grid-column: 1 / 3;
  border-top: 1px solid #e0e0e0;
}

.pizza .item-bottom , .sheet-bottom{
  gap: 16px;
}

.pizza .item-size , .sheet-bottom .item-size{
  margin-left: auto;
  font-weight: 400;
}
