.cart-backdrop {
    position: fixed;
    inset: 0;
    z-index: 180;
    background: rgba(27,17,10,.35);
    backdrop-filter: blur(5px);
}

.cart-panel {
    position: fixed;
    z-index: 190;
    top: 0;
    right: 0;
    width: min(470px, 100%);
    height: 100dvh;
    display: grid;
    grid-template-rows: auto 1fr auto;
    transform: translateX(102%);
    color: #211810;
    background: #fffdf9;
    box-shadow: -30px 0 90px rgba(31,19,10,.16);
    transition: transform .45s cubic-bezier(.16,1,.3,1);
}
.cart-panel.is-open { transform: translateX(0); }
body.cart-open { overflow: hidden; }

.cart-panel__head {
    min-height: 92px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 24px;
    border-bottom: 1px solid rgba(58,37,19,.13);
}
.cart-panel__head small {
    color: #806141;
    font-size: 7px;
    font-weight: 850;
    letter-spacing: .16em;
}
.cart-panel__head h2 {
    margin: 5px 0 0;
    font-family: Georgia, "Times New Roman", serif;
    font-size: 28px;
    font-weight: 400;
}
.cart-panel__head button {
    width: 40px;
    height: 40px;
    border: 1px solid rgba(58,37,19,.13);
    border-radius: 50%;
    color: #211810;
    background: transparent;
    font-size: 23px;
    cursor: pointer;
}

.cart-panel__body {
    overflow-y: auto;
    padding: 18px 24px;
}
.cart-empty {
    height: 100%;
    min-height: 330px;
    display: grid;
    place-content: center;
    justify-items: center;
    text-align: center;
}
.cart-empty > span {
    width: 74px;
    height: 74px;
    display: grid;
    place-items: center;
    border: 1px solid rgba(58,37,19,.13);
    border-radius: 50%;
    color: #806141;
    font-family: Georgia, "Times New Roman", serif;
    font-size: 22px;
}
.cart-empty h3 {
    margin: 22px 0 8px;
    font-family: Georgia, "Times New Roman", serif;
    font-size: 35px;
    font-weight: 400;
}
.cart-empty p {
    margin: 0;
    color: rgba(33,24,16,.57);
    font-size: 11px;
}

.cart-line {
    display: grid;
    grid-template-columns: 92px 1fr;
    gap: 15px;
    padding: 17px 0;
    border-bottom: 1px solid rgba(58,37,19,.13);
}
.cart-line__image {
    overflow: hidden;
    height: 112px;
    display: grid;
    place-items: center;
    border-radius: 13px;
    color: #211810;
    background: #f6f0e7;
    text-decoration: none;
}
.cart-line__image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}
.cart-line__copy {
    min-width: 0;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}
.cart-line__top {
    display: flex;
    justify-content: space-between;
    gap: 12px;
}
.cart-line__top a,
.cart-line__top span { display: block; }
.cart-line__top a {
    color: #211810;
    text-decoration: none;
    font-family: Georgia, "Times New Roman", serif;
    font-size: 18px;
}
.cart-line__top span {
    max-width: 180px;
    margin-top: 5px;
    color: rgba(33,24,16,.57);
    font-size: 8px;
    line-height: 1.4;
}
.cart-line__top strong {
    flex: 0 0 auto;
    font-size: 10px;
}
.cart-line__actions {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
}
.cart-line__qty {
    display: grid;
    grid-template-columns: 27px 28px 27px;
    align-items: center;
    border: 1px solid rgba(58,37,19,.13);
    border-radius: 999px;
}
.cart-line__qty button {
    height: 28px;
    border: 0;
    background: transparent;
    cursor: pointer;
}
.cart-line__qty span {
    text-align: center;
    font-size: 9px;
}
.cart-line__actions > button {
    border: 0;
    border-bottom: 1px solid rgba(58,37,19,.13);
    padding: 0 0 2px;
    color: rgba(33,24,16,.57);
    background: transparent;
    font-size: 8px;
    cursor: pointer;
}

.cart-panel__foot {
    padding: 20px 24px 24px;
    border-top: 1px solid rgba(58,37,19,.13);
}
.cart-subtotal {
    display: flex;
    justify-content: space-between;
    gap: 20px;
    font-family: Georgia, "Times New Roman", serif;
    font-size: 22px;
}
.cart-panel__foot p {
    margin: 9px 0 17px;
    color: rgba(33,24,16,.57);
    font-size: 8px;
}
.cart-checkout {
    width: 100%;
    min-height: 52px;
    border: 0;
    border-radius: 999px;
    color: #fff;
    background: #24160d;
    font-size: 10px;
    font-weight: 850;
    cursor: pointer;
}
.cart-checkout:disabled {
    cursor: not-allowed;
    opacity: .38;
}
.cart-toast {
    position: fixed;
    z-index: 220;
    left: 50%;
    bottom: 24px;
    transform: translate(-50%, 20px);
    min-width: 240px;
    padding: 13px 17px;
    border-radius: 999px;
    color: #fff;
    background: rgba(36,22,13,.92);
    backdrop-filter: blur(10px);
    text-align: center;
    font-size: 9px;
    opacity: 0;
    pointer-events: none;
    transition: opacity .25s ease, transform .25s cubic-bezier(.16,1,.3,1);
}
.cart-toast.is-visible {
    opacity: 1;
    transform: translate(-50%, 0);
}


/* Phase 1.4 — optional Pawline account before checkout */
.cart-account-nudge {
    margin: 14px 0 16px;
    padding: 13px 14px;
    border: 1px solid rgba(58,37,19,.12);
    border-radius: 14px;
    background: rgba(255,255,255,.42);
}

.cart-account-nudge__status {
    display: flex;
    align-items: center;
    gap: 7px;
    color: #211810;
    font-size: 8px;
    font-weight: 850;
    letter-spacing: .06em;
    text-transform: uppercase;
}

.cart-account-nudge__status i {
    width: 7px;
    height: 7px;
    flex: 0 0 auto;
    border-radius: 50%;
    background: #3f8c50;
    box-shadow: 0 0 0 3px rgba(63,140,80,.08);
}

.cart-account-nudge small {
    display: block;
    margin-top: 7px;
    color: rgba(33,24,16,.58);
    font-size: 8px;
    line-height: 1.55;
}

.cart-account-nudge a {
    color: #211810;
    font-weight: 800;
    text-underline-offset: 2px;
}
