/* Category Page Styles */

:root {
  --primary: #2563eb;
  --primary-2: #06b6d4;
  --success: #10b981;
  --warning: #f59e0b;
  --danger: #ef4444;
  --text-primary: #0f172a;
  --text-secondary: #64748b;
  --border: #e2e8f0;
  --bg-gray: #f8fafc;
}

body {
  font-family: 'Cairo', sans-serif;
  background: var(--bg-gray);
}

/* Category Hero - Enhanced */
.category-hero {
  position: relative;
  background: linear-gradient(135deg, #1e40af 0%, #2563eb 50%, #06b6d4 100%);
  min-height: 50vh;
  max-height: 50vh;
  height: 50vh;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  color: white;
  overflow: hidden !important;
  padding: 50px 20px;
}

/* Animated background shapes */
.category-hero::before {
  content: '';
  position: absolute;
  top: -50%;
  right: -10%;
  width: 600px;
  height: 600px;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 50%;
  animation: floatHero 20s ease-in-out infinite;
  z-index: 1;
}

.category-hero::after {
  content: '';
  position: absolute;
  bottom: -30%;
  left: -10%;
  width: 500px;
  height: 500px;
  background: rgba(255, 255, 255, 0.08);
  border-radius: 50%;
  animation: floatHero 15s ease-in-out infinite reverse;
  z-index: 1;
}

@keyframes floatHero {

  0%,
  100% {
    transform: translate(0, 0) scale(1);
  }

  50% {
    transform: translate(50px, -50px) scale(1.1);
  }
}


/* Category Icon - Enhanced */
.category-icon {
  width: 60px;
  height: 60px;
  background: rgba(255, 255, 255, 0.15);
  backdrop-filter: blur(10px);
  border: 2px solid rgba(255, 255, 255, 0.2);
  border-radius: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0;
  font-size: 32px;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.1);
  flex-shrink: 0;
  color: white;
}

@keyframes iconPulse {

  0%,
  100% {
    transform: scale(1);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
  }

  50% {
    transform: scale(1.05);
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.2);
  }
}

/* Hero Title - Enhanced */
.category-hero h1 {
  font-size: clamp(22px, 3vw, 32px);
  font-weight: 800;
  margin: 0;
  color: #ffffff;
  text-shadow: 0 2px 20px rgba(0, 0, 0, 0.2);
  letter-spacing: -0.5px;
  line-height: 1.1;
  flex-shrink: 0;
}

.category-hero p {
  font-size: clamp(12px, 1.2vw, 14px);
  margin: 0;
  opacity: 0.9;
  color: #ffffff;
  text-shadow: 0 1px 10px rgba(0, 0, 0, 0.15);
  font-weight: 500;
  max-width: 450px;
  flex-shrink: 0;
  display: none;
}

@media (min-width: 769px) {
  .category-hero p {
    display: block;
  }
}

/* Stats - Enhanced */
.category-stats {
  display: flex;
  justify-content: center;
  gap: 16px;
  flex-wrap: nowrap;
  flex-shrink: 0;
  width: 100%;
  max-width: 100%;
  overflow: hidden;
}

.stat-item {
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 8px;
  padding: 10px 16px;
  background: rgba(255, 255, 255, 0.12);
  backdrop-filter: blur(10px);
  border-radius: 8px;
  border: 1px solid rgba(255, 255, 255, 0.2);
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.1);
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  min-width: 80px;
  flex: 1;
  max-width: 150px;
}

.stat-item:hover {
  transform: translateY(-4px);
  background: rgba(255, 255, 255, 0.18);
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.15);
}

.stat-item i {
  font-size: 18px;
  color: #ffffff;
  opacity: 0.9;
  flex-shrink: 0;
}

.stat-item strong {
  font-size: clamp(18px, 2.2vw, 24px);
  font-weight: 800;
  color: #ffffff;
  text-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
  line-height: 1;
}

.stat-item span {
  font-size: 11px;
  color: #ffffff;
  opacity: 0.9;
  font-weight: 600;
  letter-spacing: 0.2px;
  line-height: 1;
}

/* Main Container */
.category-container {
  max-width: 1400px;
  margin: -40px auto 80px;
  padding: 0 20px;
}

/* Subcategories */
.subcategories {
  margin-bottom: 60px;
}

.subcategories h2 {
  font-size: 28px;
  font-weight: 900;
  color: var(--text-primary);
  margin: 0 0 24px 0;
  display: flex;
  align-items: center;
  gap: 12px;
}

.subcategories h2 i {
  color: var(--primary);
}

.subcategories-grid {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 20px;
}

.subcategory-card {
  background: white;
  border-radius: 12px;
  padding: 24px 16px;
  text-align: center;
  text-decoration: none;
  box-shadow: 0 2px 8px rgba(0, 0, 0, .05);
  transition: all 0.3s;
  border: 2px solid transparent;
}

.subcategory-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 24px rgba(0, 0, 0, .15);
  border-color: var(--primary);
}

.subcategory-icon {
  width: 60px;
  height: 60px;
  background: linear-gradient(135deg, var(--primary) 0%, var(--primary-2) 100%);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 16px;
  font-size: 28px;
  color: white;
}

.subcategory-card h3 {
  font-size: 16px;
  font-weight: 800;
  color: var(--text-primary);
  margin: 0 0 8px 0;
}

.subcategory-card .count {
  font-size: 12px;
  color: var(--text-secondary);
  font-weight: 600;
}

/* Featured Section */
.featured-section {
  margin-bottom: 60px;
}

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

.section-header h2 {
  font-size: 28px;
  font-weight: 900;
  color: var(--text-primary);
  margin: 0;
  display: flex;
  align-items: center;
  gap: 12px;
}

.section-header h2 i {
  color: var(--primary);
}

.btn-view-all {
  /* Match primary CTA buttons used on the homepage */
  padding: 12px 28px;
  background: linear-gradient(135deg, var(--primary) 0%, var(--primary-2) 100%);
  color: #ffffff;
  border: none;
  border-radius: 12px;
  text-decoration: none;
  font-weight: 800;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  box-shadow: 0 8px 24px rgba(37, 99, 235, 0.18);
  transition: transform 0.22s cubic-bezier(0.4, 0, 0.2, 1), box-shadow 0.22s ease, opacity 0.22s ease;
  will-change: transform;
}

.btn-view-all:hover {
  transform: translateY(-3px);
  box-shadow: 0 14px 40px rgba(37, 99, 235, 0.22);
  color: #ffffff;
  opacity: 1;
}

.btn-view-all i {
  transition: transform 0.22s ease;
}

.btn-view-all:hover i {
  transform: translateX(-6px);
}

/* Products Grid */
.products-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 24px;
}

.product-card {
  background: white;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 2px 8px rgba(0, 0, 0, .05);
  transition: all 0.3s;
}

.product-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 24px rgba(0, 0, 0, .15);
}

.product-link {
  text-decoration: none;
  color: inherit;
  display: block;
}

.product-image {
  position: relative;
  width: 100%;
  height: 220px;
  overflow: hidden;
}

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

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

.btn-favorite {
  position: absolute;
  top: 12px;
  left: 12px;
  width: 36px;
  height: 36px;
  background: white;
  border: none;
  border-radius: 50%;
  color: var(--danger);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 2px 8px rgba(0, 0, 0, .15);
  transition: all 0.3s;
  z-index: 2;
}

.btn-favorite:hover {
  transform: scale(1.1);
}

.badge-new,
.badge-featured {
  position: absolute;
  top: 12px;
  right: 12px;
  padding: 6px 12px;
  border-radius: 6px;
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
}

.badge-new {
  background: var(--success);
  color: white;
}

.badge-featured {
  background: var(--warning);
  color: white;
}

.product-info {
  padding: 16px;
}

.product-title {
  font-size: 16px;
  font-weight: 800;
  color: var(--text-primary);
  margin: 0 0 12px 0;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  min-height: 44px;
}

.product-price {
  display: flex;
  align-items: baseline;
  gap: 4px;
  margin-bottom: 12px;
}

.product-price .price {
  font-size: 20px;
  font-weight: 900;
  color: var(--primary);
}

.product-price .currency {
  font-size: 14px;
  font-weight: 600;
  color: var(--text-secondary);
}

.product-meta {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  font-size: 12px;
  color: var(--text-secondary);
  padding-top: 12px;
  border-top: 1px solid var(--border);
}

.product-meta span {
  display: flex;
  align-items: center;
  gap: 4px;
}

/* Brands Section */
.brands-section {
  margin-bottom: 60px;
}

.brands-section h2 {
  font-size: 28px;
  font-weight: 900;
  color: var(--text-primary);
  margin: 0 0 24px 0;
  display: flex;
  align-items: center;
  gap: 12px;
}

.brands-section h2 i {
  color: var(--primary);
}

.brands-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.brand-tag {
  padding: 12px 24px;
  background: white;
  border: 2px solid var(--border);
  border-radius: 10px;
  color: var(--text-primary);
  font-weight: 700;
  font-family: 'Cairo', sans-serif;
  cursor: pointer;
  transition: all 0.3s;
  display: flex;
  align-items: center;
  gap: 8px;
}

.brand-tag:hover {
  border-color: var(--primary);
  color: var(--primary);
  transform: translateY(-2px);
}

.brand-tag.active {
  background: linear-gradient(135deg, var(--primary) 0%, var(--primary-2) 100%);
  color: white;
  border-color: transparent;
}

/* Tips Section */
.tips-section {
  margin-bottom: 60px;
}

.tips-card {
  background: white;
  border-radius: 16px;
  padding: 32px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, .05);
  display: flex;
  gap: 24px;
  align-items: flex-start;
}

.tips-icon {
  width: 64px;
  height: 64px;
  background: linear-gradient(135deg, var(--warning) 0%, #ea580c 100%);
  border-radius: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 32px;
  color: white;
  flex-shrink: 0;
}

.tips-content h3 {
  font-size: 24px;
  font-weight: 900;
  color: var(--text-primary);
  margin: 0 0 16px 0;
}

.tips-content ul {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.tips-content li {
  display: flex;
  align-items: center;
  gap: 12px;
  color: var(--text-primary);
  font-weight: 600;
}

.tips-content li i {
  color: var(--success);
  font-size: 16px;
}

.user-profile-link {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: var(--bg-gray);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--primary);
  transition: all 0.3s;
  text-decoration: none;
}

.user-profile-link:hover {
  background: var(--primary);
  color: white;
  transform: scale(1.05);
}

.footer-modern {
  background: #0f172a;
  color: white;
  margin-top: 0;
}

.main-footer {
  padding: 60px 0 30px;
}

.footer-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 40px;
}

.footer-section h5 {
  font-size: 16px;
  font-weight: 800;
  margin: 0 0 20px 0;
  color: white;
}

.footer-brand .footer-logo {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 16px;
}

.footer-brand .footer-logo i {
  font-size: 28px;
  color: #2563eb;
}

.footer-brand .footer-logo h4 {
  margin: 0;
  font-size: 20px;
  font-weight: 900;
}

.footer-brand p {
  color: #94a3b8;
  line-height: 1.6;
  margin: 0;
}

.footer-section ul {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.footer-section ul li a {
  color: #94a3b8;
  text-decoration: none;
  transition: all 0.3s;
  display: inline-block;
}

.footer-section ul li a:hover {
  color: #2563eb;
  transform: translateX(-4px);
}

.social-links {
  display: flex;
  gap: 12px;
  margin-bottom: 16px;
}

.social-links a {
  width: 40px;
  height: 40px;
  background: rgba(255, 255, 255, .1);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  text-decoration: none;
  transition: all 0.3s;
}

.social-links a:hover {
  background: linear-gradient(135deg, #2563eb 0%, #06b6d4 100%);
  transform: translateY(-2px);
}

.footer-copyright {
  color: #64748b;
  font-size: 14px;
}

.container {
  max-width: 1400px;
  margin: 0 auto;
  padding: 0 20px;
}

/* Responsive */
@media (max-width: 1200px) {
  .subcategories-grid {
    grid-template-columns: repeat(4, 1fr);
  }

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

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

  .category-stats {
    gap: 24px;
  }

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

  .products-grid {
    grid-template-columns: 1fr;
  }

  .tips-card {
    flex-direction: column;
  }

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