/* ==========================================================================
   Tender Greens clone — mock ordering experience
   ========================================================================== */

.order-hero {
    padding: 38px var(--page-pad) 34px;
    background: var(--green);
    color: var(--cream);
    text-align: center;
}
.order-eyebrow {
    font-size: 11px;
    font-weight: 800;
    letter-spacing: 2.2px;
    text-transform: uppercase;
    color: var(--sky);
}
.order-hero h1 {
    margin-top: 8px;
    font-size: 42px;
    font-weight: 900;
    line-height: .95;
    letter-spacing: .03em;
    text-transform: uppercase;
}
.order-hero__sub {
    max-width: 480px;
    margin: 12px auto 0;
    font-family: var(--serif);
    font-size: 16px;
    line-height: 1.5;
}
.order-hero__sub a { text-decoration: underline; }

.order-toolbar {
    position: sticky;
    top: var(--header-h);
    z-index: 800;
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 10px;
    padding: 12px var(--page-pad);
    background: var(--cream);
    border-bottom: 1px solid rgba(0, 71, 61, .18);
}
.order-pickup {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    width: 100%;
    min-height: 44px;
    padding: 0 16px;
    border: 1px solid rgba(0, 71, 61, .35);
    border-radius: 999px;
    background: var(--cream);
}
.order-pickup span {
    font-size: 9px;
    font-weight: 800;
    letter-spacing: 1.2px;
    text-transform: uppercase;
    opacity: .7;
}
.order-pickup select {
    max-width: 128px;
    padding: 4px 0;
    border: 0;
    background: transparent;
    font-size: 12px;
    font-weight: 800;
    letter-spacing: .3px;
    outline: none;
    appearance: none;
}
.order-search {
    display: flex;
    align-items: center;
    gap: 8px;
    width: 100%;
    flex: 0 0 auto;
    min-height: 44px;
    padding: 0 14px;
    border: 1px solid rgba(0, 71, 61, .35);
    border-radius: 999px;
    background: var(--cream);
}
.order-search svg { width: 17px; height: 17px; flex: 0 0 auto; }
.order-search input {
    width: 100%;
    border: 0;
    background: transparent;
    font-size: 13px;
    outline: none;
}
.order-search input::placeholder { color: rgba(0, 71, 61, .55); }
.order-toolbar__actions {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    width: 100%;
    margin-left: 0;
}
.order-toolbar__actions .order-signin { flex: 1; }
.order-toolbar__actions .order-cart-btn { flex: 1; justify-content: center; }
.order-signin {
    min-height: 44px;
    padding: 0 16px;
    border: 1px solid var(--green);
    border-radius: 999px;
    background: transparent;
    font-size: 11px;
    font-weight: 800;
    letter-spacing: 1.2px;
    text-transform: uppercase;
}
.order-cart-btn {
    display: flex;
    align-items: center;
    gap: 8px;
    min-height: 44px;
    padding: 0 16px;
    border: 1px solid var(--green);
    border-radius: 999px;
    background: var(--green);
    color: var(--cream);
    font-size: 11px;
    font-weight: 800;
    letter-spacing: 1.2px;
    text-transform: uppercase;
}
.order-cart-btn svg { width: 18px; height: 18px; }
.order-cart-btn b {
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 20px;
    height: 20px;
    padding: 0 5px;
    border-radius: 999px;
    background: var(--sky);
    color: var(--green);
    font-size: 11px;
    line-height: 1;
}
.order-cart-btn.is-bump { animation: cart-bump .35s var(--ease); }
@keyframes cart-bump {
    0% { transform: scale(1); }
    45% { transform: scale(1.07); }
    100% { transform: scale(1); }
}

.order-cats {
    display: flex;
    gap: 22px;
    overflow-x: auto;
    padding: 16px var(--page-pad) 12px;
    background: var(--cream);
    scrollbar-width: none;
}
.order-cats::-webkit-scrollbar { display: none; }
.order-cat {
    flex: 0 0 auto;
    padding: 4px 0;
    border: 0;
    border-bottom: 2px solid transparent;
    background: transparent;
    font-size: 12px;
    font-weight: 800;
    letter-spacing: 1.1px;
    text-transform: uppercase;
    white-space: nowrap;
}
.order-cat.is-active { border-bottom-color: var(--green); }
.order-cat:hover { color: var(--accent); }

.order-products-wrap {
    max-width: 1280px;
    margin: 0 auto;
    padding: 14px var(--page-pad) 90px;
}
.order-products {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 26px 14px;
}
.order-product { display: flex; flex-direction: column; }
.order-product__media { display: none; }
.order-product {
    padding: 18px 16px 16px;
    border: 1px solid rgba(0, 71, 61, .22);
    background: rgba(255, 255, 255, .18);
    transition: border-color .25s var(--ease), transform .25s var(--ease);
}
.order-product:hover { border-color: var(--green); transform: translateY(-2px); }
.order-product__body {
    display: flex;
    flex-direction: column;
    flex: 1;
    padding: 0;
}
.order-product__cat {
    margin: 0 0 7px !important;
    font-family: var(--sans) !important;
    font-size: 9px !important;
    font-weight: 800;
    letter-spacing: 1.4px;
    text-transform: uppercase;
    color: var(--accent) !important;
    line-height: 1.2 !important;
}
.order-product__body h3 {
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
    font-size: 14px;
    font-weight: 800;
    line-height: 1.15;
    letter-spacing: .7px;
    text-transform: uppercase;
}
.order-product__body > p {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    margin-top: 5px;
    font-family: var(--serif);
    font-size: 13px;
    line-height: 1.4;
}
.order-product__cal { opacity: .65; white-space: nowrap; }
.order-product__foot {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    margin-top: auto;
    padding-top: 12px;
}
.order-product__price { font-size: 15px; font-weight: 800; }
.order-add {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    min-height: 36px;
    padding: 0 14px;
    border: 1px solid var(--green);
    border-radius: 999px;
    background: transparent;
    font-size: 10px;
    font-weight: 800;
    letter-spacing: 1px;
    text-transform: uppercase;
    transition: background .2s var(--ease), color .2s var(--ease);
}
.order-add span { font-size: 15px; line-height: 1; }
.order-add:hover, .order-add.is-added { background: var(--green); color: var(--cream); }
.order-product[hidden] { display: none; }
.order-empty {
    padding: 50px 0;
    font-family: var(--serif);
    font-size: 18px;
    text-align: center;
}

/* ---------- Cart -------------------------------------------------------- */

.cart-scrim {
    position: fixed;
    inset: 0;
    z-index: 3050;
    background: rgba(0, 71, 61, .55);
    backdrop-filter: blur(2px);
}
.cart {
    position: fixed;
    top: 0;
    right: 0;
    z-index: 3100;
    display: flex;
    flex-direction: column;
    width: min(100%, 440px);
    height: 100%;
    background: var(--cream);
    box-shadow: -30px 0 80px rgba(0, 30, 25, .25);
    transform: translateX(105%);
    visibility: hidden;
    transition: transform .4s var(--ease), visibility .4s var(--ease);
}
.cart.is-open { transform: translateX(0); visibility: visible; }
.cart__head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    padding: 24px 22px 16px;
    border-bottom: 1px solid rgba(0, 71, 61, .18);
}
.cart__eyebrow {
    font-size: 10px;
    font-weight: 800;
    letter-spacing: 2px;
    text-transform: uppercase;
    color: var(--accent);
}
.cart__head h2 {
    margin-top: 4px;
    font-size: 28px;
    font-weight: 900;
    line-height: 1;
    letter-spacing: .02em;
    text-transform: uppercase;
}
.cart__close {
    position: relative;
    width: 36px;
    height: 36px;
    padding: 0;
    border: 0;
    background: transparent;
}
.cart__close span {
    position: absolute;
    left: 4px;
    top: 17px;
    width: 28px;
    height: 2px;
    background: var(--green);
    transform: rotate(45deg);
}
.cart__close span:last-child { transform: rotate(-45deg); }
.cart__pickup {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    padding: 12px 22px;
    font-size: 12px;
    border-bottom: 1px solid rgba(0, 71, 61, .18);
}
.cart__pickup span {
    font-size: 10px;
    font-weight: 800;
    letter-spacing: 1.2px;
    text-transform: uppercase;
    opacity: .7;
}
.cart__pickup strong { font-weight: 800; }
.cart__items {
    flex: 1;
    overflow-y: auto;
    padding: 6px 22px 10px;
}
.cart-item {
    display: grid;
    grid-template-columns: 64px 1fr auto;
    gap: 12px;
    padding: 16px 0;
    border-bottom: 1px solid rgba(0, 71, 61, .18);
}
.cart-item__media img {
    width: 64px;
    height: 64px;
    object-fit: cover;
}
.cart-item__body { display: flex; flex-direction: column; gap: 4px; }
.cart-item__body h3 {
    font-size: 13px;
    font-weight: 800;
    line-height: 1.2;
    letter-spacing: .4px;
    text-transform: uppercase;
}
.cart-item__body > span {
    font-size: 13px;
    font-weight: 700;
}
.cart-item__qty {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    width: fit-content;
    margin-top: 4px;
    border: 1px solid rgba(0, 71, 61, .35);
    border-radius: 999px;
}
.cart-item__qty button {
    width: 26px;
    height: 26px;
    border: 0;
    background: transparent;
    font-size: 15px;
    font-weight: 700;
    line-height: 1;
}
.cart-item__qty span {
    min-width: 12px;
    font-size: 12px;
    font-weight: 800;
    text-align: center;
}
.cart-item__remove {
    align-self: flex-start;
    padding: 2px 0;
    border: 0;
    background: transparent;
    font-size: 10px;
    font-weight: 700;
    letter-spacing: .8px;
    text-transform: uppercase;
    text-decoration: underline;
    text-underline-offset: 3px;
    opacity: .65;
}
.cart__empty {
    display: none;
    padding: 40px 22px;
    font-family: var(--serif);
    font-size: 16px;
    text-align: center;
}
.cart.is-empty .cart__empty { display: block; }
.cart.is-empty .cart__items { display: none; }
.cart__foot {
    padding: 16px 22px 22px;
    border-top: 1px solid rgba(0, 71, 61, .18);
    background: var(--cream);
}
.cart__row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 3px 0;
    font-family: var(--serif);
    font-size: 14px;
}
.cart__row--total {
    margin-top: 6px;
    padding-top: 10px;
    border-top: 1px solid rgba(0, 71, 61, .18);
    font-family: var(--sans);
    font-size: 16px;
    font-weight: 800;
}
.cart__checkout { margin-top: 14px; min-height: 52px; padding: 18px 20px; font-size: 13px; }
.cart__note {
    margin-top: 10px;
    font-family: var(--serif);
    font-size: 11px;
    text-align: center;
    opacity: .7;
}

/* ---------- Checkout ---------------------------------------------------- */

.checkout {
    position: fixed;
    inset: 0;
    z-index: 3300;
    display: flex;
    align-items: flex-start;
    justify-content: center;
    padding: 20px 14px;
    overflow-y: auto;
    opacity: 0;
    visibility: hidden;
    transition: opacity .3s var(--ease), visibility .3s var(--ease);
}
.checkout.is-open { opacity: 1; visibility: visible; }
.checkout__backdrop {
    position: fixed;
    inset: 0;
    background: rgba(0, 71, 61, .62);
    backdrop-filter: blur(2px);
}
.checkout__dialog {
    position: relative;
    z-index: 1;
    width: min(100%, 560px);
    margin: auto;
    padding: 34px 20px 30px;
    background: var(--cream);
    border-radius: 8px;
    box-shadow: 0 30px 80px rgba(0, 30, 25, .35);
}
.checkout__close {
    position: absolute;
    top: 14px;
    right: 14px;
    width: 32px;
    height: 32px;
    padding: 0;
    border: 0;
    background: transparent;
}
.checkout__close span {
    position: absolute;
    left: 2px;
    top: 15px;
    width: 28px;
    height: 2px;
    background: var(--green);
    transform: rotate(45deg);
}
.checkout__close span:last-child { transform: rotate(-45deg); }
.checkout__eyebrow {
    font-size: 10px;
    font-weight: 800;
    letter-spacing: 2px;
    text-transform: uppercase;
    color: var(--accent);
    text-align: center;
}
.checkout__title {
    margin-top: 4px;
    font-size: 34px;
    font-weight: 900;
    line-height: 1;
    letter-spacing: .02em;
    text-align: center;
    text-transform: uppercase;
}
.checkout__sub {
    margin-top: 8px;
    font-family: var(--serif);
    font-size: 15px;
    text-align: center;
}
.checkout__form {
    display: flex;
    flex-direction: column;
    gap: 14px;
    margin-top: 22px;
}
.checkout__row { display: grid; grid-template-columns: 1fr; gap: 14px; }
.checkout__form textarea { min-height: 74px; border-radius: 20px; }
.checkout__summary {
    padding: 14px 16px;
    border: 1px solid rgba(0, 71, 61, .25);
    font-family: var(--serif);
    font-size: 14px;
}
.checkout__summary .summary-row {
    display: flex;
    justify-content: space-between;
    gap: 14px;
    padding: 3px 0;
}
.checkout__summary .summary-total {
    margin-top: 6px;
    padding-top: 8px;
    border-top: 1px solid rgba(0, 71, 61, .25);
    font-family: var(--sans);
    font-size: 15px;
    font-weight: 800;
}
.checkout__note {
    font-family: var(--serif);
    font-size: 11px;
    text-align: center;
    opacity: .7;
}
.checkout__success { text-align: center; }
.checkout__order-num {
    margin: 18px 0;
    padding: 14px;
    border: 1px dashed var(--green);
    font-size: 22px;
    font-weight: 900;
    letter-spacing: 2px;
}
.checkout__again {
    margin-top: 16px;
    border: 0;
    background: transparent;
    font-size: 11px;
    font-weight: 800;
    letter-spacing: 1px;
    text-transform: uppercase;
    text-decoration: underline;
    text-underline-offset: 4px;
}
.checkout__success[hidden] { display: none; }

@media (min-width: 768px) {
    .order-hero { padding: 46px 40px 40px; }
    .order-hero h1 { font-size: 52px; }
    .order-toolbar { padding: 12px 40px; }
    .order-cats { padding: 18px 40px 12px; gap: 26px; }
    .order-products-wrap { padding: 18px 40px 100px; }
    .order-product__body h3 { font-size: 15px; }
    .checkout__dialog { padding: 42px 40px 36px; }
    .checkout__row { grid-template-columns: 1fr 1fr; }
}

@media (min-width: 1100px) {
    .order-hero { padding: 54px 60px 48px; }
    .order-hero h1 { font-size: 58px; }
    .order-hero__sub { font-size: 17px; }
    .order-toolbar {
        top: var(--header-h);
        flex-direction: row;
        flex-wrap: wrap;
        align-items: center;
        justify-content: center;
        gap: 14px;
        padding: 14px 60px;
    }
    .order-pickup { width: auto; min-height: 48px; }
    .order-search { width: auto; flex: 0 1 320px; min-height: 48px; }
    .order-toolbar__actions { width: auto; margin-left: 0; justify-content: flex-end; }
    .order-toolbar__actions .order-signin,
    .order-toolbar__actions .order-cart-btn { flex: 0 0 auto; }
    .order-product__body > p { -webkit-line-clamp: 3; }
    .order-pickup { min-height: 48px; padding: 0 22px; }
    .order-pickup select { max-width: none; font-size: 13px; }
    .order-search { flex: 0 1 320px; min-height: 48px; }
    .order-signin, .order-cart-btn { min-height: 48px; padding: 0 22px; font-size: 12px; }
    .order-cats { justify-content: center; gap: 32px; padding: 20px 60px 14px; }
    .order-cat { font-size: 13px; }
    .order-products-wrap { padding: 24px 60px 110px; }
    .order-products { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 36px 24px; }
    .order-product__body h3 { font-size: 15px; }
    .order-product__body > p { font-size: 13px; }
    .cart { width: 440px; }
    .cart__head { padding: 28px 26px 18px; }
    .cart__items { padding: 6px 26px 10px; }
    .cart__foot { padding: 18px 26px 26px; }
}

/* Disabled checkout when the cart is empty */
.cart__checkout[disabled] {
    opacity: .42;
    cursor: not-allowed;
}
.cart__checkout[disabled]:hover { background: var(--green); }

@media (max-width: 359px) {
    .order-products { grid-template-columns: 1fr; }
}
@media (min-width: 900px) {
    .order-products { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 30px 18px; }
}

@media (max-width: 1099px) {
    .order-search input { font-size: 16px; }
    .order-pickup select { font-size: 16px; max-width: 175px; }
}
