/**
 * Shop Grid Shortcode Styles
 * Green Theme: #00B32D
 */

/* Grid Container */
.shop-grid-wrapper {
    display: grid;
    gap: 30px;
    padding: 20px 0;
    width: 100%;
    max-width: 1400px;
    margin: 0 auto;
}

.shop-grid-wrapper.columns-2 {
    grid-template-columns: repeat(2, 1fr);
}

.shop-grid-wrapper.columns-3 {
    grid-template-columns: repeat(3, 1fr);
}

.shop-grid-wrapper.columns-4 {
    grid-template-columns: repeat(4, 1fr);
}

/* Responsive columns */
@media (max-width: 1200px) {
    .shop-grid-wrapper.columns-4 {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (max-width: 768px) {
    .shop-grid-wrapper.columns-3,
    .shop-grid-wrapper.columns-4 {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .shop-grid-wrapper {
        gap: 20px;
    }
}

@media (max-width: 480px) {
    .shop-grid-wrapper,
    .shop-grid-wrapper.columns-2,
    .shop-grid-wrapper.columns-3,
    .shop-grid-wrapper.columns-4 {
        grid-template-columns: 1fr !important;
        gap: 15px;
    }
}

/* Product Card */
.shop-grid-product {
    background: #ffffff !important;
    border-radius: 8px !important;
    overflow: hidden !important;
    display: flex !important;
    flex-direction: column !important;
    transition: transform 0.3s ease, box-shadow 0.3s ease !important;
}

.shop-grid-product:hover {
    transform: translateY(-5px) !important;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1) !important;
}

/* Product Image */
.shop-grid-product .product-image {
    width: 100% !important;
    aspect-ratio: 1 !important;
    overflow: hidden !important;
    background: linear-gradient(135deg, #B8D4F1 0%, #A7C7E7 100%) !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    border-radius: 18px !important;
}

.shop-grid-product .product-image a {
    display: block !important;
    width: 100% !important;
    height: 100% !important;
}

.shop-grid-product .product-image img {
    width: 100% !important;
    height: 100% !important;
    object-fit: cover !important;
    transition: transform 0.3s ease !important;
    border-radius: 18px !important;
}

.shop-grid-product:hover .product-image img {
    transform: scale(1.05);
}

/* Product Details */
.shop-grid-product .product-details {
    padding: 15px !important;
    display: flex !important;
    flex-direction: column !important;
    gap: 4px !important;
    flex-grow: 1 !important;
}

/* Product Header */
.shop-grid-product .product-header {
    margin-bottom: 2px !important;
}

.shop-grid-product .product-title {
    margin: 0 !important;
    font-size: 18px !important;
    font-weight: 700 !important;
    color: #1a1a1a !important;
    line-height: 1.3 !important;
}

.shop-grid-product .product-title a {
    color: inherit !important;
    text-decoration: none !important;
    transition: color 0.2s ease !important;
    font-weight: 700 !important;
}

.shop-grid-product .product-title a:hover {
    color: #00B32D !important;
}

.shop-grid-product .product-price {
    font-size: 22px !important;
    font-weight: 300 !important;
    color: #666 !important;
    margin-bottom: 8px !important;
    display: block !important;
}

/* Star Rating */
.shop-grid-product .product-rating {
    display: flex !important;
    align-items: center !important;
    gap: 8px !important;
    margin-bottom: 12px !important;
}

.shop-grid-product .star-rating {
    position: relative !important;
    display: inline-block !important;
    font-size: 18px !important;
    line-height: 1 !important;
    font-family: Arial, sans-serif !important;
    letter-spacing: 2px !important;
    width: 102px !important;
    height: 18px !important;
}

.shop-grid-product .star-rating::before {
    content: "★★★★★" !important;
    color: #e0e0e0 !important;
    position: absolute !important;
    left: 0 !important;
    top: 0 !important;
}

.shop-grid-product .star-rating span {
    position: absolute !important;
    left: 0 !important;
    top: 0 !important;
    overflow: hidden !important;
    white-space: nowrap !important;
}

.shop-grid-product .star-rating span::before {
    content: "★★★★★" !important;
    color: #FFA41C !important;
}

.shop-grid-product .rating-count {
    font-size: 18px !important;
    color: #666 !important;
}

/* Product Actions */
.shop-grid-product .product-actions {
    display: flex !important;
    flex-direction: column !important;
    gap: 10px !important;
    margin-top: auto !important;
    padding-top: 15px !important;
}

/* Buttons */
.shop-grid-product .button {
    width: 100% !important;
    padding: 14px 22px !important;
    font-size: 13px !important;
    font-weight: 600 !important;
    letter-spacing: 0.5px !important;
    text-align: center !important;
    text-decoration: none !important;
    border-radius: 28px !important;
    border: none !important;
    cursor: pointer !important;
    transition: all 0.3s ease !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 8px !important;
    text-transform: uppercase !important;
    line-height: 1 !important;
    white-space: nowrap !important;
}

.shop-grid-product .button i {
    font-size: 14px !important;
}

.shop-grid-product .button-outline {
    background: transparent !important;
    border: 2px solid #333 !important;
    color: #333 !important;
}

.shop-grid-product .button-outline:hover {
    background: #333 !important;
    color: #fff !important;
}

.shop-grid-product .button-primary {
    background: #00B32D !important;
    color: #fff !important;
    border: 2px solid #00B32D !important;
}

.shop-grid-product .button-primary:hover {
    background: #009625 !important;
    border-color: #009625 !important;
    transform: translateY(-2px) !important;
    box-shadow: 0 4px 12px rgba(0, 179, 45, 0.3) !important;
}

.shop-grid-product .button-primary:active {
    transform: translateY(0) !important;
    box-shadow: 0 2px 6px rgba(0, 179, 45, 0.2) !important;
}

/* Screen reader text */
.screen-reader-text {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border-width: 0;
}

/* Loading state */
.shop-grid-product.loading {
    opacity: 0.6;
    pointer-events: none;
}

.shop-grid-product .button-primary.loading::after {
    content: "...";
    animation: dots 1.5s steps(3, end) infinite;
}

@keyframes dots {
    0%, 20% {
        content: ".";
    }
    40% {
        content: "..";
    }
    60%, 100% {
        content: "...";
    }
}

/* Empty state */
.shop-grid-wrapper + p {
    text-align: center;
    padding: 40px 20px;
    color: #666;
    font-size: 16px;
}
