/**
 * Group Buy Products Grid Shortcode Styles
 */

.wgb-products-grid {
    margin: 30px 0;
}

.wgb-grid-container {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 25px;
}

/* Responsive columns */
.wgb-products-grid[data-columns="4"] .wgb-grid-container {
    grid-template-columns: repeat(4, 1fr);
}

.wgb-products-grid[data-columns="3"] .wgb-grid-container {
    grid-template-columns: repeat(3, 1fr);
}

.wgb-products-grid[data-columns="2"] .wgb-grid-container {
    grid-template-columns: repeat(2, 1fr);
}

/* Product Card */
.wgb-product-card {
    background: white;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    overflow: hidden;
    transition: all 0.3s ease;
    display: flex;
    flex-direction: column;
}

.wgb-product-card:hover {
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
    transform: translateY(-5px);
    border-color: #d1d5db;
}

.wgb-card-inner {
    display: flex;
    flex-direction: column;
    height: 100%;
}

/* Card Image */
.wgb-card-image {
    position: relative;
    overflow: hidden;
    background: #f9fafb;
    aspect-ratio: 1;
}

.wgb-card-image a {
    display: block;
    height: 100%;
}

.wgb-card-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

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

/* Badges */
.wgb-card-badge {
    position: absolute;
    top: 10px;
    left: 10px;
    background: linear-gradient(135deg, #e91e8c 0%, #d91872 100%);
    color: white;
    padding: 5px 12px;
    border-radius: 4px;
    font-size: 10px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    z-index: 2;
}

.wgb-card-discount {
    position: absolute;
    top: 10px;
    right: 10px;
    background: #ef4444;
    color: white;
    padding: 5px 10px;
    border-radius: 4px;
    font-size: 12px;
    font-weight: 700;
    z-index: 2;
}

/* Card Content */
.wgb-card-content {
    padding: 15px;
    display: flex;
    flex-direction: column;
    flex: 1;
}

.wgb-card-title {
    margin: 0 0 10px 0;
    font-size: 14px;
    font-weight: 600;
    line-height: 1.4;
    min-height: 40px;
}

.wgb-card-title a {
    color: #1f2937;
    text-decoration: none;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.wgb-card-title a:hover {
    color: #e91e8c;
}

/* Price */
.wgb-card-price {
    margin: 10px 0;
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

.wgb-card-original-price {
    font-size: 13px;
    color: #9ca3af;
}

.wgb-card-original-price del {
    text-decoration: line-through;
}

.wgb-card-current-price {
    font-size: 20px;
    font-weight: 700;
    color: #e91e8c;
}

/* Stock Status */
.wgb-card-stock {
    margin: 8px 0;
}

.wgb-stock-badge {
    display: inline-block;
    padding: 4px 10px;
    border-radius: 12px;
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
}

.wgb-stock-badge.in-stock {
    background: #d1fae5;
    color: #065f46;
}

.wgb-stock-badge.out-of-stock {
    background: #fee2e2;
    color: #991b1b;
}

/* Progress */
.wgb-card-progress {
    margin: 15px 0;
}

.wgb-card-progress-info {
    margin-bottom: 8px;
}

.wgb-slots-text {
    font-size: 12px;
    color: #6b7280;
}

.wgb-card-progress-bar {
    height: 6px;
    background: #e5e7eb;
    border-radius: 3px;
    overflow: hidden;
}

.wgb-card-progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #e91e8c 0%, #d91872 100%);
    border-radius: 3px;
    transition: width 0.5s ease;
}

/* Action Button */
.wgb-card-action {
    margin-top: auto;
    padding-top: 10px;
}

.wgb-card-button {
    display: block;
    width: 100%;
    padding: 12px 20px;
    background: linear-gradient(135deg, #a855f7 0%, #9333ea 100%);
    color: white;
    text-align: center;
    text-decoration: none;
    font-size: 14px;
    font-weight: 600;
    border-radius: 6px;
    border: none;
    cursor: pointer;
    transition: all 0.3s ease;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.wgb-card-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 15px rgba(168, 85, 247, 0.4);
    color: white;
}

.wgb-card-button.unlocked {
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
}

.wgb-card-button.unlocked:hover {
    box-shadow: 0 6px 15px rgba(16, 185, 129, 0.4);
}

.wgb-card-button.disabled {
    background: #d1d5db;
    color: #6b7280;
    cursor: not-allowed;
    opacity: 0.6;
}

.wgb-card-button.disabled:hover {
    transform: none;
    box-shadow: none;
}

/* No Products Message */
.wgb-no-products {
    text-align: center;
    padding: 40px 20px;
    color: #6b7280;
    font-size: 16px;
}

/* Responsive Design */
@media (max-width: 1200px) {
    .wgb-grid-container {
        grid-template-columns: repeat(4, 1fr) !important;
    }
}

@media (max-width: 992px) {
    .wgb-grid-container {
        grid-template-columns: repeat(3, 1fr) !important;
        gap: 20px;
    }
}

@media (max-width: 768px) {
    .wgb-grid-container {
        grid-template-columns: repeat(2, 1fr) !important;
        gap: 15px;
    }
    
    .wgb-card-current-price {
        font-size: 18px;
    }
    
    .wgb-card-button {
        padding: 10px 15px;
        font-size: 13px;
    }
}

@media (max-width: 480px) {
    .wgb-grid-container {
        grid-template-columns: 1fr !important;
    }
}
