/* ==================== CSS RESET & ROOT VARIABLES ==================== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary-green: #2e7d32;
    --primary-green-light: #4caf50;
    --primary-green-dark: #1b5e20;
    --secondary-orange: #ff9800;
    --accent-red: #e53935;
    --accent-blue: #1976d2;
    --accent-teal: #00897b;
    --white: #ffffff;
    --off-white: #f5f5f5;
    --light-gray: #e0e0e0;
    --medium-gray: #9e9e9e;
    --dark-gray: #424242;
    --black: #212121;
    --gradient-primary: linear-gradient(135deg, #2e7d32 0%, #66bb6a 100%);
    --gradient-teal: linear-gradient(135deg, #00897b 0%, #4db6ac 100%);
    --shadow-sm: 0 2px 4px rgba(0, 0, 0, 0.08);
    --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.12);
    --shadow-lg: 0 8px 24px rgba(0, 0, 0, 0.16);
    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 20px;
    --radius-xl: 30px;
    --radius-full: 50%;
    --transition-fast: 0.2s ease;
    --transition-normal: 0.3s ease;
}

body {
    font-family: 'Poppins', sans-serif;
    background: var(--off-white);
    color: var(--black);
    line-height: 1.6;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

::-webkit-scrollbar { width: 5px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: #b2dfdb; border-radius: 3px; }

/* ============================================================ */
/* ==================== NAVBAR ================================ */
/* ============================================================ */
.navbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px 25px;
    background: linear-gradient(135deg, #00695c, #00897b, #26a69a);
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.15);
    position: sticky;
    top: 0;
    z-index: 1000;
    gap: 12px;
}

.nav-left {
    display: flex;
    align-items: center;
    flex-shrink: 0;
}

.logo {
    display: flex;
    align-items: center;
    gap: 8px;
    text-decoration: none;
    flex-shrink: 0;
}

.logo-icon {
    font-size: 1.6rem;
    color: var(--white);
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.1); }
}

.site-name {
    font-size: 1.4rem;
    font-weight: 700;
    color: var(--white);
    white-space: nowrap;
}

.nav-center {
    flex: 1;
    display: flex;
    justify-content: center;
    min-width: 0;
}

.page-title {
    color: var(--white);
    font-size: 1.1rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    white-space: nowrap;
}

.nav-right {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-shrink: 0;
}

.back-btn {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 9px 16px;
    background: rgba(255, 255, 255, 0.15);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 10px;
    color: var(--white);
    font-size: 0.85rem;
    font-weight: 500;
    text-decoration: none;
    transition: all 0.3s ease;
    white-space: nowrap;
    flex-shrink: 0;
}

.back-btn:hover {
    background: rgba(255, 255, 255, 0.25);
    transform: translateY(-1px);
}

.cart-link {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    background: rgba(255, 255, 255, 0.15);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: var(--radius-full);
    color: var(--white);
    font-size: 1.05rem;
    text-decoration: none;
    transition: all 0.3s ease;
    flex-shrink: 0;
}

.cart-link:hover {
    background: rgba(255, 255, 255, 0.25);
    transform: translateY(-1px);
}

.cart-count {
    position: absolute;
    top: -5px;
    right: -5px;
    width: 18px;
    height: 18px;
    background: var(--accent-red);
    color: var(--white);
    border-radius: var(--radius-full);
    font-size: 0.65rem;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* ==================== MAIN CONTENT ==================== */
.main-content {
    flex: 1;
    padding: 20px 15px 40px;
    min-height: calc(100vh - 65px);
}

.container {
    max-width: 800px;
    margin: 0 auto;
    width: 100%;
}

/* ==================== SUMMARY CARD ==================== */
.summary-card {
    background: linear-gradient(135deg, #00695c, #00897b, #26a69a);
    border-radius: 14px;
    padding: 22px;
    margin-bottom: 16px;
    color: var(--white);
    box-shadow: 0 4px 20px rgba(0, 137, 123, 0.3);
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 16px;
}

.summary-header {
    display: flex;
    align-items: center;
    gap: 16px;
}

.summary-icon {
    width: 60px;
    height: 60px;
    min-width: 60px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.6rem;
    flex-shrink: 0;
}

.summary-info h2 {
    font-size: 0.95rem;
    font-weight: 500;
    opacity: 0.9;
    margin-bottom: 4px;
}

.summary-count {
    font-size: 2.2rem;
    font-weight: 700;
}

.add-address-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 7px;
    padding: 13px 16px;
    min-width: 130px;
    background: var(--white);
    color: var(--accent-teal);
    border: none;
    border-radius: 12px;
    font-size: 0.85rem;
    font-weight: 600;
    font-family: 'Poppins', sans-serif;
    cursor: pointer;
    transition: all 0.3s ease;
    white-space: nowrap;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.add-address-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.15);
}

.add-address-btn:active { transform: scale(0.97); }

/* ==================== ADDRESSES LIST ==================== */
.addresses-section {
    background: var(--white);
    border-radius: 14px;
    padding: 20px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.06);
}

.addresses-list {
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.address-card {
    background: #f8f9fa;
    border-radius: 12px;
    padding: 18px;
    position: relative;
    transition: all 0.3s ease;
    border: 2px solid transparent;
}

.address-card:hover {
    border-color: rgba(0, 137, 123, 0.15);
    box-shadow: 0 2px 12px rgba(0, 137, 123, 0.08);
}

.address-card.default {
    border-color: var(--primary-green);
    background: rgba(46, 125, 50, 0.03);
}

.address-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 14px;
    gap: 12px;
}

.address-label-section {
    display: flex;
    align-items: center;
    gap: 12px;
    min-width: 0;
    flex: 1;
}

.label-icon {
    width: 42px;
    height: 42px;
    min-width: 42px;
    background: var(--white);
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.1rem;
    color: var(--accent-teal);
    flex-shrink: 0;
}

.label-icon.home { color: var(--primary-green); }
.label-icon.work { color: var(--accent-blue); }
.label-icon.other { color: var(--secondary-orange); }

.address-label-info { min-width: 0; overflow: hidden; }

.address-label-info h3 {
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--black);
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

.default-badge {
    padding: 2px 8px;
    background: var(--primary-green);
    color: var(--white);
    font-size: 0.62rem;
    font-weight: 600;
    border-radius: 50px;
    text-transform: uppercase;
    letter-spacing: 0.3px;
    white-space: nowrap;
    flex-shrink: 0;
}

.address-name {
    font-size: 0.78rem;
    color: var(--medium-gray);
    margin-top: 2px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.address-actions {
    display: flex;
    gap: 6px;
    flex-shrink: 0;
}

.action-icon-btn {
    width: 34px;
    height: 34px;
    min-width: 34px;
    background: var(--white);
    border: none;
    border-radius: 8px;
    color: var(--dark-gray);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
    flex-shrink: 0;
}

.action-icon-btn:hover {
    background: var(--primary-green);
    color: var(--white);
}

.action-icon-btn.delete:hover {
    background: var(--accent-red);
}

.address-details { margin-bottom: 14px; }

.address-text {
    color: var(--dark-gray);
    line-height: 1.6;
    margin-bottom: 6px;
    font-size: 0.85rem;
    word-wrap: break-word;
}

.address-phone {
    display: flex;
    align-items: center;
    gap: 6px;
    color: var(--medium-gray);
    font-size: 0.82rem;
}

.address-phone i {
    color: var(--accent-teal);
    font-size: 0.75rem;
}

.address-footer {
    display: flex;
    gap: 8px;
    padding-top: 14px;
    border-top: 1px dashed var(--light-gray);
    flex-wrap: wrap;
}

.set-default-btn,
.deliver-here-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 7px;
    padding: 13px 16px;
    min-width: 130px;
    border: none;
    border-radius: 12px;
    font-size: 0.85rem;
    font-weight: 600;
    font-family: 'Poppins', sans-serif;
    cursor: pointer;
    transition: all 0.3s ease;
    white-space: nowrap;
    flex: 1;
}

.set-default-btn {
    background: var(--white);
    color: var(--primary-green);
    border: 2px solid var(--primary-green);
}

.set-default-btn:hover {
    background: var(--primary-green);
    color: var(--white);
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(46, 125, 50, 0.2);
}

.set-default-btn:active { transform: scale(0.97); }

.deliver-here-btn {
    background: var(--gradient-primary);
    color: var(--white);
    box-shadow: 0 2px 8px rgba(46, 125, 50, 0.2);
}

.deliver-here-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(46, 125, 50, 0.3);
}

.deliver-here-btn:active { transform: scale(0.97); }

/* ==================== EMPTY STATE ==================== */
.empty-state { padding: 50px 20px; text-align: center; }
.empty-content { max-width: 400px; margin: 0 auto; }

.empty-icon {
    width: 100px;
    height: 100px;
    background: linear-gradient(135deg, #e0f2f1 0%, #b2dfdb 100%);
    border-radius: var(--radius-full);
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 20px;
}

.empty-icon i { font-size: 2.8rem; color: var(--accent-teal); }
.empty-content h3 { font-size: 1.2rem; color: var(--dark-gray); margin-bottom: 10px; }
.empty-content p { color: var(--medium-gray); margin-bottom: 24px; line-height: 1.6; font-size: 0.88rem; }

.add-new-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 7px;
    padding: 13px 16px;
    min-width: 130px;
    background: var(--gradient-teal);
    color: var(--white);
    border: none;
    border-radius: 12px;
    font-size: 0.85rem;
    font-weight: 600;
    font-family: 'Poppins', sans-serif;
    cursor: pointer;
    transition: all 0.3s ease;
    white-space: nowrap;
    box-shadow: 0 2px 8px rgba(0, 137, 123, 0.2);
}

.add-new-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(0, 137, 123, 0.3);
}

.add-new-btn:active { transform: scale(0.97); }

/* ==================== MODAL ==================== */
.modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.5);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 2000;
    padding: 20px;
    backdrop-filter: blur(5px);
}

.modal-overlay.active { display: flex; }

.modal-container {
    background: var(--white);
    border-radius: 14px;
    max-width: 550px;
    width: 100%;
    max-height: 90vh;
    overflow-y: auto;
    animation: slideUp 0.3s ease;
}

@keyframes slideUp {
    from { opacity: 0; transform: translateY(30px); }
    to { opacity: 1; transform: translateY(0); }
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 18px 22px;
    border-bottom: 1px solid var(--light-gray);
}

.modal-header h2 { font-size: 1.15rem; color: var(--black); }

.modal-close {
    width: 34px;
    height: 34px;
    min-width: 34px;
    background: var(--off-white);
    border: none;
    border-radius: var(--radius-full);
    color: var(--dark-gray);
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.modal-close:hover { background: var(--accent-red); color: var(--white); }

.modal-form { padding: 22px; }
.form-row { margin-bottom: 16px; }

.form-row.two-col {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
}

.form-group { margin-bottom: 14px; }

.form-label {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 0.82rem;
    font-weight: 600;
    color: var(--dark-gray);
    margin-bottom: 6px;
}

.form-label i {
    color: var(--accent-teal);
    font-size: 0.8rem;
    flex-shrink: 0;
}

.form-input {
    width: 100%;
    padding: 10px 14px;
    border: 2px solid var(--light-gray);
    border-radius: 12px;
    font-size: 0.88rem;
    font-family: 'Poppins', sans-serif;
    transition: all 0.2s ease;
}

.form-input:focus {
    outline: none;
    border-color: var(--accent-teal);
    box-shadow: 0 0 0 3px rgba(0, 137, 123, 0.1);
}

.phone-input-group {
    display: flex;
    border: 2px solid var(--light-gray);
    border-radius: 12px;
    overflow: hidden;
    transition: all 0.2s ease;
}

.phone-input-group:focus-within {
    border-color: var(--accent-teal);
    box-shadow: 0 0 0 3px rgba(0, 137, 123, 0.1);
}

.country-code {
    padding: 10px 14px;
    background: #f8f9fa;
    font-weight: 600;
    font-size: 0.88rem;
    color: var(--dark-gray);
    border-right: 2px solid var(--light-gray);
    white-space: nowrap;
}

.phone-input-group .form-input { border: none; border-radius: 0; }
.phone-input-group .form-input:focus { box-shadow: none; }

.label-options {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.label-btn {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 10px 16px;
    background: #f8f9fa;
    border: 2px solid #eee;
    border-radius: 12px;
    font-size: 0.82rem;
    font-weight: 500;
    font-family: 'Poppins', sans-serif;
    color: var(--dark-gray);
    cursor: pointer;
    transition: all 0.3s ease;
}

.label-btn:hover {
    border-color: var(--accent-teal);
    color: var(--accent-teal);
}

.label-btn.active {
    background: rgba(0, 137, 123, 0.08);
    border-color: var(--accent-teal);
    color: var(--accent-teal);
}

.label-btn i { font-size: 0.88rem; }

.checkbox-group {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-top: 8px;
}

.checkbox-group input[type="checkbox"] {
    width: 18px;
    height: 18px;
    accent-color: var(--accent-teal);
    cursor: pointer;
}

.checkbox-group label {
    color: var(--dark-gray);
    cursor: pointer;
    font-size: 0.85rem;
}

.form-actions {
    display: flex;
    gap: 10px;
    justify-content: flex-end;
    margin-top: 24px;
    padding-top: 18px;
    border-top: 1px solid var(--light-gray);
}

.btn-cancel,
.btn-save {
    padding: 13px 16px;
    min-width: 130px;
    border: none;
    border-radius: 12px;
    font-size: 0.85rem;
    font-weight: 600;
    font-family: 'Poppins', sans-serif;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 7px;
    white-space: nowrap;
}

.btn-cancel {
    background: var(--white);
    color: var(--dark-gray);
    border: 2px solid var(--light-gray);
}

.btn-cancel:hover {
    background: var(--off-white);
    border-color: var(--medium-gray);
    transform: translateY(-1px);
}

.btn-cancel:active { transform: scale(0.97); }

.btn-save {
    background: var(--gradient-teal);
    color: var(--white);
    box-shadow: 0 2px 8px rgba(0, 137, 123, 0.2);
}

.btn-save:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(0, 137, 123, 0.3);
}

.btn-save:active { transform: scale(0.97); }

/* ==================== TOAST ==================== */
.toast {
    position: fixed;
    bottom: 24px;
    left: 50%;
    transform: translateX(-50%) translateY(100px);
    background: var(--white);
    color: var(--dark-gray);
    padding: 12px 18px;
    border-radius: 12px;
    box-shadow: 0 6px 25px rgba(0, 0, 0, 0.15);
    display: flex;
    align-items: center;
    gap: 10px;
    opacity: 0;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: 3000;
    max-width: 420px;
    width: 90%;
    border-left: 4px solid var(--accent-teal);
}

.toast.show { transform: translateX(-50%) translateY(0); opacity: 1; }
.toast.success { border-left-color: var(--primary-green); }
.toast.error { border-left-color: var(--accent-red); }
.toast.info { border-left-color: var(--accent-blue); }
.toast.warning { border-left-color: var(--secondary-orange); }

.toast-content { display: flex; align-items: center; gap: 10px; flex: 1; min-width: 0; }
.toast-content i { font-size: 1.1rem; flex-shrink: 0; }
.toast.success .toast-content i { color: var(--primary-green); }
.toast.error .toast-content i { color: var(--accent-red); }
.toast.info .toast-content i { color: var(--accent-blue); }
.toast.warning .toast-content i { color: var(--secondary-orange); }
.toast-content span { font-size: 0.85rem; font-weight: 500; }

.toast-close {
    background: none;
    border: none;
    color: #bdbdbd;
    cursor: pointer;
    padding: 4px;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: var(--radius-full);
    width: 24px;
    height: 24px;
    transition: all 0.2s;
}

.toast-close:hover { background: var(--off-white); color: #757575; }

/* ==================== LOADING ==================== */
.loading-overlay {
    position: fixed;
    inset: 0;
    background: rgba(255, 255, 255, 0.96);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 5000;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}

.loading-overlay.hidden { opacity: 0; pointer-events: none; visibility: hidden; }
.loading-spinner { display: flex; flex-direction: column; align-items: center; gap: 16px; }

.spinner {
    width: 42px;
    height: 42px;
    border: 4px solid var(--light-gray);
    border-top-color: var(--accent-teal);
    border-radius: var(--radius-full);
    animation: spin 0.8s linear infinite;
}

@keyframes spin { to { transform: rotate(360deg); } }
.loading-spinner span { color: #757575; font-size: 0.9rem; font-weight: 500; }

/* ==================== FOOTER ==================== */
.footer {
    background: var(--black);
    color: var(--white);
    padding: 24px 20px;
    text-align: center;
    margin-top: auto;
}

.footer-logo {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    font-size: 1.1rem;
    font-weight: 700;
    margin-bottom: 8px;
}

.footer-logo i { color: #4db6ac; }
.footer-content p { color: var(--medium-gray); font-size: 0.82rem; }

.footer-bottom {
    margin-top: 16px;
    padding-top: 16px;
    border-top: 1px solid var(--dark-gray);
    font-size: 0.78rem;
    color: var(--medium-gray);
}

.hidden { display: none !important; }

/* ============================================================== */
/* ==================== RESPONSIVE — TABLET ≤768px ============== */
/* ============================================================== */
@media (max-width: 768px) {
    .navbar {
        flex-wrap: wrap;
        padding: 12px 14px 10px;
        gap: 0;
    }

    .nav-left { flex-shrink: 0; }
    .site-name { font-size: 1.15rem; }
    .logo-icon { font-size: 1.4rem; }

    .nav-right {
        margin-left: auto;
        gap: 8px;
    }

    .back-btn {
        padding: 7px 12px;
        font-size: 0.78rem;
        gap: 5px;
        border-radius: 8px;
    }

    .back-btn span { font-size: 0.75rem; }

    .cart-link {
        width: 36px;
        height: 36px;
        font-size: 0.95rem;
    }

    /* Row 2 — Page Title */
    .nav-center {
        order: 3;
        width: 100%;
        justify-content: center;
        margin-top: 8px;
        padding-top: 10px;
        border-top: 1px solid rgba(255, 255, 255, 0.12);
    }

    .page-title { font-size: 0.95rem; gap: 6px; }

    .main-content { padding: 12px 10px 30px; }

    .summary-card {
        flex-direction: column;
        text-align: center;
        padding: 18px;
    }

    .summary-header {
        flex-direction: column;
        align-items: center;
    }

    .add-address-btn { width: 100%; min-width: unset; }
    .addresses-section { padding: 16px; }

    .address-header {
        flex-direction: column;
        gap: 10px;
    }

    .address-actions { align-self: flex-end; }

    .address-footer {
        flex-direction: column;
        gap: 8px;
    }

    .set-default-btn,
    .deliver-here-btn {
        width: 100%;
        min-width: unset;
    }

    .modal-overlay { padding: 10px; }
    .modal-container { max-width: 100%; max-height: 88vh; }
    .form-row.two-col { grid-template-columns: 1fr; }

    .form-actions {
        flex-direction: column;
        gap: 8px;
    }

    .btn-cancel,
    .btn-save {
        width: 100%;
        min-width: unset;
    }

    .label-options { flex-wrap: wrap; gap: 8px; }
    .label-btn { flex: 1; min-width: 0; justify-content: center; }
    .toast { width: 94%; bottom: 16px; }
    .footer { padding: 20px 15px; }
    .footer-logo { font-size: 1rem; }
}

/* ============================================================== */
/* ==================== RESPONSIVE — MOBILE ≤480px ============== */
/* ============================================================== */
@media (max-width: 480px) {
    .navbar {
        padding: 10px 12px 8px;
    }

    .site-name { font-size: 1rem; }
    .logo-icon { font-size: 1.25rem; }

    .back-btn span { display: none; }

    .back-btn {
        width: 34px;
        height: 34px;
        padding: 0;
        justify-content: center;
        border-radius: var(--radius-full);
        font-size: 0.85rem;
        gap: 0;
    }

    .cart-link {
        width: 34px;
        height: 34px;
        font-size: 0.9rem;
    }

    .cart-count {
        width: 16px;
        height: 16px;
        font-size: 0.6rem;
        top: -4px;
        right: -4px;
    }

    .nav-right { gap: 6px; }

    .nav-center {
        margin-top: 6px;
        padding-top: 8px;
    }

    .page-title { font-size: 0.88rem; }

    .summary-card { padding: 14px; }

    .summary-icon {
        width: 50px;
        height: 50px;
        min-width: 50px;
        font-size: 1.3rem;
    }

    .summary-count { font-size: 1.8rem; }
    .summary-info h2 { font-size: 0.85rem; }

    .address-card { padding: 14px; }

    .label-icon {
        width: 38px;
        height: 38px;
        min-width: 38px;
        font-size: 0.95rem;
    }

    .address-label-info h3 { font-size: 0.82rem; }
    .address-name { font-size: 0.72rem; }
    .address-text { font-size: 0.8rem; }
    .address-phone { font-size: 0.75rem; }

    .action-icon-btn {
        width: 30px;
        height: 30px;
        min-width: 30px;
    }

    .add-address-btn,
    .set-default-btn,
    .deliver-here-btn,
    .add-new-btn,
    .btn-cancel,
    .btn-save {
        padding: 12px 14px;
        font-size: 0.82rem;
        min-width: unset;
    }

    .empty-icon { width: 80px; height: 80px; }
    .empty-icon i { font-size: 2.2rem; }
    .empty-content h3 { font-size: 1.05rem; }
    .empty-content p { font-size: 0.82rem; }

    .modal-header { padding: 14px 16px; }
    .modal-header h2 { font-size: 1rem; }
    .modal-form { padding: 16px; }
    .form-label { font-size: 0.78rem; }
    .form-input { padding: 9px 12px; font-size: 0.82rem; }
    .country-code { padding: 9px 12px; font-size: 0.82rem; }
    .label-btn { padding: 8px 12px; font-size: 0.78rem; }

    .footer { padding: 18px 12px; }
    .footer-logo { font-size: 0.95rem; }
    .footer-content p { font-size: 0.78rem; }
    .footer-bottom { font-size: 0.72rem; margin-top: 12px; padding-top: 12px; }
}

/* ============================================================== */
/* ==================== RESPONSIVE — VERY SMALL ≤340px ========== */
/* ============================================================== */
@media (max-width: 340px) {
    .navbar { padding: 8px 8px 6px; }
    .site-name { font-size: 0.85rem; }
    .logo-icon { font-size: 1.1rem; }

    .back-btn {
        width: 30px;
        height: 30px;
        font-size: 0.78rem;
    }

    .cart-link {
        width: 30px;
        height: 30px;
        font-size: 0.82rem;
    }

    .cart-count { width: 14px; height: 14px; font-size: 0.55rem; }
    .nav-right { gap: 5px; }
    .nav-center { margin-top: 5px; padding-top: 7px; }
    .page-title { font-size: 0.8rem; gap: 5px; }

    .summary-card { padding: 12px; }

    .summary-icon {
        width: 42px;
        height: 42px;
        min-width: 42px;
        font-size: 1.1rem;
    }

    .summary-count { font-size: 1.5rem; }
    .summary-info h2 { font-size: 0.78rem; }

    .address-card { padding: 10px; }

    .label-icon {
        width: 34px;
        height: 34px;
        min-width: 34px;
        font-size: 0.85rem;
        border-radius: 8px;
    }

    .address-label-info h3 { font-size: 0.75rem; }
    .address-text { font-size: 0.75rem; }

    .action-icon-btn {
        width: 28px;
        height: 28px;
        min-width: 28px;
        font-size: 0.75rem;
    }

    .add-address-btn,
    .set-default-btn,
    .deliver-here-btn,
    .add-new-btn,
    .btn-cancel,
    .btn-save {
        padding: 10px;
        font-size: 0.75rem;
    }

    .modal-header { padding: 12px 14px; }
    .modal-header h2 { font-size: 0.92rem; }
    .modal-form { padding: 14px; }
    .form-input { padding: 8px 10px; font-size: 0.78rem; }
    .country-code { padding: 8px 10px; font-size: 0.78rem; }
    .form-label { font-size: 0.72rem; }
    .label-btn { padding: 6px 10px; font-size: 0.72rem; }
    .checkbox-group label { font-size: 0.78rem; }
    .checkbox-group input[type="checkbox"] { width: 16px; height: 16px; }

    .footer { padding: 14px 10px; }
    .footer-logo { font-size: 0.85rem; }
    .footer-content p { font-size: 0.72rem; }
    .footer-bottom { font-size: 0.65rem; }
}

/* ==================== PRINT ==================== */
@media print {
    .navbar, .footer, .toast, .loading-overlay, .modal-overlay,
    .address-actions, .address-footer, .add-address-btn, .add-new-btn {
        display: none !important;
    }
    body { background: var(--white); }
    .addresses-section { box-shadow: none; border: 1px solid #ddd; }
    .address-card { break-inside: avoid; border: 1px solid #ddd; }
}