/**
 * ONE'Z Food — Cart Page + Floating Button + Toast Styles
 */

/* ==============================================
   FLOATING CART BUTTON
   ============================================== */

.onez-floating-cart {
    position: fixed;
    bottom: 28px;
    right: 28px;
    z-index: 99999;
}

.onez-cart-fab {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: #C9A84C;
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 20px rgba(201, 168, 76, 0.4);
    transition: transform 0.25s ease, box-shadow 0.25s ease;
    position: relative;
}

.onez-cart-fab:hover {
    transform: scale(1.08);
    box-shadow: 0 6px 28px rgba(201, 168, 76, 0.55);
}

.onez-cart-fab:active {
    transform: scale(0.96);
}

.onez-cart-fab svg {
    width: 26px;
    height: 26px;
    fill: #0a0a0a;
}

.onez-fab-dimmed {
    opacity: 0.6;
}

/* Badge */

.onez-cart-badge {
    position: absolute;
    top: -4px;
    right: -4px;
    min-width: 22px;
    height: 22px;
    border-radius: 11px;
    background: #0a0a0a;
    color: #C9A84C;
    font-size: 11px;
    font-weight: 700;
    font-family: 'Inter', sans-serif;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 2px solid #C9A84C;
    padding: 0 5px;
    transition: transform 0.3s ease, opacity 0.3s ease;
}

.onez-badge-hidden {
    transform: scale(0);
    opacity: 0;
}

.onez-badge-visible {
    transform: scale(1);
    opacity: 1;
}

.onez-badge-bounce {
    animation: onez-badge-pop 0.4s cubic-bezier(0.36, 1.4, 0.5, 1);
}

@keyframes onez-badge-pop {
    0%   { transform: scale(0.5); }
    60%  { transform: scale(1.2); }
    100% { transform: scale(1); }
}

/* Tooltip */

.onez-cart-tooltip {
    position: absolute;
    bottom: 100%;
    right: 50%;
    transform: translateX(50%);
    margin-bottom: 10px;
    background: #1a1a1a;
    color: #F5ECD7;
    font-size: 12px;
    font-weight: 500;
    font-family: 'Inter', sans-serif;
    padding: 6px 14px;
    border-radius: 6px;
    white-space: nowrap;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.2s ease, transform 0.2s ease;
    transform: translateX(50%) translateY(4px);
    border: 1px solid #2a2a2a;
}

.onez-floating-cart:hover .onez-cart-tooltip {
    opacity: 1;
    transform: translateX(50%) translateY(0);
}

/* ==============================================
   CART PAGE
   ============================================== */

.onez-cart-wrapper {
    background: #0a0a0a;
    padding: 40px 20px;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    color: #F5ECD7;
    max-width: 800px;
    margin: 0 auto;
    min-height: 60vh;
}

.onez-cart-wrapper *,
.onez-cart-wrapper *::before,
.onez-cart-wrapper *::after {
    box-sizing: border-box;
}

/* Header */

.onez-cart-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 28px;
}

.onez-cart-title {
    font-size: 24px;
    font-weight: 700;
    color: #F5ECD7;
    margin: 0;
    display: flex;
    align-items: center;
    gap: 10px;
}

.onez-cart-title-icon {
    font-size: 26px;
}

.onez-btn-clear {
    padding: 8px 18px;
    background: transparent;
    color: #888;
    border: 1px solid #2a2a2a;
    border-radius: 8px;
    font-size: 13px;
    font-weight: 500;
    font-family: inherit;
    cursor: pointer;
    transition: all 0.2s ease;
}

.onez-btn-clear:hover {
    color: #f44336;
    border-color: #f44336;
}

/* Cart Items */

.onez-cart-items {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-bottom: 28px;
}

.onez-cart-item {
    background: #1a1a1a;
    border: 1px solid #2a2a2a;
    border-radius: 12px;
    padding: 18px;
    display: flex;
    gap: 16px;
    transition: opacity 0.35s ease, transform 0.35s ease;
}

.onez-cart-item.onez-removing {
    opacity: 0;
    transform: translateX(40px);
}

.onez-cart-item-img {
    width: 80px;
    height: 80px;
    border-radius: 10px;
    overflow: hidden;
    flex-shrink: 0;
    background: #111;
}

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

.onez-cart-item-body {
    flex: 1;
    min-width: 0;
}

.onez-cart-item-top {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 10px;
    margin-bottom: 6px;
}

.onez-cart-item-name {
    font-size: 16px;
    font-weight: 600;
    color: #F5ECD7;
    margin: 0;
}

.onez-cart-item-price {
    font-size: 16px;
    font-weight: 700;
    color: #C9A84C;
    white-space: nowrap;
}

.onez-cart-item-details {
    font-size: 13px;
    color: #888;
    margin-bottom: 4px;
    line-height: 1.6;
}

.onez-cart-item-removed {
    font-size: 12px;
    color: #f44336;
    margin-bottom: 8px;
}

.onez-cart-item-bottom {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-top: 10px;
}

/* Quantity controls */

.onez-qty-controls {
    display: flex;
    align-items: center;
    gap: 0;
    border: 1px solid #2a2a2a;
    border-radius: 8px;
    overflow: hidden;
}

.onez-qty-btn {
    width: 34px;
    height: 34px;
    background: #111;
    border: none;
    color: #F5ECD7;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.15s ease;
    font-family: inherit;
}

.onez-qty-btn:hover {
    background: #222;
    color: #C9A84C;
}

.onez-qty-value {
    width: 40px;
    text-align: center;
    font-size: 14px;
    font-weight: 600;
    color: #F5ECD7;
    background: #0a0a0a;
    border-left: 1px solid #2a2a2a;
    border-right: 1px solid #2a2a2a;
    height: 34px;
    line-height: 34px;
}

.onez-btn-remove-item {
    padding: 6px 14px;
    background: transparent;
    color: #666;
    border: 1px solid #2a2a2a;
    border-radius: 6px;
    font-size: 12px;
    font-family: inherit;
    cursor: pointer;
    transition: all 0.2s ease;
}

.onez-btn-remove-item:hover {
    color: #f44336;
    border-color: #f44336;
}

/* ==============================================
   PAYMENT SECTION (cart page)
   ============================================== */

.onez-cart-payment {
    background: #1a1a1a;
    border: 1px solid #2a2a2a;
    border-radius: 12px;
    padding: 22px;
    margin-bottom: 20px;
}

.onez-cart-payment h3 {
    font-size: 15px;
    font-weight: 600;
    color: #F5ECD7;
    margin: 0 0 14px 0;
}

.onez-cart-payment-options {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.onez-cart-pay-option {
    flex: 1;
    min-width: 160px;
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 14px 18px;
    background: #111;
    border: 1px solid #2a2a2a;
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.2s ease;
    font-size: 14px;
    color: #ccc;
    font-family: inherit;
}

.onez-cart-pay-option:hover {
    border-color: rgba(201, 168, 76, 0.4);
}

.onez-cart-pay-option.selected {
    border-color: #C9A84C;
    background: rgba(201, 168, 76, 0.08);
    color: #F5ECD7;
}

.onez-cart-pay-radio {
    width: 18px;
    height: 18px;
    border: 2px solid #444;
    border-radius: 50%;
    flex-shrink: 0;
    position: relative;
    transition: all 0.2s ease;
}

.onez-cart-pay-option.selected .onez-cart-pay-radio {
    border-color: #C9A84C;
    background: #C9A84C;
}

.onez-cart-pay-option.selected .onez-cart-pay-radio::after {
    content: '';
    position: absolute;
    width: 7px;
    height: 7px;
    background: #0a0a0a;
    border-radius: 50%;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
}

/* ==============================================
   ORDER SUMMARY
   ============================================== */

.onez-cart-summary {
    background: rgba(201, 168, 76, 0.06);
    border: 1px solid rgba(201, 168, 76, 0.2);
    border-radius: 12px;
    padding: 22px;
    margin-bottom: 24px;
}

.onez-cart-summary-line {
    display: flex;
    justify-content: space-between;
    font-size: 14px;
    color: #bbb;
    padding: 5px 0;
}

.onez-cart-summary-divider {
    border-top: 1px solid rgba(201, 168, 76, 0.2);
    margin: 10px 0;
}

.onez-cart-summary-total {
    display: flex;
    justify-content: space-between;
    font-size: 20px;
    font-weight: 700;
    padding: 6px 0 0;
}

.onez-cart-summary-total span:last-child {
    color: #C9A84C;
}

.onez-cart-min-order-warning {
    margin-top: 10px;
    font-size: 13px;
    color: #f44336;
}

/* ==============================================
   CART ACTIONS
   ============================================== */

.onez-cart-actions {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
}

.onez-btn-continue {
    padding: 14px 28px;
    background: transparent;
    color: #888;
    border: 1px solid #2a2a2a;
    border-radius: 10px;
    font-size: 14px;
    font-weight: 500;
    font-family: inherit;
    cursor: pointer;
    text-decoration: none;
    transition: all 0.2s ease;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.onez-btn-continue:hover {
    color: #F5ECD7;
    border-color: #444;
}

.onez-btn-whatsapp-order {
    padding: 16px 36px;
    background: #C9A84C;
    color: #0a0a0a;
    border: none;
    border-radius: 10px;
    font-size: 16px;
    font-weight: 700;
    font-family: inherit;
    cursor: pointer;
    transition: all 0.2s ease;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.onez-btn-whatsapp-order:hover {
    background: #d4b65e;
    transform: translateY(-1px);
    box-shadow: 0 4px 16px rgba(201, 168, 76, 0.3);
}

.onez-btn-whatsapp-order:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

/* ==============================================
   EMPTY CART
   ============================================== */

.onez-cart-empty {
    text-align: center;
    padding: 80px 20px;
}

.onez-cart-empty-icon {
    font-size: 56px;
    margin-bottom: 16px;
    opacity: 0.4;
}

.onez-cart-empty h2 {
    font-size: 22px;
    font-weight: 600;
    color: #F5ECD7;
    margin: 0 0 8px 0;
}

.onez-cart-empty p {
    font-size: 14px;
    color: #666;
    margin: 0 0 28px 0;
}

.onez-btn-menu-link {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 14px 32px;
    background: #C9A84C;
    color: #0a0a0a;
    border: none;
    border-radius: 10px;
    font-size: 15px;
    font-weight: 700;
    font-family: inherit;
    text-decoration: none;
    transition: all 0.2s ease;
}

.onez-btn-menu-link:hover {
    background: #d4b65e;
    color: #0a0a0a;
}

/* ==============================================
   SUCCESS OVERLAY
   ============================================== */

.onez-cart-success-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.85);
    z-index: 999999;
    display: flex;
    align-items: center;
    justify-content: center;
    backdrop-filter: blur(6px);
}

.onez-cart-success-box {
    background: #1a1a1a;
    border: 1px solid #2a2a2a;
    border-radius: 16px;
    padding: 48px 40px;
    text-align: center;
    max-width: 380px;
    animation: onez-success-pop 0.4s ease;
}

@keyframes onez-success-pop {
    0%   { transform: scale(0.8); opacity: 0; }
    100% { transform: scale(1); opacity: 1; }
}

.onez-cart-success-icon {
    font-size: 56px;
    margin-bottom: 16px;
}

.onez-cart-success-box h3 {
    font-size: 20px;
    font-weight: 700;
    color: #C9A84C;
    margin: 0 0 8px 0;
}

.onez-cart-success-box p {
    font-size: 14px;
    color: #888;
    margin: 0;
}

/* Cart page errors */

.onez-cart-errors {
    background: rgba(244, 67, 54, 0.1);
    border: 1px solid rgba(244, 67, 54, 0.3);
    border-radius: 8px;
    padding: 12px 16px;
    margin-bottom: 16px;
    font-size: 13px;
    color: #f44336;
    display: none;
}

.onez-cart-errors.visible {
    display: block;
}

/* ==============================================
   TOAST NOTIFICATIONS
   ============================================== */

.onez-toast-container {
    position: fixed;
    bottom: 100px;
    left: 24px;
    z-index: 999999;
    display: flex;
    flex-direction: column-reverse;
    gap: 8px;
    pointer-events: none;
}

.onez-toast {
    background: #1a1a1a;
    border: 1px solid #2a2a2a;
    border-left: 4px solid #C9A84C;
    border-radius: 10px;
    padding: 14px 18px;
    display: flex;
    align-items: center;
    gap: 10px;
    min-width: 260px;
    max-width: 380px;
    font-family: 'Inter', sans-serif;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.4);
    opacity: 0;
    transform: translateY(16px);
    transition: opacity 0.3s ease, transform 0.3s ease;
    pointer-events: auto;
}

.onez-toast-show {
    opacity: 1;
    transform: translateY(0);
}

.onez-toast-hide {
    opacity: 0;
    transform: translateY(16px);
}

.onez-toast-error { border-left-color: #f44336; }
.onez-toast-info { border-left-color: #42a5f5; }
.onez-toast-warning { border-left-color: #FFA726; }

.onez-toast-icon {
    font-size: 18px;
    flex-shrink: 0;
}

.onez-toast-msg {
    font-size: 13px;
    font-weight: 500;
    color: #F5ECD7;
    flex: 1;
}

.onez-toast-close {
    background: none;
    border: none;
    color: #555;
    font-size: 18px;
    cursor: pointer;
    padding: 0 2px;
    line-height: 1;
    flex-shrink: 0;
}

.onez-toast-close:hover {
    color: #aaa;
}

/* ==============================================
   RESPONSIVE
   ============================================== */

@media (max-width: 600px) {
    .onez-floating-cart {
        bottom: 20px;
        right: 16px;
    }

    .onez-cart-fab {
        width: 54px;
        height: 54px;
    }

    .onez-cart-fab svg {
        width: 22px;
        height: 22px;
    }

    .onez-cart-wrapper {
        padding: 24px 14px;
    }

    .onez-cart-item {
        flex-direction: column;
        gap: 12px;
    }

    .onez-cart-item-img {
        width: 100%;
        height: 140px;
    }

    .onez-cart-actions {
        flex-direction: column;
    }

    .onez-btn-continue,
    .onez-btn-whatsapp-order {
        width: 100%;
        justify-content: center;
        text-align: center;
    }

    .onez-cart-payment-options {
        flex-direction: column;
    }

    .onez-toast-container {
        left: 12px;
        right: 12px;
        bottom: 86px;
    }

    .onez-toast {
        min-width: auto;
        max-width: none;
    }
}
