:root {
  /* Legacy support - these will be overridden by dynamic styles in functions.php */
  --main-color: #7B2EDE;
  --main-color-dark: #5f1fb0;
  --text-color: #333;

  /* Brand Purple Palette */
  --brand-purple-primary: #7B2EDE;
  --brand-purple-dark: #5f1fb0;
  --brand-purple-light: #9d5bea;

  /* Accent Colors */
  --brand-purple-10: rgba(123, 46, 222, 0.1);
  --brand-purple-20: rgba(123, 46, 222, 0.2);

  /* Semantic Colors */
  --color-success: #00b894;
  --color-sale: #ff2b5e;
  --color-text-primary: #1a1a1a;
  --color-text-secondary: #666;
  --color-text-muted: #999;

  /* Background Colors */
  --color-bg-primary: #ffffff;
  --color-bg-secondary: #f8f9fa;
  --color-bg-tertiary: #fcfcfc;
}

/* === GENERAL === */
/* === GENERAL === */
html,
body {
  direction: rtl;
  font-family: 'Tajawal', 'Cairo', sans-serif;
  margin: 0 !important;
  padding: 0 !important;
  width: 100% !important;
  max-width: 100% !important;
  background-color: #ffffff !important;
  /* Force white background */
  color: var(--color-text-primary);
  letter-spacing: 0.3px;
  overflow-x: hidden !important;
}

/* Override any potential wrapper that creates a box */
#page,
#wrapper,
.site,
.wrapper,
.boxed-layout {
  width: 100% !important;
  max-width: 100% !important;
  margin: 0 !important;
  padding: 0 !important;
  background: transparent !important;
  box-shadow: none !important;
  border-radius: 0 !important;
}

/* === FULL-WIDTH LAYOUT === */
.full-width-wrapper {
  width: 100%;
  margin: 0;
  padding: 0;
}

.content-wrapper {
  max-width: 1400px;
  margin: 0 auto;
  padding: 0 20px;
}

/* === STORE HERO SECTION === */
.store-hero-section {
  background: linear-gradient(135deg, var(--brand-purple-10) 0%, transparent 100%);
  padding: 40px 0;
  margin-bottom: 30px;
}

.store-hero-title {
  font-size: 36px;
  font-weight: 800;
  color: var(--color-text-primary);
  text-align: center;
  margin: 0;
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.02);
}

/* === TRUST BANNER === */
.trust-banner {
  background: linear-gradient(135deg, #ffffff 0%, #f8f9fa 100%);
  border-radius: 16px;
  padding: 25px 30px;
  margin: 30px 0;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 20px;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.04);
  border: 1px solid rgba(123, 46, 222, 0.08);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.trust-banner:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(123, 46, 222, 0.08);
}

.trust-item {
  display: flex;
  align-items: center;
  gap: 12px;
  font-weight: 600;
  font-size: 15px;
  color: var(--color-text-secondary);
  transition: all 0.3s ease;
}

.trust-item:hover {
  color: var(--brand-purple-primary);
  transform: translateX(-3px);
}

.trust-item i {
  color: var(--brand-purple-primary);
  font-size: 24px;
  min-width: 24px;
}

/* Responsive Trust Banner */
@media (max-width: 768px) {
  .trust-banner {
    grid-template-columns: repeat(2, 1fr);
    padding: 20px;
    gap: 15px;
  }

  .trust-item {
    font-size: 13px;
  }

  .trust-item i {
    font-size: 20px;
  }

  .store-hero-title {
    font-size: 24px;
  }
}

/* === PRICE FONT === */
.woocommerce-Price-amount,
.price,
.qb-total,
#qb-total,
#qb-delivery {
  font-family: 'Arial', 'Helvetica', sans-serif !important;
  font-weight: 700;
}

/* === TOP BAR === */
.top-bar {
  background-color: var(--main-color-dark);
  padding: 12px 0;
  text-align: center;
  color: #fff;
  font-weight: 700;
  font-size: 14px;
  direction: rtl;
  /* Ensure correct text direction for phone numbers */
}

.top-bar .container {
  display: flex;
  justify-content: center;
  align-items: center;
}

/* === MAIN HEADER === */
.main-header {
  background-color: #fff;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.05);
  /* Softer shadow */
  padding: 15px 0;
  position: relative;
  z-index: 100;
}

.main-header .container {
  max-width: 1400px;
  width: 100%;
  margin: 0 auto;
  padding: 0 30px;
}

.nav-content {
  display: flex;
  align-items: center;
  justify-content: center;
  /* Center everything */
  flex-direction: row-reverse;
  /* Search-Nav-Logo structure for RTL */
  gap: 60px;
  /* Space between the blocks */
}

/* === LOGO === */
.logo {
  display: flex;
  align-items: center;
}

.logo img {
  height: 50px;
  width: auto;
  display: block;
}

/* === NAVIGATION === */
.main-nav ul {
  list-style: none;
  display: flex;
  gap: 40px;
  /* Increased gap */
  margin: 0;
  padding: 0;
}

.main-nav li {
  display: inline-block;
}

.main-nav a {
  color: #333;
  font-weight: 700;
  /* Bolder font */
  text-decoration: none;
  transition: color 0.3s;
  font-size: 16px;
}

.main-nav a:hover,
.main-nav .current-menu-item a {
  color: var(--main-color);
}

/* === SEARCH === */
.search-container {
  display: flex;
  align-items: center;
  background: #f8f9fa;
  /* Slightly off-white/grey bg for contrast */
  border-radius: 50px;
  box-shadow: none;
  /* Removed shadow for cleaner look or keep subtle */
  border: 1px solid #eee;
  padding: 4px;
  width: 380px;
  /* Wider */
  transition: all 0.3s ease;
  position: relative;
}

.search-container:focus-within {
  background: #fff;
  border-color: var(--main-color);
  box-shadow: 0 4px 12px rgba(123, 46, 222, 0.1);
}

.search-input {
  flex: 1;
  border: none;
  outline: none;
  padding: 10px 20px;
  font-size: 15px;
  border-radius: 50px;
  background: transparent;
  color: #333;
  font-family: inherit;
}

.search-btn {
  background: var(--main-color);
  border: none;
  color: #fff;
  border-radius: 50%;
  /* Fully round */
  width: 42px;
  height: 42px;
  cursor: pointer;
  transition: all 0.3s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-left: -2px;
  /* Pull slightly if needed */
}

.search-btn:hover {
  background: var(--main-color-dark);
  transform: rotate(10deg);
}

.search-btn i {
  font-size: 18px;
}

/* === SECTION TITLES === */
.section-title {
  text-align: center;
  margin: 50px 0 30px;
  position: relative;
  font-size: 28px;
  color: var(--main-color);
  font-weight: 800;
}

.section-title span {
  background: #f8f9fa;
  padding: 0 20px;
  position: relative;
  z-index: 1;
}

.section-title::after {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translateX(-50%);
  width: 200px;
  height: 2px;
  background: var(--main-color);
  z-index: 0;
  opacity: 0.3;
}

/* === WOOCOMMERCE SORTING DROPDOWN === */
.woocommerce-ordering {
  margin-bottom: 30px;
  text-align: center;
}

.woocommerce-ordering select,
.woocommerce-ordering .orderby {
  background: #fff;
  border: none;
  border-radius: 50px;
  padding: 8px 35px;
  font-size: 13px;
  color: #333;
  font-weight: 600;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.06);
  cursor: pointer;
  transition: all 0.3s ease;
  appearance: none;
  -webkit-appearance: none;
  -moz-appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 24 24' fill='%231a2b4c'%3E%3Cpath d='M7 10l5 5 5-5z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: left 12px center;
  background-size: 14px;
  text-align: center;
  min-width: 200px;
}

.woocommerce-ordering select:hover,
.woocommerce-ordering .orderby:hover {
  box-shadow: 0 3px 10px rgba(0, 0, 0, 0.1);
  transform: translateY(-1px);
}

.woocommerce-ordering select:focus,
.woocommerce-ordering .orderby:focus {
  outline: none;
  box-shadow: 0 0 0 2px rgba(26, 43, 76, 0.12);
}

/* === Product Grid === */
.products-section {
  flex-wrap: wrap;
  gap: 25px;
  justify-content: center;
  padding: 0;
}

.woocommerce ul.products li.product {
  background: var(--color-bg-primary);
  border-radius: 16px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.06);
  overflow: visible;
  /* Allow badges to overflow */
  padding: 20px;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  text-align: center;
  width: 260px;
  min-height: 420px;
  display: flex;
  flex-direction: column;
  position: relative;
  border: 1px solid #f0f0f0;
}

.woocommerce ul.products li.product:hover {
  transform: translateY(-8px) scale(1.02);
  box-shadow: 0 12px 30px rgba(123, 46, 222, 0.15);
  border-color: rgba(123, 46, 222, 0.1);
}

.woocommerce ul.products li.product img {
  border-radius: 12px;
  width: 100%;
  height: 240px;
  object-fit: contain;
  margin-bottom: 15px;
  background: #f9f9f9;
}

/* === Sale Badge === */
.woocommerce ul.products li.product .onsale {
  position: absolute;
  top: 20px;
  right: 20px;
  background: var(--main-color);
  color: #ffffff;
  width: 45px;
  height: 45px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  font-weight: 700;
  line-height: 1;
  box-shadow: 0 4px 10px rgba(26, 43, 76, 0.3);
  z-index: 10;
  border: 2px solid #ffffff;
  margin: 0;
  padding: 0;
}

/* === Product Titles === */
.woocommerce ul.products li.product h2,
.woocommerce ul.products li.product .woocommerce-loop-product__title {
  font-family: 'Outfit', sans-serif;
  text-decoration: none !important;
  font-size: 16px;
  font-weight: 700;
  /* Bold */
  color: #333;
  margin: 0 0 10px 0;
  min-height: 40px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  text-overflow: ellipsis;
  line-height: 1.4;
}

.woocommerce ul.products li.product a {
  text-decoration: none !important;
}

/* === Product Price === */
.woocommerce ul.products li.product .price {
  margin: 0 0 15px 0;
  font-size: 18px;
  color: var(--color-text-primary);
  font-weight: 700;
  display: flex;
  flex-direction: row;
  /* Match HTML order */
  justify-content: center;
  align-items: center;
  gap: 10px;
  direction: ltr !important;
}

/* New Price - Bold and Brand Colored */
.woocommerce ul.products li.product .price ins {
  text-decoration: none;
  font-weight: 800;
  color: var(--brand-purple-primary) !important;
  font-size: 20px;
}

/* Old Price - Small and Strikethrough */
.woocommerce ul.products li.product .price del {
  color: var(--color-text-muted);
  font-size: 13px;
  font-weight: 400;
  opacity: 0.6;
  text-decoration: line-through;
}

/* === Buy Now Button === */
.woocommerce ul.products li.product .tajer-buy-now-button,
.tajer-buy-now-button {
  display: flex;
  justify-content: center;
  align-items: center;
  background: var(--main-color) !important;
  /* Enforce default color */
  color: #ffffff !important;
  padding: 0.1px 0;
  /* Adjusted to 0.1px */
  border-radius: 50px;
  /* Radius 50px as requested */
  font-size: 16px;
  font-weight: 700;
  text-align: center;
  margin-top: auto;
  text-decoration: none !important;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: 0 4px 15px rgba(123, 46, 222, 0.2);
  border: none;
  cursor: pointer;
  width: 100%;
  min-height: 44px;
  /* Touch-friendly */
}

.woocommerce ul.products li.product .tajer-buy-now-button:hover,
.tajer-buy-now-button:hover {
  background: var(--brand-purple-dark);
  transform: translateY(-2px) scale(1.02);
  box-shadow: 0 6px 20px rgba(123, 46, 222, 0.3);
}

/* === PAGINATION - Sale Badge Style === */
.woocommerce-pagination {
  text-align: center;
  margin: 50px 0;
}

.woocommerce-pagination ul {
  display: inline-flex;
  border: none !important;
  padding: 0;
  gap: 10px;
}

.woocommerce-pagination ul li {
  border: none !important;
  overflow: visible !important;
}

.woocommerce-pagination ul li a,
.woocommerce-pagination ul li span {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  line-height: 1;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--main-color) 0%, var(--main-color-dark) 100%);
  color: #fff;
  font-weight: 700;
  font-size: 15px;
  text-decoration: none;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.25), 0 0 20px rgba(0, 0, 0, 0.15);
  transition: all 0.3s ease;
  border: 3px solid #fff;
}

.woocommerce-pagination ul li a:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.35), 0 0 30px rgba(0, 0, 0, 0.25);
}

.woocommerce-pagination ul li span.current {
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.4), 0 0 25px rgba(0, 0, 0, 0.2);
  font-weight: 700;
}

/* === MOBILE MENU === */
.mobile-menu-toggle {
  display: none;
  background: none;
  border: none;
  font-size: 24px;
  cursor: pointer;
  color: var(--main-color);
}

/* === RESPONSIVE === */
@media (max-width: 900px) {
  .nav-content {
    flex-direction: row;
    flex-wrap: wrap;
    gap: 15px;
    align-items: center;
    justify-content: space-between;
  }

  .main-nav ul {
    flex-direction: column;
    align-items: center;
  }

  .main-header .container {
    width: 90%;
  }

  .mobile-menu-toggle {
    display: block;
    /* Re-enabled for responsive navigation */
    order: 1;
    font-size: 28px;
    padding: 0;
    background: transparent;
    border: none;
    cursor: pointer;
  }

  .main-nav {
    display: none;
    width: 100%;
    order: 4;
    /* After search */
  }

  .main-nav.active {
    display: block;
    animation: slideDown 0.3s ease-out;
  }

  @keyframes slideDown {
    from {
      opacity: 0;
      transform: translateY(-10px);
    }

    to {
      opacity: 1;
      transform: translateY(0);
    }
  }

  .main-nav ul {
    gap: 15px;
    padding: 20px 0;
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05);
  }

  .logo {
    order: 2;
    flex: 1;
    text-align: center;
  }

  .logo a {
    display: block;
    text-align: center;
  }

  .logo img {
    margin: 0 auto;
  }

  .search-container {
    width: 95%;
    /* Wider */
    max-width: 500px;
    /* Allow it to be bigger */
    order: 3;
    margin: 15px auto 10px;
    /* More spacing */
    padding: 3px;
    box-sizing: border-box;
  }

  .search-input {
    padding: 10px 20px;
    /* Restore standard padding */
    font-size: 15px;
    /* Readable font size */
  }

  .search-btn {
    width: 40px;
    /* Better touch target */
    height: 40px;
  }

  .search-btn i {
    font-size: 18px;
  }
}

@media (max-width: 600px) {

  /* === Grid System Fix === */
  .woocommerce ul.products {
    display: grid !important;
    grid-template-columns: repeat(2, 1fr) !important;
    gap: 12px !important;
    padding: 0 10px !important;
    margin: 0 !important;
    justify-content: stretch;
  }

  /* === Product Card Fix === */
  .woocommerce ul.products li.product {
    width: 100% !important;
    /* Managed by Grid */
    max-width: none !important;
    margin: 0 !important;
    min-height: auto !important;
    /* Remove fixed height constraints */
    padding: 12px !important;
    /* More breathing room */
    box-sizing: border-box !important;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
  }

  /* === Fluid Image Scaling === */
  .woocommerce ul.products li.product img {
    width: 100% !important;
    height: auto !important;
    aspect-ratio: 1 / 1;
    /* Modern square aspect ratio */
    object-fit: contain;
    margin-bottom: 12px;
    background: #f9f9f9;
  }

  /* === Typography & Spacing === */
  .woocommerce ul.products li.product h2 {
    font-size: 14px !important;
    line-height: 1.4;
    min-height: 2.8em;
    /* Reserve space for 2 lines */
    margin-bottom: 8px !important;
  }

  .woocommerce ul.products li.product .price {
    font-size: 16px !important;
    margin-bottom: 12px !important;
    font-weight: 800;
  }

  .tajer-buy-now-button {
    padding: 10px 0 !important;
    font-size: 14px !important;
    width: 100%;
    border-radius: 8px;
  }

  /* === Footer Fix === */
  .footer-widgets {
    flex-direction: column;
    text-align: center;
    padding-left: 20px;
    padding-right: 20px;
  }

  .footer-column {
    margin-bottom: 30px;
    min-width: 100%;
  }
}

/* === Container Overflow Fixes (Global Mobile) === */
@media (max-width: 430px) {

  /* Prevent horizontal scrolling */
  html,
  body {
    overflow-x: hidden;
    width: 100%;
    position: relative;
  }

  .main-header .container {
    padding: 0 15px;
    /* Ensure padding prevents edge bleeding */
    width: 100%;
    box-sizing: border-box;
  }

  .search-container {
    width: 100%;
    /* Full width of container */
    margin: 10px 0;
    box-sizing: border-box;
  }
}

/* === FOOTER === */
.site-footer {
  background-color: #fff;
  padding: 60px 0 0;
  margin-top: 80px;
  border-top: 1px solid #eee;
}

.footer-widgets {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 30px;
  padding-bottom: 40px;
  width: 85%;
  max-width: 1200px;
  margin: 0 auto;
}

.footer-column {
  flex: 1;
  min-width: 200px;
}

.footer-column h4 {
  font-size: 18px;
  font-weight: 800;
  margin-bottom: 25px;
  color: var(--main-color);
  position: relative;
  padding-bottom: 12px;
}

.footer-column h4::after {
  content: '';
  position: absolute;
  bottom: 0;
  right: 0;
  width: 30px;
  height: 3px;
  background: var(--main-color);
  border-radius: 2px;
}

.footer-column ul {
  list-style: none;
  padding: 0;
  margin: 0;
}

.footer-column ul li {
  margin-bottom: 14px;
}

.footer-column ul li a {
  color: #555;
  text-decoration: none;
  transition: all 0.3s ease;
  display: inline-block;
  font-size: 15px;
}

.footer-column ul li a:hover {
  color: var(--main-color);
  transform: translateX(-5px);
}

.footer-brand {
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
}

.footer-brand img {
  max-width: 160px;
  height: auto;
  margin-bottom: 20px;
}

.footer-brand p {
  color: #777;
  font-size: 14px;
}

.footer-bottom {
  background-color: var(--main-color);
  color: #fff;
  padding: 20px 0;
  text-align: center;
}

.footer-bottom .container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  width: 85%;
  max-width: 1200px;
  margin: 0 auto;
}

.footer-bottom p {
  margin: 0;
  font-size: 14px;
  opacity: 0.9;
}

@media (max-width: 768px) {
  .footer-widgets {
    flex-direction: column;
    text-align: center;
  }

  .footer-column h4::after {
    right: 50%;
    transform: translateX(50%);
  }

  .footer-bottom .container {
    flex-direction: column;
    gap: 10px;
  }
}

/* === MOBILE MENU (Responsive Only) === */
@media (max-width: 900px) {
  .main-nav.active {
    display: block;
  }

  .main-nav ul {
    gap: 15px;
    padding: 20px 0;
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05);
  }

  .logo {
    order: 2;
  }

  .search-container {
    width: 100%;
    order: 4;
  }
}

@media (max-width: 600px) {
  .woocommerce ul.products {
    display: flex !important;
    flex-wrap: wrap !important;
    gap: 10px !important;
    justify-content: space-between !important;
    padding: 0 5px !important;
  }

  .woocommerce ul.products li.product {
    width: calc(50% - 5px) !important;
    max-width: 50% !important;
    flex: 0 0 calc(50% - 5px) !important;
    margin: 0 0 15px 0 !important;
    min-height: 320px;
    padding: 10px;
    box-sizing: border-box !important;
  }

  .woocommerce ul.products li.product img {
    height: 160px;
  }

  .woocommerce ul.products li.product h2 {
    font-size: 14px;
  }

  .woocommerce ul.products li.product .price {
    font-size: 16px;
  }

  .tajer-buy-now-button {
    padding: 10px 15px;
    font-size: 14px;
    width: 100%;
  }

  .footer-widgets {
    flex-direction: column;
    text-align: center;
  }

  .footer-column {
    margin-bottom: 30px;
  }
}

/* === FOOTER === */
.site-footer {
  background-color: #fff;
  padding: 60px 0 0;
  margin-top: 80px;
  border-top: 1px solid #eee;
}

.footer-widgets {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 30px;
  padding-bottom: 40px;
  width: 85%;
  max-width: 1200px;
  margin: 0 auto;
}

.footer-column {
  flex: 1;
  min-width: 200px;
}

.footer-column h4 {
  font-size: 18px;
  font-weight: 800;
  margin-bottom: 25px;
  color: var(--main-color);
  position: relative;
  padding-bottom: 12px;
}

.footer-column h4::after {
  content: '';
  position: absolute;
  bottom: 0;
  right: 0;
  width: 30px;
  height: 3px;
  background: var(--main-color);
  border-radius: 2px;
}

.footer-column ul {
  list-style: none;
  padding: 0;
  margin: 0;
}

.footer-column ul li {
  margin-bottom: 14px;
}

.footer-column ul li a {
  color: #555;
  text-decoration: none;
  transition: all 0.3s ease;
  display: inline-block;
  font-size: 15px;
}

.footer-column ul li a:hover {
  color: var(--main-color);
  transform: translateX(-5px);
}

.footer-brand {
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
}

.footer-brand img {
  max-width: 160px;
  height: auto;
  margin-bottom: 20px;
}

.footer-brand p {
  color: #777;
  font-size: 14px;
}

.footer-bottom {
  background-color: var(--main-color);
  color: #fff;
  padding: 20px 0;
  text-align: center;
}

.footer-bottom .container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  width: 85%;
  max-width: 1200px;
  margin: 0 auto;
}

.footer-bottom p {
  margin: 0;
  font-size: 14px;
  opacity: 0.9;
}

@media (max-width: 768px) {
  .footer-widgets {
    flex-direction: column;
    text-align: center;
  }

  .footer-column h4::after {
    right: 50%;
    transform: translateX(50%);
  }

  .footer-bottom .container {
    flex-direction: column;
    gap: 10px;
  }
}

/* === Star Rating Styling === */
.woocommerce .star-rating {
  margin: 10px auto !important;
  float: none !important;
  font-size: 15px !important;
  /* Smaller, requested */
  display: block !important;
  /* Fixes 'half' display issues caused by table */
  width: 5.6em !important;
  /* Ensure enough width for 5 stars */
  height: 1.2em !important;
  line-height: 1.2 !important;
  color: var(--main-color) !important;
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.15) !important;
  /* Soft, clean shadow */
}

/* === Animated Top Bar === */
@keyframes tajer-pulse {
  0% {
    transform: scale(1);
    opacity: 1;
  }

  50% {
    transform: scale(1.05);
    opacity: 0.9;
  }

  100% {
    transform: scale(1);
    opacity: 1;
  }
}

.top-bar span {
  display: inline-block;
  animation: tajer-pulse 2s infinite ease-in-out;
}


/* === Best Seller Section === */
.best-seller-section {
  margin: 60px 0;
  padding: 20px;
}

.bs-container {
  background-color: color-mix(in srgb, var(--main-color), white 90%);
  /* Light Tint */
  border-radius: 20px;
  padding: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 60px;
  flex-wrap: wrap;
  max-width: 1100px;
  margin: 0 auto;
}

/* Product Card */
.bs-product-card {
  background: #fff;
  border-radius: 16px;
  padding: 20px;
  width: 300px;
  text-align: center;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.05);
  position: relative;
  display: flex;
  flex-direction: column;
}

.bs-badge {
  position: absolute;
  top: 15px;
  right: 15px;
  background: #25d366;
  /* Or Main Color? Design showed blue/cyan. Keeping Distinct or Main? User said Use Main. */
  background: var(--main-color);
  color: #fff;
  padding: 5px 12px;
  border-radius: 50px;
  font-size: 12px;
  font-weight: bold;
}

.bs-image-wrapper img {
  height: 200px;
  object-fit: contain;
  margin-bottom: 15px;
}

.bs-product-title {
  font-size: 18px;
  font-weight: 700;
  margin: 10px 0;
}

.bs-price {
  font-size: 20px;
  font-weight: 800;
  color: #333;
  margin-bottom: 15px;
}

.bs-btn-primary {
  background: color-mix(in srgb, var(--main-color), white 10%);
  color: #fff;
  padding: 10px;
  border-radius: 8px;
  text-decoration: none;
  font-weight: bold;
  display: block;
  transition: 0.3s;
}

.bs-btn-primary:hover {
  background: var(--main-color-dark);
  color: #fff;
}

/* Info Content */
.bs-info-content {
  flex: 1;
  min-width: 300px;
  text-align: right;
  direction: rtl;
}

.bs-top-tag {
  display: inline-block;
  background: #fff;
  padding: 5px 15px;
  border-radius: 50px;
  font-size: 13px;
  font-weight: 600;
  color: #555;
  margin-bottom: 20px;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
}

.bs-headline {
  font-size: 32px;
  font-weight: 900;
  margin-bottom: 15px;
  color: #222;
}

.bs-subheadline {
  font-size: 16px;
  color: #666;
  margin-bottom: 30px;
}

.bs-actions {
  display: flex;
  gap: 15px;
  margin-bottom: 35px;
}

.bs-btn-action {
  background: var(--main-color);
  color: #fff;
  padding: 12px 30px;
  border-radius: 50px;
  font-weight: 800;
  text-decoration: none;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
  transition: 0.3s;
}

.bs-btn-action:hover {
  background: var(--main-color-dark);
  transform: translateY(-2px);
  color: #fff;
}

.bs-btn-secondary {
  background: #fff;
  color: #333;
  padding: 12px 25px;
  border-radius: 50px;
  font-weight: 700;
  text-decoration: none;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
  transition: 0.3s;
}

.bs-btn-secondary:hover {
  background: #f9f9f9;
  color: var(--main-color);
}

.bs-features {
  display: flex;
  gap: 20px;
  color: #555;
  font-size: 13px;
}

.bs-features i {
  color: #f39c12;
  /* Gold for icons? Or Main Color? Keeping gold for contrast */
  margin-left: 5px;
}

@media (max-width: 768px) {
  .bs-container {
    flex-direction: column-reverse;
    text-align: center;
    padding: 20px;
  }

  .bs-info-content {
    text-align: center;
  }

  .bs-actions {
    justify-content: center;
  }

  .bs-features {
    justify-content: center;
    flex-wrap: wrap;
  }
}

/* === Store Hero Title === */
.store-hero-title {
  text-align: center;
  margin-bottom: 40px;
}

.store-hero-title h1 {
  font-size: 36px;
  font-weight: 800;
  color: #333;
  /* Dark Grey like image */
  margin: 0;
  line-height: 1.4;
}

@media (max-width: 600px) {
  .store-hero-title h1 {
    font-size: 28px;
  }
}

/* === REVIEWS SECTION === */
.woocommerce-tabs {
  direction: rtl;
  margin-top: 50px;
  padding: 0 20px;
}

.woocommerce-tabs ul.tabs {
  list-style: none;
  padding: 0;
  margin: 0 0 30px 0;
  display: flex;
  gap: 10px;
  border-bottom: 2px solid #eee;
  flex-wrap: wrap;
  justify-content: flex-start;
}

.woocommerce-tabs ul.tabs li {
  margin: 0;
  padding: 0;
}

.woocommerce-tabs ul.tabs li a {
  display: block;
  padding: 14px 28px;
  background: #f8f9fa;
  border: none;
  border-radius: 12px 12px 0 0;
  font-weight: 700;
  color: #666;
  text-decoration: none;
  transition: all 0.3s ease;
  font-size: 15px;
}

.woocommerce-tabs ul.tabs li a:hover {
  background: #fff;
  color: var(--main-color);
}

.woocommerce-tabs ul.tabs li.active a {
  background: var(--main-color);
  color: #fff;
  box-shadow: 0 4px 15px rgba(26, 43, 76, 0.25);
}

.woocommerce-tabs .panel {
  background: #fff;
  border-radius: 16px;
  padding: 30px;
  box-shadow: 0 5px 25px rgba(0, 0, 0, 0.06);
  border: 1px solid #eee;
}

.woocommerce-tabs .panel h2 {
  font-size: 22px;
  font-weight: 800;
  color: #333;
  margin: 0 0 20px 0;
  text-align: right;
  padding-bottom: 15px;
  border-bottom: 2px solid #eee;
}

/* === Review Form === */
#review_form_wrapper {
  margin-top: 25px;
}

#review_form .comment-reply-title {
  font-size: 18px;
  font-weight: 700;
  color: #333;
  margin-bottom: 20px;
  display: block;
  text-align: right;
}

#review_form .comment-form {
  display: flex;
  flex-direction: column;
  gap: 18px;
}

#review_form .comment-form-rating {
  display: flex;
  align-items: center;
  gap: 15px;
  flex-direction: row-reverse;
  justify-content: flex-end;
}

#review_form .comment-form-rating label {
  font-weight: 600;
  color: #555;
  font-size: 15px;
}

/* Star Rating Selector */
#review_form .stars {
  display: flex;
  gap: 5px;
  flex-direction: row-reverse;
}

#review_form .stars a {
  font-size: 24px;
  color: #ddd;
  text-decoration: none;
  transition: color 0.2s ease;
}

#review_form .stars a:hover,
#review_form .stars a.active {
  color: #f39c12;
}

#review_form .stars span a.active~a {
  color: #f39c12;
}

/* Comment Textarea */
#review_form .comment-form-comment {
  display: flex;
  flex-direction: column;
}

#review_form .comment-form-comment label {
  font-weight: 600;
  color: #555;
  margin-bottom: 10px;
  font-size: 15px;
  text-align: right;
}

#review_form .comment-form-comment textarea,
#review_form textarea#comment {
  width: 100%;
  min-height: 140px;
  border: 2px solid #eee;
  border-radius: 14px;
  padding: 16px;
  font-size: 15px;
  font-family: 'Tajawal', sans-serif;
  resize: vertical;
  transition: all 0.3s ease;
  text-align: right;
  direction: rtl;
  box-sizing: border-box;
}

#review_form textarea:focus {
  border-color: var(--main-color);
  outline: none;
  box-shadow: 0 0 0 4px rgba(26, 43, 76, 0.08);
}

/* Submit Button */
#review_form .form-submit {
  text-align: left;
}

#review_form .form-submit input[type="submit"],
#review_form input#submit {
  background: var(--main-color);
  color: #fff;
  border: none;
  padding: 14px 40px;
  border-radius: 50px;
  font-weight: 700;
  font-size: 16px;
  cursor: pointer;
  transition: all 0.3s ease;
  box-shadow: 0 4px 15px rgba(26, 43, 76, 0.25);
  font-family: 'Tajawal', sans-serif;
}

#review_form .form-submit input[type="submit"]:hover,
#review_form input#submit:hover {
  background: var(--main-color-dark);
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(26, 43, 76, 0.35);
}

/* No Reviews Message */
.woocommerce-noreviews {
  text-align: center;
  padding: 30px;
  color: #888;
  font-size: 16px;
  background: #f8f9fa;
  border-radius: 12px;
  margin: 20px 0;
}

/* === Existing Reviews List === */
#reviews .commentlist {
  list-style: none;
  padding: 0;
  margin: 0;
}

#reviews .commentlist li.comment {
  background: #f8f9fa;
  border-radius: 14px;
  padding: 20px;
  margin-bottom: 15px;
  border: 1px solid #eee;
}

#reviews .commentlist .comment_container {
  display: flex;
  gap: 20px;
  align-items: flex-start;
  flex-direction: row-reverse;
}

#reviews .commentlist .avatar {
  width: 60px;
  height: 60px;
  border-radius: 50%;
  object-fit: cover;
  border: 3px solid var(--main-color);
}

#reviews .commentlist .comment-text {
  flex: 1;
  text-align: right;
}

#reviews .commentlist .star-rating {
  display: flex;
  gap: 3px;
  font-size: 16px;
  color: #f39c12;
  margin-bottom: 8px;
  justify-content: flex-end;
}

#reviews .commentlist .meta {
  margin-bottom: 10px;
}

#reviews .commentlist .meta strong {
  font-weight: 700;
  color: #333;
  font-size: 16px;
}

#reviews .commentlist .meta .woocommerce-review__dash {
  margin: 0 8px;
  color: #ccc;
}

#reviews .commentlist .meta time {
  color: #888;
  font-size: 13px;
}

#reviews .commentlist .description p {
  color: #555;
  line-height: 1.8;
  margin: 0;
  font-size: 15px;
}

/* Star Rating Display */
.star-rating {
  display: inline-flex;
  font-size: 14px;
  color: #f39c12;
  gap: 2px;
}

.star-rating::before {
  content: "★★★★★";
  letter-spacing: 3px;
}

.star-rating span {
  overflow: hidden;
  position: absolute;
  left: 0;
  top: 0;
}

.star-rating span::before {
  content: "★★★★★";
  letter-spacing: 3px;
  color: #f39c12;
}

/* p.stars for Review Form Star Selector */
p.stars {
  display: flex;
  gap: 5px;
  flex-direction: row-reverse;
  justify-content: flex-end;
  margin: 0;
}

p.stars a {
  position: relative;
  height: 24px;
  width: 24px;
  text-indent: -999em;
  display: inline-block;
  text-decoration: none;
}

p.stars a::before {
  position: absolute;
  top: 0;
  right: 0;
  content: "☆";
  color: #f39c12;
  text-indent: 0;
  font-size: 24px;
  line-height: 1;
}

p.stars a:hover~a::before,
p.stars:hover a::before,
p.stars.selected a.active~a::before {
  content: "★";
  color: #f39c12;
}

p.stars.selected a.active::before {
  content: "★";
  color: #f39c12;
}

p.stars a.active::before {
  content: "★";
}

/* Responsive Reviews */
@media (max-width: 600px) {
  .woocommerce-tabs ul.tabs {
    flex-direction: column;
  }

  .woocommerce-tabs ul.tabs li a {
    border-radius: 10px;
    text-align: center;
  }

  .woocommerce-tabs .panel {
    padding: 20px 15px;
  }

  #reviews .commentlist .comment_container {
    flex-direction: column;
    align-items: center;
    text-align: center;
  }

  #reviews .commentlist .comment-text {
    text-align: center;
  }

  #reviews .commentlist .star-rating {
    justify-content: center;
  }

  #review_form .comment-form-rating {
    flex-direction: column;
    align-items: flex-end;
  }
}

/* === Additional Review Form Inputs (Name, Email, etc) === */
#review_form .comment-form-author,
#review_form .comment-form-email,
#review_form .comment-form-url {
  display: flex;
  flex-direction: column;
  margin-bottom: 15px;
}

#review_form .comment-form-author label,
#review_form .comment-form-email label,
#review_form .comment-form-url label {
  font-weight: 600;
  color: #555;
  margin-bottom: 8px;
  font-size: 15px;
  text-align: right;
}

#review_form .comment-form-author input,
#review_form .comment-form-email input,
#review_form .comment-form-url input,
#review_form input[type="text"],
#review_form input[type="email"],
#review_form input[type="url"] {
  width: 100%;
  padding: 14px 18px;
  border: 2px solid #eee;
  border-radius: 12px;
  font-size: 15px;
  font-family: 'Tajawal', sans-serif;
  transition: all 0.3s ease;
  text-align: right;
  direction: rtl;
  box-sizing: border-box;
  background: #fff;
}

#review_form input[type="text"]:focus,
#review_form input[type="email"]:focus,
#review_form input[type="url"]:focus {
  border-color: var(--main-color);
  outline: none;
  box-shadow: 0 0 0 4px rgba(26, 43, 76, 0.08);
}

/* Required Field Asterisk */
#review_form .required {
  color: #e74c3c;
  margin-right: 3px;
}

/* Cookies Checkbox */
#review_form .comment-form-cookies-consent {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-direction: row-reverse;
  justify-content: flex-end;
  padding: 15px;
  background: #f8f9fa;
  border-radius: 10px;
  margin-top: 10px;
}

#review_form .comment-form-cookies-consent input[type="checkbox"] {
  width: 20px;
  height: 20px;
  accent-color: var(--main-color);
  cursor: pointer;
}

#review_form .comment-form-cookies-consent label {
  font-size: 14px;
  color: #666;
  cursor: pointer;
  text-align: right;
  line-height: 1.5;
}

/* Notes about required fields */
#review_form .comment-notes {
  font-size: 14px;
  color: #888;
  margin-bottom: 20px;
  text-align: right;
  padding: 12px 16px;
  background: #f8f9fa;
  border-radius: 10px;
  border-right: 4px solid var(--main-color);
}

/* Reply Title */
#reply-title {
  font-size: 20px;
  font-weight: 700;
  color: #333;
  margin-bottom: 20px;
  text-align: right;
  display: block;
}

/* Form Layout - Make inputs inline on desktop */
@media (min-width: 768px) {

  #review_form .comment-form-author,
  #review_form .comment-form-email {
    display: inline-block;
    width: calc(50% - 10px);
    vertical-align: top;
  }

  #review_form .comment-form-author {
    margin-left: 20px;
  }
}