/* Container */
.hpc-container {
    max-width: 1400px; /* Slightly wider to comfortably fit 5 columns */
    margin: 40px auto;
    padding: 0 20px;
    font-family: inherit;
}

.hpc-category-section {
    margin-bottom: 50px;
}

.hpc-category-title {
    text-align: center;
    font-size: 1.8rem;
    margin-bottom: 25px;
    color: #333;
}

.hpc-category-title a,
.hpc-product-title a {
    text-decoration: none !important;
    box-shadow: none !important;
    color: inherit;
    transition: color 0.3s ease;
}

.hpc-category-title a:hover,
.hpc-product-title a:hover {
    color: var(--wp--preset--color--primary, #2235DD);
}

/* Product Grid - 5 columns on large desktop */
.hpc-product-grid {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 20px;
}

/* Laptop: 4 products per row */
@media (max-width: 1200px) {
    .hpc-product-grid {
        grid-template-columns: repeat(4, 1fr);
    }
}

/* Tablet: 2 products per row */
@media (max-width: 900px) {
    .hpc-product-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* Mobile: 1 product per row */
@media (max-width: 600px) {
    .hpc-product-grid {
        grid-template-columns: 1fr;
    }
}

.hpc-product-card {
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    padding: 15px;
    text-align: center;
    background: #ffffff;
    transition: all 0.3s ease;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    position: relative;
    overflow: hidden;
}

.hpc-product-card:hover {
    border-color: var(--wp--preset--color--primary, #2235DD);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.08);
    transform: translateY(-3px);
}

.hpc-product-image-link {
    display: block;
    margin-bottom: 15px;
    overflow: hidden;
    border-radius: 4px;
}

.hpc-product-image-link img {
    width: 100%;
    height: auto;
    display: block;
    transition: transform 0.5s ease;
}

.hpc-product-card:hover .hpc-product-image-link img {
    transform: scale(1.05);
}

.hpc-product-title {
    font-size: 1rem; /* Slightly smaller title to fit 5 columns nicely */
    margin: 10px 0;
    line-height: 1.4;
}

.hpc-product-price {
    font-size: 1.1rem;
    color: var(--wp--preset--color--primary, #2235DD);
    font-weight: bold;
    margin-bottom: 15px;
    display: block !important;
    visibility: visible !important;
    opacity: 1 !important;
}

.hpc-contact-price {
    font-size: 0.95rem;
    color: #666;
    font-weight: normal;
    font-style: italic;
}

/* ADD TO CART: Hidden by default, takes up ZERO physical space */
.hpc-product-actions {
    max-height: 0;
    opacity: 0;
    margin: 0;
    overflow: hidden;
    transition: max-height 0.4s ease, opacity 0.3s ease, margin-top 0.3s ease;
    pointer-events: none;
}

.hpc-product-card:hover .hpc-product-actions {
    max-height: 80px;
    opacity: 1;
    margin-top: 10px;
    pointer-events: auto;
}

/* View More Button - Smaller & Theme Colors */
.hpc-view-more-container {
    text-align: center;
    margin-top: 40px;
}

.hpc-view-more-btn {
    display: inline-block;
    padding: 10px 24px; /* Smaller padding */
    background-color: var(--wp--preset--color--primary, #2235DD); /* Uses theme color if available */
    color: var(--wp--preset--color--contrast, #ffffff);
    text-decoration: none !important;
    box-shadow: none !important;
    font-size: 0.95rem; /* Smaller font */
    font-weight: 600;
    border-radius: 4px;
    border: 2px solid transparent;
    transition: all 0.3s ease;
}

.hpc-view-more-btn:hover {
    background-color: transparent;
    color: var(--wp--preset--color--primary, #2235DD);
    border-color: var(--wp--preset--color--primary, #2235DD);
}