@tailwind base;
@tailwind components;
@tailwind utilities;

@import "swiper/css";
@import "swiper/css/navigation";
@import "swiper/css/pagination";
@import "swiper/css/effect-coverflow";
@import "swiper/css/free-mode";
@import "swiper/css/effect-cards";

@import "./slider.css";

@import "./_lib/components/page_component/articles/article.css";
@import "./_lib/components/page_component/products/styles.css";
@import "./_lib/components/page_component/articles/styles.css";
@import "./_lib/components/float-btn/float.css";
@import "./_lib/components/navbar/navbar.css";
@import "./_lib/components/page_component/home/styles.css";

@import "react-toastify/dist/ReactToastify.css";

@layer base {
  * {
    scroll-behavior: smooth !important;
    font-family: var(--font-iran-sans);
  }

  .masonry {
    column-gap: 0.25em;
    column-count: 2;
  }
  .masonry-sm {
    column-gap: 0.25em;
    column-count: 2;
  }
  .masonry-md {
    column-gap: 0.25em;
    column-count: 3;
  }
  .break-inside {
    break-inside: avoid;
  }

  html {
    background: #f7f7f7;
  }

  body,
  html {
    overflow-x: hidden !important;
  }
}


html:has(.pwa-helper) {
  /* overflow: hidden; */
}
body:has(.std-reg) footer {
  @apply mt-[0px];
}
body:has(.std-reg) .navbar {
  position: absolute;
  /* background-color: transparent;
  color: #fff;
  width: 100%; */
  /* height: 80px; */
  margin: auto;
  z-index: 100;
  left: 50%;
  transform: translate(-50%);
  top: 20px;
}

body:has(.home-page) .navbar {
  position: absolute;
  /* background-color: transparent;
  color: #fff;
  width: 100%; */
  /* height: 80px; */
  margin: auto;
  z-index: 100;
  left: 50%;
  transform: translate(-50%);
  top: 20px;
}
body:has(.home-page) .fix-bg-object {
  display: none;
}
body:has(.home-page) .fix-bg-object-2 {
  display: none;
}
body:has(.qr-page) .navbar {
  display: none;
}

@layer components {
  .page-title {
    @apply !font-kalameh text-[40px] font-extrabold text-secondary-950;
  }

  .page-title-2 {
    @apply !font-kalameh text-4xl font-black text-primary-700 mr-2 max-[580px]:text-right max-[580px]:mr-0;
    position: relative;
  }
}

.page-title-2::before {
  @apply bg-primary-700 max-[580px]:!right-[-36px];
  content: "";
  position: absolute;
  width: 48px;
  height: 5px;
  rotate: 90deg;
  right: -46px;
  margin-top: 16px;
  border-radius: 0 0 4px 4px;
}

.fix-bg-object {
  @apply bg-primary-700;
  width: 600px;
  height: 600px;
  border-radius: 50%;
  position: fixed;
  left: -300px;
  top: -250px;
  z-index: -102;
  transform: rotate(45deg);
}

.fix-bg-object-2 {
  @apply bg-secondary-400  bg-opacity-90;
  width: 600px;
  height: 600px;
  border-radius: 50%;
  position: fixed;
  left: -180px;
  top: -400px;
  z-index: -100;

  transform: rotate(45deg);
}

/* xxxxxxxxxxx   xxxxxxxxxxxxxx */

.blur-backdrop-box {
  @apply bg-red-700 bg-opacity-60;
  height: 100%;
  position: absolute;
  width: 100% !important;
  z-index: 2;
}

.custom-pagination-styles {
  display: flex;
  flex-direction: row;
  flex-wrap: wrap;
  justify-content: center;
  align-items: center;
  gap: 8px;
}

.custom-pagination-styles li {
  @apply max-[1000px]:!h-[32px] max-[1000px]:!w-[32px];
  width: 40px;
  height: 40px;
  display: flex;
  justify-content: center;
  align-items: center;
  background-color: #f3f3f3;
  border-radius: 4px;
}
.custom-pagination-styles li div {
  @apply !w-full !h-full flex justify-center items-center;
}
.custom-pagination-styles li div.active {
  @apply bg-primary-main;
  color: #fff;
}
.custom-pagination-styles li:hover {
  @apply bg-primary-200 text-primary-900;
}
.custom-pagination-styles .rc-pagination-item-active {
  @apply bg-primary-main;
  color: #fff;
}
.custom-pagination-styles li:last-child {
  background-color: transparent;
}
.custom-pagination-styles li:first-child {
  background-color: transparent;
}

.Toastify__toast-body > div {
  @apply font-iran-sans;
}

.input-container {
  width: 100%;
  /* padding: 0 50px; */
  height: 64px;
  border-radius: 0.5rem;
  margin-bottom: 24px;
  background-color: #fff;
}

.input-container input {
  height: 64px;
  width: 100% !important;
  padding-right: 16px;
  background-color: transparent !important;
  font-size: 18px;
  border: 2px solid #e7e7e7;
}
.input-container input:focus {
  outline-width: 0;
  outline: none;
}
.input-container input::placeholder {
  font-size: 18px;
}

.input-container textarea {
  width: 100% !important;
  background-color: transparent !important;
  font-size: 18px;
  border: 2px solid #e7e7e7;
  resize: none;
}
.input-container textarea:focus {
  outline-width: 0;
  outline: none;
}
.input-container textarea::placeholder {
  font-size: 18px;
}

.form-input-container input {
  @apply !font-iran-sans border-solid border-2 rounded-[4px] border-primary-300 p-[16px] w-full mt-[8px];
  outline: none !important;
}

.form-input-container-article input {
  @apply !border-primary-400 !font-iran-sans border-solid border-2 rounded-[4px] p-[16px] w-full mt-[8px];
  outline: none !important;
}

.form-input-container-article input {
  @apply !border-primary-300 !font-iran-sans border-solid border-2 rounded-[4px] p-[16px] w-full mt-[8px];
}
.form-input-container input::placeholder {
  @apply !font-iran-sans;
}
.form-input-container textarea {
  @apply focus:border-primary-300 !font-iran-sans border-solid border-2 rounded-[4px] border-primary-300 p-[16px] w-full mt-[8px];
  outline: none !important;
}
.form-input-container textarea::placeholder {
  @apply font-iran-sans;
}

.form-input-container label {
  @apply font-iran-sans text-primary-800 mr-[16px];
  cursor: pointer;
}
.form-input-container .select-container {
  @apply !border-primary-300 !py-[14px] !h-[auto] mt-[8px];
}
.form-input-container-article .select-container {
  @apply !border-primary-300 !py-[14px] !h-[auto] mt-[8px];
}
.form-input-container .select-container > span {
  @apply !text-[16px] !font-iran-sans;
}

.form-input-container .inp-err {
  @apply !text-secondary-500 mt-[8px];
  display: none !important;
}
.has-err .inp-err {
  display: block !important;
}

.has-err input {
  @apply !border-secondary-500;
}

.has-err .select-container {
  @apply !border-secondary-500;
}

.has-err textarea {
  @apply !border-secondary-500;
}

.form-input-container-small input {
  height: 48px !important;
}
.form-input-container-small .select-container {
  height: 48px !important;
}

/* ************ product  ************* */

.product-category-card {
  @apply max-[800px]:!w-[100%];
  width: 80%;
  height: 80px;
  border-width: 3px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-direction: row;
  overflow: hidden;
  padding: 4px;
  border-radius: 48px;
  cursor: pointer;
  background-color: #fff;
}

.product-category-card .img-box {
  width: 70px !important;
  height: 70px !important;
  border-radius: 50%;
  padding: 10px;
  object-fit: none !important;
  background-color: #fff;
  box-shadow: #c8c8c8be 0px 0px 60px 10px;
}

.product-category-card span {
  /* writing-mode: vertical-rl;
  text-orientation: mixed; */
  color: gray;
  font-size: 16px !important;
  transition: all 300ms;
}

.product-category-card:hover {
  @apply bg-primary-400;
  /* box-shadow: #0000007e 0px 0px 20px 10px inset,
    rgba(100, 100, 111, 0.2) 0px 7px 29px 0px; */
}
.product-category-card:hover span {
  @apply text-white;
}

.product-link .active-link {
  @apply bg-primary-800;
  /* box-shadow: #0000007e 0px 0px 20px 10px inset,
    rgba(100, 100, 111, 0.2) 0px 7px 29px 0px; */
}
.product-link .active-link span {
  @apply text-white;
}

.product-card {
  display: flex;
  align-items: center;
  border-radius: 8px;
  /* justify-content: end; */
  height: 120px;
  position: relative;
  box-shadow: 0 0 10px 0 #e0e0e0;

  /* border-radius: 50px;
  position: relative;
  background: #efefef;
  box-shadow:  20px 20px 60px #cbcbcb,
               -20px -20px 60px #ffffff;
  height: 0;
  padding-top: 100%; */
}
.product-card::before {
  content: "";
  position: absolute;
  z-index: 1;
  right: 0;
  border-radius: 16px;
  top: 10px;
  right: 0px;
  background: #f0f0f0;
  /* box-shadow: 20px 20px 60px #c0c0c0; */
  height: 120px;
  width: 120px;
}

.product-card img {
  /* border-radius: 50%; */
  width: 150px;
  /* height: 120px; */
  aspect-ratio: 2/2;
  margin-right: -10px;
  z-index: 10;
  margin-top: -30px;
}

.product-card .icon {
  @apply duration-300 hover:bg-primary-800 hover:!text-white;
  background: #fff;
  cursor: pointer;
  border-radius: 8px;
  position: absolute;
  /* border: 1px solid red; */
  color: red !important;
  bottom: -10px;
  /* right: 64.5px; */
  left: 10px;
  z-index: 10;
  padding: 2px 16px;
  box-shadow: rgba(17, 17, 26, 0.1) 0px 1px 0px,
    rgba(17, 17, 26, 0.1) 0px 8px 24px, rgba(17, 17, 26, 0.1) 0px 16px 48px;
}

.service-description-box {
  @apply max-[800px]:!p-[32px] max-[600px]:!p-[28px] bg-primary-900;
  width: 100%;
  height: auto;
  border-radius: 16px;
  padding: 50px;
}
.service-description-box img {
  @apply float-left rounded-[16px] w-[500px] max-[1375px]:w-[450px] max-[1100px]:float-none max-[1100px]:!m-[auto] max-[1100px]:!mb-[36px]  max-[1100px]:!h-auto max-[1100px]:aspect-square max-[1100px]:!font-[16px];
  height: 110% !important;
  margin: -15% 70px 8px 0;
  font-size: 18px !important;
}
.service-description-box p {
  color: #fff;
  line-height: 36px;
}

.home-main-slider {
  position: relative;
}

.home-main-slider .container-slider * {
  box-shadow: none !important;
}
.home-main-slider .container-slider .swiper-wrapper {
  position: absolute !important;
}
.home-main-slider .container-slider {
  @apply aspect-video;
  width: 100%;
  max-height: 540px;
  min-height: 310px;
  border-radius: 0 !important;
  overflow: hidden !important;
}
.home-main-slider .container-slider .swiper-button-prev {
  @apply max-[640px]:hidden;
}
.home-main-slider .container-slider .swiper-button-next {
  @apply max-[640px]:hidden;
}

.home-main-slider .swiper-wrapper,
.home-main-slider .swiper-slide {
  border-radius: 0 !important;
}

.home-main-slider .small-slider {
  width: 40%;
  height: 220px;
  bottom: -60px;
  left: 16px;
  position: absolute;
}
.home-main-slider .small-slider .swiper-slide-thumb-active {
  opacity: 1 !important;
}
.home-main-slider .small-slider .swiper-slide {
  opacity: 0.8;
}
.home-main-slider
  .container-slider
  .swiper-pagination
  .swiper-pagination-bullet {
  @apply max-[500px]:!w-[10px];
  width: 12px;
  height: auto;
  background-color: #fff;
  aspect-ratio: 1/1;
  transition: all 300ms;
}
.home-main-slider
  .container-slider
  .swiper-pagination
  .swiper-pagination-bullet-active {
  @apply max-[500px]:!w-[20px];
  width: 26px;
  border-radius: 32px !important;
  aspect-ratio: 2/1;
}
/* .home-main-slider .small-slider .swiper-slide {
  border-radius: 16px !important;
}
.home-main-slider .small-slider img {
  border-radius: 16px !important;
} */

.product-list-slider .swiper {
  width: 100%;
  height: 100%;
}

.product-list-slider :first-child.swiper-slide {
  border-radius: 0 8px 8px 0;
}
.product-list-slider :last-child.swiper-slide {
  border-radius: 8px 0 0 8px;
}

.product-list-slider .swiper-slide {
  text-align: center;
  font-size: 18px;
  box-shadow: 0 0 0 0;

  /* Center slide text vertically */
  display: flex;
}

.product-list-slider .swiper-slide img {
  width: 100%;
  aspect-ratio: 1/1;
  object-fit: contain !important;
}

.product-list-slider .swiper-button-prev,
.product-list-slider .swiper-button-next {
  @apply max-[600px]:!hidden hover:!text-white;
  transition: all 300ms;
  opacity: 1;
  box-shadow: 0 0 8px 0 #b7b7b7;
}
.hide-arrow-prev .swiper-button-prev {
  opacity: 0;
}
.hide-arrow-next .swiper-button-next {
  opacity: 0;
}

.qr-page .glass {
  /* From https://css.glass */
  background: rgba(255, 255, 255, 0.25);
  border-radius: 8px;
  box-shadow: 0 4px 30px rgba(0, 0, 0, 0.1);
  backdrop-filter: blur(8.1px);
  -webkit-backdrop-filter: blur(8.1px);
  border: 1px solid rgba(255, 255, 255, 0.39);
}
.qr-page .logo-box {
  /* filter: invert(15%) sepia(52%) saturate(3754%) hue-rotate(342deg) brightness(94%) contrast(93%); */
  filter: invert(1) brightness(100);
}

.white-filter {
  filter: invert(1) brightness(100);
}

.home-articles-slider * {
  box-shadow: none;
}

.home-articles-slider .swiper-pagination {
  bottom: -40px;
  @apply max-[500px]:-bottom-7;
}
.home-articles-slider .swiper-pagination .swiper-pagination-bullet {
  @apply border-[2px] duration-300 opacity-100 border-secondary-main bg-transparent w-4 h-auto aspect-square max-[500px]:w-2;
}
.home-articles-slider .swiper-pagination .swiper-pagination-bullet-active {
  @apply bg-secondary-main;
}

.home-gallery-slider .swiper-pagination {
  bottom: -40px;
  display: block;
  @apply max-[500px]:-bottom-7;
}
.home-gallery-slider .swiper-pagination .swiper-pagination-bullet {
  @apply border-[2px] duration-300 opacity-100 border-secondary-main bg-transparent w-4 h-auto aspect-square max-[500px]:w-2;
}
.home-gallery-slider .swiper-pagination .swiper-pagination-bullet-active {
  @apply bg-secondary-main;
}

.home-category-box:hover {
  box-shadow: 0 2px 10px 0 rgb(179, 6, 6);
  background-color: #fff;
}
