    /*
    * shared.css – Consolidated common styles to eliminate duplication across custom stylesheets.
    * NOTE: All existing page-specific stylesheets should be loaded AFTER this file.
    * This preserves the current design while centralising repeated rules (DRY).
    */

    /* =========================================================
    1.  Root Variables
    ========================================================= */
    :root {
        /* Brand colours */
        --brand-primary: #8a8f27;
        --brand-primary-dark: #747a22;

        /* Greys & utility colours */
        --neutral-gray: #999;
        --neutral-light-gray: #f8f8f8;
        --neutral-border: #e0e0e0;
    }

    /* =========================================================
    2.  Resets / Base Elements
    ========================================================= */
    /* No base resets in this file - handled elsewhere */

    /* =========================================================
    3.  Forms
    ========================================================= */
    /* 3.1 Form groups & labels */
    .form-group {
        margin-bottom: 15px;
        position: relative;
    }
    .form-group label {
        display: block;
        margin-bottom: 5px;
        font-size: 14px;
        color: #555;
    }

    /* 3.2 Base inputs / textarea */
    .form-control {
        width: 100%;
        padding: 8px 12px;
        border: 1px solid var(--neutral-border);
        border-radius: 20px;
        box-sizing: border-box;
        font-size: 14px;
        background-color: var(--neutral-light-gray);
    }
    .form-control:focus {
        outline: none;
        border-color: var(--brand-primary);
        box-shadow: 0 0 0 2px rgba(138, 143, 39, 0.2);
    }

    /* 3.3 Validation helpers */
    .form-control.error {
        border-color: #ff4444;
        background: rgba(255, 68, 68, 0.05);
    }
    .form-control.error + .error-message {
        display: block;
    }

    /* 3.4 Input-group helpers */
    .input-group {
        display: flex;
        margin-bottom: 15px;
    }
    .input-group .form-control {
        flex: 1 1 auto;
    }
    .input-group-append {
        display: flex;
    }
    .input-group-append button {
        border: 1px solid var(--brand-primary);
        background: var(--brand-primary);
        color: #fff;
        border-radius: 0 20px 20px 0;
        padding: 0 12px;
        cursor: pointer;
    }

    /* =========================================================
    4.  Buttons / Utilities
    ========================================================= */
    /* 4.1 Primary buttons */
    .modal-content button[type="submit"],
    .auth-form .auth-btn,
    .submit-btn {
        width: 100%;
        padding: 10px;
        margin-top: 20px;
        margin-bottom: 20px;
        background-color: var(--brand-primary);
        color: #fff;
        border: none;
        border-radius: 25px;
        cursor: pointer;
        font-size: 15px;
        font-weight: 600;
        transition: background-color 0.3s, opacity 0.3s;
    }
    .modal-content button[type="submit"]:hover,
    .auth-form .auth-btn:hover,
    .submit-btn:hover {
        background-color: var(--brand-primary-dark);
    }

    /* 4.2 Utility classes */
    .text-center { text-align: center !important; }
    .d-flex { display: flex !important; }

    /* =========================================================
    5.  Modals
    ========================================================= */
    /* 5.1 Overlay / backdrop */
    .modal {
        display: none;
        align-items: center;
        justify-content: flex-start;
        align-content: center;
        overscroll-behavior: none;
        position: fixed;
        z-index: 2000;
        left: 0;
        top: 0;
        max-width: 100vw;
        height: 100vh;
        width: 100%;
        overflow: hidden;
        background-color: rgba(0, 0, 0, 0.4);
        box-sizing: border-box;
        scrollbar-width: none;
        -ms-overflow-style: none;
        -webkit-overflow-scrolling: touch;
        overflow-y: hidden;
    }
    body.modal-open {
        overflow: hidden !important;
    }

    /* 5.2 .modal-content */
    .modal-content {
        margin: 20px auto;
        overflow: visible;
        background-image: url(../images/modal-bg.png) !important;
        background-size: cover;
        background-position: center;
        background-repeat: no-repeat;
        border-radius: 30px !important;
        max-width: 1280px;
        width: 95%;
        /* FIX 5: Use min-height instead of height */
        min-height: auto;
        max-height: 85vh; /* Already good */
        padding: 30px;
        box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
        position: relative;
        scrollbar-width: thin;
        scrollbar-color: var(--brand-primary-dark) transparent;
        -webkit-overflow-scrolling: touch;
    }

    /* 5.3 Scroll-area wrapper */
    .modal-content .scroll-area {
        max-height: calc(80vh - 120px);
        /* Ensure the modal keeps a consistent height even for shorter steps */
        min-height: calc(80vh - 120px);
        overflow-y: auto;
        -webkit-overflow-scrolling: touch;
    }

    /* 5.4 Close icon */
    .close,
    .modal-close {
        position: absolute;
        font-size: 38px;
        font-weight: bold;
        color: var(--brand-primary);
        cursor: pointer;
        z-index: 10;
        top: 15px;
        right: 20px;
        transform: scale(1.2);
        transition: all 0.6s ease-in-out;
    }
    .close:hover,
    .modal-close:hover {
        color: var(--brand-primary);
        transform: scale(1.5);
    }

    /* 5.5 Modal heading */
    .modal-content h2 {
        font-size: 20px;
        font-weight: 600;
        color: var(--brand-primary);
        margin-top: 20px;
        margin-bottom: 20px;
        text-align: center;
    }

    /* Modal state variations */

    /* FIX 1: Add HTML overflow control */
    html.modal-open,
    body.modal-open {
        overflow: hidden !important;
        width: 100%;
        position: fixed;
    }

    /* FIX 3: Use viewport units for consistent sizing */
    .modal.show,
    .modal.active {
        display: flex;
        align-items: center;
        justify-content: center;
        overscroll-behavior: contain;
        position: fixed;
        /* FIX 4: Lock dimensions to viewport */
        width: 100vw;
        height: 100vh;
        overflow: hidden !important;
    }

    /* FIX 6: Add mobile-friendly max-height */
    @media (max-height: 600px) {
        .modal-content {
            max-height: 90vh;
        }
    }

    /* =========================================================
    6.  Nice-Select Customisation
    ========================================================= */
    .modal .nice-select .list {
        z-index: 2150 !important;
        position: relative !important;
        background: #ffffff;
        backdrop-filter: blur(2px);
        -webkit-backdrop-filter: blur(2px);
        border: .5px solid var(--neutral-border);
        border-radius: 10px;
        max-height: 200px;
        overflow-y: auto;
        box-shadow: 0 4px 10px rgba(0,0,0,0.08);
        transition: all 0.3s ease-in-out;
        color: #000000;
    }
    .modal .nice-select.open,
    .modal .nice-select.open .list {
        z-index: 3000 !important;
    }
    .modal .nice-select .option {
        color: #000000;
        padding: 5px 5px 5px 10px;
        max-height: 36px;
        height: 100%;
        align-items: center;
        display: flex;
        border-radius: 10px;
        justify-content: center;
        font-size: 14px;
    }
    .modal .nice-select .option:hover,
    .modal .nice-select .option.focus,
    .modal .nice-select .option.selected {
        background: var(--brand-primary);
        color: #ffffff;
    }
    .modal-content .scroll-area {
        overflow-x: visible;
    }

    /* =========================================================
    7.  Scrollbars
    ========================================================= */
    /* 7.1 Modal scrollbars */
    .modal-content::-webkit-scrollbar {
        width: 4px;
        border-radius: 2px;
        background: var(--brand-primary-dark);
        border-radius: 2px;
        border: 1px solid var(--brand-primary-dark);
        box-shadow: 0 0 1px 2px var(--brand-primary-dark);
        opacity: 0.2;
        position: absolute;
        margin-left: 20px;
    }
    .modal-content::-webkit-scrollbar-track {
        background: transparent;
    }
    .modal-content::-webkit-scrollbar-thumb {
        background: var(--brand-primary-dark);
        border-radius: 3px;
    }

    /* =========================================================
    8.  Maps
    ========================================================= */
    /* 8.1 Containers */
    .map-container {
        position: relative;
        width: 100%;
        height: 300px;
        margin-bottom: 20px;
        border: 1px solid var(--neutral-border);
        border-radius: 10px;
        overflow: hidden;
    }
    .map-container.large { height: 450px; }
    .location-fields { margin-bottom: 20px; }
    .map-instructions {
        background-color: #e9f5ff;
        padding: 10px 15px;
        border-radius: 10px;
        margin-bottom: 15px;
        font-size: 13px;
    }
    .map-instructions p { margin-bottom: 5px; }
    .map-marker-info {
        font-style: italic;
        color: #666;
        margin-bottom: 15px;
        font-size: 13px;
    }

    /* 8.2 Leaflet overrides */
    #delivery-map,
    #addressPickerMap,
    #profileMap {
        width: 100% !important;
        height: 100% !important;
        z-index: 1;
    }
    .leaflet-container,
    .leaflet-pane,
    .leaflet-tile-container { width: 100% !important; height: 100% !important; }
    .leaflet-tile { visibility: inherit !important; }

    /* 8.3 Loading / error overlays */
    .map-loading {
        position: absolute;
        top: 0; left: 0;
        width: 100%; height: 100%;
        background-color: rgba(255,255,255,0.8);
        display: flex;
        justify-content: center;
        align-items: center;
        z-index: 1000;
    }
    .map-error {
        padding: 15px;
        text-align: center;
        background-color: #f8d7da;
        color: #721c24;
        border-radius: 10px;
        margin-bottom: 20px;
        display: none;
        font-size: 14px;
    }

    /* 8.4 Marker & pulse */
    .custom-map-marker {
        background-color: var(--brand-primary);
        border-radius: 50%;
        border: 2px solid #fff;
        width: 15px !important;
        height: 15px !important;
        margin-left: -7px !important;
        margin-top: -7px !important;
    }
    .marker-pulse {
        border-radius: 50%;
        height: 14px;
        width: 14px;
        position: absolute;
        left: 50%;
        top: 50%;
        margin: -7px 0 0 -7px;
        transform: rotateX(55deg);
        z-index: -2;
    }
    .marker-pulse:after {
        content: "";
        border-radius: 50%;
        height: 40px;
        width: 40px;
        position: absolute;
        margin: -13px 0 0 -13px;
        animation: pulsate 1s ease-out infinite;
        opacity: 0;
        box-shadow: 0 0 1px 2px var(--brand-primary);
        animation-delay: 1.1s;
    }

    /* =========================================================
    9.  Status Badges
    ========================================================= */
    .order-status {
        display: inline-block;
        padding: 5px 10px;
        border-radius: 15px;
        font-size: 14px;
        font-weight: 600;
    }
    .status-pending    { background-color: #fff3cd; color: #856404; }
    .status-confirmed   { background-color: #cce5ff; color: #004085; }
    .status-preparing   { background-color: #ffeeba; color: #856404; }
    .status-out-for-delivery { background-color: #d1ecf1; color: #0c5460; }
    .status-delivered   { background-color: #d4edda; color: #155724; }
    .status-cancelled   { background-color: #f8d7da; color: #721c24; }

    /* =========================================================
    10. Animations / Keyframes
    ========================================================= */
    @keyframes fadeIn {
        from { opacity: 0; }
        to   { opacity: 1; }
    }
    @keyframes spin {
        to { transform: rotate(360deg); }
    }
    @keyframes pulsate {
        0%   { transform: scale(0.1); opacity: 0; }
        50%  { opacity: 1; }
        100% { transform: scale(1.2); opacity: 0; }
    }

    /* =========================================================
    11. Media Queries
    ========================================================= */
    /* No media queries in original file */

    /* =========================================================
    12. Dark-mode tweaks
    ========================================================= */
    /* No dark mode styles in original file */

    /* Works in Firefox */
    html {
        overflow-y: scroll;           /* keep scrollability */
        scrollbar-width: none;        /* Firefox hides the scrollbar */
    }

    /* Works in WebKit (Chrome, Edge, Safari, Opera) */
    html::-webkit-scrollbar {
        display: none;                /* Chrome/Safari/Edge hide */
    }

    /* Optional: remove horizontal scrollbar too */
    body {
        overflow-x: hidden;           /* stop sideways scroll */
    }

    .step-nav {
        position: sticky;
        left: 20px;
        right: 20px;
        display: flex;
        justify-content: center;
        align-items: center;
        gap: 10px;
        padding: 10px 0;
        background: rgba(40, 39, 39, 0.085);
        box-shadow: 0 0 1px rgba(245, 255, 59, 0.533);
        backdrop-filter: blur(2px);
        -webkit-backdrop-filter: blur(2px);
        border-radius: 30px;
        margin-top: 30px;
        z-index: 5;
    }

    .step-nav .btn {
        background: var(--brand-primary-dark);
        color: #ffffff;
        border: .8px solid var(--neutral-border);
        border-radius: 10px;
        padding: 4px 2px;
        font-size: 14px;
        font-weight: 500;
        transition: all 0.3s ease-in-out;
        transform: scale(1);
        margin: 0 5px;
    }

    .step-nav .btn:first-child {
        margin-left: 10px;
    }
    .step-nav .btn:last-child {
        margin-right: 10px;
    }

    .step-nav .btn:hover {
        transform: scale(1.05);
        box-shadow: 0 0 3px rgba(255, 255, 255, 0.435);
        animation: subtle-pulse 1s ease-in-out infinite;
        cursor: pointer;
        background: var(--brand-primary-dark);
    }

    .info-icon {
        color: var(--brand-primary-dark);
        margin-left: 5px;
        cursor: pointer;
        font-size: 18px;
    }

    /* Remove animated bottom border from form groups inside modals */
    .modal-content .form-group::after {
        display: none !important;
    }
    /* Simplify focus style inside modal */
    .modal-content .form-control:focus {
        box-shadow: none;
    }

    /* =========================================================
    Modal background image overlay
    ========================================================= */
    .modal-content::before {
        content: "";
        position: absolute;
        top: 0; left: 0;
        width: 100%; height: 100%;
        background-image: url(../../img/Backdrops/bd-contact.png);
        background-size: cover;
        background-position: center;
        opacity: 0.3; /* desired transparency */
        border-radius: inherit;
        z-index: 0;
        animation: subtle-pulse 1s ease-in-out infinite;
    }
    /* keep modal inner content above the overlay */
    .modal-content > * {
        position: relative;
        z-index: 1;
    }

    .confirm-btn {
        width: auto !important;
    }

    .summary-columns .summary-col {
        flex: 1 1 50%;
    }
    @media (max-width: 576px) {
        .summary-columns .summary-col {
            flex: 1 0 100%;
        }
    }
    .summary-row {
        display: flex;
        justify-content: space-between;
        padding: 4px 0;
    }

    .summary-label {
        font-size: 13px;
    }
    .summary-value {
        font-size: 13px;
    }
    .left-summary .summary-row,.right-summary .summary-row{
        padding:3px 0;
    }
    .summary-col{
        font-size:13px;
    }