/* ProfaiFa Product Grid — solar-shop card style */

.pfp-grid {
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 20px;
    width: 100%;
}

.pfp-card {
    display: flex;
    flex-direction: column;
    background: #fff;
    border-radius: 15px;
    overflow: hidden;
    text-decoration: none !important;
    color: inherit;
    box-shadow: 0 2px 8px rgba(0, 0, 0, .06);
    transition: transform .18s ease, box-shadow .18s ease;
}

.pfp-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, .12);
}

.pfp-img-wrap {
    aspect-ratio: 1 / 1;
    background: #fafafa;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.pfp-img,
.pfp-img-wrap img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.pfp-img-placeholder {
    background: linear-gradient(135deg, #f2f2f2 25%, #e9e9e9 25%, #e9e9e9 50%, #f2f2f2 50%, #f2f2f2 75%, #e9e9e9 75%);
    background-size: 20px 20px;
}

.pfp-name {
    padding: 14px 14px 4px;
    text-align: center;
    font-size: 16px;
    line-height: 1.35;
    font-weight: 500;
    color: #111;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    min-height: 3em;
}

.pfp-price {
    padding: 6px 14px 16px;
    text-align: center;
    font-size: 20px;
    font-weight: 700;
    color: #c00;
}

/* WooCommerce uses <span class="amount"> inside the price HTML — force color to match */
.pfp-price .amount,
.pfp-price ins .amount {
    color: inherit;
}

.pfp-price del {
    opacity: .55;
    font-weight: 500;
    margin-inline-end: 6px;
}

/* =========================================================
   Filter widget (sidebar)
   ========================================================= */

.pfp-filter {
    font-family: inherit;
    line-height: 1.6;
}

.pfp-filter-heading {
    font-size: 22px;
    font-weight: 700;
    margin: 0 0 12px;
    color: #111;
}

.pfp-filter-list {
    list-style: none;
    padding: 0;
    margin: 0 0 8px;
}

.pfp-filter-list li {
    margin: 2px 0;
}

.pfp-filter a {
    display: inline-block;
    color: #333;
    text-decoration: none !important;
    padding: 3px 0;
    transition: color .15s ease;
}

.pfp-filter a:hover {
    color: #c00;
}

.pfp-filter a.is-active {
    color: #c00;
    font-weight: 700;
}

.pfp-filter .pfp-count {
    color: #999;
    font-size: .9em;
    margin-inline-start: 4px;
}

/* Quick links block spacing before category tree */
.pfp-filter-quick {
    margin-bottom: 14px;
    padding-bottom: 14px;
    border-bottom: 1px solid #eee;
}

/* Category tree — hierarchical indentation */
.pfp-filter-tree { padding-inline-start: 0; }
.pfp-filter-tree .pfp-filter-sub {
    padding-inline-start: 18px;
    list-style: none;
    margin: 2px 0 6px;
}

/* Numbered top-level like "1. หมวด" */
.pfp-filter-tree.pfp-numbered {
    counter-reset: pfp-top;
    list-style: none;
    padding-inline-start: 0;
}
.pfp-filter-tree.pfp-numbered > li {
    counter-increment: pfp-top;
    position: relative;
    padding-inline-start: 22px;
    font-weight: 600;
}
.pfp-filter-tree.pfp-numbered > li::before {
    content: counter(pfp-top) ".";
    position: absolute;
    inset-inline-start: 0;
    top: 3px;
    color: #333;
    font-weight: 600;
}
.pfp-filter-tree.pfp-numbered > li .pfp-filter-sub li {
    font-weight: 400;
}

/* =========================================================
   Grid responsive fallback (unchanged)
   ========================================================= */

@media (max-width: 991px) {
    .pfp-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

@media (max-width: 600px) {
    .pfp-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .pfp-name  { font-size: 14px; padding: 10px 10px 2px; }
    .pfp-price { font-size: 17px; padding: 4px 10px 12px; }
}
