.header-cart-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 7px;
    min-height: 44px;
    border: 2px solid rgba(0, 0, 0, 0.72);
    border-radius: 12px;
    padding: 8px 11px;
    color: var(--black);
    font-size: 14px;
    font-weight: 950;
    white-space: nowrap;
}

.header-cart-link strong {
    min-width: 22px;
    height: 22px;
    display: inline-grid;
    place-items: center;
    border-radius: 999px;
    background: var(--black);
    color: var(--white);
    font-size: 11px;
}

.header-cart-link.active,
.header-cart-link:hover {
    background: #fff4b8;
}

@media (min-width: 1081px) {
    .header-cart-link {
        min-width: 46px;
        padding-inline: 9px;
    }

    .header-cart-text {
        display: none;
    }
}

.public-cart-page {
    min-height: 70vh;
    padding: 54px 0 72px;
    background: #f6f6f6;
}

.public-cart-heading {
    display: flex;
    align-items: end;
    justify-content: space-between;
    gap: 24px;
    margin-bottom: 24px;
}

.public-cart-heading span {
    color: #7b6200;
    font-size: 13px;
    font-weight: 950;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.public-cart-heading h1 {
    margin: 5px 0 8px;
    font-size: clamp(38px, 6vw, 64px);
    line-height: 1;
}

.public-cart-heading p,
.public-cart-checkout > p {
    max-width: 720px;
    color: var(--muted);
    line-height: 1.5;
}

.public-cart-feedback {
    margin-bottom: 20px;
    border-radius: 16px;
    padding: 16px 18px;
    line-height: 1.45;
}

.public-cart-feedback.success {
    border: 1px solid #91d7ae;
    background: #eaf9f0;
    color: #145c31;
}

.public-cart-feedback.error {
    border: 1px solid #efaaaa;
    background: #fff0f0;
    color: #842727;
}

.public-cart-feedback ul {
    margin: 8px 0 0 20px;
}

.public-cart-layout {
    display: grid;
    grid-template-columns: minmax(0, 1.55fr) minmax(320px, 0.75fr);
    align-items: start;
    gap: 24px;
}

.public-cart-items-panel,
.public-cart-checkout {
    border: 1px solid var(--gray-2);
    border-radius: 24px;
    background: var(--white);
    box-shadow: 0 16px 38px rgba(0, 0, 0, 0.07);
}

.public-cart-items-panel {
    padding: 22px;
}

.public-cart-items-heading {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 16px;
}

.public-cart-items-heading button {
    border: 0;
    background: transparent;
    color: #9a2525;
    cursor: pointer;
    font: inherit;
    font-size: 13px;
    font-weight: 850;
    text-decoration: underline;
}

.public-cart-items {
    display: grid;
    gap: 12px;
}

.public-cart-item {
    display: grid;
    grid-template-columns: 94px minmax(0, 1fr) auto;
    align-items: center;
    gap: 16px;
    border: 1px solid #e5e7eb;
    border-radius: 18px;
    padding: 12px;
}

.public-cart-item-media {
    width: 94px;
    height: 94px;
    display: grid;
    place-items: center;
    overflow: hidden;
    border-radius: 13px;
    background: #f3f4f6;
    font-size: 36px;
}

.public-cart-item-media img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.public-cart-item-content {
    min-width: 0;
}

.public-cart-item-content h3,
.public-cart-item-content p {
    overflow-wrap: anywhere;
}

.public-cart-item-content h3 {
    margin-bottom: 4px;
    font-size: 18px;
}

.public-cart-item-content strong {
    display: block;
    color: #6e5800;
    font-size: 14px;
}

.public-cart-item-content p {
    margin: 5px 0;
    color: var(--muted);
    font-size: 13px;
    line-height: 1.35;
}

.public-cart-item-content small {
    font-weight: 850;
}

.public-cart-item-controls {
    display: grid;
    gap: 8px;
    justify-items: end;
}

.public-cart-item-controls label {
    display: grid;
    gap: 4px;
    color: var(--muted);
    font-size: 11px;
    font-weight: 900;
    text-transform: uppercase;
}

.public-cart-item-controls input {
    width: 84px;
    min-height: 42px;
    border: 1px solid #cbd5e1;
    border-radius: 10px;
    padding: 8px;
    font: inherit;
    font-size: 16px;
    font-weight: 850;
}

.public-cart-item-controls button {
    border: 0;
    background: transparent;
    color: #9a2525;
    cursor: pointer;
    font: inherit;
    font-size: 12px;
    font-weight: 850;
}

.public-cart-empty {
    display: grid;
    justify-items: center;
    gap: 10px;
    padding: 48px 20px;
    text-align: center;
}

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

.public-cart-empty > span {
    font-size: 48px;
}

.public-cart-empty p {
    max-width: 480px;
    color: var(--muted);
    line-height: 1.45;
}

.public-cart-checkout {
    position: sticky;
    top: 110px;
    padding: 24px;
}

.public-cart-checkout form,
.public-cart-checkout label {
    display: grid;
    gap: 8px;
}

.public-cart-checkout form {
    gap: 15px;
    margin-top: 20px;
}

.public-cart-checkout label {
    font-size: 13px;
    font-weight: 850;
}

.public-cart-checkout label small {
    color: var(--muted);
    font-weight: 650;
}

.public-cart-checkout input {
    width: 100%;
    min-height: 48px;
    border: 1px solid #cbd5e1;
    border-radius: 12px;
    padding: 10px 12px;
    font: inherit;
    font-size: 16px;
}

.public-cart-checkout-actions {
    display: grid;
    gap: 9px;
    margin-top: 4px;
}

.public-cart-checkout-actions button,
.public-cart-whatsapp {
    min-height: 48px;
    justify-content: center;
    border-radius: 13px;
    cursor: pointer;
    font: inherit;
    font-weight: 900;
    text-align: center;
}

.public-cart-checkout-actions button:disabled {
    cursor: not-allowed;
    opacity: 0.45;
}

.public-cart-whatsapp {
    display: inline-flex;
    align-items: center;
    padding: 12px;
    background: #25d366;
    color: #fff;
}

.public-cart-privacy {
    color: var(--muted);
    line-height: 1.4;
}

@media (max-width: 1080px) {
    .header-cart-link {
        width: 100%;
        min-height: 48px;
    }
}

@media (max-width: 820px) {
    .public-cart-heading {
        align-items: stretch;
        flex-direction: column;
    }

    .public-cart-layout {
        grid-template-columns: 1fr;
    }

    .public-cart-checkout {
        position: static;
    }
}

@media (max-width: 560px) {
    .public-cart-page {
        padding: 34px 0 52px;
    }

    .public-cart-items-panel,
    .public-cart-checkout {
        border-radius: 18px;
        padding: 15px;
    }

    .public-cart-item {
        grid-template-columns: 72px minmax(0, 1fr);
        align-items: start;
        gap: 11px;
    }

    .public-cart-item-media {
        width: 72px;
        height: 72px;
    }

    .public-cart-item-controls {
        grid-column: 1 / -1;
        display: flex;
        align-items: end;
        justify-content: space-between;
    }

    .product-variant-thumbnails {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}
