/* --- Tally Add-ons Listing Specific Styles --- */
/* Breadcrumb */
.breadcrumb {
    padding: 10px 0;
    /*background-color: #fff;*/
    font-size: 14px;
    color: #6c757d;
    border-bottom: 1px solid #ddd;
}

/* Main Container: Sidebar + Content */
.listing-container {
    display: flex;
   /* padding: 20px 15px;
    background-color: #fff;
    box-shadow: 0 0 10px rgba(0,0,0,0.05);*/
    min-height: 80vh;
    margin-top: 20px;
    /*border-radius: 8px;*/
}

/* Sidebar */
.sidebar {
    flex: 0 0 250px;
    padding-right: 20px;
    padding-top: 10px;
}
.sidebar h3, .sidebar h4 {
    color: #333;
    margin-top: 0;
    margin-bottom: 15px;
    font-weight: 700;
}
.sidebar-menu {
    list-style: none;
    padding: 0;
    margin-bottom: 30px;
}
.sidebar-menu a {
    text-decoration: none;
    color: #555;
    font-size: 15px;
    display: block;
    padding: 5px 0;
}
.sidebar-menu a:hover, .sidebar-menu li.active a {
    color: #007bff;
    font-weight: bold;
}
.apply-filter-btn {
    background-color:#cc0000;
    color: white;
    border: none;
    padding: 10px 15px;
    border-radius: 4px;
    cursor: pointer;
    width: 100%;
    margin-top: 15px;
    font-weight: bold;
    transition: background-color 0.3s;
}
.apply-filter-btn:hover {
    background-color: #A00000;
}
/* Main Content */
.main-content {
    flex-grow: 1;
    padding-left: 20px; 
    padding-top: 10px;
}
.toolbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 1px solid #eee;
    font-size: 14px;
}

/* Product Grid and Card Styling */
.product-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 20px;
}
.product-card-link {
    text-decoration: none; /* Remove underline from the anchor tag */
    color: inherit;
    display: block; /* Make the anchor tag fill the space */
}
.product-card {
    background-color: #fff;
    border: 1px solid #eee;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 5px rgba(0,0,0,0.05);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    display: flex;
    flex-direction: column;
    height: 100%; /* Ensure all cards are the same height */
}
.product-card-link:hover .product-card {
    transform: translateY(-3px);
    box-shadow: 0 10px 20px rgba(0,0,0,0.15);
}

.product-image {
    width: 100%;
    height: 140px;
    object-fit: cover;
    border-bottom: 1px solid #eee;
    background-color: #e0e0e0;
}

.product-info {
    padding: 15px;
    display: flex;
    flex-direction: column;
    flex-grow: 1;
}

.product-title {
    font-size: 16px;
    margin: 0 0 5px 0;
    font-weight: 600;
    color: #003366; /* Ensure initial color is dark */
    transition: color 0.3s;
}
.product-category {
    font-size: 13px;
    color: #554d4d; /* Using vision-accent (Red) */
    margin-bottom: 10px;
    font-weight: 500;
    transition: color 0.3s;
}
.product-description {
    font-size: 13px;
    color: #555;
    margin-bottom: 15px;
    line-height: 1.4;
    flex-grow: 1;
    transition: color 0.3s;
}

/* Buy Now Button (now a styled span inside the anchor tag) */
.buy-now-btn-link {
    display: block; 
    width: 100%;
    padding: 10px;
    background-color: #ee0707;
    color: white;
    border-radius: 4px;
    cursor: pointer;
    font-weight: bold;
    font-size: 14px;
    transition: background-color 0.3s;
    text-align: center;
    margin-top: auto;
}
.buy-now-btn-link:hover {
    background-color: #b90202;
    text-decoration: none;
}
/* ================================================== */
/* 🚀 CORE MODIFICATION: PRODUCT CARD HOVER EFFECT 🚀 */
/* ================================================== */

/* --- Step 1: Alternate Background Color on Hover (using :nth-child(3n) grouping) --- */

/* Card 1, 4, 7... (Blue Accent) */
.product-card-link:nth-child(3n+1):hover .product-card { 
    background-color: #0d6ab1; /* Darker Blue */
}

/* Card 2, 5, 8... (Orange Accent) */
.product-card-link:nth-child(3n+2):hover .product-card { 
    background-color: #fa6502; /* Orange */
}

/* Card 3, 6, 9... (Green Accent) */
.product-card-link:nth-child(3n+3):hover .product-card { 
    background-color: #4CAF50; /* Green */
}

/* --- Step 2: Change Text Color to White for Contrast on Hover (Universal) --- */
.product-card-link:hover .product-title,
.product-card-link:hover .product-category,
.product-card-link:hover .product-description {
    color: #fff;
}

/* --- Step 3: Ensure the Button color remains distinct (Red) --- */
.product-card-link:hover .buy-now-btn-link {
    background-color: #CC0000; /* Main Red Accent */
    color: #fff;
}
.product-card-link:hover .buy-now-btn-link:hover {
    background-color: #A00000; /* Darker Red on secondary hover */
}


/* Pagination */
.pagination {
    display: flex;
    justify-content: center;
    margin-top: 20px;
    margin-bottom: 50px;
}

.page-link {
    color: #007bff;
    padding: 8px 20px;
    border: 1px solid #dee2e6;
    margin: 0 8px;
    border-radius: 4px;
    transition: background-color 0.3s, color 0.3s;
}

.page-link:hover:not(.active) {
    background-color: #e9ecef;
}

.page-link.active {
    background-color: #007bff;
    color: white;
    border-color: #007bff;
}
