@import url("https://fonts.googleapis.com/css2?family=Outfit:wght@300;400;500;600;700&family=Tajawal:wght@300;400;500;700;800&family=IBM+Plex+Mono:wght@400;500&display=swap");

*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }

:root {
  --white: #FFFFFF;
  --black: #111111;
  --gray-light: #F5F5F5;
  --gray-text: #595959;
  --gray-border: #EEEEEE;
  
  --radius-sm: 8px;
  --radius-md: 16px;
  --radius-lg: 24px;
  
  --shadow-soft: 0 10px 40px rgba(0,0,0,0.04);
  --shadow-hover: 0 20px 50px rgba(0,0,0,0.08);

  --font-display: "Outfit", "Tajawal", sans-serif;
  --font-editorial: "Outfit", "Tajawal", sans-serif;
  --font-mono: "IBM Plex Mono", monospace;
  
  --header-height: 80px;
}

html {
  font-size: 14px;
  background: var(--white);
  color: var(--black);
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-editorial);
  background: var(--white);
  color: var(--black);
  line-height: 1.6;
  direction: rtl;
  overflow-x: hidden;
}

/* Utilities */
.container { max-width: 1440px; margin: 0 auto; padding: 0 24px; }
.text-center { text-align: center; }
.d-flex { display: flex; }
.align-center { align-items: center; }
.justify-between { justify-content: space-between; }
.justify-center { justify-content: center; }

/* Top Announcement Bar */
.announcement-bar {
  background: #111111;
  color: #4ade80;
  padding: 8px 0;
  font-size: 0.95rem;
  font-weight: 700;
  overflow: hidden;
  white-space: nowrap;
  position: relative;
  display: block;
}

.announcement-content {
  display: inline-block;
  white-space: nowrap;
  animation: ticker-rtl 20s linear infinite;
  will-change: transform;
}

@keyframes ticker-rtl {
  0% { transform: translateX(-100vw); }
  100% { transform: translateX(100vw); }
}

.announcement-btn {
  background: #4ade80;
  color: #111111;
  padding: 2px 12px;
  border-radius: 20px;
  text-decoration: none;
  font-weight: 900;
  margin: 0 5px;
  display: inline-block;
  transition: all 0.3s ease;
  box-shadow: 0 2px 8px rgba(74, 222, 128, 0.3);
}

.announcement-btn:hover {
  background: #ffffff;
  color: #111111;
  transform: scale(1.05);
}

.announcement-btn.install-btn {
  background: #ffffff;
  color: #111111;
  border: 1px solid #4ade80;
  box-shadow: 0 0 10px rgba(255, 255, 255, 0.2);
  animation: pulse-soft 2s infinite;
}

@keyframes pulse-soft {
  0% { box-shadow: 0 0 0 0 rgba(255,255,255, 0.4); }
  70% { box-shadow: 0 0 0 6px rgba(255,255,255, 0); }
  100% { box-shadow: 0 0 0 0 rgba(255,255,255, 0); }
}

@media (max-width: 768px) {
  .announcement-bar {
    font-size: 0.85rem;
    padding: 6px 0;
  }
}

/* Main Navbar */
.navbar {
  position: sticky;
  top: 0;
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(10px);
  z-index: 1000;
  border-bottom: 1px solid var(--gray-border);
  height: var(--header-height);
  display: flex;
  align-items: center;
}

.navbar .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
}

.navbar-logo {
  font-family: var(--font-display);
  font-size: 1.5rem;
  font-weight: 700;
  letter-spacing: 2px;
  color: var(--black);
  text-decoration: none;
  display: flex;
  flex-direction: column;
  align-items: center;
  line-height: 1;
}

.navbar-logo span { font-size: 0.7rem; font-weight: 400; letter-spacing: 4px; color: var(--gray-text); margin-top: 4px; }

.navbar-links {
  display: flex;
  gap: 32px;
  list-style: none;
}

.navbar-links a {
  text-decoration: none;
  color: var(--gray-text);
  font-weight: 500;
  font-size: 1rem;
  transition: color 0.3s;
}

.navbar-links a:hover, .navbar-links a.active {
  color: var(--black);
}

.navbar-links a.active { border-bottom: 2px solid var(--black); padding-bottom: 4px; }

.navbar-icons { display: flex; gap: 20px; align-items: center; }
.navbar-icons button, .navbar-icons a { background: none; border: none; cursor: pointer; color: var(--black); display: flex; align-items: center; }
.navbar-icons svg { width: 24px; height: 24px; stroke-width: 1.5; }

/* Hero Section */
.hero-section {
  display: flex;
  align-items: flex-end;
  justify-content: center;
  min-height: calc(100vh - var(--header-height));
  position: relative;
  overflow: hidden;
  padding-bottom: 60px;
}

.hero-content {
  position: relative;
  z-index: 2;
  text-align: center;
  width: 100%;
  padding: 0 20px;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.hero-image-wrapper {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 1;
}

.hero-image-wrapper img, .hero-image-wrapper video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: brightness(0.85); /* Slightly darken image so white text is visible */
  transform: scale(1);
}

.hero-title, .hero-subtitle {
  color: #FFFFFF; /* Ensure text is visible over image */
  text-shadow: 0 4px 20px rgba(0,0,0,0.5);
}

.btn-black {
  background: #FFFFFF;
  color: var(--black);
}
.btn-black:hover {
  background: var(--gray-light);
}

.hero-subtitle {
  font-size: 1rem;
  color: #E5E5E5;
  font-weight: 600;
  letter-spacing: 1px;
  margin-bottom: 16px;
  display: block;
}

.hero-title {
  font-size: clamp(3rem, 5vw, 4.5rem);
  font-weight: 800;
  color: var(--black);
  line-height: 1.1;
  margin-bottom: 24px;
}

.btn-black {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: var(--black);
  color: var(--white);
  padding: 16px 36px;
  border-radius: var(--radius-lg);
  font-weight: 700;
  font-size: 1.1rem;
  text-decoration: none;
  border: none;
  cursor: pointer;
  transition: all 0.3s ease;
  box-shadow: 0 10px 20px rgba(0,0,0,0.1);
}

.btn-black:hover { transform: translateY(-3px); box-shadow: 0 15px 30px rgba(0,0,0,0.2); }



/* Features Section */
.features-section { padding: 60px 0; border-bottom: 1px solid var(--gray-border); }
.features-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 24px; }
.feature-item { display: flex; align-items: center; gap: 16px; justify-content: center; }
.feature-icon { width: 48px; height: 48px; background: var(--gray-light); border-radius: 50%; display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.feature-icon svg { width: 24px; height: 24px; stroke: var(--black); stroke-width: 1.5; fill: none; }
.feature-text h4 { font-size: 1.1rem; font-weight: 700; color: var(--black); margin-bottom: 4px; }
.feature-text p { font-size: 0.85rem; color: var(--gray-text); }

/* Section Title */
.section-title { font-size: 2rem; font-weight: 800; color: var(--black); margin-bottom: 40px; text-align: center; position: relative; }
.section-title::after { content: ''; position: absolute; bottom: -12px; left: 50%; transform: translateX(-50%); width: 40px; height: 3px; background: var(--black); }

/* Categories Grid */
.categories-section { padding: 80px 0; }
.categories-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 24px; }
.category-card { background: var(--gray-light); border-radius: var(--radius-md); padding: 30px; text-align: center; text-decoration: none; transition: all 0.3s ease; display: flex; flex-direction: column; align-items: center; }
.category-card:hover { transform: translateY(-5px); box-shadow: var(--shadow-hover); background: var(--white); border: 1px solid var(--gray-border); }
.category-image { width: 150px; height: 150px; object-fit: contain; margin-bottom: 20px; transition: transform 0.3s; mix-blend-mode: multiply; }
.category-card:hover .category-image { transform: scale(1.1); }
.category-title { font-size: 1.25rem; font-weight: 700; color: var(--black); margin-bottom: 8px; }
.category-link { font-size: 0.9rem; color: var(--gray-text); display: flex; align-items: center; gap: 4px; justify-content: center; }

/* Products Grid */
.products-section { padding: 80px 0; background: var(--white); }
.products-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 32px; }
.product-card { background: var(--white); border-radius: var(--radius-md); overflow: hidden; position: relative; transition: all 0.4s ease; border: 1px solid var(--gray-border); }
.product-card:hover { box-shadow: var(--shadow-hover); transform: translateY(-5px); border-color: transparent; }

.product-image-wrap { position: relative; padding-top: 100%; background: var(--gray-light); overflow: hidden; }
.product-image-wrap img { position: absolute; top: 0; left: 0; width: 100%; height: 100%; object-fit: cover; transition: transform 0.6s ease; mix-blend-mode: multiply; padding: 20px; }
.product-card:hover .product-image-wrap img { transform: scale(1.08); }

.product-actions { position: relative; margin-top: 16px; display: flex; gap: 8px; width: 100%; opacity: 1; }

/* Adjust product actions layout on mobile if necessary */
@media (max-width: 768px) {
  .product-actions { flex-direction: column; gap: 8px; margin-top: 12px; }
}

.action-btn { flex: 1; height: 40px; background: var(--white); border-radius: var(--radius-sm); display: flex; align-items: center; justify-content: center; color: var(--black); border: none; cursor: pointer; box-shadow: 0 4px 12px rgba(0,0,0,0.1); transition: all 0.2s; font-size: 0.85rem; font-weight: 700; font-family: var(--font-display); gap: 6px; }
.action-btn:hover { background: var(--black); color: var(--white); }
.action-btn svg { width: 16px; height: 16px; stroke-width: 2; fill: none; stroke: currentColor; }
.action-btn.buy-now { background: linear-gradient(135deg, #16a34a, #4ade80); color: #FFF; border-radius: 50px; box-shadow: inset 0 2px 4px rgba(255,255,255,0.3), 0 4px 12px rgba(22, 163, 74, 0.3); border: none; font-weight: 800; letter-spacing: 0.5px; transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1); }
.action-btn.buy-now:hover { background: linear-gradient(135deg, #15803d, #22c55e); box-shadow: inset 0 2px 4px rgba(255,255,255,0.2), 0 6px 16px rgba(22, 163, 74, 0.4); transform: translateY(-2px); }
.action-btn.buy-now:active { transform: scale(0.95); box-shadow: inset 0 2px 6px rgba(0,0,0,0.2); }

@keyframes sneakerPulse {
  0% { filter: drop-shadow(0 0 2px rgba(74,222,128,0.4)); transform: scale(1); }
  50% { filter: drop-shadow(0 0 10px rgba(74,222,128,0.9)); transform: scale(1.08); }
  100% { filter: drop-shadow(0 0 2px rgba(74,222,128,0.4)); transform: scale(1); }
}
.sneaker-cart-icon.has-items { animation: sneakerPulse 2s infinite cubic-bezier(0.4, 0, 0.2, 1); color: #16a34a; }

.product-info { padding: 24px; text-align: center; }
.product-brand { font-size: 0.8rem; color: var(--gray-text); text-transform: uppercase; letter-spacing: 1px; margin-bottom: 8px; }
.product-title { font-size: 1.1rem; font-weight: 700; color: var(--black); margin-bottom: 12px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.product-price { font-size: 1.25rem; font-weight: 800; color: var(--black); }

/* Sporty Mobile Bottom Navigation */
.mobile-bottom-nav { display: none; position: fixed; bottom: 0; left: 0; right: 0; background: var(--white); border-top: 2px solid #4ade80; box-shadow: 0 -4px 20px rgba(74, 222, 128, 0.15); z-index: 2000; height: 75px; border-radius: 30px 30px 0 0; padding: 0 10px; align-items: center; }
.mobile-nav-item { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px; color: var(--gray-text); text-decoration: none; position: relative; height: 60px; border-radius: 20px; transition: all 0.3s ease; }
.mobile-nav-item svg { width: 24px; height: 24px; stroke-width: 1.5; stroke: currentColor; fill: none; transition: all 0.3s; }
.mobile-nav-item span { font-size: 0.75rem; font-weight: 700; transition: all 0.3s; }
.mobile-nav-item:hover { color: #4ade80; }
.mobile-nav-item.active { color: #16a34a; background: rgba(74, 222, 128, 0.15); box-shadow: inset 0 0 10px rgba(74, 222, 128, 0.05); }
.mobile-nav-item.active svg { stroke-width: 2.5; transform: translateY(-2px); filter: drop-shadow(0 2px 4px rgba(74,222,128,0.4)); }

/* Responsive Design */
@media (max-width: 1024px) {
  .products-grid { grid-template-columns: repeat(3, 1fr); }
  .categories-grid { grid-template-columns: repeat(2, 1fr); }
  .features-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 768px) {
  .navbar { display: none; } /* Hide top nav on mobile to match Android app feel */
  .mobile-bottom-nav { display: flex; }
  
  .hero-section { min-height: 80vh; padding-bottom: 40px; }
  .hero-title { font-size: 2.5rem; }
  
  .products-grid { grid-template-columns: repeat(2, 1fr); gap: 16px; padding: 0 16px; }
  .product-info { padding: 16px 12px; }
  .product-title { font-size: 0.95rem; }
  .product-price { font-size: 1.1rem; }
  .action-btn { width: 100%; height: 36px; font-size: 0.8rem; border-radius: 8px; }
  .action-btn svg { width: 14px; height: 14px; }

  .features-grid { grid-template-columns: 1fr; gap: 20px; padding: 0 20px; }
  .categories-grid { padding: 0 16px; gap: 16px; }
  
  body { padding-bottom: 80px; } /* Space for bottom nav */
}

@media (max-width: 480px) {
  .categories-grid { grid-template-columns: 1fr; }
  .category-image { width: 120px; height: 120px; }
}

/* Animations */
.fade-in-up { opacity: 0; transform: translateY(30px); transition: opacity 0.8s ease-out, transform 0.8s ease-out; }
.fade-in-up.visible { opacity: 1; transform: translateY(0); }
/* Share Modal Styles */
.checkout-modal {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.4);
    backdrop-filter: blur(8px);
    z-index: 10000;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s ease;
}
.checkout-modal.active {
    display: flex;
    opacity: 1;
}
.checkout-modal .modal-content {
    transform: scale(0.95) translateY(20px);
    transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}
.checkout-modal.active .modal-content {
    transform: scale(1) translateY(0);
}
