#celso-product-listing-container {
    margin: 0;
    font-family: inherit;
}

#celso-product-listing-layout {
    display: flex;
    gap: 30px;
    align-items: flex-start;
    margin: 20px 0;
}

#celso-product-list-column {
    flex: 0 0 75%;
    max-width: 75%;
}

#celso-sticky-cart-column {
    flex: 0 0 calc(25% - 30px);
    max-width: calc(25% - 30px);
    position: sticky;
    top: 100px; /* Ajustează în funcție de înălțimea headerului site-ului */
    z-index: 100;
}

/* Stiluri pentru coș */
.celso-sticky-cart {
    background: #fff;
    border: 1px solid #ddd;
    border-radius: 8px;
    padding: 20px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
}

.celso-cart-header h3 {
    margin-top: 0;
    border-bottom: 2px solid #007cba;
    padding-bottom: 10px;
    font-size: 1.2em;
    color: #333;
}

.celso-cart-items-list {
    list-style: none;
    padding: 0;
    margin: 15px 0;
}

.celso-cart-items-list li {
    display: flex;
    justify-content: space-between;
    padding: 10px 0;
    border-bottom: 1px solid #eee;
    font-size: 0.9em;
}

.cart-item-info {
    display: flex;
    flex-direction: column;
    padding-right: 10px;
}

.product-name {
    font-weight: 600;
    line-height: 1.2;
    margin-bottom: 4px;
}

.product-quantity {
    color: #777;
    font-size: 0.85em;
}

.product-quantity-edit {
    margin-top: 5px;
}

.celso-cart-qty-selector {
    display: flex;
    align-items: center;
    border: 1px solid #ddd;
    border-radius: 4px;
    overflow: hidden;
    width: fit-content;
}

.celso-cart-qty-btn {
    background: #f1f1f1;
    border: none;
    width: 35px;
    height: 35px;
    font-size: 18px;
    font-weight: bold;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s;
}

.celso-cart-qty-btn:hover {
    background: #e1e1e1;
}

.celso-cart-qty-input {
    width: 45px !important;
    height: 35px;
    border: none !important;
    border-left: 1px solid #ddd !important;
    border-right: 1px solid #ddd !important;
    text-align: center;
    margin: 0 !important;
    padding: 0 !important;
    -moz-appearance: textfield;
    outline: none;
}

.celso-cart-qty-input::-webkit-outer-spin-button,
.celso-cart-qty-input::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

.celso-cart-qty-input:focus {
    background-color: #f9f9f9;
}

.cart-item-price {
    font-weight: bold;
    white-space: nowrap;
}

.celso-cart-summary {
    margin-top: 15px;
}

.cart-total {
    display: flex;
    justify-content: space-between;
    font-size: 1.1em;
    padding: 10px 0;
}

.cart-actions {
    margin-top: 15px;
}

.checkout-btn {
    display: block;
    width: 100%;
    text-align: center;
    background-color: #d63638 !important;
    color: #fff !important;
    text-decoration: none;
    padding: 12px;
    border-radius: 4px;
    font-weight: bold;
    border: none;
    cursor: pointer;
}

.checkout-btn:hover {
    background-color: #bc2022 !important;
}

.empty-cart-msg {
    color: #888;
    font-style: italic;
    text-align: center;
    padding: 20px 0;
}

.celso-listing-search {
    margin-bottom: 20px;
}

.celso-listing-search input {
    width: 100%;
    padding: 12px;
    border: 1px solid #ccc;
    border-radius: 4px;
    font-size: 16px;
}

.celso-listing-table-wrapper {
    overflow-x: auto;
}

.celso-listing-table {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 20px;
}

.celso-listing-table th, 
.celso-listing-table td {
    padding: 12px;
    border-bottom: 1px solid #eee;
    text-align: left;
    vertical-align: middle;
}

.celso-listing-table th {
    background-color: #f9f9f9;
    font-weight: bold;
}

.celso-col-product {
    width: 20%;
}

.celso-product-main-info {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
}

.celso-product-img img {
    max-width: 80px;
    height: auto;
    display: block;
    margin-bottom: 8px;
}

.celso-col-desc {
    width: 55%;
}

.celso-col-action {
    width: 25%;
    text-align: center !important;
}

.celso-action-wrapper {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
}

.celso-qty-selector {
    display: flex;
    align-items: center;
    border: 1px solid #ddd;
    border-radius: 4px;
    overflow: hidden;
}

.celso-qty-btn {
    background: #f1f1f1;
    border: none;
    width: 40px;
    height: 40px;
    font-size: 20px;
    font-weight: bold;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s;
}

.celso-qty-btn:hover {
    background: #e1e1e1;
}

.celso-qty-btn:active {
    background: #d1d1d1;
}

.celso-qty {
    width: 50px !important;
    height: 40px;
    border: none !important;
    border-left: 1px solid #ddd !important;
    border-right: 1px solid #ddd !important;
    text-align: center;
    margin: 0 !important;
    padding: 0 !important;
    -moz-appearance: textfield;
}

.celso-qty::-webkit-outer-spin-button,
.celso-qty::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

.celso-listing-price {
    font-weight: bold;
    font-size: 1.2em;
    color: #333;
}

.celso-add-to-cart-btn {
    width: 100%;
    max-width: 150px;
    background-color: #007cba;
    color: #fff;
    border: none;
    padding: 12px 20px !important;
    border-radius: 4px;
    cursor: pointer;
    font-weight: 600;
    font-size: 16px !important;
}

.celso-add-to-cart-btn:hover {
    background-color: #006799;
}

.celso-add-to-cart-btn:disabled {
    background-color: #ccc;
    cursor: not-allowed;
}

#celso-listing-pagination {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 20px;
}

#celso-listing-pagination .page-numbers {
    padding: 8px 12px;
    border: 1px solid #ddd;
    border-radius: 4px;
    text-decoration: none;
    color: #333;
}

#celso-listing-pagination .page-numbers.current {
    background-color: #007cba;
    color: #fff;
    border-color: #007cba;
}

#celso-listing-pagination .page-numbers:hover:not(.current) {
    background-color: #eee;
}

#celso-listing-pagination .dots {
    padding: 8px 4px;
}

.celso-only-mobile { display: none; }
.celso-only-desktop { display: block; }

@media (max-width: 768px) {
    #celso-product-listing-layout {
        flex-direction: column;
    }

    #celso-product-list-column {
        flex: 0 0 100%;
        max-width: 100%;
    }

    #celso-sticky-cart-column {
        display: none;
    }

    .celso-only-desktop {
        display: none;
    }

    .celso-only-mobile {
        display: block;
    }

    /* Transformare tabel în carduri */
    .celso-listing-table, 
    .celso-listing-table thead, 
    .celso-listing-table tbody, 
    .celso-listing-table th, 
    .celso-listing-table td, 
    .celso-listing-table tr {
        display: block;
    }

    .celso-listing-table thead tr {
        position: absolute;
        top: -9999px;
        left: -9999px;
    }

    .celso-listing-table tr {
        border: 1px solid #ddd;
        border-radius: 8px;
        margin-bottom: 20px;
        background: #fff;
        padding: 10px;
        box-shadow: 0 2px 5px rgba(0,0,0,0.05);
    }

    .celso-listing-table td {
        border: none;
        padding: 10px 5px;
        width: 100% !important;
        box-sizing: border-box;
    }

    /* Rand 1: Produs (Poza | Titlu) */
    .celso-col-product {
        border-bottom: 1px solid #eee !important;
    }

    .celso-product-main-info {
        flex-direction: row !important;
        text-align: left !important;
        gap: 15px;
        align-items: center !important;
    }

    .celso-product-img img {
        margin-bottom: 0 !important;
        max-width: 60px !important;
    }

    .celso-product-name {
        font-size: 1.1em;
    }

    /* Rand 2: Descriere */
    .celso-col-desc {
        color: #666;
        font-size: 0.95em;
    }

    /* Rand 3: Acțiune */
    .celso-col-action {
        border-top: 1px solid #eee !important;
        margin-top: 5px;
    }

    .celso-action-wrapper {
        flex-direction: row !important;
        justify-content: space-between;
        width: 100%;
    }

    .celso-add-to-cart-btn {
        max-width: none !important;
        flex: 1;
        margin-left: 10px;
    }

    /* Search above table */
    #celso-mobile-search-container {
        width: 100%;
        margin-bottom: 20px;
    }
}

/* Modal Coș */
.celso-modal {
    display: none;
    position: fixed;
    z-index: 10001;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: rgba(0,0,0,0.5);
}

.celso-modal-content {
    background-color: #fefefe;
    margin: 10% auto;
    padding: 20px;
    border: 1px solid #888;
    width: 90%;
    max-width: 500px;
    border-radius: 8px;
    position: relative;
}

.celso-close-modal {
    color: #aaa;
    position: absolute;
    right: 15px;
    top: 10px;
    font-size: 28px;
    font-weight: bold;
    cursor: pointer;
}

.celso-close-modal:hover,
.celso-close-modal:focus {
    color: black;
    text-decoration: none;
}

/* Buton Coș Mobil Fix */
#celso-mobile-cart-trigger {
    display: none;
    position: fixed;
    bottom: 20px;
    right: 20px;
    background-color: #d63638;
    color: #fff;
    padding: 0 15px;
    height: 45px;
    border-radius: 25px;
    box-shadow: 0 4px 10px rgba(0,0,0,0.3);
    z-index: 10000;
    cursor: pointer;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    font-size: 14px;
}

@media (max-width: 768px) {
    #celso-mobile-cart-trigger {
        display: flex;
    }
}

#celso-mobile-cart-trigger .cart-text {
    white-space: nowrap;
}

#celso-mobile-cart-trigger .cart-text,
#celso-mobile-cart-trigger .cart-text span,
#celso-mobile-cart-trigger .cart-text bdi,
#celso-mobile-cart-trigger .cart-text strong {
    color: #fff !important;
}
