/* Pasar Desa Online - Custom Stylesheet */
@import url('https://fonts.googleapis.com/css2?family=Outfit:wght@300;400;500;600;700;800&display=swap');

:root {
  --color-primary-dark: #0f5132;    /* Hijau Tua (Pertanian) */
  --color-primary-medium: #198754;  /* Hijau Sedang */
  --color-primary-light: #2ec4b6;   /* Hijau Toska / Aksen */
  --color-bg-light: #f4f9f6;        /* Hijau Abu-Abu Sangat Muda */
  --color-accent: #fd7e14;          /* Oranye (Tombol Penting) */
  --color-accent-hover: #e0690f;
  --color-accent-yellow: #ffc107;   /* Kuning (Peringatan / Stok) */
  --color-border: #dee2e6;
  --color-text-dark: #212529;
  --color-text-muted: #6c757d;
  --font-main: 'Outfit', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  --border-radius-sm: 8px;
  --border-radius-md: 16px;
  --border-radius-lg: 24px;
  --shadow-sm: 0 2px 4px rgba(15, 81, 50, 0.04);
  --shadow-md: 0 8px 16px rgba(15, 81, 50, 0.08);
  --shadow-lg: 0 16px 32px rgba(15, 81, 50, 0.12);
  --transition-smooth: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

body {
  font-family: var(--font-main);
  background-color: #ffffff;
  color: var(--color-text-dark);
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

/* Typography Customizations */
h1, h2, h3, h4, h5, h6 {
  font-weight: 700;
  color: var(--color-primary-dark);
}

/* Navbar Custom Styling */
.navbar-custom {
  background-color: var(--color-primary-dark);
  box-shadow: var(--shadow-md);
  padding: 12px 0;
  transition: var(--transition-smooth);
}

.navbar-custom .navbar-brand {
  font-weight: 800;
  font-size: 1.4rem;
  letter-spacing: -0.5px;
  color: #ffffff;
  display: flex;
  align-items: center;
  gap: 8px;
}

.navbar-custom .navbar-brand span {
  color: var(--color-accent-yellow);
}

.navbar-custom .nav-link {
  color: rgba(255, 255, 255, 0.9);
  font-weight: 500;
  padding: 8px 16px !important;
  border-radius: var(--border-radius-sm);
  transition: var(--transition-smooth);
}

.navbar-custom .nav-link:hover, 
.navbar-custom .nav-link.active {
  color: #ffffff;
  background-color: rgba(255, 255, 255, 0.1);
}

/* Badge Keranjang Belanja */
.cart-badge-container {
  position: relative;
  display: inline-block;
}

.cart-badge-container .badge {
  position: absolute;
  top: -6px;
  right: -6px;
  background-color: var(--color-accent);
  color: white;
  border-radius: 50%;
  padding: 4px 6px;
  font-size: 0.7rem;
  font-weight: 700;
  border: 2px solid var(--color-primary-dark);
}

/* Banner Utama / Hero Section */
.hero-section {
  background: linear-gradient(135deg, rgba(15, 81, 50, 0.95) 0%, rgba(25, 135, 84, 0.85) 100%), 
              url('https://images.unsplash.com/photo-1500937386664-56d1dfef3854?q=80&w=1470&auto=format&fit=crop') no-repeat center center;
  background-size: cover;
  color: #ffffff;
  padding: 80px 0;
  border-bottom-left-radius: var(--border-radius-lg);
  border-bottom-right-radius: var(--border-radius-lg);
  margin-bottom: 40px;
}

.hero-section h1 {
  color: #ffffff;
  font-size: 3rem;
  font-weight: 800;
  line-height: 1.2;
}

.hero-section p {
  font-size: 1.2rem;
  opacity: 0.9;
}

/* Card Kategori */
.category-card {
  border: 1px solid var(--color-border);
  border-radius: var(--border-radius-md);
  padding: 24px;
  text-align: center;
  background-color: #ffffff;
  transition: var(--transition-smooth);
  height: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  box-shadow: var(--shadow-sm);
  text-decoration: none;
}

.category-card:hover {
  transform: translateY(-8px);
  border-color: var(--color-primary-medium);
  box-shadow: var(--shadow-md);
  background-color: var(--color-bg-light);
}

.category-card .icon-box {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  background-color: rgba(25, 135, 84, 0.1);
  color: var(--color-primary-medium);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 24px;
  margin-bottom: 16px;
  transition: var(--transition-smooth);
}

.category-card:hover .icon-box {
  background-color: var(--color-primary-medium);
  color: #ffffff;
}

.category-card h5 {
  margin-bottom: 0;
  font-size: 1rem;
  color: var(--color-primary-dark);
}

/* Card Produk */
.product-card {
  border: none;
  border-radius: var(--border-radius-md);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  transition: var(--transition-smooth);
  height: 100%;
  display: flex;
  flex-direction: column;
  background-color: #ffffff;
  position: relative;
}

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

.product-card .img-container {
  height: 200px;
  overflow: hidden;
  position: relative;
  background-color: #f8f9fa;
}

.product-card .img-container img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: var(--transition-smooth);
}

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

.product-card .badge-seller {
  position: absolute;
  top: 12px;
  left: 12px;
  background-color: rgba(15, 81, 50, 0.9);
  color: white;
  padding: 4px 10px;
  border-radius: 20px;
  font-size: 0.75rem;
  font-weight: 500;
  backdrop-filter: blur(4px);
  box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.product-card .badge-category {
  position: absolute;
  top: 12px;
  right: 12px;
  background-color: var(--color-accent-yellow);
  color: var(--color-text-dark);
  padding: 4px 10px;
  border-radius: 20px;
  font-size: 0.75rem;
  font-weight: 600;
  box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.product-card .card-body {
  padding: 16px;
  display: flex;
  flex-direction: column;
  flex-grow: 1;
}

.product-card .product-title {
  font-size: 1.05rem;
  font-weight: 600;
  margin-bottom: 8px;
  color: var(--color-text-dark);
  text-decoration: none;
  line-height: 1.4;
  height: 44px;
  overflow: hidden;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

.product-card .product-price {
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--color-primary-medium);
  margin-bottom: 4px;
}

.product-card .product-stock {
  font-size: 0.8rem;
  color: var(--color-text-muted);
  margin-bottom: 12px;
}

.product-card .seller-name {
  font-size: 0.8rem;
  color: var(--color-primary-dark);
  margin-bottom: 12px;
  display: flex;
  align-items: center;
  gap: 4px;
}

/* Custom Buttons */
.btn-primary-custom {
  background-color: var(--color-primary-medium);
  border-color: var(--color-primary-medium);
  color: #ffffff;
  font-weight: 600;
  border-radius: var(--border-radius-sm);
  padding: 10px 20px;
  transition: var(--transition-smooth);
}

.btn-primary-custom:hover {
  background-color: var(--color-primary-dark);
  border-color: var(--color-primary-dark);
  color: #ffffff;
}

.btn-accent-custom {
  background-color: var(--color-accent);
  border-color: var(--color-accent);
  color: #ffffff;
  font-weight: 600;
  border-radius: var(--border-radius-sm);
  padding: 10px 20px;
  transition: var(--transition-smooth);
}

.btn-accent-custom:hover {
  background-color: var(--color-accent-hover);
  border-color: var(--color-accent-hover);
  color: #ffffff;
}

.btn-whatsapp {
  background-color: #25d366;
  color: #ffffff;
  font-weight: 600;
  border-radius: var(--border-radius-sm);
  padding: 10px 20px;
  border: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  transition: var(--transition-smooth);
}

.btn-whatsapp:hover {
  background-color: #128c7e;
  color: #ffffff;
}

/* Dashboard Sidebar & Admin Layout */
.dashboard-container {
  display: flex;
  min-height: calc(100vh - 70px);
}

.dashboard-sidebar {
  width: 260px;
  background-color: var(--color-primary-dark);
  color: #ffffff;
  padding: 24px;
  flex-shrink: 0;
  box-shadow: var(--shadow-md);
  z-index: 10;
}

.dashboard-sidebar .sidebar-title {
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 1.5px;
  color: rgba(255, 255, 255, 0.5);
  margin-bottom: 16px;
  font-weight: 700;
}

.dashboard-sidebar .nav-link {
  color: rgba(255, 255, 255, 0.85);
  padding: 12px 16px;
  border-radius: var(--border-radius-sm);
  margin-bottom: 6px;
  font-weight: 500;
  display: flex;
  align-items: center;
  gap: 12px;
  transition: var(--transition-smooth);
}

.dashboard-sidebar .nav-link:hover,
.dashboard-sidebar .nav-link.active {
  background-color: rgba(255, 255, 255, 0.15);
  color: #ffffff;
  transform: translateX(4px);
}

.dashboard-content {
  flex-grow: 1;
  padding: 40px;
  background-color: var(--color-bg-light);
  overflow-y: auto;
}

/* Card Statistik Dashboard */
.stat-card {
  border: none;
  border-radius: var(--border-radius-md);
  padding: 24px;
  background-color: #ffffff;
  box-shadow: var(--shadow-sm);
  transition: var(--transition-smooth);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

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

.stat-card .stat-icon {
  width: 56px;
  height: 56px;
  border-radius: var(--border-radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 24px;
}

.stat-card .stat-icon.primary {
  background-color: rgba(25, 135, 84, 0.1);
  color: var(--color-primary-medium);
}

.stat-card .stat-icon.warning {
  background-color: rgba(255, 193, 7, 0.1);
  color: var(--color-accent-yellow);
}

.stat-card .stat-icon.danger {
  background-color: rgba(220, 53, 69, 0.1);
  color: #dc3545;
}

.stat-card .stat-icon.info {
  background-color: rgba(13, 202, 240, 0.1);
  color: #0dcaf0;
}

.stat-card .stat-value {
  font-size: 1.8rem;
  font-weight: 800;
  color: var(--color-primary-dark);
  margin-bottom: 2px;
}

.stat-card .stat-label {
  font-size: 0.85rem;
  color: var(--color-text-muted);
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

/* Detail Produk Slider/Image Area */
.product-detail-img {
  width: 100%;
  max-height: 480px;
  object-fit: cover;
  border-radius: var(--border-radius-md);
  box-shadow: var(--shadow-md);
}

.seller-profile-card {
  border: 1px solid var(--color-border);
  border-radius: var(--border-radius-md);
  background-color: var(--color-bg-light);
  padding: 24px;
}

/* Footer Custom */
.footer-custom {
  background-color: var(--color-primary-dark);
  color: rgba(255, 255, 255, 0.8);
  padding: 48px 0 24px 0;
  margin-top: auto;
  border-top-left-radius: var(--border-radius-lg);
  border-top-right-radius: var(--border-radius-lg);
}

.footer-custom h5 {
  color: #ffffff;
  font-size: 1.1rem;
  margin-bottom: 20px;
  position: relative;
  padding-bottom: 8px;
}

.footer-custom h5::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 32px;
  height: 2px;
  background-color: var(--color-accent-yellow);
}

.footer-custom a {
  color: rgba(255, 255, 255, 0.7);
  text-decoration: none;
  transition: var(--transition-smooth);
}

.footer-custom a:hover {
  color: #ffffff;
  padding-left: 4px;
}

/* Responsive Table */
.table-custom {
  background-color: #ffffff;
  border-radius: var(--border-radius-md);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  border: none;
}

.table-custom th {
  background-color: var(--color-primary-dark);
  color: #ffffff;
  border: none;
  padding: 16px;
  font-weight: 600;
}

.table-custom td {
  padding: 16px;
  vertical-align: middle;
  border-bottom: 1px solid var(--color-border);
}

/* Print Invoice Styling */
@media print {
  body {
    background-color: #fff;
    color: #000;
  }
  .no-print {
    display: none !important;
  }
  .card {
    border: none !important;
    box-shadow: none !important;
  }
  .table-custom th {
    background-color: #f8f9fa !important;
    color: #000 !important;
    border-bottom: 2px solid #000 !important;
  }
}
