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

/* ===== CSS Variables ===== */
:root {
  --primary: #1a1a2e;
  --primary-light: #16213e;
  --secondary: #0f3460;
  --accent: #e94560;
  --accent-hover: #d63851;
  --gold: #f5c518;
  --text: #e0e0e0;
  --text-muted: #8892a4;
  --bg: #0a0a1a;
  --card-bg: #141428;
  --card-hover: #1c1c3a;
  --border: #2a2a4a;
  --success: #00c853;
  --sidebar-w: 260px;
  --gradient: linear-gradient(135deg, #e94560, #0f3460);
  --shadow: 0 10px 40px rgba(0,0,0,0.4);
  --shadow-accent: 0 5px 25px rgba(233,69,96,0.3);
  --radius: 16px;
  --radius-sm: 10px;
  --transition: all 0.4s cubic-bezier(.25,.46,.45,.94);
  --font-ar: 'Tajawal', sans-serif;
  --font-en: 'Inter', sans-serif;
}

/* ===== Reset ===== */
*,*::before,*::after { margin:0; padding:0; box-sizing:border-box; }
html { scroll-behavior:smooth; font-size:16px; }
body {
  font-family: var(--font-ar);
  background: var(--bg);
  color: var(--text);
  line-height: 1.7;
  overflow-x: hidden;
  direction: rtl;
}
body[dir="ltr"] { font-family: var(--font-en); direction: ltr; }
a { text-decoration:none; color:inherit; }
img { max-width:100%; display:block; }
ul { list-style:none; }

/* ===== Top Bar ===== */
.topbar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1100;
  padding: 0;
  background: transparent;
  transition: background 0.4s, box-shadow 0.4s, padding 0.4s;
}

.topbar.scrolled {
  background: rgba(10, 10, 26, 0.95);
  backdrop-filter: blur(20px);
  box-shadow: 0 2px 30px rgba(0,0,0,0.5);
}

.topbar-inner {
  max-width: 1400px;
  margin: 0 auto;
  padding: 14px 30px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.topbar-logo {
  font-size: 1.4rem;
  font-weight: 800;
  background: var(--gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  display: flex;
  align-items: center;
  gap: 8px;
}

.topbar-logo i {
  -webkit-text-fill-color: var(--accent);
  font-size: 1.2rem;
}

.topbar-links {
  display: flex;
  align-items: center;
  gap: 8px;
}

.topbar-links a {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 8px 18px;
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--text-muted);
  border-radius: 8px;
  transition: var(--transition);
  position: relative;
}

.topbar-links a:hover,
.topbar-links a.active {
  color: white;
  background: rgba(233,69,96,0.12);
}

.topbar-links a.active::after {
  content: '';
  position: absolute;
  bottom: -2px;
  left: 50%;
  transform: translateX(-50%);
  width: 20px;
  height: 3px;
  background: var(--accent);
  border-radius: 3px;
}

.topbar-links a i {
  font-size: 0.85rem;
}

.topbar-actions {
  display: flex;
  align-items: center;
  gap: 12px;
}

.lang-btn-top {
  display: flex;
  align-items: center;
  gap: 5px;
  background: rgba(255,255,255,0.06);
  border: 1px solid var(--border);
  color: var(--text-muted);
  padding: 6px 14px;
  border-radius: 8px;
  font-family: inherit;
  font-size: 0.82rem;
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition);
}

.lang-btn-top:hover {
  border-color: var(--accent);
  color: var(--accent);
}

.topbar-cart {
  position: relative;
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 10px;
  background: rgba(255,255,255,0.06);
  border: 1px solid var(--border);
  color: var(--text);
  font-size: 1rem;
  transition: var(--transition);
}

.topbar-cart:hover {
  border-color: var(--accent);
  color: var(--accent);
  background: rgba(233,69,96,0.1);
}

.topbar-cart .cart-count {
  position: absolute;
  top: -4px;
  right: -4px;
  background: var(--accent);
  color: white;
  font-size: 0.6rem;
  font-weight: 800;
  width: 18px;
  height: 18px;
  border-radius: 50%;
}

body[dir="ltr"] .topbar-cart .cart-count {
  right: auto;
  left: -4px;
}

/* ===== Dropdown Menu ===== */
.dropdown {
  position: relative;
}

.dropdown-trigger {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 8px 18px;
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--text-muted);
  border-radius: 8px;
  transition: var(--transition);
  cursor: pointer;
}

.dropdown-trigger:hover {
  color: white;
  background: rgba(233,69,96,0.12);
}

.dropdown-arrow {
  font-size: 0.6rem;
  transition: transform 0.3s;
  margin-right: -2px;
  margin-left: 2px;
}

.dropdown:hover .dropdown-arrow {
  transform: rotate(180deg);
}

.dropdown-menu {
  position: absolute;
  top: calc(100% + 10px);
  right: 0;
  min-width: 250px;
  background: var(--primary);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 8px;
  opacity: 0;
  visibility: hidden;
  transform: translateY(10px);
  transition: all 0.3s cubic-bezier(.25,.46,.45,.94);
  box-shadow: 0 15px 40px rgba(0,0,0,0.5);
  z-index: 1200;
}

body[dir="ltr"] .dropdown-menu {
  right: auto;
  left: 0;
}

.dropdown:hover .dropdown-menu {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.dropdown-menu a {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 16px;
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--text-muted);
  border-radius: var(--radius-sm);
  transition: var(--transition);
}

.dropdown-menu a:hover {
  background: rgba(233,69,96,0.1);
  color: white;
  padding-right: 20px;
}

body[dir="ltr"] .dropdown-menu a:hover {
  padding-right: 16px;
  padding-left: 20px;
}

.dropdown-menu a i {
  width: 20px;
  text-align: center;
  font-size: 1rem;
  color: var(--accent);
}

.topbar .menu-toggle {
  display: none;
  background: none;
  border: none;
  color: var(--text);
  font-size: 1.3rem;
  cursor: pointer;
  padding: 6px;
}

/* Hide old mobile header */
.mobile-header { display: none !important; }

/* ===== Scrollbar ===== */
::-webkit-scrollbar { width:6px; }
::-webkit-scrollbar-track { background:var(--primary); }
::-webkit-scrollbar-thumb { background:var(--secondary); border-radius:4px; }
::-webkit-scrollbar-thumb:hover { background:var(--accent); }

/* ===== Layout: Sidebar + Main ===== */
.app-layout {
  display: flex;
  min-height: 100vh;
}

/* ===== Sidebar Toggle Tab ===== */
.sidebar-toggle-tab {
  position: fixed;
  top: 50%;
  right: 0;
  transform: translateY(-50%);
  width: 42px;
  height: 90px;
  background: var(--primary);
  border: 1px solid var(--border);
  border-right: none;
  border-radius: 12px 0 0 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1001;
  cursor: pointer;
  transition: all 0.4s cubic-bezier(.25,.46,.45,.94);
  color: var(--accent);
  font-size: 1.1rem;
}

body[dir="ltr"] .sidebar-toggle-tab {
  right: auto;
  left: 0;
  border-right: 1px solid var(--border);
  border-left: none;
  border-radius: 0 12px 12px 0;
}

.sidebar-toggle-tab:hover {
  width: 48px;
  background: var(--card-hover);
  box-shadow: -5px 0 20px rgba(233,69,96,0.15);
}

body[dir="ltr"] .sidebar-toggle-tab:hover {
  box-shadow: 5px 0 20px rgba(233,69,96,0.15);
}

.sidebar-toggle-tab .tab-icon {
  transition: transform 0.3s;
}

.sidebar-toggle-tab:hover .tab-icon {
  transform: scale(1.15);
}

/* Hide tab when sidebar is open */
.sidebar.open ~ .sidebar-toggle-tab,
.sidebar:hover ~ .sidebar-toggle-tab {
  opacity: 0;
  pointer-events: none;
}

/* ===== Sidebar ===== */
.sidebar {
  position: fixed;
  top: 0;
  right: 0;
  width: var(--sidebar-w);
  height: 100vh;
  background: var(--primary);
  border-left: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  z-index: 1000;
  padding: 30px 0;
  transform: translateX(100%);
  transition: transform 0.4s cubic-bezier(.25,.46,.45,.94), box-shadow 0.4s;
}

.sidebar:hover,
.sidebar.open {
  transform: translateX(0);
  box-shadow: -10px 0 40px rgba(0,0,0,0.5);
}

body[dir="ltr"] .sidebar {
  right: auto;
  left: 0;
  border-left: none;
  border-right: 1px solid var(--border);
  transform: translateX(-100%);
}

body[dir="ltr"] .sidebar:hover,
body[dir="ltr"] .sidebar.open {
  transform: translateX(0);
  box-shadow: 10px 0 40px rgba(0,0,0,0.5);
}

.sidebar-logo {
  text-align: center;
  padding: 0 20px 30px;
  border-bottom: 1px solid var(--border);
}

.sidebar-logo .logo {
  font-size: 1.5rem;
  font-weight: 800;
  background: var(--gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
}

.sidebar-logo .logo i {
  -webkit-text-fill-color: var(--accent);
  font-size: 1.3rem;
}

.sidebar-nav {
  flex: 1;
  padding: 25px 0;
  overflow-y: auto;
}

.sidebar-nav a {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 25px;
  font-size: 0.95rem;
  font-weight: 500;
  color: var(--text-muted);
  transition: var(--transition);
  position: relative;
}

.sidebar-nav a::before {
  content: '';
  position: absolute;
  right: 0;
  top: 50%;
  transform: translateY(-50%);
  width: 3px;
  height: 0;
  background: var(--accent);
  border-radius: 0 3px 3px 0;
  transition: height 0.3s;
}

body[dir="ltr"] .sidebar-nav a::before {
  right: auto;
  left: 0;
  border-radius: 3px 0 0 3px;
}

.sidebar-nav a:hover,
.sidebar-nav a.active {
  color: var(--text);
  background: rgba(233,69,96,0.08);
}

.sidebar-nav a:hover::before,
.sidebar-nav a.active::before {
  height: 60%;
}

.sidebar-nav a i {
  width: 22px;
  text-align: center;
  font-size: 1.1rem;
}

.sidebar-nav .nav-divider {
  height: 1px;
  background: var(--border);
  margin: 15px 20px;
}

/* Sidebar Bottom */
.sidebar-bottom {
  padding: 20px;
  border-top: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.lang-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px;
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--text);
  font-family: inherit;
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition);
}

.lang-btn:hover {
  border-color: var(--accent);
  color: var(--accent);
}

.cart-sidebar-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 12px;
  background: var(--gradient);
  border: none;
  border-radius: var(--radius-sm);
  color: white;
  font-family: inherit;
  font-size: 0.95rem;
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition);
  position: relative;
}

.cart-sidebar-btn:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-accent);
}

.cart-count {
  background: white;
  color: var(--accent);
  font-size: 0.7rem;
  font-weight: 800;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  transform: scale(0);
  transition: transform 0.3s cubic-bezier(.68,-.55,.265,1.55);
}

.cart-count.show { transform: scale(1); }
.cart-count.bump { animation: bump 0.3s; }

@keyframes bump {
  0%,100% { transform:scale(1); }
  50% { transform:scale(1.4); }
}

/* ===== Main Content ===== */
.main-content {
  flex: 1;
  margin-right: 0;
  margin-left: 0;
  min-height: 100vh;
  width: 100%;
  transition: margin 0.4s cubic-bezier(.25,.46,.45,.94);
}

/* ===== Mobile Menu Toggle ===== */
.mobile-header {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: 60px;
  background: rgba(10,10,26,0.95);
  backdrop-filter: blur(20px);
  z-index: 999;
  align-items: center;
  justify-content: space-between;
  padding: 0 20px;
  border-bottom: 1px solid var(--border);
}

.mobile-header .logo {
  font-size: 1.3rem;
  font-weight: 800;
  background: var(--gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.menu-toggle {
  background: none;
  border: none;
  color: var(--text);
  font-size: 1.5rem;
  cursor: pointer;
}

.sidebar-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.6);
  z-index: 999;
}

.sidebar-overlay.open { display: block; }

/* ===== Hero Section - Platform ===== */
.hero {
  position: relative;
  height: 100vh;
  min-height: 600px;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
}

.hero-slideshow {
  background: #000;
}

/* ===== Hero Intro Video ===== */
.hero-video-intro {
  position: absolute;
  inset: 0;
  z-index: 0;
  opacity: 0;
  transition: opacity 0.8s ease;
}

.hero-video-intro.active {
  opacity: 1;
  z-index: 0;
}

/* Hide slides when video is playing */
.hero-slides.hidden {
  opacity: 0;
}

.hero-video-intro video {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* ===== Hero Slideshow ===== */
.hero-slides {
  position: absolute;
  inset: 0;
  z-index: 0;
  transition: opacity 0.8s ease;
}

.hero-slides.hidden {
  opacity: 0;
}

.hero-slide {
  position: absolute;
  inset: 0;
  opacity: 0;
  transition: opacity 1s ease;
}

.hero-slide.active {
  opacity: 1;
}

.hero-slide img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* Overlay - darker on left */
.hero-slide-overlay {
  position: absolute;
  inset: 0;
  z-index: 1;
  background: linear-gradient(
    to left,
    rgba(0,0,0,0.1) 0%,
    rgba(0,0,0,0.3) 50%,
    rgba(0,0,0,0.7) 100%
  );
}

/* Content on left side */
.hero-slide-content {
  position: absolute;
  left: 60px;
  top: 50%;
  transform: translateY(-50%);
  z-index: 3;
  max-width: 480px;
  text-align: left;
  background: rgba(0,0,0,0.45);
  backdrop-filter: blur(12px);
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: 20px;
  padding: 40px 35px;
}

body[dir="ltr"] .hero-slide-content {
  left: auto;
  right: 60px;
  text-align: right;
}

.hero-logo-big {
  font-family: 'Inter', var(--font-ar), sans-serif;
  font-size: clamp(2rem, 4vw, 3rem);
  font-weight: 900;
  color: white;
  letter-spacing: -1px;
  margin-bottom: 15px;
  animation: fadeInUp 0.8s ease 0.2s both;
}

.hero-logo-big span {
  color: var(--accent);
}

.hero-slide-content h1 {
  font-size: clamp(2rem, 4vw, 3.2rem);
  font-weight: 800;
  color: white;
  line-height: 1.2;
  margin-bottom: 15px;
  animation: fadeInUp 0.8s ease 0.4s both;
}

.hero-slide-content h1 span {
  background: var(--gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.hero-slide-content p {
  font-size: 1.05rem;
  color: rgba(255,255,255,0.7);
  line-height: 1.7;
  margin-bottom: 25px;
  animation: fadeInUp 0.8s ease 0.6s both;
}

.btn-hero-shop {
  font-size: 1.1rem;
  padding: 16px 40px;
  animation: fadeInUp 0.8s ease 0.8s both;
}

/* Slide Indicators */
.hero-indicators {
  position: absolute;
  bottom: 80px;
  left: 60px;
  z-index: 5;
  display: flex;
  gap: 8px;
}

.hero-ind {
  width: 30px;
  height: 4px;
  border-radius: 3px;
  background: rgba(255,255,255,0.3);
  cursor: pointer;
  transition: all 0.4s;
}

.hero-ind.active {
  width: 50px;
  background: var(--accent);
}

/* Responsive */
@media (max-width: 768px) {
  .hero-slide-content {
    left: 20px;
    right: 20px;
    max-width: 100%;
    text-align: center;
    top: auto;
    bottom: 120px;
    transform: none;
  }
  .hero-slide-overlay {
    background: linear-gradient(to top, rgba(0,0,0,0.8) 0%, rgba(0,0,0,0.2) 60%, rgba(0,0,0,0.1) 100%);
  }
  .hero-indicators { left: 50%; transform: translateX(-50%); bottom: 90px; }
}

/* (old carousel styles removed) */

/* Each big product */
.hero-big-product {
  flex: 1;
  max-width: 320px;
  text-align: center;
  cursor: pointer;
  transition: transform 0.5s cubic-bezier(.25,.46,.45,.94);
}

/* Hero Banner (full image mode) */
.hero-banner {
  width: 100vw;
  height: 100vh;
  cursor: pointer;
  overflow: hidden;
  animation: heroProductIn 0.6s cubic-bezier(.25,.46,.45,.94) both;
}

.hero-banner img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
}

/* 3 clickable zones over banner */
.banner-zones {
  position: absolute;
  inset: 0;
  display: flex;
}

.banner-zone {
  flex: 1;
  position: relative;
  cursor: pointer;
  transition: all 0.4s;
  border-left: 1px solid rgba(255,255,255,0);
  display: flex;
  align-items: flex-end;
  justify-content: center;
  padding-bottom: 40px;
}

.banner-zone:first-child { border-left: none; }

/* Zone video overlay on hover */
.banner-zone-video {
  position: absolute;
  inset: 0;
  opacity: 0;
  transition: opacity 0.5s;
  z-index: 1;
  overflow: hidden;
}

.banner-zone-video iframe {
  width: 100%;
  height: 100%;
  border: none;
  object-fit: cover;
  pointer-events: none;
}

.banner-zone:hover .banner-zone-video {
  opacity: 1;
}

.banner-zone:hover .banner-zone-label {
  z-index: 2;
}

.banner-zone:hover {
  border-left-color: rgba(255,255,255,0.1);
  transform: scale(1.02);
  z-index: 2;
}

/* Glow line on hover */
.banner-zone::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 10%;
  right: 10%;
  height: 3px;
  background: var(--accent);
  border-radius: 3px;
  transform: scaleX(0);
  transition: transform 0.4s cubic-bezier(.25,.46,.45,.94);
}

.banner-zone:hover::after {
  transform: scaleX(1);
}

/* Label */
.banner-zone-label {
  position: relative;
  z-index: 2;
  text-align: center;
  opacity: 0;
  transform: translateY(15px);
  transition: all 0.4s cubic-bezier(.25,.46,.45,.94);
}

.banner-zone:hover .banner-zone-label {
  opacity: 1;
  transform: translateY(0);
}

.bz-name {
  display: block;
  font-size: 1.1rem;
  font-weight: 700;
  color: white;
  text-shadow: 0 2px 10px rgba(0,0,0,0.6);
  margin-bottom: 4px;
}

.bz-price {
  display: block;
  font-size: 1.3rem;
  font-weight: 800;
  color: var(--accent);
  text-shadow: 0 2px 10px rgba(0,0,0,0.6);
}

.hero-big-product {
  position: relative;
}

.hero-big-product:hover {
  transform: scale(1.08) translateY(-10px);
}

.hero-big-product:hover .hero-big-img img {
  filter: drop-shadow(0 30px 50px rgba(233,69,96,0.25));
}

/* ===== Product Quick Popup ===== */
#floatingPopup {
  position: fixed;
  width: 240px;
  background: rgba(20,20,45,0.95);
  backdrop-filter: blur(20px);
  border: 1px solid rgba(255,255,255,0.12);
  border-radius: 16px;
  padding: 18px;
  opacity: 0;
  visibility: hidden;
  transform: translateX(-15px) scale(0.92);
  transition: opacity 0.3s, transform 0.3s cubic-bezier(.34,1.56,.64,1), visibility 0.3s;
  z-index: 9000;
  pointer-events: auto;
  box-shadow: 0 20px 40px rgba(0,0,0,0.5);
}

#floatingPopup.show {
  opacity: 1;
  visibility: visible;
  transform: translateX(0) scale(1);
}

#floatingPopup:hover {
  opacity: 1;
  visibility: visible;
}

#floatingPopup.light {
  background: rgba(255,255,255,0.95);
  border-color: rgba(0,0,0,0.08);
  box-shadow: 0 20px 40px rgba(0,0,0,0.15);
}
#floatingPopup.light .qp-name { color: #111; }
#floatingPopup.light .qp-spec { color: #555; }
#floatingPopup.light .qp-spec span { color: #222; }

/* Arrow pointing to the side */
#floatingPopup::after {
  content: '';
  position: absolute;
  top: 50%;
  transform: translateY(-50%) rotate(45deg);
  width: 14px;
  height: 14px;
  background: inherit;
}

/* RTL: arrow on left side pointing left */
body[dir="rtl"] #floatingPopup::after {
  left: -8px;
  border-bottom: 1px solid rgba(255,255,255,0.12);
  border-left: 1px solid rgba(255,255,255,0.12);
}

/* LTR: arrow on right side pointing right */
body[dir="ltr"] #floatingPopup::after {
  right: -8px;
  border-top: 1px solid rgba(255,255,255,0.12);
  border-right: 1px solid rgba(255,255,255,0.12);
}

.qp-name {
  font-size: 0.95rem;
  font-weight: 700;
  color: white;
  margin-bottom: 10px;
  padding-bottom: 8px;
  border-bottom: 1px solid rgba(255,255,255,0.1);
}

.qp-specs {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.qp-spec {
  display: flex;
  justify-content: space-between;
  font-size: 0.78rem;
  color: var(--text-muted);
}

.qp-spec span {
  color: white;
  font-weight: 600;
}

.qp-price {
  margin-top: 10px;
  padding-top: 8px;
  border-top: 1px solid rgba(255,255,255,0.1);
  text-align: center;
  font-size: 1.1rem;
  font-weight: 800;
  color: var(--accent);
}

.qp-btn {
  display: block;
  margin-top: 10px;
  padding: 8px;
  background: var(--gradient);
  color: white;
  text-align: center;
  border-radius: 10px;
  font-size: 0.8rem;
  font-weight: 600;
  pointer-events: auto;
}

/* Product card popup width */
.product-card .quick-popup {
  width: 220px;
}

/* ===== Page Transition Overlay ===== */
.page-transition {
  position: fixed;
  inset: 0;
  z-index: 99999;
  pointer-events: all;
  display: flex;
  align-items: center;
  justify-content: center;
}

.page-transition .pt-circle {
  position: absolute;
  border-radius: 50%;
  transform: scale(0);
}

.page-transition .pt-circle.white {
  background: #fff;
  animation: ptExpand 0.5s cubic-bezier(.4,0,.2,1) forwards;
}

.page-transition .pt-circle.black {
  background: #0a0a0a;
  animation: ptExpand 0.5s cubic-bezier(.4,0,.2,1) 0.35s forwards;
}

.page-transition .pt-loader {
  position: relative;
  z-index: 2;
  opacity: 0;
  animation: ptLoaderIn 0.3s ease 0.6s forwards;
}

.page-transition .pt-loader i {
  font-size: 2rem;
  color: var(--accent);
  animation: spin 0.8s linear infinite;
}

.page-transition .pt-product-name {
  position: relative;
  z-index: 2;
  color: white;
  font-size: 1.2rem;
  font-weight: 700;
  margin-top: 15px;
  opacity: 0;
  animation: ptLoaderIn 0.3s ease 0.7s forwards;
  font-family: var(--font-ar);
}

@keyframes ptExpand {
  0% { transform: scale(0); }
  100% { transform: scale(1); }
}

@keyframes ptLoaderIn {
  0% { opacity: 0; transform: translateY(10px); }
  100% { opacity: 1; transform: translateY(0); }
}

.hero-big-img {
  height: clamp(250px, 50vh, 450px);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 20px;
}

.hero-big-img img {
  max-height: 100%;
  max-width: 100%;
  object-fit: contain;
  filter: drop-shadow(0 20px 40px rgba(0,0,0,0.5));
  transition: filter 0.4s, transform 0.4s;
}

.hero-big-name {
  font-size: clamp(1rem, 1.5vw, 1.3rem);
  font-weight: 700;
  color: white;
  margin-bottom: 6px;
  transition: color 0.5s;
}

.hero-big-price {
  font-size: clamp(1.2rem, 1.8vw, 1.6rem);
  font-weight: 800;
  color: var(--accent);
}

/* Product enter animation */
.hero-big-product {
  animation: heroProductIn 0.6s cubic-bezier(.25,.46,.45,.94) both;
}
.hero-big-product:nth-child(1) { animation-delay: 0.1s; }
.hero-big-product:nth-child(2) { animation-delay: 0.25s; }
.hero-big-product:nth-child(3) { animation-delay: 0.4s; }

@keyframes heroProductIn {
  from { opacity: 0; transform: translateY(40px) scale(0.9); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

/* Switching animation */
.hero-products-row.switching .hero-big-product {
  animation: heroProductOut 0.3s ease forwards;
}

@keyframes heroProductOut {
  to { opacity: 0; transform: translateY(30px) scale(0.9); }
}

/* Category title above dots */
.hero-cat-title {
  position: absolute;
  bottom: 85px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 5;
  text-align: center;
  transition: opacity 0.3s;
}

.hero-cat-title h2 {
  font-size: 1.1rem;
  font-weight: 700;
  color: rgba(255,255,255,0.6);
  letter-spacing: 2px;
  text-transform: uppercase;
}

.hero-cat-title h2 span {
  color: var(--accent);
}

/* Dark text mode for white backgrounds */
.hero-3d.light-bg .hero-big-name { color: #111; }
.hero-3d.light-bg .hero-cat-title h2 { color: rgba(0,0,0,0.5); }
.hero-3d.light-bg .hero-cat-title h2 span { color: var(--accent); }
.hero-3d.light-bg .hero-dot { border-color: rgba(0,0,0,0.15); color: #555; }
.hero-3d.light-bg .hero-dot.active { border-color: var(--accent); color: var(--accent); }

/* ===== Dots ===== */
.hero-dots {
  position: absolute;
  bottom: 25px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 5;
  display: flex;
  gap: 15px;
}

.hero-dot {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  padding: 10px 18px;
  border-radius: 14px;
  border: 2px solid rgba(255,255,255,0.12);
  background: rgba(20,20,40,0.5);
  backdrop-filter: blur(10px);
  color: var(--text-muted);
  cursor: pointer;
  transition: all 0.4s;
}

.hero-dot i { font-size: 1.1rem; }
.hero-dot span { font-size: 0.7rem; font-weight: 600; }

.hero-dot:hover {
  border-color: rgba(255,255,255,0.3);
  color: white;
  transform: translateY(-3px);
}

.hero-dot.active {
  border-color: var(--accent);
  background: rgba(233,69,96,0.15);
  color: white;
  box-shadow: 0 0 20px rgba(233,69,96,0.2);
}

/* ===== Responsive Hero ===== */
@media (max-width: 768px) {
  .hero-products-row { flex-direction: column; gap: 15px; }
  .hero-big-img { height: 200px; }
  .hero-big-product { max-width: 200px; }
  .hero-dots { gap: 8px; }
  .hero-dot { padding: 8px 12px; }
  .hero-dot span { display: none; }
  .hero-cat-title { bottom: 75px; }
}

@media (max-width: 480px) {
  .hero-dots { bottom: 12px; }
  .hero-cat-title { bottom: 65px; }
}

/* ===== Hero Dots - Centered Horizontal ===== */
.hero-dots {
  position: absolute;
  bottom: 30px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 5;
  display: flex;
  flex-direction: row;
  gap: 20px;
}

.hero-dot {
  width: 54px;
  height: 54px;
  border-radius: 50%;
  border: 2px solid rgba(255,255,255,0.2);
  background: rgba(20,20,40,0.5);
  backdrop-filter: blur(10px);
  color: var(--text-muted);
  font-size: 1.1rem;
  cursor: pointer;
  transition: all 0.5s cubic-bezier(.25,.46,.45,.94);
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
}

.hero-dot:hover {
  border-color: rgba(255,255,255,0.5);
  color: white;
  transform: scale(1.2);
}

.hero-dot.active {
  border-color: white;
  color: white;
  transform: scale(1.15);
  box-shadow: 0 0 25px rgba(255,255,255,0.2);
}

/* ===== Hero Background Color Transition ===== */
.hero-bg-color {
  position: absolute;
  inset: 0;
  z-index: 0;
  transition: background 0.8s cubic-bezier(.25,.46,.45,.94);
}

/* Expanding circle effect */
.hero-color-circle {
  position: absolute;
  border-radius: 50%;
  transform: translate(-50%, -50%) scale(0);
  z-index: 0;
  pointer-events: none;
  animation: expandCircle 0.8s cubic-bezier(.25,.46,.45,.94) forwards;
}

@keyframes expandCircle {
  0% { transform: translate(-50%, -50%) scale(0); }
  100% { transform: translate(-50%, -50%) scale(1); }
}

/* Hero product transition */
.hero-iphone.switching img {
  animation: productSwitch 0.5s ease;
}

@keyframes productSwitch {
  0% { opacity: 1; transform: scale(1); }
  40% { opacity: 0; transform: scale(0.85) rotate(5deg); }
  60% { opacity: 0; transform: scale(0.85) rotate(-5deg); }
  100% { opacity: 1; transform: scale(1); }
}

.hero-3d-text.switching {
  animation: textSwitch 0.5s ease;
}

@keyframes textSwitch {
  0% { opacity: 1; transform: translateY(0); }
  40% { opacity: 0; transform: translateY(20px); }
  60% { opacity: 0; transform: translateY(-20px); }
  100% { opacity: 1; transform: translateY(0); }
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: rgba(233,69,96,0.15);
  border: 1px solid rgba(233,69,96,0.3);
  padding: 8px 22px;
  border-radius: 30px;
  font-size: 0.85rem;
  color: var(--accent);
  margin-bottom: 25px;
  animation: fadeInUp 0.8s ease;
}

.hero h1 {
  font-size: clamp(2.2rem, 5vw, 3.5rem);
  font-weight: 800;
  line-height: 1.25;
  margin-bottom: 20px;
  animation: fadeInUp 0.8s ease 0.2s both;
}

.hero h1 span {
  background: var(--gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.hero p {
  font-size: 1.1rem;
  color: var(--text-muted);
  margin-bottom: 35px;
  animation: fadeInUp 0.8s ease 0.4s both;
}

.hero-buttons {
  display: flex;
  gap: 15px;
  justify-content: center;
  animation: fadeInUp 0.8s ease 0.6s both;
}

/* ===== Buttons ===== */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 14px 32px;
  border-radius: 12px;
  font-family: inherit;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  border: none;
  transition: var(--transition);
}

.btn-primary {
  background: var(--gradient);
  color: white;
  box-shadow: var(--shadow-accent);
}

.btn-primary:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 35px rgba(233,69,96,0.45);
}

.btn-outline {
  background: transparent;
  color: var(--text);
  border: 2px solid var(--border);
}

.btn-outline:hover {
  border-color: var(--accent);
  color: var(--accent);
  transform: translateY(-3px);
}

/* ===== Category Icons Section ===== */
.categories-section {
  padding: 70px 30px;
  background: var(--primary);
}

.categories-section .section-header {
  text-align: center;
  margin-bottom: 50px;
}

.section-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: rgba(233,69,96,0.1);
  border: 1px solid rgba(233,69,96,0.2);
  padding: 6px 16px;
  border-radius: 20px;
  font-size: 0.8rem;
  color: var(--accent);
  margin-bottom: 15px;
}

.section-header h2 {
  font-size: clamp(1.6rem, 3vw, 2.2rem);
  font-weight: 800;
  margin-bottom: 10px;
}

.section-header p {
  color: var(--text-muted);
  max-width: 500px;
  margin: 0 auto;
  font-size: 0.95rem;
}

.categories-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 20px;
  max-width: 900px;
  margin: 0 auto;
}

.category-card {
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 30px 20px;
  text-align: center;
  cursor: pointer;
  transition: var(--transition);
  text-decoration: none;
  color: inherit;
}

.category-card:hover {
  transform: translateY(-8px);
  border-color: rgba(233,69,96,0.4);
  box-shadow: var(--shadow);
  background: var(--card-hover);
}

.category-card:hover .category-icon,
.category-card.active .category-icon {
  background: var(--accent);
  color: white;
  transform: scale(1.1) rotate(5deg);
}

.category-card.active {
  border-color: var(--accent);
  background: rgba(233,69,96,0.08);
  box-shadow: 0 0 20px rgba(233,69,96,0.2);
}

.category-icon {
  width: 65px;
  height: 65px;
  border-radius: 18px;
  background: rgba(233,69,96,0.12);
  color: var(--accent);
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 15px;
  font-size: 1.5rem;
  transition: var(--transition);
}

.category-card h3 {
  font-size: 0.95rem;
  font-weight: 700;
}

.category-card .count {
  font-size: 0.8rem;
  color: var(--text-muted);
  margin-top: 4px;
}

/* ===== Products Section ===== */
.section {
  padding: 70px 30px;
}

/* ===== Filter Bar ===== */
.filter-bar {
  display: flex;
  gap: 10px;
  overflow-x: auto;
  padding: 0 0 20px;
  margin-bottom: 35px;
  scrollbar-width: none;
  -ms-overflow-style: none;
}

.filter-bar::-webkit-scrollbar { display: none; }

.filter-chip {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 12px 22px;
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: 50px;
  color: var(--text-muted);
  font-family: inherit;
  font-size: 0.88rem;
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
  transition: var(--transition);
  flex-shrink: 0;
}

.filter-chip i {
  font-size: 1rem;
  transition: transform 0.3s;
}

.filter-chip:hover {
  border-color: rgba(233,69,96,0.4);
  color: var(--text);
  background: var(--card-hover);
  transform: translateY(-2px);
}

.filter-chip.active {
  background: var(--gradient);
  border-color: var(--accent);
  color: white;
  box-shadow: var(--shadow-accent);
}

.filter-chip.active i {
  transform: scale(1.15);
}

.filter-chip .chip-count {
  background: rgba(255,255,255,0.15);
  padding: 2px 8px;
  border-radius: 12px;
  font-size: 0.75rem;
  font-weight: 700;
}

.filter-chip.active .chip-count {
  background: rgba(255,255,255,0.25);
}

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

/* ===== Product Card ===== */
.product-card {
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  transition: var(--transition);
  position: relative;
  cursor: pointer;
}

.product-card:hover {
  transform: translateY(-10px);
  border-color: rgba(233,69,96,0.3);
  box-shadow: 0 20px 50px rgba(0,0,0,0.4);
}

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

.product-card:hover .product-actions {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

.product-badge {
  position: absolute;
  top: 15px;
  right: 15px;
  background: var(--accent);
  color: white;
  padding: 5px 14px;
  border-radius: 20px;
  font-size: 0.75rem;
  font-weight: 700;
  z-index: 5;
}

body[dir="ltr"] .product-badge { right:auto; left:15px; }

.product-image {
  position: relative;
  height: 220px;
  overflow: hidden;
  background: var(--primary);
}

.product-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.6s cubic-bezier(.25,.46,.45,.94);
}

.product-actions {
  position: absolute;
  bottom: 15px;
  left: 50%;
  transform: translateX(-50%) translateY(20px);
  display: flex;
  gap: 10px;
  opacity: 0;
  transition: var(--transition);
}

.action-btn {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  background: rgba(10,10,26,0.85);
  backdrop-filter: blur(10px);
  border: 1px solid var(--border);
  color: var(--text);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: var(--transition);
  font-size: 0.95rem;
}

.action-btn:hover {
  background: var(--accent);
  border-color: var(--accent);
  color: white;
  transform: scale(1.1);
}

.product-info { padding: 18px; }

.product-category {
  font-size: 0.8rem;
  color: var(--accent);
  font-weight: 500;
  margin-bottom: 4px;
}

.product-name {
  font-size: 1.05rem;
  font-weight: 700;
  margin-bottom: 8px;
  line-height: 1.4;
}

.product-rating {
  display: flex;
  align-items: center;
  gap: 5px;
  margin-bottom: 10px;
}

.stars { color: var(--gold); font-size:0.8rem; display:flex; gap:2px; }
.rating-text { font-size:0.8rem; color:var(--text-muted); }

.product-price {
  display: flex;
  align-items: center;
  gap: 10px;
}

.current-price {
  font-size: 1.25rem;
  font-weight: 800;
  color: var(--accent);
}

.old-price {
  font-size: 0.85rem;
  color: var(--text-muted);
  text-decoration: line-through;
}

/* ===== Features Section ===== */
.features-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
  gap: 22px;
}

.feature-card {
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 30px 22px;
  text-align: center;
  transition: var(--transition);
}

.feature-card:hover {
  transform: translateY(-8px);
  border-color: rgba(233,69,96,0.3);
  box-shadow: var(--shadow);
}

.feature-icon {
  width: 60px;
  height: 60px;
  border-radius: 18px;
  background: var(--gradient);
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 18px;
  font-size: 1.3rem;
  color: white;
}

.feature-card h3 { font-size:1.05rem; font-weight:700; margin-bottom:8px; }
.feature-card p { font-size:0.85rem; color:var(--text-muted); }

/* ===== Footer ===== */
.footer {
  background: var(--primary);
  padding: 50px 30px 25px;
  border-top: 1px solid var(--border);
}

.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 35px;
  margin-bottom: 35px;
}

.footer-about .logo-text {
  font-size: 1.3rem;
  font-weight: 800;
  background: var(--gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  margin-bottom: 12px;
}

.footer-about p {
  color: var(--text-muted);
  font-size: 0.88rem;
  margin-bottom: 18px;
}

.social-links { display:flex; gap:10px; }

.social-links a {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: var(--card-bg);
  border: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: var(--transition);
}

.social-links a:hover {
  background: var(--accent);
  border-color: var(--accent);
  color: white;
  transform: translateY(-3px);
}

.footer-col h4 {
  font-size: 0.95rem;
  font-weight: 700;
  margin-bottom: 18px;
}

.footer-col ul li { margin-bottom: 8px; }

.footer-col ul li a {
  color: var(--text-muted);
  font-size: 0.88rem;
  transition: var(--transition);
}

.footer-col ul li a:hover {
  color: var(--accent);
}

.footer-bottom {
  border-top: 1px solid var(--border);
  padding-top: 20px;
  text-align: center;
  color: var(--text-muted);
  font-size: 0.82rem;
}

/* ===== Product Detail Page ===== */
.product-detail { padding: 80px 30px 40px; }

.product-detail-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 45px;
  align-items: start;
}

.product-gallery { position: sticky; top: 30px; }

.gallery-main {
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--card-bg);
  border: 1px solid var(--border);
  margin-bottom: 12px;
  cursor: zoom-in;
}

.gallery-main img {
  width: 100%;
  height: 420px;
  object-fit: cover;
  transition: transform 0.5s;
}

.gallery-main:hover img { transform: scale(1.15); }

.gallery-thumbs { display:flex; gap:10px; }

.gallery-thumb {
  width: 75px;
  height: 75px;
  border-radius: var(--radius-sm);
  overflow: hidden;
  border: 2px solid var(--border);
  cursor: pointer;
  transition: var(--transition);
  opacity: 0.6;
}

.gallery-thumb.active,
.gallery-thumb:hover {
  border-color: var(--accent);
  opacity: 1;
}

.gallery-thumb img { width:100%; height:100%; object-fit:cover; }

.product-detail-info { padding: 10px 0; }
.detail-category { color:var(--accent); font-size:0.9rem; font-weight:600; margin-bottom:6px; }
.detail-name { font-size:1.9rem; font-weight:800; line-height:1.3; margin-bottom:12px; }

.detail-rating {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 18px;
}

.detail-price-row {
  display: flex;
  align-items: center;
  gap: 15px;
  margin-bottom: 22px;
}

.detail-price { font-size:2rem; font-weight:800; color:var(--accent); }
.detail-old-price { font-size:1.1rem; color:var(--text-muted); text-decoration:line-through; }

.discount-badge {
  background: rgba(233,69,96,0.15);
  color: var(--accent);
  padding: 4px 12px;
  border-radius: 20px;
  font-size: 0.8rem;
  font-weight: 700;
}

.detail-description {
  color: var(--text-muted);
  font-size: 0.95rem;
  line-height: 1.8;
  margin-bottom: 25px;
  padding-bottom: 22px;
  border-bottom: 1px solid var(--border);
}

.specs-title { font-size:1.05rem; font-weight:700; margin-bottom:12px; }

.specs-table { width:100%; margin-bottom:25px; }
.specs-table tr { border-bottom: 1px solid var(--border); }
.specs-table td { padding:10px 0; font-size:0.9rem; }
.specs-table td:first-child { color:var(--text-muted); width:40%; }

.quantity-row {
  display: flex;
  align-items: center;
  gap: 18px;
  margin-bottom: 22px;
}

.quantity-selector {
  display: flex;
  align-items: center;
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  overflow: hidden;
}

.qty-btn {
  width: 42px;
  height: 42px;
  background: none;
  border: none;
  color: var(--text);
  font-size: 1.2rem;
  cursor: pointer;
  transition: var(--transition);
}

.qty-btn:hover { background: var(--card-hover); }

.qty-value {
  width: 45px;
  text-align: center;
  font-size: 1.05rem;
  font-weight: 700;
  border: none;
  background: none;
  color: var(--text);
}

.detail-buttons {
  display: flex;
  gap: 12px;
  margin-bottom: 25px;
}

.btn-add-cart { flex:1; padding:15px; font-size:1rem; }

.btn-wishlist {
  width: 52px;
  height: 52px;
  border-radius: var(--radius-sm);
  background: var(--card-bg);
  border: 1px solid var(--border);
  color: var(--text);
  font-size: 1.2rem;
  cursor: pointer;
  transition: var(--transition);
  display: flex;
  align-items: center;
  justify-content: center;
}

.btn-wishlist:hover { border-color:var(--accent); color:var(--accent); }

.detail-video {
  margin-top: 25px;
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid var(--border);
}

.detail-video iframe { width:100%; aspect-ratio:16/9; border:none; }

.related-section { margin-top: 70px; }

/* ===== Cart Page ===== */
.cart-page { padding: 80px 30px 40px; min-height: 70vh; }

.cart-grid {
  display: grid;
  grid-template-columns: 1fr 330px;
  gap: 25px;
  align-items: start;
}

.cart-items { display:flex; flex-direction:column; gap:12px; }

.cart-item {
  display: flex;
  gap: 18px;
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 18px;
  transition: var(--transition);
  animation: fadeInUp 0.4s ease;
}

.cart-item:hover { border-color: rgba(233,69,96,0.2); }

.cart-item-image {
  width: 110px;
  height: 110px;
  border-radius: var(--radius-sm);
  overflow: hidden;
  flex-shrink: 0;
}

.cart-item-image img { width:100%; height:100%; object-fit:cover; }

.cart-item-info { flex:1; }
.cart-item-name { font-size:1rem; font-weight:700; margin-bottom:4px; }
.cart-item-category { font-size:0.78rem; color:var(--text-muted); margin-bottom:8px; }
.cart-item-price { font-size:1.1rem; font-weight:800; color:var(--accent); }

.cart-item-actions {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  justify-content: space-between;
}

.remove-btn {
  background: none;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  font-size: 1.1rem;
  transition: var(--transition);
  padding: 5px;
}

.remove-btn:hover { color: var(--accent); }

.cart-summary {
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 28px;
  position: sticky;
  top: 30px;
}

.cart-summary h3 {
  font-size: 1.15rem;
  font-weight: 700;
  margin-bottom: 22px;
  padding-bottom: 14px;
  border-bottom: 1px solid var(--border);
}

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

.summary-row.total {
  font-size: 1.15rem;
  font-weight: 800;
  margin-top: 14px;
  padding-top: 14px;
  border-top: 1px solid var(--border);
  color: var(--accent);
}

.checkout-btn {
  width: 100%;
  margin-top: 18px;
  padding: 15px;
  font-size: 1rem;
  justify-content: center;
}

.cart-empty {
  text-align: center;
  padding: 70px 20px;
}

.cart-empty i { font-size:3.5rem; color:var(--text-muted); margin-bottom:18px; }
.cart-empty h2 { font-size:1.4rem; margin-bottom:8px; }
.cart-empty p { color:var(--text-muted); margin-bottom:22px; }

/* ===== Toast Notification ===== */
.toast {
  position: fixed;
  bottom: 30px;
  left: 30px;
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 14px 22px;
  display: flex;
  align-items: center;
  gap: 12px;
  box-shadow: var(--shadow);
  z-index: 9999;
  transform: translateY(120%);
  transition: transform 0.4s cubic-bezier(.68,-.55,.265,1.55);
}

.toast.show { transform: translateY(0); }

.toast-icon {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: rgba(0,200,83,0.15);
  color: var(--success);
  display: flex;
  align-items: center;
  justify-content: center;
}

.toast-message { font-size:0.88rem; font-weight:500; }

/* ===== Scroll Animations ===== */
.reveal {
  opacity: 0;
  transform: translateY(40px);
  transition: all 0.8s cubic-bezier(.25,.46,.45,.94);
}

.reveal.active { opacity:1; transform:translateY(0); }

.reveal-scale {
  opacity: 0;
  transform: scale(0.85);
  transition: all 0.8s cubic-bezier(.25,.46,.45,.94);
}

.reveal-scale.active { opacity:1; transform:scale(1); }

/* Stagger children */
.stagger > *:nth-child(1) { transition-delay: 0s; }
.stagger > *:nth-child(2) { transition-delay: 0.1s; }
.stagger > *:nth-child(3) { transition-delay: 0.2s; }
.stagger > *:nth-child(4) { transition-delay: 0.3s; }
.stagger > *:nth-child(5) { transition-delay: 0.4s; }
.stagger > *:nth-child(6) { transition-delay: 0.5s; }
.stagger > *:nth-child(7) { transition-delay: 0.6s; }
.stagger > *:nth-child(8) { transition-delay: 0.7s; }

/* ===== Keyframes ===== */
@keyframes fadeInUp {
  from { opacity:0; transform:translateY(30px); }
  to { opacity:1; transform:translateY(0); }
}

@keyframes slideInRight {
  from { transform:translateX(100%); }
  to { transform:translateX(0); }
}

/* ===== Back to Top ===== */
.back-to-top {
  position: fixed;
  bottom: 30px;
  left: 80px;
  width: 45px;
  height: 45px;
  border-radius: 50%;
  background: var(--accent);
  color: white;
  border: none;
  cursor: pointer;
  font-size: 1rem;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 998;
  opacity: 0;
  visibility: hidden;
  transform: translateY(20px);
  transition: var(--transition);
  box-shadow: var(--shadow-accent);
}

.back-to-top.show { opacity:1; visibility:visible; transform:translateY(0); }
.back-to-top:hover { transform:translateY(-3px); }

/* ===== Cinematic Intro ===== */
.intro-overlay {
  position: fixed;
  inset: 0;
  background: #ffffff;
  z-index: 100000;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.intro-overlay.done {
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.4s ease;
}

/* Logo */
.intro-logo {
  display: flex;
  align-items: center;
  gap: 0;
  font-family: 'Inter', var(--font-ar), sans-serif;
  user-select: none;
}

.intro-afkar {
  font-size: clamp(3rem, 10vw, 6rem);
  font-weight: 800;
  color: #111;
  letter-spacing: -2px;
  opacity: 0;
  animation: afkarIn 0.8s cubic-bezier(.25,.46,.45,.94) 0.3s forwards;
}

.intro-plus {
  font-size: clamp(3.5rem, 12vw, 7rem);
  font-weight: 900;
  color: #000;
  opacity: 0;
  display: inline-block;
  animation: plusIn 0.5s cubic-bezier(.34,1.56,.64,1) 1s forwards,
             plusExpand 0.8s cubic-bezier(.4,0,.2,1) 2s forwards;
}

/* ===== Intro Keyframes ===== */

/* AFKAR text slides in */
@keyframes afkarIn {
  0% { opacity: 0; transform: translateX(40px); letter-spacing: 20px; }
  100% { opacity: 1; transform: translateX(0); letter-spacing: -2px; }
}

/* Plus sign pops in */
@keyframes plusIn {
  0% { opacity: 0; transform: scale(0) rotate(-180deg); }
  100% { opacity: 1; transform: scale(1) rotate(0deg); }
}

/* Plus expands to fill screen with black */
@keyframes plusExpand {
  0% {
    transform: scale(1);
    color: #000;
  }
  40% {
    transform: scale(3);
    color: #000;
  }
  100% {
    transform: scale(200);
    color: #000;
  }
}

/* ===== Page Loader (removed, replaced by intro) ===== */
.page-loader { display: none; }

.loader-spinner {
  width: 45px;
  height: 45px;
  border: 4px solid var(--border);
  border-top-color: var(--accent);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

@keyframes spin { to { transform:rotate(360deg); } }

/* ===== Mobile Responsive ===== */
@media (max-width: 992px) {
  .topbar-links { display: none; }
  .topbar .menu-toggle { display: block; }

  .sidebar {
    transform: translateX(100%);
  }

  body[dir="ltr"] .sidebar {
    transform: translateX(-100%);
  }

  .sidebar.open {
    transform: translateX(0);
  }

  .sidebar-toggle-tab { display: none; }

  .main-content {
    margin-right: 0;
  }

  body[dir="ltr"] .main-content {
    margin-left: 0;
  }

  .hero { height: 75vh; }

  .product-detail-grid {
    grid-template-columns: 1fr;
    gap: 25px;
  }

  .product-gallery { position: static; }
  .gallery-main img { height: 320px; }

  .footer-grid { grid-template-columns: 1fr 1fr; }
  .cart-grid { grid-template-columns: 1fr; }
}

@media (max-width: 768px) {
  .hero h1 { font-size: 1.8rem; }

  .hero-buttons { flex-direction: column; align-items: center; }

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

  .categories-grid {
    grid-template-columns: repeat(3, 1fr);
    gap: 12px;
  }

  .footer-grid { grid-template-columns: 1fr; gap: 25px; }

  .detail-name { font-size: 1.4rem; }
  .detail-price { font-size: 1.7rem; }

  .cart-item { flex-direction: column; }
  .cart-item-image { width: 100%; height: 170px; }
  .cart-item-actions { flex-direction: row; align-items: center; }
}

@media (max-width: 480px) {
  .section { padding: 50px 15px; }
  .categories-section { padding: 50px 15px; }

  .products-grid { grid-template-columns: 1fr; }
  .categories-grid { grid-template-columns: repeat(2, 1fr); }

  .gallery-main img { height: 260px; }
  .gallery-thumbs { overflow-x:auto; padding-bottom:5px; }

  .detail-buttons { flex-direction: column; }
  .btn-wishlist { width:100%; height:auto; padding:13px; }
}
