.wpg-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 20px;
}
.wpg-card {
    background: #ffffff;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    overflow: hidden;
    transition: box-shadow 0.3s ease;
    display: flex;
    flex-direction: column;
}
.wpg-card:hover {
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
}
.wpg-card-image {
    position: relative;
    overflow: hidden;
    aspect-ratio: 1 / 1;
    background: #f9fafb;
}
.wpg-card-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}
.wpg-hover-zoom:hover .wpg-main-img {
    transform: scale(1.08);
}
.wpg-badge {
    position: absolute;
    top: 10px;
    left: 10px;
    padding: 4px 10px;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    border-radius: 4px;
    z-index: 2;
    color: #fff;
}
.wpg-badge-sale {
    background: #ef4444;
}
.wpg-badge-best {
    background: #f59e0b;
    left: auto;
    right: 10px;
}
.wpg-quick-view-btn {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) scale(0.8);
    background: rgba(255, 255, 255, 0.9);
    border: none;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: all 0.3s ease;
    cursor: pointer;
    z-index: 3;
    color: #111827;
}
.wpg-quick-view-btn svg, .wpg-quick-view-btn i {
    font-size: 18px;
}
.wpg-card-image:hover .wpg-quick-view-btn {
    opacity: 1;
    transform: translate(-50%, -50%) scale(1);
}
.wpg-thumbnails-wrapper {
    padding: 8px 10px;
    background: #f9fafb;
    border-bottom: 1px solid #e5e7eb;
    overflow-x: auto;
    white-space: nowrap;
    -webkit-overflow-scrolling: touch;
}
.wpg-thumbnails {
    display: flex;
    gap: 6px;
}
.wpg-thumb-item {
    width: 40px;
    height: 40px;
    border: 1px solid #d1d5db;
    border-radius: 4px;
    cursor: pointer;
    flex-shrink: 0;
    overflow: hidden;
    opacity: 0.6;
    transition: all 0.2s ease;
}
.wpg-thumb-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}
.wpg-thumb-item:hover, .wpg-thumb-item.active {
    opacity: 1;
    border-color: #3b82f6;
}
.wpg-card-content {
    padding: 15px;
    display: flex;
    flex-direction: column;
    flex-grow: 1;
}
.wpg-card-cat {
    font-size: 11px;
    text-transform: uppercase;
    color: #6b7280;
    margin-bottom: 5px;
}
.wpg-card-cat a {
    color: #6b7280;
    text-decoration: none;
}
.wpg-card-title {
    font-size: 15px;
    font-weight: 600;
    margin: 0 0 8px 0;
}
.wpg-card-title a {
    text-decoration: none;
    color: #111827;
}
.wpg-card-price {
    font-size: 16px;
    font-weight: 700;
    color: #111827;
    margin-bottom: 12px;
}
.wpg-card-footer .button {
    width: 100%;
    text-align: center;
    background: #111827;
    color: #fff !important;
    padding: 10px;
    font-size: 13px;
    border-radius: 4px;
    font-weight: 600;
    transition: background 0.2s ease;
    border: none;
}
.wpg-card-footer .button:hover {
    background: #374151;
}
.wpg-pagination {
    margin-top: 30px;
    display: flex;
    justify-content: center;
    gap: 8px;
}
.wpg-pagination a, .wpg-pagination span {
    padding: 8px 14px;
    border: 1px solid #d1d5db;
    border-radius: 4px;
    text-decoration: none;
    color: #374151;
}
.wpg-pagination span.current {
    background: #111827;
    color: #fff;
    border-color: #111827;
}

/* Modal Styling */
.wpg-quickview-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 99999;
    display: none;
    align-items: center;
    justify-content: center;
}
body.admin-bar .wpg-quickview-modal {
    top: var(--wp-admin--admin-bar--height, 32px);
}
@media screen and (max-width: 782px) {
    body.admin-bar .wpg-quickview-modal {
        top: 46px;
    }
}
.wpg-quickview-modal-overlay {
    position: absolute;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.6);
}
.wpg-quickview-modal-container {
    background: #fff;
    width: 90%;
    max-width: 800px;
    border-radius: 8px;
    position: relative;
    z-index: 2;
    overflow: hidden;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
}
.wpg-quickview-close {
    position: absolute;
    top: 15px;
    right: 15px;
    font-size: 28px;
    background: none;
    border: none;
    cursor: pointer;
    color: #6b7280;
}
.wpg-quickview-body {
    padding: 30px;
    min-height: 300px;
    display: flex;
    align-items: center;
    justify-content: center;
}
.wpg-quickview-loader {
    font-size: 32px;
}
.wpg-qv-modal-content {
    display: flex;
    gap: 30px;
    width: 100%;
}
.wpg-qv-images {
    width: 50%;
}
.wpg-qv-images img {
    width: 100%;
    height: auto;
    object-fit: cover;
    border-radius: 4px;
}
.wpg-qv-summary {
    width: 50%;
    display: flex;
    flex-direction: column;
}
.wpg-qv-title {
    font-size: 24px;
    margin: 0 0 15px 0;
    color: #111827;
}
.wpg-qv-price {
    font-size: 20px;
    font-weight: 700;
    margin-bottom: 15px;
}
.wpg-qv-excerpt {
    color: #4b5563;
    font-size: 14px;
    margin-bottom: 20px;
}
.wpg-qv-add-to-cart form {
    margin-bottom: 15px;
}
.wpg-qv-meta {
    font-size: 12px;
    color: #9ca3af;
}

@media (max-width: 768px) {
    .wpg-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    }
    .wpg-qv-modal-content {
        flex-direction: column;
        gap: 20px;
    }
    .wpg-qv-images, .wpg-qv-summary {
        width: 100%;
    }
    .wpg-quickview-body {
        max-height: 80vh;
        overflow-y: auto;
    }
}
