@import '../../vendor/awcodes/filament-table-repeater/resources/css/plugin.css';

.okegas {
    color: red;
}
/* Grid utama: 4 kolom di desktop */
.product-grid {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 8px;             /* setara gap-2 */
    width: 100%;
}

/* Responsif (sesuai yg sebelumnya: 1 kolom mobile, 3 kolom md, 4 kolom lg) */
@media (max-width: 767px) {
    .product-grid {
        grid-template-columns: 1fr;
    }
}
@media (min-width: 768px) and (max-width: 1023px) {
    .product-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}
@media (min-width: 1024px) {
    .product-grid {
        grid-template-columns: repeat(5, 1fr);
    }
}

/* Kartu produk */
.product-card {
    position: relative;
    background: #ffffff;
    border: 1px solid #d1d5db; /* mirip gray-300 */
    border-radius: 6px;
    overflow: hidden;
    cursor: pointer;
    display: flex;
    flex-direction: column;
    min-height: 140px;
    transition: box-shadow .15s, transform .15s;
}

.product-card:hover {
    box-shadow: 0 4px 10px rgba(0,0,0,0.08);
    transform: translateY(-2px);
}

.product-card:active {
    transform: translateY(0);
    box-shadow: 0 2px 6px rgba(0,0,0,0.15);
}

/* Wrapper gambar agar proporsional */
.image-wrapper {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 6px;
    max-height: 120px;
}

.image-wrapper img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    display: block;
}

/* Judul produk */
.product-title {
    font-size: 0.85rem;
    line-height: 1.1;
    color: #4b5563; /* gray-600 */
    padding: 6px 8px 10px;
    margin: 0;
    text-align: center;
    font-weight: 500;
    display: -webkit-box;
    -webkit-line-clamp: 2;    /* batasi 2 baris */
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* Overlay loading */
.loading-overlay {
    position: absolute;
    inset: 0;
    background: rgba(229,231,235,0.85); /* gray-200 + opacity */
    display: flex;
    align-items: center;
    justify-content: center;
    color: #ef4444; /* red-500 */
    z-index: 10;
    font-size: 0; /* hilangkan celah teks */
}

.loader {
    width: 60%;
    max-width: 140px;
    height: auto;
    color: #ef4444;
}

/* (Opsional) Fokus aksesibilitas */
.product-card:focus {
    outline: 2px solid #2563eb;
    outline-offset: 2px;
}

.table-container {
  overflow-x: auto;
  padding: 10px;
}

.custom-table {
  width: 100%;
  border-collapse: collapse;
  border-radius: 8px 8px 0 0;
  overflow: hidden;
  color: #fff;
  text-align: left;
}

.custom-table thead {
  background-color: #161618;
}

.custom-table thead th {
  padding: 12px 16px;
  font-weight: bold;
  text-transform: uppercase;
  font-size: 0.85rem;
  letter-spacing: 0.5px;
}

.custom-table tbody tr {
  background-color: #1f1f22;
  border-bottom: 1px solid #2a2a2d;
}

.custom-table tbody td {
  padding: 10px 16px;
  font-size: 0.85rem;
}

.custom-table tbody tr:hover {
  background-color: #2b2b2f;
}

/* -------- Responsive Styles -------- */
@media (max-width: 768px) {
  .custom-table,
  .custom-table thead,
  .custom-table tbody,
  .custom-table th,
  .custom-table td,
  .custom-table tr {
    display: block;
    width: 100%;
  }

  .custom-table thead tr {
    display: none; /* Sembunyikan header */
  }

  .custom-table tbody tr {
    background-color: #1f1f22;
    border: 1px solid #2a2a2d;
    margin-bottom: 12px;
    border-radius: 8px;
    padding: 10px;
  }

  .custom-table tbody td {
    display: flex;
    justify-content: space-between;
    padding: 8px 10px;
    border-bottom: 1px dashed #2a2a2d;
    text-align: right;
  }

  .custom-table tbody td::before {
    content: attr(data-label);
    font-weight: bold;
    color: #aaa;
    text-transform: uppercase;
    text-align: left;
  }

  .custom-table tbody td:last-child {
    border-bottom: none;
  }
}
