/* Product Listing Page Redesign */

/* Main container styling */
.product-listing-main {
    background-color: #ffffff;
    min-height: 100vh;
    padding: 0 5rem;
}

/* Mobile responsive padding */
@media (max-width: 991px) {
    .product-listing-main {
        padding: 0 2rem;
    }
}

@media (max-width: 768px) {
    .product-listing-main {
        padding: 0 1rem;
    }
}

@media (max-width: 480px) {
    .product-listing-main {
        padding: 0 0.5rem;
    }
}

/* Header section with title and controls */
.product-listing-header {
    background-color: #ffffff;
    padding: 2rem 0 1rem 0;
    border-bottom: 1px solid #f0f0f0;
}

.product-listing-title {
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--secondary-hard);
    margin: 0;
    font-family: 'Poppins', sans-serif;
}

.product-listing-controls {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    margin-top: 1rem;
}

.filter-sort-section {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--secondary-hard);
    font-weight: 500;
}

.filter-sort-icon {
    width: 20px;
    height: 20px;
    color: var(--secondary-hard);
}

.product-count {
    color: var(--secondary-hard);
    font-weight: 500;
    font-size: 1rem;
}

/* Product grid container */
.product-grid-container {
    padding: 2rem 0;
}

.product-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 2rem;
    margin-top: 2rem;
}

/* Product item wrapper (card + details) */
.product-item-wrapper {
    display: flex;
    flex-direction: column;
}

/* Product card styling */
.product-card-modern {
    background: #ffffff;
    border-radius: 0;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    transition: all 0.3s ease;
    position: relative;
    border: 1px solid #f5f5f5;
}

.product-card-modern:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
}

/* Product image container */
.product-image-container {
    position: relative;
    width: 100%;
    height: 250px;
    overflow: hidden;
    background: #fafafa;
}

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

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

/* Discount badge - moved to right side */
.discount-badge {
    position: absolute;
    top: 12px;
    right: 12px;
    background-color: var(--primary-soft);
    color: #ffffff;
    padding: 4px 8px;
    border-radius: 6px;
    font-size: 0.75rem;
    font-weight: 600;
    z-index: 2;
}

/* Product details (outside card) */
.product-details {
    padding: 0;
    margin-top: 0.5rem;
    min-height: 120px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.product-name {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--secondary-hard);
    margin: 0 0 0.5rem 0;
    line-height: 1.4;
    font-family: 'Poppins', sans-serif;
}

/* Price section */
.price-section {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
    margin: 0.5rem 0;
}

.price-row {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.current-price {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--secondary-hard);
    margin: 0;
}

.original-price {
    font-size: 1rem;
    color: #9ca3af;
    text-decoration: line-through;
    margin: 0;
}

/* Add to cart button */
.add-to-cart-btn-modern {
    width: 100%;
    padding: 12px 16px;
    background-color: #ffffff;
    border: 2px solid var(--secondary-hard);
    color: var(--secondary-hard);
    border-radius: 8px;
    font-weight: 600;
    font-size: 0.9rem;
    transition: all 0.3s ease;
    cursor: pointer;
    text-decoration: none;
    display: inline-block;
    text-align: center;
    margin-top: auto;
}

.add-to-cart-btn-modern:hover {
    background-color: var(--secondary-hard);
    color: #ffffff;
    text-decoration: none;
}

/* Favorite Icon for Product Listing - hidden from right side */
.product-favorite {
    display: none;
}

.product-favorite .add-to-fav-btn {
    background: rgba(255, 255, 255, 0.9);
    border-radius: 50%;
    width: 36px;
    height: 36px;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    cursor: pointer;
    transition: all 0.3s ease;
    backdrop-filter: blur(4px);
}

.product-favorite .add-to-fav-btn .ion-icon {
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
}

.product-favorite .add-to-fav-btn:hover {
    background: rgba(255, 255, 255, 1);
    transform: scale(1.1);
}

.product-favorite .ion-icon {
    font-size: 18px;
    transition: all 0.3s ease;
}

.product-favorite .add-to-fav-btn:hover .ion-icon {
    transform: scale(1.2);
}

/* Hover Icons (Compare & Quick View) for Product Listing */
.product-hover-icons {
    position: absolute;
    top: 12px;
    left: 12px;
    display: flex;
    flex-direction: column;
    gap: 8px;
    opacity: 0;
    transform: translateY(-10px);
    transition: all 0.3s ease;
    z-index: 3;
}

.product-card-modern:hover .product-hover-icons {
    opacity: 1;
    transform: translateY(0);
}

/* Always visible icons on mobile and tablet screens */
@media (max-width: 999px) {
    .product-hover-icons {
        opacity: 1;
        transform: translateY(0);
    }
}

.product-icon-space {
    display: flex;
    align-items: center;
    justify-content: center;
}

.product-icon-space .shuffle-box,
.product-icon-space .heart-box {
    background: rgba(255, 255, 255, 0.9);
    border-radius: 50%;
    width: 36px;
    height: 36px;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    cursor: pointer;
    transition: all 0.3s ease;
    backdrop-filter: blur(4px);
}

.product-icon-space .heart-box .add-to-fav-btn {
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    width: 100%;
    height: 100%;
}

.product-icon-space .shuffle-box:hover,
.product-icon-space .heart-box:hover {
    background: rgba(255, 255, 255, 1);
    transform: scale(1.1);
}

.product-icon-space .ion-icon {
    font-size: 18px;
    color: var(--secondary-hard);
    transition: all 0.3s ease;
}

.product-icon-space .shuffle-box:hover .ion-icon,
.product-icon-space .heart-box:hover .ion-icon {
    color: var(--primary-soft);
    transform: scale(1.2);
}

/* Filter sidebar */
.filter-sidebar {
    background: #ffffff;
    border-radius: 12px;
    padding: 1.5rem;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    height: fit-content;
    position: sticky;
    top: 2rem;
}

.filter-title {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--secondary-hard);
    margin: 0 0 1.5rem 0;
    font-family: 'Poppins', sans-serif;
}

/* Filter sections */
.filter-section-modern {
    margin-bottom: 1.5rem;
    border-bottom: 1px solid #f0f0f0;
    padding-bottom: 1rem;
}

.filter-section-modern:last-child {
    border-bottom: none;
    margin-bottom: 0;
}

/* Stock status filter styling */
.filter-option {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 0;
    cursor: pointer;
    transition: all 0.3s ease;
}

.filter-option:hover {
    background-color: #f8fafc;
    border-radius: 6px;
    padding-left: 0.5rem;
}

.filter-checkbox {
    width: 16px;
    height: 16px;
    accent-color: var(--primary-soft);
    cursor: pointer;
}

.filter-label {
    font-size: 0.9rem;
    color: var(--secondary-hard);
    margin: 0;
    cursor: pointer;
    font-weight: 500;
}


.filter-section-title {
    font-size: 1rem;
    font-weight: 600;
    color: var(--secondary-hard);
    margin: 0 0 1rem 0;
    display: flex;
    align-items: center;
    justify-content: space-between;
    cursor: pointer;
}

.filter-options {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.filter-option {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 0;
}

.filter-checkbox {
    width: 16px;
    height: 16px;
    accent-color: var(--primary-soft);
}

.filter-label {
    font-size: 0.9rem;
    color: var(--secondary-hard);
    margin: 0;
    cursor: pointer;
}

/* Brand filter */
.brand-filter {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    margin-top: 1rem;
}

.brand-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    transition: all 0.3s ease;
    cursor: pointer;
}

.brand-item:hover {
    border-color: var(--primary-soft);
    background-color: #f8fafc;
}

.brand-item.selected {
    border-color: var(--primary-soft);
    background-color: var(--primary-soft);
    color: #ffffff;
}

.brand-image {
    width: 30px;
    height: 30px;
    object-fit: contain;
    border-radius: 4px;
}

/* Filter buttons */
.filter-buttons {
    display: flex;
    gap: 1rem;
    margin-top: 2rem;
}

.filter-btn {
    flex: 1;
    padding: 12px 16px;
    border: none;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.filter-btn-primary {
    background-color: var(--primary-soft);
    color: #ffffff;
}

.filter-btn-primary:hover {
    background-color: var(--primary-color);
}

.filter-btn-secondary {
    background-color: #f3f4f6;
    color: var(--secondary-hard);
    border: 1px solid #d1d5db;
}

.filter-btn-secondary:hover {
    background-color: #e5e7eb;
}

/* Mobile filter buttons - removed, using tablet filter instead */

/* Tablet Filter Section */
.tablet-filter-section {
    background: #ffffff;
    border-radius: 12px;
    padding: 1.5rem;
    margin-bottom: 2rem;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    border: 1px solid #f5f5f5;
}

.tablet-filter-container {
    width: 100%;
}

.tablet-filter-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    cursor: pointer;
    padding: 0.5rem 0;
    border-bottom: 1px solid #f0f0f0;
    margin-bottom: 1rem;
}

.tablet-filter-title {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--secondary-hard);
    margin: 0;
    font-family: 'Poppins', sans-serif;
}

.tablet-filter-toggle {
    transition: transform 0.3s ease;
    color: var(--secondary-hard);
}

.tablet-filter-content {
    display: none;
}

.tablet-filter-content {
    width: 100%;
}


.tablet-filter-group {
    margin-bottom: 1.5rem;
    border-bottom: 1px solid #f0f0f0;
    padding-bottom: 1rem;
}

.tablet-filter-group:last-child {
    margin-bottom: 0;
    border-bottom: none;
    padding-bottom: 0;
}

.tablet-filter-group-title {
    font-size: 1rem;
    font-weight: 600;
    color: var(--secondary-hard);
    margin: 0 0 1rem 0;
    display: flex;
    align-items: center;
    justify-content: space-between;
    cursor: pointer;
    padding: 0.5rem 0;
}

.tablet-filter-group-toggle {
    transition: transform 0.3s ease;
    color: var(--secondary-hard);
}

.tablet-filter-options {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    padding: 1rem 0;
}

.tablet-filter-option {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 0;
    cursor: pointer;
    transition: all 0.3s ease;
}

.tablet-filter-option:hover {
    background-color: #f8fafc;
    border-radius: 6px;
    padding-left: 0.5rem;
}

.tablet-filter-option input[type="checkbox"]:checked + .tablet-filter-label,
.tablet-filter-option input[type="radio"]:checked + .tablet-filter-label {
    color: var(--primary-soft);
    font-weight: 600;
}

.tablet-filter-label {
    font-size: 0.9rem;
    color: var(--secondary-hard);
    margin: 0;
    cursor: pointer;
    font-weight: 500;
}

.tablet-brand-section {
    margin-bottom: 1.5rem;
}

.tablet-brand-title {
    font-size: 1rem;
    font-weight: 600;
    color: var(--secondary-hard);
    margin: 0 0 1rem 0;
    display: flex;
    align-items: center;
    justify-content: space-between;
    cursor: pointer;
    padding: 0.5rem 0;
    border-bottom: 1px solid #f0f0f0;
}

.tablet-brand-toggle {
    transition: transform 0.3s ease;
    color: var(--secondary-hard);
}

.tablet-brand-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(80px, 1fr));
    gap: 0.5rem;
    padding: 1rem 0;
}

.tablet-brand-item {
    display: flex;
    align-items: center;
    justify-content: center;
}

.tablet-brand-label {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    transition: all 0.3s ease;
    cursor: pointer;
    background: #ffffff;
}

.tablet-brand-label:hover {
    border-color: var(--primary-soft);
    background-color: #f8fafc;
}

.tablet-brand-label input[type="radio"]:checked + img {
    opacity: 0.7;
}

.tablet-brand-label:has(input[type="radio"]:checked) {
    border-color: var(--primary-soft);
    background-color: var(--primary-soft);
    color: #ffffff;
}

.tablet-brand-label img {
    width: 30px;
    height: 30px;
    object-fit: contain;
    border-radius: 4px;
}

.tablet-filter-actions {
    display: flex;
    gap: 1rem;
    justify-content: center;
    padding-top: 1rem;
    border-top: 1px solid #f0f0f0;
}

.tablet-filter-actions .btn {
    padding: 10px 20px;
    font-weight: 600;
    border-radius: 8px;
}

/* Tablet View Toggle */
.tablet-view-toggle {
    display: flex;
    flex-direction: row;
    gap: 0.5rem;
    padding: 1rem 0;
}

.tablet-view-toggle-btn {
    padding: 8px 12px;
    background: #ffffff;
    border: 2px solid var(--primary-soft);
    color: var(--primary-soft);
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.9rem;
    font-weight: 500;
    width: 100%;
    justify-content: center;
    white-space: nowrap;
    min-width: 0;
}

.tablet-view-toggle-btn.active {
    background-color: var(--primary-soft);
    color: #ffffff;
}

.tablet-view-toggle-btn:hover {
    background-color: var(--primary-soft);
    color: #ffffff;
}


/* Responsive design */
@media (max-width: 1200px) {
    .product-grid {
        grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
        gap: 1.5rem;
    }
}

/* Desktop screens - hide tablet filter */
@media (min-width: 1000px) {
    .tablet-filter-section {
        display: none !important;
    }
}

/* Tablet and Mobile screens - show tablet filter */
@media (max-width: 999px) {
    .tablet-filter-section {
        display: block !important;
    }
    
    .filter-sidebar {
        display: none;
    }
    
    .product-listing-controls {
        flex-direction: column;
        align-items: flex-start;
        gap: 1rem;
    }
    
    .product-listing-title {
        font-size: 2rem;
    }
    
    .product-listing-header {
        padding: 1.5rem 0 1rem 0;
    }
    
    /* Add padding from top to account for fixed navbar */
    .product-listing-main {
        padding-top: 1rem;
    }
    
    /* Add padding from top before category name on tablet */
    .category-section {
        padding-top: 2rem;
    }
}

/* Tablet filter responsive adjustments */
@media (max-width: 991px) {
    .tablet-filter-options {
        gap: 0.5rem;
    }
    
    .tablet-filter-option {
        padding: 0.4rem 0.6rem;
        font-size: 0.85rem;
    }
    
    .tablet-brand-grid {
        gap: 0.5rem;
    }
    
    .tablet-brand-label {
        padding: 0.5rem;
    }
    
    .tablet-brand-label img {
        width: 25px;
        height: 25px;
    }
}

@media (max-width: 768px) {
    .product-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 1rem;
    }
    
    .product-image-container {
        height: 180px;
    }
    
    .product-details {
        padding: 0.75rem;
    }
    
    .product-name {
        font-size: 0.9rem;
        line-height: 1.3;
    }
    
    .current-price {
        font-size: 1rem;
    }
    
    .original-price {
        font-size: 0.85rem;
    }
    
    .add-to-cart-btn-modern {
        padding: 8px 12px;
        font-size: 0.8rem;
    }
    
    .product-listing-header {
        padding: 1rem 0 0.75rem 0;
    }
    
    .product-listing-title {
        font-size: 1.75rem;
    }
    
    .tablet-filter-section {
        padding: 1rem;
        margin-bottom: 1.5rem;
    }
    
    .tablet-filter-title {
        font-size: 1.25rem;
        margin-bottom: 1rem;
    }
    
    .tablet-filter-actions {
        flex-direction: column;
        gap: 0.75rem;
    }
    
    .tablet-filter-actions .btn {
        width: 100%;
        padding: 12px 16px;
    }
}

@media (max-width: 480px) {
    .product-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 0.5rem;
    }
    
    .product-image-container {
        height: 160px;
    }
    
    .product-details {
        padding: 0.5rem;
    }
    
    .product-listing-title {
        font-size: 1.5rem;
    }
    
    
    .product-name {
        font-size: 0.85rem;
        line-height: 1.2;
    }
    
    .current-price {
        font-size: 0.9rem;
    }
    
    .original-price {
        font-size: 0.8rem;
    }
    
    .add-to-cart-btn-modern {
        padding: 6px 10px;
        font-size: 0.75rem;
    }
    
    .product-listing-header {
        padding: 0.75rem 0 0.5rem 0;
    }
    
    .product-count {
        font-size: 0.9rem;
    }
}

/* List view styling */
.product-list-view {
    display: none;
}

.product-list-view.active {
    display: block;
}

.product-list-item {
    background: #ffffff;
    border-radius: 12px;
    padding: 1.5rem;
    margin-bottom: 1rem;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    border: 1px solid #f5f5f5;
    transition: all 0.3s ease;
}

.product-list-item:hover {
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.12);
}

.product-list-content {
    display: flex;
    gap: 1.5rem;
    align-items: center;
}

/* Mobile list view responsiveness */
@media (max-width: 768px) {
    .product-list-content {
        flex-direction: column;
        gap: 1rem;
        text-align: center;
    }
    
    .product-list-image {
        width: 100px;
        height: 100px;
    }
    
    .product-list-name {
        font-size: 1.1rem;
    }
    
    .product-list-description {
        font-size: 0.85rem;
    }
    
    .product-list-price {
        font-size: 1.2rem;
    }
}

@media (max-width: 480px) {
    .product-list-content {
        gap: 0.75rem;
    }
    
    .product-list-image {
        width: 80px;
        height: 80px;
    }
    
    .product-list-name {
        font-size: 1rem;
    }
    
    .product-list-description {
        font-size: 0.8rem;
    }
    
    .product-list-price {
        font-size: 1.1rem;
    }
}

.product-list-image {
    width: 120px;
    height: 120px;
    object-fit: cover;
    border-radius: 8px;
    flex-shrink: 0;
}

.product-list-details {
    flex: 1;
}

.product-list-name {
    font-size: 1.2rem;
    font-weight: 600;
    color: var(--secondary-hard);
    margin: 0 0 0.5rem 0;
}

.product-list-description {
    color: #6b7280;
    font-size: 0.9rem;
    margin: 0 0 1rem 0;
    line-height: 1.5;
}

.product-list-price {
    font-size: 1.3rem;
    font-weight: 700;
    color: var(--secondary-hard);
    margin: 0;
}

/* View toggle buttons */
.view-toggle {
    display: flex;
    gap: 0.5rem;
    margin-left: auto;
}

.view-toggle-btn {
    padding: 8px 12px;
    background: #ffffff;
    border: 2px solid var(--primary-soft);
    color: var(--primary-soft);
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.9rem;
    font-weight: 500;
    width: 100%;
    justify-content: center;
    white-space: nowrap;
    min-width: 0;
}

.view-toggle-btn.active {
    background-color: var(--primary-soft);
    color: #ffffff;
}

.view-toggle-btn:hover {
    background-color: var(--primary-soft);
    color: #ffffff;
}

/* View toggle in sidebar */
.filter-section-modern .view-toggle {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    margin-left: 0;
}

.filter-section-modern .view-toggle-btn {
    width: 100%;
    margin-left: 0;
}

/* Sort dropdown */
.sort-dropdown {
    min-width: 200px;
}

.sort-dropdown select {
    width: 100%;
    padding: 8px 12px;
    border: 2px solid #e5e7eb;
    border-radius: 6px;
    background: #ffffff;
    color: var(--secondary-hard);
    font-weight: 500;
}

.sort-dropdown select:focus {
    outline: none;
    border-color: var(--primary-soft);
}

/* Empty state */
.empty-state {
    text-align: center;
    padding: 4rem 2rem;
    color: var(--secondary-hard);
}

.empty-state h2 {
    font-size: 2rem;
    margin-bottom: 1rem;
}

.empty-state p {
    font-size: 1.1rem;
    margin-bottom: 2rem;
    color: #6b7280;
}

.empty-state .btn {
    background-color: var(--primary-soft);
    color: #ffffff;
    padding: 12px 24px;
    border-radius: 8px;
    text-decoration: none;
    font-weight: 600;
    transition: all 0.3s ease;
}

.empty-state .btn:hover {
    background-color: var(--primary-color);
    color: #ffffff;
    text-decoration: none;
}

/* Pagination Styles */
.pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 1rem;
    margin: 2rem 0;
    padding: 0;
    list-style: none;
}

.pagination .page-item {
    margin: 0;
}

.pagination .page-link {
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 40px;
    height: 40px;
    padding: 0.5rem;
    border: none;
    background-color: transparent;
    color: var(--secondary-hard);
    text-decoration: none;
    border-radius: 0;
    font-weight: 600;
    font-size: 1rem;
    transition: all 0.3s ease;
    position: relative;
}

.pagination .page-link:hover {
    background-color: transparent;
    color: var(--primary-soft);
    text-decoration: none;
    transform: none;
    box-shadow: none;
}

.pagination .page-item.active .page-link {
    background-color: transparent;
    color: var(--secondary-hard);
    border: none;
    text-decoration: underline;
    text-decoration-thickness: 2px;
    text-underline-offset: 4px;
    text-decoration-color: var(--secondary-hard);
}

.pagination .page-item.active .page-link:hover {
    background-color: transparent;
    color: var(--secondary-hard);
    transform: none;
    box-shadow: none;
}

.pagination .page-item.disabled .page-link {
    background-color: transparent;
    color: #6c757d;
    border: none;
    cursor: not-allowed;
    opacity: 0.6;
}

.pagination .page-item.disabled .page-link:hover {
    background-color: transparent;
    color: #6c757d;
    transform: none;
    box-shadow: none;
}

/* Next/Previous buttons - show arrow icons */
.pagination .page-item:first-child .page-link::before {
    content: "←";
    font-weight: 700;
    font-size: 1.2rem;
}

.pagination .page-item:last-child .page-link::before {
    content: "→";
    font-weight: 700;
    font-size: 1.2rem;
}

/* Hide default text for prev/next buttons */
.pagination .page-item:first-child .page-link,
.pagination .page-item:last-child .page-link {
    font-size: 0;
    min-width: 30px;
    height: 30px;
}

/* Remove all underlines by default */
.pagination .page-link {
    text-decoration: none !important;
}

/* Add underline only to active page numbers (not arrows) using ::after */
.pagination .page-item.active .page-link::after {
    content: "";
    position: absolute;
    bottom: 2px;
    left: 50%;
    transform: translateX(-50%);
    width: 80%;
    height: 2px;
    background-color: var(--secondary-hard);
}

/* Ensure arrows never get underlines */
.pagination .page-item:first-child .page-link::after,
.pagination .page-item:last-child .page-link::after {
    display: none !important;
}

/* Ensure current page is always visible and properly styled */
.pagination .page-item.active {
    display: block !important;
    visibility: visible !important;
}

.pagination .page-item.active .page-link {
    display: flex !important;
    visibility: visible !important;
    opacity: 1 !important;
}


/* Responsive pagination */
@media (max-width: 768px) {
    .pagination {
        gap: 0.75rem;
        flex-wrap: wrap;
    }
    
    .pagination .page-link {
        min-width: 35px;
        height: 35px;
        font-size: 0.9rem;
        padding: 0.25rem;
    }
    
    .pagination .page-item:first-child .page-link,
    .pagination .page-item:last-child .page-link {
        min-width: 25px;
        height: 25px;
    }
}

@media (max-width: 480px) {
    .pagination {
        gap: 0.5rem;
    }
    
    .pagination .page-link {
        min-width: 30px;
        height: 30px;
        font-size: 0.8rem;
    }
    
    .pagination .page-item:first-child .page-link,
    .pagination .page-item:last-child .page-link {
        min-width: 20px;
        height: 20px;
    }
    
    /* Mobile Icon Adjustments */
    .product-favorite {
        top: 8px;
        right: 8px;
    }
    
    .product-favorite .add-to-fav-btn {
        width: 32px;
        height: 32px;
    }
    
    .product-favorite .ion-icon {
        font-size: 16px;
    }
    
    .product-hover-icons {
        top: 8px;
        left: 8px;
        gap: 6px;
    }
    
    .product-icon-space .shuffle-box,
    .product-icon-space .heart-box {
        width: 32px;
        height: 32px;
    }
    
    .product-icon-space .ion-icon {
        font-size: 16px;
    }
}

/* Enhanced Tablet Filter for Mobile */
@media (max-width: 999px) {
    .tablet-filter-section {
        display: block !important;
        margin-bottom: 1.5rem;
    }
    
    /* Remove !important to allow JavaScript toggle to work */
    .tablet-filter-content {
        display: block;
    }
    
    .tablet-filter-group {
        margin-bottom: 1rem;
    }
    
    .tablet-filter-options {
        display: flex !important;
        flex-direction: column;
        gap: 0.5rem;
    }
    
    .tablet-brand-grid {
        display: grid !important;
        grid-template-columns: repeat(auto-fit, minmax(80px, 1fr));
        gap: 0.5rem;
    }
    
    .tablet-view-toggle {
        display: flex !important;
        flex-direction: row;
        gap: 0.5rem;
    }
    
    .tablet-view-toggle-btn {
        flex: 1;
        min-width: auto;
    }
}

/* Force tablet filter to be visible on mobile/tablet */
@media (max-width: 1199px) {
    .tablet-filter-section {
        display: block !important;
    }
    
    /* Remove !important to allow JavaScript toggle to work */
    .tablet-filter-content {
        display: block;
    }
}

/* Tablet filter sections - always visible */
.tablet-filter-group-title {
    cursor: default;
    user-select: none;
}

.tablet-filter-options {
    display: flex !important;
    flex-direction: column;
    gap: 0.5rem;
    padding: 1rem 0;
}

.tablet-brand-grid {
    display: grid !important;
    grid-template-columns: repeat(auto-fit, minmax(80px, 1fr));
    gap: 0.5rem;
    padding: 1rem 0;
}

.tablet-view-toggle {
    display: flex !important;
    flex-direction: row;
    gap: 0.5rem;
    padding: 1rem 0;
}
