/* Shared commerce UI for every sub-site with a cart: listing headers, quantity
 * stepper, cart, QPay (demo) payment modal, orders, toast.
 * Each sub-site sets --accent on .commerce (or :root) to its brand colour. */
:root {
    --accent: #0b5cff;
    --accent-dark: #0049d6;
    --accent-soft: #eef4ff;
}
.order-tabs {
    display: flex;
    gap: .25rem;
    border-bottom: 1px solid var(--ek-border);
    margin-bottom: 1.1rem;
}
.order-tabs a {
    display: inline-flex;
    align-items: center;
    gap: .4rem;
    padding: .6rem 0.85rem;
    color: var(--ek-muted);
    font-weight: 600;
    font-size: .88rem;
    border-bottom: 2px solid transparent;
    margin-bottom: -1px;
}
.order-tabs a.active {
    color: var(--accent);
    border-bottom-color: var(--accent);
}
/* Checkout address picker */
.addr-pick {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(230px, 1fr));
    gap: 0.637rem;
}
.addr-option {
    position: relative;
    display: flex;
    gap: .6rem;
    border: 1.5px solid var(--ek-border);
    border-radius: 6px;
    padding: 0.68rem 1.87rem 0.68rem 0.765rem;
    cursor: pointer;
    color: var(--ek-text);
    transition: border-color .15s, background .15s;
}
.addr-option input {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}
.addr-option-body {
    display: flex;
    flex-direction: column;
    gap: .15rem;
    font-size: .84rem;
    min-width: 0;
}
.addr-option-body small {
    color: var(--ek-muted);
    font-size: .74rem;
}
.addr-check {
    position: absolute;
    top: .7rem;
    right: .75rem;
    color: var(--accent);
    font-size: 1.1rem;
    opacity: 0;
}
.addr-option:has(input:checked) {
    border-color: var(--accent);
    background: var(--accent-soft);
}
.addr-option:has(input:checked) .addr-check {
    opacity: 1;
}
.addr-option:has(input:focus-visible) {
    outline: 2px solid var(--accent);
    outline-offset: 2px;
}
.addr-new {
    align-items: center;
    justify-content: center;
    border-style: dashed;
    color: var(--ek-muted);
    font-weight: 600;
    padding-right: .9rem;
    min-height: 84px;
}
.addr-new:hover {
    color: var(--accent);
    border-color: var(--accent);
}
.btn-accent {
    background: var(--accent);
    border-color: var(--accent);
    color: #fff;
    border-radius: 6px;
    font-weight: 600;
    padding: .6rem 0.935rem;
}
.btn-accent:hover,
.btn-accent:focus {
    background: var(--accent-dark);
    border-color: var(--accent-dark);
    color: #fff;
}
/* Listing */
.list-head {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    gap: 0.85rem;
    margin-bottom: 1rem;
}
.list-head h1 {
    font-size: 1.45rem;
    font-weight: 800;
    margin: 0 0 .1rem;
}
.list-head .form-select {
    border-radius: 6px;
    min-width: 170px;
}
.tab-pills {
    display: flex;
    flex-wrap: wrap;
    gap: .4rem;
    margin-bottom: 1rem;
}
.tab-pills a {
    border: 1px solid var(--ek-border);
    border-radius: 6px;
    padding: .3rem 0.807rem;
    font-size: .8rem;
    color: #606060;
    background: #fff;
}
.tab-pills a.active {
    background: var(--accent);
    border-color: var(--accent);
    color: #fff;
}
.qty {
    display: inline-flex;
    align-items: center;
    border: 1px solid var(--ek-border);
    border-radius: 6px;
    overflow: hidden;
    background: #fff;
}
.qty button {
    border: 0;
    background: transparent;
    width: 40px;
    height: 46px;
    font-size: 1.1rem;
    color: #303038;
}
.qty button:hover {
    background: var(--ek-bg);
}
.qty input {
    width: 48px;
    border: 0;
    text-align: center;
    font-weight: 700;
    outline: 0;
    -moz-appearance: textfield;
}
.qty input::-webkit-outer-spin-button,
.qty input::-webkit-inner-spin-button {
    -webkit-appearance: none;
}
.qty.sm button {
    width: 32px;
    height: 34px;
    font-size: .95rem;
}
.qty.sm input {
    width: 38px;
}
/* Cart */
.cart-row {
    display: flex;
    align-items: center;
    gap: 0.85rem;
    padding: 0.85rem 1.062rem;
}
.cart-row + .cart-row {
    border-top: 1px solid var(--ek-border);
}
.cart-img {
    width: 76px;
    height: 76px;
    border-radius: 6px;
    overflow: hidden;
    flex-shrink: 0;
}
.cart-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}
.cart-total {
    font-weight: 800;
    min-width: 110px;
    text-align: right;
}
.summary h2 {
    font-size: 1.1rem;
    font-weight: 800;
    margin-bottom: 1rem;
}
.sum-row {
    display: flex;
    justify-content: space-between;
    padding: .4rem 0;
    color: #606060;
}
.sum-row.total {
    border-top: 1px solid var(--ek-border);
    margin-top: .5rem;
    padding-top: .9rem;
    font-size: 1.15rem;
    font-weight: 800;
    color: var(--ek-text);
}
.pay-methods {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: .4rem;
    font-size: .78rem;
    color: var(--ek-muted);
    margin-top: .85rem;
}

/* QPay (demo) payment modal */
.qpay-mark {
    font-weight: 800;
    font-size: 1.35rem;
    letter-spacing: -.02em;
    color: #e30613;
    line-height: 1;
}
.qpay-mark b {
    color: #0b2a5b;
}
.qpay-mark.sm {
    font-size: .95rem;
}
.demo-badge {
    font-size: .68rem;
    font-weight: 600;
    background: #fff4d6;
    color: #a16207;
    padding: .15rem .55rem;
    border-radius: 6px;
}
.pay-modal {
    border: 0;
    border-radius: 6px;
    overflow: hidden;
}
.pay-head {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.85rem 1.062rem;
    border-bottom: 1px solid var(--ek-border);
}
.pay-body {
    padding: 1.062rem 1.275rem 1.275rem;
}
.pay-sum {
    display: flex;
    justify-content: space-between;
    background: #f5f8ff;
    border-radius: 6px;
    padding: 0.68rem 0.85rem;
}
.pay-sum small {
    display: block;
    color: var(--ek-muted);
    font-size: .72rem;
}
.pay-amount {
    font-size: 1.35rem;
    color: var(--accent);
}
.pay-qr {
    width: 220px;
    height: 220px;
    margin: 1.1rem auto .5rem;
    padding: 8px;
    border: 1px solid var(--ek-border);
    border-radius: 6px;
    background: #fff;
}
.pay-qr svg {
    width: 100%;
    height: 100%;
}
.pay-hint {
    text-align: center;
    font-size: .82rem;
    color: #606060;
    margin-bottom: 1rem;
}
.bank-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: .5rem;
    margin-bottom: 1.1rem;
}
.bank {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: .3rem;
    font-size: .66rem;
    color: #606060;
    text-align: center;
}
.bank i {
    width: 40px;
    height: 40px;
    border-radius: 6px;
    color: #fff;
    font-style: normal;
    font-weight: 800;
    font-size: .85rem;
    display: flex;
    align-items: center;
    justify-content: center;
}
.pay-check {
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: .4rem;
}
.pay-error {
    color: #ef4444;
    font-size: .8rem;
    text-align: center;
    min-height: 1.1rem;
    margin-top: .4rem;
}
.pay-note {
    font-size: .72rem;
    color: var(--ek-muted);
    text-align: center;
    margin: 0;
}

/* Orders */
.order-card {
    background: #fff;
    border: 1px solid var(--ek-border);
    border-radius: 6px;
    margin-bottom: 1rem;
    overflow: hidden;
}
.order-head,
.order-foot {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: .5rem;
    padding: 0.722rem 0.935rem;
}
.order-head {
    background: #f5f7f8;
    border-bottom: 1px solid var(--ek-border);
}
.order-foot {
    border-top: 1px solid var(--ek-border);
}
.order-status {
    font-size: .75rem;
    font-weight: 600;
    padding: .25rem .7rem;
    border-radius: 6px;
}
.order-status.paid {
    background: #e8f8ee;
    color: #008f40;
}
.order-status.pending {
    background: #fff4d6;
    color: #a16207;
}
.order-status.cancelled {
    background: #fee2e2;
    color: #b91c1c;
}
.order-status.preparing {
    background: #e0f2fe;
    color: #0369a1;
}
.order-status.delivering {
    background: #ede9fe;
    color: #6d28d9;
}
.order-status.delivered {
    background: #dcfce7;
    color: #15803d;
}
.order-item {
    display: flex;
    align-items: center;
    gap: 0.765rem;
    padding: .7rem 0.935rem;
}
.order-item + .order-item {
    border-top: 1px dashed var(--ek-border);
}
.order-img {
    width: 52px;
    height: 52px;
    border-radius: 6px;
    overflow: hidden;
    background: var(--ek-bg);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}
.order-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}
.order-line-total {
    font-weight: 700;
    min-width: 100px;
    text-align: right;
}
.order-total {
    font-size: 1.1rem;
}

.toast {
    background: #fff;
    box-shadow: none;
    border-radius: 6px;
}


@media (max-width: 767.98px) {
    .cart-row {
        flex-wrap: wrap;
    }
    .cart-total {
        min-width: 0;
    }
    .list-head {
        flex-wrap: wrap;
    }
}

/* Info sidebar with map */
.side-info {
    list-style: none;
    padding: 0;
    margin: 0 0 1.1rem;
    display: flex;
    flex-direction: column;
    gap: 0.722rem;
}
.side-info li {
    display: flex;
    align-items: flex-start;
    gap: 0.637rem;
    font-size: .84rem;
    color: var(--ek-text);
    line-height: 1.35;
    min-width: 0;
}
.side-info li > div {
    min-width: 0;
    overflow-wrap: anywhere;
}
.side-info small {
    display: block;
    font-size: .7rem;
    color: var(--ek-muted);
    margin-bottom: .1rem;
}
.side-info a {
    color: var(--ek-text);
    font-weight: 600;
}
.side-info a:hover {
    color: var(--accent);
}
.si-icon {
    width: 34px;
    height: 34px;
    border-radius: 6px;
    background: var(--accent-soft);
    color: var(--accent);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: .9rem;
    flex-shrink: 0;
}
.store-map-wrap {
    position: relative;
    border-radius: 6px;
    overflow: hidden;
    border: 1px solid var(--ek-border);
}
.store-map {
    height: 190px;
    z-index: 0;
}
.store-map .leaflet-control-attribution {
    font-size: .55rem;
    background: rgba(255, 255, 255, .75);
}
.map-open {
    position: absolute;
    top: .6rem;
    right: .6rem;
    z-index: 500;
    width: 32px;
    height: 32px;
    border-radius: 6px;
    background: #fff;
    color: var(--ek-text);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: .85rem;
    box-shadow: none;
}
.map-open:hover {
    color: var(--accent);
}

/* Favourite toggle and round logo, used on cards across sub-sites */
.fav-btn {
    position: absolute;
    top: 8px;
    right: 8px;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: #fff;
    color: #767678;
    font-size: .8rem;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: none;
    cursor: pointer;
    z-index: 2;
}
.fav-btn.on {
    color: #ef4444;
}
.r-logo {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    border: 3px solid #fff;
    background: #fff;
    overflow: hidden;
    box-shadow: none;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    z-index: 1;
}
.r-logo img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}
.r-logo.lg {
    width: 88px;
    height: 88px;
    border-width: 4px;
}
