/* Table styling for cart items display */
.cart-items-table {
    width: 100%;
    border-collapse: collapse;
    background: #fff;
    border: 1px solid #ddd;
    border-radius: 4px;
    overflow: hidden;
}

.cart-items-table thead {
    background-color: #f5f5f5;
    border-bottom: 1px solid #ddd;
}

.cart-items-table thead th {
    padding: 15px 20px;
    text-align: left;
    font-weight: 700;
    font-size: 12px;
    color: #000;
    text-transform: uppercase;
    background-color: #ffffff;
    border-bottom: 1px solid #ddd;
}

.cart-items-table tbody tr {
    border-bottom: 1px solid #ddd;
    transition: background-color 0.2s ease;
}

.cart-items-table tbody tr:hover {
    background-color: #fafafa;
}

.cart-items-table tbody td {
    padding: 15px 20px;
    vertical-align: middle;
}

.cart-item-img-col {
    width: 150px;
}

.cart-item-img-col img {
    width: 100%;
    height: auto;
    border-radius: 4px;
    border: 1px solid #ddd;
}

.cart-item-name-col {
    word-break: break-word;
}

.cart-item-name-col strong {
    display: block;
    margin-bottom: 5px;
    font-size: 14px;
}

.cart-item-sku {
    font-size: 12px;
    color: #666;
    margin: 3px 0;
}

.cart-item-attributes-co {
    display: flex;
    flex-wrap: wrap;
    gap: 12px
}

@media (max-width:768px) {
    .cart-item-attributes-co {
        gap: 8px
    }
}

.cart-item-attributes-co .attribute {
    background: #f5f5f5;
    border-radius: 4px;
    color: #000;
    font-size: 9px;
    padding: 4px 10px
}

@media (max-width:768px) {
    .cart-item-attributes-co .attribute {
        font-size: 12px;
        padding: 3px 8px
    }
}

.cart-item-qty-col {
    text-align: center;
}

.cart_item-nowrap {
    white-space: nowrap;
}

.cart-item-price-col,
.cart-item-total-col {
    text-align: right;
    /* font-weight: 600; */
    font-size: small;
    white-space: nowrap;
    padding-right: 30px;
}

.cart-price-old {
    text-decoration: line-through;
    color: #999;
    font-size: 12px;
}

.cart-price-discount {
    background: #0043D5;
    color: #fff;
    font-size: 10px;
    font-weight: 600;
    padding: 2px 6px;
    border-radius: 3px;
    margin-left: 5px;
}

.cart-items-table tfoot {
    background-color: #fff;
    border-top: 1px solid #ddd;
}

.cart-items-table tfoot tr {
    border-bottom: 1px solid #ddd;
    background: #fff;
    border: 1px solid #ddd;
    margin: 8px 0;
}

.cart-items-table tfoot tr:last-child {
    border-bottom: 1px solid #ddd;
}

/* Loading state for AJAX cart */
.cart-loading {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    padding: 40px 20px;
    color: #666;
}
.cart-loading .loader {
    width: 28px;
    height: 28px;
    border: 3px solid #e6e6e6;
    border-top-color: #000;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}
.cart-loading .loading-text { font-size: 14px; }

@keyframes spin { from { transform: rotate(0deg); } to { transform: rotate(360deg); } }

.cart-error { padding: 18px; color: #a00; }

.cart-items-table tfoot td {
    padding: 12px 20px;
    font-size: 13px;
}

.cart-total-row td {
    background-color: #f0f0f0;
    font-weight: 700;
    font-size: 14px;
    padding: 15px 20px;
    border: 1px solid #ddd;
    border-radius: 4px;
}

.text-right {
    text-align: right;
}

/* Tablet styles */
@media (max-width: 992px) {
    .cart-items-table thead th {
        padding: 12px 15px;
        font-size: 11px;
    }

    .cart-items-table tbody td {
        padding: 12px 15px;
    }

    .cart-item-img-col {
        width: 100px;
    }

    .cart-item-price-col,
    .cart-item-total-col {
        padding-right: 20px;
    }

    .quickcheckout-heading {
        font-size: 15px;
        min-height: 40px;
    }

    .cart-summary-sidebar-co {
        top: 60px;
    }
}

/* Mobile styles */
@media (max-width: 768px) {
    .cart-items-table {
        font-size: 12px;
        border: none;
    }

    /* Hide table headers on mobile */
    .cart-items-table thead {
        display: none;
    }

    /* Make each row a card */
    .cart-items-table tbody tr {
        display: block;
        margin-bottom: 15px;
        border: 1px solid #ddd;
        border-radius: 4px;
        padding: 15px;
    }

    .cart-items-table tbody tr:hover {
        background-color: #fff;
    }

    .cart-items-table tbody td {
        display: block;
        padding: 8px 0;
        text-align: left !important;
        border: none;
    }

    /* Image column */
    .cart-item-img-col {
        width: 100%;
        text-align: center;
        margin-bottom: 10px;
    }

    .cart-item-img-col img {
        max-width: 150px;
        width: 100%;
    }

    /* Add labels for mobile */
    .cart-item-img-col::before,
    .cart-item-name-col::before,
    .cart-item-qty-col::before,
    .cart-item-price-col::before,
    .cart-item-total-col::before {
        content: attr(data-label);
        font-weight: 700;
        display: block;
        margin-bottom: 5px;
        color: #000;
        font-size: 11px;
        text-transform: uppercase;
    }

    /* Hide label for image column */
    .cart-item-img-col::before {
        display: none;
    }

    .cart-item-name-col {
        border-bottom: 1px solid #ddd;
        padding-bottom: 10px !important;
        margin-bottom: 10px;
    }

    .cart-item-qty-col,
    .cart-item-price-col,
    .cart-item-total-col {
        font-size: 13px;
        padding-right: 0 !important;
    }

    /* Footer totals */
    .cart-items-table tfoot {
        display: block;
    }

    .cart-items-table tfoot tr {
        display: flex;
        justify-content: space-between;
        padding: 10px 15px;
        margin-bottom: 8px;
    }

    .cart-items-table tfoot td {
        display: inline-block;
        padding: 0;
        border: none;
    }

    .cart-total-row td {
        font-size: 13px;
        padding: 10px 15px;
    }

    /* Sidebar */
    .cart-summary-sidebar-co {
        position: static;
        margin-top: 20px;
    }

    .quickcheckout-heading {
        font-size: 14px;
        min-height: 35px;
        padding-left: 15px;
    }

    .quickcheckout-content {
        padding: 15px;
    }

    .adresa-de-livrare {
        margin-bottom: 15px;
    }

    .select2-container--default .select2-selection--single {
        height: 42px !important;
    }

    .select2-container--default .select2-selection--single .select2-selection__rendered {
        line-height: 40px !important;
    }

    .select2-container--default .select2-selection--single .select2-selection__arrow {
        height: 40px !important;
    }
}

/* Small mobile styles */
@media (max-width: 480px) {
    .cart-items-table tbody tr {
        padding: 12px;
    }

    .cart-item-name-col strong {
        font-size: 13px;
    }

    .cart-item-sku {
        font-size: 11px;
    }

    .cart-item-attributes-co .attribute {
        font-size: 10px;
        padding: 3px 6px;
    }

    .quickcheckout-heading {
        font-size: 13px;
        padding-left: 12px;
    }

    .quickcheckout-content {
        padding: 12px;
    }

    .cart-loading {
        padding: 30px 15px;
    }

    .cart-loading .loader {
        width: 24px;
        height: 24px;
    }

    .cart-loading .loading-text {
        font-size: 13px;
    }
}


.quickcheckout-heading {
    border-bottom: 1px solid #ddd;
    width: 100%;
    padding-left: 20px;
    min-height: 45px;
    display: flex;
    align-items: center;
    font-weight: 600;
    font-size: 16px;
    color: #000;
    gap:8px;
    background: #fff;

}

.quickcheckout-content {
    padding: 10px;
    background: #fff;
}


.adresa-de-livrare {
    background: #fff;
    border: 1px solid #ddd;
    border-radius: 4px;
}

.cart-summary-right {
    background: #fff;
    border: 1px solid #ddd;
    border-radius: 4px;
    /* padding: 25px; */
}


.cart-summary-sidebar-co {
    display: flex;
    flex-direction: column;
    gap: 15px;
    position: sticky;
    top: 70px;
  
}

.address-selectbox  {
    height: 46px !important;
}

.delivery-card,.payment-card,.table-card{
    border:1px solid #ddd;
}

/* Select2 styling to match form inputs */
.select2-container--default .select2-selection--single {
    height: 46px !important;
    border: 1px solid #ced4da !important;
    border-radius: 0.25rem !important;
    padding: 0.375rem 0.75rem !important;
}

.select2-container--default .select2-selection--single .select2-selection__rendered {
    line-height: 44px !important;
    padding-left: 0 !important;
    color: #495057 !important;
}

.select2-container--default .select2-selection--single .select2-selection__arrow {
    height: 44px !important;
    top: 1px !important;
    right: 1px !important;
}

.select2-container--default .select2-selection--single:focus,
.select2-container--default.select2-container--open .select2-selection--single {
    border-color: #86b7fe !important;
    outline: 0 !important;
    box-shadow: 0 0 0 0.25rem rgba(13, 110, 253, 0.25) !important;
}

.select2-dropdown {
    border: 1px solid #ced4da !important;
    border-radius: 0.25rem !important;
}

.select2-container--default .select2-results__option--highlighted[aria-selected] {
    background-color: #0d6efd !important;
}

.select2-container {
    width: 100% !important;
}