/* styles.css */
@tailwind base;
@tailwind components;
@tailwind utilities;

body {
  font-family: "Lato", sans-serif;
  padding: 0;
  margin: 0;
  font-size: 16px;
  position: relative;
}

html {
  scroll-behavior: smooth;
}

.bg-brand-light {
  background-color: #74d474;
}

.bg-brand-dark {
  background-color: #088408;
}

.bg-brand {
  background-color: #48ac48;
}

.text-brand-light {
  color: #74d474;
}

/* CKEditor Content Styles */
.ck-content {
  /* Ensure text wrapping and break behavior is standard */
  word-wrap: break-word;
  overflow-wrap: break-word;
}

.ck-content h1,
.ck-content h2,
.ck-content h3,
.ck-content h4,
.ck-content h5,
.ck-content h6 {
  font-weight: 700;
  margin-top: 1.2em;
  margin-bottom: 0.6em;
  line-height: 1.3;
  color: inherit;
}

.ck-content h1 {
  font-size: 2.25em;
}

.ck-content h2 {
  font-size: 1.875em;
  border-bottom: none;
  padding-bottom: 0;
}

.ck-content h3 {
  font-size: 1.5em;
}

.ck-content h4 {
  font-size: 1.25em;
}

.ck-content h5 {
  font-size: 1.125em;
}

.ck-content h6 {
  font-size: 1em;
}

/* Prevent double-bolding if user bolds the header text */
.ck-content h1 strong,
.ck-content h2 strong,
.ck-content h3 strong,
.ck-content h4 strong,
.ck-content h5 strong,
.ck-content h6 strong {
  font-weight: inherit;
}

.ck-content p {
  margin-bottom: 1em;
  line-height: inherit;
  /* Inherit from parent (relaxed) */
}

/* Fix for empty paragraphs collapsing */
.ck-content p:empty::before {
  content: "\00a0";
  display: inline-block;
}

.ck-content ul {
  list-style-type: disc;
  padding-left: 1.625em;
  margin-bottom: 1em;
}

.ck-content ol {
  list-style-type: decimal;
  padding-left: 1.625em;
  margin-bottom: 1em;
}

.ck-content li {
  margin-bottom: 0.25em;
}

/* Nested lists */
.ck-content ul ul,
.ck-content ol ul {
  list-style-type: circle;
  margin-bottom: 0px;
}

.ck-content ol ol,
.ck-content ul ol {
  list-style-type: lower-roman;
  margin-bottom: 0px;
}

.ck-content blockquote {
  border-left: 4px solid #48ac48;
  padding-left: 1em;
  margin-left: 0;
  margin-right: 0;
  font-style: italic;
  color: #555;
  background-color: #f9f9f9;
  padding: 1em;
  border-radius: 0 0.5rem 0.5rem 0;
}

.ck-content hr {
  border: 0;
  border-top: 1px solid #e5e7eb;
  margin: 2em 0;
}

.ck-content a {
  color: #48ac48;
  text-decoration: underline;
  transition: color 0.2s;
}

.ck-content a:hover {
  color: #088408;
}

.ck-content img {
  max-width: 100%;
  height: auto;
  margin: 1.5em 0;
  border-radius: 0.5rem;
}

.ck-content table {
  width: 100%;
  border-collapse: collapse;
  margin-bottom: 1.5em;
  display: block;
  overflow-x: auto;
  /* Responsive tables */
}

.ck-content th,
.ck-content td {
  border: 1px solid #e5e7eb;
  padding: 0.75em;
  text-align: left;
}

.ck-content th {
  background-color: #f9fafb;
  font-weight: 600;
}

.ck-content strong {
  font-weight: 700;
}

.ck-content em {
  font-style: italic;
}

.text-brand-dark {
  color: #088408;
}

.text-brand {
  color: #48ac48;
}

.brand {
  color: #48ac48;
}

.hover\:bg-brand-dark:hover {
  background-color: #1e4b2a;
}

.hover\:text-brand-dark:hover {
  color: #1e4b2a;
}

.swiper-button-prev:after,
.swiper-button-next:after {
  font-size: 1rem;
  font-weight: 600;
}

@keyframes zoomIn {
  0% {
    transform: scale(1);
  }

  100% {
    transform: scale(1.2);
  }
}

.animate-zoomIn {
  animation: zoomIn 5s ease-in-out infinite alternate;
}

/* 👇 Global font styles for headings */
h1,
h2,
h3,
h4 {
  font-family: "Cairo", sans-serif;
}

h5,
h6,
p {
  font-family: "Lato", sans-serif;
}

.swiper-button-prev:after,
.swiper-button-next:after {
  color: #48ac48;
}

.category-product-swiper-controls .swiper-button-prev:after,
.category-product-swiper-controls .swiper-button-next:after,
.sector-product-swiper-controls .swiper-button-prev:after,
.sector-product-swiper-controls .swiper-button-next:after {
  color: #fff;
}

/* base transition */
.transition-all-fast {
  transition: all 0.25s ease;
}

/* Top bar hide */
.topbar-hidden {
  transform: translateY(-100%);
  opacity: 0;
}

/* Sticky header state (applied when body has .header-sticky) */
header.header-sticky {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 60;
  background: white;
  box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.15);
  animation: slideDown 0.3s forwards;
}

@keyframes slideDown {
  from {
    transform: translateY(-100%);
  }

  to {
    transform: translateY(0);
  }
}

/* Optional: smooth top bar transition */
.top-bar {
  transition: transform 0.25s ease, opacity 0.25s ease;
}

.rotated {
  transform: rotate(180deg);
}

/* product-details slider  */

#imageContainer .swiper {
  width: 100%;
  height: 100%;
}

#imageContainer .swiper-slide {
  text-align: center;
  font-size: 18px;
  background: #fff;
  display: flex;
  justify-content: center;
  align-items: center;
}

#imageContainer .swiper-slide img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

#imageContainer .swiper {
  width: 100%;
  height: 300px;
  margin-left: auto;
  margin-right: auto;
}

#imageContainer .swiper-slide {
  background-size: cover;
  background-position: center;
}

#imageContainer .mySwiper2 {
  height: 100%;
  width: 100%;
}

#imageContainer .mySwiper {
  height: 20%;
  box-sizing: border-box;
  padding: 10px 0;
}

#imageContainer .mySwiper .swiper-slide {
  height: 100%;
  opacity: 0.4 !important;
  transform: none !important;
}

#imageContainer .mySwiper .swiper-slide-thumb-active {
  opacity: 1 !important;
}

#imageContainer .mySwiper2 .swiper-slide img {
  max-height: 500px;
}

#imageContainer .mySwiper .swiper-slide img {
  height: 100px;
  width: 100px;
}

.swiper-button-next,
.swiper-rtl .swiper-button-prev,
.swiper-button-prev,
.swiper-rtl .swiper-button-next {
  background: #f7f7f7;
  color: #fff;
  padding: 5px 10px;
  border-radius: 5px;
}