/* ============================================
   SEJAHTERA TENDA - MAIN STYLES
   Production Ready CSS
   ============================================ */

/* CSS Variables */
:root {
  /* Colors */
  --primary: #1B4332;
  --primary-dark: #143625;
  --primary-light: #2D6A4F;
  --secondary: #D4A373;
  --secondary-light: #E9C46A;
  --accent: #E07A5F;
  --accent-dark: #D4694F;
  
  /* Text Colors */
  --text: #2D3436;
  --text-light: #636E72;
  --text-muted: #B2BEC3;
  --white: #FFFFFF;
  
  /* Backgrounds */
  --bg-light: #F7F5F3;
  --bg-cream: #FAF9F7;
  --border: #E5E5E5;
  --border-light: #F0F0F0;
  
  /* Status Colors */
  --success: #27AE60;
  --warning: #F39C12;
  --error: #E74C3C;
  --info: #3498DB;
  
  /* Shadows */
  --shadow-sm: 0 2px 4px rgba(0,0,0,0.05);
  --shadow-md: 0 4px 12px rgba(0,0,0,0.08);
  --shadow-lg: 0 8px 24px rgba(0,0,0,0.12);
  --shadow-xl: 0 12px 32px rgba(0,0,0,0.15);
  
  /* Border Radius */
  --radius-sm: 6px;
  --radius-md: 12px;
  --radius-lg: 16px;
  --radius-xl: 24px;
  
  /* Transitions */
  --transition-fast: 0.15s ease;
  --transition-normal: 0.3s ease;
  --transition-slow: 0.5s ease;
  
  /* Layout */
  --container-max: 1280px;
  --navbar-height: 72px;
}

/* Reset & Base */
*, *::before, *::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: 'Segoe UI', system-ui, -apple-system, BlinkMacSystemFont, Roboto, 'Helvetica Neue', Arial, sans-serif;
  color: var(--text);
  line-height: 1.6;
  background: var(--bg-cream);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}

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

a {
  color: inherit;
  text-decoration: none;
}

button {
  font-family: inherit;
  cursor: pointer;
}

/* Container */
.container {
  max-width: var(--container-max);
  margin: 0 auto;
  padding: 0 24px;
}

/* Announcement Bar */
.announcement-bar {
  background: linear-gradient(90deg, var(--primary) 0%, var(--primary-light) 100%);
  color: var(--white);
  text-align: center;
  padding: 10px 16px;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.5px;
  text-transform: uppercase;
}

.announcement-bar span {
  margin: 0 12px;
  opacity: 0.9;
}

/* Navigation */
.navbar {
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(10px);
  box-shadow: var(--shadow-sm);
  position: sticky;
  top: 0;
  z-index: 1000;
  transition: all var(--transition-normal);
}

.navbar.scrolled {
  box-shadow: var(--shadow-md);
}

.nav-container {
  max-width: var(--container-max);
  margin: 0 auto;
  padding: 16px 24px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.logo {
  font-family: Georgia, 'Times New Roman', serif;
  font-size: 26px;
  font-weight: 700;
  color: var(--primary);
  display: flex;
  align-items: center;
  gap: 10px;
  transition: transform var(--transition-fast);
}

.logo:hover {
  transform: scale(1.02);
}

.logo-icon {
  font-size: 28px;
}

.nav-links {
  display: flex;
  gap: 32px;
  list-style: none;
  align-items: center;
}

.nav-links a {
  font-weight: 500;
  font-size: 14px;
  transition: color var(--transition-fast);
  position: relative;
  padding: 8px 0;
}

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

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

.nav-links a:hover::after {
  width: 100%;
}

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

.nav-btn {
  background: none;
  border: none;
  font-size: 20px;
  position: relative;
  padding: 8px;
  border-radius: var(--radius-md);
  transition: all var(--transition-fast);
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
}

.nav-btn:hover {
  background: var(--bg-light);
  transform: translateY(-2px);
}

.cart-count {
  position: absolute;
  top: -2px;
  right: -2px;
  background: var(--accent);
  color: white;
  font-size: 10px;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  animation: pulse 2s infinite;
}

@keyframes pulse {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.1); }
}

.wa-btn {
  background: linear-gradient(135deg, #25D366 0%, #128C7E 100%);
  color: white;
  padding: 10px 18px;
  border-radius: 50px;
  font-size: 13px;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 8px;
  transition: all var(--transition-fast);
  box-shadow: 0 4px 12px rgba(37, 211, 102, 0.3);
}

.wa-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 16px rgba(37, 211, 102, 0.4);
}

.mobile-menu-btn {
  display: none;
  flex-direction: column;
  gap: 5px;
  cursor: pointer;
  padding: 8px;
}

.mobile-menu-btn span {
  width: 24px;
  height: 2px;
  background: var(--text);
  transition: all var(--transition-fast);
}

/* Buttons */
.btn {
  padding: 14px 28px;
  border-radius: var(--radius-md);
  font-weight: 600;
  font-size: 15px;
  transition: all var(--transition-fast);
  display: inline-flex;
  align-items: center;
  gap: 10px;
  border: none;
  position: relative;
  overflow: hidden;
  cursor: pointer;
}

.btn::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.2), transparent);
  transition: left 0.5s;
}

.btn:hover::before {
  left: 100%;
}

.btn-primary {
  background: linear-gradient(135deg, var(--accent) 0%, var(--accent-dark) 100%);
  color: var(--white);
  box-shadow: 0 4px 16px rgba(224, 122, 95, 0.4);
}

.btn-primary:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 24px rgba(224, 122, 95, 0.5);
}

.btn-secondary {
  background: rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(10px);
  color: var(--white);
  border: 2px solid rgba(255, 255, 255, 0.3);
}

.btn-secondary:hover {
  background: rgba(255, 255, 255, 0.2);
  border-color: rgba(255, 255, 255, 0.5);
  transform: translateY(-3px);
}

.btn-outline {
  background: transparent;
  color: var(--primary);
  border: 2px solid var(--primary);
}

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

.btn-large {
  padding: 18px 40px;
  font-size: 16px;
}

.btn-sm {
  padding: 10px 20px;
  font-size: 13px;
}

/* Hero Section */
.hero {
  min-height: 100vh;
  background: linear-gradient(135deg, rgba(27, 67, 50, 0.9) 0%, rgba(45, 106, 79, 0.85) 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  color: var(--white);
  position: relative;
  overflow: hidden;
  padding: 120px 24px 80px;
}

.hero-bg {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-image: url('../images/hero-bg.jpg');
  background-size: cover;
  background-position: center;
  opacity: 0.3;
  z-index: 0;
}

.hero-content {
  max-width: 900px;
  position: relative;
  z-index: 1;
  animation: fadeInUp 1s ease-out;
}

@keyframes fadeInUp {
  from { opacity: 0; transform: translateY(40px); }
  to { opacity: 1; transform: translateY(0); }
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: rgba(255, 255, 255, 0.15);
  backdrop-filter: blur(10px);
  padding: 8px 16px;
  border-radius: 50px;
  font-size: 13px;
  font-weight: 500;
  margin-bottom: 24px;
  border: 1px solid rgba(255, 255, 255, 0.2);
}

.hero h1 {
  font-family: Georgia, 'Times New Roman', serif;
  font-size: 56px;
  font-weight: 700;
  margin-bottom: 24px;
  line-height: 1.15;
  text-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

.hero-subtitle {
  font-size: 20px;
  margin-bottom: 40px;
  opacity: 0.95;
  max-width: 600px;
  margin-left: auto;
  margin-right: auto;
}

.hero-buttons {
  display: flex;
  gap: 16px;
  justify-content: center;
  flex-wrap: wrap;
}

.hero-stats {
  display: flex;
  justify-content: center;
  gap: 48px;
  margin-top: 64px;
  padding-top: 32px;
  border-top: 1px solid rgba(255, 255, 255, 0.2);
}

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

.stat-number {
  font-size: 36px;
  font-weight: 700;
  display: block;
  margin-bottom: 4px;
}

.stat-label {
  font-size: 14px;
  opacity: 0.9;
}

/* Section Styles */
.section {
  padding: 100px 24px;
}

.section-header {
  text-align: center;
  max-width: 700px;
  margin: 0 auto 64px;
}

.section-label {
  display: inline-block;
  background: rgba(27, 67, 50, 0.1);
  color: var(--primary);
  padding: 6px 16px;
  border-radius: 50px;
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 1px;
  margin-bottom: 16px;
}

.section-title {
  font-family: Georgia, 'Times New Roman', serif;
  font-size: 42px;
  color: var(--text);
  margin-bottom: 16px;
  line-height: 1.2;
}

.section-subtitle {
  color: var(--text-light);
  font-size: 17px;
  line-height: 1.7;
}

/* Trust Section */
.trust-section {
  background: var(--white);
  padding: 60px 24px;
  position: relative;
}

.trust-section::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: linear-gradient(90deg, var(--primary) 0%, var(--secondary) 50%, var(--accent) 100%);
}

.trust-container {
  max-width: var(--container-max);
  margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 32px;
}

.trust-item {
  text-align: center;
  padding: 24px;
  border-radius: var(--radius-lg);
  transition: all var(--transition-normal);
}

.trust-item:hover {
  background: var(--bg-light);
  transform: translateY(-4px);
}

.trust-icon {
  font-size: 48px;
  margin-bottom: 16px;
  display: block;
}

.trust-title {
  font-weight: 700;
  color: var(--primary);
  font-size: 15px;
  margin-bottom: 6px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

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

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

.product-card {
  background: var(--white);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-lg);
  overflow: hidden;
  transition: all var(--transition-normal);
  position: relative;
}

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

.product-badge {
  position: absolute;
  top: 16px;
  left: 16px;
  padding: 6px 14px;
  border-radius: 50px;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  z-index: 2;
  box-shadow: 0 2px 8px rgba(0,0,0,0.15);
}

.product-badge.best {
  background: linear-gradient(135deg, #FFD700 0%, #FFA500 100%);
  color: var(--text);
}

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

.product-badge.sale {
  background: var(--error);
  color: var(--white);
}

.product-badge.custom {
  background: linear-gradient(135deg, #9B59B6 0%, #8E44AD 100%);
  color: var(--white);
}

.product-wishlist {
  position: absolute;
  top: 16px;
  right: 16px;
  width: 36px;
  height: 36px;
  background: var(--white);
  border: none;
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  box-shadow: var(--shadow-sm);
  transition: all var(--transition-fast);
  z-index: 2;
}

.product-wishlist:hover {
  background: var(--error);
  color: var(--white);
  transform: scale(1.1);
}

.product-image {
  height: 220px;
  background: var(--bg-light);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  position: relative;
}

.product-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform var(--transition-slow);
}

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

.product-info {
  padding: 20px;
}

.product-rating {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  color: var(--text-light);
  margin-bottom: 10px;
}

.stars {
  color: #FFB800;
  letter-spacing: -2px;
}

.product-name {
  font-weight: 600;
  font-size: 16px;
  margin-bottom: 6px;
  color: var(--text);
  line-height: 1.4;
}

.product-variant {
  font-size: 13px;
  color: var(--text-light);
  margin-bottom: 12px;
}

.product-price-row {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 16px;
  flex-wrap: wrap;
}

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

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

.product-discount {
  background: var(--error);
  color: var(--white);
  padding: 2px 8px;
  border-radius: 4px;
  font-size: 11px;
  font-weight: 600;
}

.btn-add-cart {
  width: 100%;
  padding: 12px;
  background: var(--primary);
  color: var(--white);
  border: none;
  border-radius: var(--radius-md);
  font-weight: 600;
  cursor: pointer;
  transition: all var(--transition-fast);
  font-size: 13px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

.btn-add-cart:hover {
  background: var(--primary-dark);
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(27, 67, 50, 0.3);
}

.btn-add-cart.custom {
  background: linear-gradient(135deg, var(--accent) 0%, var(--accent-dark) 100%);
}

/* Loading Skeleton */
.skeleton {
  background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
  background-size: 200% 100%;
  animation: loading 1.5s infinite;
}

@keyframes loading {
  0% { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}

/* Toast Notification */
.toast {
  position: fixed;
  bottom: 100px;
  left: 50%;
  transform: translateX(-50%) translateY(100px);
  background: var(--text);
  color: white;
  padding: 16px 24px;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-xl);
  opacity: 0;
  transition: all var(--transition-normal);
  z-index: 10000;
  display: flex;
  align-items: center;
  gap: 12px;
  font-weight: 500;
  max-width: 90%;
}

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

/* Responsive */
@media (max-width: 1024px) {
  .hero h1 { font-size: 42px; }
  .section-title { font-size: 36px; }
  .product-grid { grid-template-columns: repeat(3, 1fr); }
  .trust-container { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 768px) {
  .nav-links, .nav-actions .wa-btn { display: none; }
  .mobile-menu-btn { display: flex; }
  
  .hero {
    min-height: auto;
    padding: 100px 20px 60px;
  }
  .hero h1 { font-size: 28px; }
  .hero-subtitle { font-size: 16px; }
  .hero-stats { 
    flex-direction: column; 
    gap: 24px;
    margin-top: 40px;
  }
  
  .section { padding: 60px 20px; }
  .section-title { font-size: 28px; }
  .product-grid { grid-template-columns: repeat(2, 1fr); gap: 16px; }
}

@media (max-width: 480px) {
  .product-grid { grid-template-columns: 1fr; }
  .trust-container { grid-template-columns: 1fr; }
  .hero h1 { font-size: 24px; }
}

/* Utility Classes */
.text-center { text-align: center; }
.text-right { text-align: right; }
.text-primary { color: var(--primary); }
.text-accent { color: var(--accent); }
.bg-light { background: var(--bg-light); }
.bg-white { background: var(--white); }
.d-flex { display: flex; }
.justify-center { justify-content: center; }
.align-center { align-items: center; }
.gap-2 { gap: 8px; }
.gap-4 { gap: 16px; }
.mt-4 { margin-top: 16px; }
.mb-4 { margin-bottom: 16px; }
.p-4 { padding: 16px; }
.hidden { display: none; }
