/* --------------------
   1. CSS Variables
-------------------- */
.error {
    color: #dc3545;
}

.search-input::placeholder {
    color: #999;
}

.search-wrapper.loading::after {
    width: 100%;
}

.search-container {
    margin: 2rem auto;
    max-width: 600px;
    position: relative;
}

.search-wrapper {
    position: relative;
    display: flex;
    align-items: center;
}

.search-input {
    width: 100%;
    padding: 12px 45px;
    border: 2px solid #e0e0e0;
    border-radius: 25px;
    font-size: 16px;
    transition: all 0.3s ease;
    outline: none;
}

.search-input:focus {
    border-color: #4a90e2;
    box-shadow: 0 0 0 3px rgba(74, 144, 226, 0.1);
}

.search-icon {
    position: absolute;
    left: 15px;
    color: #666;
    width: 20px;
    height: 20px;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.loading .loading-spinner {
    display: block;
}

.no-results {
    text-align: center;
    padding: 2rem;
    color: #666;
    font-style: italic;
}

:root {
    --primary-color: #1B3126;
    --primary-hover: #142720;
    --secondary-color: #4CAF50;
    --background-color: #F5F5F5;
    --text-color: #333;
    --background-white: #FFFFFF;
    --light-text-color: #666;
    --border-color: #E0E0E0;
    --error-color: #ff4444;
    --drawer-width: 583px;
    --cart-toggle-width: 60px;
    --fab-size: 56px;
    --primary-green: #1F5F58;
    --primary-purple: #AE0CB0;
    --neutral-1: #202F3C;
    --neutral-2: #3F4A54;
    --neutral-3: #636466;
    --neutral-7: #F1F1F3;
    --neutral-8: #F6F6F6;
    --neutral-9: #FFFFFF;
    --discount-7: #F4D2F4;
    --discount-8: #FFF4FF;
    --discount-9: #FFF4FF;
}

/* --------------------
   2. Reset & Base
-------------------- */
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: Arial, sans-serif;
    background-color: var(--background-white);
    color: var(--text-color);
    line-height: 1.6;
}

a {
    text-decoration: none;
}

/* --------------------
   3. Layout & Grid
-------------------- */
main {
    width: 100%;
    min-height: 100vh;
    padding: 0;
}

.container {
    padding: 112px 0 0 30px;
    max-width: none;
    margin: 0;
    display: flex;
}

.product-grid {
    display: grid;
    grid-template-columns: repeat(5, 199px);
    gap: 20px;
    width: fit-content;
    margin: 0 auto;
    justify-content: center;
}

/* --------------------
   4. Product Card
-------------------- */
.product-card {
    width: 199px;
    height: 234px;
    padding: 16px 12px;
    display: flex;
    flex-direction: column;
    align-items: center;
    border-radius: 8px;
    position: relative;
}

.choice-btn:active {
    transform: scale(0.98);
}

.product-image-container {
    width: 175px;
    height: 118px;
    position: relative;
    margin-bottom: 4px;
}

.product-image {
    width: 175px;
    height: 118px;
    border-radius: 8px;
    object-fit: cover;
    border: 1px solid #EBEAEA;
}

.choices-container {
    display: flex;
    gap: 2px;
    height: 22px;
}

.product-info {
    padding: 15px;
    position: relative;
    min-height: 100px;
    display: flex;
    flex-direction: column;
}

.product-info h3 {
    margin: 0 0 5px 0;
    font-size: 1em;
    color: var(--primary-color);
}

.choice-btn {
    cursor: pointer;
    flex: 1;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 4px 12px;
    height: 22px;
    background: var(--neutral-9);
    border: 1px solid var(--neutral-7);
    border-radius: 4px;
    font-size: 10px;
    font-family: 'Source Sans 3';
    color: var(--neutral-2);
}

.choice-btn:hover {
    background: var(--neutral-8);
}

.choice-btn.active {
    border-color: var(--primary-green);
    color: var(--primary-green);
    font-weight: 600;
}

.favorite-button {
    position: absolute;
    top: -12px;
    right: -14.5px;
    border: none;
    background: transparent;
    cursor: pointer;
    z-index: 2;
}

.discount-tag {
    position: absolute;
    left: 3.5px;
    bottom: 3.5px;
    background: var(--discount-9);
    border: 1px solid var(--discount-7);
    border-radius: 4px;
    padding: 5px 8px;
    font-family: 'Asap';
    font-size: 12px;
    font-weight: 500;
    color: var(--primary-purple);
}

.add-to-cart {
    position: absolute;
    right: 0;
    bottom: 0;
    width: 92px;
    height: 32px;
    background: var(--primary-green);
    border-radius: 4px;
    border: none;
}

.add-to-cart-small {
    position: absolute;
    right: 0;
    bottom: 0;
    width: 36px;
    height: 32px;
    background: var(--primary-green);
    border-radius: 4px;
    border: none;
}

.add-button {
    position: absolute;
    right: 0;
    bottom: 0;
    width: 36px;
    height: 32px;
    background: var(--primary-green);
    border-radius: 4px;
    border: none;
    display: flex;
    justify-content: center;
    align-items: center;
    filter: drop-shadow(4px 4px 74px rgba(31, 95, 88, 0.09));
    cursor: pointer;
}

.product-card-quantity {
    position: absolute;
    right: 36px;
    height: 32px;
    width: 20px;
    color: white;
    display: flex;
    justify-content: center;
    align-items: center;
}

.remove-button {
    position: absolute;
    right: 56px;
    bottom: 0;
    width: 36px;
    height: 32px;
    background: var(--primary-green);
    border-radius: 4px;
    border: none;
    display: flex;
    justify-content: center;
    align-items: center;
    filter: drop-shadow(4px 4px 74px rgba(31, 95, 88, 0.09));
    cursor: pointer;
}

.text-container {
    width: 175px;
}

.product-title {
    font-family: 'Source Sans 3';
    font-size: 12px;
    line-height: 17px;
    color: var(--neutral-1);
    margin-bottom: 4px;
    margin-top: 8px;
}

.price-container {
    display: flex;
    align-items: center;
    gap: 4px;
}

.original-price {
    font-size: 12px;
    text-decoration: line-through;
    color: var(--primary-green);
    display: none;
}

.current-price {
    font-weight: 700;
    font-size: 14px;
    color: var(--primary-green);
}

.price-unit {
    font-size: 10px;
    font-weight: 600;
    color: var(--primary-green);
}


/* --------------------
   5. Cart Sidebar
-------------------- */
.cart-sidebar {
    position: fixed;
    top: 0;
    height: 100vh;
    height: 100dvh;
    background: white;
    box-shadow: -2px 0 8px rgba(0,0,0,0.1);
    z-index: 50 !important;
    transition: transform 0.3s ease-in-out;
    transform: translateX(0);
}

.cart-sidebar.initializing {
    transition: none !important;
}

.cart-sidebar.initializing * {
    transition: none !important;
}

.cart-sidebar.collapsed {
    transform: translateX(var(--drawer-width));
}

/* Cart Header */
.cart-header {
    padding: 1rem;
    border-bottom: 1px solid #eee;
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
}

.cart-header-left {
    flex: 1;
}

.cart-title {
    display: block;
    font-size: 1.2rem;
    font-weight: bold;
    color: var(--text-color);
    margin-bottom: 0.25rem;
}

.cart-items-count {
    font-size: 0.9rem;
    color: var(--light-text-color);
}

.cart-header-actions {
    display: flex;
    gap: 0.5rem;
}

.cart-content {
    flex: 1;
    overflow-y: auto;
    padding: 1rem;
}

/* --------------------
   7. Cart Items
-------------------- */
.cart-item {
    padding: 0.75rem 1rem;
    border-bottom: 1px solid #eee;
}

.item-name {
    font-weight: 500;
    color: var(--text-color);
    margin-bottom: 0.5rem;
}

.item-details {
    display: grid;
    grid-template-columns: 1fr 1fr auto;
    align-items: center;
    gap: 0.5rem;
}

.item-quantity,
.item-price {
    display: flex;
    align-items: baseline;
    gap: 0.25rem;
}

.unit,
.unit-price {
    color: var(--light-text-color);
    font-size: 0.85rem;
    margin-left: 0.25rem;
}

/* --------------------
   8. Buttons
-------------------- */
.btn {
    padding: 0.75rem 1.5rem;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-weight: 500;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}

.btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.btn-primary {
    background-color: var(--secondary-color);
    color: white;
}

.btn-danger {
    background-color: transparent;
    color: var(--error-color);
}

.btn-danger:hover {
    background-color: #ffeeee;
}

.btn-secondary {
    color: var(--light-text-color);
}

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

.btn-icon {
    background: transparent;
    border: none;
    padding: 0.5rem;
    border-radius: 4px;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    transition: background-color 0.2s;
}

.btn-supplier-order {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.75rem;
    background-color: var(--primary-color);
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-weight: 500;
    transition: background-color 0.2s;
}

.btn-supplier-order:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    background-color: var(--light-text-color);
}

/* --------------------
   9. Mobile FAB
-------------------- */
.cart-fab {
    display: none;
    position: fixed;
    right: 20px;
    bottom: 20px;
    width: var(--fab-size);
    height: var(--fab-size);
    border-radius: 50%;
    background-color: var(--primary-color);
    color: white;
    border: none;
    cursor: pointer;
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.2);
    z-index: 998;
    transition: transform 0.2s, background-color 0.2s;
}

.cart-fab:hover {
    background-color: var(--primary-hover);
    transform: scale(1.05);
}

.cart-fab:active {
    transform: scale(0.95);
}

.cart-fab-icon {
    position: relative;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.cart-fab-count {
    position: absolute;
    top: -5px;
    right: -5px;
    background-color: var(--secondary-color);
    color: white;
    border-radius: 50%;
    width: 24px;
    height: 24px;
    font-size: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
}

/* --------------------
   10. Utilities
-------------------- */
.cart-loading {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 200px;
    color: var(--light-text-color);
}

.loader {
    width: 48px;
    height: 48px;
    border: 5px solid #f3f3f3;
    border-radius: 50%;
    border-top: 5px solid var(--primary-color);
    animation: spin 1s linear infinite;
    margin-bottom: 1rem;
}

.notification {
    position: fixed;
    top: 20px;
    right: 20px;
    padding: 15px 25px;
    border-radius: 4px;
    color: white;
    z-index: 1000;
    animation: slideIn 0.3s ease-out;
}

.notification-success {
    background-color: var(--secondary-color);
}

.notification-error {
    background-color: var(--error-color);
}

.empty-cart-message {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 200px;
    color: var(--light-text-color);
    text-align: center;
    padding: 2rem;
}

/* Cart Overlay */
.cart-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    z-index: 999;
    opacity: 0;
    transition: opacity 0.3s ease;
    pointer-events: none;
}

.cart-overlay.visible {
    opacity: 1;
    pointer-events: auto;
}

/* --------------------
   11. Animations
-------------------- */
@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

@keyframes slideIn {
    from { transform: translateX(100%); opacity: 0; }
    to { transform: translateX(0); opacity: 1; }
}

/* --------------------
   12. Media Queries
-------------------- */

@media (max-width: 1200px) {
    .product-grid {
        grid-template-columns: repeat(3, 199px);
    }
}

@media (max-width: 767px) {
    .container {
        width: 100%;
        padding: 15px;
        justify-content: center;
    }

    .product-grid {
        grid-template-columns: repeat(2, 153px);
        gap: 12px;
        width: 100%;
        max-width: 318px;
        margin: 0 auto;
    }

    .cart-fab {
        display: flex;
    }

    .cart-sidebar {
        width: 100%;
        transform: translateX(100%);
    }

    .cart-sidebar.collapsed {
        transform: translateX(100%);
    }

    .cart-sidebar.mobile-visible {
        transform: translateX(0);
    }

    .cart-toggle-btn {
        display: none;
    }

    .cart-toggle-arrow {
        display: none;
    }

    .cart-overlay {
        display: block;
    }

    .product-card {
        width: 153px;
        height: 199px;
        padding: 12px 8px;
    }

    .product-image-container {
        width: 137px;
        height: 92px;
        margin-bottom: 3px;
    }

    .product-image {
        width: 137px;
        height: 92px;
    }

    .text-container {
        width: 137px;
    }

    .product-title {
        font-size: 11px;
        line-height: 15px;
        margin-top: 6px;
        margin-bottom: 3px;
    }

    .current-price {
        font-size: 12px;
    }

    .price-unit {
        font-size: 9px;
    }

    .choice-btn {
        padding: 3px 8px;
        height: 20px;
        font-size: 9px;
    }

    .add-button {
        width: 32px;
        height: 28px;
    }

    .add-button svg {
        width: 20px;
        height: 20px;
    }

    .remove-button {
        width: 32px;
        height: 28px;
    }

    .remove-button svg {
        width: 20px;
        height: 20px;
    }

    .favorite-button {
        top: -10px;
        right: -12px;
    }

    .favorite-button svg {
        width: 28px;
        height: 28px;
    }

    .supplier-name {
        font-size: 10px;
        padding: 3px 6px;
    }

    .discount-tag {
        font-size: 10px;
        padding: 4px 6px;
    }
}

@media (max-width: 480px) {
    .cart-sidebar {
        width: 100%;
        max-width: 100%;
    }
}

@media (max-width: 360px) {
    .product-grid {
        gap: 8px;
        max-width: 314px;
    }
}
.popup-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
    margin-bottom: 16px;
}

.title-container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
}

.title-icon {
    display: flex;
    align-items: center;
    gap: 20px;
}

.title-icon h3 {
    font-family: 'Asap', sans-serif;
    font-weight: 600;
    font-size: 22px;
    color: #003831;
}

.icon-button {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    background: #F4F5F5;
    border-radius: 8px;
    border: none;
    cursor: pointer;
}

.close-button {
    width: 24px;
    height: 24px;
    background: transparent;
    border: none;
    cursor: pointer;
}

.supplier-section {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.supplier-section:not(:first-child) {
    margin-top: 32px;
}

.supplier-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
}

.supplier-title h4 {
    font-family: 'Asap', sans-serif;
    font-weight: 600;
    font-size: 16px;
    color: #3F4A54;
}

.supplier-title p {
    font-size: 12px;
    color: #636466;
}

.warning-banner {
    background: #FFF8EE;
    border: 1px solid #FFF2DF;
    border-radius: 8px;
    padding: 8px 12px;
}

.warning-content {
    display: flex;
    align-items: center;
    gap: 8px;
    color: #B66D00;
    font-size: 12px;
}

.product-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
    border-top: 1px solid #EBEAEA;
}

.product-item {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.product-item:first-child {
    margin-top: 16px;
}

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

.product-item h5 {
    font-size: 14px;
    color: #202F3C;
    font-weight: normal;
    margin: 0;
}

.price {
    display: flex;
    align-items: center;
    gap: 4px;
}

.original-price {
    font-size: 12px;
    color: #1F5F58;
    text-decoration: line-through;
}

.discounted-price {
    font-size: 12px;
    font-weight: 600;
    color: #AE0CB0;
}

.regular-price {
    font-size: 12px;
    font-weight: 600;
    color: #1F5F58;
}

.unit-price {
    font-size: 10px;
}

.unit-price.discounted {
    color: #AE0CB0;
}

.unit-price.regular {
    color: #1F5F58;
}

.quantity-price {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.quantity-selector {
    background: #1F5F58;
    border-radius: 4px;
    color: #F4FFFE;
    padding: 10px 16px;
    font-size: 12px;
    font-weight: 600;
}

.total-price {
    font-weight: 700;
    font-size: 14px;
    color: #3C7770;
}

.total-section {
    border-top: 1px solid #EBEAEA;
    padding-top: 8px;
    margin: 16px 0;
}

.total-line {
    display: flex;
    justify-content: space-between;
    align-items: center;
    color: #202F3C;
    font-size: 14px;
}

.total-amount {
    font-weight: 700;
    color: #1F5F58;
}

.checkout-button {
    width: 100%;
    background: #1F5F58;
    border-radius: 4px;
    border: none;
    color: #FFFFFF;
    padding: 10px;
    font-family: 'Asap', sans-serif;
    font-weight: 600;
    font-size: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    cursor: pointer;
    transition: background-color 0.3s ease;
}

.warning-icon {
    padding: 4px;
    width: 24px;
    height: 24px;
    background: #FFEACA;
    border-radius: 4px;
}

.cart-panel {
    position: relative;
    background: #FFFFFF;
    box-shadow: 4px 4px 74px rgba(31, 95, 88, 0.18);
    padding: 20px 32px;
    display: flex;
    flex-direction: column;
    height: 100vh;
    overflow-y: auto;
}

.supplier-name {
    position: absolute;
    top: 0;
    left: 0;
    padding: 4px 8px;
    background: rgba(60, 119, 112, 0.7);
    backdrop-filter: blur(2px);
    border-radius: 8px 0 0 0;
    font-family: 'Source Sans 3';
    font-size: 11px;
    font-weight: 500;
    color: var(--neutral-8);
}


/** FILTERS **/

.filters-sidebar-menu {
    display: flex;
    flex-direction: column;
    gap: 24px;
    width: 175px;
    margin-right: 48px;
}

.filters-section {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.filters-title {
    font-family: 'Asap', sans-serif;
    font-weight: 600;
    font-size: 16px;
    line-height: 18px;
    color: #636466;
}

.filters-supplier-box {
    background: #F6F7F7;
    border: 1px solid #EBEAEA;
    border-radius: 8px;
    padding: 12px 8px;
    cursor: pointer;
}

.filters-supplier-info {
    display: flex;
    gap: 4px;
    align-items: flex-start;
}

.supplier-info svg {
    flex-shrink: 0;
}

.filters-supplier-details {
    display: flex;
    flex-direction: column;
    gap: 2px;
    margin-top: -2px;
}

.filters-supplier-name {
    font-family: 'Source Sans 3', sans-serif;
    font-weight: 600;
    font-size: 14px;
    line-height: 20px;
    color: #636466;
    transition: color 0.2s ease, font-weight 0.2s ease;
}

.supplier-selected {
    color: #3C7770;
    font-weight: 600;
}

.filters-selected-supplier-name {
    background-color: #f5f5f5;
    font-weight: 500;
}

.filters-name-badge-wrapper {
    display: flex;
    align-items: center;
    gap: 4px;
}

.filters-nav-supplier-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: #F1F1F3;
    border: 1px solid #D2D1D1;
    border-radius: 8px;
    padding: 2px 6px;
    font-size: 10px;
    color: #636466;
    height: 17px;
    font-family: 'Source Sans 3', sans-serif;
}

.filters-delivery-text {
    font-family: 'Source Sans 3', sans-serif;
    font-size: 14px;
    color: #636466;
}

.filters-supplier-drawer-popup {
    width: var(--drawer-width);
    height: 100vh;
    padding: 0;
    box-shadow: 4px 4px 74px rgba(31, 95, 88, 0.18);
    border-radius: 8px;
    display: flex;
    flex-direction: column;
}

.filters-supplier-drawer-title {
    font-family: 'Asap', sans-serif;
    font-weight: 600;
    font-size: 22px;
    line-height: 25px;
    color: #003831;
    margin-bottom: 16px;
}

.filters-supplier-drawer-search-container {
    margin-bottom: 12px;
}

.filters-supplier-drawer-search-bar {
    display: flex;
    align-items: center;
    padding: 11px 12px;
    background: #FFFFFF;
    border: 1px solid #EBEAEA;
    border-radius: 8px;
}

.filters-supplier-drawer-search-icon {
    width: 20px;
    height: 20px;
    color: #636466;
}

.filters-supplier-drawer-search-bar input {
    border: none;
    margin-left: 12px;
    width: 100%;
    font-size: 12px;
    color: #B1B1B1;
    outline: none;
}

.filters-supplier-drawer-search-bar input::placeholder {
    color: #B1B1B1;
}

.filters-supplier-drawer-vendors-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-bottom: 16px;
    max-height: 300px;
    overflow-y: auto;
}

.filters-supplier-drawer-vendor-item {
    display: flex;
    align-items: center;
    padding: 8px 20px;
    background: #FFFFFF;
    border: 1px solid #F1F1F3;
    border-radius: 8px;
    cursor: pointer;
    transition: background-color 0.2s ease;
}

.filters-supplier-drawer-vendor-item:hover {
    border-color: #439D93;
}

.filters-supplier-drawer-checkbox-container {
    position: relative;
    width: 20px;
    height: 20px;
    margin-right: 8px;
}

.filters-supplier-drawer-checkbox-container input {
    position: absolute;
    opacity: 0;
    cursor: pointer;
}

.filters-supplier-drawer-checkmark {
    position: absolute;
    top: 0;
    left: 0;
    height: 20px;
    width: 20px;
    border: 2px solid #636466;
    border-radius: 4px;
    transition: all 0.2s ease;
}

.filters-supplier-drawer-checkbox-container input:checked ~ .filters-supplier-drawer-checkmark {
    background-color: #3C7770;
    border-color: #3C7770;
}

.filters-supplier-drawer-checkmark:after {
    content: "";
    position: absolute;
    display: none;
    left: 5px;
    top: 1px;
    width: 4px;
    height: 10px;
    border: solid white;
    border-width: 0 2px 2px 0;
    transform: rotate(45deg);
}

.filters-supplier-drawer-checkbox-container input:checked ~ .filters-supplier-drawer-checkmark:after {
    display: block;
}

.filters-supplier-drawer-divider {
    height: 1px;
    background: #EBEAEA;
    margin: 16px 0;
}

.filters-supplier-drawer-delivery-options {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-bottom: 24px;
}

.filters-supplier-drawer-delivery-option {
    flex: 0 0 calc(50% - 6px);
    display: flex;
    align-items: center;
    padding: 16px 20px;
    background: #FFFFFF;
    border: 1px solid #F1F1F3;
    border-radius: 8px;
    cursor: pointer;
    transition: border-color 0.2s ease;
}

.filters-supplier-drawer-delivery-option:hover {
    border-color: #439D93;
}

.filters-supplier-drawer-radio-container {
    position: relative;
    width: 24px;
    height: 24px;
    margin-right: 8px;
}

.filters-supplier-drawer-radio-container input {
    position: absolute;
    opacity: 0;
    cursor: pointer;
}

.filters-supplier-drawer-radio-checkmark {
    position: absolute;
    top: 0;
    left: 0;
    height: 24px;
    width: 24px;
    background: #FFFFFF;
    border: 2px solid #636466;
    border-radius: 50%;
    transition: all 0.2s ease;
}

.filters-supplier-drawer-radio-container input:checked ~ .filters-supplier-drawer-radio-checkmark {
    border-color: #3C7770;
}

.filters-supplier-drawer-radio-checkmark:after {
    content: '';
    position: absolute;
    display: none;
    top: 4px;
    left: 4px;
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: #3C7770;
}

.filters-supplier-drawer-radio-container input:checked ~ .filters-supplier-drawer-radio-checkmark:after {
    display: block;
}

.filters-supplier-drawer-close-button {
    width: 100%;
    padding: 10px 16px;
    background: #439D93;
    border: none;
    border-radius: 4px;
    color: #FFFFFF;
    font-family: 'Asap', sans-serif;
    font-weight: 600;
    font-size: 14px;
    cursor: pointer;
    transition: background-color 0.2s ease;
}

.filters-supplier-drawer-close-button:hover {
    background: #3C7770;
}

/* Typography */
.filters-supplier-drawer-vendor-item span {
    font-family: 'Source Sans 3', sans-serif;
    font-size: 14px;
    line-height: 20px;
    color: #3F4A54;
}

.filters-supplier-drawer-delivery-option span {
    font-family: 'Source Sans 3', sans-serif;
    font-size: 14px;
    line-height: 20px;
    color: #3F4A54;
}

.drawer {
    z-index: 10;
    background: white;
    box-shadow: -2px 0 8px rgba(0,0,0,0.1);
    position: fixed;
    transition: transform 0.3s ease-in-out;
    top: 0;
    height: 100vh;
    height: 100dvh;
}

.drawer.initializing {
    transition: none !important;
}

.drawer.initializing * {
    transition: none !important;
}

.drawer-right {
    transform: translateX(0);
}

.drawer-right.collapsed {
    transform: translateX(100%);
}

.drawer-left {
    transform: translateX(0);
}

.drawer-left.collapsed {
    transform: translateX(-100%);
}

@media (max-width: 767px) {
    .drawer {
        width: 100%;
    }

    .drawer.collapsed {
        transform: translateX(100%);
    }

    .drawer.mobile-visible {
        transform: translateX(0);
    }
}

.filters-supplier-sticky-button {
    display: none;
    flex-direction: column;
    align-items: center;
    justify-content: space-between;
    padding: 8px;

    position: fixed;
    width: 32px;
    height: 64px;
    right: 20px;
    bottom: 90px;

    background: #E2F3F1;
    border: 1px solid #B3E6E1;
    box-shadow: 4px 4px 74px rgba(31, 95, 88, 0.18);
    border-radius: 8px;
    z-index: 997;
    cursor: pointer;
}

.filters-supplier-badge {
    position: absolute;
    display: flex;
    justify-content: center;
    align-items: center;
    width: 17px;
    height: 17px;
    right: -8px;
    top: -8px;
    background: #F1F1F3;
    border: 1px solid #D2D1D1;
    border-radius: 8px;
}

.filters-supplier-badge-text {
    font-family: 'Source Sans 3';
    font-style: normal;
    font-weight: 600;
    font-size: 10px;
    line-height: 14px;
    color: #636466;
}

@media (max-width: 767px) {
    .filters-supplier-sticky-button {
        display: flex;
    }
}

.filters-supplier-badge {
    display: flex;
    flex-direction: row;
    justify-content: center;
    align-items: center;
    padding: 2px 6px;
    gap: 4px;

    position: absolute;
    width: 18px;
    height: 18px;
    right: -2px;
    top: -2px;

    background: #F1F1F3;
    border: 1px solid #D2D1D1;
    border-radius: 8px;
}

.filters-supplier-badge-text {
    width: 6px;
    height: 14px;
    font-family: 'Source Sans 3';
    font-style: normal;
    font-weight: 600;
    font-size: 10px;
    line-height: 14px;
    color: #636466;
}

@media (max-width: 767px) {
    .filters-sidebar-menu {
        display: none;
    }

    .filters-supplier-sticky-button {
        display: flex;
    }
}

.filters-supplier-drawer-top {
    overflow-y: auto;
    padding: 40px 32px 10px;
}

.filters-supplier-drawer-vendors-list {
    flex: 1;
    overflow-y: auto;
    margin-bottom: 16px;
    max-height: none;
    padding: 0px 32px;
}

.filters-supplier-drawer-bottom {
    position: sticky;
    bottom: 0;
    background: white;
    padding: 16px 32px 40px;
    z-index: 2;
    border-top: 1px solid #EBEAEA;
}

.filters-supplier-drawer-bottom::before {
    content: '';
    position: absolute;
    top: -10px;
    left: 0;
    right: 0;
    height: 10px;
    background: linear-gradient(to top, rgba(255,255,255,1), rgba(255,255,255,0));
    pointer-events: none;
}

.parent-category-title-container {
    border-bottom: 1px solid #EBEAEA;
    padding-bottom: 12px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.parent-category-title {
    font-family: Asap, serif;
    font-size: 22px;
    font-weight: 600;
    line-height: 25px;
    text-align: left;
    text-underline-position: from-font;
    text-decoration-skip-ink: none;
    color: #202F3C;
}

.sub-category-title {
    font-family: Asap, serif;
    font-size: 18px;
    font-weight: 600;
    line-height: 20.5px;
    text-align: left;
    text-underline-position: from-font;
    text-decoration-skip-ink: none;
    padding-top: 20px;
    color: #3F4A54;
}

/*ProductList filter button*/
/* Section des filtres */
.filter-section {
    display: flex;
    align-items: center;
    gap: 12px;
    margin: 20px 0;
    padding: 0 16px;
}

/* Styles des boutons de filtrage */
.filter-button {
    display: inline-flex;
    align-items: center;
    padding: 8px 16px;
    border-radius: 20px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    color: #E57373; /* Couleur du texte initiale */
    border: 1px solid #E57373; /* Bordure initiale */
    transition: all 0.2s ease;
    background-color: white; /* Fond blanc par défaut */
}

/* Ajout de la classe active pour un bouton sélectionné */
.filter-button.active {
    background-color: #ff7043; /* Fond orange (modifiable) */
    border-color: #ff7043; /* Bordure de la même couleur */
    color: white; /* Texte noir quand sélectionné */
}

/* Style pour l'icône */
.filter-button .icon {
    margin-right: 8px;
    width: 16px;
}

.checkout-discount-tag {
    color: var(--primary-purple);
    background-color: var(--discount-8);
}

.summary-discount-color {
    color: var(--primary-purple);
}

.checkout-supplier-tag {
    color: #533309;
    background-color: #F9E4C8;
}


input[type="radio"].checkout-radio-button {
    display: none;
}

/* Custom radio button container */
.checkout-radio-container {
    display: flex;
    align-items: center;
    cursor: pointer;
    font-size: 16px;
    color: var(--primary-green);
}

/* Outer circle */
.radio-custom {
    width: 24px;
    height: 24px;
    border: 2px solid var(--primary-green);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-right: 8px;
    transition: all 0.3s ease;
}

.radio-custom.radio-custom-disabled {
    border-color: #979FB4;
}

/* Inner circle (hidden by default) */
.radio-custom::after {
    content: "";
    width: 12px;
    height: 12px;
    background-color: var(--primary-green);
    border-radius: 50%;
    transform: scale(0);
    transition: transform 0.3s ease;
}


/* Checked state  */
input[type="radio"]:checked + .radio-custom {
    border-color: #c8f67e;
    border-width: 6px;
}

input[type="radio"]:checked + .radio-custom::after {
    transform: scale(1);
}

.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(0, 0, 0, 0.5);
    display: none;
    justify-content: center;
    align-items: center;
    z-index: 50;
}

/* Modal styles */
.modal {
    display: none;
    z-index: 100;
}


/* Ajustements pour la mise en page responsive */
@media (max-width: 767px) {
    .filter-section {
        overflow-x: auto;
        padding-bottom: 8px;
        margin: 12px 0;
    }

    .filter-button {
        flex-shrink: 0;
    }
}

/* --------------------
   Safe Area Support for Mobile Cart Bottom
-------------------- */
.cart-bottom-safe-area {
    bottom: 3.5rem;
    padding-bottom: 0.5rem;
    padding-top: 0.5rem;
}

@media (max-width: 767px) {
    .cart-bottom-safe-area {
        /* Fallback pour navigateurs qui ne supportent pas env() */
        bottom: 5rem;
        padding-bottom: 1rem;
        
        /* Avec support des safe areas */
        bottom: calc(3.5rem + env(safe-area-inset-bottom, 1.5rem));
        padding-bottom: calc(0.5rem + env(safe-area-inset-bottom, 0.5rem));
    }
}

@media (min-width: 768px) {
    .cart-bottom-safe-area {
        bottom: 0;
        padding-bottom: 1rem;
    }
}

/* Mobile Menu Safe Area */
.mobile-menu-safe-area {
    bottom: 0;
}

@media (max-width: 767px) {
    .mobile-menu-safe-area {
        /* Fallback pour navigateurs qui ne supportent pas env() */
        bottom: 0;
        padding-bottom: 1rem;
        
        /* Avec support des safe areas */
        bottom: env(safe-area-inset-bottom, 0px);
        padding-bottom: env(safe-area-inset-bottom, 1rem);
    }
}

/* Cart Drawer Bottom Margins */
.cart-drawer-bottom-margin {
    margin-bottom: 5rem; /* 20 * 0.25rem = 5rem */
}

.cart-content-bottom-margin {
    margin-bottom: 5rem; /* 20 * 0.25rem = 5rem */
}

@media (max-width: 767px) {
    .cart-drawer-bottom-margin {
        /* Fallback pour navigateurs qui ne supportent pas env() */
        margin-bottom: 7rem;
        
        /* Avec support des safe areas */
        margin-bottom: calc(5rem + env(safe-area-inset-bottom, 2rem));
    }
    
    .cart-content-bottom-margin {
        /* Fallback pour navigateurs qui ne supportent pas env() */
        margin-bottom: 7rem;
        
        /* Avec support des safe areas */
        margin-bottom: calc(5rem + env(safe-area-inset-bottom, 2rem));
    }
}

@media (min-width: 768px) {
    .cart-drawer-bottom-margin {
        margin-bottom: 5rem; /* Garde un peu d'espace sur desktop */
    }
    
    .cart-content-bottom-margin {
        margin-bottom: 5rem; /* Garde un peu d'espace sur desktop */
    }
}
