/* ============================================================
   Taninesia.com — Custom CSS
   Brand: hijau #2d7a3e, oranye #f97316
   ============================================================ */

:root {
  --primary: #2d7a3e;
  --primary-dark: #1f5a2c;
  --primary-light: #3fa155;
  --accent: #f97316;
  --bg-light: #f8f9fa;
  --text-dark: #212529;
}

* { box-sizing: border-box; }

body {
  font-family: 'Inter', system-ui, -apple-system, sans-serif;
  color: var(--text-dark);
  background: #fff;
}

h1, h2, h3, h4, h5, h6 {
  font-family: 'Poppins', sans-serif;
  font-weight: 600;
}

/* ============ Navbar ============ */
.navbar-brand {
  font-size: 1.4rem;
  letter-spacing: -0.5px;
}

.navbar .nav-link {
  font-weight: 500;
  color: #444 !important;
  transition: color 0.2s;
}

.navbar .nav-link:hover {
  color: var(--primary) !important;
}

/* ============ Buttons ============ */
.btn-success {
  background-color: var(--primary);
  border-color: var(--primary);
}

.btn-success:hover,
.btn-success:focus {
  background-color: var(--primary-dark);
  border-color: var(--primary-dark);
}

.btn-outline-success {
  color: var(--primary);
  border-color: var(--primary);
}

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

/* ============ Hero ============ */
.hero {
  background: linear-gradient(135deg, var(--primary) 0%, var(--primary-light) 100%);
  color: #fff;
  padding: 5rem 0;
  position: relative;
  overflow: hidden;
}

.hero h1 {
  font-size: clamp(2rem, 5vw, 3.5rem);
  font-weight: 700;
  line-height: 1.15;
  margin-bottom: 1rem;
}

.hero p {
  font-size: 1.1rem;
  opacity: 0.95;
  margin-bottom: 2rem;
}

.hero .btn-light {
  background: #fff;
  color: var(--primary);
  font-weight: 600;
  padding: 0.75rem 2rem;
  border-radius: 50px;
}

.hero .btn-light:hover {
  background: #f0f0f0;
  transform: translateY(-2px);
  transition: all 0.2s;
}

/* ============ Category Cards ============ */
.category-card {
  background: #fff;
  border: 1px solid #e9ecef;
  border-radius: 12px;
  padding: 1.5rem 1rem;
  text-align: center;
  transition: all 0.25s ease;
  text-decoration: none;
  color: var(--text-dark);
  display: block;
  height: 100%;
}

.category-card:hover {
  border-color: var(--primary);
  color: var(--primary);
  transform: translateY(-4px);
  box-shadow: 0 8px 24px rgba(45, 122, 62, 0.12);
}

.category-card .cat-icon {
  margin-bottom: 0.5rem;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 80px;
}

.category-card .cat-icon img {
  max-width: 80px;
  max-height: 80px;
  transition: transform 0.3s ease;
}

.category-card:hover .cat-icon img {
  transform: scale(1.15) rotate(-5deg);
}

.category-card .cat-name {
  font-weight: 600;
  font-size: 0.95rem;
}

/* ============ Product Cards ============ */
.product-card {
  background: #fff;
  border: 1px solid #e9ecef;
  border-radius: 12px;
  overflow: hidden;
  transition: all 0.25s ease;
  height: 100%;
  display: flex;
  flex-direction: column;
}

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

.product-card-img {
  aspect-ratio: 1 / 1;
  background: var(--bg-light);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  position: relative;
}

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

.product-card-img .placeholder-icon {
  font-size: 3rem;
  color: #adb5bd;
}

.product-card-body {
  padding: 1rem;
  flex: 1;
  display: flex;
  flex-direction: column;
}

.product-card-title {
  font-size: 1rem;
  font-weight: 600;
  margin-bottom: 0.25rem;
  color: var(--text-dark);
  line-height: 1.3;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  min-height: 2.6rem;
}

.product-card-price {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--primary);
  margin-bottom: 0.25rem;
}

.product-card-unit {
  font-size: 0.85rem;
  color: #6c757d;
}

.product-card-stock {
  font-size: 0.75rem;
  margin-bottom: 0.75rem;
}

.product-card .btn-add {
  margin-top: auto;
  width: 100%;
  border-radius: 8px;
  font-weight: 600;
  font-size: 0.9rem;
}

.stock-badge {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 50px;
  font-size: 0.7rem;
  font-weight: 600;
}

.stock-badge.in-stock {
  background: #d1f4d8;
  color: #1a5e2a;
}

.stock-badge.low-stock {
  background: #fff3cd;
  color: #856404;
}

.stock-badge.out-stock {
  background: #f8d7da;
  color: #842029;
}

/* ============ Section Headings ============ */
.section-title {
  font-size: 1.75rem;
  font-weight: 700;
  margin-bottom: 0.5rem;
  color: var(--text-dark);
}

.section-subtitle {
  color: #6c757d;
  margin-bottom: 2rem;
}

/* ============ CTA B2B ============ */
.cta-b2b {
  background: linear-gradient(135deg, #f97316 0%, #ea580c 100%);
  color: #fff;
  border-radius: 16px;
  padding: 3rem 2rem;
}

.cta-b2b h2 {
  color: #fff;
  font-weight: 700;
}

/* ============ Cards umum ============ */
.card-clean {
  background: #fff;
  border: 1px solid #e9ecef;
  border-radius: 12px;
  padding: 1.5rem;
}

/* ============ Footer ============ */
footer a:hover {
  color: #fff !important;
  transition: color 0.2s;
}

/* ============ Floating WA ============ */
.floating-wa {
  transition: transform 0.2s;
}

.floating-wa:hover {
  transform: scale(1.1);
}

/* ============ Breadcrumb ============ */
.breadcrumb {
  background: transparent;
  padding: 0;
  margin-bottom: 1rem;
}

.breadcrumb-item a {
  color: var(--primary);
  text-decoration: none;
}

/* ============ Qty Selector ============ */
.qty-selector {
  display: inline-flex;
  align-items: center;
  border: 1px solid #dee2e6;
  border-radius: 8px;
  overflow: hidden;
}

.qty-selector button {
  background: #f8f9fa;
  border: none;
  width: 36px;
  height: 36px;
  font-weight: 600;
  color: #495057;
  cursor: pointer;
}

.qty-selector button:hover {
  background: #e9ecef;
}

.qty-selector input {
  width: 50px;
  border: none;
  text-align: center;
  font-weight: 600;
  outline: none;
}

/* ============ Empty State ============ */
.empty-state {
  text-align: center;
  padding: 4rem 1rem;
  color: #6c757d;
}

.empty-state .icon {
  font-size: 4rem;
  color: #dee2e6;
  margin-bottom: 1rem;
}

/* ============ Responsive ============ */
@media (max-width: 768px) {
  .hero {
    padding: 3rem 0;
  }
  .hero h1 {
    font-size: 1.75rem;
  }
}

/* ============================================================
   POLISH — Pattern, Animation
   ============================================================ */

.hero-with-pattern { position: relative; overflow: hidden; }
.hero-with-pattern::before {
  content: ''; position: absolute; inset: 0;
  background-image:
    radial-gradient(circle at 20% 30%, rgba(255,255,255,0.1) 0%, transparent 50%),
    radial-gradient(circle at 80% 70%, rgba(255,255,255,0.08) 0%, transparent 50%);
  z-index: 1;
}
.hero-with-pattern::after {
  content: ''; position: absolute; inset: 0;
  background-image: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='%23ffffff' fill-opacity='0.05'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/svg%3E");
  z-index: 0; opacity: 0.6;
}

@keyframes fadeInUp { from { opacity: 0; transform: translateY(20px); } to { opacity: 1; transform: translateY(0); } }
.fade-in-up { animation: fadeInUp 0.6s ease-out; }

.product-card:hover .product-card-img img { transform: scale(1.05); }
.product-card-img img { transition: transform 0.4s ease; }

.category-card:hover .cat-icon i { transform: scale(1.15) rotate(-5deg); }
.cat-icon i { transition: transform 0.3s ease; display: inline-block; }

@keyframes pulse { 0%,100% { transform: scale(1); } 50% { transform: scale(1.1); } }
.navbar .badge.bg-danger { animation: pulse 2s infinite; }

.btn-success, .btn-outline-success { transition: all 0.2s ease; }
.btn-success:hover, .btn-outline-success:hover { transform: translateY(-2px); box-shadow: 0 6px 16px rgba(45,122,62,0.25); }

.navbar.sticky-top { backdrop-filter: blur(10px); background: rgba(255,255,255,0.95) !important; }
.breadcrumb-item + .breadcrumb-item::before { content: '›'; color: #adb5bd; }

.cta-b2b { position: relative; overflow: hidden; }
.cta-b2b::before { content: ''; position: absolute; inset: 0; background-image: radial-gradient(circle at 30% 50%, rgba(255,255,255,0.15) 0%, transparent 60%); z-index: 0; }
.cta-b2b > * { position: relative; z-index: 1; }

html { scroll-behavior: smooth; }

footer a { transition: all 0.2s; }
footer a:hover { transform: translateX(4px); display: inline-block; }

.product-card-img .placeholder-icon { transition: color 0.3s; }
.product-card:hover .product-card-img .placeholder-icon { color: #2d7a3e; }

.toast { box-shadow: 0 8px 24px rgba(0,0,0,0.15); border-radius: 10px; }
