/* store/static/css/custom.css */

body {
  font-family: "Poppins", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background: #ffffff;
  color: #1f2933;
  padding-top: 56px;
}

a {
  text-underline-offset: 3px;
}

.navbar-logo {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  object-fit: cover;
  background: #fff;
}

.brand-text {
  font-weight: 700;
  letter-spacing: 0;
}

.messages-container {
  padding-top: 1rem;
}

.alert {
  position: static;
  z-index: auto;
}

.hero-section {
  background: #f4fbf7;
}

.hero-produce,
.product-detail-image,
.product-image {
  background: #f1f8f4;
  color: #198754;
  display: flex;
  align-items: center;
  justify-content: center;
}

.hero-produce {
  min-height: 320px;
  padding: 2rem;
  gap: 1.25rem;
}

.hero-produce i,
.product-detail-image i {
  font-size: clamp(5rem, 10vw, 8rem);
}

.product-image {
  min-height: 180px;
  font-size: 4rem;
}

.product-card-img,
.category-card-img {
  width: 100%;
  height: 180px;
  object-fit: cover;
  display: block;
}

.category-icon-fallback {
  min-height: 150px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #f1f8f4;
  color: #198754;
  font-size: 3.5rem;
}

.product-detail-image {
  min-height: 420px;
}

.product-carousel-image {
  width: 100%;
  height: min(56vw, 460px);
  object-fit: cover;
  background: #f1f8f4;
}

.product-thumb {
  width: 76px;
  height: 60px;
  object-fit: cover;
  border-radius: 0.4rem;
  border: 2px solid transparent;
}

.product-thumb.active {
  border-color: #198754;
}

.profile-avatar {
  width: 96px;
  height: 96px;
  object-fit: cover;
  border-radius: 50%;
  background: #f1f8f4;
}

.product-card {
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  overflow: hidden;
}

.product-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 0.75rem 1.75rem rgba(17, 24, 39, 0.12) !important;
}

.product-card-added {
  border: 1px solid rgba(25, 135, 84, 0.35) !important;
  box-shadow: 0 0.75rem 1.75rem rgba(25, 135, 84, 0.14) !important;
}

.product-card-qty {
  max-width: 150px;
}

.product-card-qty .btn,
.product-card-qty .form-control {
  min-height: 38px;
}

.toast-container {
  top: 72px !important;
  z-index: 1050;
}

.category-card {
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.category-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 0.6rem 1.5rem rgba(17, 24, 39, 0.1) !important;
}

.price-tag {
  font-size: 1.25rem;
  font-weight: 700;
  color: #198754;
}

.unit-badge {
  font-size: 0.75rem;
  background: #d1e7dd;
  color: #0f5132;
  padding: 0.25rem 0.5rem;
  border-radius: 0.25rem;
}

.feature-box {
  background: #ffffff;
  border: 1px solid #e9ecef;
  border-radius: 0.5rem;
  height: 100%;
  padding: 1.25rem;
  text-align: center;
}

.feature-box i {
  color: #198754;
  font-size: 2rem;
}

.feature-box h5 {
  margin-top: 0.75rem;
  font-weight: 700;
}

.feature-box p {
  color: #6c757d;
  margin-bottom: 0;
  font-size: 0.925rem;
}

.fixed-whatsapp {
  position: fixed;
  bottom: 20px;
  right: 20px;
  width: 60px;
  height: 60px;
  background-color: #25d366;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #ffffff;
  font-size: 2rem;
  box-shadow: 0 0.5rem 1.25rem rgba(0, 0, 0, 0.25);
  z-index: 9999;
  transition: transform 0.2s ease;
  text-decoration: none;
}

.floating-cart {
  position: fixed;
  bottom: 92px;
  right: 20px;
  width: 58px;
  height: 58px;
  background-color: #198754;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #ffffff;
  font-size: 1.8rem;
  box-shadow: 0 0.5rem 1.25rem rgba(0, 0, 0, 0.2);
  z-index: 9998;
  transition: transform 0.2s ease, background-color 0.2s ease;
  text-decoration: none;
}

.floating-cart:hover {
  transform: scale(1.08);
  color: #ffffff;
}

.floating-cart.cart-pulse,
#cart-count-badge.cart-pulse,
.product-cart-badge.cart-pulse {
  animation: cartPulse 0.42s ease;
}

.floating-cart-count {
  position: absolute;
  top: -6px;
  right: -6px;
  min-width: 24px;
  height: 24px;
  border-radius: 999px;
  background: #dc3545;
  color: #fff;
  font-size: 0.75rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 0.35rem;
  border: 2px solid #fff;
}

@keyframes cartPulse {
  0% { transform: scale(1); }
  45% { transform: scale(1.16); }
  100% { transform: scale(1); }
}

.fixed-whatsapp:hover {
  transform: scale(1.08);
  color: #ffffff;
}

.summary-card {
  position: sticky;
  top: 90px;
}

.cart-qty-control {
  max-width: 150px;
}

.cart-table [data-label] {
  vertical-align: middle;
}

.filter-card {
  position: sticky;
  top: 90px;
}

.step-tracker {
  display: flex;
  justify-content: space-between;
  gap: 0.5rem;
  position: relative;
}

.step-tracker::before {
  content: "";
  position: absolute;
  top: 20px;
  left: 8%;
  right: 8%;
  height: 3px;
  background: #e9ecef;
  z-index: 1;
}

.step-tracker .step {
  position: relative;
  z-index: 2;
  text-align: center;
  flex: 1;
}

.step-tracker .icon {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: #e9ecef;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 0.5rem;
  color: #6c757d;
}

.step-tracker .step.active .icon,
.step-tracker .step.completed .icon {
  background: #198754;
  color: #ffffff;
}

.errorlist {
  color: #dc3545;
  font-size: 0.875rem;
  list-style: none;
  padding-left: 0;
  margin: 0.25rem 0 0;
}

@media (max-width: 767.98px) {
  .hero-produce,
  .product-detail-image {
    min-height: 240px;
  }

  .brand-text {
    max-width: 190px;
    overflow: hidden;
    text-overflow: ellipsis;
  }

  .summary-card,
  .filter-card {
    position: static;
  }

  .toast-container {
    top: 68px !important;
    left: 0.75rem;
    right: 0.75rem;
  }

  .step-tracker {
    overflow-x: auto;
    padding-bottom: 0.5rem;
  }

  .step-tracker .step {
    min-width: 110px;
  }

  .cart-table thead {
    display: none;
  }

  .cart-table,
  .cart-table tbody,
  .cart-table tr,
  .cart-table td {
    display: block;
    width: 100%;
  }

  .cart-table tr {
    border-bottom: 1px solid #e9ecef;
    padding: 0.85rem;
  }

  .cart-table td {
    border: 0;
    padding: 0.35rem 0;
  }

  .cart-table td::before {
    content: attr(data-label);
    display: block;
    color: #6c757d;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    margin-bottom: 0.15rem;
  }

  .cart-qty-control {
    max-width: 100%;
  }
}
