/* =====================================================
   CART LAYER
===================================================== */

.cart-panel {
    display: flex;
    flex-direction: column;
}

.cart-head {
    flex-shrink: 0;
}

.cart-empty {
    padding: 48px 24px;
    color: #777;
    font-size: 15px;
    text-align: center;
}

.cart-content {
    display: flex;
    flex: 1;
    min-height: 0;
    flex-direction: column;
}

.cart-items {
    flex: 1;
    min-height: 0;
    overflow-y: auto;
    padding: 8px 18px 18px;
}

.cart-item {
    display: grid;
    grid-template-columns: 82px minmax(0, 1fr);
    gap: 14px;
    padding: 14px 0;
    border-bottom: 1px solid rgba(0, 0, 0, .08);
}

.cart-item__photo {
    width: 82px;
    height: 112px;
    overflow: hidden;
    border-radius: 14px;
    background: #f4f4f4;
}

.cart-item__photo img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.cart-item__body {
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.cart-item__name {
    color: #111;
    font-size: 14px;
    line-height: 1.25;
    text-decoration: none;
}

.cart-item__meta {
    color: #777;
    font-size: 13px;
}

.cart-item__prices {
    display: flex;
    gap: 12px;
    align-items: baseline;
    font-size: 14px;
}

.cart-item__price {
    font-weight: 600;
}

.cart-item__compare {
    color: #888;
}

.cart-item__bottom {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-top: auto;
}

.cart-qty {
    display: inline-flex;
    align-items: center;
    height: 34px;
    border: 1px solid rgba(0, 0, 0, .12);
    border-radius: 999px;
    overflow: hidden;
}

.cart-qty button {
    width: 34px;
    height: 34px;
    border: 0;
    background: transparent;
    font-size: 18px;
    line-height: 1;
}

.cart-qty span {
    min-width: 28px;
    text-align: center;
    font-size: 14px;
}

.cart-remove {
    border: 0;
    background: transparent;
    color: #777;
    font-size: 13px;
    padding: 6px 0;
}

.cart-summary {
    flex-shrink: 0;
    padding: 16px 18px calc(18px + env(safe-area-inset-bottom));
    border-top: 1px solid rgba(0, 0, 0, .08);
    background: #fff;
}

.cart-summary__row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 14px;
    font-size: 15px;
}

.cart-summary__row strong {
    font-size: 17px;
}

.cart-checkout {
    width: 100%;
    height: 48px;
    border: 0;
    border-radius: 999px;
    background: #111;
    color: #fff;
    font-size: 14px;
    font-weight: 600;
}

.cart-count {
    display: none;
}

.cart-count.is-visible {
    display: inline-flex;
}


/* =====================================================
   CART BADGES
===================================================== */

.dock-badge[hidden],
.small-badge[hidden] {
    display: none !important;
}

.dock-badge.is-visible,
.small-badge.is-visible {
    display: inline-flex;
}

.dock-badge.is-bump,
.small-badge.is-bump {
    animation: cartBadgeBump .28s ease;
}

@keyframes cartBadgeBump {
    0% {
        transform: scale(1);
    }

    45% {
        transform: scale(1.22);
    }

    100% {
        transform: scale(1);
    }
}


/* =====================================================
   CART POLISH
===================================================== */

.cart-head {
    position: relative;
}

.cart-clear {
    position: absolute;
    right: 18px;
    top: 50%;
    transform: translateY(-50%);

    border: 0;
    background: transparent;
    color: #777;

    font-size: 13px;
    padding: 8px 0;
}

.cart-clear[hidden] {
    display: none !important;
}

.cart-empty {
    display: flex;
    min-height: 360px;
    padding: 48px 28px;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    text-align: center;
}

.cart-empty__icon {
    width: 58px;
    height: 58px;
    margin-bottom: 18px;

    display: flex;
    align-items: center;
    justify-content: center;

    border-radius: 50%;
    background: #f5f5f5;
}

.cart-empty__icon svg {
    width: 28px;
    height: 28px;
    fill: none;
    stroke: #111;
    stroke-width: 1.8;
}

.cart-empty h3 {
    margin: 0 0 8px;
    color: #111;
    font-size: 18px;
    font-weight: 500;
}

.cart-empty p {
    max-width: 260px;
    margin: 0;
    color: #777;
    font-size: 14px;
    line-height: 1.45;
}

.cart-empty__button {
    height: 42px;
    margin-top: 24px;
    padding: 0 22px;

    border: 1px solid rgba(0, 0, 0, .16);
    border-radius: 999px;
    background: #fff;
    color: #111;

    font-size: 14px;
}

.cart-summary__row--total {
    padding-top: 12px;
    margin-top: 10px;
    border-top: 1px solid rgba(0, 0, 0, .08);
}

.cart-summary__row--total span,
.cart-summary__row--total strong {
    font-size: 18px;
}

.cart-continue {
    width: 100%;
    height: 42px;
    margin-top: 10px;

    border: 0;
    background: transparent;
    color: #555;

    font-size: 14px;
}

.cart-layer [hidden] {
    display: none !important;
}


/* =====================================================
   CART CHECKOUT VIEW
===================================================== */

.cart-checkout-view[hidden] {
    display: none !important;
}

.cart-checkout-view {
    flex: 1;
    min-height: 0;
    overflow-y: auto;
    padding: 18px;
}

.cart-checkout-form {
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.cart-field {
    display: flex;
    flex-direction: column;
    gap: 7px;
}

.cart-field span {
    color: #555;
    font-size: 13px;
}

.cart-field input,
.cart-field select,
.cart-field textarea {
    width: 100%;
    min-height: 46px;
    border: 1px solid rgba(0, 0, 0, .14);
    border-radius: 14px;
    background: #fff;
    color: #111;
    padding: 0 14px;
    font-size: 16px;
    outline: none;
}

.cart-field textarea {
    min-height: 92px;
    padding-top: 12px;
    resize: vertical;
}

.cart-field input:focus,
.cart-field select:focus,
.cart-field textarea:focus {
    border-color: #111;
}

.cart-checkout-total {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-top: 8px;
    padding-top: 16px;
    border-top: 1px solid rgba(0, 0, 0, .08);
}

.cart-checkout-total span {
    font-size: 16px;
}

.cart-checkout-total strong {
    font-size: 20px;
}

.cart-submit {
    width: 100%;
    height: 48px;
    border: 0;
    border-radius: 999px;
    background: #111;
    color: #fff;
    font-size: 14px;
    font-weight: 600;
}

.cart-back-to-items {
    width: 100%;
    height: 42px;
    border: 0;
    background: transparent;
    color: #555;
    font-size: 14px;
}