.product-card,
.products-filter,
.sidebar {
    box-shadow: var(--box-shadow);
}
.category-count,
.category-list li a,
.product-title a {
    color: var(--text-color);
}
.brand-link,
.breadcrumbs a,
.category-tag,
.product-title a,
.view-button {
    text-decoration: none;
}
.category-tag,
.pagination a,
.pagination span,
.purchase-btn,
.view-button {
    transition: background-color 0.3s;
}
.main-image,
.product-image {
    object-fit: contain;
    width: 100%;
}
:root {
    --primary-color: #5b6ede;
    --secondary-color: #f7f9fc;
    --text-color: #333;
    --light-gray: #eaeef2;
    --border-radius: 8px;
    --box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
}
.main-content {
    display: flex;
    margin: 30px 0;
    gap: 30px;
}
.sidebar {
    width: 260px;
    flex-shrink: 0;
    background-color: #fff;
    border-radius: var(--border-radius);
    padding: 20px;
    align-self: flex-start;
    position: sticky;
    top: 20px;
}
.category-count,
.category-tag:hover,
.view-button:hover {
    background-color: var(--light-gray);
}
.sidebar h3 {
    font-size: 18px;
    margin-bottom: 15px;
    padding-bottom: 10px;
    border-bottom: 1px solid var(--light-gray);
}
.category-list li a {
    display: flex;
    justify-content: space-between;
}
.breadcrumbs a:hover,
.category-list li a.active,
.category-list li a:hover,
.subcategory-list li a.active,
.subcategory-list li a:hover {
    color: var(--primary-color);
}
.category-count {
    border-radius: 20px;
    padding: 2px 8px;
    font-size: 12px;
}
.products-container {
    flex-grow: 1;
}
.category-header {
    margin-bottom: 25px;
}
.category-title {
    font-size: 28px;
    margin-bottom: 10px;
}
.category-description {
    color: #666;
    margin-bottom: 20px;
}
.products-filter {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    padding: 15px;
    background-color: #fff;
    border-radius: var(--border-radius);
}
.products-filter select {
    padding: 8px;
    border-radius: 4px;
    border: 1px solid var(--light-gray);
}
.products-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
}
.product-card {
    border-radius: var(--border-radius);
}
.product-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}
.product-category {
    display: inline-block;
    font-size: 12px;
    color: var(--primary-color);
    margin-bottom: 5px;
}

.product-price {
    font-size: 18px;
    font-weight: 700;
    color: var(--primary-color);
    margin-bottom: 15px;
}
.view-button {
    display: block;
    width: 100%;
    padding: 10px;
    background-color: var(--secondary-color);
    color: var(--text-color);
    text-align: center;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-weight: 500;
}
.pagination a,
.pagination span,
.product-main {
    background-color: #fff;
    box-shadow: var(--box-shadow);
}
.pagination {
    display: flex;
    justify-content: center;
    margin-top: 40px;
}
.pagination a,
.pagination span {
    display: inline-block;
    padding: 8px 12px;
    margin: 0 5px;
    border-radius: 4px;
    color: var(--text-color);
    text-decoration: none;
}
.pagination a:hover,
.pagination span.current {
    background-color: var(--primary-color);
    color: #fff;
}
.breadcrumbs {
    padding: 15px 0;
    font-size: 14px;
}
.breadcrumbs a {
    color: #666;
    transition: color 0.3s;
}
.breadcrumbs span {
    color: #888;
    margin: 0 8px;
}
.product-main {
    flex-grow: 1;
    border-radius: var(--border-radius);
    overflow: hidden;
}
.product-container {
    display: flex;
    flex-wrap: wrap;
}
.product-gallery {
    flex: 1;
    min-width: 300px;
    padding: 30px;
    display: flex;
    flex-direction: column;
    align-items: center;
}
.main-image {
    height: 350px;
    margin-bottom: 20px;
}
.thumbnail-container {
    display: flex;
    justify-content: center;
}
.product-details {
    flex: 1;
    min-width: 300px;
    padding: 30px;
    border-left: 1px solid var(--light-gray);
}
.product-category-links {
    display: flex;
    gap: 8px;
    margin-bottom: 15px;
    flex-wrap: wrap;
}
.category-tag {
    background-color: var(--secondary-color);
    color: var(--text-color);
    padding: 5px 10px;
    border-radius: 20px;
    font-size: 12px;
}
.brand-link,
.current-price {
    color: var(--primary-color);
}

.brand-link:hover {
    text-decoration: underline;
}
.product-price-container {
    margin: 25px 0;
}
.current-price {
    font-size: 32px;
    font-weight: 700;
    margin-right: 10px;
}
.old-price {
    font-size: 20px;
    text-decoration: line-through;
    color: #888;
}
.purchase-btn {
    display: inline-block;
    padding: 15px 35px;
    background-color: var(--primary-color);
    color: #fff;
    border: none;
    border-radius: 4px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    text-decoration: none;
    margin-top: 20px;
}
.purchase-btn:hover {
    background-color: #4a59c4;
}
.affiliate-notice {
    margin-top: 15px;
    font-size: 12px;
    color: #888;
}
.product-description {
    margin-top: 30px;
}
.product-description h3 {
    margin-bottom: 15px;
    font-size: 20px;
}
.product-description p {
    margin-bottom: 15px;
}
.product-description ul {
    margin-left: 20px;
    margin-bottom: 15px;
}
.product-description li,
.subcategory-list li {
    margin-bottom: 8px;
}
@media (max-width: 576px) {
    .products-grid {
        grid-template-columns: 1fr;
    }
    .products-filter {
        flex-direction: column;
        gap: 10px;
        align-items: flex-start;
    }
    .product-details,
    .product-gallery {
        padding: 20px;
    }
    .main-image {
        height: 280px;
    }
}
.products-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 25px;
    margin-bottom: 30px;
}
@media (max-width: 992px) {
    .main-content {
        flex-direction: column;
    }
    .sidebar {
        width: 100%;
        position: static;
        margin-bottom: 20px;
    }
    .category-list {
        display: flex;
        flex-wrap: wrap;
        gap: 10px;
    }
    .category-list li {
        margin-bottom: 0;
    }
    .product-details {
        border-left: none;
        border-top: 1px solid var(--light-gray);
    }
    .products-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}
@media (max-width: 768px) {
    .products-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}
@media (max-width: 576px) {
    .products-grid {
        grid-template-columns: 1fr;
    }
}
.product-card {
    display: flex;
    flex-direction: column;
    height: 100%;
    background-color: #fff;
    border-radius: var(--border-radius);
    overflow: hidden;
    box-shadow: var(--box-shadow);
    transition: transform 0.3s, box-shadow 0.3s;
}
.product-info {
    padding: 15px;
    display: flex;
    flex-direction: column;
    flex-grow: 1;
}
.view-button {
    margin-top: auto;
}
.product-image {
    height: 200px;
    background-color: #f9f9f9;
    padding: 15px;
}
.thumbnail-container {
    display: flex;
    gap: 10px;
    justify-content: center;
    margin-top: 15px;
}
.thumbnail {
    width: 70px;
    height: 70px;
    object-fit: cover;
    border-radius: 4px;
    cursor: pointer;
    border: 2px solid transparent;
    transition: border-color 0.3s;
}
.thumbnail.active,
.thumbnail:hover {
    border-color: var(--primary-color);
}
.purchase-section {
    margin-top: 25px;
    padding-top: 20px;
    border-top: 1px solid var(--light-gray);
}
.redirect-notice {
    margin-top: 8px;
    font-size: 12px;
    color: #666;
}
.category-list {
    list-style: none;
    margin: 0;
    padding: 0;
}
.subcategory-list {
    list-style: none;
    margin: 8px 0 0;
    padding: 0;
    max-height: 500px;
    overflow: hidden;
    transition: max-height 0.3s ease-in-out;
}
.category-list li {
    margin-bottom: 12px;
}
.category-list li a,
.subcategory-list li a {
    display: flex;
    justify-content: space-between;
    color: var(--text-color);
    text-decoration: none;
    font-weight: 500;
    transition: color 0.3s;
    font-size: 14px;
}
.category-list > li > a {
    font-weight: 600;
    font-size: 15px;
}
.subcategory-list li a {
    color: #505050;
    font-weight: 400;
}
.subcategory-list .category-count {
    background-color: var(--light-gray);
    border-radius: 20px;
    padding: 1px 6px;
    font-size: 11px;
    color: var(--text-color);
}

/* CSS changes to fix product title truncation */

/* For product cards on archive page */
.products-grid .product-title {
    font-weight: 600;
    /* Remove the fixed height that's causing truncation */
    height: auto;
    /* Increase line-clamp to show more text */
    line-clamp: 3;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
    /* Add some margin to ensure good spacing */
    margin-bottom: 10px;
}

/* For single product page title - ensure it displays fully */
.product-main .product-title {
    font-size: 28px;
    margin-bottom: 15px;
    line-height: 1.3;
    /* Override any height limitations or line clamping */
    height: auto;
    line-clamp: none;
    -webkit-line-clamp: none;
    overflow: visible;
}