.topbar-right .social-area {
    position: relative;
}

.topbar-right .cart-link-header {
    cursor: pointer;
    transition: transform 0.2s ease, box-shadow 0.2s ease, background-color 0.2s ease;
    border: none;
    background: transparent;
    text-decoration: none;
}

.topbar-right .cart-link-header:hover {
    transform: translateY(-1px);
}

.topbar-right .cart-link-header.is-open {
    box-shadow: 0 4px 12px rgba(209, 39, 39, 0.35);
}

.topbar-right .cart-items-container {
    width: 360px;
    max-width: calc(100vw - 24px);
    max-height: none;
    overflow: hidden;
    text-align: left;
    border-radius: 12px;
    z-index: 10050;
    display: none;
    position: absolute;
    left: auto;
    right: 0;
    top: calc(100% + 12px);
    min-width: 320px;
    border: 1px solid #e8ebf0;
    border-top: 3px solid var(--main-color, #d12727);
    line-height: normal;
    padding: 0;
    background: #fff;
    margin-top: 0;
    box-shadow: 0 16px 40px rgba(15, 23, 42, 0.18);
    opacity: 0;
    transform: translateY(8px);
    transition: opacity 0.2s ease, transform 0.2s ease;
}

.topbar-right .cart-items-container:before {
    color: var(--main-color, #d12727);
    content: "\f0d8";
    font-family: "FontAwesome";
    font-size: 22px;
    position: absolute;
    right: 18px;
    top: -14px;
    width: 26px;
    line-height: 1;
}

.topbar-right .cart-items-container.active {
    display: block !important;
    opacity: 1;
    transform: translateY(0);
}

.navbar-top .topbar-right .cart-link-header.item-available {
    background-color: #d12727 !important;
    border-radius: 10px;
    padding: 6px 10px;
    display: inline-flex !important;
    align-items: center;
    gap: 8px;
    text-decoration: none;
}

.navbar-top .topbar-right .cart-link-header.item-available img {
    filter: brightness(0) invert(1);
}

.navbar-top .topbar-right .cart-link-header.item-available .cart-count {
    display: inline-flex !important;
    align-items: center;
    justify-content: center;
    min-width: 22px;
    height: 22px;
    border-radius: 999px !important;
    background-color: #fff;
    color: #d12727;
    font-size: 0.75rem;
    font-weight: 700;
    line-height: 1;
    padding: 0 6px;
    margin-left: 0;
}

.cart-dropdown-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px 16px 10px;
    border-bottom: 1px solid #eef1f5;
}

.cart-dropdown-header__title {
    margin: 0;
    font-size: 1rem;
    font-weight: 700;
    color: #1f2937;
}

.cart-dropdown-close {
    border: 0;
    background: #f3f4f6;
    color: #4b5563;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    line-height: 1;
    font-size: 1.25rem;
    cursor: pointer;
    transition: background-color 0.2s ease, color 0.2s ease;
}

.cart-dropdown-close:hover {
    background: #e5e7eb;
    color: #111827;
}

.cart-dropdown-body {
    max-height: 320px;
    overflow-y: auto;
}

.cart-dropdown-body.is-loading {
    min-height: 120px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.cart-dropdown-loading {
    color: #6b7280;
    font-size: 0.9rem;
}

.cart-dropdown-empty {
    padding: 28px 20px 24px;
    text-align: center;
}

.cart-dropdown-empty__icon {
    width: 56px;
    height: 56px;
    margin: 0 auto 12px;
    border-radius: 50%;
    background: #f3f4f6;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #9ca3af;
    font-size: 1.4rem;
}

.cart-dropdown-empty__title {
    margin: 0 0 6px;
    font-size: 1rem;
    font-weight: 700;
    color: #1f2937;
}

.cart-dropdown-empty__text {
    margin: 0 0 16px;
    font-size: 0.875rem;
    color: #6b7280;
}

.cart-dropdown-empty__btn {
    display: inline-block;
    padding: 8px 16px;
    border-radius: 8px;
    background: var(--secondary-color, #353556);
    color: #fff !important;
    font-size: 0.875rem;
    font-weight: 600;
    text-decoration: none;
    transition: background-color 0.2s ease, transform 0.2s ease;
}

.cart-dropdown-empty__btn:hover {
    background: var(--main-color, #d12727);
    transform: translateY(-1px);
    color: #fff !important;
}

.box-item {
    max-height: 320px;
    overflow: auto;
}

.box-item .cart-items {
    display: flex;
    gap: 12px;
    float: none;
    width: 100%;
    padding: 14px 16px;
    border-top: 1px solid #f2f2f2;
}

.box-item .cart-items:first-child {
    border-top: none;
}

.cart-item-course-left {
    float: none;
    flex: 0 0 64px;
    max-width: 64px;
    margin-right: 0;
}

.cart-item-course-left img {
    width: 64px;
    height: 64px;
    object-fit: cover;
    border-radius: 8px;
}

.cart-item-course-right {
    float: none;
    flex: 1 1 auto;
    min-width: 0;
    max-width: none;
    line-height: 1.45;
}

.course-name-title {
    font-size: 0.95rem;
    font-weight: 700;
    color: #1f2937;
    margin-bottom: 4px;
}

.cart-item-meta {
    margin: 0 0 2px;
    font-size: 0.8125rem;
    color: #6b7280;
}

.cart-item-meta span {
    font-weight: 600;
    color: #4b5563;
}

.cart-item-price {
    margin: 6px 0 0;
    font-size: 0.875rem;
    font-weight: 700;
    color: #df0704;
}

.cart-item-price .old-price {
    color: #9ca3af;
    font-size: 0.8125rem;
    font-weight: 400;
    text-decoration: line-through;
    margin-left: 6px;
}

.cart-item-payment-label {
    font-weight: 600;
    color: #4b5563;
    margin-right: 4px;
}

.cart-item-meta.cart-item-payment span {
    color: #4b5563;
}

.remove-item-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    margin-top: 8px;
    margin-left: 0;
    padding: 6px 10px;
    font-size: 0.8125rem;
    font-weight: 600;
    border: 1px solid #fecaca;
    border-radius: 6px;
    color: #b91c1c;
    background: #fff;
    cursor: pointer;
    transition: background-color 0.2s ease, border-color 0.2s ease, color 0.2s ease;
}

.remove-item-btn:hover {
    background: #fef2f2;
    border-color: #f87171;
    color: #991b1b;
}

.remove-item-btn.is-removing {
    opacity: 0.6;
    pointer-events: none;
}

.cart-dropdown-total #cart-total {
    display: flex;
    align-items: center;
    justify-content: space-between;
    float: none;
    width: 100%;
}

.cart-dropdown-actions {
    display: flex;
    gap: 10px;
    justify-content: space-between;
}

.cart-dropdown-actions .btn-rose {
    flex: 1 1 0;
    float: none;
    text-align: center;
    border-radius: 8px !important;
    font-weight: 600;
    padding: 10px 12px !important;
}

.cart-dropdown-actions .clear-card {
    background: #fff !important;
    color: #374151 !important;
    border: 1px solid #d1d5db !important;
}

.cart-dropdown-actions .clear-card:hover {
    background: #f9fafb !important;
    color: #111827 !important;
}

.cart-link-header.no-item {
    display: inline-flex;
    align-items: center;
    padding: 4px;
}
