/* Header Marketplace Revamp */
header {
  background-color: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(10px); /* Glassmorphism touch */
  box-shadow: 0 1px 1px rgba(0, 0, 0, 0.05);
  position: sticky;
  top: 0;
  z-index: 1000;
  border-bottom: 1px solid var(--color-border);
}

/* Very top bar for info and links */
.header-top {
  background-color: var(--color-gray-light);
  color: var(--color-text-muted);
  padding: 5px 0;
  font-size: 13px;
  border-bottom: 1px solid var(--color-border);
}

.header-top .container {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.header-top-links {
  display: flex;
  gap: 15px;
  align-items: center;
}

.header-top-links a {
  color: var(--color-text-muted);
}
.header-top-links a:hover {
  color: var(--color-hover);
}

.lang-selector {
  background-color: transparent;
  color: var(--color-text);
  border: none;
  font-size: 13px;
  font-family: var(--font-primary);
  outline: none;
  cursor: pointer;
  font-weight: 500;
}

/* Center main bar with massive search */
.header-main {
  padding: 20px 0;
}

.header-main .container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 30px; /* Space for search bar */
}

.logo {
  font-size: 32px;
  font-weight: 800;
  color: var(--color-primary);
  letter-spacing: -1px;
  flex-shrink: 0;
}

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

.search-container {
  flex-grow: 1;
  display: flex;
  position: relative;
  max-width: 600px;
}

.search-container input {
  width: 100%;
  padding: 12px 20px 12px 45px;
  border: 2px solid var(--color-border);
  border-radius: 8px;
  font-size: 15px;
  background-color: var(--color-gray-light);
  transition: var(--transition);
}

.search-container input:focus {
  outline: none;
  border-color: var(--color-primary);
  background-color: var(--color-white);
}

.search-container i {
  position: absolute;
  left: 15px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--color-text-muted);
  font-size: 16px;
}

.search-container button {
  position: absolute;
  right: 5px;
  top: 5px;
  bottom: 5px;
  background-color: var(--color-primary);
  color: var(--color-white);
  border: none;
  border-radius: 6px;
  padding: 0 20px;
  cursor: pointer;
  font-weight: 600;
  transition: var(--transition);
}

.search-container button:hover {
  background-color: var(--color-accent);
  color: var(--color-primary);
}

/* Main actions (User, Cart) */
.header-actions {
  display: flex;
  align-items: center;
  gap: 20px;
  flex-shrink: 0;
}

.action-btn {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--color-text);
  font-weight: 500;
  text-decoration: none;
  transition: var(--transition);
  padding: 8px 12px;
  border-radius: 8px;
}

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

.action-btn i {
  font-size: 20px;
  color: var(--color-primary);
}

.cart-icon {
  position: relative;
}

.cart-counter {
  position: absolute;
  top: -5px;
  left: -5px;
  background-color: var(--color-accent);
  color: var(--color-primary);
  font-size: 11px;
  font-weight: bold;
  height: 18px;
  width: 18px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 2px solid var(--color-white);
}

/* Bottom bar - Navigation categories (Trendyol style mega nav) */
.header-nav {
  border-top: 1px solid var(--color-border);
  background-color: var(--color-white);
}

.header-nav ul {
  display: flex;
  gap: 30px;
  overflow-x: auto;
  scrollbar-width: none; /* Firefox */
}
.header-nav ul::-webkit-scrollbar {
  display: none; /* Chrome */
}

.header-nav a {
  font-weight: 600;
  color: var(--color-text);
  font-size: 14px;
  padding: 15px 0;
  display: block;
  white-space: nowrap;
  position: relative;
}

.header-nav a::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 0;
  height: 3px;
  background-color: var(--color-primary);
  transition: var(--transition);
}

.header-nav a:hover {
  color: var(--color-primary);
}

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


/* Product Card Redesign (Trendyol style) */
.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 15px; /* Tighter gap */
}

.product-card {
  display: flex;
  flex-direction: column;
  background: var(--color-white);
  border-radius: 6px;
  overflow: hidden;
  border: 1px solid var(--color-border);
  transition: var(--transition);
  position: relative;
}

.product-card:hover {
  box-shadow: 0 4px 15px rgba(0,0,0,0.08);
  border-color: #dcdcdc;
  transform: translateY(-2px);
}

.product-img {
  position: relative;
  aspect-ratio: 3/4; /* Taller lifestyle images */
  overflow: hidden;
  background-color: var(--color-gray-light);
}

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

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

.product-badge {
  position: absolute;
  top: 10px;
  left: 10px;
  background-color: #f27a1a; /* Trendyol Orange vibe for discounts */
  color: white;
  padding: 4px 8px;
  font-size: 12px;
  font-weight: bold;
  border-radius: 4px;
  z-index: 2;
}

.product-info {
  padding: 12px;
  display: flex;
  flex-direction: column;
  flex-grow: 1;
}

.product-brand {
  font-size: 13px;
  font-weight: 700;
  color: var(--color-text);
  margin-bottom: 2px;
}

.product-title {
  font-size: 13px;
  color: var(--color-text-muted);
  line-height: 1.4;
  line-clamp: 2;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  display: -webkit-box;
  overflow: hidden;
  margin-bottom: 8px;
  flex-grow: 1;
}

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

.stars i {
  color: #f2c94c; /* Gold */
  font-size: 12px;
}

.review-count {
  font-size: 11px;
  color: var(--color-text-muted);
}

.product-price {
  font-size: 18px;
  font-weight: 700;
  color: #f27a1a; /* Marketplace style price color */
}

.product-price .original-price {
  text-decoration: line-through;
  color: #999;
  font-size: 13px;
  margin-right: 5px;
  font-weight: 400;
}

/* Category Bubble Slider Styling */
.category-bubble-slider {
  display: flex;
  gap: 20px;
  overflow-x: auto;
  padding: 20px 0;
  scrollbar-width: none;
}
.category-bubble-slider::-webkit-scrollbar {
  display: none;
}

.category-bubble {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
  width: 90px;
  cursor: pointer;
  transition: var(--transition);
}

.category-bubble:hover .bubble-img {
  border-color: var(--color-primary);
  transform: scale(1.05);
}

.bubble-img {
  width: 70px;
  height: 70px;
  border-radius: 50%;
  border: 2px solid var(--color-border);
  overflow: hidden;
  background-color: var(--color-white);
  display: flex;
  justify-content: center;
  align-items: center;
  font-size: 24px;
  color: var(--color-primary);
  transition: var(--transition);
}

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

.bubble-text {
  font-size: 12px;
  text-align: center;
  color: var(--color-text);
  font-weight: 500;
  line-height: 1.2;
}

/* Footer (Same design roughly, ensure colors match) */
footer {
  background-color: #fafafa;
  color: var(--color-text-muted);
  padding: 60px 0 20px;
  margin-top: 60px;
  border-top: 1px solid var(--color-border);
}

.footer-col h3 {
  color: var(--color-primary);
  font-size: 16px;
  margin-bottom: 20px;
}

.footer-col ul a {
  color: var(--color-text-muted);
  font-size: 14px;
}

.footer-col ul a:hover {
  color: var(--color-primary);
  text-decoration: underline;
}

.social-icons a {
  background-color: #eee;
  color: var(--color-text);
}
.social-icons a:hover {
  background-color: var(--color-primary);
  color: var(--color-white);
}

/* Mobile Bottom Navigation (Trendyol Style) */
.mobile-bottom-nav {
  display: none;
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  background: white;
  height: 60px;
  box-shadow: 0 -2px 10px rgba(0,0,0,0.05);
  z-index: 1001;
  border-top: 1px solid var(--color-border);
}

.mobile-bottom-nav ul {
  display: flex;
  height: 100%;
  padding: 0;
  margin: 0;
}

.mobile-bottom-nav li {
  flex: 1;
}

.mobile-bottom-nav a {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  height: 100%;
  color: var(--color-text-muted);
  font-size: 10px;
  gap: 4px;
}

.mobile-bottom-nav i {
  font-size: 20px;
}

.mobile-bottom-nav a.active {
  color: var(--color-primary);
}

.cart-badge-mobile {
  position: absolute;
  top: 8px;
  right: 25%;
  background: var(--color-primary);
  color: white;
  font-size: 10px;
  padding: 2px 5px;
  border-radius: 10px;
  font-weight: bold;
}

/* Responsive */
.mobile-menu-toggle {
  display: none;
  font-size: 24px;
  background: none;
  border: none;
  color: var(--color-primary);
  cursor: pointer;
}

@media (max-width: 900px) {
  .header-top { display: none; } /* Hide top bar on mobile */
  
  .header-main .container {
    flex-wrap: wrap;
    gap: 15px;
    padding: 10px 15px;
  }
  
  .logo { font-size: 24px; }
  
  .header-actions .action-btn span { display: none; } /* Hide labels on mobile header, keep icons */
  .header-actions { gap: 15px; }

  .search-container {
    order: 3;
    max-width: 100%;
    margin-top: 5px;
  }
  
  .search-container input { padding: 10px 15px 10px 40px; }
  .search-container button { display: none; } /* Hide button, use icon only for mobile search */

/* Auth & User Dropdown */
.action-btn { position: relative; }
.user-dropdown {
    position: absolute;
    top: 100%;
    right: 0;
    background: white;
    box-shadow: 0 10px 25px rgba(0,0,0,0.1);
    border-radius: 8px;
    padding: 10px 0;
    min-width: 150px;
    display: none;
    z-index: 1001;
    border: 1px solid var(--color-border);
}
.action-btn.user-logged-in:hover .user-dropdown {
    display: block;
}
.user-dropdown a {
    display: block;
    padding: 10px 20px;
    color: var(--color-text);
    text-decoration: none;
    font-size: 14px;
    transition: var(--transition);
}
.user-dropdown a:hover {
    background: #f8f9fa;
    color: var(--color-primary);
}

/* Mobile Bottom Nav Auth */
.mobile-bottom-nav ul li a i { font-size: 20px; }
.mobile-bottom-nav ul li a span { font-size: 11px; margin-top: 4px; }



/* Product Badge Enhancements */
.badge-basket {
    background: #FF5722; /* More intense orange for basket discounts */
    color: white;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 11px;
    font-weight: 700;
    margin-top: 5px;
    display: inline-block;
    animation: pulse-orange 2s infinite;
}
@keyframes pulse-orange {
    0% { transform: scale(1); }
    50% { transform: scale(1.05); }
    100% { transform: scale(1); }
}

/* Color Swatches */
.swatch-group { display: flex; gap: 8px; margin-top: 10px; flex-wrap: wrap; }
.swatch {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    border: 2px solid #ddd;
    cursor: pointer;
    transition: var(--transition);
    position: relative;
}
.swatch:hover { transform: scale(1.1); }
.swatch.active { border-color: var(--color-primary); box-shadow: 0 0 5px rgba(0,0,0,0.2); }



@media (max-width: 900px) {
    .header-main .search-container {
        margin: 10px 0;
        width: 100%;
        order: 3;
    }
    .header-main .container {
        flex-wrap: wrap;
    }
    .header-actions {
        order: 2;
    }
    .logo {
        order: 1;
    }
}
  .header-nav { display: none; } /* Hide categories top nav on mobile, use bottom nav or bubble icons */
  
  .mobile-bottom-nav { display: block; } /* Show bottom navigation */
  
  .section-padding { padding: 25px 0; }
  
  .card-grid {
    grid-template-columns: repeat(2, 1fr); /* 2 columns on mobile */
    gap: 10px;
  }
  
  .product-img { aspect-ratio: 1/1; }
  
  .banner-slider { flex-direction: column; }
  .main-banner { padding: 20px; }
  .main-banner h2 { font-size: 24px; }
  
  /* Add padding at bottom so nav doesn't cover content */
  body { padding-bottom: 70px; }
}
