/* ========================================
   CART PAGE - PREMIUM DESIGN
   ======================================== */

.cart-section {
    background: linear-gradient(135deg, #f5f7fa 0%, #c3cfe2 100%);
    min-height: 100vh;
}

/* Page Header */
.cart-page-header {
    background: white;
    padding: 2.5rem;
    border-radius: 20px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.1);
    position: relative;
    overflow: hidden;
}

.cart-page-header::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 5px;
    background: linear-gradient(90deg, #cc0000, #ff3333, #cc0000);
}

.cart-title {
    font-size: 2.5rem;
    font-weight: 800;
    color: #212529;
    display: flex;
    align-items: center;
}

.cart-title i {
    color: #cc0000;
}

.cart-subtitle {
    font-size: 1.1rem;
}

/* Empty Cart */
.empty-cart-container {
    background: white;
    padding: 5rem 3rem;
    border-radius: 20px;
    text-align: center;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.1);
}

.empty-cart-icon {
    width: 150px;
    height: 150px;
    margin: 0 auto 2rem;
    background: linear-gradient(135deg, rgba(204, 0, 0, 0.1), rgba(255, 51, 51, 0.1));
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.empty-cart-icon i {
    font-size: 5rem;
    color: #cc0000;
    opacity: 0.3;
}

.empty-cart-title {
    font-size: 2rem;
    font-weight: 700;
    color: #495057;
    margin-bottom: 1rem;
}

.empty-cart-text {
    font-size: 1.1rem;
    color: #6c757d;
}

/* Cart Items Header */
.cart-items-header {
    background: white;
    padding: 1.5rem;
    border-radius: 15px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.08);
}

.cart-items-header .form-check-input {
    width: 1.5rem;
    height: 1.5rem;
    cursor: pointer;
}

.cart-item-dates i {
    font-size: 14px !important;
}

.d-unset {
    display: unset !important;
}

.cart-items-header .form-check-input:checked {
    background-color: #cc0000;
    border-color: #cc0000;
}

/* Cart Item Card */
.cart-item-card {
    background: white;
    border-radius: 20px;
    padding: 2rem;
    margin-bottom: 1.5rem;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.08);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    border: 1px solid transparent;
    position: relative;
    overflow: hidden;
}

.cart-item-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 5px;
    height: 100%;
    background: linear-gradient(180deg, #cc0000, #ff3333);
    transform: scaleY(0);
    transition: transform 0.4s ease;
}

.cart-item-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.15);
}

.cart-item-card:hover::before {
    transform: scaleY(1);
}

.cart-item-card.selected {
    border-color: #cc0000;
    box-shadow: 0 15px 50px rgba(204, 0, 0, 0.2);
    background: linear-gradient(135deg, #ffffff 0%, #fff5f5 100%);
}

.cart-item-card.selected::before {
    transform: scaleY(1);
}

.cart-item-card.unavailable {
    opacity: 0.6;
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    position: relative;
}

.cart-item-card.unavailable::after {
    content: 'TẠM HẾT';
    position: absolute;
    top: 6px !important;
    right: 38px !important;
    background: #dc3545;
    color: white;
    padding: 0rem 1rem;
    border-radius: 20px;
    font-weight: 700;
    font-size: 0.6rem;
    letter-spacing: 1px;
}

/* Cart Item Layout */
.cart-item-header {
    display: flex;
    gap: 1.5rem;
    align-items: flex-start;
}

.cart-checkbox-wrapper {
    padding-top: 0.5rem;
}

.cart-checkbox {
    width: 1.5rem;
    height: 1.5rem;
    cursor: pointer;
    accent-color: #cc0000;
}

.cart-checkbox:disabled {
    cursor: not-allowed;
    opacity: 0.5;
}

.cart-item-image-wrapper {
    position: relative;
}

.cart-item-image {
    width: 140px;
    height: 140px;
    object-fit: cover;
    border-radius: 15px;
    border: 3px solid #f0f0f0;
    transition: all 0.3s ease;
}

.cart-item-card:hover .cart-item-image {
    border-color: #cc0000;
    transform: scale(1.05);
}

.cart-item-info {
    flex: 1;
}

.cart-item-name {
    font-size: 1.4rem;
    font-weight: 700;
    color: #212529;
    margin-bottom: 0.75rem;
    line-height: 1.3;
}

.cart-item-description {
    color: #6c757d;
    font-size: 0.95rem;
    line-height: 1.6;
    margin-bottom: 1rem;
}

.cart-item-status {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    border-radius: 25px;
    font-size: 0.9rem;
    font-weight: 600;
}

.status-available {
    background: linear-gradient(135deg, #d4edda, #c3e6cb);
    color: #155724;
}

.status-limited {
    background: linear-gradient(135deg, #fff3cd, #ffeaa7);
    color: #856404;
}

.status-unavailable {
    background: linear-gradient(135deg, #f8d7da, #f5c6cb);
    color: #721c24;
}

.cart-item-remove {
    color: #dc3545;
    cursor: pointer;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: all 0.3s ease;
}

.cart-item-remove:hover {
    background: #dc3545;
    color: white;
    transform: unset !important;
}

/* Date Picker Section */
.cart-item-dates {
    margin-top: 1.5rem;
    padding-top: 1.5rem;
    border-top: 2px dashed #e9ecef;
    /* animation: slideDown 0.4s ease; */
}

@keyframes slideDown {
    from {
        opacity: 0;
        max-height: 0;
    }

    to {
        opacity: 1;
        max-height: 500px;
    }
}

.date-label {
    font-size: 1rem;
    font-weight: 700;
    color: #495057;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 1rem;
}

.date-picker-wrapper {
    position: relative;
}

.date-picker-wrapper input {
    padding: 1rem 1rem 1rem 3rem;
    border: 2px solid #e9ecef;
    border-radius: 12px;
    font-size: 1rem;
    transition: all 0.3s ease;
    background: white;
}

.date-picker-wrapper input:focus {
    border-color: #cc0000;
    box-shadow: 0 0 0 0.25rem rgba(204, 0, 0, 0.1);
    outline: none;
}

.date-picker-wrapper i {
    position: absolute;
    left: 1rem;
    top: 50%;
    transform: translateY(-50%);
    color: #cc0000;
    font-size: 1.2rem;
    pointer-events: none;
}

.date-info {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-top: 0.75rem;
    padding: 0.75rem;
    background: rgba(204, 0, 0, 0.05);
    border-radius: 10px;
    font-size: 0.9rem;
}

.date-info.success {
    background: rgba(40, 167, 69, 0.1);
    color: #155724;
}

.date-info i {
    font-size: 1.1rem;
}

/* Sidebar */
.cart-sidebar {
    top: 100px;
}

.sidebar-card {
    background: white;
    border-radius: 20px;
    padding: 2rem;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.1);
    position: relative;
    overflow: hidden;
}

.sidebar-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 5px;
    background: linear-gradient(90deg, #cc0000, #ff3333, #cc0000);
}

.sidebar-title {
    font-size: 1.3rem;
    font-weight: 700;
    color: #212529;
    margin-bottom: 1.5rem;
    display: flex;
    align-items: center;
}

.sidebar-divider {
    height: 2px;
    background: linear-gradient(90deg, transparent, #e9ecef, transparent);
    margin: 1.5rem 0;
}

/* Summary Stats */
.summary-stats {
    display: grid;
    gap: 1rem;
}

.stat-item {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem;
    background: #f8f9fa;
    border-radius: 12px;
    transition: all 0.3s ease;
}

.stat-item:hover {
    transform: translateX(5px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

.stat-icon {
    width: 50px;
    height: 50px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.3rem;
}

.stat-content {
    flex: 1;
}

.stat-label {
    font-size: 0.85rem;
    color: #6c757d;
    font-weight: 500;
}

.stat-value {
    font-size: 1.5rem;
    font-weight: 700;
    color: #212529;
}

input[type=number] {
    -moz-appearance: textfield;
    /* Firefox */
}

input[type=number]::-webkit-inner-spin-button,
input[type=number]::-webkit-outer-spin-button {
    -webkit-appearance: none;
    /* Chrome, Safari, Edge */
    margin: 0;
}

/* Confirm Button */
.confirm-btn {
    background: linear-gradient(135deg, #cc0000, #ff3333);
    border: none;
    padding: 1rem;
    font-size: 1.1rem;
    font-weight: 700;
    border-radius: 12px;
    box-shadow: 0 10px 30px rgba(204, 0, 0, 0.3);
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}


.confirm-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 15px 40px rgba(204, 0, 0, 0.4);
}

.confirm-btn:disabled {
    background: #adb5bd;
    cursor: not-allowed;
    box-shadow: none;
    transform: none;
}

/* Confirmation Modal */
.confirmation-list {
    max-height: 400px;
    overflow-y: auto;
    padding-right: 0.5rem;
}

.confirmation-item {
    background: linear-gradient(135deg, #f8f9fa, #e9ecef);
    border-radius: 15px;
    padding: 1.5rem;
    margin-bottom: 1rem;
    border-left: 5px solid #cc0000;
    transition: all 0.3s ease;
}

.confirmation-item:hover {
    transform: translateX(5px);
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.1);
}

.confirmation-item-name {
    font-size: 1.2rem;
    font-weight: 700;
    color: #212529;
    margin-bottom: 1rem;
}

.confirmation-item-detail {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin: 0.5rem 0;
    color: #495057;
    font-size: 0.95rem;
}

.confirmation-item-detail i {
    color: #cc0000;
    width: 20px;
}

.date-range-text {
    font-weight: 600;
    color: #cc0000;
}

/* Success Checkmark Animation */
.success-checkmark {
    width: 80px;
    height: 115px;
    margin: 0 auto;
}

.check-icon {
    width: 80px;
    height: 80px;
    position: relative;
    border-radius: 50%;
    box-sizing: content-box;
    border: 4px solid #28a745;
}

.check-icon::before {
    top: 3px;
    left: -2px;
    width: 30px;
    transform-origin: 100% 50%;
    border-radius: 100px 0 0 100px;
}

.check-icon::after {
    top: 0;
    left: 30px;
    width: 60px;
    transform-origin: 0 50%;
    border-radius: 0 100px 100px 0;
    animation: rotate-circle 4.25s ease-in;
}

.icon-line {
    height: 5px;
    background-color: #28a745;
    display: block;
    border-radius: 2px;
    position: absolute;
    z-index: 10;
}

.icon-line.line-tip {
    top: 46px;
    left: 14px;
    width: 25px;
    transform: rotate(45deg);
    animation: icon-line-tip 0.75s;
}

.icon-line.line-long {
    top: 38px;
    right: 8px;
    width: 47px;
    transform: rotate(-45deg);
    animation: icon-line-long 0.75s;
}

.icon-circle {
    top: -4px;
    left: -4px;
    z-index: 10;
    width: 80px;
    height: 80px;
    border-radius: 50%;
    position: absolute;
    box-sizing: content-box;
    border: 4px solid rgba(40, 167, 69, .5);
}

.icon-fix {
    top: 8px;
    width: 5px;
    left: 26px;
    z-index: 1;
    height: 85px;
    position: absolute;
    transform: rotate(-45deg);
    background-color: white;
}

@keyframes rotate-circle {
    0% {
        transform: rotate(-45deg);
    }

    5% {
        transform: rotate(-45deg);
    }

    12% {
        transform: rotate(-405deg);
    }

    100% {
        transform: rotate(-405deg);
    }
}

@keyframes icon-line-tip {
    0% {
        width: 0;
        left: 1px;
        top: 19px;
    }

    54% {
        width: 0;
        left: 1px;
        top: 19px;
    }

    70% {
        width: 50px;
        left: -8px;
        top: 37px;
    }

    84% {
        width: 17px;
        left: 21px;
        top: 48px;
    }

    100% {
        width: 25px;
        left: 14px;
        top: 45px;
    }
}

@keyframes icon-line-long {
    0% {
        width: 0;
        right: 46px;
        top: 54px;
    }

    65% {
        width: 0;
        right: 46px;
        top: 54px;
    }

    84% {
        width: 55px;
        right: 0px;
        top: 35px;
    }

    100% {
        width: 47px;
        right: 8px;
        top: 38px;
    }
}

/* Flatpickr Custom */
.flatpickr-calendar {
    border-radius: 15px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2);
    border: none;
}

.flatpickr-day.selected {
    background: #cc0000;
    border-color: #cc0000;
}

.flatpickr-day.selected:hover,
.flatpickr-day.startRange,
.flatpickr-day.endRange {
    background: #569ff7;
    border-color: #569ff7;
}

.flatpickr-day.inRange {
    background: #e6e6e6;
    border-color: transparent;
}

.flatpickr-day.disabled,
.flatpickr-day.disabled:hover {
    background: #f8d7da;
    color: #721c24;
    cursor: not-allowed;
    opacity: 0;
}

/* Responsive */
@media (max-width: 991px) {
    .cart-sidebar {
        position: static !important;
        margin-top: 2rem;
    }
}

@media (max-width: 768px) {
    .cart-title {
        font-size: 1.8rem;
    }

    .cart-item-header {
        flex-direction: column;
    }

    .cart-item-image {
        width: 100%;
        height: 200px;
    }

    .stat-item {
        flex-direction: column;
        text-align: center;
    }
}

.custom-delete {
    right: 9px !important;
    top: 8px !important;
}

.custom-over {
    top: 6px !important;
    right: 38px !important;
}

.w-custom-status-cart {
    width: 6rem;
}

.date-picker-wrapper .px-custom-form {
    padding: 12px 36px !important;
}

.btn-view-cart {
    color: #fff !important;
}