.thlpc-grid {
    --thlpc-columns: 4;
    --thlpc-yellow: #ffcc00;
    --thlpc-red: #d00025;
    --thlpc-blue: #335c76;
    --thlpc-black: #111111;
    --thlpc-border: #e5e7eb;
    --thlpc-card-bg: #ffffff;
    --thlpc-button-bg: #ffcc00;
    --thlpc-button-text: #111111;
    --thlpc-text-color: #111111;
    --thlpc-radius: 8px;
    --thlpc-image-height: 205px;
    --thlpc-card-shadow: 0 8px 24px rgba(17, 17, 17, 0.06);
    --thlpc-card-shadow-hover: 0 14px 34px rgba(17, 17, 17, 0.11);
    display: grid;
    grid-template-columns: repeat(var(--thlpc-columns), minmax(0, 1fr));
    gap: 24px;
    width: 100%;
}

.thlpc-card {
    position: relative;
    display: flex;
    min-width: 0;
    flex-direction: column;
    overflow: hidden;
    background: var(--thlpc-card-bg);
    color: var(--thlpc-text-color);
    border: 1px solid var(--thlpc-border);
    border-radius: var(--thlpc-radius);
    box-shadow: var(--thlpc-card-shadow);
    transition: transform .2s ease, box-shadow .2s ease;
}

.thlpc-card:hover {
    transform: translateY(-3px);
    box-shadow: var(--thlpc-card-shadow-hover);
}

.thlpc-badge {
    position: absolute;
    z-index: 2;
    top: 14px;
    left: 14px;
    padding: 5px 9px;
    background: var(--thlpc-yellow);
    color: var(--thlpc-black);
    border-radius: min(3px, var(--thlpc-radius));
    font-size: 12px;
    font-weight: 800;
    line-height: 1;
    text-transform: uppercase;
}

.thlpc-image-link {
    display: flex;
    min-height: calc(var(--thlpc-image-height) + 30px);
    align-items: center;
    justify-content: center;
    padding: 15px 22px;
    background: rgba(127, 127, 127, 0.055);
    border-radius: var(--thlpc-radius) var(--thlpc-radius) 0 0;
    overflow: hidden;
}

.thlpc-image {
    display: block;
    width: 100%;
    height: var(--thlpc-image-height);
    object-fit: contain;
    transition: transform .25s ease;
}

.thlpc-card:hover .thlpc-image {
    transform: scale(1.025);
}

.thlpc-image-placeholder {
    display: flex;
    width: 100%;
    height: var(--thlpc-image-height);
    align-items: center;
    justify-content: center;
    color: var(--thlpc-text-color);
    opacity: .55;
    border: 1px dashed currentColor;
}

.thlpc-card-body {
    display: flex;
    flex: 1;
    flex-direction: column;
    padding: 22px;
}

.thlpc-title {
    margin: 0 0 10px;
    color: var(--thlpc-text-color);
    font-size: 20px;
    font-weight: 750;
    line-height: 1.25;
}

.thlpc-title a {
    color: inherit;
    text-decoration: none;
}

.thlpc-title a:hover {
    color: inherit;
    opacity: .72;
}

.thlpc-excerpt {
    margin: 0 0 16px;
    color: var(--thlpc-text-color);
    opacity: .76;
    font-size: 15px;
    line-height: 1.55;
}

.thlpc-price {
    margin: auto 0 14px;
    color: var(--thlpc-text-color);
    font-size: 20px;
    font-weight: 800;
}

.thlpc-stock {
    margin: 0 0 12px;
    font-size: 14px;
    font-weight: 700;
}

.thlpc-stock--in { color: #167443; }
.thlpc-stock--out { color: var(--thlpc-red); }

.thlpc-button {
    display: inline-flex;
    width: 100%;
    min-height: 46px;
    align-items: center;
    justify-content: center;
    margin-top: auto;
    padding: 11px 16px;
    background: var(--thlpc-button-bg);
    color: var(--thlpc-button-text) !important;
    border: 0;
    border-radius: var(--thlpc-radius);
    font-size: 14px;
    font-weight: 800;
    line-height: 1.2;
    text-align: center;
    text-decoration: none !important;
    text-transform: uppercase;
    transition: filter .2s ease, transform .2s ease;
}

.thlpc-button:hover {
    color: var(--thlpc-button-text) !important;
    filter: brightness(.9);
    transform: translateY(-1px);
}

.thlpc-notice {
    padding: 14px 16px;
    background: #f8fafc;
    border-left: 4px solid var(--thlpc-blue, #335c76);
}

.thlpc-notice--error {
    border-left-color: var(--thlpc-red, #d00025);
}

.thlpc-admin-hint {
    margin: 10px 0 0;
    color: #646970;
    font-size: 12px;
}

@media (max-width: 1100px) {
    .thlpc-cols-4,
    .thlpc-cols-5,
    .thlpc-cols-6 {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }
}

@media (max-width: 780px) {
    .thlpc-cols-3,
    .thlpc-cols-4,
    .thlpc-cols-5,
    .thlpc-cols-6 {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .thlpc-grid {
        gap: 18px;
    }
}

@media (max-width: 520px) {
    .thlpc-grid {
        grid-template-columns: 1fr;
    }

    .thlpc-image-link {
        min-height: calc(var(--thlpc-image-height) + 20px);
        padding: 10px 18px;
    }
}
