/* Sembunyikan elemen dengan class only-mobile jika diakses dari desktop */
@media (min-width: 768px) {
    .only-mobile {
        display: none !important;
    }
}

/* Sembunyikan elemen dengan class only-desktop jika diakses dari HP */
@media (max-width: 767px) {
    .only-desktop {
        display: none !important;
    }
}
  
/* ================= PRODUCT CARD ================= */
  
  .product-card {
    background: #fff;
    border-radius: 16px;
    
    transition: 0.3s;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05);
  }

  .product-card:hover {
    transform: translateY(-6px);
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.12);
  }

  .product-thumb {
    position: relative;
    background: #fafafa;
    /* padding: 25px; */
    padding: 0px !important;
    aspect-ratio: 1/1 !important;
    text-align: center;
  }

  .product-thumb img {
    /* max-height: 200px; */
    height: 100% !important;
    aspect-ratio: 1/1 !important;
    object-fit: contain !important;
  }

  .brand-logo {
    position: absolute;
    top: 10px;
    left: 10px;
    background: #fff;
    border-radius: 8px;
    padding: 5px 8px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.12);
    display: flex;
    align-items: center;
    justify-content: center;
    width: 52px;
    height: 32px;
    overflow: hidden;
  }

  .brand-logo img {
    width: 100%;
    height: 100%;
    object-fit: contain !important;
    object-position: center;
  }

  .badge-discount {
    position: absolute;
    top: 12px;
    right: 12px;
    background: #ff3b30;
    color: #fff;
    font-size: 12px;
    padding: 4px 10px;
    border-radius: 8px;
    font-weight: 600;
  }

  .product-body {
    padding: 18px;
  }
	.product-body .btn{
      padding: 6px 0px !important;
  }
  .product-title {
    font-weight: 600;
    min-height: 48px;
  }

  .product-meta{
  width: max-content;
  }
  .product-meta span {
    font-size: 12px;
    background: #f1f3f5;
    padding: 3px 6px;
    border-radius: 6px;
    margin-right: 4px;
  }
  
  .product-home-container .product-home-swiper .swiper-wrapper{
    box-sizing: border-box !important;
  }

  .price-area {
    width: max-content;
    display: flex;
    align-items: center;
    gap: 10px;
    margin-top: 10px;
  }

  .price-discount {
    font-size: 14px;
    font-weight: 700;
    color: #3c4771;
  }

  .price-original {
    font-size: 13px;
    text-decoration: line-through;
    color: #999;
  }

  .product-meta {
    margin-top: 12px;
  }

  .product-card.out-of-stock {
    opacity: 0.6;
    filter: grayscale(80%);
    pointer-events: none;
  }

  .product-card.out-of-stock .btn {
    background: #6c757d;
    border-color: #6c757d;
    cursor: not-allowed;
  }

  .badge-habis {
    position: absolute;
    top: 12px;
    right: 12px;
    background: #6c757d;
    color: #fff;
    font-size: 12px;
    padding: 4px 10px;
    border-radius: 8px;
    font-weight: 600;
  }
  
  
/* ================= MOBILE OPTIMIZATION ================= */
@media (max-width: 767px) {
  .product-area {
    padding-bottom: 50px !important; /* Kurangi padding area agar tidak terlalu kosong */
  }

  .product-thumb {
    padding: 0px !important; /* Perkecil padding gambar di mobile */
    height: auto !important; /* 140pxKunci tinggi area gambar agar sejajar */
    display: flex;
    align-items: center;
    aspect-ratio: 1/1 !important;
    justify-content: center;
  }

  .product-thumb img {
     /* max-height: 120px !important;Kecilkan ukuran gambar produk */
    height: 100% !important;
  }

  .brand-logo {
    width: 35px !important;/* Perkecil logo brand */
    height: 22px !important;
    top: 5px !important;
    left: 5px !important;
    padding: 2px !important;
  }

  .badge-discount {
    top: 5px !important;
    right: 5px !important;
    font-size: 10px !important;
    padding: 2px 6px !important;
  }

  .product-body {
    padding: 9px !important; /* Perkecil padding body teks */
  }

  .product-title {
    font-size: 13px !important; /* Kecilkan font judul */
    min-height: 38px !important; /* Sesuaikan min-height agar tetap sejajar */
    margin-bottom: 5px !important;
    line-height: 1.3 !important;
  }

  .product-meta {
    margin-top: 5px !important;
    display: flex !important;
    flex-wrap: wrap;
    gap: 4px !important;
  }

  .product-meta span {
    font-size: 10px !important; /* Kecilkan teks kategori/meta */
    padding: 2px 5px !important;
    margin-right: 0 !important;
  }

  .price-area {
    flex-direction: column !important; /* Tumpuk harga diskon dan asli jika area sempit */
    align-items: flex-start !important;
    gap: 0 !important;
    margin-top: 8px !important;
  }

  .price-discount {
    font-size: 14px !important;
  }

  .price-original {
    font-size: 11px !important;
  }

  .product-body .btn {
    font-size: 11px !important; /* Kecilkan tombol */
    padding: 8px 5px !important;
    margin-top: 10px !important;
  }
}
  

  .product-title {
      font-weight: 600;
      font-size: 15px;
      line-height: 1.4em; /* Tentukan tinggi baris */

      /* Kunci tinggi agar sejajar meski teks hanya 1 baris */
      /* Rumus: line-height (1.4) * jumlah baris (3) = 4.2em */
      min-height: 4.2em; 
      max-height: 4.2em;

      margin-bottom: 8px;
      overflow: hidden;
      display: -webkit-box;
      -webkit-line-clamp: 3; /* Batasi maksimal 3 baris */
      -webkit-box-orient: vertical;
      text-overflow: ellipsis;
  }

  /* Penyesuaian untuk mobile */
  @media (max-width: 767px) {
      .product-title {
          font-size: 13px;
          line-height: 1.3em;
          min-height: 3.9em; /* 1.3 * 3 */
          max-height: 3.9em;
      }
  }

  .product-card {
      display: flex;
      flex-direction: column;
      height: 100%; /* Memaksa card mengikuti tinggi owl-item */
      background: #fff;
      border-radius: 16px;
      overflow: hidden;
      transition: 0.3s;
      box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05);
  }

  /* KUNCI: Membuat tinggi area gambar sama semua */
  .product-thumb {
      position: relative;
      height: auto !important;; /* 220pxTentukan tinggi tetap di sini */
      width: 100%;
      background: #fafafa;
    aspect-ratio: 1/1;
      padding: 0px !important;
      display: flex;
      align-items: center;
      justify-content: center;
      flex-shrink: 0; /* Mencegah gambar menyusut */
  }

  .product-thumb img {
      height: 100% !important; /* Gambar tidak akan melebihi kontainer */
    aspect-ratio: 1/1 !important;
      object-fit: contain; /* Gambar tetap proporsional (tidak penyet) */
  }

   /* Berikan ruang ekstra di bawah slider agar shadow card tidak terpotong */
  .product-slider .owl-stage {
      padding-bottom: 15px !important; 
      padding-top: 15px;
  }

  @media (max-width: 767px) {
      .product-slider .owl-stage {
          padding-bottom: 15px !important;
          padding-top: 10px;
      }
  }
  
  .blog-item-img {
      position: relative;
      overflow: hidden;
      border-radius: 8px;
  }

  .blog-item-img img {
      width: 100%;
      height: 220px;        /* ← fixed height semua sama */
      object-fit: cover;    /* ← crop proporsional, tidak gepeng */
      display: block;
      transition: transform 0.3s ease;
  }

  .blog-item-img:hover img {
      transform: scale(1.05);
  }

  @media (max-width: 767px) {
      .blog-item-img img {
          height: 140px;    /* ← lebih kecil di mobile */
      }
  }
 