.d-flex {
    position: relative;
}

.product-index-head-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
}

.product-index-card-body {
    padding: 20px;
    background: #ffffff;
}

.product-index-table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
    background-color: #f9fdf9;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.08);
}

.product-index-thead-light th {
    background: linear-gradient(90deg, #4caf50, #81c784);
    color: #ffffff;
    padding: 12px 16px;
    text-align: left;
    font-weight: bold;
    font-size: 14px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    position: sticky;
    top: 0;
    z-index: 1;
    border-bottom: 3px solid #388e3c;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.product-index-thead-light th:first-child {
    border-top-left-radius: 10px;
}

.product-index-thead-light th:last-child {
    border-top-right-radius: 10px;
}

.product-index-row {
    transition: background-color 0.2s ease;
}

.product-index-row:hover {
    background-color: #f0f9f0;
}

.product-index-row td {
    padding: 10px 15px;
    font-size: 13px;
    border-bottom: 1px solid #e0e0e0;
    color: #555;
}

.text-center.w-100 {
    text-align: center;
    font-size: 1.5rem;
    margin: 0 auto;
}

.product-index-btn-add {
    position: absolute;
    top: 10px;
    right: 10px;
    text-decoration: none;
    background-color: #81c784;
    color: white;
    padding: 6px 12px;
    border-radius: 8px;
    font-size: 12px;
    transition: background-color 0.25s ease, transform 0.2s ease;
    border: none;
}

.product-index-btn-add:hover {
    background-color: #66bb6a;
    transform: scale(1.05);
    color: white;
}

.product-index-btn-edit {
    background-color: #66bb6a;
    color: white;
    border-radius: 8px;
    padding: 5px 10px;
    font-size: 12px;
    transition: background-color 0.25s ease, transform 0.2s ease;
    border: none;
}

.product-index-btn-edit:hover {
    background-color: #388e3c;
    transform: scale(1.05);
    color: white;
}

.product-index-btn-delete {
    background-color: #f44336;
    color: white;
    border-radius: 8px;
    padding: 5px 10px;
    font-size: 12px;
    transition: background-color 0.25s ease, transform 0.2s ease;
    border: none;
}

.product-index-btn-delete:hover {
    background-color: #d32f2f;
    transform: scale(1.05);
}

.product-index-btn-details {
    background-color: #80C4E9;
    border: none;
    color: white;
    font-size: 12px;
    transition: background-color 0.25s ease, transform 0.2s ease;
    border-radius: 8px;
    padding: 5px 10px;
}

.product-index-btn-details:hover {
    background-color: #1F509A;
    transform: scale(1.05);
    color: white;
}

.product-index-left-col {
    display: flex;
    align-items: center;
    gap: 20px;
}

.product-index-search,
.product-index-select {
    border-radius: 12px;
    font-size: 15px;
    padding: 10px 14px;
    height: 42px; /* Consistent height */
    border: 1px solid #66bb6a;
    background: #ffffff;
    box-shadow: 0 3px 6px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease-in-out;
}

.product-index-search {
    flex-grow: 2;
    max-width: none;
}

.product-index-search::placeholder {
    color: #b0b0b0;
    font-style: italic;
    font-size: 0.8rem;
}

.product-index-select {
    flex-grow: 0;
    width: auto;
}

.product-index-search:focus,
.product-index-select:focus {
    border-color: #43a047;
    box-shadow: 0 4px 8px rgba(67, 160, 71, 0.5);
    outline: none;
    background-color: #f9fff9;
}

.product-index-btn-filter,
.product-index-btn-reset {
    border-radius: 12px;
    padding: 10px 18px;
    font-size: 14px;
    font-weight: 500;
    height: 42px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.product-index-btn-filter {
    background-color: #81c784;
    color: #ffffff;
    border: none;
    box-shadow: 0 4px 8px rgba(67, 160, 71, 0.4);
}

.product-index-btn-filter:hover {
    background-color: #66bb6a;
    transform: translateY(-2px);
    box-shadow: 0 6px 12px rgba(56, 142, 60, 0.5);
    color: white;
}

.product-index-btn-reset {
    background-color: #ffffff;
    color: #444;
    border: 1px solid #ccc;
    box-shadow: 0 3px 6px rgba(0, 0, 0, 0.1);
}

.product-index-btn-reset:hover {
    background: #f44336;
    color: #ffffff;
    border-color: #f44336;
    transform: translateY(-2px);
    box-shadow: 0 6px 12px rgba(244, 67, 54, 0.4);
}

.pagination {
    display: flex;
    justify-content: center;
    gap: 8px;
    list-style: none;
    padding: 0;
    margin: 20px 0;
}

.pagination li {
    display: inline-block;
}

.pagination a,
.pagination span {
    display: inline-block;
    padding: 8px 12px;
    text-decoration: none;
    font-size: 14px;
    color: #444;
    border: 1px solid #ddd;
    border-radius: 5px;
    background-color: #f9f9f9;
    transition: all 0.3s ease;
}

.pagination a:hover {
    background-color: #4caf50;
    color: #fff;
    border-color: #43a047;
    transform: scale(1.05);
}

.pagination .active span {
    background-color: #388e3c;
    color: #fff;
    font-weight: bold;
    border-color: #388e3c;
}

.pagination .disabled span {
    background-color: #e9e9e9;
    color: #aaa;
    cursor: not-allowed;
    border-color: #ddd;
}

@media (max-width: 768px) {
    .product-index-head-row {
        flex-direction: column;
        gap: 15px;
    }

    .product-index-left-col {
        width: 100%;
    }

    .product-index-right-col {
        justify-content: center;
    }

    .product-index-btn-filter,
    .product-index-btn-reset {
        width: 100%;
        text-align: center;
    }
}
