/* Card Styling */
.product-card {
    border: 3px solid #004225 !important; /* border tebal */
    border-radius: 12px;
    overflow: hidden;
    position: relative;
    height: auto !important;
    background: #fff;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    max-width: 240px; /* batasi lebar kartu agar tidak terlalu lebar */
}
.product-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(0,0,0,0.08) !important;
}
.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;
}

/* Quick Add overlay button */
.product-card .quick-add {
    position: absolute;
    right: 10px;
    bottom: 10px;
    opacity: 0;
    transform: translateY(6px);
    transition: all 0.2s ease;
    padding: 6px 10px;
    border-radius: 8px;
    font-size: 0.8rem;
}
.product-card:hover .quick-add {
    opacity: 1;
    transform: translateY(0);
}

/* 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);
}

/* Pusatkan kartu di dalam kolom */
.product-item { justify-content: center; }

.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 Row */
.product-card .price-row { display: flex; align-items: baseline; }
.product-card .current-price {
    color: #004225;
    font-weight: 700;
    font-size: 1rem;
}
.product-card .old-price {
    color: #a5a5a5;
    text-decoration: line-through;
    font-size: 0.85rem;
}

/* 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;
}

/* Disabled state agar tidak terlihat hitam/abu default */
.product-card .btn:disabled,
.product-card .btn[disabled] {
    background-color: #adb5bd !important;
    border-color: #adb5bd !important;
    color: #ffffff !important;
    opacity: 1;
    cursor: not-allowed;
}

@media (max-width: 576px) {
    .product-card {
        height: auto !important;
        max-width: 180px; /* lebih ramping di mobile */
    }
}

  .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;
  }

  
