/* Модальное окно добавления рекламной конструкции в корзину */
.cart-construction-modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 10000;
    display: flex;
    justify-content: center;
    align-items: flex-start;
    padding: 20px;
    background: rgba(0, 0, 0, 0.5);
    overflow-y: auto;
}
.cart-construction-modal-content {
    position: relative;
    background: #ffffff;
    width: 100%;
    max-width: 1200px;
    min-height: calc(100vh - 40px);
    margin: 20px auto;
    display: flex;
    flex-direction: column;
    z-index: 10001;
    overflow: hidden;
}

.cart-construction-modal-close {
    position: absolute;
    top: 16px;
    right: 16px;
    background: rgba(255,255,255, .2);
    border: none;
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    color: #FFF;
    z-index: 10;
}
.cart-construction-modal-close img {
    width: 20px;
    height: 20px;
    filter: brightness(0) invert(1);
}
.cart-construction-modal-close:hover{
    background: rgba(255,255,255, .5);
}

.cart-construction-modal-close:hover > img{
    filter: brightness(0);
}

/* Заголовок с информацией о конструкции */
.cart-construction-header {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 24px;
    text-align: center;
    border-bottom: 1px solid #e8e8e8;
    position: relative;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    min-height: 230px;
    overflow: hidden;
}

.cart-construction-header .registry-photos-gallery {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 1;
}

.cart-construction-header .registry-photos-viewport {
    height: 100%;
    display: flex;
}

.cart-construction-header .image-wrapper {
    height: 100%;
    flex: 1;
    overflow: hidden;
}

.cart-construction-header .image-item {
    position: absolute;
    top: 0;
    right: 0;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: none;
}

.cart-construction-header .image-wrapper:first-child > .image-item {
    display: block;
}

.cart-construction-header .image-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.cart-construction-header .slider-active-image {
    height: 5px;
    width: 93%;
    z-index: 130;
    position: relative;
    background: rgba(0,0,0, 0.15);
    margin: -15px auto 0;
}

.cart-construction-header .slider-active-image:before {
    content: '';
    display: block;
    width: 0;
    height: 5px;
    margin: 0 auto;
    background: rgba(255,255,255, 0.8);
    transition: width 0.3s ease;
}

.cart-construction-header .image-wrapper:hover > .slider-active-image:before {
    width: 100%;
}

.cart-construction-header::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(to bottom, rgba(255, 255, 255, 0.7) 0%, rgba(255, 255, 255, 0.9) 100%);
    z-index: 1;
}

.cart-construction-header > * {
    position: relative;
    z-index: 2;
}

.cart-construction-image {
    width: 100px;
    height: 100px;
    border-radius: 50%;
    overflow: hidden;
    margin-bottom: 12px;
    border: 3px solid #ffffff;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    background: #f0f0f0;
}

.cart-construction-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.cart-construction-name {
    margin: 0 0 6px 0;
    font-size: 18px;
    font-weight: 600;
    color: #000;
    line-height: 1.3;
    text-shadow: 0 1px 2px rgba(255, 255, 255, 0.8);
}

.cart-construction-status {
    font-size: 14px;
    color: #333;
    margin: 0;
    text-shadow: 0 1px 2px rgba(255, 255, 255, 0.8);
}

/* Кнопки действий */
.cart-construction-actions {
    display: flex;
    gap: 8px;
    padding: 16px 24px;
    justify-content: center;
    flex-wrap: wrap;
}

.cart-action-btn {
    display: flex;
    /*align-items: center;*/
    justify-content: center;
    gap: 8px;
    padding: 10px 15px;
    border-radius: 3px;
    border: 1px solid #d1d5db;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
    min-width: 120px;
    text-transform: lowercase;
}
.cart-action-btn:hover {
    background: #f4f5f7;
    border-color: #9ca3af;
}
.cart-action-btn svg {
    width: 18px;
    height: 18px;
}
.cart-construction-actions > .cart-action-btn {
    border: none;
}
.cart-action-btn--primary {
    background: #3390ec;
    color: #ffffff;
}

.cart-action-btn--primary img {
    filter: brightness(0) invert(1);
}

.cart-action-btn--primary:hover {
    background: #2b7fd9;
}

.cart-action-btn--primary:disabled,
.cart-action-btn--primary[disabled] {
    background: #c7c7c7;
    color: #ffffff;
    cursor: not-allowed;
    opacity: 1;
}

.cart-action-btn--primary:disabled:hover,
.cart-action-btn--primary[disabled]:hover {
    background: #c7c7c7;
}

.cart-action-btn--primary:disabled img,
.cart-action-btn--primary[disabled] img {
    filter: brightness(0) invert(1);
    opacity: 0.8;
}

.cart-action-btn--danger {
    background: #fff;
    color: #c0392b;
    border: 1px solid #e0e0e0;
}
.cart-action-btn--danger:hover {
    background: #fef2f2;
    border-color: #c0392b;
}
.cart-action-btn--danger img {
    filter: invert(22%) sepia(90%) saturate(3000%) hue-rotate(345deg) brightness(80%) contrast(95%);
}

.cart-action-btn--secondary {
    background: #FFF;
    color: #000;
}

/* Форма */
.add-to-cart-form {
    display: flex;
    flex-direction: column;
    flex: 1;
    overflow: hidden;
}

/* Тело модалки с двумя колонками */
.cart-construction-body {
    display: flex;
    flex: 1;
    overflow: hidden;
    min-height: 0;
}
.cart-construction-sidebar {
    position: relative;
    flex: 1;
    min-width: 0;
    overflow-y: auto;
    background: #FFF;
    display: flex;
    flex-direction: column;
    border-right: 1px solid #e8e8e8;
}
.cart-construction-main {
    flex: 0 0 400px;
    min-width: 0;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
}

/* Секции модалки */
.cart-construction-section {
    padding: 16px 24px;
}

.cart-construction-section:first-of-type {
    border-top: none;
}

.cart-construction-section-title {
    font-size: 14px;
    font-weight: 600;
    color: #707579;
    margin: 15px 0 0 0;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* Селектор сторон конструкции (старый вид через плашки, оставлен на всякий случай) */
.cart-sides-selector {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.cart-sides-selector .side-item {
    flex: 1;
    min-width: 80px;
}

.cart-sides-selector .side-label {
    padding: 12px;
    border-radius: 12px;
    background: #f0f0f0;
    text-align: center;
    font-weight: 500;
    transition: all 0.2s;
}

.cart-sides-selector .side-checkbox:checked + .side-label,
.cart-sides-selector .side-radio:checked + .side-label {
    background: #3390ec;
    color: #ffffff;
}

/* Скрываем radio кнопки для табов выбора стороны в модалке (новый вид как schedule-tabs) */
#add-to-cart-sides .side-radio {
    position: absolute;
    opacity: 0;
    width: 0;
    height: 0;
    margin: 0;
    padding: 0;
}

/* Стили табов сторон в модалке - точный дизайн как на account/organizations */
.schedule-tabs--full {
    /*height: 48px;*/
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    margin: 30px 0;
    padding-bottom: 0;
    border-bottom: 2px solid var(--border-color, #e5e7eb);
}
#add-to-cart-sides {
    display: inline-flex;
    align-items: flex-end;
}
#add-to-cart-sides .side-item {
    flex: 0 0 auto;
    min-width: auto;
}
#add-to-cart-sides .schedule-tab-btn {
    background: none;
    height: 50px;
    display: inline-block;
    text-transform: uppercase;
    letter-spacing: 0.1rem;
    font-size: 12px;
    padding: 0 15px;
    line-height: 48px;
    vertical-align: middle;
    cursor: pointer;
    color: rgba(130, 140, 150, 1);
    border: none;
    font-weight: 400;
    position: relative;
    transition: color 0.2s;
}

#add-to-cart-sides .schedule-tab-btn:hover {
    color: rgba(50, 60, 71, 0.8);
}

#add-to-cart-sides .schedule-tab-btn.active {
    color: rgba(50, 60, 71, 1); /* Темный цвет для активного таба */
    font-weight: 600;
    border-bottom: 2px solid rgba(50, 60, 71, 1); /* Толстая темная линия под активным табом */
}

/* Полная линия под всеми табами уже есть через schedule-tabs--full border-bottom */

/* Прогресс-бар загрузки календаря */
.cart-calendar-loading {
    margin-top: 8px;
    padding: 24px 0;
    text-align: center;
}

.cart-calendar-progress-bar {
    width: 100%;
    height: 4px;
    background: #e8e8e8;
    border-radius: 2px;
    overflow: hidden;
    margin-bottom: 12px;
    position: relative;
}

.cart-calendar-progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #3390ec 0%, #2b7fd9 50%, #3390ec 100%);
    background-size: 200% 100%;
    animation: progress-bar-animation 1.5s ease-in-out infinite;
    border-radius: 2px;
}

@keyframes progress-bar-animation {
    0% {
        background-position: 200% 0;
        width: 0%;
    }
    50% {
        width: 70%;
    }
    100% {
        background-position: -200% 0;
        width: 100%;
    }
}

.cart-calendar-loading-text {
    font-size: 14px;
    color: #777;
    margin-top: 8px;
}

/* Контейнер календаря выбора дат */
.cart-calendar-container {
    margin-top: 8px;
    flex: 1;
    display: flex;
    flex-direction: column;
    min-height: 0;
}
.cart-calendar-container .schedule-view--calendar {
    background: transparent;
    padding: 0;
    flex: 1;
    display: flex;
    flex-direction: column;
    min-height: 0;
}
.cart-calendar-container .calendar-container {
    max-width: 100%;
    flex: 1;
    display: flex;
    flex-direction: column;
    min-height: 0;
}
.cart-calendar-container .calendar-year-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 16px;
    flex: 1;
    overflow-y: auto;
}
.cart-calendar-container .calendar-month-wrapper {
    background: #FFF;
    padding: 12px;
}

/* Статусы в модалке — различаем Резерв и Забронировано */
.cart-calendar-container .calendar-day.reserve:not(.other-month) {
    background: #e9d5ff;
}
.cart-calendar-container .calendar-day.reserved:not(.other-month) {
    background: #fef3c7;
}
.cart-calendar-container .calendar-day.occupied:not(.other-month) {
    background: #ffbdbd;
}
.cart-calendar-container .calendar-day.free:not(.selected):not(.other-month) {
    background: #bfe3ca;
}

/* Кнопка добавления месяца */
.calendar-add-month-container {
    padding: 16px 0;
    margin: 0 14px;
    border-top: 1px solid #e8e8e8;
    display: flex;
    /*justify-content: center;*/
}

/* Заголовок месяца с ценой и меню */
.cart-calendar-container .calendar-month-title {
    position: relative;
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    user-select: none;
    transition: opacity 0.2s;
}

.cart-calendar-container .calendar-month-title:hover {
    opacity: 0.7;
}

.cart-calendar-container .calendar-month-title-text {
    flex: 1;
}

.cart-calendar-container .calendar-month-price {
    position: relative;
    font-size: 14px;
    font-weight: 600;
    color: #000;
    height: 30px;
    line-height: 30px;
    vertical-align: middle;
    white-space: nowrap;
    background: transparent;
    padding: 0 10px 0 25px;
    margin: -2px 0;
    border: 1px dashed #CCC;
}
.cart-calendar-container .calendar-month-price::before {
    content: '';
    position: absolute;
    left: 8px;
    top: 50%;
    width: 6px;
    height: 6px;
    margin-top: -3px;
    background: transparent;
    border: #CCC solid 1px;
    border-radius: 50%;
}
#add-schedule-btn{
    height: 38px;
}
#add-schedule-btn:not(:disabled):hover {
    background: #a63f0b;
    border-color: #a63f0b;
    color: #FFF;
}

/* Кнопка троеточия */
.calendar-month-menu-btn {
    background: none;
    border: none;
    padding: 4px;
    cursor: pointer;
    color: #777;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 4px;
    transition: all 0.2s;
    margin-left: 8px;
}

.calendar-month-menu-btn:hover {
    background: #f0f0f0;
    color: #333;
}

.calendar-month-menu-btn svg {
    display: block;
}

/* Контекстное меню */
.calendar-month-context-menu {
    position: absolute;
    top: 100%;
    right: 0;
    margin-top: 4px;
    background: #fff;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
    z-index: 1000;
    min-width: 160px;
    overflow: hidden;
}

.calendar-month-menu-item {
    width: 100%;
    padding: 10px 16px;
    text-align: left;
    background: none;
    border: none;
    cursor: pointer;
    font-size: 14px;
    color: #333;
    transition: background 0.2s;
    display: block;
}

.calendar-month-menu-item:hover {
    background: #f5f5f5;
}

.calendar-month-menu-item:active {
    background: #e8e8e8;
}

.calendar-add-month-container .cart-action-btn {
    min-width: auto;
    padding: 8px 16px;
    font-size: 13px;
}

/* Чекбокс в модалке */
.cart-checkbox {
    margin: 0;
}

.cart-checkbox label {
    font-size: 15px;
    color: #000;
    cursor: pointer;
}

/* Разбивка цены */
.cart-price-breakdown {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

@keyframes cartBreakdownFlash {
    0% { background-color: rgba(51, 144, 236, 0.16); }
    100% { background-color: transparent; }
}

@keyframes cartRowFlash {
    0% {
        background-color: rgba(51, 144, 236, 0.2);
        border-color: rgba(51, 144, 236, 0.45);
    }
    100% {
        background-color: #f8f9fa;
        border-color: #e9ecef;
    }
}

.cart-price-breakdown--flash {
    animation: cartBreakdownFlash 420ms ease-out;
}

.cart-price-breakdown .price-row--flash {
    animation: cartRowFlash 520ms ease-out;
}

.cart-price-breakdown .price-row {
    background: #f8f9fa;
    border: 1px solid #e9ecef;
    padding: 12px 14px;
}
.price-row-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 4px;
}
.price-row-side {
    font-weight: 600;
    font-size: 14px;
    color: #1a1a1a;
}
.price-row-dates {
    font-size: 13px;
    color: #6c757d;
    margin-bottom: 6px;
}
.price-row-amount {
    font-size: 16px;
    font-weight: 700;
    color: #1a1a1a;
    text-align: right;
}
.cart-price-breakdown .price-row.price-row-total {
    background: none;
    border: none;
    border-radius: 0;
    padding: 12px 0 0;
    display: flex;
    justify-content: space-between;
    align-items: center;
}
.price-row-total-label {
    font-size: 15px;
    font-weight: 600;
    color: #1a1a1a;
}
.price-row-total-amount {
    font-size: 18px;
    font-weight: 700;
    color: #1a1a1a;
}

.price-row-delete {
    background: none;
    border: none;
    padding: 4px;
    cursor: pointer;
    color: #adb5bd;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 4px;
    transition: all 0.2s;
    flex-shrink: 0;
}

.price-row-delete:hover {
    background: #fee;
    color: #c33;
}

.price-row-delete svg {
    width: 14px;
    height: 14px;
}


/* Информация о конструкции */
.cart-construction-info {
    padding-bottom: 14px;
    margin-bottom: 4px;
}

a.cart-construction-info-name {
    font-size: 15px;
    font-weight: 600;
    color: #1a1a1a;
    margin-bottom: 8px;
    text-decoration: none;
    display: block;
}
a.cart-construction-info-name:hover {
    text-decoration: underline;
}

.cart-construction-info-specs {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.cart-info-tag {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    font-size: 12px;
    padding: 4px 10px;
    border-radius: 20px;
    background: #f0f2f5;
    color: #495057;
}

.cart-info-tag svg {
    flex-shrink: 0;
}

.cart-info-tag--prepayment {
    background: #fff8e1;
    color: #8d6e00;
}



/* Легенда цветов календаря в модалке */
.cart-calendar-legend {
    margin-top: 16px;
    padding-top: 16px;
    border-top: 1px solid #e9ecef;
}

.cart-calendar-legend .cart-construction-section-title {
    font-size: 13px;
    color: #6c757d;
    margin-bottom: 10px;
}

.cart-calendar-legend .calendar-color-legend {
    gap: 8px;
}

.cart-calendar-legend .calendar-color-legend-color {
    width: 12px;
    height: 12px;
}

.cart-calendar-legend .calendar-color-legend-label {
    font-size: 12px;
    line-height: 1.4;
}

/* Ошибки */
.cart-construction-error {
    margin: 8px 0 0;
    padding: 8px 12px;
    width: 100%;
    box-sizing: border-box;
    background: transparent;
    border-top: 1px dashed #fed7d7;
    border-bottom: 1px dashed #fed7d7;
    color: #c53030;
    font-size: 13px;
    line-height: 1.4;
    display: flex;
    align-items: flex-start;
    gap: 8px;
}

/* Растягиваем ошибку на полную ширину колонки sidebar, а не только section-content */
.cart-construction-sidebar #add-to-cart-error {
    margin-left: -24px;
    margin-right: -24px;
    width: calc(100% + 48px);
}

.cart-construction-error span {
    flex: 1;
}

.cart-error-close {
    flex-shrink: 0;
    cursor: pointer;
    opacity: 0.6;
    transition: opacity 0.15s;
    padding: 2px;
    margin: -2px -2px -2px 0;
}
.cart-error-close:hover {
    opacity: 1;
}
.cart-error-close img {
    display: block;
}

/* Контекстное меню календаря корзины */
.context-menu.cart-context-menu {
    position: absolute;
    z-index: 99999;
}

/* Футер модалки */
.cart-construction-footer {
    display: flex;
    justify-content: center;
    gap: 12px;
    padding: 16px 24px;
    border-top: 1px solid #e8e8e8;
    margin-top: auto;
}

/* Адаптивность */
@media (max-width: 1024px) {
    .cart-construction-modal-content {
        max-width: 100%;
    }

    .cart-construction-body {
        flex-direction: column;
    }

    .cart-construction-sidebar {
        flex: 1;
        max-height: 50vh;
        border-right: none;
        border-bottom: 1px dashed #000;
    }

    .cart-construction-main {
        flex: 1;
    }

    .cart-calendar-container .calendar-year-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 768px) {
    .cart-construction-modal {
        padding: 0;
    }

    .cart-construction-modal-content {
        max-width: 100%;
        margin: 0;
        border-radius: 0;
        min-height: 100vh;
    }

    .cart-construction-header {
        padding: 20px 16px;
    }

    .cart-construction-image {
        width: 80px;
        height: 80px;
    }

    .cart-construction-section {
        padding: 12px 16px;
    }

    .cart-construction-sidebar #add-to-cart-error {
        margin-left: -16px;
        margin-right: -16px;
        width: calc(100% + 32px);
    }

    .cart-construction-actions {
        padding: 0 16px 12px;
    }

    .cart-action-btn {
        flex: 1;
        min-width: 0;
    }
}

/* ===== Success Animation Modal ===== */

.cart-success-modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 10002;
    display: flex;
    justify-content: center;
    align-items: center;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(6px);
}

.cart-success-content {
    display: flex;
    justify-content: center;
    align-items: center;
    width: 340px;
    height: 340px;
    background: #fff;
    position: relative;
    overflow: hidden;
}

.cart-success-phase {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    width: 100%;
    height: 100%;
    position: absolute;
    top: 0;
    left: 0;
}

/* Countdown */
.cart-success-number {
    font-size: 120px;
    font-weight: 800;
    color: #3b82f6;
    line-height: 1;
    animation: countPulse 0.8s ease-out;
    user-select: none;
}

.cart-success-subtitle {
    margin-top: 12px;
    font-size: 15px;
    color: #64748b;
    font-weight: 500;
}

@keyframes countPulse {
    0% {
        transform: scale(0.3);
        opacity: 0;
    }
    50% {
        transform: scale(1.15);
        opacity: 1;
    }
    100% {
        transform: scale(1);
        opacity: 1;
    }
}

@keyframes countFadeOut {
    0% {
        transform: scale(1);
        opacity: 1;
    }
    100% {
        transform: scale(1.5);
        opacity: 0;
    }
}

.cart-success-number.fade-out {
    animation: countFadeOut 0.3s ease-in forwards;
}

/* Clouds */
.cart-success-clouds {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    overflow: hidden;
    pointer-events: none;
}

.cart-cloud {
    position: absolute;
    opacity: 0;
}

.cart-cloud--1 {
    width: 110px;
    left: -15px;
    top: 40%;
    animation: cloudDrift 1.2s 0.8s ease-in both;
}

.cart-cloud--2 {
    width: 85px;
    right: -10px;
    top: 25%;
    animation: cloudDrift 1.1s 0.95s ease-in both;
}

.cart-cloud--3 {
    width: 70px;
    left: 10px;
    top: 10%;
    animation: cloudDrift 1s 1.1s ease-in both;
}

@keyframes cloudDrift {
    0% {
        transform: translateY(-60px);
        opacity: 0;
    }
    20% {
        opacity: 0.7;
    }
    100% {
        transform: translateY(200px);
        opacity: 0;
    }
}

/* Rocket */
.cart-success-rocket-wrapper {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    z-index: 2;
}

.cart-success-rocket-svg {
    width: 50px;
    height: 116px;
    filter: drop-shadow(0 4px 12px rgba(0, 0, 0, 0.25));
    animation: rocketShake 0.5s ease-in-out, rocketLaunch 0.7s 0.5s cubic-bezier(0.4, 0, 0.2, 1) forwards;
}

@keyframes rocketShake {
    0%, 100% { transform: translateX(0) translateY(0); }
    10% { transform: translateX(-2px) translateY(1px); }
    20% { transform: translateX(3px) translateY(-1px); }
    30% { transform: translateX(-3px) translateY(0px); }
    40% { transform: translateX(2px) translateY(1px); }
    50% { transform: translateX(-1px) translateY(-1px); }
    60% { transform: translateX(3px) translateY(1px); }
    70% { transform: translateX(-2px) translateY(-1px); }
    80% { transform: translateX(2px) translateY(0px); }
    90% { transform: translateX(-3px) translateY(1px); }
}

@keyframes rocketLaunch {
    0% {
        transform: translateY(0);
        opacity: 1;
    }
    100% {
        transform: translateY(-420px);
        opacity: 0;
    }
}

.cart-success-rocket-trail {
    position: absolute;
    bottom: -10px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    animation: trailAppear 0.3s 0.3s ease-out both;
}

.trail-particle {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #888;
    opacity: 0;
}

.trail-particle:nth-child(1) { animation: trailBurst 0.8s 0.3s ease-out both; width: 10px; height: 10px; background: #ff6b35; }
.trail-particle:nth-child(2) { animation: trailBurst 0.8s 0.45s ease-out both; width: 7px; height: 7px; background: #ffd166; }
.trail-particle:nth-child(3) { animation: trailBurst 0.8s 0.5s ease-out both; width: 11px; height: 11px; background: #e63946; }
.trail-particle:nth-child(4) { animation: trailBurst 0.8s 0.6s ease-out both; width: 6px; height: 6px; background: #ff9f1c; }
.trail-particle:nth-child(5) { animation: trailBurst 0.8s 0.7s ease-out both; width: 9px; height: 9px; background: #ffbf69; }

@keyframes trailAppear {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes trailBurst {
    0% {
        transform: translateY(0) scale(0);
        opacity: 0;
    }
    30% {
        transform: translateY(5px) scale(1.5);
        opacity: 1;
    }
    100% {
        transform: translateY(40px) scale(0);
        opacity: 0;
    }
}

/* Done / Checkmark */
.cart-success-checkmark {
    width: 80px;
    height: 80px;
    animation: checkPop 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275) both;
}

.cart-success-checkmark img {
    width: 100%;
    height: 100%;
}

@keyframes checkPop {
    0% {
        transform: scale(0);
        opacity: 0;
    }
    60% {
        transform: scale(1.2);
    }
    100% {
        transform: scale(1);
        opacity: 1;
    }
}

.cart-success-done-title {
    margin-top: 16px;
    font-size: 20px;
    font-weight: 700;
    color: #1e293b;
    animation: fadeUp 0.2s 0.1s ease-out both;
}

.cart-success-done-actions {
    margin-top: 24px;
    display: flex;
    flex-direction: column;
    gap: 10px;
    width: 100%;
    padding: 0 32px;
    animation: fadeUp 0.2s 0.2s ease-out both;
}

@keyframes fadeUp {
    from {
        transform: translateY(10px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}
.cart-success-btn {
    padding: 10px 20px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    border: none;
}
.cart-success-btn:active {
    transform: translateY(0);
}
.cart-success-btn--primary {
    background: #333;
    color: #fff;
}
.cart-success-btn--primary:hover {
    background: #111;
}
.cart-success-btn--secondary {
    background: #f1f5f9;
    color: #475569;
}
.cart-success-btn--secondary:hover {
    background: #e2e8f0;
}

@media (max-width: 480px) {
    .cart-success-content {
        width: 280px;
        height: 280px;
        border-radius: 20px;
    }

    .cart-success-number {
        font-size: 90px;
    }

    .cart-success-done-actions {
        padding: 0 20px;
    }
}
