/* ==========================================================================
   PUREVIA NATURAL PRODUCTS - MAGIACARE THEME & RESPONSIVE STYLESHEET
   Accurately Formatted based on MagiaCare.com (WoodMart Theme & Elementor Architecture)
   Typography: Tajawal (Arabic), Lato & Roboto Slab (English), Satisfy (Script Accent)
   ========================================================================== */

@import url('https://fonts.googleapis.com/css2?family=Lato:ital,wght@0,300;0,400;0,700;0,900;1,300;1,400;1,700&family=Roboto+Slab:wght@400;500;600;700&family=Satisfy&family=Tajawal:wght@300;400;500;700;800;900&display=swap');

/* --- 1. Root Color & Typography Variables --- */
:root {
  --wd-primary-color: #38533D;
  --wd-primary-color-hover: #27382B;
  --wd-accent-rose: #DE6B72;
  --wd-accent-blue: #4899B8;
  --wd-text-color: #242424;
  --wd-text-muted: #6B7280;
  --wd-bg-body: #FFFFFF;
  --wd-bg-sand: #F8F8F8;
  --wd-bg-sand-warm: #FAF7F2;
  --wd-border-color: #EFECE2;
  --wd-border-light: #F3F4F6;
  
  --font-arabic: 'Tajawal', sans-serif;
  --font-english: 'Lato', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --font-title-slab: 'Roboto Slab', serif;
  --font-script: 'Satisfy', cursive;
}

/* --- 2. Universal Reset & Eye-Comfort Text Smoothing --- */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  font-family: var(--font-arabic);
  -webkit-text-size-adjust: 100%;
  -webkit-tap-highlight-color: transparent;
  scroll-behavior: smooth;
  scroll-padding-top: 130px;
  touch-action: manipulation;
  color: var(--wd-text-color);
  background-color: var(--wd-bg-body);
}

@media (min-width: 1024px) {
  html {
    scroll-padding-top: 150px;
  }
}

section[id] {
  scroll-margin-top: 130px;
}

@media (min-width: 1024px) {
  section[id] {
    scroll-margin-top: 150px;
  }
}

body {
  background-color: var(--wd-bg-body);
  color: var(--wd-text-color);
  overflow-x: hidden;
  width: 100%;
  min-height: 100vh;
  line-height: 1.6;
  font-size: 15px;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* Safe Bottom Padding on Mobile */
@media (max-width: 1023px) {
  body {
    padding-bottom: 5rem;
  }
}

.site-wrapper {
  width: 100%;
  max-width: 100%;
  margin: 0 auto;
  position: relative;
  min-height: 100vh;
}

img, video, svg {
  max-width: 100%;
  display: block;
}

a {
  text-decoration: none;
  color: inherit;
  transition: color 0.2s ease, opacity 0.2s ease;
}

button {
  font-family: inherit;
  cursor: pointer;
  border: none;
  background: transparent;
}

/* --- 3. Bilingual Pure CSS RTL/LTR Display --- */
html[dir="rtl"] .lang-en {
  display: none !important;
}

html[dir="ltr"] .lang-ar {
  display: none !important;
}

html[dir="rtl"] {
  font-family: var(--font-arabic);
}

html[dir="ltr"] {
  font-family: var(--font-english);
}

.font-script {
  font-family: var(--font-script) !important;
  letter-spacing: 0.02em;
}

/* --- 4. WoodMart Section Titles & Subtitles --- */
.wd-title-style-default {
  margin-bottom: 1.5rem;
}

.wd-subtitle-xs {
  font-size: 13px;
  text-transform: uppercase;
  letter-spacing: 0.15em;
  font-weight: 700;
  color: var(--wd-primary-color);
  margin-bottom: 0.25rem;
}

.wd-title-heading {
  font-family: var(--font-title-slab);
  font-size: clamp(1.75rem, 4vw, 2.5rem);
  font-weight: 700;
  color: #1A231E;
  line-height: 1.25;
}

html[dir="rtl"] .wd-title-heading {
  font-family: var(--font-arabic);
  font-weight: 800;
}

.wd-title-desc {
  font-size: 14px;
  color: var(--wd-text-muted);
  line-height: 1.6;
  max-width: 38rem;
  margin: 0.5rem auto 0;
}

/* WoodMart Underline Link Button */
.wd-btn-link {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  font-size: 13px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--wd-primary-color);
  border-bottom: 2px solid var(--wd-primary-color);
  padding-bottom: 2px;
  transition: all 0.2s ease;
}

.wd-btn-link:hover {
  color: var(--wd-primary-color-hover);
  border-color: var(--wd-primary-color-hover);
  padding-inline-start: 4px;
}

/* --- 5. Promo Banners & Category Cards (WoodMart Parallax Hover) --- */
.wd-promo-banner {
  position: relative;
  border-radius: 12px;
  overflow: hidden;
  background-color: var(--wd-bg-sand);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.wd-promo-banner:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.08);
}

.wd-promo-banner img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.6s cubic-bezier(0.25, 1, 0.5, 1);
}

.wd-promo-banner:hover img {
  transform: scale(1.06);
}

/* --- 6. Split Column Layout (25% Title + 75% Product Carousel) --- */
.wd-split-section {
  display: grid;
  grid-template-columns: 1fr;
  gap: 2rem;
  align-items: center;
}

@media (min-width: 1024px) {
  .wd-split-section {
    grid-template-columns: 280px 1fr;
    gap: 2.5rem;
  }
}

/* --- 7. WoodMart Product Card Loop Styling --- */
.wd-product-card {
  background: #FFFFFF;
  border: 1px solid var(--wd-border-color);
  border-radius: 14px;
  padding: 1rem;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  position: relative;
  overflow: hidden;
  transition: all 0.3s ease;
}

.wd-product-card:hover {
  border-color: #CBD5E1;
  box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.07);
  transform: translateY(-3px);
}

.wd-product-card .product-thumb {
  position: relative;
  width: 100%;
  aspect-ratio: 1 / 1;
  background-color: var(--wd-bg-sand);
  border-radius: 10px;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 0.75rem;
}

.wd-product-card .product-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.4s ease;
}

.wd-product-card:hover .product-thumb img {
  transform: scale(1.05);
}

/* Product Badges (Rounded Pills) */
.product-badge-sale {
  position: absolute;
  top: 10px;
  left: 10px;
  z-index: 10;
  background-color: var(--wd-accent-rose);
  color: #FFFFFF;
  font-size: 10px;
  font-weight: 800;
  padding: 3px 8px;
  border-radius: 9999px;
  box-shadow: 0 2px 6px rgba(222, 107, 114, 0.4);
}

html[dir="rtl"] .product-badge-sale {
  left: auto;
  right: 10px;
}

/* Action Overlay Buttons on Hover */
.product-action-btns {
  position: absolute;
  top: 10px;
  right: 10px;
  z-index: 10;
  display: flex;
  flex-direction: column;
  gap: 6px;
  opacity: 0;
  transform: translateX(10px);
  transition: all 0.25s ease;
}

html[dir="rtl"] .product-action-btns {
  right: auto;
  left: 10px;
  transform: translateX(-10px);
}

.wd-product-card:hover .product-action-btns {
  opacity: 1;
  transform: translateX(0);
}

.product-action-btn {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: #FFFFFF;
  box-shadow: 0 3px 8px rgba(0, 0, 0, 0.12);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #374151;
  transition: all 0.2s ease;
}

.product-action-btn:hover {
  background: var(--wd-primary-color);
  color: #FFFFFF;
}

/* Add to Cart Replace Button */
.wd-add-cart-btn {
  width: 100%;
  padding: 0.6rem 1rem;
  border-radius: 8px;
  background-color: var(--wd-primary-color);
  color: #FFFFFF;
  font-weight: 700;
  font-size: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  transition: background-color 0.2s ease, transform 0.1s ease;
}

.wd-add-cart-btn:hover {
  background-color: var(--wd-primary-color-hover);
}

.wd-add-cart-btn:active {
  transform: scale(0.98);
}

/* --- 8. Cash on Delivery Notice Box (MagiaCare Note Box) --- */
.cod-notice-box {
  background-color: #FFFDF5;
  border: 1px solid #FDE68A;
  border-left: 4px solid #F59E0B;
  border-radius: 12px;
  padding: 1.25rem;
  margin: 1.5rem 0;
  font-size: 13px;
  line-height: 1.6;
}

html[dir="rtl"] .cod-notice-box {
  border-left: 1px solid #FDE68A;
  border-right: 4px solid #F59E0B;
}

/* --- 9. Flash Sale & Countdown Timer --- */
.countdown-box {
  display: flex;
  flex-direction: column;
  align-items: center;
  min-width: 54px;
  padding: 8px 6px;
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 8px;
}

.countdown-digit {
  font-family: 'Roboto Slab', monospace;
  font-size: 20px;
  font-weight: 700;
  color: #FFFFFF;
  line-height: 1;
}

.countdown-label {
  font-size: 9px;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.7);
  margin-top: 3px;
  font-weight: 600;
}

/* --- 10. WoodMart 5-Column Footer --- */
.wd-footer {
  background-color: #1A231E;
  color: #E5E7EB;
  font-size: 13px;
  line-height: 1.7;
}

.wd-footer-title {
  color: #FFFFFF;
  font-family: var(--font-arabic);
  font-size: 14px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 1rem;
}

.wd-footer-link {
  color: #9CA3AF;
  transition: color 0.2s ease, padding-inline-start 0.2s ease;
  display: block;
  margin-bottom: 0.5rem;
}

.wd-footer-link:hover {
  color: #FFFFFF;
  padding-inline-start: 4px;
}

.wd-copyright-bar {
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  padding: 1.25rem 0;
  font-size: 12px;
  color: #9CA3AF;
}

/* --- 11. Mobile Drawer Navigation Tabs (Menu / Categories) --- */
.drawer-tab-btn {
  flex: 1;
  padding: 10px;
  text-align: center;
  font-weight: 700;
  font-size: 13px;
  border-bottom: 2px solid transparent;
  color: #6B7280;
  transition: all 0.2s ease;
}

.drawer-tab-btn.active {
  color: var(--wd-primary-color);
  border-color: var(--wd-primary-color);
  background-color: #F8F9FA;
}

/* --- 12. Floating Social Sidebar --- */
.floating-social-sidebar {
  position: absolute;
  right: 0;
  top: 50%;
  transform: translateY(-50%);
  z-index: 35;
  display: flex;
  flex-direction: column;
  box-shadow: -3px 4px 14px rgba(0, 0, 0, 0.12);
  border-top-left-radius: 6px;
  border-bottom-left-radius: 6px;
  overflow: hidden;
}

html[dir="rtl"] .floating-social-sidebar {
  right: auto;
  left: 0;
  box-shadow: 3px 4px 14px rgba(0, 0, 0, 0.12);
  border-top-left-radius: 0;
  border-bottom-left-radius: 0;
  border-top-right-radius: 6px;
  border-bottom-right-radius: 6px;
}

@media (max-width: 767px) {
  .floating-social-sidebar {
    display: none;
  }
}

.floating-social-btn {
  width: 34px;
  height: 34px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #FFFFFF;
  transition: all 0.2s ease;
}

.floating-social-btn:hover {
  transform: scale(1.1);
  filter: brightness(1.15);
}

/* Nav Dropdown Menus (Desktop) */
.nav-dropdown-wrapper {
  position: relative;
}

.nav-dropdown-menu {
  position: absolute;
  top: 100%;
  left: 50%;
  transform: translateX(-50%) translateY(8px);
  min-width: 220px;
  background: #FFFFFF;
  border: 1px solid var(--wd-border-color);
  border-radius: 12px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
  opacity: 0;
  visibility: hidden;
  transition: all 0.2s ease;
  z-index: 50;
  padding: 8px 0;
}

.nav-dropdown-wrapper:hover .nav-dropdown-menu,
.nav-dropdown-wrapper:focus-within .nav-dropdown-menu {
  opacity: 1;
  visibility: visible;
  transform: translateX(-50%) translateY(0);
}

.nav-dropdown-item {
  display: block;
  padding: 8px 18px;
  font-size: 13px;
  font-weight: 600;
  color: #374151;
  transition: all 0.15s ease;
}

.nav-dropdown-item:hover {
  background-color: var(--wd-bg-sand);
  color: var(--wd-primary-color);
  padding-inline-start: 22px;
}

/* --- 13. Desktop Custom Scrollbar --- */
@media (min-width: 768px) {
  ::-webkit-scrollbar {
    width: 8px;
  }
  ::-webkit-scrollbar-track {
    background: #F8F8F8;
  }
  ::-webkit-scrollbar-thumb {
    background: #CBD5E1;
    border-radius: 4px;
  }
  ::-webkit-scrollbar-thumb:hover {
    background: #94A3B8;
  }
}

/* --- 14. Phone Auth Modal & Account Dashboard Styles --- */
.otp-input-box {
  width: 48px;
  height: 52px;
  text-align: center;
  font-size: 20px;
  font-weight: 800;
  font-family: monospace;
  background-color: #F9FAFB;
  border: 2px solid #E5E7EB;
  border-radius: 12px;
  outline: none;
  transition: all 0.2s ease;
}

.otp-input-box:focus {
  background-color: #FFFFFF;
  border-color: var(--wd-primary-color);
  box-shadow: 0 0 0 3px rgba(56, 83, 61, 0.15);
}

.account-tab-btn {
  padding: 8px 16px;
  font-size: 13px;
  font-weight: 700;
  color: #6B7280;
  border-bottom: 2px solid transparent;
  transition: all 0.2s ease;
}

.account-tab-btn.active {
  color: var(--wd-primary-color);
  border-color: var(--wd-primary-color);
  background-color: #FAF7F2;
}
