/* tiny overrides */
body {
    background: #ffffff;
    color: #fff;
}

.filter-btn {
    background: #374151 !important;
    color: #ffffff !important;
    border-radius: 12px !important;
    transition: all 0.2s ease;
}

.filter-btn.filter-active {
    background: rgb(245 158 11) !important;
    color: #1e293b !important;
    box-shadow: 0 10px 18px rgba(245, 158, 11, 0.25);
}

.card {
    background: #ffffff;
}

/* Product grid image framing */
#products-grid {
    align-items: stretch;
}

#products-grid article div>img {
    object-fit: contain !important;
    background: #ffffff;
    padding: 8px;
}

#products-grid article div {
    background: #ffffff !important;
}

/* Admin table product images: centered, no stretching */
#admin-products-tbody td div img,
#admin-products-tbody .max-w-full.max-h-full {
    object-fit: contain !important;
    object-position: center;
}

/* Align card buttons to bottom */
#products-grid article {
    display: flex;
    flex-direction: column;
    height: 100%;
    min-height: 360px;
    background: #ffffff !important;
}

/* Push View More area to bottom */
#products-grid article .mt-4 {
    margin-top: auto !important;
}

#products-grid article .view-more-btn {
    margin-top: auto;
    background: #213062 !important;
}

#products-grid article .view-more-btn:hover {
    background: #1b274d !important;
}

/* Product details modal */
.pd-modal {
    position: fixed;
    inset: 0;
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
}

.pd-modal.hidden {
    display: none;
}

.pd-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(3px);
}

.pd-panel {
    position: relative;
    background: #0f172a;
    color: #e5e7eb;
    width: min(900px, 92vw);
    max-height: 85vh;
    border-radius: 16px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.4);
    overflow: auto;
    z-index: 1;
    border: 1px solid #1f2937;
}

.pd-close {
    position: absolute;
    top: 12px;
    right: 12px;
    width: 36px;
    height: 36px;
    border: none;
    border-radius: 50%;
    background: #F9C036;
    color: #213062;
    font-size: 22px;
    cursor: pointer;
}

.pd-content {
    display: grid;
    grid-template-columns: 1fr 1.3fr;
    gap: 20px;
    padding: 24px;
    max-height: calc(85vh - 24px);
    overflow: auto;
}

.pd-image-wrap {
    background: #111827;
    border-radius: 12px;
    padding: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.pd-image-wrap img {
    width: 100%;
    height: 320px;
    object-fit: contain;
    background: #ffffff;
    border-radius: 10px;
}

.pd-title {
    font-size: 20px;
    font-weight: 700;
    margin-bottom: 12px;
    color: #fff;
}

.pd-table {
    width: 100%;
    border-collapse: collapse;
    background: #111827;
    border-radius: 12px;
    overflow: hidden;
}

.pd-table th,
.pd-table td {
    padding: 10px 12px;
    border-bottom: 1px solid #1f2937;
    font-size: 14px;
}

.pd-table th {
    text-align: left;
    color: #9ca3af;
    width: 35%;
    background: #0b1220;
}

.pd-table td {
    color: #e5e7eb;
}

@media (max-width: 768px) {
    .pd-content {
        grid-template-columns: 1fr;
    }

    .pd-image-wrap img {
        height: 240px;
    }
}