/* Bachatexpress - Eco-Friendly Cleaning Products */
/* Blueland-inspired Clean, Fresh Design */

:root {
  --primary-color: #00A6A6;
  --primary-dark: #008585;
  --primary-light: #E6F7F7;
  --secondary-color: #1E3A5F;
  --accent-color: #FFD166;
  --accent-light: #FFF3CD;
  --success-color: #2D9A4E;
  --error-color: #E63946;
  --warning-color: #F4A261;
  
  --text-color: #1A1A2E;
  --text-light: #4A5568;
  --text-muted: #718096;
  
  --bg-color: #FFFFFF;
  --bg-light: #F7FAFA;
  --bg-cream: #FDF8F3;
  --bg-green: #E8F5E9;
  
  --border-color: #E2E8F0;
  --border-light: #F0F4F8;
  
  --shadow-sm: 0 1px 3px rgba(0,0,0,0.08);
  --shadow-md: 0 4px 12px rgba(0,0,0,0.1);
  --shadow-lg: 0 10px 40px rgba(0,0,0,0.12);
  
  --radius: 8px;
  --radius-lg: 16px;
  --radius-full: 50px;
  
  --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --font-serif: 'Playfair Display', Georgia, serif;
  
  --transition: all 0.3s ease;
  --container: 1280px;
}

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

html {
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-sans);
  font-size: 16px;
  line-height: 1.6;
  color: var(--text-color);
  background: var(--bg-color);
}

.container {
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 20px;
}

a {
  text-decoration: none;
  color: inherit;
  transition: var(--transition);
}

button {
  font-family: inherit;
  cursor: pointer;
  border: none;
  background: none;
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

/* Typography */
h1, h2, h3, h4, h5, h6 {
  font-weight: 600;
  line-height: 1.3;
}

/* Header */
.header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  background: var(--bg-color);
  z-index: 1000;
  box-shadow: var(--shadow-sm);
}

.header-top {
  background: var(--primary-color);
  color: white;
  padding: 10px 0;
  font-size: 13px;
  text-align: center;
  font-weight: 500;
}

.header-main {
  padding: 16px 0;
  border-bottom: 1px solid var(--border-light);
}

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

.logo {
  font-size: 28px;
  font-weight: 700;
  color: var(--primary-color);
  letter-spacing: -0.5px;
}

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

.nav-links {
  display: flex;
  gap: 32px;
}

.nav-link {
  font-size: 14px;
  font-weight: 500;
  color: var(--text-light);
  padding: 8px 0;
  position: relative;
}

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

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

.nav-link:hover,
.nav-link.active {
  color: var(--primary-color);
}

.search-bar {
  display: flex;
  align-items: center;
  background: var(--bg-light);
  border-radius: var(--radius-full);
  padding: 8px 16px;
  width: 320px;
}

.search-bar input {
  border: none;
  background: none;
  outline: none;
  font-size: 14px;
  flex: 1;
  padding: 4px;
}

.search-bar button {
  color: var(--text-muted);
  padding: 4px;
}

.search-bar button:hover {
  color: var(--primary-color);
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 16px;
}

.header-action {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 14px;
  color: var(--text-light);
  padding: 8px 12px;
  border-radius: var(--radius);
  transition: var(--transition);
}

.header-action:hover {
  background: var(--bg-light);
  color: var(--primary-color);
}

.cart-icon {
  position: relative;
}

.cart-count {
  position: absolute;
  top: -4px;
  right: -4px;
  background: var(--primary-color);
  color: white;
  font-size: 11px;
  font-weight: 600;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* Hero Section */
.hero {
  padding: 140px 0 80px;
  background: linear-gradient(135deg, var(--primary-light) 0%, var(--bg-green) 100%);
  position: relative;
  overflow: hidden;
}

.hero::before {
  content: '';
  position: absolute;
  top: -50%;
  right: -20%;
  width: 600px;
  height: 600px;
  background: radial-gradient(circle, rgba(0,166,166,0.1) 0%, transparent 70%);
  border-radius: 50%;
}

.hero-content {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 60px;
  align-items: center;
}

.hero-text h1 {
  font-family: var(--font-serif);
  font-size: 52px;
  line-height: 1.2;
  margin-bottom: 24px;
  color: var(--secondary-color);
}

.hero-text h1 span {
  color: var(--primary-color);
}

.hero-text p {
  font-size: 18px;
  color: var(--text-light);
  margin-bottom: 32px;
  max-width: 480px;
}

.hero-btns {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
}

.hero-btn {
  padding: 16px 32px;
  background: var(--primary-color);
  color: white;
  font-weight: 600;
  font-size: 15px;
  border-radius: var(--radius-full);
  transition: var(--transition);
}

.hero-btn:hover {
  background: var(--primary-dark);
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

.hero-btn.secondary {
  background: white;
  color: var(--primary-color);
  border: 2px solid var(--primary-color);
}

.hero-btn.secondary:hover {
  background: var(--primary-light);
}

.hero-image {
  position: relative;
}

.hero-image img {
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
}

.hero-badge {
  position: absolute;
  bottom: -20px;
  left: 20px;
  background: white;
  padding: 16px 24px;
  border-radius: var(--radius);
  box-shadow: var(--shadow-md);
  display: flex;
  align-items: center;
  gap: 12px;
}

.hero-badge-icon {
  width: 48px;
  height: 48px;
  background: var(--bg-green);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 24px;
}

.hero-badge-text strong {
  display: block;
  font-size: 14px;
  color: var(--secondary-color);
}

.hero-badge-text span {
  font-size: 12px;
  color: var(--text-muted);
}

/* Section Styles */
.section {
  padding: 80px 0;
}

.section-title {
  text-align: center;
  margin-bottom: 48px;
}

.section-title h2 {
  font-family: var(--font-serif);
  font-size: 36px;
  color: var(--secondary-color);
  margin-bottom: 12px;
}

.section-title p {
  color: var(--text-muted);
  font-size: 16px;
}

/* Featured Carousel */
.featured-section {
  padding: 80px 0;
  background: var(--bg-light);
}

.carousel-container {
  position: relative;
  overflow: hidden;
}

.carousel-wrapper {
  display: flex;
  transition: transform 0.5s ease;
}

.carousel-item {
  min-width: 100%;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 24px;
  padding: 0 20px;
}

.carousel-btn {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 48px;
  height: 48px;
  background: white;
  border-radius: 50%;
  box-shadow: var(--shadow-md);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  color: var(--text-color);
  z-index: 10;
  transition: var(--transition);
}

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

.carousel-btn.prev { left: 10px; }
.carousel-btn.next { right: 10px; }

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

.product-card {
  background: white;
  border-radius: var(--radius-lg);
  overflow: hidden;
  transition: var(--transition);
  cursor: pointer;
  border: 1px solid var(--border-light);
}

.product-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
  border-color: var(--primary-light);
}

.product-image {
  position: relative;
  aspect-ratio: 1;
  overflow: hidden;
  background: var(--bg-light);
}

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

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

.product-badges {
  position: absolute;
  top: 12px;
  left: 12px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.badge {
  padding: 4px 10px;
  font-size: 11px;
  font-weight: 600;
  border-radius: var(--radius);
  text-transform: uppercase;
}

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

.badge-sale {
  background: var(--accent-color);
  color: var(--secondary-color);
}

.product-actions {
  position: absolute;
  top: 12px;
  right: 12px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  opacity: 0;
  transform: translateX(10px);
  transition: var(--transition);
}

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

.action-btn {
  width: 36px;
  height: 36px;
  background: white;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  color: var(--text-color);
  box-shadow: var(--shadow-sm);
  transition: var(--transition);
}

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

.action-btn.active {
  background: var(--error-color);
  color: white;
}

.product-info {
  padding: 16px;
}

.product-name {
  font-size: 14px;
  font-weight: 500;
  margin-bottom: 8px;
  color: var(--text-color);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.product-price {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 8px;
}

.current-price {
  font-size: 16px;
  font-weight: 600;
  color: var(--primary-color);
}

.original-price {
  font-size: 13px;
  color: var(--text-muted);
  text-decoration: line-through;
}

.product-rating {
  display: flex;
  align-items: center;
  gap: 6px;
}

.stars {
  color: var(--accent-color);
  font-size: 12px;
}

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

/* Categories Grid */
.categories-section {
  padding: 60px 0;
}

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

.category-card {
  background: white;
  border: 1px solid var(--border-light);
  border-radius: var(--radius-lg);
  padding: 24px 16px;
  text-align: center;
  cursor: pointer;
  transition: var(--transition);
}

.category-card:hover {
  border-color: var(--primary-color);
  box-shadow: var(--shadow-md);
  transform: translateY(-2px);
}

.category-icon {
  font-size: 36px;
  margin-bottom: 12px;
}

.category-name {
  font-size: 14px;
  font-weight: 500;
  color: var(--text-color);
}

/* Filter Tabs */
.filter-tabs {
  display: flex;
  gap: 12px;
  margin-bottom: 32px;
  flex-wrap: wrap;
  justify-content: center;
}

.filter-tab {
  padding: 10px 24px;
  background: white;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-full);
  font-size: 14px;
  font-weight: 500;
  color: var(--text-light);
  transition: var(--transition);
}

.filter-tab:hover {
  border-color: var(--primary-color);
  color: var(--primary-color);
}

.filter-tab.active {
  background: var(--primary-color);
  border-color: var(--primary-color);
  color: white;
}

.sort-wrapper {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 24px;
}

.sort-select {
  padding: 10px 16px;
  border: 1px solid var(--border-color);
  border-radius: var(--radius);
  font-size: 14px;
  color: var(--text-color);
  background: white;
  cursor: pointer;
}

/* Trust Section */
.trust-section {
  padding: 60px 0;
  background: var(--bg-green);
}

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

.trust-item {
  text-align: center;
}

.trust-icon {
  font-size: 40px;
  margin-bottom: 16px;
}

.trust-item h4 {
  font-size: 16px;
  font-weight: 600;
  margin-bottom: 8px;
  color: var(--secondary-color);
}

.trust-item p {
  font-size: 13px;
  color: var(--text-light);
}

/* Cart Sidebar */
.cart-sidebar {
  position: fixed;
  top: 0;
  right: -420px;
  width: 420px;
  height: 100vh;
  background: white;
  z-index: 1100;
  display: flex;
  flex-direction: column;
  transition: right 0.3s ease;
  box-shadow: -5px 0 30px rgba(0,0,0,0.1);
}

.cart-sidebar.open {
  right: 0;
}

.cart-header {
  padding: 20px;
  border-bottom: 1px solid var(--border-light);
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.cart-title {
  font-size: 18px;
  font-weight: 600;
}

.close-cart {
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  color: var(--text-muted);
  border-radius: 50%;
  transition: var(--transition);
}

.close-cart:hover {
  background: var(--bg-light);
  color: var(--text-color);
}

.cart-items {
  flex: 1;
  overflow-y: auto;
  padding: 20px;
}

.cart-item {
  display: flex;
  gap: 16px;
  padding: 16px 0;
  border-bottom: 1px solid var(--border-light);
}

.cart-item-image {
  width: 80px;
  height: 80px;
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--bg-light);
  flex-shrink: 0;
}

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

.cart-item-details {
  flex: 1;
}

.cart-item-name {
  font-size: 14px;
  font-weight: 500;
  margin-bottom: 4px;
}

.cart-item-variant {
  font-size: 12px;
  color: var(--text-muted);
  margin-bottom: 8px;
}

.cart-item-price {
  font-size: 14px;
  font-weight: 600;
  color: var(--primary-color);
}

.quantity-control {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 8px;
}

.quantity-btn {
  width: 28px;
  height: 28px;
  border: 1px solid var(--border-color);
  border-radius: var(--radius);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  color: var(--text-color);
  transition: var(--transition);
}

.quantity-btn:hover {
  border-color: var(--primary-color);
  color: var(--primary-color);
}

.quantity-input {
  width: 40px;
  text-align: center;
  font-size: 14px;
  border: none;
  background: none;
}

.cart-footer {
  padding: 20px;
  border-top: 1px solid var(--border-light);
  background: var(--bg-light);
}

.cart-subtotal {
  display: flex;
  justify-content: space-between;
  margin-bottom: 16px;
  font-weight: 500;
}

.checkout-btn {
  width: 100%;
  padding: 14px;
  background: var(--primary-color);
  color: white;
  font-weight: 600;
  font-size: 15px;
  border-radius: var(--radius);
  transition: var(--transition);
}

.checkout-btn:hover {
  background: var(--primary-dark);
}

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

.empty-cart-icon {
  font-size: 48px;
  color: var(--border-color);
  margin-bottom: 16px;
}

.empty-cart h3 {
  font-size: 18px;
  margin-bottom: 8px;
}

.empty-cart p {
  font-size: 14px;
  color: var(--text-muted);
}

/* Overlay */
.overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.5);
  z-index: 1050;
  opacity: 0;
  visibility: hidden;
  transition: var(--transition);
}

.overlay.active {
  opacity: 1;
  visibility: visible;
}

/* Toast */
.toast {
  position: fixed;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%) translateY(100px);
  background: var(--secondary-color);
  color: white;
  padding: 12px 24px;
  border-radius: var(--radius-full);
  font-size: 14px;
  font-weight: 500;
  display: flex;
  align-items: center;
  gap: 8px;
  z-index: 1200;
  opacity: 0;
  transition: var(--transition);
}

.toast.show {
  transform: translateX(-50%) translateY(0);
  opacity: 1;
}

.toast.error {
  background: var(--error-color);
}

/* Footer */
.footer {
  background: var(--secondary-color);
  color: white;
  padding: 60px 0 30px;
}

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

.footer-brand .logo {
  color: white;
  margin-bottom: 16px;
  display: inline-block;
}

.footer-brand .logo span {
  color: var(--primary-light);
}

.footer-desc {
  font-size: 14px;
  color: rgba(255,255,255,0.7);
  margin-bottom: 20px;
}

.footer-title {
  font-size: 14px;
  font-weight: 600;
  margin-bottom: 20px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

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

.footer-links li {
  margin-bottom: 12px;
}

.footer-links a {
  font-size: 14px;
  color: rgba(255,255,255,0.7);
  transition: var(--transition);
}

.footer-links a:hover {
  color: var(--primary-light);
}

.footer-bottom {
  padding-top: 30px;
  border-top: 1px solid rgba(255,255,255,0.1);
  text-align: center;
}

.footer-bottom p {
  font-size: 13px;
  color: rgba(255,255,255,0.5);
}

/* Back to Top */
.back-to-top {
  position: fixed;
  bottom: 24px;
  right: 24px;
  width: 48px;
  height: 48px;
  background: var(--primary-color);
  color: white;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  box-shadow: var(--shadow-md);
  z-index: 900;
  opacity: 0;
  visibility: hidden;
  transition: var(--transition);
}

.back-to-top.visible {
  opacity: 1;
  visibility: visible;
}

.back-to-top:hover {
  background: var(--primary-dark);
  transform: translateY(-2px);
}

/* Responsive */
@media (max-width: 1024px) {
  .hero-content {
    grid-template-columns: 1fr;
    text-align: center;
  }
  
  .hero-text p {
    margin: 0 auto 32px;
  }
  
  .hero-btns {
    justify-content: center;
  }
  
  .products-grid {
    grid-template-columns: repeat(3, 1fr);
  }
  
  .carousel-item {
    grid-template-columns: repeat(3, 1fr);
  }
  
  .footer-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 768px) {
  .nav-links {
    display: none;
  }
  
  .search-bar {
    display: none;
  }
  
  .hero-text h1 {
    font-size: 36px;
  }
  
  .products-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 16px;
  }
  
  .carousel-item {
    grid-template-columns: repeat(2, 1fr);
  }
  
  .categories-grid {
    grid-template-columns: repeat(3, 1fr);
  }
  
  .trust-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 24px;
  }
  
  .cart-sidebar {
    width: 100%;
    right: -100%;
  }
  
  .footer-grid {
    grid-template-columns: 1fr;
    gap: 32px;
  }
}

@media (max-width: 480px) {
  .hero-text h1 {
    font-size: 28px;
  }
  
  .section-title h2 {
    font-size: 28px;
  }
  
  .products-grid {
    grid-template-columns: 1fr;
  }
  
  .carousel-item {
    grid-template-columns: 1fr;
  }
  
  .categories-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  
  .filter-tabs {
    justify-content: flex-start;
    overflow-x: auto;
    padding-bottom: 8px;
  }
}
