/* Modern Product Card Styles */

.pf-modern-cards {
    display: grid;
    gap: 24px;
    margin: 30px 0;
}

.pf-modern-cards.pf-columns-1 {
    grid-template-columns: 1fr;
}

.pf-modern-cards.pf-columns-2 {
    grid-template-columns: repeat(2, 1fr);
}

.pf-modern-cards.pf-columns-3 {
    grid-template-columns: repeat(3, 1fr);
}

.pf-modern-cards.pf-columns-4 {
    grid-template-columns: repeat(4, 1fr);
}

@media (max-width: 1200px) {
    .pf-modern-cards.pf-columns-4 {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (max-width: 992px) {
    .pf-modern-cards.pf-columns-3,
    .pf-modern-cards.pf-columns-4 {
        grid-template-columns: repeat(2, 1fr);
    }
}

.pf-card-modern {
    background: #fff;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    flex-direction: column;
    height: 100%;
}

.pf-card-modern:hover {
    transform: translateY(-8px);
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.15);
}

/* Image Wrapper */
.pf-image-wrapper {
    position: relative;
    width: 100%;
    padding-top: 100%;
    overflow: hidden;
    background: linear-gradient(135deg, #f5f7fa 0%, #c3cfe2 100%);
}

.pf-image-wrapper img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.4s ease;
}

.pf-card-modern:hover .pf-image-wrapper img {
    transform: scale(1.1);
}

.pf-image-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(180deg, transparent 0%, rgba(0, 0, 0, 0.3) 100%);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.pf-card-modern:hover .pf-image-overlay {
    opacity: 1;
}

.pf-no-image {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: #cbd5e0;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Product Info */
.pf-product-info {
    padding: 20px;
    display: flex;
    flex-direction: column;
    gap: 12px;
    flex: 1;
}

.pf-product-title {
    margin: 0;
    font-size: 18px;
    font-weight: 600;
    line-height: 1.4;
}

.pf-product-title a {
    color: #2d3748;
    text-decoration: none;
    transition: color 0.2s ease;
}

.pf-product-title a:hover {
    color: #667eea;
}

.pf-product-rating {
    display: flex;
    align-items: center;
    gap: 4px;
}

.pf-product-rating .star-rating {
    font-size: 14px;
}

.pf-product-price {
    font-size: 24px;
    font-weight: 700;
    color: #667eea;
    margin: 4px 0;
}

.pf-product-price del {
    font-size: 18px;
    color: #a0aec0;
    margin-right: 8px;
}

.pf-product-excerpt,
.pf-product-description {
    font-size: 14px;
    line-height: 1.6;
    color: #718096;
}

/* Product Actions */
.pf-product-actions {
    margin-top: auto;
    padding-top: 12px;
}

.pf-product-actions .pf-btn-primary {
    width: 100%;
    padding: 14px 24px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: #fff;
    border: none;
    border-radius: 10px;
    font-weight: 600;
    font-size: 15px;
    text-align: center;
    text-decoration: none;
    display: block;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.3);
}

.pf-product-actions .pf-btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(102, 126, 234, 0.4);
}

.pf-product-actions .pf-add-to-cart-form {
    margin: 0;
}

.pf-product-actions .pf-add-to-cart-form button {
    width: 100%;
    cursor: pointer;
}

/* ACF Buttons in Cards */
.pf-card-modern .pf-acf-buttons {
    margin-top: 12px;
    padding-top: 12px;
    border-top: 1px solid #e2e8f0;
}

/* List Layout */
.pf-products-list .pf-card-modern {
    flex-direction: column;
    height: auto;
}

.pf-products-list .pf-image-wrapper {
    width: 100%;
    padding-top: 60%;
}

.pf-products-list .pf-product-info {
    padding: 24px;
}

/* Responsive */
@media (max-width: 768px) {
    .pf-modern-cards.pf-columns-2,
    .pf-modern-cards.pf-columns-3,
    .pf-modern-cards.pf-columns-4 {
        grid-template-columns: 1fr !important;
        gap: 16px;
    }
    
    .pf-product-info {
        padding: 16px;
    }
}

/* Loading State */
.pf-card-modern.loading {
    opacity: 0.6;
    pointer-events: none;
}

/* Sale Badge */
.pf-image-wrapper .onsale {
    position: absolute;
    top: 12px;
    right: 12px;
    background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
    color: #fff;
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 700;
    z-index: 2;
    box-shadow: 0 2px 8px rgba(245, 87, 108, 0.4);
}

/* Out of Stock */
.pf-card-modern.out-of-stock {
    opacity: 0.7;
}

.pf-card-modern.out-of-stock .pf-image-wrapper::after {
    content: 'Out of Stock';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: rgba(0, 0, 0, 0.8);
    color: #fff;
    padding: 12px 24px;
    border-radius: 8px;
    font-weight: 600;
    z-index: 3;
}
