/* =============================================
   SOLUSI LENGKAP - SEMUA DEVICE BENAR
   Desktop + Tablet + Smartphone
   ============================================= */

/* =============================================
   BASE STYLES - Berlaku untuk Semua Device
   ============================================= */

/* Reset dan Base untuk Semua Produk */
.our-products .elementor-column {
    display: flex !important;
    flex-direction: column !important;
}

.our-products .elementor-widget-image {
    width: 100% !important;
    margin: 0 !important;
}

.our-products .elementor-widget-image img {
    width: 100% !important;
    object-fit: cover !important;
    object-position: center !important;
    display: block !important;
}

.tablet-fix {
    display: flex !important;
    flex-direction: column !important;
    background-color: #e8eef5 !important;
    box-sizing: border-box !important;
}

.tablet-fix .elementor-widget-heading {
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
}

.tablet-fix .elementor-heading-title {
    text-align: center !important;
    margin: 0 !important;
    font-weight: 600 !important;
}

.tablet-fix .elementor-button-wrapper {
    margin-top: auto !important;
    width: 100% !important;
    text-align: center !important;
}

/* =============================================
   DESKTOP - Resolusi > 1024px
   ============================================= */
@media (min-width: 1025px) {
    
    .our-products .elementor-row,
    .our-products .elementor-container {
        display: flex !important;
        flex-wrap: wrap !important;
        gap: 20px !important;
    }
    
    .our-products .elementor-column {
        flex: 1 1 calc(33.333% - 20px) !important;
        max-width: calc(33.333% - 20px) !important;
    }
    
    .our-products .elementor-widget-image img {
        height: 350px !important;
        border-radius: 8px 8px 0 0 !important;
    }
    
    .tablet-fix {
        min-height: 220px !important;
        padding: 25px 20px !important;
        border-radius: 0 0 8px 8px !important;
    }
    
    .tablet-fix .elementor-widget-heading {
        min-height: 70px !important;
        margin-bottom: 15px !important;
    }
    
    .tablet-fix .elementor-heading-title {
        font-size: 18px !important;
        line-height: 1.4 !important;
    }
    
    .tablet-fix .elementor-button {
        max-width: 200px !important;
        padding: 12px 24px !important;
        font-size: 14px !important;
    }
}

/* =============================================
   TABLET - Resolusi 768px - 1024px
   ============================================= */
@media (min-width: 768px) and (max-width: 1024px) {
    
    .our-products .elementor-row,
    .our-products .elementor-container {
        display: flex !important;
        flex-wrap: wrap !important;
        gap: 15px !important;
    }
    
    .our-products .elementor-column {
        flex: 1 1 calc(33.333% - 15px) !important;
        max-width: calc(33.333% - 15px) !important;
    }
    
    .our-products .elementor-widget-image img {
        height: 240px !important;
        border-radius: 6px 6px 0 0 !important;
    }
    
    .tablet-fix {
        min-height: 180px !important;
        padding: 18px 12px !important;
        border-radius: 0 0 6px 6px !important;
    }
    
    .tablet-fix .elementor-widget-heading {
        min-height: 58px !important;
        margin-bottom: 12px !important;
    }
    
    .tablet-fix .elementor-heading-title {
        font-size: 15px !important;
        line-height: 1.3 !important;
    }
    
    .tablet-fix .elementor-button {
        max-width: 160px !important;
        padding: 10px 20px !important;
        font-size: 13px !important;
    }
}

/* =============================================
   SMARTPHONE - Resolusi < 768px
   ============================================= */
@media (max-width: 767px) {
    
    .our-products .elementor-row,
    .our-products .elementor-container {
        display: flex !important;
        flex-direction: column !important;
        gap: 25px !important;
        padding: 0 15px !important;
    }
    
    .our-products .elementor-column {
        width: 100% !important;
        max-width: 100% !important;
        flex: none !important;
    }
    
    .our-products .elementor-widget-image img {
        height: 320px !important;
        border-radius: 8px 8px 0 0 !important;
    }
    
    .tablet-fix {
        min-height: 170px !important;
        padding: 20px 15px !important;
        border-radius: 0 0 8px 8px !important;
    }
    
    .tablet-fix .elementor-widget-heading {
        min-height: 55px !important;
        margin-bottom: 15px !important;
    }
    
    .tablet-fix .elementor-heading-title {
        font-size: 17px !important;
        line-height: 1.4 !important;
    }
    
    .tablet-fix .elementor-button {
        max-width: 200px !important;
        padding: 12px 24px !important;
        font-size: 14px !important;
    }
}

/* Small Mobile */
@media (max-width: 480px) {
    .our-products .elementor-widget-image img {
        height: 280px !important;
    }
    
    .tablet-fix {
        min-height: 160px !important;
    }
}

/* Extra Small Mobile */
@media (max-width: 360px) {
    .our-products .elementor-widget-image img {
        height: 250px !important;
    }
    
    .tablet-fix .elementor-heading-title {
        font-size: 15px !important;
    }
    
    .tablet-fix .elementor-button {
        max-width: 180px !important;
        font-size: 13px !important;
    }
}

/* =============================================
   3. PERBAIKAN LOGO BRAND & KATEGORI
   ============================================= */
.logo-brands img, 
#our-brand .swiper-slide-inner img {
    max-width: 100% !important;
    height: auto !important;
    aspect-ratio: auto !important;
    object-fit: contain !important;
}

/* =============================================
   4. PENYESUAIAN MOBILE (RESPONSIVE)
   ============================================= */
@media (max-width: 767px) {
    /* Gambar di HP sedikit lebih lebar rasionya agar tidak terlalu makan tempat */
    .our-products .elementor-widget-image img {
        aspect-ratio: 16 / 9 !important;
    }

    .tablet-fix {
        min-height: 140px !important;
        padding: 15px !important;
    }

    /* Di HP teks judul biasanya lebih baik rata kiri/tengah sesuai desain */
    .tablet-fix .elementor-heading-title {
        min-height: 40px !important;
        font-size: 16px !important;
    }

    /* Menghapus lebar kaku (fixed width) yang merusak layout HP */
    .your-products .elementor-widget-image,
    .your-products .elementor-widget-container {
        width: 100% !important;
        min-width: 0 !important;
        height: auto !important;
    }
}

.our-category .elementor-widget-image {
  position: relative;
  padding-top: 100%; /* 1:1 ratio */
  overflow: hidden;
}

.our-category .elementor-widget-image img {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: fill;
}

#our-brand .swiper-slide-inner {
  display: flex;
  align-items: center;      /* Pusatkan secara vertikal */
  justify-content: center;   /* Pusatkan secara horizontal */
  width: 100%;               /* Gunakan 100% agar responsif di mobile */
  max-width: 200px;          /* Batas maksimal lebar */
  height: 200px;
  margin: 0 auto;            /* Memastikan container slide ada di tengah */
  overflow: hidden;
}

#our-brand .swiper-slide-inner img {
  max-width: 90%;
  max-height: 90%;
  width: auto;               /* Menjaga rasio aspek */
  height: auto;              /* Menjaga rasio aspek */
  object-fit: contain;
  /* Hapus position: absolute dan transform agar flexbox bekerja maksimal */
}

/* === BATAS LOGO FOOTER === */

/* Footer logo – responsive & safe */
#footer-logo .elementor-widget-image img {
  width: 200px;      /* desktop target */
  max-width: 100%;
  height: auto;
  display: block;
}

/* Tablet */
@media (max-width: 1024px) {
  #footer-logo .elementor-widget-image img {
    width: 180px;
  }
}

/* Mobile */
@media (max-width: 767px) {
  #footer-logo .elementor-widget-image img {
    width: 140px;
  }
}

/* === BATAS LOGO FOOTER === */

/* Mengunci ukuran box pembungkus gambar */
.your-products .elementor-widget-image {
    width: 200px !important;
    height: 200px !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    overflow: hidden;
}

/* Pastikan class 'your-products' ada di Container Utama */

/* Menargetkan semua elemen di dalam container .your-products */
.your-products .elementor-widget-container,
.your-products .elementor-widget-image,
.your-products a,
.your-products img {
    width: 200px !important;
    height: 200px !important;
    max-width: 200px !important;
    min-width: 200px !important;
    max-height: 200px !important;
    min-height: 200px !important;
    object-fit: contain !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    margin: 0 auto !important;
}

/* Mengatur agar Container tidak memaksa gambar melebar */
.your-products .e-con-inner, 
.your-products {
    display: flex !important;
    flex-wrap: wrap !important;
    justify-content: center !important;
    gap: 20px !important; /* Jarak antar logo */
}

/* Menargetkan widget spesifik yang memiliki class logo-brands */
/* Menargetkan hanya widget gambar yang diberi class logo-brands */
.elementor-widget-image.logo-brands {
    width: 300px !important;
    height: 300px !important;
    max-width: 300px !important;
    min-width: 300px !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
}

/* Menargetkan widget gambar secara spesifik */
.elementor-widget-image.logo-brands {
    width: 300px !important;
    max-width: 100% !important; /* Agar responsif di HP */
    height: auto !important;    /* KUNCI: Menghapus ruang kosong atas-bawah */
    margin: 0 auto !important;
}

.logo-brands .elementor-widget-container {
    margin: 0 !important;
    padding: 0 !important;
    line-height: 0 !important; /* Menghilangkan gap halus di bawah gambar */
}

.logo-brands img {
    width: 100% !important;
    height: auto !important; /* Mengikuti rasio asli logo */
    display: block !important;
}

/* Untuk Tablet & HP */
@media (max-width: 767px) {
    .elementor-widget-image.logo-brands {
        width: 180px !important; /* Ukuran lebih proporsional di HP */
    }
}

@media (max-width: 767px) {
    /* Menghilangkan padding pada pembungkus kolom */
    .elementor-element-populated {
        padding-left: 0 !important;
    }

    /* Memaksa teks rata kiri, mengabaikan perintah 'center' dari .tablet-fix */
    .elementor-element-19aa291 .elementor-heading-title,
    .elementor-element-81c9df5 .elementor-widget-container {
        text-align: left !important;
        justify-content: flex-start !important;
        padding-left: 0 !important;
    }
}