/* ========================================
   FLOATING CART BUTTON
   ======================================== */

.cart-float-button {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 60px;
    height: 60px;
    background: linear-gradient(135deg, #1FBDC6 0%, #17a2aa 100%);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 24px;
    cursor: pointer;
    box-shadow: 0 8px 25px rgba(31, 189, 198, 0.4);
    transition: all 0.3s ease;
    z-index: 999;
}

.cart-float-button:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 35px rgba(31, 189, 198, 0.5);
}

.cart-badge {
    position: absolute;
    top: -5px;
    right: -5px;
    background: #FF4533;
    color: white;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    display: none;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    font-weight: 700;
    border: 2px solid white;
}

/* ========================================
   CART MODAL
   ======================================== */

.cart-modal,
.addons-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 9999;
    display: none;
}

.cart-modal.active,
.addons-modal.active {
    display: block;
}

.cart-overlay,
.addons-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(4px);
    animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

/* ========================================
   CART CONTENT
   ======================================== */

.cart-content {
    position: absolute;
    top: 0;
    right: 0;
    width: 100%;
    max-width: 480px;
    height: 100%;
    max-height: 100vh;
    background: white;
    display: flex;
    flex-direction: column;
    animation: slideInRight 0.3s ease;
    box-shadow: -4px 0 20px rgba(0, 0, 0, 0.1);
    overflow: hidden; /* Prevent overflow of entire cart */
}

@keyframes slideInRight {
    from { transform: translateX(100%); }
    to { transform: translateX(0); }
}

.cart-header {
    padding: 24px;
    border-bottom: 1px solid #E5E7EB;
    position: relative;
    background: white;
    flex-shrink: 0; /* Prevent header from shrinking */
}

.cart-header h3 {
    font-size: 24px;
    font-weight: 700;
    color: #111827;
    margin: 0;
}

.cart-close {
    position: absolute;
    top: 24px;
    right: 24px;
    width: 36px;
    height: 36px;
    border: none;
    background: #F3F4F6;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s ease;
}

.cart-close:hover {
    background: #E5E7EB;
    transform: rotate(90deg);
}

/* ========================================
   CART BODY
   ======================================== */

.cart-body {
    flex: 1;
    overflow-y: auto;
    overflow-x: hidden;
    padding: 24px;
    background: #F9FAFB;
    min-height: 0; /* Important for flex overflow */
}

.cart-empty {
    display: none;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: 100%;
    color: #9CA3AF;
    text-align: center;
}

.cart-empty i {
    font-size: 64px;
    margin-bottom: 16px;
    opacity: 0.3;
}

.cart-empty p {
    font-size: 18px;
    font-weight: 600;
    margin: 0 0 8px;
}

.cart-empty span {
    font-size: 14px;
}

.cart-items {
    display: none;
}

/* ========================================
   CART ITEMS
   ======================================== */

.cart-item {
    background: white;
    border-radius: 16px;
    padding: 16px;
    margin-bottom: 16px;
    transition: all 0.2s ease;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
}

.cart-item:hover {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
    transform: translateY(-2px);
}

.cart-item-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 12px;
}

.cart-item-info h4 {
    font-size: 16px;
    font-weight: 600;
    color: #111827;
    margin: 0 0 4px;
}

.cart-item-info p {
    font-size: 13px;
    color: #6B7280;
    margin: 0;
}

.cart-item-remove {
    width: 32px;
    height: 32px;
    border: none;
    background: #FEE2E2;
    border-radius: 8px;
    color: #EF4444;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.cart-item-remove:hover {
    background: #EF4444;
    color: white;
}

/* ========================================
   CART ITEM ADD-ONS
   ======================================== */

.cart-item-addons {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 12px;
}

.addon-tag {
    display: inline-block;
    padding: 4px 12px;
    background: #E0F7FA;
    border: 1px solid #B2EBF2;
    border-radius: 100px;
    font-size: 12px;
    color: #00838F;
    font-weight: 500;
}

/* ========================================
   CART ITEM FOOTER
   ======================================== */

.cart-item-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: 12px;
    border-top: 1px solid #F3F4F6;
}

.cart-item-quantity {
    display: flex;
    align-items: center;
    gap: 12px;
    background: #F9FAFB;
    border-radius: 100px;
    padding: 4px;
}

.qty-btn {
    width: 28px;
    height: 28px;
    border: none;
    background: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s ease;
    color: #6B7280;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
}

.qty-btn:hover {
    background: #1FBDC6;
    color: white;
    transform: scale(1.1);
}

.qty-value {
    font-weight: 600;
    color: #111827;
    min-width: 24px;
    text-align: center;
}

.cart-item-total {
    font-size: 18px;
    font-weight: 700;
    color: #1FBDC6;
}

/* ========================================
   CART FOOTER
   ======================================== */

.cart-footer {
    padding: 24px;
    border-top: 1px solid #E5E7EB;
    background: white;
    box-shadow: 0 -4px 12px rgba(0, 0, 0, 0.05);
    flex-shrink: 0; /* Prevent footer from shrinking */
}

.cart-total {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 16px;
    font-size: 18px;
}

.cart-total strong {
    font-size: 28px;
    font-weight: 700;
    color: #1FBDC6;
}

.cart-submit-btn {
    width: 100%;
    padding: 16px;
    background: linear-gradient(135deg, #1FBDC6 0%, #17a2aa 100%);
    color: white;
    border: none;
    border-radius: 100px;
    font-size: 16px;
    font-weight: 600;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.cart-submit-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(31, 189, 198, 0.3);
}

/* ========================================
   ADD-ONS MODAL
   ======================================== */

.addons-content {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 90%;
    max-width: 600px;
    max-height: 85vh;
    background: white;
    border-radius: 24px;
    display: flex;
    flex-direction: column;
    animation: scaleIn 0.3s ease;
    overflow: hidden;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
}

@keyframes scaleIn {
    from {
        transform: translate(-50%, -50%) scale(0.9);
        opacity: 0;
    }
    to {
        transform: translate(-50%, -50%) scale(1);
        opacity: 1;
    }
}

.addons-header {
    padding: 24px;
    border-bottom: 1px solid #E5E7EB;
    position: relative;
}

.addons-header h3 {
    font-size: 24px;
    font-weight: 700;
    color: #111827;
    margin: 0;
}

.addons-header p {
    margin: 8px 0 0;
    color: #6B7280;
    font-size: 14px;
}

.addons-close {
    position: absolute;
    top: 24px;
    right: 24px;
    width: 36px;
    height: 36px;
    border: none;
    background: #F3F4F6;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s ease;
}

.addons-close:hover {
    background: #E5E7EB;
    transform: rotate(90deg);
}

/* ========================================
   ADD-ONS BODY
   ======================================== */

.addons-body {
    flex: 1;
    overflow-y: auto;
    padding: 24px;
}

.addon-item {
    background: #F9FAFB;
    border-radius: 16px;
    padding: 16px;
    margin-bottom: 12px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 16px;
    transition: all 0.2s ease;
}

.addon-item:hover {
    background: #F3F4F6;
    transform: translateX(4px);
}

.addon-info {
    flex: 1;
}

.addon-info h4 {
    font-size: 15px;
    font-weight: 600;
    color: #111827;
    margin: 0 0 4px;
}

.addon-info p {
    font-size: 13px;
    color: #6B7280;
    margin: 0;
}

.addon-action {
    display: flex;
    align-items: center;
    gap: 12px;
}

.addon-price {
    font-size: 16px;
    font-weight: 700;
    color: #111827;
}

.addon-add-btn {
    padding: 8px 20px;
    background: white;
    border: 2px solid #1FBDC6;
    color: #1FBDC6;
    border-radius: 100px;
    font-size: 14px;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 6px;
    cursor: pointer;
    transition: all 0.2s ease;
    white-space: nowrap;
}

.addon-add-btn:hover {
    background: #1FBDC6;
    color: white;
    transform: translateY(-2px);
}

.addon-add-btn.added {
    background: #1FBDC6;
    color: white;
    border-color: #1FBDC6;
}

/* ========================================
   ADD-ONS FOOTER
   ======================================== */

.addons-footer {
    padding: 24px;
    border-top: 1px solid #E5E7EB;
    background: white;
    display: flex;
    gap: 12px;
}

.addons-continue-btn,
.addons-skip-btn {
    padding: 16px;
    border: none;
    border-radius: 100px;
    font-size: 16px;
    font-weight: 600;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.addons-continue-btn {
    flex: 1;
    background: linear-gradient(135deg, #1FBDC6 0%, #17a2aa 100%);
    color: white;
}

.addons-skip-btn {
    background: white;
    border: 2px solid #E5E7EB;
    color: #6B7280;
}

.addons-continue-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(31, 189, 198, 0.3);
}

.addons-skip-btn:hover {
    background: #F9FAFB;
    border-color: #D1D5DB;
    transform: translateY(-2px);
}

/* ========================================
   NOTIFICATIONS
   ======================================== */

.cart-notification {
    position: fixed;
    bottom: 100px;
    right: 30px;
    background: #111827;
    color: white;
    padding: 16px 24px;
    border-radius: 100px;
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 14px;
    font-weight: 500;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.2);
    z-index: 9998;
    transform: translateX(400px);
    opacity: 0;
    transition: all 0.3s ease;
}

.cart-notification.show {
    transform: translateX(0);
    opacity: 1;
}

.cart-notification i {
    color: #10B981;
    font-size: 18px;
}

/* ========================================
   RESPONSIVE DESIGN
   ======================================== */

@media (max-width: 768px) {
    .cart-content {
        max-width: 100%;
    }

    .addons-content {
        width: 95%;
        max-height: 90vh;
    }

    .cart-float-button {
        bottom: 20px;
        right: 20px;
        width: 56px;
        height: 56px;
        font-size: 22px;
    }

    .cart-badge {
        width: 22px;
        height: 22px;
        font-size: 11px;
    }

    .cart-notification {
        right: 20px;
        bottom: 90px;
        max-width: calc(100% - 40px);
        padding: 12px 20px;
        font-size: 13px;
    }

    .addon-item {
        flex-direction: column;
        align-items: stretch;
        padding: 14px;
    }

    .addon-action {
        justify-content: space-between;
        width: 100%;
    }

    .addon-add-btn {
        flex: 1;
        justify-content: center;
    }

    .addons-footer {
        flex-direction: column;
    }

    .addons-skip-btn,
    .addons-continue-btn {
        width: 100%;
    }

    .cart-header,
    .addons-header {
        padding: 20px;
    }

    .cart-header h3,
    .addons-header h3 {
        font-size: 20px;
        padding-right: 40px;
    }

    .cart-body,
    .addons-body {
        padding: 16px;
    }

    .cart-footer,
    .addons-footer {
        padding: 20px;
    }

    .cart-item {
        padding: 14px;
        border-radius: 12px;
    }

    .cart-item-header {
        margin-bottom: 10px;
    }

    .cart-item-info h4 {
        font-size: 15px;
    }

    .cart-item-info p {
        font-size: 12px;
    }

    .cart-item-footer {
        flex-direction: column;
        gap: 12px;
        align-items: stretch;
    }

    .cart-item-quantity {
        justify-content: center;
    }

    .cart-item-total {
        text-align: center;
        font-size: 20px;
        padding: 8px 0;
        background: #F0F9FA;
        border-radius: 8px;
    }

    .cart-total {
        font-size: 16px;
        margin-bottom: 14px;
    }

    .cart-total strong {
        font-size: 24px;
    }

    .cart-submit-btn {
        padding: 14px;
        font-size: 15px;
    }
}

@media (max-width: 480px) {
    .cart-float-button {
        bottom: 16px;
        right: 16px;
        width: 52px;
        height: 52px;
        font-size: 20px;
        box-shadow: 0 6px 20px rgba(31, 189, 198, 0.4);
    }

    .cart-badge {
        width: 20px;
        height: 20px;
        font-size: 10px;
        top: -4px;
        right: -4px;
    }

    .cart-notification {
        right: 16px;
        bottom: 80px;
        padding: 10px 16px;
        font-size: 12px;
        border-radius: 50px;
    }

    .cart-header,
    .addons-header {
        padding: 16px;
    }

    .cart-header h3,
    .addons-header h3 {
        font-size: 18px;
        padding-right: 36px;
    }

    .cart-close,
    .addons-close {
        width: 32px;
        height: 32px;
        top: 16px;
        right: 16px;
    }

    .cart-body,
    .addons-body {
        padding: 12px;
    }

    .cart-footer,
    .addons-footer {
        padding: 16px;
    }

    .cart-item {
        padding: 12px;
        margin-bottom: 12px;
        border-radius: 10px;
    }

    .cart-item-info h4 {
        font-size: 14px;
    }

    .cart-item-info p {
        font-size: 11px;
    }

    .cart-item-remove {
        width: 28px;
        height: 28px;
        font-size: 12px;
    }

    .cart-item-addons {
        gap: 6px;
        margin-bottom: 10px;
    }

    .addon-tag {
        padding: 3px 10px;
        font-size: 11px;
    }

    .cart-item-footer {
        padding-top: 10px;
    }

    .cart-item-quantity {
        padding: 3px;
    }

    .qty-btn {
        width: 26px;
        height: 26px;
        font-size: 11px;
    }

    .qty-value {
        font-size: 14px;
        min-width: 20px;
    }

    .cart-item-total {
        font-size: 18px;
        padding: 6px 0;
    }

    .cart-total {
        font-size: 15px;
        margin-bottom: 12px;
    }

    .cart-total strong {
        font-size: 22px;
    }

    .cart-submit-btn {
        padding: 13px;
        font-size: 14px;
        border-radius: 50px;
    }

    .addons-content {
        width: 98%;
        max-height: 92vh;
        border-radius: 16px;
    }

    .addon-item {
        padding: 12px;
        border-radius: 12px;
        margin-bottom: 10px;
    }

    .addon-info h4 {
        font-size: 14px;
    }

    .addon-info p {
        font-size: 12px;
    }

    .addon-price {
        font-size: 15px;
    }

    .addon-add-btn {
        padding: 8px 16px;
        font-size: 13px;
    }

    .addons-skip-btn,
    .addons-continue-btn {
        padding: 13px;
        font-size: 14px;
        border-radius: 50px;
    }

    .addons-header p {
        font-size: 13px;
        margin-top: 6px;
    }
}

@media (max-width: 360px) {
    .cart-float-button {
        width: 48px;
        height: 48px;
        font-size: 18px;
        bottom: 12px;
        right: 12px;
    }

    .cart-badge {
        width: 18px;
        height: 18px;
        font-size: 9px;
    }

    .cart-header h3,
    .addons-header h3 {
        font-size: 16px;
    }

    .cart-item-info h4 {
        font-size: 13px;
    }

    .cart-total strong {
        font-size: 20px;
    }

    .cart-submit-btn {
        font-size: 13px;
    }
}

/* ========================================
   SMOOTH SCROLLBARS
   ======================================== */

.cart-body::-webkit-scrollbar,
.addons-body::-webkit-scrollbar {
    width: 8px;
}

.cart-body::-webkit-scrollbar-track,
.addons-body::-webkit-scrollbar-track {
    background: #F3F4F6;
}

.cart-body::-webkit-scrollbar-thumb,
.addons-body::-webkit-scrollbar-thumb {
    background: #D1D5DB;
    border-radius: 4px;
}

.cart-body::-webkit-scrollbar-thumb:hover,
.addons-body::-webkit-scrollbar-thumb:hover {
    background: #9CA3AF;
}