/**
 * Product Grid Listing Section Styles
 * Using .pgl- namespace prefix
 */

/* Section Container */
.pgl-section {
    width: 100%;
    padding: 3rem 0;
    background-color: #ffffff;
}

.pgl-container {
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 1rem;
}

@media (min-width: 640px) {
    .pgl-container {
        padding: 0 1.5rem;
    }
}

@media (min-width: 1024px) {
    .pgl-container {
        padding: 0 2rem;
    }
}

/* Section Header */
.pgl-header {
    margin-bottom: 1rem;
    text-align: center;
}

.pgl-title {
    position: relative;
    width: 100%;
    margin: 0 auto;
    margin-bottom: 1rem;
    background-color: #069669;
    color: #ffffff;
    border-radius: 1.5rem;
    padding: 0.75rem 1.5rem;
    font-size: 1.5rem;
    font-weight: 900;
    text-align: center;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    word-wrap: break-word;
    display: block;
}

@media (min-width: 768px) {
    .pgl-title {
        font-size: 1.875rem;
    }
}

@media (max-width: 767px) {
    .pgl-title {
        font-size: 1.25rem;
    }
}

/* Product Grid */
.pgl-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1rem;
}

/* Tablet: 2 columns */
@media (min-width: 640px) {
    .pgl-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 1.5rem;
    }
}

/* Desktop: 4 columns */
@media (min-width: 1024px) {
    .pgl-grid {
        grid-template-columns: repeat(4, 1fr);
        gap: 1.5rem;
    }
}

/* Product Card */
.pgl-card {
    background-color: #ffffff;
    border: 1px solid #e5e5e5;
    border-radius: 18px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    transition: all 0.3s ease;
    display: flex;
    flex-direction: column;
    height: 100%;
}

.pgl-card:hover {
    /* Removed hover effects - no transform or shadow change */
}

/* Image Wrapper */
.pgl-image-wrapper {
    position: relative;
    width: 100%;
    padding-top: 100%;
    /* 1:1 Aspect Ratio */
    overflow: hidden;
    background-color: #f9fafb;
}

/* Discount Badge - Circular */
.pgl-discount-badge {
    position: absolute;
    top: 0.5rem;
    right: 0.5rem;
    width: 2.5rem;
    height: 2.5rem;
    min-width: 2.5rem;
    min-height: 2.5rem;
    border-radius: 50%;
    background-color: #dc2626;
    color: #ffffff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 0.75rem;
    line-height: 1;
    z-index: 10;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
    text-align: center;
}

[dir="rtl"] .pgl-discount-badge {
    right: auto;
    left: 0.5rem;
}

@media (max-width: 639px) {
    .pgl-discount-badge {
        width: 2.25rem;
        height: 2.25rem;
        min-width: 2.25rem;
        min-height: 2.25rem;
        font-size: 0.625rem;
        top: 0.375rem;
        right: 0.375rem;
    }

    [dir="rtl"] .pgl-discount-badge {
        right: auto;
        left: 0.375rem;
    }
}

.pgl-image-link {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: block;
}

.pgl-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.pgl-card:hover .pgl-image {
    /* Removed zoom effect on hover */
}

/* Content */
.pgl-content {
    padding: 1rem;
    display: flex;
    flex-direction: column;
    flex-grow: 1;
}

/* Product Title */
.pgl-product-title {
    margin: 0 0 0.75rem 0;
    font-size: 1rem;
    font-weight: 700;
    line-height: 1.5;
    color: #111827;
    text-align: center;
}

.pgl-product-title a {
    color: inherit;
    text-decoration: none;
    transition: color 0.2s ease;
    font-weight: 700;
}

.pgl-product-title a:hover {
    color: #069669;
}

/* Price Wrapper */
.pgl-price-wrapper {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.25rem;
    margin-top: auto;
}

@media (min-width: 768px) {
    .pgl-price-wrapper {
        flex-direction: row;
        gap: 0.5rem;
    }
}

/* Price Styles */
.pgl-price {
    font-family: 'Poppins', sans-serif !important;
    text-align: center;
}

.pgl-price .woocommerce-Price-amount {
    font-family: 'Poppins', sans-serif !important;
}

.pgl-price-sale {
    font-size: 1.25rem;
    font-weight: 700;
    color: #000000;
}

.pgl-price-sale * {
    font-family: 'Poppins', sans-serif !important;
    font-weight: 700 !important;
    color: #000000 !important;
}

.pgl-price-sale .woocommerce-Price-amount {
    font-weight: 700 !important;
    color: #000000 !important;
}

.pgl-price-sale .woocommerce-Price-currencySymbol {
    font-weight: 700 !important;
    color: #000000 !important;
}

.pgl-price-regular {
    font-size: 0.875rem;
    color: #ff0000;
    text-decoration: line-through;
    font-weight: 700;
}

.pgl-price-regular * {
    font-family: 'Poppins', sans-serif !important;
    font-weight: 700 !important;
    color: #ff0000 !important;
    text-decoration: line-through !important;
}

.pgl-price-regular .woocommerce-Price-amount {
    font-weight: 700 !important;
    color: #ff0000 !important;
    text-decoration: line-through !important;
}

.pgl-price-regular .woocommerce-Price-currencySymbol {
    font-weight: 700 !important;
    color: #ff0000 !important;
    text-decoration: line-through !important;
}

.pgl-price-current {
    font-size: 1.25rem;
    font-weight: 700;
    color: #000000;
}

.pgl-price-current * {
    font-family: 'Poppins', sans-serif !important;
    font-weight: 700 !important;
    color: #000000 !important;
}

.pgl-price-current .woocommerce-Price-amount {
    font-weight: 700 !important;
    color: #000000 !important;
}

.pgl-price-current .woocommerce-Price-currencySymbol {
    font-weight: 700 !important;
    color: #000000 !important;
}

/* Responsive Adjustments */
@media (max-width: 639px) {
    .pgl-section {
        padding: 2rem 0;
    }

    .pgl-title {
        font-size: 1.5rem;
        padding: 0.5rem 1rem;
    }

    .pgl-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 0.75rem;
    }

    .pgl-content {
        padding: 0.75rem;
    }

    .pgl-product-title {
        font-size: 0.875rem;
    }

    .pgl-price-sale {
        font-size: 1rem !important;
    }
    
    .pgl-price-regular {
        font-size: 0.75rem !important;
    }
    
    .pgl-price-current {
        font-size: 1rem !important;
    }
}

/* RTL Support */
[dir="rtl"] .pgl-price-wrapper {
    flex-direction: row-reverse;
}