@import url("https://fonts.googleapis.com/css2?family=Outfit:wght@100..900&family=Poppins:ital,wght@0,100;0,200;0,300;0,400;0,500;0,600;0,700;0,800;0,900;1,100;1,200;1,300;1,400;1,500;1,600;1,700;1,800;1,900&display=swap");

/* MIRANTE FONTS */
@font-face {
  font-family: "Mirante";
  src: url("../fonts/Mirante-Black.otf") format("opentype");
  font-weight: 900;
}

/* ZAIN FONTS */
@font-face {
  font-family: "Zain";
  src: url("../fonts/Zain-Regular.ttf") format("truetype");
  font-weight: 400;
}

@font-face {
  font-family: "Zain";
  src: url("../fonts/Zain-Bold.ttf") format("truetype");
  font-weight: 700;
}

@font-face {
  font-family: "Zain";
  src: url("../fonts/Zain-Light.ttf") format("truetype");
  font-weight: 300;
}

/* And so on for other weights */

:root {
  --bg-color: #181818;
  --button-color: #fcf0d6;
  --text-color: #8e1617;
  --secondary-color: #fcf0d6;
  --items-bg-color: #fcf0d6;
}

.mirante {
  font-family: "Mirante", sans-serif;
  font-weight: 900;
}

body {
  background-color: var(--bg-color);
  color: var(--button-color);
  font-family: poppins, sans-serif;
}

.btn-primary {
  background-color: var(--button-color);
  color: var(--text-color);
}

.btn-primary:hover {
  background-color: #f2e3bd;
}

.logo {
  width: calc(4rem + 2vw);
}

/* class colors */
.secondary-color {
  background-color: var(--secondary-color) !important;
}
.text-secondary-custom {
  color: var(--secondary-color);
}

/* ////////// preloader /////////// */

@keyframes zoomFadeOut {
  0% {
    transform: scale(1);
  }
  20% {
    transform: scale(1);
    opacity: 1;
  }
  80% {
    transform: scale(1);
    opacity: 1;
  }
  100% {
    transform: scale(7);
    opacity: 0;
  }
}

@keyframes fadeOutBackground {
  from {
    opacity: 1;
  }
  to {
    opacity: 0;
  }
}
.preloader {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: var(--bg-color);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 9999;
  opacity: 1;
}

/* This class triggers fade-out of background */
.preloader.fade-out {
  animation: fadeOutBackground 0.5s ease forwards;
}

/* Inner element animation (logo or spinner) */
.preloader > div {
  animation: none; /* Will be applied dynamically */
}

.klaf {
  margin-left: 22px;
  margin-bottom: -10px;
}

/* ///////////////////// */

.bg-custom {
  background-color: var(--secondary-color);
}

.text-custom {
  color: var(--text-color);
}

.bg-sec {
  background-color: var(--text-color);
}

.text-bg {
  color: var(--secondary-color);
}

.border-custom {
  border-color: var(--text-color);
}

/* ///// feddback modal styles */

.feedback-modal {
  position: fixed;
  z-index: 1000;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.5);

  display: flex;
  align-items: center;
  justify-content: center;

  visibility: hidden;
  opacity: 0;
  transform: scale(0.95);
  transition: opacity 0.3s ease, transform 0.3s ease, visibility 0.3s;
}

.feedback-modal.show {
  visibility: visible;
  opacity: 1;
  transform: scale(1);
}

.star-rating {
  display: flex;
  justify-content: center;
  gap: 5px;
  margin: 10px 0;
}

.star {
  font-size: 2rem;
  color: #db8d8d;
  cursor: pointer;
  transition: color 0.2s;
}

.star.active {
  color: var(--text-color);
}

#feedbackForm textarea {
  background-color: #fff7e7;
  color: var(--text-color);
}

#feedbackForm textarea::placeholder {
  color: #db8d8d;
}

.space-x-4 > * + * {
  margin-right: 1rem;
  margin-left: 0;
}

.space-x-8 > * + * {
  margin-right: 2rem;
  margin-left: 0;
}

.mr-2 {
  margin-left: 0.5rem;
  margin-right: 0;
}

.mr-3 {
  margin-left: 0.75rem;
  margin-right: 0;
}

.mr-4 {
  margin-left: 1rem;
  margin-right: 0;
}

/* ///////////////////// */

.category-card {
  background-color: var(--button-color);
  color: var(--text-color);
  border-radius: 20px;
  transition: transform 0.3s ease;

  border-top-left-radius: 1000px;
  border-top-right-radius: 1000px;
  border-bottom-left-radius: 50px;
  border-bottom-right-radius: 50px;
  width: calc(9.5rem + 3vw);
  height: calc(15rem + 4vw);
}
.category-card img {
  width: calc(8.7rem + 3.3vw);
  height: calc(8.7rem + 3.3vw);
  border-radius: 1120px;
  object-fit: cover;
  margin: auto;
}

.category-gap {
  gap: 2vw;
}

@media (max-width: 600px) {
  .category-gap {
    gap: 5vw;
  }
}

@media (max-width: 400px) {
  .category-gap {
    gap: 5vw;
  }
  .category-card {
    width: calc(8rem + 5.5vw);
    height: calc(14rem + 4vw);
  }
  .category-card img {
    width: calc(8.3rem + 3vw);
    height: calc(8.3rem + 3vw);
  }
}

.category-card:hover {
  transform: translateY(-5px);
}

.circle {
  position: absolute;
  top: -55vw;
  /* changed -0vw to 0 for clarity */
  left: 50%;
  transform: translateX(-50%);
  width: 60vw;
  height: 60vw;
  background: #ff0000;
  /* solid red */
  border-radius: 50%;
  filter: blur(130px);
  opacity: 0.5;
  z-index: -10;
}

header {
  border-bottom: 2px solid rgba(255, 0, 0, 0.3);
}

.foter {
  border-top: 2px solid rgba(255, 0, 0, 0.3);
}
@media (min-width: 768px) {
  footer {
    border-top: 2px solid rgba(255, 0, 0, 0.3);
  }
}
@media (max-width: 768px) {
  .circle {
    top: -45vw;
    filter: blur(80px);
  }
}

@keyframes fadeDown {
  0% {
    opacity: 0;
    transform: translateY(-100px);
  }
  100% {
    opacity: 1;
    transform: translateY(0);
  }
}

.fade-down {
  animation-name: fadeDown;
  animation-duration: 1s;
  animation-timing-function: ease-out;
  animation-fill-mode: forwards;
}

@keyframes zoomIn {
  0% {
    transform: scale(0);
    opacity: 0;
  }
  100% {
    transform: scale(1);
    opacity: 1;
  }
}

.zoom-in {
  animation-name: zoomIn;
  animation-duration: 1s; /* half a second */
  animation-timing-function: ease-out;
  animation-fill-mode: forwards; /* Keep the final state */
}

@keyframes fadeUp {
  0% {
    opacity: 0;
    transform: translateY(100px);
  }
  100% {
    opacity: 1;
    transform: translateY(0);
  }
}

.fade-up {
  animation-name: fadeUp;
  animation-duration: 1s;
  animation-timing-function: ease-out;
  animation-fill-mode: forwards;
}

/* Search Offcanvas Styles */
.search-offcanvas-panel {
  background-color: var(--bg-color) !important;
  display: flex;
  flex-direction: column;
}

/* Search Input Styling */
.search-input {
  background-color: var(--items-bg-color) !important;
  border: 1px solid var(--secondary-color) !important;
  color: var(--text-color) !important;
}

.search-input:focus {
  border-color: var(--secondary-color) !important;
  box-shadow: 0 0 0 1px var(--secondary-color) !important;
}

.search-input::placeholder {
  color: rgba(142, 22, 23, 0.6) !important;
}

/* Header and Secondary Text Colors */
#searchOffcanvas h2 {
  color: var(--secondary-color) !important;
}

#searchOffcanvas button {
  color: var(--secondary-color) !important;
}

#searchOffcanvas .text-gray-400,
#searchOffcanvas .text-gray-500 {
  color: var(--secondary-color) !important;
  opacity: 0.8;
}

/* Border Colors */
#searchOffcanvas .border-gray-600 {
  border-color: var(--secondary-color) !important;
}

/* Search Results Items - This is the key fix */
#searchResults .offcanvas-item,
#searchResults > div,
.search-result-item {
  background-color: var(--items-bg-color) !important;
  color: var(--text-color) !important;
  border: 1px solid var(--secondary-color) !important;
  border-radius: 8px !important;
}

/* Target all search result items more specifically */
#searchResults > * {
  background-color: var(--items-bg-color) !important;
}

/* Item text content */
#searchResults h3,
#searchResults .item-name,
#searchResults .font-bold,
#searchResults .text-lg {
  color: var(--text-color) !important;
}

/* Item price text */
#searchResults .item-price,
#searchResults .text-right {
  color: var(--text-color) !important;
}

/* Category/subcategory text */
#searchResults .text-sm,
#searchResults .category-text {
  color: var(--text-color) !important;
  opacity: 0.8;
}

/* Results Container */
.search-results-container {
  height: calc(100vh - 140px);
  background-color: var(--bg-color);
}

/* Custom Scrollbar */
.search-results-container::-webkit-scrollbar {
  width: 6px;
}

.search-results-container::-webkit-scrollbar-track {
  background: var(--bg-color);
  border-radius: 3px;
}

.search-results-container::-webkit-scrollbar-thumb {
  background: var(--secondary-color);
  border-radius: 3px;
}

.search-results-container::-webkit-scrollbar-thumb:hover {
  background: rgba(252, 240, 214, 0.8);
}

/* Item Hover Effects */
.offcanvas-item:hover,
#searchResults > div:hover {
  background-color: var(--items-bg-color) !important;
  transform: translateY(-1px);
  transition: all 0.2s ease;
  opacity: 0.9;
}

/* Clear Search Button */
#clearSearchBtn {
  color: var(--secondary-color) !important;
  opacity: 0.7;
}

#clearSearchBtn:hover {
  color: var(--secondary-color) !important;
  opacity: 1;
}

/* No Results State */
#noResults {
  color: var(--secondary-color);
}

#noResults i {
  color: var(--secondary-color);
  opacity: 0.5;
}

/* Search icon in input */
#searchOffcanvas .fa-search {
  color: var(--text-color) !important;
  opacity: 0.6;
}

/* Results count text */
#searchResultsCount {
  color: var(--secondary-color) !important;
  opacity: 0.8;
}

/* Close button */
#searchOffcanvas .fa-times {
  color: var(--secondary-color) !important;
}

/* Force override any existing styles on search items */
[id^="searchResults"] div,
[id^="searchResults"] > * {
  background-color: var(--items-bg-color) !important;
  background: var(--items-bg-color) !important;
}

/* Additional specific targeting for dynamically created items */
.search-item,
.menu-item,
.result-item {
  background-color: var(--items-bg-color) !important;
  color: var(--text-color) !important;
}

/* RTL Support */
.rtl-layout .search-offcanvas-panel {
  direction: rtl;
  text-align: right;
}

.rtl-layout .search-offcanvas-panel .flex {
  flex-direction: row-reverse;
}

.rtl-layout .search-input {
  text-align: right;
}

.footer-icon {
  display: none;
}

/* Mobile Footer Styles - Under 768px */
@media (max-width: 767px) {
  /* Animation for sliding up (show) and down (hide) */

  /* Main toggle arrow button */
  .footer-toggle {
    position: fixed;
    bottom: 0.5rem;
    left: 50%;
    transform: translateX(-50%);
    width: 40px;
    height: 40px;
    background: var(--secondary-color);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-color);
    font-size: 24px;
    cursor: pointer;
    transition: transform 0.3s ease, opacity 0.3s ease;
    z-index: 1003;
    backdrop-filter: blur(10px);
    box-shadow: 0 0px 20px rgba(0, 0, 0, 0.5);
    border: 3px solid var(--text-color);
    opacity: 1; /* Default visible */
  }

  #footerToggle {
    transition: transform 0.3s ease, opacity 0.3s ease;
  }

  #footerToggle.slide-hidden {
    transform: translate(-50%, 100%); /* center horizontally, move down */
    opacity: 0;
    pointer-events: none;
  }

  .footer-toggle i {
    font-size: 1rem;
  }

  footer {
    position: fixed;
    bottom: -20px;
    left: 0;
    right: 0;
    background: transparent;
    padding: 1rem;
    z-index: 1000;
    transform: translateY(100%);
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
  }

  footer.show {
    transform: translateY(0);
    opacity: 1;
    visibility: visible;
  }

  footer .grid {
    display: block;
    text-align: center;
  }

  /* Overlay for background */
  .footer-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: 999;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
  }

  .footer-overlay.show {
    opacity: 1;
    visibility: visible;
  }

  /* Language Section - Hidden by default */
  footer .grid > div:first-child {
    position: fixed;
    bottom: 140px;
    left: 1rem;
    right: 1rem;
    background: var(--secondary-color);
    border-radius: 15px;
    padding: 1.5rem;
    color: var(--text-color);
    transform: translateY(100%);
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    z-index: 1001;
    backdrop-filter: blur(10px);
    box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.3);
  }

  footer .grid > div:first-child.show {
    transform: translateY(0);
    opacity: 1;
    visibility: visible;
  }

  footer .grid > div:first-child h3 {
    color: var(--text-color);
    font-size: 1.5rem;
    margin-bottom: 1rem;
  }

  .language-buttons {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    margin-bottom: 1rem;
  }

  .language-buttons button {
    background: var(--secondary-color);
    color: var(--text-color);
    border: none;
    padding: 0.75rem 1.5rem;
    border-radius: 1118px;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s ease;
    border: 2px solid transparent;
  }

  .language-buttons button:hover {
    background: var(--secondary-color);
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
  }

  .language-buttons button.active {
    background: var(--text-color);
    color: white;
    border-color: var(--text-color);
    box-shadow: 0 2px 12px rgba(220, 38, 38, 0.3);
  }

  .language-buttons button.active:hover {
    background: var(--text-color);
  }

  /* Social Media Section - Hidden by default */
  footer .grid > div:nth-child(2) {
    position: fixed;
    bottom: 140px;
    left: 1rem;
    right: 1rem;
    background: var(--secondary-color);
    border-radius: 15px;
    padding: 1.5rem;
    color: var(--text-color);
    transform: translateY(100%);
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    z-index: 1001;
    backdrop-filter: blur(10px);
    box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.3);
    max-height: 60vh;
    overflow-y: auto;
  }

  footer .grid > div:nth-child(2).show {
    transform: translateY(0);
    opacity: 1;
    visibility: visible;
  }

  footer .grid > div:nth-child(2) h3 {
    color: var(--text-color);
    font-size: 1.5rem;
    margin-bottom: 1rem;
  }

  .social-buttons {
    display: flex !important;
    gap: 0.75rem;
    margin-bottom: 1rem;
  }

  .social-button {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
    background: var(--text-color);
    color: white;
    text-decoration: none;
    padding: 0.75rem 0.75rem;
    border-radius: 1000px;
    transition: all 0.3s ease;
  }

  .social-button:hover {
    background: var(--text-color);
    transform: translateY(-2px);
  }

  .social-button i {
    font-size: 1.2rem;
  }

  /* Contact Info Section - Hidden by default */
  footer .grid > div:last-child {
    position: fixed;
    bottom: 140px;
    left: 1rem;
    right: 1rem;
    background: var(--secondary-color);
    border-radius: 15px;
    padding: 1.5rem;
    color: var(--text-color);
    transform: translateY(100%);
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    z-index: 1001;
    backdrop-filter: blur(10px);
    box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.3);
  }

  footer .grid > div:last-child.show {
    transform: translateY(0);
    opacity: 1;
    visibility: visible;
  }

  footer .grid > div:last-child h3 {
    color: var(--text-color);
    font-size: 1.5rem;
    margin-bottom: 1rem;
  }

  .contact-info {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    margin-bottom: 1rem;
  }

  .contact-item {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
    font-weight: bold;
  }

  .contact-icon {
    width: 25px;
    height: 25px;
    background: var(--text-color);
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 12px;
  }

  /* Bottom Icon Row - Hidden initially, shows when footer is open */
  .footer-icons {
    position: fixed;
    bottom: 80px;
    left: 50%;
    transform: translateX(-50%);
    background: var(--secondary-color);
    border-radius: 125px;
    padding: 0.75rem 2rem;
    display: flex;
    justify-content: center;
    gap: 2rem;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
    backdrop-filter: blur(10px);
    z-index: 1002;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
  }

  .footer-icons.show {
    opacity: 1;
    visibility: visible;
  }

  .footer-icon {
    width: 35px;
    height: 35px;
    background: transparent;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-color);
    text-decoration: none;
    font-size: 20px;
    cursor: pointer;
    transition: all 0.3s ease;
    border: 2px solid transparent;
  }

  .footer-icon:hover {
    transform: scale(1.1);
    border-color: var(--text-color);
  }

  .footer-icon.active {
    background: var(--text-color);
    color: white;
  }

  /* Close button for sections */
  .section-close {
    position: absolute;
    top: 1rem;
    right: 1rem;
    background: var(--text-color);
    color: white;
    border: none;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 16px;
    transition: all 0.3s ease;
  }

  .section-close:hover {
    background: var(--text-color);
    transform: scale(1.1);
  }
}

/* Desktop styles remain unchanged */
@media (min-width: 768px) {
  footer {
    position: static;
    background: transparent;
    transform: none;
    opacity: 1;
    visibility: visible;
  }

  body {
    padding-bottom: 0;
  }

  .footer-overlay {
    display: none;
  }

  .section-close {
    display: none;
  }

  .footer-toggle {
    display: none;
  }

  .footer-icons {
    position: static;
    transform: none;
    opacity: 1;
    visibility: visible;
  }
}

/* ////////category page///////////// */

.btn-primary {
  background-color: var(--button-color);
  color: var(--text-color);
}

.item-card {
  background-color: var(--button-color);
  color: var(--text-color);
  border-radius: 1130px;
  transition: transform 0.3s ease;

  height: 8rem;
}

.item-card:hover {
  transform: translateY(-3px);
}

.popular-badge {
  background-color: var(--text-color);
  color: var(--button-color);
}

.flex-grow {
  margin-inline-start: 1rem !important;
}
