/**
 * Product List Pro Section Styles
 * Boxed on all devices
 */

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

/* Section Header */
.plp-header {
    width: 100%;
    margin-bottom: 1.5rem;
    text-align: center;
}

.plp-title {
    position: relative;
    width: 100%;
    margin: 0 auto;
    background-color: #069669;
    color: #ffffff;
    border-radius: 12px;
    padding: 0.5rem 1rem;
    font-size: 1.125rem;
    font-weight: 900;
    text-align: center;
    word-wrap: break-word;
    display: block;
    /* No shadow, no animation, no hover */
}

@media (min-width: 768px) {
    .plp-title {
        font-size: 1.25rem;
        padding: 0.625rem 1.25rem;
    }
}

@media (min-width: 1024px) {
    .plp-title {
        font-size: 1.375rem;
        padding: 0.75rem 1.5rem;
    }
}

@media (max-width: 639px) {
    .plp-header {
        margin-bottom: 1rem;
    }
    
    .plp-title {
        font-size: 0.9375rem;
        padding: 0.5rem 0.875rem;
    }
}

/* Container - Boxed on all devices */
.plp-container {
    width: 100%;
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 1rem;
}

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

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

/* Product Grid */
.plp-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 0.5rem;
    width: 100%;
}

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

/* Product Card */
.plp-card {
    background-color: #ffffff;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    height: 100%;
    /* No hover effects */
}

/* Image Wrapper */
.plp-image-wrapper {
    position: relative;
    width: 100%;
    overflow: hidden;
    background-color: #f9fafb;
}

/* Square Image (1:1 Aspect Ratio) */
.plp-image-wrapper.plp-image-square {
    padding-top: 100%; /* 1:1 Aspect Ratio */
}

/* Landscape 4:3 Aspect Ratio */
.plp-image-wrapper.plp-image-landscape-43 {
    padding-top: 75%; /* 4:3 Aspect Ratio (3/4 = 0.75) */
}

/* Landscape 16:9 Aspect Ratio */
.plp-image-wrapper.plp-image-landscape-169 {
    padding-top: 56.25%; /* 16:9 Aspect Ratio (9/16 = 0.5625) */
}

/* Portrait 3:2 Aspect Ratio */
.plp-image-wrapper.plp-image-portrait-32 {
    padding-top: 150%; /* 3:2 Portrait (2/3 = 0.666, but we need 3/2 = 1.5 for portrait) */
}

/* Portrait 2:3 Aspect Ratio */
.plp-image-wrapper.plp-image-portrait-23 {
    padding-top: 150%; /* 2:3 Portrait (3/2 = 1.5) */
}

/* Original Image Aspect Ratio - Fixed for WordPress Online */
.plp-image-wrapper.plp-image-original {
    padding-top: 0 !important;
    height: auto !important;
    min-height: 200px;
    max-height: 500px;
    display: block !important;
}

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

/* Original aspect ratio link - Fixed */
.plp-image-wrapper.plp-image-original .plp-image-link {
    position: relative !important;
    width: 100% !important;
    height: auto !important;
    display: block !important;
    top: auto !important;
    left: auto !important;
}

.plp-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    /* No zoom on hover */
    transition: none;
}

/* Original aspect ratio image - Fixed for WordPress Online */
.plp-image-wrapper.plp-image-original .plp-image {
    width: 100% !important;
    height: auto !important;
    object-fit: contain !important;
    max-height: 500px !important;
    display: block !important;
    position: relative !important;
}

/* Landscape aspect ratios images */
.plp-image-wrapper.plp-image-landscape-43 .plp-image,
.plp-image-wrapper.plp-image-landscape-169 .plp-image {
    object-fit: cover;
}

/* Portrait aspect ratios images */
.plp-image-wrapper.plp-image-portrait-32 .plp-image,
.plp-image-wrapper.plp-image-portrait-23 .plp-image {
    object-fit: cover;
}

/* Responsive adjustments for original aspect ratio */
@media (max-width: 639px) {
    .plp-image-wrapper.plp-image-original {
        min-height: 150px;
        max-height: 350px;
    }
    
    .plp-image-wrapper.plp-image-original .plp-image {
        max-height: 350px;
    }
}

@media (min-width: 1024px) {
    .plp-image-wrapper.plp-image-original {
        min-height: 250px;
        max-height: 600px;
    }
    
    .plp-image-wrapper.plp-image-original .plp-image {
        max-height: 600px;
    }
}

.plp-card:hover .plp-image {
    transform: none;
    scale: 1;
}

/* Discount Badge - Rectangular (top-left) */
.plp-discount-badge {
    position: absolute;
    top: 0.5rem;
    left: 0.5rem;
    background-color: #dc2626;
    color: #ffffff;
    padding: 0.25rem 0.5rem;
    border-radius: 4px;
    font-weight: 700;
    font-size: 0.75rem;
    line-height: 1.2;
    z-index: 10;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.15);
}

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

@media (max-width: 639px) {
    .plp-discount-badge {
        font-size: 0.625rem;
        padding: 0.2rem 0.4rem;
        top: 0.375rem;
        left: 0.375rem;
    }
    
    [dir="rtl"] .plp-discount-badge {
        left: auto;
        right: 0.375rem;
    }
}

/* Content */
.plp-content {
    padding: 0.75rem;
    display: flex;
    flex-direction: column;
    flex-grow: 1;
    gap: 0.25rem;
}

@media (min-width: 1024px) {
    .plp-content {
        padding: 1rem;
        gap: 0.5rem;
    }
}

/* Product Title - Full Width */
.plp-product-title {
    margin: 0 0 0.25rem 0;
    padding: 0;
    font-size: 0.875rem;
    font-weight: 600;
    line-height: 1.4;
    color: #111827;
    text-align: center;
    width: 100%;
    min-height: auto;
    display: block;
}

.plp-product-title a {
    color: inherit;
    text-decoration: none;
    transition: none;
    display: block;
    width: 100%;
    text-align: center;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    padding: 0;
}

.plp-product-title a:hover {
    color: inherit;
}

@media (min-width: 1024px) {
    .plp-product-title {
        font-size: 1rem;
        margin-bottom: 0.375rem;
    }
}

/* Price Wrapper - Inline (row) */
.plp-price-wrapper {
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    margin: 0;
    flex-wrap: wrap;
}

/* Price Styles */
.plp-price {
    font-family: 'Poppins', sans-serif !important;
    text-align: center;
    line-height: 1.2;
    white-space: nowrap;
}

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

.plp-price-sale {
    font-size: 0.875rem;
    font-weight: 800;
    color: #374151;
}

.plp-price-sale * {
    font-family: 'Poppins', sans-serif !important;
    font-weight: 800 !important;
    color: #374151 !important;
}

.plp-price-regular {
    font-size: 0.75rem;
    color: #dc2626;
    text-decoration: line-through;
    font-weight: 500;
}

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

.plp-price-current {
    font-size: 0.875rem;
    font-weight: 800;
    color: #374151;
}

.plp-price-current * {
    font-family: 'Poppins', sans-serif !important;
    font-weight: 800 !important;
    color: #374151 !important;
}

@media (min-width: 1024px) {
    .plp-price-sale {
        font-size: 1rem;
    }
    
    .plp-price-regular {
        font-size: 0.875rem;
    }
    
    .plp-price-current {
        font-size: 1rem;
    }
}

/* Buttons */
.plp-buttons {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    margin-top: auto;
    padding-top: 0.5rem;
}

.plp-btn {
    width: 100%;
    padding: 0.625rem 1rem;
    border: none;
    border-radius: 8px;
    font-weight: 700;
    font-size: 0.875rem;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    text-decoration: none;
    font-family: inherit;
}

.plp-btn-icon {
    width: 1rem;
    height: 1rem;
    flex-shrink: 0;
}

.plp-btn.grid-add-to-cart {
    background-color: #2563eb;
    color: #ffffff;
}

.plp-btn.grid-add-to-cart:hover {
    background-color: #1d4ed8;
    color: #ffffff;
}

.plp-btn.grid-buy-now {
    background-color: #60a5fa;
    color: #ffffff;
}

.plp-btn.grid-buy-now:hover {
    background-color: #3b82f6;
    color: #ffffff;
}

@media (min-width: 1024px) {
    .plp-btn {
        padding: 0.75rem 1rem;
        font-size: 1rem;
    }
    
    .plp-btn-icon {
        width: 1.125rem;
        height: 1.125rem;
    }
}

/* View More Button */
.plp-view-more-wrapper {
    width: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
    margin-top: 2rem;
    padding: 0 1rem;
}

.plp-view-more-button {
    display: inline-block;
    padding: 0.75rem 2rem;
    background-color: #ffffff;
    color: #111827;
    text-decoration: none;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    font-weight: 600;
    font-size: 1rem;
    text-align: center;
    /* No shadow, no hover effects */
}

@media (max-width: 639px) {
    .plp-view-more-wrapper {
        margin-top: 1.5rem;
        padding: 0 0.75rem;
    }
    
    .plp-view-more-button {
        padding: 0.625rem 1.5rem;
        font-size: 0.875rem;
    }
}

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

[dir="rtl"] .plp-buttons {
    flex-direction: column;
}

/* Pagination */
.plp-pagination {
    width: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
    margin-top: 2rem;
    padding: 0 1rem;
}

.plp-pagination .page-numbers {
    display: flex;
    gap: 0.5rem;
    list-style: none;
    padding: 0;
    margin: 0;
    align-items: center;
    justify-content: center;
    flex-wrap: wrap;
}

.plp-pagination .page-numbers li {
    margin: 0;
    list-style: none;
}

.plp-pagination .page-numbers a,
.plp-pagination .page-numbers span {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 2.5rem;
    height: 2.5rem;
    min-width: 2.5rem;
    min-height: 2.5rem;
    padding: 0;
    background-color: #ffffff;
    color: #111827;
    text-decoration: none;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    font-weight: 600;
    font-size: 0.875rem;
    transition: all 0.2s ease;
}

.plp-pagination .page-numbers .current {
    background-color: #e5e7eb;
    color: #111827;
    border-color: #e5e7eb;
}

.plp-pagination .page-numbers a:hover {
    background-color: #f3f4f6;
    border-color: #d1d5db;
}

/* Pagination Icons */
.plp-pagination-icon {
    width: 1.25rem;
    height: 1.25rem;
    display: block;
}

.plp-pagination .page-numbers .prev a,
.plp-pagination .page-numbers .next a {
    width: 2.5rem;
    height: 2.5rem;
}

@media (min-width: 1024px) {
    .plp-pagination .page-numbers {
        gap: 0.75rem;
    }
    
    .plp-pagination .page-numbers a,
    .plp-pagination .page-numbers span {
        width: 3rem;
        height: 3rem;
        min-width: 3rem;
        min-height: 3rem;
        font-size: 1rem;
    }
    
    .plp-pagination .page-numbers .prev a,
    .plp-pagination .page-numbers .next a {
        width: 3rem;
        height: 3rem;
    }
    
    .plp-pagination-icon {
        width: 1.5rem;
        height: 1.5rem;
    }
}

@media (max-width: 639px) {
    .plp-pagination {
        margin-top: 1.5rem;
        padding: 0 0.75rem;
    }
    
    .plp-pagination .page-numbers {
        gap: 0.375rem;
    }
    
    .plp-pagination .page-numbers a,
    .plp-pagination .page-numbers span {
        width: 2.25rem;
        height: 2.25rem;
        min-width: 2.25rem;
        min-height: 2.25rem;
        font-size: 0.8125rem;
    }
    
    .plp-pagination .page-numbers .prev a,
    .plp-pagination .page-numbers .next a {
        width: 2.25rem;
        height: 2.25rem;
    }
    
    .plp-pagination-icon {
        width: 1rem;
        height: 1rem;
    }
}

/* No Products Message */
.plp-no-products {
    text-align: center;
    padding: 3rem 1rem;
    color: #6b7280;
    font-size: 1.125rem;
}

/* Responsive Adjustments */
@media (max-width: 639px) {
    .plp-section {
        padding: 1rem 0;
    }
    
    .plp-container {
        padding: 0 0.75rem;
    }
    
    .plp-content {
        padding: 0.625rem;
        gap: 0.25rem;
    }
    
    .plp-product-title {
        font-size: 0.8125rem;
        margin-bottom: 0.25rem;
    }
    
    .plp-product-title a {
        font-size: 0.8125rem;
    }
    
    .plp-price-wrapper {
        gap: 0.375rem;
    }
    
    .plp-price-sale {
        font-size: 0.75rem !important;
        font-weight: 800 !important;
    }
    
    .plp-price-regular {
        font-size: 0.625rem !important;
    }
    
    .plp-price-current {
        font-size: 0.75rem !important;
        font-weight: 800 !important;
    }
    
    .plp-btn {
        padding: 0.5rem 0.875rem;
        font-size: 0.8125rem;
    }
    
    .plp-btn-icon {
        width: 0.875rem;
        height: 0.875rem;
    }
}

