/* iOS Mobile Preview Normalization */
html {
  -webkit-text-size-adjust: 100%;
}

* {
  -webkit-tap-highlight-color: transparent;
  -webkit-box-sizing: border-box;
  box-sizing: border-box;
}

body {
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

input[type="text"],
input[type="email"],
input[type="tel"],
input[type="number"],
input[type="password"],
input[type="search"],
textarea {
  -webkit-appearance: none;
  appearance: none;
}

select {
  -webkit-appearance: none;
  appearance: none;
  background-color: transparent;
}

button {
  -webkit-appearance: none;
  appearance: none;
}

/* End iOS Normalization */

/* ========== FONTS ========== */
@font-face {

  font-family: "The Seasons";
  src: url("../Attachements/The.Seasons/The.Seasons/The Seasons Regular.ttf") format("truetype");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "The Seasons";
  src: url("../Attachements/The.Seasons/The.Seasons/The Seasons Light.ttf") format("truetype");
  font-weight: 300;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "The Seasons";
  src: url("../Attachements/The.Seasons/The.Seasons/The Seasons Bold.ttf") format("truetype");
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "The Seasons";
  src: url("../Attachements/The.Seasons/The.Seasons/The Seasons Italic.ttf") format("truetype");
  font-weight: 400;
  font-style: italic;
  font-display: swap;
}

@font-face {
  font-family: "The Seasons";
  src: url("../Attachements/The.Seasons/The.Seasons/The Seasons Light Italic.ttf") format("truetype");
  font-weight: 300;
  font-style: italic;
  font-display: swap;
}

@font-face {
  font-family: "The Seasons";
  src: url("../Attachements/The.Seasons/The.Seasons/The Seasons Bold Italic.ttf") format("truetype");
  font-weight: 700;
  font-style: italic;
  font-display: swap;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  overflow-x: hidden;
}

body {
  font-family: "Poppins", sans-serif;
  background-color: #fffafa;
  color: #5a4538;
  line-height: 1.6;
  overflow-x: hidden;
  zoom: 0.7;
}

body.menu-open {
  overflow: hidden !important;
  position: fixed !important;
  width: 100% !important;
  height: 100vh !important;
}

html.menu-open {
  overflow: hidden !important;
}

/* ========== ANIMATIONS ========== */
@keyframes slideInFromLeft {
  0% {
    opacity: 0;
    transform: translateX(-50px);
  }

  100% {
    opacity: 1;
    transform: translateX(0);
  }
}

@keyframes dropdownSlide {
  0% {
    opacity: 0;
    transform: translateY(-10px);
  }

  100% {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes slideIn {
  0% {
    opacity: 0;
    transform: translateY(30px);
  }

  100% {
    opacity: 1;
    transform: translateY(0);
  }
}

.text-slide {
  animation: slideInFromLeft 1s ease-out;
}

.slide-in {
  opacity: 0;
  transform: translateY(30px);
  transition:
    opacity 0.6s ease-out,
    transform 0.6s ease-out;
}

.slide-in.visible {
  opacity: 1;
  transform: translateY(0);
}

/* ========== HERO SECTION ========== */
.hero-section {
  padding-top: 0;
  padding-bottom: 0;
  padding-left: 0;
  padding-right: 0;
  margin-top: 7rem;
  /* Prevent iOS Safari from miscalculating the top offset */
  -webkit-transform: translateZ(0);
  transform: translateZ(0);
}

.hero-container {
  max-width: 100%;
  margin: 0;
}

.hero-banner {
  position: relative;
  border-radius: 0;
  overflow: hidden;
  height: 120vh;
  height: 120dvh;
  /* iOS Safari: uses actual visible viewport, not including browser chrome */

  background: #aaa;
}

.hero-image,
.hero-video {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 58%;
}

.hero-video-mobile {
  display: none;
}

@media (max-width: 780px) {
  .hero-video-desktop {
    display: none;
  }

  .hero-video-mobile {
    display: block;
  }
}

.hero-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: transparent;
}


.hero-content {
  position: relative;
  height: 100%;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: flex-start;
  text-align: left;
  padding-left: 6rem;
  padding-right: 6rem;
  padding-bottom: 0;
  z-index: 10;
  max-width: 70rem;
}

.hero-title {
  font-size: 3.1rem;
  font-weight: 400;
  color: #f7f5f2;
  margin-bottom: 1.5rem;
  line-height: 1.1;
  max-width: 900px;
  text-transform: uppercase;
  font-family: "Poppins", sans-serif;
}

.hero-subtitle {
  font-size: 1.3rem;
  color: #f7f5f2;
  margin-bottom: 2rem;
  line-height: 1.5;
  max-width: 800px;
}

/* Hero section button styling */
.hero-content .btn.btn-primary {
  background-color: #ffffff08;
  color: #f7f5f2;
  border-radius: 10px;
  font-weight: 400;
}

@media (hover: hover) {
  .hero-content .btn.btn-primary:hover {
    background-color: #e6ded4;
    color: #1e1e1e;
  }
}

/* ========== BUTTONS ========== */
.btn {
  padding: 1.25rem 2.5rem;
  border: none;
  border-radius: 9999px;
  font-size: 1.3rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.3s ease;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.btn-primary {
  background-color: white;
  color: black;
  padding: 1rem 2.5rem;
  font-size: 1.3rem;
  font-weight: 600;
  border-radius: 50px;
  letter-spacing: 0.1em;
  width: fit-content;
}

@media (hover: hover) {
  .btn-primary:hover {
    background-color: #4f2d1f;
    color: white;
  }
}

.btn-secondary {
  background-color: #4f2d1f;
  color: white;
  font-weight: bold;
}

@media (hover: hover) {
  .btn-secondary:hover {
    background-color: black;
  }
}

.btn-light {
  background-color: #f7f5f2;
  color: black;
}

@media (hover: hover) {
  .btn-light:hover {
    background-color: #5a4538;
    color: white;
  }
}

.btn:active {
  transform: scale(0.98);
}

/* ========== CONTAINER ========== */
.container {
  max-width: calc(102vw);
  margin: 0 auto;
}

/* ========== SECTIONS ========== */
.categories-section,
.community-section {
  padding: 6rem;
}

.routines-section,
.bestsellers-section {
  padding: 0;
}

/* Routines section button styling */
.routines-section .btn.btn-secondary {
  padding: 1rem 1.3rem !important;
  font-weight: bold !important;
  background-color: #1e1e1e !important;
  color: #f7f5f2 !important;
}

.routines-section .btn:hover,
.routines-section .btn.btn-secondary:hover {
  background-color: #5a4538 !important;
  color: #f7f5f2 !important;
}

/* Best-sellers section button styling */
.bestsellers-section .btn.btn-secondary {
  background-color: #1e1e1e !important;
  color: #f7f5f2 !important;
}

.bestsellers-section .btn:hover,
.bestsellers-section .btn.btn-secondary:hover {
  background-color: #5a4538 !important;
  color: #f7f5f2 !important;
}

/* Split banner button styling */
.split-banner .btn.btn-secondary {
  background-color: #1e1e1e !important;
  color: #f7f5f2 !important;
}

.split-banner .btn.btn-secondary:hover {
  background-color: #000000 !important;
  color: #f7f5f2 !important;
}

.section-header {
  text-align: center;
  margin-bottom: 3rem;
}

.section-title {
  font-size: 4.3rem;
  font-weight: 600;
  color: #5a4538;
  font-family: "The Seasons", "Poppins", sans-serif;
  line-height: 1.3;
}

.section-title span {
  display: inline-block;
  width: fit-content;
  white-space: nowrap;
}

.routine {
  display: inline-block;
  padding: 0 0.8rem;
}

.section-title .font-light {
  font-size: 2.9rem;
  display: inline-block;
  font-weight: 600;
  font-family: "The Seasons";
}

.section-subtitle {
  font-size: 1.7rem;
  color: #5a4538;
  white-space: normal;
  line-height: 1.6;
}

.section-subtitle br {
  display: none;
}

.font-bold {
  font-weight: 700;
}

.font-light {
  font-weight: 300;
  font-family: "The Seasons", serif;
}

/* ========== PRODUCTS GRID (generic) ========== */
.products-grid {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 2rem;
  margin-bottom: 2rem;
  margin-left: auto;
  margin-right: auto;
  zoom: 1.1;
}

/* ========== ROUTINES SLIDER ========== */
.routines-section {
  padding: 6rem 0 0;
  /* Number-of-visible-columns (change only in media queries) */
  --routine-cols: 4;
  --routine-gap: 1.5rem;
  overflow-y: hidden;
}

/* Outer row: arrows float over the viewport */
.routines-wrapper {
  display: flex;
  align-items: center;
  gap: 1.5rem;
  padding: 0 3rem;
  position: relative;
}

/* Scrollable, hidden-scrollbar viewport */
.routines-slider-viewport {
  flex: 1;
  overflow-x: scroll;
  overflow-y: hidden;
  scroll-snap-type: x mandatory;
  scroll-behavior: smooth;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
  -ms-overflow-style: none;
}

.routines-slider-viewport::-webkit-scrollbar {
  display: none;
}

/* Flex track — all cards in one horizontal row */
.routines-grid {
  display: flex;
  flex-wrap: nowrap;
  gap: var(--routine-gap);
  /* width: auto; let it be defined by children size while allowing overflow in parent */
}

.routines-grid.is-centered {
  justify-content: center !important;
}

/* Each card: exactly 1/N of the viewport width, snaps to start */
.routines-grid .product-card {
  /* Using 100% here as it resolves to the width of the .routines-slider-viewport when flex container is not max-content */
  flex: 0 0 calc((100% / var(--routine-cols)) - (var(--routine-gap) * (var(--routine-cols) - 1) / var(--routine-cols)));
  width: calc((100% / var(--routine-cols)) - (var(--routine-gap) * (var(--routine-cols) - 1) / var(--routine-cols)));
  max-width: none;
  min-width: 0;
  scroll-snap-align: start;
  scroll-snap-stop: always;
}

/* ---- Arrow buttons ---- */
.routine-arrow {
  flex-shrink: 0;
  width: 50px;
  height: 50px;
  border-radius: 50%;
  border: none;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.3s ease;
  z-index: 10;
  background-color: rgba(90, 69, 56, 0.5);
  box-shadow: 0 4px 12px rgba(90, 69, 56, 0.2);
  backdrop-filter: blur(4px);
}

.routine-arrow svg {
  color: white;
  stroke: white;
}

.routine-arrow:hover {
  background-color: rgba(90, 69, 56, 0.8);
  transform: scale(1.1);
}

.routine-arrow:active {
  transform: scale(0.95);
}

.routine-arrow:disabled {
  opacity: 0.3;
  cursor: not-allowed;
}

.routine-arrow:disabled:hover {
  transform: scale(1);
  background-color: rgba(90, 69, 56, 0.5);
}

.product-card {
  background-color: #e6ded4;
  border-radius: 3px;
  padding-bottom: 0.75rem;
  transition: all 0.3s ease;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  min-height: 420px;
  cursor: pointer;
}

.product-card>a {
  text-decoration: none;
  color: inherit;
  display: flex;
  flex-direction: column;
  align-items: center;
  width: 100%;
  height: 100%;
}

.product-image-wrapper {
  width: 100%;
  background: #fdffd4;
  display: flex;
  justify-content: center;
  position: relative;
  overflow: hidden;
  aspect-ratio: 0.9;
}

.product-image-wrapper img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  border-radius: 3px 3px 0 0;
  position: absolute;
  top: 0;
  left: 0;
  transition:
    opacity 0.3s ease,
    transform 0.3s ease;
}

.product-image-wrapper img.product-image-primary {
  opacity: 1;
  z-index: 2;
  transform: scale(1);
}

.product-image-wrapper img.product-image-secondary {
  opacity: 0;
  z-index: 1;
  transform: scale(1.2);
}

@media (hover: hover) {
  .product-card:hover .product-image-primary {
    opacity: 0;
  }

  .product-card:hover .product-image-secondary {
    opacity: 1;
    transform: scale(1);
  }
}

.product-info {
  text-align: center;
  flex-grow: 1;
  display: flex;
  gap: 1rem;
  flex-direction: column;
  align-content: center;
  align-items: center;
  justify-content: center;
}

.product-name {
  font-size: 1.2rem;
  font-weight: 700;
  margin-top: 1.5rem;
}

.product-description {
  font-size: 1rem;
  line-height: 1.4;
  flex-grow: 1;
  max-width: 250px;
  word-spacing: -1px;
  text-align: center;
}

.product-card .btn {
  padding: 0.6rem 1.5rem;
  font-size: 0.8rem;
  max-width: 260px;
  width: fit-content;
  color: #5a4538;
  background-color: #f7f5f2;
  border-radius: 15px;
  margin: 0 auto;
  transition: all 0.3s ease;
}

.product-card .btn:hover {
  background-color: #5a4538;
  color: #f7f5f2;
}

/* ========== BESTSELLERS SLIDER ========== */
.bestsellers-section {
  padding: 6rem 0;
  --bestseller-cols: 4.9;
  --bestseller-gap: 1.5rem;
  overflow-y: hidden;
}

.bestsellers-grid {
  display: flex;
  flex-wrap: nowrap;
  gap: var(--bestseller-gap);
}

.bestsellers-grid.is-centered {
  justify-content: center !important;
}

.bestsellers-grid .bestseller-card {
  flex: 0 0 calc((100% / var(--bestseller-cols)) - (var(--bestseller-gap) * (var(--bestseller-cols) - 1) / var(--bestseller-cols)));
  width: calc((100% / var(--bestseller-cols)) - (var(--bestseller-gap) * (var(--bestseller-cols) - 1) / var(--bestseller-cols)));
  max-width: none;
  min-width: 0;
  scroll-snap-align: start;
  scroll-snap-stop: always;
}

.bestsellers-grid {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 3rem;
}

.bestseller-arrow {
  display: none;
}

.bestseller-card {
  background-color: #fffafa;
  border-radius: 70px;
  padding: 1.5rem 2rem;
  transition: all 0.3s ease;
  min-height: 400px;
  width: fit-content;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  border: 8px solid #e6ded4;
}

.bestseller-card .bestseller-inner {
  background-color: #f7f5f2;
  border-radius: 40px;
  padding: 1.5rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  position: relative;
  overflow: hidden;
}

.bestseller-image {
  border-radius: 30px;
  overflow: hidden;
  aspect-ratio: 3/4;
  margin-bottom: 1.5rem;
  width: 100%;
  max-width: 300px;
  position: relative;
}

.bestseller-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.3s ease;
  display: block;
}

.bestseller-card:hover .bestseller-image img {
  transform: scale(1.05);
}

.bestseller-info {
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
  flex-grow: 1;
}

.bestseller-card .price-action-wrapper {
  flex-grow: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 0.5rem;
  padding-top: 1.5rem;
  width: 100%;
  height: fit-content;
}

.bestseller-card .price-action-wrapper>h3:not(.bestseller-name) {
  margin-top: auto;
}

.bestseller-card .btn {
  font-size: 0.75rem;
  padding: 0.75rem 3rem;
  background-color: #e6ded4;
  color: #5a4538;
  transition: all 0.3s ease;
  justify-self: flex-end;
}

/* Bundle specific adjustments for Best Sellers */
.bestseller-card .bestseller-inner {
  padding: 0;
}

.bestseller-card .bestseller-image {
  max-width: none;
  border-radius: 32px 32px 0 0;
  margin-bottom: 0;
}

/* ========== SPLIT BANNER ========== */
.split-banner {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0;
  border-radius: 0;
  border: none;
  overflow: hidden;
  width: 100%;
  max-width: 100%;
  margin: 0;
  margin-bottom: 4rem;
  position: relative;
}

.banner-left,
.banner-right {
  position: relative;
  height: 600px;
}

.banner-left img,
.banner-right img,
.banner-video {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.banner-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.5);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 10;
  padding: 0 10rem;
}

.banner-text {
  text-align: center;
  color: white;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1.5rem;
}

.rtl .banner-text {
  flex-direction: column-reverse;
}

.banner-title {
  font-size: 1.9rem;
  margin-bottom: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
}

.banner-title span {
  display: block;
}

.banner-subtitle {
  font-size: 1.55rem;
  font-weight: bold;
  margin-bottom: 0.5rem;
}

.banner-arabic {
  font-family: "Cairo", sans-serif;
  font-size: 2.05rem;
  font-weight: bold;
  margin-top: 0;
}

.banner-button-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 10;
}

.banner-button-overlay .btn {
  background-color: #4f2d1f7d;
  color: white;
}

.banner-button-overlay .btn:hover {
  background-color: #4f2d1f;
}

/* ========== CATEGORIES ========== */
.categories-section {
  padding: 3rem 0;
  /* Number-of-visible-columns (change only in media queries) */
  --category-cols: 4;
  --category-gap: 1.5rem;
  overflow-y: hidden;
}

/* Outer row: arrows float over the viewport */
.categories-wrapper {
  display: flex;
  align-items: center;
  gap: 1.5rem;
  padding: 0 3rem;
  position: relative;
}

/* Scrollable, hidden-scrollbar viewport */
.categories-slider-viewport {
  flex: 1;
  overflow-x: scroll;
  overflow-y: hidden;
  scroll-snap-type: x mandatory;
  scroll-behavior: smooth;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
  -ms-overflow-style: none;
}

.categories-slider-viewport::-webkit-scrollbar {
  display: none;
}

/* Flex track — all cards in one horizontal row */
.categories-grid {
  display: flex;
  flex-wrap: nowrap;
  gap: var(--category-gap);
  /* width: auto; let it be defined by children size while allowing overflow in parent */
}

.categories-grid.is-centered {
  justify-content: center !important;
}

/* Each card: exactly 1/N of the viewport width, snaps to start */
.categories-grid .category-card {
  flex: 0 0 calc((100% / var(--category-cols)) - (var(--category-gap) * (var(--category-cols) - 1) / var(--category-cols)));
  width: calc((100% / var(--category-cols)) - (var(--category-gap) * (var(--category-cols) - 1) / var(--category-cols)));
  max-width: none;
  min-width: 0;
  scroll-snap-align: start;
  scroll-snap-stop: always;

  position: relative;
  border-radius: 6px;
  overflow: hidden;
  aspect-ratio: 4 / 5;
  height: auto;
  cursor: pointer;
  transition: transform 0.3s ease;
}

.category-card img {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s ease;
}

.category-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.4);
  display: flex;
  flex-direction: column;
  z-index: 10;
  padding: 1rem;
}

.category-content {
  align-self: flex-start;
}

.category-title {
  font-size: 2.3rem;
  font-weight: bold;
  color: white;
  margin-bottom: 1rem;
  text-align: left;
  letter-spacing: 0.05em;
  font-family: "The Seasons", serif;
}

.category-description {
  color: white;
  font-size: 1rem;
  line-height: 1.6;
  text-align: left;
  max-width: 350px;
  font-family: "Poppins", sans-serif;
  font-weight: 400;
}

/* RTL Overrides for Categories */
body.rtl .category-overlay {
  align-items: flex-end;
  direction: rtl;
}

body.rtl .category-content {
  text-align: right;
}

body.rtl .category-title,
body.rtl .category-description {
  text-align: right !important;
}

@media (hover: hover) {
  .category-card:hover img {
    transform: scale(1.05);
  }
}

@media (hover: hover) {
  .category-card:hover {
    transform: translateY(-5px);
  }
}

/* ---- Category Arrow buttons ---- */
.category-arrow {
  flex-shrink: 0;
  width: 50px;
  height: 50px;
  border-radius: 50%;
  border: none;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.3s ease;
  z-index: 10;
  background-color: rgba(90, 69, 56, 0.5);
  box-shadow: 0 4px 12px rgba(90, 69, 56, 0.2);
  backdrop-filter: blur(4px);
}

.category-arrow svg {
  color: white;
  stroke: white;
}

.category-arrow:hover {
  background-color: rgba(90, 69, 56, 0.8);
  transform: scale(1.1);
}

.category-arrow:active {
  transform: scale(0.95);
}

.category-arrow:disabled {
  opacity: 0.3;
  cursor: not-allowed;
}

.category-arrow:disabled:hover {
  transform: scale(1);
  background-color: rgba(90, 69, 56, 0.5);
}

/* ========== COMMUNITY SECTION ========== */
.community-section {
  padding-bottom: 6rem;
}

.community-section .section-header {
  text-align: left;
}

.community-wrapper {
  position: relative;
  display: flex;
  align-items: center;
  gap: 1rem;
}

.scroll-arrow {
  position: absolute;
  background-color: rgba(90, 69, 56, 0.5);
  border: none;
  border-radius: 50%;
  width: 50px;
  height: 50px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.3s ease;
  z-index: 10;
  box-shadow: 0 4px 12px rgba(90, 69, 56, 0.2);
  backdrop-filter: blur(4px);
}

.scroll-arrow-left {
  left: -25px;
}

.scroll-arrow-right {
  right: -25px;
}

.scroll-arrow:hover {
  background-color: rgba(90, 69, 56, 0.8);
  transform: scale(1.1);
}

.scroll-arrow:active {
  transform: scale(0.95);
}

.scroll-arrow svg {
  color: white;
}

/* ========== UNAVAILABLE PRODUCT STYLES (GLOBAL) ========== */

/* Badge on product card image */
.product-image-wrapper,
.bestseller-image,
.main-image {
  position: relative;
}

.unavailable-badge {
  position: absolute;
  top: 12px;
  left: 12px;
  z-index: 10;
  background: #2c2c2c;
  color: #fff;
  font-family: "Poppins", sans-serif;
  font-size: 0.65rem;
  font-weight: 600;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  padding: 6px 16px;
  border-radius: 20px;
  white-space: nowrap;
  pointer-events: none;
}

.unavailable-badge-large {
  font-size: 0.8rem;
  padding: 10px 24px;
  border-radius: 24px;
  letter-spacing: 2px;
}

/* Disabled button styles */
.btn-disabled,
.btn-add-to-cart.btn-disabled,
.btn.btn-disabled,
.btn.btn-add-cart.btn-disabled,
.btn.btn-buy-now.btn-disabled {
  opacity: 0.4;
  cursor: not-allowed;
  pointer-events: none;
  filter: grayscale(30%);
}

.product-unavailable {
  opacity: 0.7;
}

/* Savings badge */
.savings-badge {
  position: absolute;
  top: 12px;
  left: 12px;
  z-index: 10;
  background: #c0392b;
  color: #fff;
  font-family: "Poppins", sans-serif;
  font-size: 0.65rem;
  font-weight: 600;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  padding: 6px 16px;
  border-radius: 20px;
  white-space: nowrap;
  pointer-events: none;
}

.savings-badge-large {
  font-size: 0.8rem;
  padding: 10px 24px;
  border-radius: 24px;
  letter-spacing: 2px;
}

/* When both badges exist, stack them */
.unavailable-badge+.savings-badge {
  top: 45px;
}

/* RTL Support for Badges */
.rtl .unavailable-badge,
.lang-ar .unavailable-badge,
.rtl .savings-badge,
.lang-ar .savings-badge {
  left: auto !important;
  right: 12px !important;
}

.rtl .unavailable-badge-large,
.lang-ar .unavailable-badge-large,
.rtl .savings-badge-large,
.lang-ar .savings-badge-large {
  right: 25px !important;
}

.scroll-arrow:disabled {
  opacity: 0.3;
  cursor: not-allowed;
}

.scroll-arrow:disabled:hover {
  transform: scale(1);
  background-color: rgba(90, 69, 56, 0.5);
}

.community-scroll {
  display: flex;
  gap: 1.5rem;
  overflow-x: auto;
  overflow-y: hidden;
  scroll-behavior: smooth;
  -webkit-overflow-scrolling: touch;
  flex: 1;
  scrollbar-width: none;
  /* Firefox */
  -ms-overflow-style: none;
  /* IE and Edge */
  /* Removed direction: ltr to support RTL natively */
}

.community-scroll::-webkit-scrollbar {
  display: none;
  /* Chrome, Safari, Opera */
}

.community-title {
  font-size: 5.3rem;
}

.community-title-plus {
  font-size: 4rem;
}

.community-title-you {
  font-size: 4.2rem;
}

.video-container {
  flex-shrink: 0;
  width: 300px;
  border-radius: 30px;
  overflow: hidden;
  background-color: #ddd;
  aspect-ratio: 9 / 16;
  position: relative;
}

.video-container video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

/* Hide default browser video controls and play button overlay on mobile */
@media (max-width: 768px) {

  video::-webkit-media-controls-start-playback-button,
  video::-webkit-media-controls-play-button {
    display: none !important;
    -webkit-appearance: none;
  }
}

.video-controls {
  position: absolute;
  bottom: 1rem;
  right: 1rem;
  display: flex;
  gap: 0.5rem;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.video-container:hover .video-controls {
  opacity: 1;
}

.control-btn {
  background: rgba(0, 0, 0, 0.7);
  border: none;
  border-radius: 50%;
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: background-color 0.3s ease;
}

.control-btn:hover {
  background: rgba(0, 0, 0, 0.9);
}

.control-btn svg {
  color: white;
}

.banner-video-controls {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  z-index: 15;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.banner-right:hover .banner-video-controls {
  opacity: 1;
}

.banner-control-btn {
  background: rgba(255, 255, 255, 0.9);
  border: none;
  border-radius: 50%;
  width: 60px;
  height: 60px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.3s ease;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

.banner-control-btn:hover {
  background: rgba(255, 255, 255, 1);
  transform: scale(1.1);
}

.banner-control-btn svg {
  color: #333;
}

.banner-video-slider {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  padding: 0.5rem 1rem 1rem 1rem;
  z-index: 15;
  opacity: 0;
  background: linear-gradient(to top, rgba(0, 0, 0, 0.4), transparent);
  transition: opacity 0.3s ease;
}

.banner-right:hover .banner-video-slider {
  opacity: 1;
}

.video-progress-slider {
  width: 100%;
  height: 2px;
  background: rgba(255, 255, 255, 0.4);
  outline: none;
  cursor: pointer;
  -webkit-appearance: none;
  appearance: none;
  border-radius: 1px;
  border: none;
}

.video-progress-slider::-webkit-slider-track {
  width: 100%;
  height: 2px;
  background: rgba(255, 255, 255, 0.4);
  border-radius: 1px;
  border: none;
}

.video-progress-slider::-webkit-slider-runnable-track {
  width: 100%;
  height: 2px;
  background: rgba(255, 255, 255, 0.4);
  border-radius: 1px;
}

.video-progress-slider::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  height: 12px;
  width: 12px;
  border-radius: 50%;
  background: white;
  cursor: pointer;
  box-shadow: none;
  border: none;
  margin-top: -5px;
}

.video-progress-slider::-moz-range-track {
  width: 100%;
  height: 2px;
  background: rgba(255, 255, 255, 0.4);
  border-radius: 1px;
  border: none;
}

.video-progress-slider::-moz-range-progress {
  height: 2px;
  background: rgba(255, 255, 255, 1);
  border-radius: 1px;
}

.video-progress-slider::-moz-range-thumb {
  height: 12px;
  width: 12px;
  border-radius: 50%;
  background: white;
  cursor: pointer;
  border: none;
  box-shadow: none;
  margin-top: -5px;
}

.video-progress-slider::-ms-track {
  width: 100%;
  height: 2px;
  background: rgba(255, 255, 255, 0.4);
  border-color: transparent;
  color: transparent;
  border-radius: 1px;
}

.video-progress-slider::-ms-fill-lower {
  background: rgba(255, 255, 255, 1);
  border-radius: 1px;
}

.video-progress-slider::-ms-thumb {
  height: 12px;
  width: 12px;
  border-radius: 50%;
  background: white;
  cursor: pointer;
  border: none;
  box-shadow: none;
}

.video-progress-slider:focus {
  outline: none;
}

.video-progress-slider:hover::-webkit-slider-thumb,
.video-progress-slider:active::-webkit-slider-thumb {
  background: white;
  box-shadow: none;
}

.video-progress-slider:hover::-moz-range-thumb,
.video-progress-slider:active::-moz-range-thumb {
  background: white;
  box-shadow: none;
}

.video-icon {
  position: absolute;
  top: 1rem;
  right: 1rem;
  background: white;
  border-radius: 8px;
  padding: 8px;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
  width: 32px;
  height: 32px;
  -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 32 32'%3E%3Cpath d='M0,0 L32,0 L32,32 L0,32 Z M12,9 L12,23 L22,16 Z' fill='white' fill-rule='evenodd'/%3E%3C/svg%3E");
  mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 32 32'%3E%3Cpath d='M0,0 L32,0 L32,32 L0,32 Z M12,9 L12,23 L22,16 Z' fill='white' fill-rule='evenodd'/%3E%3C/svg%3E");
  -webkit-mask-size: contain;
  mask-size: contain;
  -webkit-mask-repeat: no-repeat;
  mask-repeat: no-repeat;
  -webkit-mask-position: center;
  mask-position: center;
}

.video-icon svg {
  display: none;
}

/* ========== RESPONSIVE DESIGN ========== */

/* Tablet screens */
@media (max-width: 1024px) {
  .hero-title {
    font-size: 2.5rem;
  }

  .section-title {
    font-size: 2.7rem;
  }

  .section-subtitle {
    font-size: 1.4rem;
  }

  .community-title-you {
    font-size: 2.6rem;
  }

  .community-title-plus {
    font-size: 2rem;
  }

  .products-grid {
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  }

  /* Routines: 3 columns on tablet */
  .routines-section {
    --routine-cols: 3;
  }

  .routines-grid {
    gap: 1.25rem;
  }

  .banner-overlay {
    padding: 2rem;
  }

  .section-title .font-light {
    font-size: 1.8rem;
  }

  /* Best Sellers: 2 columns on tablet */
  .bestsellers-section {
    --bestseller-cols: 2.5;
  }

  .bestsellers-grid {
    gap: 1.25rem;
  }

  /* Categories: 3 columns on tablet */
  .categories-section {
    --category-cols: 3;
  }

  .categories-grid {
    gap: 1.25rem;
  }
}

/* Mobile landscape and smaller tablets */
@media (max-width: 780px) {
  .hero-section {
    margin-top: 4rem;
    /* taller offset to clear the mobile navbar */
  }

  .hero-banner {
    height: 700px;
  }

  .community-title-you {
    font-size: 1.7rem;
  }

  .community-title-plus {
    font-size: 1.7rem;
  }

  .community-title {
    font-size: 3.3rem;
  }

  .hero-content {
    padding-left: 2rem;
    padding-right: 2rem;
    padding-bottom: 0;
    /* Vertically centered via justify-content: center in base styles */
  }

  .hero-title {
    font-size: 2rem;
    line-height: 1.2;
    max-width: none;
  }

  .hero-title br {
    display: none;
  }

  .hero-subtitle {
    font-size: 1.1rem;
    max-width: none;
  }

  .font-light {
    font-size: 0.8rem;
  }

  .section-title {
    font-size: 2.2rem;
  }

  .section-subtitle {
    font-size: 1.0rem;
    white-space: normal;
  }

  .products-grid {
    gap: 1.5rem;
  }

  .product-card {
    width: 100%;
    max-width: 100%;
    min-width: auto;
  }

  /* Routines: 2 columns in the 780-481 range */
  .routines-section {
    --routine-cols: 2;
  }

  .routines-grid {
    gap: 1.25rem;
  }

  .routines-wrapper {
    padding: 0 1rem;
    gap: 0.5rem;
  }

  .routine-arrow {
    width: 36px;
    height: 36px;
  }

  .routine-arrow svg {
    width: 20px;
    height: 20px;
  }

  .product-card {
    min-height: auto;
    padding: 0;
    padding-bottom: 2rem;
    border-radius: 8px;
    max-width: 100%;
  }

  .product-image-wrapper {
    aspect-ratio: 1;
    border-radius: 3px 3px 0 0;
  }

  .product-image-wrapper img {
    border-radius: 3px 3px 0 0;
  }

  .product-info {
    padding: 1.5rem 1.5rem 0 1.5rem;
    gap: 0.75rem;
  }

  .product-name {
    font-size: 1.05rem;
    margin-top: 0;
  }

  .product-description {
    font-size: 0.85rem;
    line-height: 1.5;
    max-width: 100%;
  }

  .product-card .btn {
    padding: 0.75rem 2rem;
    font-size: 1.05rem;
    max-width: 100%;
    width: auto;
  }

  /* Best Sellers: 1 column on mobile landscape */
  .bestsellers-section {
    --bestseller-cols: 2.2;
  }

  .bestsellers-wrapper {
    display: flex;
    align-items: center;
    padding: 0 1rem;
    gap: 0.5rem;
  }

  .bestseller-arrow {
    display: flex;
    flex-shrink: 0;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    border: none;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
    z-index: 10;
    background-color: rgba(90, 69, 56, 0.5);
    box-shadow: 0 4px 12px rgba(90, 69, 56, 0.2);
    backdrop-filter: blur(4px);
  }

  .bestseller-arrow svg {
    color: white;
    stroke: white;
    width: 20px;
    height: 20px;
  }

  .bestseller-arrow:hover {
    background-color: rgba(90, 69, 56, 0.8);
    transform: scale(1.1);
  }

  .bestseller-arrow:active {
    transform: scale(0.95);
  }

  .bestseller-arrow:disabled {
    opacity: 0.3;
    cursor: not-allowed;
  }

  .bestseller-arrow:disabled:hover {
    transform: scale(1);
    background-color: rgba(90, 69, 56, 0.5);
  }

  .bestsellers-grid {
    gap: 1.25rem;
    flex-wrap: nowrap !important;
    justify-content: flex-start !important;
  }

  .bestsellers-slider-viewport {
    width: 100%;
    overflow-x: scroll;
    overflow-y: hidden;
    scroll-snap-type: x mandatory;
    scroll-behavior: smooth;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    -ms-overflow-style: none;
  }

  .bestsellers-slider-viewport::-webkit-scrollbar {
    display: none;
  }

  /* Categories: 2 columns in the 780-481 range */
  .categories-section {
    --category-cols: 2;
  }

  .categories-grid {
    gap: 1.25rem;
  }

  .categories-wrapper {
    padding: 0 1rem;
    gap: 0.5rem;
  }

  .category-arrow {
    width: 36px;
    height: 36px;
  }

  .category-arrow svg {
    width: 20px;
    height: 20px;
  }

  .bestseller-card {
    min-height: 450px;
    border-radius: 50px;
    max-width: none;
    margin: 0;
    flex: 0 0 calc((100% / var(--bestseller-cols)) - (var(--bestseller-gap) * (var(--bestseller-cols) - 1) / var(--bestseller-cols))) !important;
    width: calc((100% / var(--bestseller-cols)) - (var(--bestseller-gap) * (var(--bestseller-cols) - 1) / var(--bestseller-cols))) !important;
  }

  .bestseller-image {
    max-width: 100%;
    aspect-ratio: 1;
    border-radius: 20px;
  }

  .bestseller-name {
    font-size: 1.5rem;
  }

  .split-banner {
    grid-template-columns: 1fr;
    border-radius: 0;
    max-width: 100%;
  }

  .banner-left,
  .banner-right {
    height: 400px;
  }

  .banner-title {
    font-size: 1.8rem;
  }

  .banner-subtitle {
    font-size: 1.4rem;
  }

  .banner-arabic {
    font-size: 1.35rem;
  }

  .banner-overlay {
    padding: 1rem;
    box-sizing: border-box;
  }

  .categories-grid {
    grid-template-columns: 1fr;
    gap: 1.5rem;
  }

  .category-card {
    /* height: 500px; */
    border-radius: 12px;
  }

  .category-title {
    font-size: 2.8rem;
  }

  .category-description {
    font-size: 1.25rem;
    max-width: 280px;
  }

  .category-description {
    font-size: 1.25rem;
  }

  .video-container {
    width: 280px;
  }

  .scroll-arrow {
    width: 40px;
    height: 40px;
  }

  .scroll-arrow svg {
    width: 20px;
    height: 20px;
  }

  .container {
    padding: 0 1rem;
  }

  .routines-section,
  .bestsellers-section,
  .categories-section {
    padding: 3rem 0;
  }

  .community-section {
    padding: 3rem;
  }
}

/* Mobile portrait */
@media (max-width: 600px) {
  .hero-section {
    margin-top: 4rem;
  }

  .hero-banner {
    height: 700px;
  }

  .hero-content {
    padding-left: 2rem;
    padding-right: 2rem;
    padding-bottom: 0;
  }

  .hero-title {
    font-size: 1.6rem;
  }

  .community-title {
    font-size: 2.7rem;
  }

  .hero-subtitle {
    font-size: 0.95rem;
    margin-bottom: 1.25rem;
  }

  .btn {
    padding: 0.85rem 1.75rem;
    font-size: 1.15rem;
  }

  .btn-primary {
    padding: 0.85rem 1.75rem;
  }

  .section-title {
    font-size: 2.1rem;
  }

  .section-subtitle {
    font-size: 0.9rem;
  }

  .section-title .font-light {
    font-size: 1.3rem;
    padding: 0.3rem;
  }

  .product-card {
    border-radius: 4px;
    overflow: hidden;
  }

  .product-image-wrapper {
    border-radius: 4px 4px 0 0;
  }

  .product-image-wrapper img {
    border-radius: 4px 4px 0 0;
  }

  .product-info {
    padding: 1.25rem 1.25rem 0 1.25rem;
  }

  .product-name {
    font-size: 1.4rem;
  }

  .product-description {
    font-size: 1.1rem;
  }

  .product-card .btn {
    padding: 0.65rem 1.75rem;
    font-size: 1rem;
  }

  .bestsellers-grid {
    gap: 0.5rem;
  }

  .split-banner {
    grid-template-columns: 1fr;
    border-radius: 0;
    max-width: 100%;
    margin-bottom: 2.5rem;
  }

  .banner-left,
  .banner-right {
    height: 350px;
  }

  .banner-title {
    font-size: 5.2vw;
    line-height: 1.4;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.25rem;
    width: 100%;
    margin: 0 auto;
  }

  /* Specific fix for iOS Safari font scaling discrepancy */
  @supports (-webkit-touch-callout: none) {
    .banner-title {
      font-size: 4.3vw;
    }
  }

  .banner-title span {
    display: block;
    max-width: 100%;
    white-space: nowrap;
  }

  .banner-title br {
    display: none;
  }

  .banner-subtitle {
    font-size: 1.15rem;
  }

  .banner-text {
    gap: 1rem;
  }

  .banner-arabic {
    font-size: 1.1rem;
    margin-top: 0;
  }

  .banner-control-btn {
    width: 50px;
    height: 50px;
  }

  .category-description {
    font-size: 1.2rem;
    max-width: 250px;
  }

  .category-title {
    font-size: 1.3rem;
    margin-bottom: 0.4rem;
  }

  .category-description {
    font-size: 0.75rem;
    max-width: 220px;
  }

  .category-overlay {
    padding: 1.5rem;
  }

  .video-container {
    width: 55vw;
    border-radius: 12px;
    overflow: hidden;
  }

  .scroll-arrow {
    width: 36px;
    height: 36px;
  }

  .scroll-arrow svg {
    width: 18px;
    height: 18px;
  }

  .control-btn {
    width: 36px;
    height: 36px;
  }

  .control-btn svg {
    width: 18px;
    height: 18px;
  }

  .container {
    padding: 0 0.75rem;
  }

  .routines-section {
    padding: 3rem 1.25rem;
  }

  .categories-section {
    padding: 0 1.25rem;
  }

  .bestsellers-section {
    padding: 0 1.25rem 3rem 1.25rem;
  }

  .routine {
    padding: 0 0.5rem;
  }

  .community-section {
    padding: 3rem 1.5rem;
  }

  .video-icon {
    display: none !important;
  }

  .video-controls {
    display: flex !important;
    opacity: 1 !important;
    bottom: 0.5rem !important;
    right: 0.5rem !important;
  }

  .control-btn {
    width: 32px !important;
    height: 32px !important;
  }

  .control-btn svg {
    width: 16px !important;
    height: 16px !important;
  }

  .section-header {
    margin-bottom: 2rem;
    text-align: center;
    padding-left: 0;
    margin-left: 0;
  }

  .routines-section .section-header,
  .bestsellers-section .section-header,
  .categories-section .section-header,
  .routines-section .section-title,
  .bestsellers-section .section-title,
  .categories-section .section-title,
  .routines-section .section-subtitle,
  .bestsellers-section .section-subtitle,
  .categories-section .section-subtitle {
    text-align: center !important;
  }

  /* Keep community and any others left-aligned if specified above */
  .community-section .section-header,
  .community-section .section-title,
  .community-section .section-subtitle {
    text-align: left;
  }

  .section-title,
  .section-subtitle {
    margin-left: auto !important;
    margin-right: auto !important;
    text-align: center !important;
    padding: 0 1rem !important;
    max-width: 95% !important;
  }

  .routines-section .section-subtitle,
  .bestsellers-section .section-subtitle {
    max-width: none !important;
    width: 100% !important;
    font-size: 0.72rem !important;
    display: block !important;
    text-align: center !important;
    margin: 0 auto !important;
    line-height: 1.4 !important;
    white-space: normal !important;
  }

  .section-subtitle br {
     display: block !important;
  }

  .categories-section .section-subtitle {
     max-width: none !important;
     width: auto !important;
     font-size: 0.72rem !important;
     white-space: nowrap !important;
     text-align: center !important;
     display: block !important;
     margin: 0 auto !important;
  }

  .categories-section .section-subtitle {
     max-width: 100% !important;
     width: auto !important;
     font-size: 0.78rem !important;
     white-space: nowrap !important;
     text-align: center !important;
     display: block !important;
  }

  /* Community (shoshin+you) specifically left-aligned */
  .community-section .section-header,
  .community-section .section-title,
  .community-section .section-subtitle {
    text-align: left !important;
    margin-left: 0 !important;
    margin-right: auto !important;
    padding-left: 0 !important;
    max-width: 100% !important;
  }

  /* Community RTL override */
  body.rtl .community-section .section-header,
  body.rtl .community-section .section-title,
  body.rtl .community-section .section-subtitle,
  [dir="rtl"] .community-section .section-header,
  [dir="rtl"] .community-section .section-title,
  [dir="rtl"] .community-section .section-subtitle {
    text-align: right !important;
    margin-left: auto !important;
    margin-right: 0 !important;
    padding-right: 0 !important;
  }

  body.rtl .section-header,
  body.lang-ar .section-header,
  [dir="rtl"] .section-header {
    text-align: right;
    padding-left: 0;
    padding-right: 0;
  }

  body.rtl .section-title,
  body.rtl .section-subtitle,
  body.lang-ar .section-title,
  body.lang-ar .section-subtitle,
  [dir="rtl"] .section-title,
  [dir="rtl"] .section-subtitle {
    text-align: right;
    margin-left: 0 !important;
    padding-left: 0 !important;
  }

  body.rtl .routines-section .section-title,
  body.rtl .bestsellers-section .section-title,
  body.rtl .categories-section .section-title,
  body.rtl .routines-section .section-subtitle,
  body.rtl .bestsellers-section .section-subtitle,
  body.rtl .categories-section .section-subtitle,
  [dir="rtl"] .routines-section .section-title,
  [dir="rtl"] .bestsellers-section .section-title,
  [dir="rtl"] .categories-section .section-title,
  [dir="rtl"] .routines-section .section-subtitle,
  [dir="rtl"] .bestsellers-section .section-subtitle,
  [dir="rtl"] .categories-section .section-subtitle {
    text-align: center !important;
  }

  .routines-section .routine {
    padding-left: 0 !important;
  }

  /* Sliders: 2 columns on small mobile */
  .routines-section {
    --routine-cols: 2;
    --routine-gap: 0.75rem;
    padding-left: 1.25rem;
    padding-right: 1.25rem;
  }

  .routines-wrapper {
    padding: 0;
    gap: 0;
  }

  .routines-slider-viewport {
    width: 100%;
    padding: 0 1.25rem;
  }

  .routine-arrow {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 36px;
    height: 36px;
  }

  .routine-arrow-prev {
    left: 4px;
  }

  .routine-arrow-next {
    right: 4px;
  }

  .categories-section {
    --category-cols: 2;
    --category-gap: 0.75rem;
    padding-left: 1.25rem;
    padding-right: 1.25rem;
  }

  .categories-wrapper {
    padding: 0;
    gap: 0;
  }

  .categories-slider-viewport {
    width: 100%;
    padding: 0 1.25rem;
  }

  .category-arrow {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 36px;
    height: 36px;
  }

  .category-arrow-prev {
    left: 4px;
  }

  .category-arrow-next {
    right: 4px;
  }

  .community-scroll {
    gap: 0.7rem;
  }

  .bestsellers-section {
    --bestseller-cols: 2;
    --bestseller-gap: 0.75rem;
    padding-left: 1.25rem;
    padding-right: 1.25rem;
  }

  .bestsellers-wrapper {
    padding: 0;
    gap: 0;
    position: relative;
  }

  .bestsellers-slider-viewport {
    width: 100%;
    padding: 0;
  }

  .bestseller-arrow {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 36px;
    height: 36px;
  }

  .bestseller-arrow-prev {
    left: 4px;
  }

  .bestseller-arrow-next {
    right: 4px;
  }

  .bestseller-card {
    border-radius: 24px;
    padding: 0;
    min-height: 0;
    overflow: hidden;
    border: 4px solid #e6ded4;
    flex: 0 0 calc((100% / var(--bestseller-cols)) - (var(--bestseller-gap) * (var(--bestseller-cols) - 1) / var(--bestseller-cols))) !important;
    width: calc((100% / var(--bestseller-cols)) - (var(--bestseller-gap) * (var(--bestseller-cols) - 1) / var(--bestseller-cols))) !important;
  }

  .bestseller-card .bestseller-inner {
    border-radius: 0;
    padding: 0;
    background: none;
  }

  /* Badges: reposition relative to bestseller-inner so they aren't clipped by the image */
  .bestseller-image {
    overflow: visible;
  }

  .bestseller-image {
    overflow: visible;
  }

  .bestseller-image {
    border-radius: 0;
    margin-bottom: 0;
    aspect-ratio: 0.75;
    width: 100%;
    max-width: 100%;
  }

  .bestseller-card .price-action-wrapper {
    padding: 1rem 4px;
    gap: 0.35rem;
  }

  .bestseller-card.is-bundle .price-action-wrapper {
    padding: 1rem 0.4rem;
  }

  .bestseller-name {
    font-size: 0.85rem;
  }

  .bestseller-card .price-action-wrapper>h3 {
    font-size: 0.8rem;
  }

  .bestseller-card .btn {
    font-size: 0.65rem;
    padding: 0.5rem 0.75rem;
  }

  .product-card {
    border-radius: 4px;
    padding-bottom: 1rem;
  }

  .product-image-wrapper {
    aspect-ratio: 0.65;
    border-radius: 4px 4px 0 0;
  }

  .product-image-wrapper img {
    border-radius: 4px 4px 0 0;
  }

  .product-info {
    padding: 0.75rem 0.75rem 0 0.75rem;
    gap: 0.5rem;
  }

  .product-name {
    font-size: 0.85rem;
  }

  .routines-section .product-description {
    display: none;
  }

  .product-description {
    font-size: 0.8rem;
    max-width: 100%;
  }

  .product-image-wrapper img {
    border-radius: 4px 4px 0 0;
  }

  .product-card .btn {
    padding: 0.5rem 0.5rem;
    font-size: 0.55rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 100%;
  }

  .product-card .btn-add-to-cart {
    white-space: nowrap;
    font-size: 0.55rem;
    padding: 0.5rem 0.4rem;
    letter-spacing: 0;
  }

  .category-card {
    border-radius: 8px;
  }

  .category-title {
    font-size: 1.3rem;
    margin-bottom: 0.4rem;
  }

  .category-description {
    font-size: 0.75rem;
    max-width: 100%;
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    line-clamp: 3;
    overflow: hidden;
  }

  .category-overlay {
    padding: 0.6rem;
  }

  /* ========== RTL SUPPORT ========== */
  [dir="rtl"] .section-header,
  .rtl .section-header {
    width: 100%;
    overflow: visible;
  }

  [dir="rtl"] .section-title,
  .rtl .section-title {
    font-family: "Cairo", "Poppins", sans-serif;
    line-height: 1.5;
    letter-spacing: 0;
    word-spacing: 0.1em;
    white-space: nowrap;
    display: inline;
  }

  [dir="rtl"] .section-title span,
  .rtl .section-title span {
    display: inline;
    white-space: nowrap;
  }

  [dir="rtl"] .section-subtitle,
  .rtl .section-subtitle {
    font-family: "Cairo", "Poppins", sans-serif;
    line-height: 1.8;
    white-space: normal;
  }

  [dir="rtl"] .hero-title,
  .rtl .hero-title {
    font-family: "Cairo", "Poppins", sans-serif;
    line-height: 1.5;
    letter-spacing: 0;
  }

  [dir="rtl"] .hero-subtitle,
  .rtl .hero-subtitle {
    font-family: "Cairo", "Poppins", sans-serif;
    line-height: 1.8;
  }

  [dir="rtl"] .section-title .font-light,
  .rtl .section-title .font-light {
    font-family: "Cairo", "Poppins", sans-serif;
    line-height: 1.5;
    display: inline;
    white-space: nowrap;
  }

  /* Community section scroll arrows RTL */
  [dir="rtl"] .scroll-arrow-left,
  .rtl .scroll-arrow-left {
    left: -25px;
    right: auto;
  }

  [dir="rtl"] .scroll-arrow-right,
  .rtl .scroll-arrow-right {
    right: -25px;
    left: auto;
  }

  /* Community section RTL */
  [dir="rtl"] .community-section .section-header,
  .rtl .community-section .section-header {
    text-align: right !important;
  }

  [dir="rtl"] .community-section .section-title,
  [dir="rtl"] .community-section .section-subtitle,
  .rtl .community-section .section-title,
  .rtl .community-section .section-subtitle {
    text-align: right !important;
    margin-left: auto !important;
    margin-right: 0 !important;
    padding-right: 0 !important;
  }

  [dir="rtl"] .community-title,
  .rtl .community-title {
    font-family: "Cairo", "Poppins", sans-serif;
    direction: rtl;
  }
}

/* Mobile Badge Overrides */
@media (max-width: 600px) {

  .unavailable-badge,
  .savings-badge {
    font-size: 0.45rem !important;
    padding: 3px 6px !important;
    top: 5px !important;
    left: 5px !important;
    letter-spacing: 0.5px !important;
  }

  .unavailable-badge+.savings-badge {
    top: 25px !important;
  }

  .unavailable-badge-large,
  .savings-badge-large {
    font-size: 0.65rem !important;
    padding: 8px 18px !important;
    top: 15px !important;
    left: 15px !important;
    letter-spacing: 1.2px !important;
  }

  .unavailable-badge-large+.savings-badge-large {
    top: 60px !important;
  }

  /* RTL Support for smaller badges */
  .rtl .unavailable-badge,
  .lang-ar .unavailable-badge,
  .rtl .savings-badge,
  .lang-ar .savings-badge {
    left: auto !important;
    right: 8px !important;
  }

  .rtl .unavailable-badge-large,
  .lang-ar .unavailable-badge-large,
  .rtl .savings-badge-large,
  .lang-ar .savings-badge-large {
    left: auto !important;
    right: 15px !important;
  }
}

/* Fix Arabic text disconnection on iOS due to letter-spacing */
html[lang="ar"],
.lang-ar,
.rtl,
[dir="rtl"] {
  letter-spacing: normal !important;
  word-spacing: normal !important;
}

[lang="ar"] *,
.lang-ar *,
.rtl *,
[dir="rtl"] * {
  letter-spacing: normal !important;
  word-spacing: normal !important;
  text-rendering: optimizeLegibility;
  font-feature-settings: "kern" 1, "liga" 1;
}

/* Global RTL Arrow & Viewport Order (Matches shop.php) */
body.rtl .routines-wrapper,
body.rtl .categories-wrapper,
body.rtl .bestsellers-wrapper {
  display: flex !important;
}

body.rtl .routine-arrow-prev,
body.rtl .category-arrow-prev,
body.rtl .bestseller-arrow-prev {
  order: 3 !important;
}

body.rtl .routines-slider-viewport,
body.rtl .categories-slider-viewport,
body.rtl .bestsellers-slider-viewport {
  order: 2 !important;
}

body.rtl .routine-arrow-next,
body.rtl .category-arrow-next,
body.rtl .bestseller-arrow-next {
  order: 1 !important;
}

/* Global Community section RTL Support */
body.rtl .community-section .section-header,
[dir="rtl"] .community-section .section-header {
  text-align: right !important;
}

body.rtl .community-section .section-title,
body.rtl .community-section .section-subtitle,
[dir="rtl"] .community-section .section-title,
[dir="rtl"] .community-section .section-subtitle {
  text-align: right !important;
  margin-left: auto !important;
  margin-right: 0 !important;
  padding-right: 0 !important;
}

body.rtl .community-title,
[dir="rtl"] .community-title {
  direction: rtl;
  font-family: "Cairo", "Poppins", sans-serif;
}

/* Global RTL Hero Banner Overrides */
body.rtl .hero-section,
[dir="rtl"] .hero-section {
  direction: rtl;
}

body.rtl .hero-content,
[dir="rtl"] .hero-content {
  align-items: flex-end !important;
  text-align: right !important;
  margin-left: auto !important;
  margin-right: 0 !important;
}

@media (max-width: 780px) {

  body.rtl .hero-content,
  [dir="rtl"] .hero-content {
    padding-right: 2rem !important;
    padding-left: 2rem !important;
  }
}


body.rtl .hero-title,
[dir="rtl"] .hero-title,
body.rtl .hero-subtitle,
[dir="rtl"] .hero-subtitle {
  text-align: right !important;
  margin-right: 0 !important;
  margin-left: auto !important;
}

body.rtl .hero-content .btn,
[dir="rtl"] .hero-content .btn {
  margin-right: 0 !important;
  margin-left: auto !important;
}

body.rtl .hero-overlay,
[dir="rtl"] .hero-overlay {
  background: transparent !important;
}

/* iOS Mobile Font Size Adjustments — Fix for iOS Safari rendering discrepancy */
@media (max-width: 600px) {
  @supports (-webkit-touch-callout: none) {
    .hero-title { font-size: 1.35rem !important; }
    .hero-subtitle { font-size: 0.85rem !important; }
    .section-title { font-size: 1.75rem !important; }
    .section-title .font-light { font-size: 1.1rem !important; }
    .section-title .routine { font-size: 1.75rem !important; }

    .section-subtitle {
      font-size: 0.58rem !important;
      max-width: 95vw !important;
      margin-left: auto !important;
      margin-right: auto !important;
      text-align: center !important;
      line-height: 1.4 !important;
      width: 100% !important;
      padding: 0 !important;
    }

    .routines-section .section-subtitle,
    .bestsellers-section .section-subtitle {
       max-width: none !important;
       width: 100% !important;
       font-size: 0.68rem !important;
       display: block !important;
       text-align: center !important;
       margin: 0 auto !important;
       line-height: 1.4 !important;
       padding: 0 !important;
       white-space: normal !important;
    }

    .section-subtitle br {
       display: block !important;
    }

    .categories-section .section-subtitle {
       white-space: nowrap !important;
       display: block !important;
       max-width: none !important;
       width: auto !important;
       text-align: center !important;
       font-size: 0.68rem !important;
       margin: 0 auto !important;
    }

    /* Community (shoshin+you) specifically left-aligned */
    .community-section .section-header,
    .community-section .section-title,
    .community-section .section-subtitle {
      text-align: left !important;
      margin-left: 0 !important;
      margin-right: auto !important;
      padding-left: 0 !important;
      max-width: 100% !important;
    }

    /* Community RTL override for iOS */
    body.rtl .community-section .section-header,
    body.rtl .community-section .section-title,
    body.rtl .community-section .section-subtitle {
      text-align: right !important;
      margin-left: auto !important;
      margin-right: 0 !important;
      padding-right: 0 !important;
    }

    /* Routine cards — consistent text/button positions */
    .product-card {
      display: flex !important;
      flex-direction: column !important;
      min-height: 0 !important;
    }
    .product-info {
      display: flex !important;
      flex-direction: column !important;
      flex: 1 !important;
      padding: 0.5rem 0.5rem 0 0.5rem !important;
      gap: 0.3rem !important;
    }
    .product-name {
      font-size: 0.65rem !important;
      min-height: 1.8em !important;
      display: -webkit-box !important;
      -webkit-line-clamp: 2 !important;
      line-clamp: 2 !important;
      -webkit-box-orient: vertical !important;
      overflow: hidden !important;
    }
    .product-description { font-size: 0.6rem !important; }
    .product-card .btn {
      font-size: 0.45rem !important;
      padding: 0.4rem 0.4rem !important;
      margin-top: auto !important;
    }
    .product-card .btn-add-to-cart {
      font-size: 0.45rem !important;
      padding: 0.4rem 0.3rem !important;
      margin-top: auto !important;
    }

    /* Bestseller cards — taller images + consistent text/button positions */
    .bestseller-image { aspect-ratio: 0.65 !important; }
    .bestseller-card {
      display: flex !important;
      flex-direction: column !important;
    }
    .bestseller-card .price-action-wrapper {
      display: flex !important;
      flex-direction: column !important;
      flex: 1 !important;
      padding: 0.5rem 4px !important;
      gap: 0.25rem !important;
    }
    .bestseller-name {
      font-size: 0.65rem !important;
      min-height: 1.8em !important;
      display: -webkit-box !important;
      -webkit-line-clamp: 2 !important;
      line-clamp: 2 !important;
      -webkit-box-orient: vertical !important;
      overflow: hidden !important;
    }
    .bestseller-card .price-action-wrapper > h3:not(.bestseller-name) {
      font-size: 0.65rem !important;
    }
    .bestseller-card .btn {
      font-size: 0.5rem !important;
      padding: 0.4rem 0.6rem !important;
      margin-top: auto !important;
    }

    /* Categories */
    .category-title { font-size: 1.1rem !important; }
    .category-description { font-size: 0.65rem !important; }

    /* Banner */
    .banner-title { font-size: 4vw !important; }
    .banner-arabic { font-size: 0.95rem !important; }
    .banner-button-overlay .btn { font-size: 0.7rem !important; padding: 0.6rem 1.2rem !important; }

    /* General buttons */
    .btn { font-size: 0.95rem !important; }
  }
}
