/* ================= SHOPPING LIST VIEW ================= */

.shopping-header {
    padding: 24px;
    padding-top: 45px;
    background: var(--surface);
    border-bottom: 1px solid #F3F4F6;
}

.shopping-header h2 {
    font-size: 1.6rem;
    font-weight: 900;
    margin-bottom: 16px;
}

.shopping-stats {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 16px;
    padding: 16px;
    background: linear-gradient(135deg, #FFF7ED 0%, #FFEDD5 100%);
    border-radius: 16px;
    border: 1px solid #FED7A9;
}

.stat-item {
    display: flex;
    align-items: center;
    gap: 8px;
    font-weight: 800;
    font-size: 1.1rem;
}

.stat-item i {
    color: var(--primary);
}

.stat-total {
    color: var(--primary);
    font-size: 1.3rem;
}

.shopping-actions {
    display: flex;
    gap: 10px;
}

.action-sm {
    flex: 1;
    padding: 10px;
    border-radius: 12px;
    font-weight: 700;
    font-size: 0.9rem;
    background: var(--surface);
    border: 1px solid #E5E7EB;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    transition: all 0.2s;
}

.action-sm:active {
    transform: scale(0.97);
}

.action-sm.danger {
    color: #DC2626;
    border-color: #FEE2E2;
    background: #FEF2F2;
}

.action-sm.danger:hover {
    background: #FEE2E2;
}

.shopping-list {
    padding: 16px 24px 100px;
    display: flex;
    flex-direction: column;
    gap: 24px;
}

.shopping-group {
    background: var(--surface);
    border-radius: 20px;
    padding: 16px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.06);
    border: 1px solid #F3F4F6;
}

.shopping-group-title {
    font-weight: 900;
    font-size: 1rem;
    color: var(--primary);
    margin-bottom: 12px;
    padding-bottom: 10px;
    border-bottom: 2px solid var(--primary-soft);
}

.shopping-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 8px;
    border-bottom: 1px solid #F9FAFB;
    transition: all 0.3s;
}

.shopping-item:last-child {
    border-bottom: none;
}

.shopping-item.checked {
    opacity: 0.5;
}

.shopping-item.checked .item-name-shop,
.shopping-item.checked .item-qty-shop {
    text-decoration: line-through;
}

.check-box {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    border: 2px solid #E5E7EB;
    background: var(--surface);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    transition: all 0.2s;
    color: transparent;
}

.check-box:active {
    transform: scale(0.9);
}

.check-box.checked {
    background: var(--primary);
    border-color: var(--primary);
    color: white;
}

.item-info {
    flex: 1;
    min-width: 0;
}

.item-name-shop {
    font-weight: 700;
    font-size: 0.95rem;
    color: var(--text-main);
    margin-bottom: 2px;
}

.item-qty-shop {
    font-size: 0.85rem;
    color: var(--text-muted);
    font-weight: 600;
}

.item-price-shop {
    font-weight: 900;
    font-size: 0.95rem;
    color: var(--text-main);
    background: #F9FAFB;
    padding: 6px 12px;
    border-radius: 10px;
    min-width: 64px;
    text-align: right;
}

.btn-remove {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: #FEE2E2;
    color: #DC2626;
    border: none;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    transition: all 0.2s;
}

.btn-remove:active {
    transform: scale(0.9);
    background: #FCA5A5;
}

.shopping-empty {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 60px 24px;
    text-align: center;
    color: var(--text-muted);
}

/* ================= SERVINGS ADJUSTER (REFINED) ================= */

.servings-adjuster {
    display: flex;
    align-items: center;
    gap: 8px;
    background: rgba(255, 255, 255, 0.15);
    backdrop-filter: blur(8px);
    padding: 6px 10px;
    border-radius: 999px;
    margin-top: 12px;
    border: 1px solid rgba(255, 255, 255, 0.2);
    width: fit-content;
}

.servings-btn {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.2);
    color: white;
    border: none;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.8rem;
    font-weight: 700;
    transition: all 0.2s;
}

.servings-btn:active {
    transform: scale(0.9);
    background: white;
    color: var(--primary);
}

.servings-display {
    text-align: center;
    font-weight: 800;
    font-size: 0.9rem;
    color: white;
    padding: 0 8px;
    min-width: 80px;
}

#servings-value {
    font-size: 1.1rem;
    color: white;
}

.servings-reset {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: transparent;
    color: rgba(255, 255, 255, 0.7);
    border: 1px solid rgba(255, 255, 255, 0.3);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.8rem;
    transition: all 0.2s;
    margin-left: 4px;
}

.servings-reset:active {
    transform: scale(0.9);
    background: rgba(255, 255, 255, 0.2);
    color: white;
}

/* ================= CART BUTTON HIGHLIGHT ================= */

#btn-cart {
    background: var(--primary);
    color: white;
    border: 2px solid rgba(255, 255, 255, 0.3);
    box-shadow: 0 4px 15px rgba(230, 126, 34, 0.5);
    transform: scale(1.1);
    position: relative;
    overflow: visible;
}

#btn-cart:active {
    transform: scale(1.05);
}

#btn-cart::after {
    content: '';
    position: absolute;
    inset: -4px;
    border-radius: 50%;
    border: 2px solid var(--primary);
    opacity: 0.6;
    animation: pulse-cart 2s infinite;
}

@keyframes pulse-cart {
    0% {
        transform: scale(1);
        opacity: 0.6;
    }

    100% {
        transform: scale(1.4);
        opacity: 0;
    }
}

/* ================= NAVIGATION BADGE ================= */

.nav-badge {
    position: absolute;
    top: -4px;
    right: -6px;
    background: #DC2626;
    color: white;
    font-size: 0.65rem;
    font-weight: 900;
    padding: 2px 6px;
    border-radius: 999px;
    min-width: 18px;
    text-align: center;
    box-shadow: 0 2px 8px rgba(220, 38, 38, 0.5);
    animation: pulse-badge 2s infinite;
}

@keyframes pulse-badge {

    0%,
    100% {
        transform: scale(1);
    }

    50% {
        transform: scale(1.1);
    }
}

/* ================= TAB BAR 4 BUTTONS ================= */

.tab-bar {
    gap: 0;
}

.tab-bar .nav-btn {
    flex: 1;
    max-width: 25%;
}

.tab-bar .nav-btn i {
    color: var(--text-muted);
    font-weight: 600;
}

.item-price-shop {
    font-weight: 900;
    font-size: 0.95rem;
    color: var(--text-main);
    background: #F9FAFB;
    padding: 6px 12px;
    border-radius: 10px;
    min-width: 64px;
    text-align: right;
}

.btn-remove {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: #FEE2E2;
    color: #DC2626;
    border: none;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    transition: all 0.2s;
}

.btn-remove:active {
    transform: scale(0.9);
    background: #FCA5A5;
}

.shopping-empty {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 60px 24px;
    text-align: center;
    color: var(--text-muted);
}

/* ================= SERVINGS ADJUSTER (REFINED) ================= */

.servings-adjuster {
    display: flex;
    align-items: center;
    gap: 8px;
    background: rgba(255, 255, 255, 0.15);
    backdrop-filter: blur(8px);
    padding: 6px 10px;
    border-radius: 999px;
    margin-top: 12px;
    border: 1px solid rgba(255, 255, 255, 0.2);
    width: fit-content;
}

.servings-btn {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.2);
    color: white;
    border: none;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.8rem;
    font-weight: 700;
    transition: all 0.2s;
}

.servings-btn:active {
    transform: scale(0.9);
    background: white;
    color: var(--primary);
}

.servings-display {
    text-align: center;
    font-weight: 800;
    font-size: 0.9rem;
    color: white;
    padding: 0 8px;
    min-width: 80px;
}

#servings-value {
    font-size: 1.1rem;
    color: white;
}

.servings-reset {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: transparent;
    color: rgba(255, 255, 255, 0.7);
    border: 1px solid rgba(255, 255, 255, 0.3);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.8rem;
    transition: all 0.2s;
    margin-left: 4px;
}

.servings-reset:active {
    transform: scale(0.9);
    background: rgba(255, 255, 255, 0.2);
    color: white;
}

/* ================= CART BUTTON HIGHLIGHT ================= */

#btn-cart {
    background: var(--primary);
    color: white;
    border: 2px solid rgba(255, 255, 255, 0.3);
    box-shadow: 0 4px 15px rgba(230, 126, 34, 0.5);
    transform: scale(1.1);
    position: relative;
    overflow: visible;
}

#btn-cart:active {
    transform: scale(1.05);
}

#btn-cart::after {
    content: '';
    position: absolute;
    inset: -4px;
    border-radius: 50%;
    border: 2px solid var(--primary);
    opacity: 0.6;
    animation: pulse-cart 2s infinite;
}

@keyframes pulse-cart {
    0% {
        transform: scale(1);
        opacity: 0.6;
    }

    100% {
        transform: scale(1.4);
        opacity: 0;
    }
}

/* ================= NAVIGATION BADGE ================= */

.nav-badge {
    position: absolute;
    top: -4px;
    right: -6px;
    background: #DC2626;
    color: white;
    font-size: 0.65rem;
    font-weight: 900;
    padding: 2px 6px;
    border-radius: 999px;
    min-width: 18px;
    text-align: center;
    box-shadow: 0 2px 8px rgba(220, 38, 38, 0.5);
    animation: pulse-badge 2s infinite;
}

@keyframes pulse-badge {

    0%,
    100% {
        transform: scale(1);
    }

    50% {
        transform: scale(1.1);
    }
}

/* ================= TAB BAR 4 BUTTONS ================= */

.tab-bar {
    gap: 0;
}

.tab-bar .nav-btn {
    flex: 1;
    max-width: 25%;
}

.tab-bar .nav-btn i {
    font-size: 1.3rem;
}

.tab-bar .nav-btn span {
    font-size: 0.65rem;
    font-weight: 800;
}

/* ================= TOAST NOTIFICATIONS ================= */
#toast-container {
    position: fixed;
    bottom: 80px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 9999;
    display: flex;
    flex-direction: column;
    gap: 10px;
    pointer-events: none;
    width: 90%;
    max-width: 350px;
}

.toast {
    background: rgba(16, 185, 129, 0.95);
    color: white;
    padding: 12px 20px;
    border-radius: 12px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    font-weight: 600;
    font-size: 0.95rem;
    display: flex;
    align-items: center;
    gap: 10px;
    animation: toastIn 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    backdrop-filter: blur(4px);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.toast.error {
    background: rgba(239, 68, 68, 0.95);
}

.toast.fade-out {
    animation: toastOut 0.3s forwards;
}

@keyframes toastIn {
    from {
        opacity: 0;
        transform: translateY(20px) scale(0.9);
    }

    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

@keyframes toastOut {
    to {
        opacity: 0;
        transform: translateY(-10px) scale(0.95);
    }
}