/**
* Category ProductsGrid Styles - SCOPED VERSION
* PrestaShop 1.7 Module
*/

/* Main Container */
.category-products-grid-wrapper {
    padding: 30px 0;
    width: 100%;
    max-width: 100%;
}

/* Top Toolbar */
.category-products-grid-wrapper .top-toolbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    padding: 15px;
    background: #fff;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    gap: 20px;
}

.category-products-grid-wrapper .top-pagination {
    display: flex;
    align-items: center;
}

.category-products-grid-wrapper .top-pagination .pagination-nav {
    margin: 0;
}

.category-products-grid-wrapper .top-pagination .pagination {
    margin: 0;
}

/* Products Per Page Selector */
.category-products-grid-wrapper .products-per-page-selector {
    display: flex;
    align-items: center;
    gap: 10px;
}

.category-products-grid-wrapper .products-per-page-selector label {
    font-size: 14px;
    font-weight: 600;
    color: #333;
    margin: 0;
}

.category-products-grid-wrapper .products-per-page-select {
    padding: 8px 32px 8px 12px;
    font-size: 14px;
    font-weight: 500;
    color: #333;
    border: 1px solid #ddd;
    border-radius: 4px;
    background: #fff;
    cursor: pointer;
    appearance: none;
    transition: all 0.2s ease;
}

.category-products-grid-wrapper .products-per-page-select:hover {
    border-color: #007bff;
    box-shadow: 0 2px 4px rgba(0, 123, 255, 0.1);
}

.category-products-grid-wrapper .products-per-page-select:focus {
    outline: 2px solid #007bff;
    outline-offset: 2px;
    border-color: #007bff;
}

/* Pagination Controls */
.category-products-grid-wrapper .pagination-controls {
    margin-top: 30px;
}

/* Products Grid Layout */
.category-products-grid-wrapper .products-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 25px;
    margin-bottom: 40px;
    padding: 0;
    list-style: none;
}

/* Product Item Card */
.category-products-grid-wrapper .product-item {
    border: 1px solid #e8e8e8;
    border-radius: 8px;
    padding: 20px;
    background: #ffffff;
    transition: all 0.3s ease;
    display: flex;
    flex-direction: column;
    position: relative;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

.category-products-grid-wrapper .product-item:hover {
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.12);
    transform: translateY(-4px);
    border-color: #007bff;
    z-index: 10;
}

/* Product Thumbnail */
.category-products-grid-wrapper .product-thumbnail {
    text-align: center;
    margin-bottom: 15px;
    overflow: hidden;
    border-radius: 6px;
    background: #f8f9fa;
    position: relative;
    aspect-ratio: 1 / 1;
    display: flex;
    align-items: center;
    justify-content: center;
}

.category-products-grid-wrapper .product-thumbnail a {
    display: block;
    width: 100%;
    height: 100%;
}

.category-products-grid-wrapper .product-image {
    width: 100%;
    height: 100%;
    object-fit: contain;
    transition: transform 0.4s ease;
    padding: 10px;
}

.category-products-grid-wrapper .product-item:hover .product-image {
    transform: scale(1.08);
}

.category-products-grid-wrapper .product-image.no-image {
    opacity: 0.3;
}

/* Product Information */
.category-products-grid-wrapper .product-info {
    flex: 1;
    display: flex;
    flex-direction: column;
}

.category-products-grid-wrapper .product-name {
    font-size: 14px;
    font-weight: 600;
    line-height: 1.4;
    margin-bottom: 5px;}

.category-products-grid-wrapper .product-name a {
    color: #2c3e50;
    text-decoration: none;
    transition: color 0.3s ease;
}

.category-products-grid-wrapper .product-name a:hover {
    color: #007bff;
}

.category-products-grid-wrapper .product-index {
font-size: 16px;
    color: rgb(102, 102, 102);
    margin-top: auto;}

.category-products-grid-wrapper .index-label {
    font-weight: 600;
    color: #495057;
}

.category-products-grid-wrapper .index-value {
    font-family: 'Courier New', monospace;
    font-size: 12px;
    background: #f8f9fa;
    padding: 2px 8px;
    border-radius: 3px;
}

/* Product Prices */
.category-products-grid-wrapper .product-prices {
    margin-bottom: 15px;
    padding: 10px 0;
}

.category-products-grid-wrapper .price-line {
    display: flex;
    justify-content: space-between;
    margin-bottom: 6px;
    font-size: 14px;
}

.category-products-grid-wrapper .price-label {
    color: #6c757d;
    font-weight: 500;
    font-size: 13px;
}

.category-products-grid-wrapper .price-label2 {
    color: #fdb819;
    font-size: 16px;
    font-weight: 600;}


.category-products-grid-wrapper .price-value {
    font-weight: 700;
    font-size: 15px;
}

.category-products-grid-wrapper .price-gross .price-value {
    color: #007bff;
    font-size: 18px;
}

/* Add to Cart Form */
.category-products-grid-wrapper .add-to-cart-form {
    margin-top: auto;
}

.category-products-grid-wrapper .quantity-selector {
    margin-bottom: 12px;
}

.category-products-grid-wrapper .quantity-label {
    display: block;
    margin-bottom: 8px;
    font-size: 13px;
    font-weight: 600;
}

.category-products-grid-wrapper .quantity-input-wrapper {
    display: flex;
    align-items: center;
    border: 1px solid #dee2e6;
    border-radius: 6px;
    overflow: hidden;
}

.category-products-grid-wrapper .quantity-input {
    width: 60px;
    padding: 8px 5px;
    border: none;
    text-align: center;
    font-size: 15px;
    font-weight: 600;
}

.category-products-grid-wrapper .qty-btn {
    width: 36px;
    height: 36px;
    border: none;
    background: #f8f9fa;
    cursor: pointer;
    transition: all 0.2s ease;
}

.category-products-grid-wrapper .qty-btn:hover {
    background: #007bff;
    color: #ffffff;
}

.category-products-grid-wrapper .add-to-cart-btn {
width: 100%;
    padding: 12px 20px;
    background: #fdb819;
    color: #fff;
    border: none;
    border-radius: 4px;
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s 
ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    margin-top: 5px;}

.category-products-grid-wrapper .add-to-cart-btn:hover {
    background: #0056b3;
    transform: translateY(-2px);
}

/* Pagination Wrapper */
.category-products-grid-wrapper .pagination-wrapper {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 15px;
    margin-top: 40px;
    padding: 20px 0;
}

.category-products-grid-wrapper .pagination {
    display: flex;
    list-style: none;
    padding: 0;
    margin: 0;
    gap: 6px;
}

.category-products-grid-wrapper .page-link {
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 40px;
    height: 40px;
    padding: 8px 12px;
    border: 1px solid #dee2e6;
    border-radius: 6px;
    color: #007bff;
    text-decoration: none;
    transition: all 0.3s ease;
}

.category-products-grid-wrapper .page-link:hover {
    background: #007bff;
    color: #ffffff;
}

.category-products-grid-wrapper .page-item.active .page-link {
    background: #007bff;
    color: #ffffff;
}

.category-products-grid-wrapper .page-item.disabled .page-link {
    color: #6c757d;
    cursor: not-allowed;
    opacity: 0.5;
}

.category-products-grid-wrapper .page-item.page-dots .page-link {
    border: none;
    background: transparent;
    color: #666;
    cursor: default;
    pointer-events: none;
}

.category-products-grid-wrapper .pagination-info {
    text-align: center;
    color: #6c757d;
    font-size: 14px;
}

/* Responsive */
@media (max-width: 768px) {
    .category-products-grid-wrapper .top-toolbar {
        flex-direction: column;
        gap: 15px;
    }
    
    .category-products-grid-wrapper .products-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 12px;
    }
}
