@import url('https://fonts.googleapis.com/css2?family=Cairo:wght@300;400;500;600;700;800&family=Inter:wght@300;400;500;600;700;800&display=swap');

/* --- DESIGN SYSTEM & COLOR TOKENS --- */
:root {
  /* Hedyaty Brand Palette */
  --primary: #ddaee0;
  --primary-dark: #b788ba;
  --primary-light: #ffd4ff;
  --primary-reverse: #5e2f61;
  --accent-gold: #d4af37;
  --accent-gold-dark: #aa882c;
  --accent-gold-light: #f9ecc2;
  
  /* Light Mode Palette */
  --bg-gradient: linear-gradient(135deg, #fdfbfe 0%, #f4ebf5 100%);
  --bg-solid: #fdfbfe;
  --card-bg: rgba(255, 255, 255, 0.85);
  --card-border: rgba(221, 174, 224, 0.25);
  --text-main: #3a1c3d;
  --text-muted: #7d6380;
  --shadow: 0 8px 32px 0 rgba(94, 47, 97, 0.06);
  --input-bg: rgba(255, 255, 255, 0.95);
  
  /* Standard Statuses */
  --success: #2e7d32;
  --success-bg: rgba(46, 125, 50, 0.1);
  --danger: #d32f2f;
  --danger-bg: rgba(211, 47, 47, 0.1);
  
  /* Font Variables */
  --font-ar: 'Cairo', sans-serif;
  --font-en: 'Inter', sans-serif;
  
  --header-height: 80px;
  --announce-height: 0px;
}

/* Dark Mode Palette Overrides */
body.dark-mode {
  --bg-gradient: linear-gradient(135deg, #160a17 0%, #0a040b 100%);
  --bg-solid: #0a040b;
  --card-bg: rgba(22, 10, 23, 0.85);
  --card-border: rgba(221, 174, 224, 0.15);
  --text-main: #f3ebf5;
  --text-muted: #bda8c0;
  --shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.4);
  --input-bg: rgba(15, 7, 16, 0.7);
  
  --success: #4caf50;
  --success-bg: rgba(76, 175, 80, 0.15);
  --danger: #f44336;
  --danger-bg: rgba(244, 67, 54, 0.15);
}

/* --- RESET & BASICS --- */
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  transition: background-color 0.3s ease, border-color 0.3s ease, color 0.3s ease;
}

html {
  /* Do NOT set overflow:hidden on html — it breaks position:fixed on iOS Safari */
  -webkit-text-size-adjust: 100%;
}

body {
  font-family: var(--font-ar);
  background: var(--bg-solid);
  background-image: var(--bg-gradient);
  color: var(--text-main);
  min-height: 100vh;
  padding-top: calc(var(--announce-height) + var(--header-height)); /* Account for fixed bar + header */
  /* Do NOT add overflow:hidden here — breaks position:fixed on mobile browsers */
}

body.lang-en {
  font-family: var(--font-en);
}

/* Clip horizontal overflow on scrollable content WITHOUT breaking position:fixed */
.page-wrapper {
  overflow-x: hidden;
  width: 100%;
}

a {
  color: inherit;
  text-decoration: none;
}

/* --- STORE HEADER --- */
.store-header {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: var(--header-height);
  background: var(--card-bg);
  backdrop-filter: blur(15px);
  -webkit-backdrop-filter: blur(15px);
  border-bottom: 1px solid var(--card-border);
  z-index: 900;
  box-shadow: var(--shadow);
}

.header-container {
  max-width: 1300px;
  height: 100%;
  margin: 0 auto;
  padding: 0 20px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 20px;
}

/* Logo & Title */
.logo-area {
  display: flex;
  align-items: center;
  gap: 12px;
}

.logo-img {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid var(--primary);
  animation: pulse-logo 3s infinite ease-in-out;
}

.brand-text h1 {
  font-size: 1.25rem;
  font-weight: 800;
  color: var(--primary-reverse);
  line-height: 1.2;
}

body.dark-mode .brand-text h1 {
  color: var(--primary-light);
}

.brand-text p {
  font-size: 0.72rem;
  color: var(--text-muted);
}

/* Search bar */
.search-container {
  flex: 1;
  max-width: 450px;
  display: flex;
  background: var(--input-bg);
  border: 1px solid var(--card-border);
  border-radius: 30px;
  overflow: hidden;
  box-shadow: 0 2px 8px rgba(0,0,0,0.02);
}

.search-input {
  flex: 1;
  border: none;
  background: transparent;
  padding: 10px 20px;
  font-family: inherit;
  font-size: 0.9rem;
  color: var(--text-main);
  outline: none;
}

.search-btn {
  background: var(--primary-reverse);
  color: #ffffff;
  border: none;
  padding: 0 20px;
  font-family: inherit;
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
}

body.dark-mode .search-btn {
  background: var(--primary);
  color: #2e1233;
}

.search-btn:hover {
  opacity: 0.9;
}

/* Header Utilities */
.actions-area {
  display: flex;
  align-items: center;
  gap: 12px;
}

.utility-btn {
  background: var(--input-bg);
  border: 1px solid var(--card-border);
  padding: 8px 14px;
  border-radius: 30px;
  cursor: pointer;
  font-family: inherit;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-main);
  display: flex;
  align-items: center;
  gap: 6px;
}

.utility-btn:hover {
  border-color: var(--primary);
  transform: translateY(-1px);
}

.cart-btn {
  background: var(--primary-reverse);
  color: #ffffff;
  border: none;
  width: 42px;
  height: 42px;
  border-radius: 50%;
  cursor: pointer;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.15rem;
  box-shadow: 0 4px 12px rgba(94, 47, 97, 0.2);
}

body.dark-mode .cart-btn {
  background: var(--primary);
  color: #2e1233;
}

.cart-btn:hover {
  transform: scale(1.05);
}

.cart-badge {
  position: absolute;
  top: -4px;
  right: -4px;
  background: var(--accent-gold);
  color: #2e1233;
  font-size: 0.72rem;
  font-weight: 700;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 2px solid var(--bg-solid);
}

body[dir="rtl"] .cart-badge {
  right: auto;
  left: -4px;
}

/* --- STORE NAVIGATION MENU --- */
.store-nav {
  position: fixed;
  top: calc(var(--announce-height) + var(--header-height));
  left: 0;
  width: 100%;
  background: var(--card-bg);
  border-bottom: 1px solid var(--card-border);
  z-index: 850;
  backdrop-filter: blur(15px);
  -webkit-backdrop-filter: blur(15px);
}

.nav-container {
  max-width: 1000px;
  margin: 0 auto;
  display: flex;
  justify-content: space-around;
  padding: 10px 10px;
  flex-wrap: wrap;
  gap: 8px;
}

.nav-link {
  font-size: 0.92rem;
  font-weight: 600;
  color: var(--text-muted);
  position: relative;
  padding: 6px 0;
  white-space: nowrap;
}

.nav-link:hover, .nav-link.active {
  color: var(--primary-reverse);
}

body.dark-mode .nav-link:hover, body.dark-mode .nav-link.active {
  color: var(--primary-light);
}

.nav-link::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 50%;
  width: 0;
  height: 2px;
  background: var(--primary-reverse);
  transition: all 0.3s ease;
  transform: translateX(-50%);
}

body.dark-mode .nav-link::after {
  background: var(--primary);
}

.nav-link:hover::after, .nav-link.active::after {
  width: 100%;
}

/* --- HERO BANNER SECTION --- */
.hero-section {
  position: relative;
  width: 100%;
  max-width: 100%;
  margin: 0 0 30px 0;
  height: calc(100vh - var(--announce-height) - var(--header-height));
  border-radius: 0;
  overflow: hidden;
  display: flex;
  align-items: center;
  box-shadow: var(--shadow);
}

.hero-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(135deg, rgba(94, 47, 97, 0.45) 0%, rgba(15, 7, 16, 0.75) 100%);
}

.hero-content {
  position: relative;
  z-index: 10;
  max-width: 850px;
  padding: 0 40px;
  color: #ffffff;
}

body[dir="rtl"] .hero-content {
  text-align: right;
}

body[dir="ltr"] .hero-content {
  text-align: left;
}

#hero-title {
  font-size: 2.2rem;
  font-weight: 800;
  margin-bottom: 15px;
  line-height: 1.25;
  text-shadow: 0 2px 8px rgba(0,0,0,0.2);
}

#hero-sub {
  font-size: 1.05rem;
  margin-bottom: 25px;
  line-height: 1.8;
  opacity: 0.95;
  max-width: 800px;
  text-shadow: 0 1px 3px rgba(0,0,0,0.3);
}

.hero-btn {
  display: inline-block;
  background: linear-gradient(135deg, var(--accent-gold) 0%, #b89321 100%);
  color: #2e1233;
  padding: 12px 30px;
  border-radius: 30px;
  font-weight: 700;
  font-size: 0.95rem;
  box-shadow: 0 4px 16px rgba(184, 147, 33, 0.3);
}

.hero-btn:hover {
  transform: scale(1.03);
  box-shadow: 0 6px 20px rgba(184, 147, 33, 0.4);
}

/* --- HORIZONTAL CATEGORIES QUICK SCROLL --- */
.categories-scroll-section {
  max-width: 1300px;
  margin: 0 auto 30px auto;
  padding: 0 10px;
}

.category-scroll-container {
  display: flex;
  gap: 12px;
  overflow-x: auto;
  padding: 10px 0;
  scrollbar-width: none; /* Hide standard Firefox scrollbar */
}

.category-scroll-container::-webkit-scrollbar {
  display: none; /* Hide Webkit scrollbar */
}

.cat-scroll-btn {
  flex-shrink: 0;
  background: var(--card-bg);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border: 1px solid var(--card-border);
  padding: 10px 20px;
  border-radius: 30px;
  cursor: pointer;
  font-family: inherit;
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--text-main);
  display: flex;
  align-items: center;
  gap: 8px;
  box-shadow: var(--shadow);
}

.cat-scroll-btn:hover {
  border-color: var(--primary);
  transform: translateY(-1px);
}

.cat-scroll-btn.active {
  background: var(--primary-reverse);
  color: #ffffff;
  border-color: var(--primary-reverse);
}

body.dark-mode .cat-scroll-btn.active {
  background: var(--primary);
  color: #2e1233;
  border-color: var(--primary);
}

.cat-scroll-btn i {
  color: var(--primary-reverse);
}

.cat-scroll-btn.active i {
  color: #ffffff;
}

body.dark-mode .cat-scroll-btn i {
  color: var(--primary-light);
}

body.dark-mode .cat-scroll-btn.active i {
  color: #2e1233;
}

/* --- CATALOG GRID & CARDS --- */
.catalog-section {
  max-width: 1300px;
  margin: 0 auto 50px auto;
  padding: 0 20px;
}

.catalog-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 24px;
}

.catalog-header h2 {
  font-size: 1.4rem;
  font-weight: 800;
  color: var(--primary-reverse);
}

body.dark-mode .catalog-header h2 {
  color: var(--primary-light);
}

.sort-container {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 0.85rem;
}

.sort-dropdown {
  background: var(--input-bg);
  border: 1px solid var(--card-border);
  padding: 8px 12px;
  border-radius: 12px;
  font-family: inherit;
  color: var(--text-main);
  outline: none;
}

.products-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 24px;
}

/* Product Card Spec */
.product-card {
  background: var(--card-bg);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border: 1px solid var(--card-border);
  border-radius: 20px;
  overflow: hidden;
  box-shadow: var(--shadow);
  display: flex;
  flex-direction: column;
  position: relative;
}

.product-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 24px rgba(94, 47, 97, 0.12);
  border-color: var(--primary-dark);
}

.product-card-image {
  position: relative;
  width: 100%;
  aspect-ratio: 3 / 4;
  overflow: hidden;
  background: #f7f3f8;
}

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

.product-card:hover .product-card-image img {
  transform: scale(1.06);
}

/* Wishlist absolute floating */
.wishlist-btn {
  position: absolute;
  top: 15px;
  right: 15px;
  background: rgba(255, 255, 255, 0.85);
  border: none;
  width: 38px;
  height: 38px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  color: #7d6380;
  font-size: 1rem;
  box-shadow: 0 4px 10px rgba(0,0,0,0.05);
}

body[dir="rtl"] .wishlist-btn {
  right: auto;
  left: 15px;
}

.wishlist-btn:hover {
  transform: scale(1.05);
  color: #ff3366;
}

.wishlist-btn.active {
  color: #ff3366;
}

/* Card details styling */
.product-card-content {
  padding: 16px;
  display: flex;
  flex-direction: column;
  flex: 1;
}

.product-title {
  font-size: 0.95rem;
  font-weight: 600;
  margin-bottom: 12px;
  line-height: 1.4;
  height: 40px;
  overflow: hidden;
  text-overflow: ellipsis;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

.product-card-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: auto;
}

.product-price {
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--primary-reverse);
}

body.dark-mode .product-price {
  color: var(--primary-light);
}

.add-to-cart-btn {
  background: var(--input-bg);
  border: 1px solid var(--primary);
  padding: 8px 14px;
  border-radius: 20px;
  cursor: pointer;
  font-family: inherit;
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--primary-reverse);
  display: flex;
  align-items: center;
  gap: 6px;
  width: 100%;
  justify-content: center;
}

body.dark-mode .add-to-cart-btn {
  border-color: var(--primary-dark);
  color: var(--primary-light);
}

.add-to-cart-btn:hover {
  background: var(--primary-reverse);
  color: #ffffff;
  border-color: var(--primary-reverse);
}

body.dark-mode .add-to-cart-btn:hover {
  background: var(--primary);
  color: #2e1233;
  border-color: var(--primary);
}

/* --- SLIDE-OUT CART DRAWER --- */
.cart-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: rgba(0, 0, 0, 0.4);
  backdrop-filter: blur(4px);
  z-index: 1000;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.4s ease;
}

.cart-overlay.open {
  opacity: 1;
  pointer-events: auto;
}

.cart-drawer {
  position: fixed;
  top: 0;
  right: 0;
  width: 100%;
  max-width: 420px;
  height: 100vh;
  background: var(--bg-solid);
  z-index: 1001;
  box-shadow: -10px 0 30px rgba(0,0,0,0.15);
  display: flex;
  flex-direction: column;
  transform: translateX(100%);
  transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

body[dir="rtl"] .cart-drawer {
  right: auto;
  left: 0;
  transform: translateX(-100%);
  box-shadow: 10px 0 30px rgba(0,0,0,0.15);
}

.cart-drawer.open {
  transform: translateX(0);
}

.cart-drawer-header {
  padding: 20px;
  border-bottom: 1px solid var(--card-border);
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.cart-drawer-header h3 {
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--primary-reverse);
}

body.dark-mode .cart-drawer-header h3 {
  color: var(--primary-light);
}

.cart-close-btn {
  background: transparent;
  border: none;
  font-size: 1.25rem;
  cursor: pointer;
  color: var(--text-main);
}

.cart-items-container {
  flex: 1;
  overflow-y: auto;
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 15px;
}

/* Cart Item specs */
.cart-item {
  display: flex;
  gap: 12px;
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  padding: 12px;
  border-radius: 12px;
  align-items: center;
}

.cart-item img {
  width: 65px;
  height: 65px;
  object-fit: cover;
  border-radius: 8px;
}

.cart-item-details {
  flex: 1;
}

.cart-item-details h4 {
  font-size: 0.88rem;
  font-weight: 600;
  margin-bottom: 4px;
}

.cart-item-price {
  font-size: 0.9rem;
  font-weight: 700;
  color: var(--primary-reverse);
  margin-bottom: 8px;
}

body.dark-mode .cart-item-price {
  color: var(--primary-light);
}

.cart-item-qty-ctrl {
  display: flex;
  align-items: center;
  gap: 10px;
  background: var(--input-bg);
  border: 1px solid var(--card-border);
  width: fit-content;
  border-radius: 8px;
  padding: 2px;
}

.qty-btn {
  background: transparent;
  border: none;
  width: 24px;
  height: 24px;
  cursor: pointer;
  color: var(--text-main);
  display: flex;
  align-items: center;
  justify-content: center;
}

.cart-item-qty-ctrl span {
  font-size: 0.85rem;
  font-weight: 600;
}

.cart-item-delete {
  background: transparent;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  font-size: 1.05rem;
  padding: 5px;
}

.cart-item-delete:hover {
  color: var(--danger);
}

/* Cart Summary */
.cart-summary-container {
  padding: 20px;
  border-top: 1px solid var(--card-border);
  background: var(--input-bg);
}

.summary-row {
  display: flex;
  justify-content: space-between;
  margin-bottom: 8px;
  font-size: 0.9rem;
}

.summary-row.total {
  font-weight: 700;
  font-size: 1.1rem;
  border-top: 1px solid var(--card-border);
  padding-top: 10px;
  margin-top: 10px;
}

.checkout-btn {
  background: linear-gradient(135deg, var(--primary-reverse) 0%, #7e4182 100%);
  color: #ffffff;
  border: none;
  width: 100%;
  padding: 14px;
  font-family: inherit;
  font-size: 1rem;
  font-weight: 700;
  cursor: pointer;
  text-align: center;
}

body.dark-mode .checkout-btn {
  background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
  color: #2e1233;
}

.checkout-btn:hover {
  opacity: 0.95;
}

/* --- MODAL DIALOGS (CHECKOUT & SUCCESS) --- */
.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: rgba(0, 0, 0, 0.45);
  backdrop-filter: blur(6px);
  z-index: 1200;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
}

.modal-overlay.open {
  opacity: 1;
  pointer-events: auto;
}

.modal-card {
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  border-radius: 24px;
  width: 100%;
  max-width: 500px;
  padding: 30px;
  box-shadow: var(--shadow);
  position: relative;
  max-height: 90vh;
  overflow-y: auto;
}

.modal-close-btn {
  position: absolute;
  top: 20px;
  right: 20px;
  background: transparent;
  border: none;
  font-size: 1.2rem;
  cursor: pointer;
  color: var(--text-main);
}

body[dir="rtl"] .modal-close-btn {
  right: auto;
  left: 20px;
}

.modal-card h3 {
  font-size: 1.2rem;
  font-weight: 700;
  margin-bottom: 20px;
  color: var(--primary-reverse);
  border-bottom: 1px solid var(--card-border);
  padding-bottom: 10px;
}

body.dark-mode .modal-card h3 {
  color: var(--primary-light);
}

/* Form inputs styling */
.form-group {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-bottom: 15px;
}

.form-group label {
  font-size: 0.88rem;
  font-weight: 600;
}

.input-ctrl {
  background: var(--input-bg);
  border: 1px solid var(--card-border);
  border-radius: 12px;
  padding: 10px 15px;
  font-family: inherit;
  font-size: 0.9rem;
  color: var(--text-main);
  outline: none;
  width: 100%;
}

.input-ctrl:focus {
  border-color: var(--primary-reverse);
}

/* Radio grids */
.pay-methods-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 10px;
}

.pay-radio-card {
  background: var(--input-bg);
  border: 1px solid var(--card-border);
  border-radius: 12px;
  padding: 12px 15px;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 0.88rem;
  font-weight: 600;
}

.pay-radio-card input {
  accent-color: var(--primary-reverse);
}

.checkout-submit-btn {
  background: linear-gradient(135deg, var(--primary-reverse) 0%, #7e4182 100%);
  color: #ffffff;
  border: none;
  border-radius: 30px;
  padding: 12px 25px;
  font-family: inherit;
  font-size: 0.95rem;
  font-weight: 700;
  cursor: pointer;
  width: 100%;
  margin-top: 10px;
  box-shadow: 0 4px 12px rgba(94, 47, 97, 0.2);
}

body.dark-mode .checkout-submit-btn {
  background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
  color: #2e1233;
}

/* --- STORE FOOTER --- */
.store-footer {
  background: var(--card-bg);
  border-top: 1px solid var(--card-border);
  padding: 50px 20px 20px 20px;
}

.footer-container {
  max-width: 1300px;
  margin: 0 auto 30px auto;
  display: grid;
  grid-template-columns: 1fr 2fr;
  gap: 40px;
}

@media (max-width: 768px) {
  .footer-container {
    grid-template-columns: 1fr;
    gap: 30px;
  }
  .footer-contact p {
    white-space: normal; /* Allow text wrapping on mobile devices */
  }
}

.footer-about .logo-area {
  margin-bottom: 15px;
}

.logo-img-footer {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  object-fit: cover;
}

.footer-about p {
  font-size: 0.85rem;
  line-height: 1.6;
  color: var(--text-muted);
}

.footer-contact h3, .footer-payment h3 {
  font-size: 1.05rem;
  font-weight: 700;
  margin-bottom: 15px;
  color: var(--primary-reverse);
}

body.dark-mode .footer-contact h3, body.dark-mode .footer-payment h3 {
  color: var(--primary-light);
}

.footer-contact {
  text-align: start;
}

.footer-contact p {
  font-size: 0.9rem;
  line-height: 1.8;
  margin-bottom: 14px;
  white-space: nowrap; /* Prevent wrapping to a second line on desktop viewports */
}

@media (max-width: 1024px) {
  .footer-contact p {
    white-space: normal; /* Allow text wrapping on mobile/tablet devices */
  }
}

.payment-logos {
  display: flex;
  gap: 8px;
  margin-bottom: 15px;
  flex-wrap: wrap;
}

.payment-logos img {
  height: 24px;
  width: auto;
  background: white;
  border-radius: 4px;
  padding: 2px;
}

.commercial-register-box {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--text-muted);
}

.footer-bottom {
  max-width: 1300px;
  margin: 0 auto;
  border-top: 1px solid var(--card-border);
  padding-top: 20px;
  text-align: center;
  font-size: 0.78rem;
  color: var(--text-muted);
}

/* --- TOAST MESSAGES --- */
.toast-msg {
  position: fixed;
  bottom: 24px;
  right: 24px;
  background: var(--primary-reverse);
  color: #ffffff;
  padding: 12px 24px;
  border-radius: 12px;
  box-shadow: 0 10px 30px rgba(0,0,0,0.15);
  font-size: 0.88rem;
  font-weight: 600;
  z-index: 2000;
  display: flex;
  align-items: center;
  gap: 10px;
  transform: translateY(100px);
  opacity: 0;
  transition: all 0.3s cubic-bezier(0.68, -0.55, 0.265, 1.55);
}

body[dir="rtl"] .toast-msg {
  right: auto;
  left: 24px;
}

.toast-msg.show {
  transform: translateY(0);
  opacity: 1;
}

/* Pulse logo animation */
@keyframes pulse-logo {
  0%, 100% { transform: scale(1); box-shadow: 0 0 0 0 rgba(221, 174, 224, 0.4); }
  50% { transform: scale(1.05); box-shadow: 0 0 0 10px rgba(221, 174, 224, 0); }
}

/* --- RESPONSIVENESS AND SMALL SCREEN --- */
@media (max-width: 768px) {
  body {
    padding-top: calc(var(--announce-height) + var(--header-height));
  }
  
  .header-container {
    padding: 0 12px;
  }
  
  .search-container {
    display: none; /* Hide main search bar in mobile top, show category filter instead */
  }
  
  .brand-text p {
    display: none;
  }
  
  #hero-title {
    font-size: 1.5rem;
    margin-bottom: 12px;
  }
  
  #hero-sub {
    font-size: 0.92rem;
    line-height: 1.7;
    margin-bottom: 20px;
  }
  
  .hero-section {
    height: auto;
    min-height: calc(100vh - var(--announce-height) - var(--header-height));
    padding: 40px 0;
  }
  
  .hero-content {
    padding: 0 20px;
  }
  
  /* Hide text inside lang-btn and theme-btn on mobile to avoid overflow */
  .utility-btn .btn-text {
    display: none;
  }
  .utility-btn {
    padding: 8px 10px;
  }
}

/* ===== WHATSAPP NAV BUTTON ===== */
.nav-whatsapp {
  background: linear-gradient(135deg, #25D366, #128C7E) !important;
  color: #fff !important;
  border-radius: 20px !important;
  padding: 6px 16px !important;
  font-weight: 700 !important;
  transition: transform 0.2s, box-shadow 0.2s !important;
  box-shadow: 0 2px 12px rgba(37, 211, 102, 0.35) !important;
}
.nav-whatsapp:hover {
  transform: scale(1.06) !important;
  box-shadow: 0 4px 20px rgba(37, 211, 102, 0.55) !important;
  color: #fff !important;
}
.nav-whatsapp i { margin-left: 5px; margin-right: 5px; }

/* ===== INSTAGRAM STATS IN FOOTER ===== */
.footer-ig-stats {
  margin-top: 14px;
}
.ig-stat-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--primary-reverse);
  text-decoration: none;
  font-size: 0.9rem;
  background: linear-gradient(135deg, rgba(221,174,224,0.15), rgba(183,136,186,0.1));
  border: 1px solid rgba(221,174,224,0.3);
  border-radius: 30px;
  padding: 8px 16px;
  transition: all 0.2s;
}
.ig-stat-link:hover {
  background: linear-gradient(135deg, #e1306c, #833ab4);
  color: #fff !important;
  border-color: transparent;
  transform: translateY(-2px);
  box-shadow: 0 4px 16px rgba(131,58,180,0.3);
}
.ig-stat-link i { font-size: 1.1rem; }
.ig-sep { opacity: 0.5; }

/* ===== FOOTER ORDER BUTTON ===== */
.footer-order-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: linear-gradient(135deg, #25D366, #128C7E);
  color: #fff;
  padding: 10px 20px;
  border-radius: 25px;
  font-weight: 700;
  font-size: 0.95rem;
  text-decoration: none;
  margin-top: 14px;
  transition: all 0.2s;
  box-shadow: 0 3px 14px rgba(37, 211, 102, 0.4);
}
.footer-order-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 24px rgba(37, 211, 102, 0.6);
  color: #fff;
}

/* ===== ANNOUNCEMENT BAR (Instagram Bio) ===== */
.announce-bar {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: var(--announce-height);
  background: linear-gradient(90deg, var(--primary-reverse) 0%, #8a3d8d 50%, var(--primary-reverse) 100%);
  color: #fff;
  font-size: 0.82rem;
  font-weight: 600;
  display: flex;
  align-items: center;
  overflow: hidden;
  z-index: 1001;
  letter-spacing: 0.01em;
}

.announce-inner {
  display: flex;
  align-items: center;
  flex-wrap: nowrap;
  white-space: nowrap;
  /* Content is IMMEDIATELY visible at t=0 (starts at position 0, not -50%) */
  animation: announce-marquee 22s linear infinite;
}

.announce-track {
  display: inline-flex;
  align-items: center;
  flex-shrink: 0;
  gap: 18px;
  padding: 0 9px;
  white-space: nowrap;
}

/* Single universal animation: scrolls right-to-left (natural Arabic ticker direction)
   - At 0%: Track 1 is at the left edge → IMMEDIATELY VISIBLE
   - At 100%: moved left by 50% (one track width) → Track 2 takes Track 1's place
   - Loop restarts: seamless since Track 1 === Track 2 */
@keyframes announce-marquee {
  0%   { transform: translateX(0); }
  100% { transform: translateX(-50%); }
}

.announce-item {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  white-space: nowrap;
}

.announce-item a {
  color: #ffe9ff;
  text-decoration: none;
  font-weight: 700;
  transition: color 0.2s;
}
.announce-item a:hover { color: #fff; text-decoration: underline; }
.announce-dot {
  opacity: 0.6;
  font-size: 0.9rem;
}
@media (max-width: 600px) {
  .announce-bar {
    font-size: 0.78rem;
  }
  .announce-track {
    gap: 14px;
    padding: 0 7px;
  }
}



/* ===== RESPONSIVE GRID OVERRIDES (MOBILE 2 COLUMNS) ===== */
@media (max-width: 600px) {
  .products-grid {
    grid-template-cols: repeat(2, 1fr) !important;
    gap: 12px !important;
  }
  .product-title {
    font-size: 0.82rem !important;
    height: 36px !important;
  }
  .add-to-cart-btn {
    padding: 6px 10px !important;
    font-size: 0.72rem !important;
  }
}

/* ===== FLOATING WHATSAPP BUTTON ===== */
.whatsapp-float {
  position: fixed;
  bottom: 24px;
  background-color: #25d366;
  color: #ffffff;
  width: 56px;
  height: 56px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.8rem;
  box-shadow: 0 6px 20px rgba(37, 211, 102, 0.4);
  z-index: 1500;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  text-decoration: none;
}
.whatsapp-float:hover {
  transform: scale(1.08);
  box-shadow: 0 8px 24px rgba(37, 211, 102, 0.6);
  color: #ffffff;
}
body.lang-ar .whatsapp-float {
  right: 24px;
  left: auto;
}
body.lang-en .whatsapp-float {
  left: 24px;
  right: auto;
}

/* ===== HIDE SHOPPING BAG HEADER ICON ===== */
#cart-toggle-btn {
  display: none !important;
}
