/* Custom styles for Pasar UMKM Desa Pemagarsari */

:root {
  --primary: #2D6A4F;
  --primary-dark: #1B4332;
  --secondary: #95D5B2;
  --accent: #FFB703;
  --bg-light: #F8F9FA;
  --text-dark: #212529;
  --shadow-sm: 0 2px 8px rgba(0,0,0,.05);
  --shadow-md: 0 4px 12px rgba(0,0,0,.08);
  --border-radius: 15px;
}

body {
  font-family: 'Open Sans', sans-serif;
  background-color: var(--bg-light);
  color: var(--text-dark);
  font-size: 0.95rem;
}

@media (min-width: 768px) {
  body {
    font-size: 1rem;
  }
}

h1, h2, h3, h4, h5, h6 {
  font-family: 'Montserrat', sans-serif;
  font-weight: 700;
  color: var(--primary-dark);
}

/* Navbar adjustments */
.navbar {
  background-color: var(--primary);
  box-shadow: 0 2px 10px rgba(0,0,0,.15);
  padding: 0.5rem 0;
}

.navbar-brand {
  font-family: 'Montserrat', sans-serif;
  font-weight: 800;
  letter-spacing: -0.5px;
  font-size: 1.15rem;
}

/* Hero Section - Decorative Slim Header */
.hero-section {
  background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
  color: white;
  padding: 15px 0;
  border-radius: 0 0 20px 20px;
}

@media (min-width: 768px) {
  .hero-section {
    padding: 25px 0;
    border-radius: 0 0 40px 40px;
  }
}

/* Welcome Intro Section */
.welcome-intro h1 {
  font-size: 1.75rem;
  line-height: 1.2;
}

.welcome-intro .lead {
  font-size: 1rem !important;
  margin-bottom: 1.5rem !important;
}

@media (min-width: 768px) {
  .welcome-intro h1 {
    font-size: 2.5rem;
  }
  .welcome-intro .lead {
    font-size: 1.15rem !important;
    margin-bottom: 2rem !important;
  }
}

/* Buttons */
.btn {
  border-radius: 10px;
  padding: 10px 20px;
  font-weight: 600;
  transition: all 0.3s ease;
}

.btn-lg {
  padding: 12px 25px;
  border-radius: 12px;
}

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

.btn-primary:hover {
  background-color: var(--primary-dark);
  border-color: var(--primary-dark);
  transform: translateY(-2px);
}

.btn-accent {
  background-color: var(--accent);
  color: var(--text-dark);
  border: none;
  box-shadow: 0 4px 15px rgba(255, 183, 3, 0.3);
}

.btn-accent:hover {
  background-color: #E9A602;
  color: var(--text-dark);
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(255, 183, 3, 0.4);
}

/* Cards */
.card {
  border: none;
  border-radius: var(--border-radius);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

@media (min-width: 992px) {
  .card:hover {
    transform: translateY(-8px);
    box-shadow: var(--shadow-md);
  }
}

/* Category Pills - Mobile Responsive */
.category-pill {
  background: white;
  padding: 12px 15px;
  border-radius: 50px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
  text-decoration: none;
  color: var(--text-dark);
  font-weight: 600;
  font-size: 0.85rem;
  box-shadow: var(--shadow-sm);
  transition: all 0.3s ease;
  height: 100%;
  text-align: center;
}

.category-pill i {
  font-size: 1.25rem;
}

@media (min-width: 768px) {
  .category-pill {
    flex-direction: row;
    padding: 15px 25px;
    font-size: 1rem;
  }
}

.category-pill:hover {
  background: var(--secondary);
  color: var(--primary-dark);
  transform: scale(1.05);
}

/* Product Pricing */
.product-price {
  color: var(--primary);
  font-weight: 800;
  font-size: 1.1rem;
}

@media (min-width: 768px) {
  .product-price {
    font-size: 1.25rem;
  }
}

/* WA Button */
.wa-btn {
  background-color: #25D366;
  color: white;
  font-weight: 700;
  border: none;
}

.wa-btn:hover {
  background-color: #128C7E;
  color: white;
}

/* Floating WA Button */
.wa-floating-btn {
  position: fixed;
  bottom: 25px;
  right: 25px;
  background-color: #25D366;
  color: white;
  width: 60px;
  height: 60px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 30px;
  z-index: 1000;
  transition: all 0.3s ease;
  text-decoration: none;
}

.wa-floating-btn span {
  position: absolute;
  right: 70px;
  background-color: white;
  color: #212529;
  font-size: 14px;
  font-weight: 600;
  padding: 5px 15px;
  border-radius: 50px;
  box-shadow: var(--shadow-md);
  white-space: nowrap;
  opacity: 0;
  transform: translateX(10px);
  transition: all 0.3s ease;
  pointer-events: none;
}

@media (min-width: 992px) {
  .wa-floating-btn:hover {
    transform: scale(1.1);
    background-color: #128C7E;
    color: white;
  }
  
  .wa-floating-btn:hover span {
    opacity: 1;
    transform: translateX(0);
  }
}

/* Footer */
.footer {
  background-color: var(--primary-dark);
  color: rgba(255,255,255,.8);
  padding: 60px 0 20px;
}

.footer h5 {
  color: white;
  margin-bottom: 25px;
  font-size: 1.1rem;
}

.footer-link {
  color: rgba(255,255,255,.6);
  text-decoration: none;
  display: block;
  margin-bottom: 12px;
  transition: color 0.2s ease;
}

.footer-link:hover {
  color: white;
  padding-left: 5px;
}

/* Utility Classes */
.max-width-700 {
  max-width: 700px;
}

.section-title {
  position: relative;
  display: inline-block;
  margin-bottom: 1.5rem;
}

.section-title::after {
  content: '';
  position: absolute;
  bottom: -10px;
  left: 50%;
  transform: translateX(-50%);
  width: 50px;
  height: 4px;
  background-color: var(--accent);
  border-radius: 2px;
}

@media (max-width: 576px) {
  .container {
    padding-left: 20px;
    padding-right: 20px;
  }
  
  .py-5 {
    padding-top: 2.5rem !important;
    padding-bottom: 2.5rem !important;
  }
}

/* Product Card Improvements for Mobile Grid */
@media (max-width: 767px) {
  .card-body {
    padding: 1rem !important;
  }
  
  .card-title {
    font-size: 0.95rem;
    height: 2.4em;
    overflow: hidden;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
  }
  
  .product-price {
    display: block;
    margin-bottom: 0.5rem;
  }
  
  .wa-btn {
    width: 100%;
    padding: 8px;
    font-size: 0.85rem;
  }
}

/* Banner Section */
.banner-promo {
  background-color: transparent;
  padding-top: 0 !important;
  margin-top: 20px;
  position: relative;
  z-index: 10;
}

@media (min-width: 768px) {
  .banner-promo {
    margin-top: 30px;
  }
}

.banner-wrapper {
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  border-radius: 15px;
}

.banner-wrapper:hover {
  transform: scale(1.01);
  box-shadow: 0 10px 30px rgba(0,0,0,.12) !important;
}

.banner-wrapper img {
  border-radius: 15px;
  display: block;
}


/* Fix invalid inline styles from templates */
.product-img-home { height: 160px; object-fit: cover; width: 100%; }
@media (min-width: 768px) { .product-img-home { height: 200px; } }

.product-img-list { height: 150px; object-fit: cover; width: 100%; }
@media (min-width: 768px) { .product-img-list { height: 180px; } }

.product-img-vendor { height: 140px; object-fit: cover; width: 100%; }
@media (min-width: 768px) { .product-img-vendor { height: 180px; } }

.product-img-related { height: 120px; object-fit: cover; width: 100%; }
@media (min-width: 768px) { .product-img-related { height: 180px; } }

.vendor-logo-img { width: 100px; height: 100px; object-fit: cover; }
@media (min-width: 768px) { .vendor-logo-img { width: 120px; height: 120px; } }
