/* =========================================
   Raha Store - Final Safe CSS
   Platform: Salla / Raed Theme
   Goal: Better UI, trust, product page, mobile UX
========================================= */

:root {
  --raha-green: #5f745a;
  --raha-dark: #2f3f2f;
  --raha-soft: #eef3ea;
  --raha-cream: #f8f3ea;
  --raha-bg: #fffdf8;
  --raha-sand: #e8dcc6;
  --raha-muted: #687568;
  --raha-border: rgba(95,116,90,.14);
  --raha-shadow: 0 14px 34px rgba(47,63,47,.08);
  --raha-radius: 24px;
}

/* Base */
html {
  scroll-behavior: smooth;
}

body.theme-raed {
  background: var(--raha-bg);
  color: var(--raha-dark);
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
}

body.theme-raed * {
  box-sizing: border-box;
}

::selection {
  background: var(--raha-green);
  color: #fff;
}

img {
  max-width: 100%;
}

/* Section spacing */
.s-block {
  margin-block: 34px;
}

@media (max-width: 768px) {
  .s-block {
    margin-block: 22px;
  }
}

/* Header */
.store-header .top-navbar {
  background: var(--raha-bg);
  border-bottom: 1px solid rgba(95,116,90,.08);
}

.store-header .main-nav-container {
  background: rgba(255,253,248,.94) !important;
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  box-shadow: 0 8px 28px rgba(47,63,47,.08) !important;
  border-bottom: 1px solid rgba(95,116,90,.10);
}

.navbar-brand img {
  max-height: 58px;
  width: auto !important;
  object-fit: contain;
}

.header-btn__icon,
.s-user-menu-login-btn svg,
.s-cart-summary-icon svg {
  color: var(--raha-green) !important;
  fill: var(--raha-green) !important;
}

.s-cart-summary-count {
  background: var(--raha-green) !important;
  color: #fff !important;
}

/* Search */
.header-search .s-search-input,
.s-search-input {
  border: 1px solid var(--raha-border) !important;
  background: #fff !important;
  color: var(--raha-dark) !important;
}

.header-search .s-search-input:focus,
.s-search-input:focus {
  border-color: var(--raha-green) !important;
  box-shadow: 0 0 0 3px rgba(95,116,90,.12) !important;
}

/* Menu */
.main-menu a,
.mobile-menu a {
  color: var(--raha-dark) !important;
  font-weight: 700;
}

.main-menu a:hover,
.mobile-menu a:hover {
  color: var(--raha-green) !important;
}

/* Buttons - scoped safely */
.btn,
.s-button-btn,
a.btn {
  transition: transform .2s ease, box-shadow .2s ease, background-color .2s ease;
}

.btn:hover,
.s-button-btn:hover,
a.btn:hover {
  transform: translateY(-1px);
}

.btn-primary,
.s-button-primary {
  background: var(--raha-green) !important;
  border-color: var(--raha-green) !important;
  color: #fff !important;
  border-radius: 999px !important;
  min-height: 50px;
  font-weight: 900;
  box-shadow: 0 10px 22px rgba(95,116,90,.22);
}

.btn-primary:hover,
.s-button-primary:hover {
  background: var(--raha-dark) !important;
  border-color: var(--raha-dark) !important;
}

.btn-outline {
  border-color: var(--raha-green) !important;
  color: var(--raha-green) !important;
  border-radius: 999px !important;
}

.btn-outline:hover {
  background: var(--raha-soft) !important;
}

/* Features Bar Wrapper */
.s-block--bundle-features-bar {
  max-width: min(1180px, calc(100% - 24px));
  margin: 22px auto;
  border-radius: 24px;
  overflow: hidden;
  background: var(--raha-cream);
  border: 1px solid var(--raha-border);
  box-shadow: 0 14px 32px rgba(47,63,47,.07);
}

.s-block--bundle-features-bar salla-features-bar-64kvjq {
  display: block;
  border-radius: 24px;
  overflow: hidden;
}

.s-block--bundle-features-bar + .s-block {
  margin-top: 26px;
}

/* Native features cards */
.s-block--features {
  padding-block: 10px;
}

.s-block--features__item {
  background: #fff;
  border: 1px solid var(--raha-border);
  border-radius: var(--raha-radius);
  padding: 26px 18px;
  box-shadow: var(--raha-shadow);
  transition: transform .22s ease, box-shadow .22s ease, border-color .22s ease;
}

.s-block--features__item:hover {
  transform: translateY(-4px);
  border-color: rgba(95,116,90,.28);
  box-shadow: 0 18px 42px rgba(47,63,47,.12);
}

.s-block--features__item .feature-icon {
  width: 54px;
  height: 54px;
  margin-inline: auto;
  border-radius: 18px;
  background: var(--raha-soft) !important;
  color: var(--raha-green) !important;
  display: flex;
  align-items: center;
  justify-content: center;
}

.s-block--features__item .feature-icon i {
  color: var(--raha-green) !important;
  font-size: 26px;
}

.s-block--features__item h2 {
  color: var(--raha-dark);
  font-weight: 900;
  font-size: 18px;
  margin-top: 14px;
}

.s-block--features__item p {
  color: var(--raha-muted);
  line-height: 1.8;
  font-size: 14px;
}

/* Featured product / offers wrappers */
.s-block--bundle-featured-product {
  background: transparent;
}

.s-block--bundle-animated-feature,
.s-block--bundle-testimonials-text,
.s-block--bundle-faq {
  max-width: min(1180px, calc(100% - 24px));
  margin-inline: auto;
  border-radius: 32px;
  overflow: hidden;
}

.s-block--bundle-animated-feature {
  box-shadow: 0 18px 44px rgba(47,63,47,.08);
}

.s-block--bundle-testimonials-text {
  background: #fff;
  padding-block: 28px;
  box-shadow: 0 12px 32px rgba(47,63,47,.05);
}

.s-block--bundle-faq {
  background: var(--raha-cream);
  padding-block: 36px;
}

.s-block--bundle-faq h3,
.s-block--bundle-faq .s-block-trust-faq-title {
  color: var(--raha-dark) !important;
  font-weight: 900 !important;
}

/* Product Page */
body.product-single,
body.product {
  background: var(--raha-bg);
}

#main-content .container > .flex.flex-col.items-start.md\:flex-row {
  gap: 28px;
  align-items: flex-start;
}

/* Product gallery */
.details-slider {
  background: var(--raha-cream);
  border-radius: 28px !important;
  padding: 18px;
  box-shadow: 0 14px 34px rgba(47,63,47,.07);
}

.details-slider .swiper-slide {
  background: #fff;
  border-radius: 24px;
  overflow: hidden;
}

.s-slider-thumbs img {
  border-radius: 14px !important;
  border: 1px solid var(--raha-border);
}

/* Product title */
.main-content h1 {
  color: var(--raha-dark) !important;
  font-weight: 900 !important;
  font-size: clamp(24px, 3vw, 34px) !important;
  line-height: 1.5 !important;
  margin-bottom: 14px !important;
}

/* Price */
.text-red-800,
.total-price {
  color: var(--raha-green) !important;
  font-weight: 900 !important;
}

.line-through,
.before-price {
  color: #9ca3af !important;
}

/* Product description */
.product__description {
  background: #fff;
  border: 1px solid var(--raha-border);
  border-radius: 24px;
  padding: 22px !important;
  margin: 20px 0 !important;
  box-shadow: 0 12px 28px rgba(47,63,47,.05);
}

.product__description h2 {
  color: var(--raha-green);
  font-size: 22px;
  font-weight: 900;
  margin: 28px 0 12px;
}

.product__description p,
.product__description li {
  color: #4a4a4a;
  line-height: 2;
  font-size: 16px;
}

.product__description ul {
  background: var(--raha-soft);
  border-radius: 18px;
  padding: 18px 28px;
}

/* Product options */
.s-product-options-wrapper {
  display: block;
  background: #fff;
  border: 1px solid var(--raha-border);
  border-radius: 22px;
  padding: 18px;
  margin-bottom: 14px;
}

.s-form-control {
  border-radius: 16px !important;
  border-color: rgba(95,116,90,.24) !important;
  min-height: 48px;
}

/* Price box + sticky bar */
.product-form section.bg-white,
.sticky-product-bar {
  border: 1px solid var(--raha-border);
  box-shadow: 0 12px 28px rgba(47,63,47,.05);
}

.s-quantity-input-container {
  border-radius: 999px !important;
  overflow: hidden;
  border-color: rgba(95,116,90,.2) !important;
}

/* Reviews / comments */
salla-comments {
  display: block;
  max-width: 1180px;
  margin: 36px auto;
  padding: 0 16px;
}

.s-comments {
  background: var(--raha-cream);
  border-radius: 30px;
  padding: 28px;
  border: 1px solid var(--raha-border);
}

.s-comments:before {
  content: "آراء وتقييمات العملاء";
  display: block;
  color: var(--raha-dark);
  font-size: 28px;
  font-weight: 900;
  margin-bottom: 8px;
}

.s-comments:after {
  content: "شارك تجربتك مع سليبر راحة وساعد العملاء على اختيار المنتج بثقة.";
  display: block;
  color: var(--raha-muted);
  font-size: 15px;
  margin-bottom: 20px;
}

/* Hide empty related products */
.s-products-slider-wrapper .swiper-slide:empty {
  display: none;
}

/* Footer */
.store-footer {
  background: linear-gradient(135deg, #2f3f2f 0%, #465a42 100%) !important;
  margin-top: 40px;
}

.store-footer__inner {
  background: transparent !important;
  padding-top: 42px;
}

.store-footer,
.store-footer h3,
.store-footer p,
.store-footer a,
.store-footer span {
  color: #fff !important;
}

.store-footer h3 {
  font-weight: 900;
  margin-bottom: 14px;
}

.store-footer p {
  line-height: 1.9;
  opacity: .92;
}

.store-footer a:hover {
  color: var(--raha-sand) !important;
}

.s-contacts-item {
  background: rgba(255,255,255,.08);
  border: 1px solid rgba(255,255,255,.12);
  border-radius: 16px;
  padding: 10px 12px;
}

/* Mobile menu */
.mm-ocd__content,
.mobile-menu {
  background: var(--raha-bg) !important;
}

/* Accessibility */
a:focus-visible,
button:focus-visible,
input:focus-visible,
select:focus-visible {
  outline: 3px solid rgba(95,116,90,.35) !important;
  outline-offset: 3px;
}

/* Mobile */
@media (max-width: 768px) {
  .navbar-brand img {
    max-height: 46px;
  }

  .store-header .main-nav-container {
    height: 72px !important;
  }

  .container {
    padding-inline: 14px;
  }

  .s-block--features .grid {
    grid-template-columns: 1fr !important;
    gap: 14px !important;
  }

  .s-block--features__item {
    padding: 22px 16px;
  }

  .s-block--bundle-faq,
  .s-block--bundle-testimonials-text,
  .s-block--bundle-animated-feature,
  .s-block--bundle-features-bar {
    max-width: calc(100% - 20px);
    border-radius: 22px;
  }

  .details-slider {
    padding: 10px;
    border-radius: 20px !important;
  }

  .product__description {
    padding: 18px !important;
  }

  .s-comments {
    padding: 22px 16px;
    border-radius: 22px;
  }

  .s-comments:before {
    font-size: 22px;
  }

  .store-footer__inner {
    padding-top: 32px;
  }
}

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    animation-duration: .001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .001ms !important;
  }
}