/*
Theme Name: Tendzd Modern
Theme URI: https://tendzd.com
Description: Modern, trendy marketplace theme for Bahrain - Designed for young shoppers
Author: Tendzd Team
Version: 1.0.0
License: GPL v2
Tags: e-commerce, marketplace, rtl, arabic, modern, trendy
*/

:root {
  --color-primary: #6366f1;
  --color-primary-dark: #4f46e5;
  --color-secondary: #f472b6;
  --color-accent: #22d3ee;
  --color-success: #22c55e;
  --color-warning: #f59e0b;
  --color-error: #ef4444;
  --color-dark: #0f172a;
  --color-gray-900: #1e293b;
  --color-gray-700: #475569;
  --color-gray-500: #94a3b8;
  --color-gray-300: #e2e8f0;
  --color-gray-100: #f8fafc;
  --gradient-primary: linear-gradient(135deg, #6366f1 0%, #8b5cf6 100%);
  --shadow-sm: 0 1px 2px 0 rgba(0,0,0,0.05);
  --shadow-md: 0 4px 6px -1px rgba(0,0,0,0.1);
  --shadow-lg: 0 10px 15px -3px rgba(0,0,0,0.1);
  --shadow-xl: 0 20px 25px -5px rgba(0,0,0,0.1);
  --radius-md: 0.5rem;
  --radius-lg: 0.75rem;
  --radius-xl: 1rem;
  --radius-full: 9999px;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; }

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  line-height: 1.6;
  color: var(--color-gray-900);
  background: var(--color-gray-100);
}

/* Header */
.site-header {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 1000;
  background: rgba(255,255,255,0.9);
  backdrop-filter: blur(20px);
  border-bottom: 1px solid rgba(0,0,0,0.05);
}

.header-inner {
  max-width: 1400px;
  margin: 0 auto;
  padding: 1rem 2rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 2rem;
}

.site-logo {
  font-size: 1.75rem;
  font-weight: 800;
  background: var(--gradient-primary);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  flex-shrink: 0;
}

.search-bar {
  flex: 1;
  max-width: 500px;
  position: relative;
}

.search-bar input {
  width: 100%;
  padding: 0.75rem 1rem 0.75rem 3rem;
  border: 2px solid var(--color-gray-300);
  border-radius: var(--radius-full);
  font-size: 1rem;
  transition: all 0.2s;
}

.search-bar input:focus {
  outline: none;
  border-color: var(--color-primary);
  box-shadow: 0 0 0 4px rgba(99,102,241,0.1);
}

.search-bar button {
  position: absolute;
  left: 1rem;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: none;
  cursor: pointer;
  color: var(--color-gray-500);
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.icon-btn {
  position: relative;
  width: 44px;
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius-full);
  background: var(--color-gray-100);
  transition: all 0.2s;
}

.icon-btn:hover {
  background: var(--color-primary);
  color: white;
  transform: translateY(-2px);
}

.badge {
  position: absolute;
  top: -4px;
  right: -4px;
  width: 20px;
  height: 20px;
  background: var(--gradient-primary);
  color: white;
  font-size: 0.75rem;
  font-weight: 700;
  border-radius: var(--radius-full);
  display: flex;
  align-items: center;
  justify-content: center;
}

.user-menu {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.5rem 1rem;
  border-radius: var(--radius-full);
  background: var(--color-gray-100);
}

.user-avatar {
  width: 32px;
  height: 32px;
  border-radius: var(--radius-full);
  background: var(--gradient-primary);
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-weight: 600;
}

/* Hero */
.hero-section {
  margin-top: 80px;
  padding: 5rem 2rem;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white;
  text-align: center;
}

.hero-content { max-width: 700px; margin: 0 auto; }

.hero-title {
  font-size: clamp(2rem, 5vw, 3.5rem);
  font-weight: 800;
  margin-bottom: 1rem;
}

.hero-subtitle {
  font-size: 1.25rem;
  opacity: 0.9;
  margin-bottom: 2rem;
}

.hero-cta {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 1rem 2.5rem;
  background: white;
  color: var(--color-primary);
  font-weight: 700;
  border-radius: var(--radius-full);
  box-shadow: var(--shadow-lg);
  transition: all 0.2s;
}

.hero-cta:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-xl);
}

/* Categories */
.category-pills {
  padding: 2rem;
  background: white;
}

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

.pills-container {
  display: flex;
  gap: 1rem;
  overflow-x: auto;
  padding: 0.5rem 0;
}

.category-pill {
  flex-shrink: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
  padding: 1rem 1.5rem;
  background: var(--color-gray-100);
  border-radius: var(--radius-xl);
  transition: all 0.2s;
  cursor: pointer;
  min-width: 100px;
}

.category-pill:hover {
  background: var(--color-primary);
  color: white;
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
}

.category-pill img {
  width: 50px;
  height: 50px;
  border-radius: var(--radius-lg);
  object-fit: cover;
}

.category-pill span {
  font-size: 0.875rem;
  font-weight: 600;
}

/* Products */
.products-section { padding: 4rem 2rem; }

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

.section-title {
  font-size: 1.75rem;
  font-weight: 800;
}

.view-all {
  color: var(--color-primary);
  font-weight: 600;
}

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

.product-card {
  background: white;
  border-radius: var(--radius-xl);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  transition: all 0.3s;
}

.product-card:hover {
  transform: translateY(-8px);
  box-shadow: var(--shadow-xl);
}

.product-image {
  position: relative;
  aspect-ratio: 1;
  overflow: hidden;
  background: var(--color-gray-100);
}

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

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

.product-badges {
  position: absolute;
  top: 0.75rem;
  left: 0.75rem;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.badge {
  position: static;
  padding: 0.25rem 0.75rem;
  border-radius: var(--radius-full);
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  width: auto;
  height: auto;
}

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

.product-actions {
  position: absolute;
  top: 0.75rem;
  right: 0.75rem;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  opacity: 0;
  transform: translateX(10px);
  transition: all 0.3s;
}

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

.action-btn {
  width: 36px;
  height: 36px;
  border-radius: var(--radius-full);
  background: white;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: var(--shadow-md);
  border: none;
  cursor: pointer;
}

.action-btn:hover {
  background: var(--color-primary);
  color: white;
}

.product-info { padding: 1.25rem; }

.product-category {
  font-size: 0.75rem;
  color: var(--color-gray-500);
  text-transform: uppercase;
}

.product-title {
  font-size: 1rem;
  font-weight: 600;
  margin: 0.25rem 0;
  line-height: 1.4;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.product-title:hover { color: var(--color-primary); }

.product-rating {
  display: flex;
  align-items: center;
  gap: 0.25rem;
  color: var(--color-warning);
  font-size: 0.875rem;
  margin-bottom: 0.5rem;
}

.product-price {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  flex-wrap: wrap;
}

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

.price-original {
  font-size: 0.875rem;
  color: var(--color-gray-500);
  text-decoration: line-through;
}

.add-to-cart {
  width: 100%;
  margin-top: 1rem;
  padding: 0.75rem;
  background: var(--color-dark);
  color: white;
  font-weight: 600;
  border-radius: var(--radius-lg);
  border: none;
  cursor: pointer;
  transition: all 0.2s;
}

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

/* Flash Sales */
.flash-sales {
  padding: 4rem 2rem;
  background: linear-gradient(135deg, #1e1b4b 0%, #312e81 100%);
  color: white;
}

.flash-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 2rem;
}

.flash-header h2 { color: white; font-size: 2rem; }

.countdown {
  display: flex;
  gap: 0.75rem;
}

.countdown-item {
  background: rgba(255,255,255,0.15);
  padding: 0.75rem 1rem;
  border-radius: var(--radius-lg);
  text-align: center;
  min-width: 60px;
}

.countdown-value {
  font-size: 1.5rem;
  font-weight: 800;
  display: block;
}

.countdown-label {
  font-size: 0.75rem;
  opacity: 0.8;
}

/* Vendors */
.vendors-section {
  padding: 4rem 2rem;
  background: white;
}

.vendors-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 1.5rem;
}

.vendor-card {
  background: white;
  border-radius: var(--radius-xl);
  overflow: hidden;
  box-shadow: var(--shadow-md);
  transition: all 0.3s;
}

.vendor-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-xl);
}

.vendor-banner {
  height: 100px;
  background: var(--gradient-primary);
  position: relative;
}

.vendor-logo {
  position: absolute;
  bottom: -35px;
  left: 1.5rem;
  width: 70px;
  height: 70px;
  border-radius: var(--radius-lg);
  border: 4px solid white;
  background: white;
  overflow: hidden;
}

.vendor-logo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.vendor-info {
  padding: 3rem 1.5rem 1.5rem;
}

.vendor-name {
  font-size: 1.125rem;
  font-weight: 700;
}

.vendor-meta {
  display: flex;
  gap: 1rem;
  color: var(--color-gray-500);
  font-size: 0.875rem;
  margin-top: 0.25rem;
}

/* Footer */
.site-footer {
  background: var(--color-dark);
  color: white;
  padding: 4rem 2rem 2rem;
}

.footer-grid {
  display: grid;
  grid-template-columns: 2fr repeat(3, 1fr);
  gap: 3rem;
  margin-bottom: 3rem;
}

.footer-brand { max-width: 300px; }

.footer-logo {
  font-size: 2rem;
  font-weight: 800;
  background: var(--gradient-primary);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  margin-bottom: 1rem;
}

.footer-desc {
  color: var(--color-gray-500);
  margin-bottom: 1.5rem;
  line-height: 1.7;
}

.social-links {
  display: flex;
  gap: 0.75rem;
}

.social-link {
  width: 44px;
  height: 44px;
  border-radius: var(--radius-full);
  background: rgba(255,255,255,0.1);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s;
}

.social-link:hover {
  background: var(--color-primary);
  transform: translateY(-3px);
}

.footer-column h4 {
  color: white;
  font-size: 1.125rem;
  margin-bottom: 1.25rem;
}

.footer-links {
  list-style: none;
}

.footer-links li {
  margin-bottom: 0.75rem;
}

.footer-links a {
  color: var(--color-gray-500);
  transition: color 0.2s;
}

.footer-links a:hover {
  color: white;
}

.footer-bottom {
  border-top: 1px solid rgba(255,255,255,0.1);
  padding-top: 2rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 1rem;
  color: var(--color-gray-500);
}

/* Responsive */
@media (max-width: 1024px) {
  .search-bar { display: none; }
  .footer-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 768px) {
  .header-inner { padding: 1rem; }
  .hero-section { padding: 3rem 1rem; }
  .products-grid { grid-template-columns: repeat(2, 1fr); gap: 1rem; }
  .footer-grid { grid-template-columns: 1fr; }
  .vendors-grid { grid-template-columns: 1fr; }
}

@media (max-width: 480px) {
  .products-grid { grid-template-columns: 1fr; }
  .user-menu span { display: none; }
}
