/* Card Styling */
.product-card {
    border: 3px solid #004225 !important; /* border tebal */
    border-radius: 10px;
    overflow: hidden;
    position: relative;
    height: auto !important;
    background: #fff;
}
.product-card .d-flex {
    margin-top: auto;
}

/* Badge Container (posisi tetap di atas gambar) */
.product-card .badge-container {
    position: absolute;
    top: 10px;
    left: 10px;
    z-index: 2; /* supaya tidak ketutup gambar */
}

/* Badge Styling */
.product-card .badge {
    font-size: 0.65rem;
    padding: 0.35em 0.6em;
    border-radius: 0.35rem;
    font-weight: 600;
}

/* Image Container */
.product-card .card-img-top {
    background-color: #f8f9fa;
    overflow: hidden;
    position: relative;
    z-index: 1;
    aspect-ratio: 1/1;
}

/* Image Styling */
.product-card img {
    object-fit: cover;
    width: 100%;
    height: 100%;
    transition: transform 0.4s ease;
}

/* Hover effect hanya untuk gambar */
.product-card:hover img {
    transform: scale(1.05);
}

.product-card .category-badge {
    display: inline-block !important; /* paksa inline-block */
    background-color: #ffffff !important; /* putih */
    color: #004225 !important; /* hijau */
    font-size: 10px;
    padding: 0.2em 0.6em;
    border: 1px solid #004225; /* hijau tipis */
    border-radius: 0.5rem; /* oval */
    white-space: nowrap; /* cegah teks turun baris */
    transition: all 0.3s ease;
    align-self: flex-start;
}


/* Title */
.product-card .card-title {
    font-size: 0.85rem;
    font-weight: 500;
    line-height: 1.2em;
    display: -webkit-box;
    -webkit-line-clamp: 2; /* max 2 baris */
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* Description */
.product-card .card-text {
    font-size: 0.85rem;
    color: #555;
    display: -webkit-box;
    -webkit-line-clamp: 2; /* maksimal 2 baris */
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* Price Styling */
.product-card p.fw-bold {
    color: #004225 !important;
    font-size: 1rem;
}

.product-card p.fw-bold small {
    color: #a5a5a5 !important;
    font-size: 0.9rem;

}

/* Buttons */
.product-card .btn {
    border-radius: 8px;
    font-size: 0.85rem;
    padding: 0.4rem 0.6rem;
    white-space: nowrap;
}

.product-card .btn-outline-success {
    border-color: #004225;
    color: #004225;
}

.product-card .btn-outline-success:hover {
    background-color: #004225;
    color: white;
}

.product-card .btn-add-cart {
    background-color: #004225;
    color: white;
    font-size: 0.75rem;
    padding: 4px 6px;
    border-radius: 6px;
}

.product-card .btn-add-cart:hover {
    background-color: #00331a;
}

@media (max-width: 576px) {
    .product-card {
        height: auto !important;
    }
}

  .btn-custom {
    min-width: 140px;         /* ukuran lebar sama */
    height: 30px;             /* tinggi fix biar sama persis */
    border-radius: 10px;      /* sudut bulat */
    font-weight: 500;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;                 /* jarak icon dan teks */
    transition: all 0.3s ease;
  }

  /* Tombol Store */
  .btn-store {
    background-color: #004225;
    color: #fff;
    border: 2px solid #004225;
  }
  .btn-store:hover {
    background-color: #fff;
    color: #004225;
  }

  /* Tombol WhatsApp */
  .btn-wa {
    background-color: #fff;
    color: #004225;
    border: 2px solid #004225;
  }
  .btn-wa:hover {
    background-color: #004225;
    color: #fff;
  }
