.cpf-container {
    display: flex;
    gap: 20px;
    flex-wrap: wrap;
}

.cpf-sidebar {
    flex: 1 1 200px;
    max-width: 250px;
}

.cpf-main {
    flex: 3 1 700px;
}

/* .cpf-search {
    margin-bottom: 20px;
    padding: 10px;
    border: 1px solid #ddd !important;
    border-radius: 25px !important;
    width: 100% !important;
    box-sizing: border-box;
} */
#cpf-category, #cpf-min-price, #cpf-max-price {
    margin-bottom: 1rem;
    margin-top: 1rem;
    padding: 10px;
    border: 1px solid #ddd !important;
    border-radius: 5px !important;
    width: 100% !important;
    box-sizing: border-box;
}
#cpf-category{
    margin-bottom: 0px !important;
}
#cpf-category {
    appearance: none; /* remove default arrow */
    -webkit-appearance: none;
    -moz-appearance: none;
    
    background-color: #fff;
    border: 1px solid #ccc;
    border-radius: 8px;
    padding: 10px 40px 10px 15px;
    font-size: 16px;
    color: #333;
    width: 100%;
    max-width: 100%;
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
    transition: border 0.3s ease, box-shadow 0.3s ease;
    background-image: url("data:image/svg+xml,%3Csvg fill='none' stroke='%23666' stroke-linecap='round' stroke-linejoin='round' stroke-width='2' viewBox='0 0 24 24' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M19 9l-7 7-7-7'%3E%3C/path%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 12px center;
    background-size: 18px 18px;
    cursor: pointer;
}

#cpf-category:focus {
    border-color: #70098e;
    box-shadow: 0 0 0 3px rgba(112, 9, 142, 0.2);
    outline: none;
}

@media (max-width: 600px) {
    #cpf-category {
        font-size: 15px;
        padding: 10px 36px 10px 12px;
    }
}

.cpf-grid {
    display: grid;
    gap: 20px;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
}
.cpf-price, .cpf-ratings-wrapper {
    display: flex;
    gap: 10px;
    align-items: center;
    
}

.cpf-price input[type="number"] {
    flex: 1;
    padding: 8px 10px;
    border: 1px solid #ccc;
    border-radius: 6px;
    font-size: 14px;
    width: 100px; /* Optional fixed width if you prefer */
    box-sizing: border-box;
}

.cpf-product {
    border: 1px solid #e5e7eb;
    background-color: #fff;
    transition: box-shadow 0.3s ease;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
}

.cpf-product:hover {
    box-shadow: 0 12px 20px -3px rgba(0, 0, 0, 0.1);
}

.cpf-thumbnail img {
    max-width: 100%;
    height: auto;
    margin-bottom: 12px;
}

.cpf-title {
    font-size: 0.9rem !important;
    font-weight: 600;
    color: #333;
    margin: 0 0 8px;
    text-align: left;
    width: 100%;
    flex: 1;
  margin: 0;
  font-size: 1rem;
}
.cpf-rating-wrapper {
    flex-shrink: 0;
    margin-bottom: auto;
    white-space: nowrap;
    font-size: 1.5rem;
  }
.cpf-title a {
    color: inherit;
    text-decoration: none;
}
.cpf-rating-count{
    font-size: 0.875rem;
    color: #a0aec0;
    margin-left: 5px;
}
.cpf-price-wrapper {
    margin-top: auto;
    font-size: 1rem;
    color: #1a202c;
    font-weight: bold;
}

.cpf-price del {
    color: #a0aec0;
    margin-right: 6px;
}

.cpf-cart-btn .add_to_cart_button {
    font-size: 0.875rem;
    font-weight: 500;
    background-color: #10b981;
    color: white;
    border: none;
    padding: 0.5rem 1rem;
    border-radius: 0.5rem;
    cursor: pointer;
    transition: background-color 0.3s ease;
    text-decoration: none;
}

.cpf-cart-btn .add_to_cart_button:hover {
    background-color: #059669;
}

.cpf-product-bottom {
    display: flex;
    flex-basis: auto;
    flex-direction: column;
    justify-content: space-between;

    text-align: left;
    padding: 0 0.5rem 1rem;
    width: 100%;
    height: 100%;
    box-sizing: border-box;
}
.cpf-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 1rem;
  }

#cpf-rating .cpf-star {
    font-size: 1.6rem;
    cursor: pointer;
    color: #ccc;
}

#cpf-rating .cpf-star.active {
    color: gold;
}

#cpf-loader {
    text-align: center;
    padding: 20px;
    display: none;
    font-weight: bold;
}

#cpf-request-button {
    margin-top: 20px;
    padding: 10px 20px;
    font-weight: bold;
}

.cpf-loading-box {
    height: 250px;
    background: #f0f0f0;
    border-radius: 10px;
    margin-bottom: 20px;
    animation: pulse 1.5s infinite;
}

@keyframes pulse {
    0% { opacity: 0.7; }
    50% { opacity: 1; }
    100% { opacity: 0.7; }
}
.cpf-attribute-group{
    margin-bottom: 1rem;
    /* border: 1px solid #ddd; */
    padding-left: 1rem;
}
.cpf-label {
    font-weight: bold;
}
#cpf-clear-rating {
    display: none; /* Hidden initially */
    color: #1a202c;
    background-color: transparent;
    font-weight: bold;
    padding: 0px;
    border: none;
    font-size: 12px;
    cursor: pointer;
    border-radius: 3px;
}
#cpf-clear-rating:hover {
    background-color: #f9fafb;
}
#cpf-reset-filters {
    background-color: var(--contrast, #70098e);
    color: #fff;
    border: none;
    padding: 10px 18px;
    font-size: 15px;
    border-radius: 25px;
    cursor: pointer;
    transition: background-color 0.3s ease, box-shadow 0.2s ease;
    margin-top: 10px;
}

#cpf-reset-filters:hover {
    background-color: var(--contrast-2, #ff4d88);
    box-shadow: 0 2px 6px rgba(0,0,0,0.1);
}

@media (max-width: 600px) {
    #cpf-reset-filters {
        font-size: 14px;
        padding: 8px 14px;
    }
}

.cpf-search-wrapper {
    display: flex;
    align-items: stretch; /* Stretch both input and button equally */
    border: 1px solid #ddd;
    border-radius: 25px;
    overflow: hidden;
    width: 100%;
    max-width: 100%;
    margin-bottom: 20px;
    background: #fff;
    height: 48px; /* Define consistent height */
}

.cpf-search {
    flex: 1;
    border: none !important;
    outline: none;
    padding: 0 15px;
    font-size: 16px;
    border-radius: 25px 0 0 25px;
    background: transparent;
    line-height: 1;
}

.cpf-search-btn {
    background: #70098e;
    color: white;
    border: none;
    padding: 0 18px;
    font-size: 18px;
    cursor: pointer;
    border-radius: 0 25px 25px 0;
    transition: background 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.cpf-search-btn:hover {
    background: #ff4d88;
}

@media (max-width: 600px) {
    .cpf-search {
        font-size: 14px;
    }

    .cpf-search-btn {
        font-size: 16px;
        padding: 0 14px;
    }

    .cpf-search-wrapper {
        height: 44px;
    }
}
.cpf-search-icon {
    width: 20px;
    height: 20px;
    stroke: white;
    transition: stroke 0.3s ease;
}

.cpf-search-btn:hover .cpf-search-icon {
    stroke: #e0e0e0;
}
/* Layout base */
.cpf-container {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
}

.cpf-main {
    flex: 3 1 700px;
    padding: 15px;
}

/* Sidebar base */
.cpf-sidebar {
    flex: 1 1 250px;
    padding: 20px;
    border: 1px solid #eee;
    background: #fff;
}

/* Filter Toggle Button */
.cpf-toggle-filters {
    display: none;
    background: #fff;
    color: #70098e;
    border: 1px solid #ddd;
    padding: 8px 14px;
    border-radius: 25px;
    font-size: 14px;
    font-weight: 500;
    gap: 6px;
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 6px rgba(0,0,0,0.05);
    cursor: pointer;
    position: relative;
    margin-bottom: 15px;
}

.cpf-toggle-filters .cpf-filter-icon {
    width: 18px;
    height: 18px;
    fill: currentColor;
}

/* Mobile Styling */
@media (max-width: 768px) {
    .cpf-sidebar {
        position: fixed;
        top: 0;
        right: -100%;
        width: 80%;
        max-width: 320px;
        height: 100%;
        background: #fff;
        z-index: 999;
        overflow-y: auto;
        box-shadow: -2px 0 12px rgba(0,0,0,0.1);
        transition: right 0.3s ease;
        padding: 20px;
    }

    .cpf-sidebar.open {
        right: 0;
    }

    .cpf-toggle-filters {
        display: inline-flex;
        position: relative;
        margin: 10px auto 20px 0;
    }

    .cpf-main {
        flex: 1 1 100%;
        width: 100%;
    }
}
