/* PPCRC ระบบเครื่องมือวิทยาศาสตร์ — ใช้ CSS variables ของเว็บไซต์เดิมถ้ามี พร้อมค่า fallback */
.ppcrc-eq-wrap {
    --ppcrc-green-700: var(--green-700, #006637);
    --ppcrc-green-500: var(--green-500, #06a464);
    --ppcrc-gold-700: var(--gold-700, #8f6516);
    --ppcrc-icon-bg: #eaf5ee;
    --ppcrc-icon-fg: var(--ppcrc-green-700);
    font-family: var(--font-body, "Noto Sans Thai", sans-serif);
    color: #26312b;
}

.ppcrc-eq-wrap h3,
.ppcrc-eq-wrap .ppcrc-eq-filterlabel {
    font-family: var(--font-heading, "Anuphan", sans-serif);
}

.ppcrc-eq-searchbar { margin-bottom: 16px; }
.ppcrc-eq-searchbar input {
    width: 100%;
    max-width: 480px;
    padding: 10px 14px;
    border: 1px solid #cfd8d2;
    border-radius: 8px;
    font-size: 1rem;
}

.ppcrc-eq-filterbar { display: flex; flex-direction: column; gap: 10px; margin-bottom: 12px; }
.ppcrc-eq-filtergroup { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.ppcrc-eq-filterlabel { font-weight: 600; margin-left: 6px; }

.ppcrc-eq-chip {
    border: 1px solid var(--ppcrc-green-700);
    background: #fff;
    color: var(--ppcrc-green-700);
    padding: 6px 14px;
    border-radius: 999px;
    font-size: 0.9rem;
    cursor: pointer;
    transition: background .15s, color .15s;
}
.ppcrc-eq-chip:hover { background: #eaf5ee; }
.ppcrc-eq-chip.is-active { background: var(--ppcrc-green-700); color: #fff; }

.ppcrc-eq-count { color: #5b6b60; margin: 4px 0 16px; }

.ppcrc-eq-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 20px;
}

.ppcrc-eq-card {
    border: 1px solid #e2e8e4;
    border-radius: 12px;
    overflow: hidden;
    background: #fff;
    display: flex;
    flex-direction: column;
    transition: box-shadow .15s;
}
.ppcrc-eq-card:hover { box-shadow: 0 4px 14px rgba(0,0,0,.08); }
.ppcrc-eq-card.is-hidden { display: none; }

.ppcrc-eq-thumb {
    background: var(--ppcrc-icon-bg);
    display: flex;
    align-items: center;
    justify-content: center;
    height: 140px;
}
.ppcrc-eq-thumb img { width: 100%; height: 100%; object-fit: cover; }

.ppcrc-eq-body { padding: 14px 16px 18px; flex: 1; display: flex; flex-direction: column; }
.ppcrc-eq-title { margin: 0 0 4px; font-size: 1.05rem; color: var(--ppcrc-green-700); }
.ppcrc-eq-brand { margin: 0 0 8px; color: #5b6b60; font-size: .9rem; }
.ppcrc-eq-meta { display: flex; flex-direction: column; gap: 2px; font-size: .85rem; color: #45524a; margin-bottom: 10px; }

.ppcrc-eq-more {
    align-self: flex-start;
    background: none;
    border: none;
    color: var(--ppcrc-green-500);
    font-weight: 600;
    cursor: pointer;
    padding: 0;
    font-size: .9rem;
}

.ppcrc-eq-detail { display: none; margin-top: 12px; border-top: 1px dashed #dbe4de; padding-top: 12px; font-size: .92rem; }
.ppcrc-eq-card.is-open .ppcrc-eq-detail { display: block; }

.ppcrc-eq-spec { list-style: none; margin: 0 0 10px; padding: 0; }
.ppcrc-eq-spec li { margin-bottom: 4px; }

.ppcrc-eq-subtable { width: 100%; border-collapse: collapse; margin-bottom: 12px; font-size: .85rem; }
.ppcrc-eq-subtable th, .ppcrc-eq-subtable td { border: 1px solid #e2e8e4; padding: 6px 8px; text-align: right; }
.ppcrc-eq-subtable th { background: #f4f8f5; }

.ppcrc-eq-gallery {
    display: flex;
    gap: 8px;
    overflow-x: auto;
    padding-bottom: 8px;
    margin-bottom: 12px;
}
.ppcrc-eq-gallery-thumb {
    width: 80px;
    height: 80px;
    object-fit: cover;
    border-radius: 8px;
    flex: 0 0 auto;
    cursor: zoom-in;
    border: 1px solid #e2e8e4;
}

.ppcrc-eq-lightbox {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,.85);
    z-index: 9999;
    align-items: center;
    justify-content: center;
}
.ppcrc-eq-lightbox.is-open { display: flex; }
.ppcrc-eq-lightbox img {
    max-width: 90vw;
    max-height: 85vh;
    border-radius: 8px;
}
.ppcrc-eq-lightbox-close {
    position: absolute;
    top: 20px;
    right: 30px;
    color: #fff;
    font-size: 2rem;
    cursor: pointer;
    line-height: 1;
}

.ppcrc-eq-contact-btn {
    display: inline-block;
    background: var(--ppcrc-green-700);
    color: #fff !important;
    padding: 8px 16px;
    border-radius: 8px;
    text-decoration: none;
    font-size: .9rem;
}
.ppcrc-eq-contact-btn:hover { background: var(--ppcrc-green-500); }

.ppcrc-eq-empty { color: #5b6b60; padding: 24px 0; text-align: center; }

@media (max-width: 540px) {
    .ppcrc-eq-grid { grid-template-columns: 1fr; }
}
