/* Cart / My Bag page */
.cart-page {
    --cart-ink: #1d1d1d;
    --cart-pink: #ec6b81;
    --cart-rule: rgba(214, 214, 214, 1);
    background:
        radial-gradient(ellipse 70% 45% at 8% 0%, rgba(236, 107, 129, 0.07), transparent 55%),
        #fff;
    padding: 48px 0 90px;
}

/* Kill Argima `section .container` 82px vertical padding — .cart-page owns spacing */
.cart-page > .container {
    padding-top: 0;
    padding-bottom: 0;
}

.cart-page__header {
    margin: 0 0 36px;
}

.cart-page__eyebrow {
    margin: 0 0 8px;
    font-family: 'Montserrat', 'Poppins', sans-serif;
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 0.16em;
    text-transform: uppercase;
    color: var(--cart-pink);
}

.cart-page__title {
    margin: 0;
    font-family: 'Montserrat', 'Poppins', sans-serif;
    font-size: 28px;
    font-weight: 500;
    letter-spacing: 0.02em;
    line-height: 1.2;
    color: var(--cart-ink);
    text-transform: uppercase;
}

.cart-page__count {
    font-size: 0.55em;
    font-weight: 500;
    letter-spacing: 0.04em;
    color: var(--cart-pink);
    vertical-align: middle;
}

.cart-empty {
    padding: 64px 0 40px;
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.cart-empty__visual {
    margin-bottom: 20px;
    opacity: 0.95;
}

.cart-empty__message {
    margin: 0 0 8px;
    font-family: 'Montserrat', 'Poppins', sans-serif;
    font-size: 18px;
    font-weight: 500;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: #111;
}

.cart-empty__hint {
    margin: 0 0 28px;
    max-width: 320px;
    font-size: 14px;
    font-weight: 300;
    line-height: 1.5;
    color: #777;
}

.cart-empty .cart-summary__btn {
    width: auto;
    min-width: 220px;
    margin: 0;
}

.cart-line--removing {
    opacity: 0;
    transform: translateX(-8px);
    transition: opacity 0.18s ease, transform 0.18s ease;
}

/* Line brand + mobile price (hidden on desktop) */
.cart-line__brand {
    display: none;
    margin: 0 0 6px;
    font-size: 10px;
    font-weight: 400;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--cart-pink, #ec6b81);
}

.cart-line__title-row {
    display: block;
}

.cart-line__line-total--mobile {
    display: none;
}

.cart-line__line-total--mobile .js-cart-line-subtotal {
    font-size: 14px;
    font-weight: 400;
    color: #000;
}

.cart-qty {
    position: relative;
}

.cart-summary__count-mobile {
    display: none;
}

.cart-page__layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(280px, 380px);
    gap: 40px 48px;
    align-items: start;
}

/* —— Line items table —— */
.cart-table__head {
    display: grid;
    grid-template-columns: minmax(0, 2.2fr) 1fr minmax(72px, 96px) 1fr 44px;
    gap: 12px 16px;
    align-items: end;
    padding: 0 0 14px;
    border-bottom: 1px solid var(--cart-rule);
    font-size: 11px;
    font-weight: 400;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: #000;
}

.cart-table__head-actions {
    justify-self: end;
}

/* Same element carries .cart-table__head + .cart-table__head--mobile — override grid from block above */
.cart-table__head.cart-table__head--mobile {
    display: none;
}

@media (min-width: 768px) {
    .cart-table__head.cart-table__head--mobile {
        display: none !important;
    }
}

.cart-line {
    display: grid;
    grid-template-columns: minmax(0, 2.2fr) 1fr minmax(72px, 96px) 1fr 44px;
    gap: 12px 16px;
    align-items: center;
    padding: 16px 0;
    border-bottom: 1px solid var(--cart-rule);
}

.cart-line__product {
    display: flex;
    align-items: center;
    gap: 18px;
    min-width: 0;
}

/* Same light circle behind image as home Best Sellers (.product-card::before) */
.cart-line__thumb {
    flex-shrink: 0;
    width: 100px;
    height: 100px;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    background: transparent;
}

.cart-line__thumb::before {
    content: '';
    position: absolute;
    left: 50%;
    top: 52%;
    transform: translate(-50%, -50%);
    width: 72px;
    height: 72px;
    background-color: #fafafa;
    border-radius: 50%;
    z-index: 0;
}

.cart-line__thumb img {
    position: relative;
    z-index: 1;
    max-width: 98%;
    max-height: 98%;
    width: auto;
    height: auto;
    object-fit: contain;
}

.cart-line__thumb-placeholder {
    position: relative;
    z-index: 1;
    display: block;
    width: 100%;
    height: 100%;
}

.cart-line__name {
    font-size: 15px;
    font-weight: 500;
    line-height: 1.25;
    color: #000;
    text-decoration: none;
}

.cart-line__name--secondary {
    display: block;
    text-decoration: none;
    pointer-events: none;
}

.cart-line__name:hover {
    color: var(--cart-pink, #ec6b81);
}

.cart-line__unit,
.cart-line__subtotal {
    font-size: 14px;
    font-weight: 300;
    color: #000;
}

.cart-line__mobile-label {
    display: none;
}

.cart-line__qty-cell {
    justify-self: center;
}

.cart-line__remove-wrap {
    justify-self: end;
}

.cart-line__remove {
    width: 38px;
    height: 38px;
    border-radius: 50%;
    border: 0px solid var(--cart-rule);
    background: #fff;
    color: #888;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    cursor: pointer;
    transition: color 0.2s ease, border-color 0.2s ease, background 0.2s ease;
}

.cart-line__remove:hover:not(:disabled) {
    color: var(--cart-pink, #ec6b81);
    border-color: var(--cart-rule);
    background: #fafafa;
}

.cart-line__remove:disabled,
.cart-line__remove.is-loading {
    opacity: 0.65;
    cursor: wait;
}

/* Quantity — native select */
.cart-qty {
    width: 100%;
    max-width: 88px;
    text-align: left;
}

.cart-qty__select {
    width: 100%;
    padding: 7px 38px 6px 12px;
    font-size: 13px;
    font-weight: 400;
    color: #222;
    border: 1px solid var(--cart-rule);
    border-radius: 5px;
    background-color: #fff;
    cursor: pointer;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6' viewBox='0 0 10 6'%3E%3Cpath fill='%23666' d='M1 1l4 4 4-4'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 10px center;
    text-align: center;
}

.cart-qty__select:focus {
    outline: none;
    border-color: var(--cart-pink, #ec6b81);
    box-shadow: 0 0 0 1px rgba(236, 107, 129, 0.25);
}

/* —— Sidebar cards —— */
.cart-card {
    border: 1px solid var(--cart-rule);
    border-radius: 5px;
    background: #fff;
    padding: 27px 31px 26px;
}

.cart-card--promo {
    margin-bottom: 20px;
}

.cart-card__title {
    margin: 0;
    padding-bottom: 23px;
    margin-bottom: 10px;
    font-size: 18px;
    font-weight: 500;
    letter-spacing: 0;
    text-transform: uppercase;
    color: #000;
    border-bottom: 1px solid var(--cart-rule);
}

.cart-card--promo .cart-promo-acc {
    margin-top: 4px;
}

.cart-promo-acc__item {
    border-bottom: 1px solid var(--cart-rule);
}

.cart-promo-acc__item:last-child {
    border-bottom: 0;
}

.cart-promo-acc__toggle {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 15px 0;
    border: 0;
    background: transparent;
    font-size: 16px;
    font-weight: 300;
    letter-spacing: 0;
    text-transform: none;
    color: #000;
    text-align: left;
    cursor: pointer;
}

.cart-promo-acc__chev {
    font-size: 10px;
    color: #999;
    transition: transform 0.25s ease;
    flex-shrink: 0;
}

.cart-promo-acc__toggle:not(.collapsed) .cart-promo-acc__chev {
    transform: rotate(180deg);
}

.cart-promo-acc__panel {
    padding: 0 0 26px;
    width: 100%;
}

/* Promo row: input + nested APPLY */
.cart-promo-combo {
    display: flex;
    align-items: center;
    width: 100%;
    border: 1px solid var(--cart-rule);
    border-radius: 5px;
    background: #fff;
    box-sizing: border-box;
    padding: 0px 2px 0px 0;
    margin-top: 2px;
    transition: box-shadow 0.2s ease;
}

.cart-promo-combo:focus-within {
    box-shadow: 0 0 0 1px rgba(43, 58, 103, 0.2);
}

.cart-promo-combo__input {
    flex: 1;
    min-width: 0;
    border: 0;
    background: transparent;
    padding: 15px 10px 15px 26px;
    font-family: 'Montserrat', sans-serif;
    font-size: 14px;
    font-weight: 300;
    color: #333;
}

.cart-promo-combo__input::placeholder {
    color: #b8b8b8;
    font-weight: 300;
}

.cart-promo-combo__input:focus {
    outline: none;
}

.cart-promo-combo__apply {
    flex-shrink: 0;
    margin: 0 0px 0 4px;
    padding: 14px 30px;
    border: 0;
    border-radius: 5px;
    background: #8c7b60;
    color: #fff;
    font-family: 'Montserrat', sans-serif;
    font-size: 13px;
    font-weight: 400;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    cursor: pointer;
    transition: filter 0.2s ease, background 0.2s ease;
}

.cart-promo-combo__apply:hover {
    filter: brightness(1.07);
    color: #fff;
}

.cart-promo-acc__hint {
    margin: 0;
    font-size: 13px;
    color: #666;
    line-height: 1.45;
}

.cart-promo-acc__error {
    margin: 10px 0 0;
    font-size: 13px;
    color: #b42318;
    line-height: 1.45;
}

.cart-promo-applied {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 12px 14px;
    border: 1px solid #dbeafe;
    border-radius: 5px;
    background: #eff6ff;
}

.cart-promo-applied__chip {
    display: flex;
    flex-direction: column;
    gap: 2px;
    min-width: 0;
}

.cart-promo-applied__label {
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: #64748b;
}

.cart-promo-applied__code {
    font-size: 14px;
    font-weight: 700;
    color: #1d4ed8;
    letter-spacing: 0.04em;
}

.cart-promo-applied__remove {
    flex-shrink: 0;
    border: 0;
    background: transparent;
    padding: 0;
    font-size: 13px;
    font-weight: 600;
    color: #1d4ed8;
    text-decoration: underline;
    cursor: pointer;
}

/* Summary */
.cart-summary__head {
    display: flex;
    align-items: baseline;
    justify-content: flex-start;
    flex-wrap: wrap;
    gap: 8px 12px;
    margin-bottom: 18px;
    padding-bottom: 23px;
    border-bottom: 1px solid var(--cart-rule);
}

.cart-summary__title {
    margin: 0;
    font-size: 18px;
    font-weight: 500;
    letter-spacing: 0;
    text-transform: uppercase;
    color: #000;
}

.cart-summary__count {
    font-size: 14px;
    color: var(--cart-pink, #ec6b81);
    font-weight: 500;
}

.cart-summary__rows {
    margin: 0 0 12px;
}

.cart-summary__row {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    gap: 16px;
    margin: 0 0 24px;
    font-size: 13px;
}

.cart-summary__row dt {
    margin: 0;
    font-weight: 300;
    color: #555;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    font-size: 13px;
}

.cart-summary__row dd {
    margin: 0;
    font-weight: 300;
    color: #222;
    font-size: 16px;
}

.cart-summary__row--total {
    margin-top: 16px;
    padding-top: 18px;
    border-top: 1px solid var(--cart-rule);
    border-bottom: 1px solid var(--cart-rule);
    padding-bottom: 17px;
}

.cart-summary__row--total dt {
    font-size: 14px;
    font-weight: 300;
    color: #000;
}

.cart-summary__row--total dd {
    font-size: 16px;
    font-weight: 600;
    color: #000;
}

.cart-summary__tax-note-inline {
    font-weight: 300;
    text-transform: lowercase;
    letter-spacing: 0;
    color: #000;
}

.cart-summary__pending {
    color: #888;
    font-weight: 300;
    text-transform: none;
    letter-spacing: 0;
}

.cart-summary__footnote {
    font-size: 13px;
    line-height: 1.45;
    color: #888;
    margin: 0 0 20px;
    text-align: left;
}

/* Match My Account primary / outline buttons */
.cart-page .cart-summary__btn {
    font-family: 'Montserrat', sans-serif;
    font-weight: 500;
    font-size: 14px;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    line-height: 1.25;
    border-radius: 5px;
    padding: 14px 17px;
    width: 100%;
    max-width: 100%;
    min-width: 0;
    margin: 0 0 12px;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    box-sizing: border-box;
    transition: background 0.2s ease, border-color 0.2s ease, color 0.2s ease;
}

.cart-page .cart-summary__btn:last-child {
    margin-bottom: 0;
}

.cart-page .cart-summary__btn--primary {
    background: var(--cart-pink, #ec6b81);
    color: #fff;
    border: 1px solid var(--cart-pink, #ec6b81);
}

.cart-page .cart-summary__btn--primary:hover {
    background: #fff;
    border-color: var(--cart-pink, #ec6b81);
    color: var(--cart-pink, #ec6b81);
}

.cart-page .cart-summary__btn--primary:active {
    background: #fff5f7;
    border-color: var(--cart-pink, #ec6b81);
    color: var(--cart-pink, #ec6b81);
}

.cart-page .cart-summary__btn--primary:focus-visible {
    outline: 2px solid var(--cart-pink, #ec6b81);
    outline-offset: 3px;
}

.cart-page .cart-summary__btn--outline {
    background: #fff;
    color: var(--cart-ink, #1d1d1d);
    border: 1px solid var(--cart-ink, #1d1d1d);
}

.cart-page .cart-summary__btn--outline:hover {
    background: var(--cart-ink, #1d1d1d);
    color: #fff;
    border-color: var(--cart-ink, #1d1d1d);
}

.cart-page .cart-summary__btn--outline:active {
    background: #111;
    border-color: #111;
    color: #fff;
}

.cart-page .cart-summary__btn--outline:focus-visible {
    outline: 2px solid var(--cart-ink, #1d1d1d);
    outline-offset: 3px;
}

/* —— You may also like (same title treatment as product-detail “Complete the routine”) —— */
.cart-rec {
    margin-top: 72px;
    padding: 0 0 8px;
}

.cart-rec .product-detail-routine-head {
    margin-bottom: 36px;
}

.cart-rec .product-detail-routine-yaf-img {
    position: absolute;
    top: -25px;
    left: -34px;
    height: 46px;
    width: auto;
    z-index: 0;
    opacity: 1;
    pointer-events: none;
    user-select: none;
}

.cart-rec .product-detail-routine-title {
    z-index: 1;
    font-size: 25px;
    font-weight: 500 !important;
    letter-spacing: 0.02em;
    line-height: 1.2;
    color: #000;
}

.cart-rec__grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 12px;
    width: 100%;
    align-items: stretch;
}

.cart-rec__grid .card-col {
    display: block;
    width: auto;
    min-width: 0;
    max-width: none;
    margin: 0;
}

.cart-rec__grid .product-card {
    height: 100%;
    padding: 12px 14px 16px;
}

.cart-rec__grid .product-card::before {
    content: none;
    display: none;
}

.cart-rec__grid .product-img,
.cart-rec__grid .product-listing-card__thumb-placeholder {
    display: block;
    width: 100%;
    height: 250px;
    object-fit: contain;
}

.cart-rec__grid .badge-circle {
    top: 20px;
    right: 20px;
    left: auto;
    bottom: auto;
}

.cart-rec__grid .product-card h5 {
    font-size: 17px;
    font-weight: 500;
    line-height: 1.25;
}

@media (max-width: 991px) {
    .cart-rec__grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 14px 10px;
    }
}

@media (max-width: 991px) {
    .cart-page__layout {
        grid-template-columns: 1fr;
    }

    .cart-page__aside {
        max-width: 520px;
    }
}

@media (max-width: 767px) {
    .cart-page {
        padding: 0 0 64px;
    }

    .cart-table__head.cart-table__head--desktop {
        display: none !important;
    }

    .cart-table__head.cart-table__head--mobile {
        display: grid !important;
        grid-template-columns: 1fr 1fr;
        gap: 12px 16px;
        align-items: end;
        padding: 12px 16px;
        margin: 0;
        border-bottom: 1px solid var(--cart-rule);
        background: rgba(245, 245, 245, 1);
        font-size: 11px;
        font-weight: 400;
        letter-spacing: 0.1em;
        text-transform: uppercase;
        color: #555;
    }

    .cart-table__head.cart-table__head--mobile span:last-child {
        text-align: right;
    }

    /* Row: [thumb] | brand / name / qty (select) | price + remove */
    .cart-line {
        display: grid;
        grid-template-columns: 76px minmax(0, 1fr) max-content;
        grid-template-rows: auto auto auto;
        column-gap: 14px;
        row-gap: 8px;
        align-items: start;
        padding: 20px 0 22px;
        margin: 0;
        border-bottom: 1px solid var(--cart-rule);
        position: relative;
    }

    .cart-line__product {
        display: contents;
    }

    .cart-line__thumb {
        grid-column: 1;
        grid-row: 1 / span 3;
        width: 76px;
        height: 76px;
        align-self: start;
        justify-self: center;
    }

    .cart-line__thumb::before {
        width: 56px;
        height: 56px;
    }

    .cart-line__product-text {
        display: contents;
    }

    .cart-line__brand {
        display: block;
        grid-column: 2;
        grid-row: 1;
        margin: 0;
        padding-top: 2px;
    }

    .cart-line__title-row {
        display: contents;
    }

    .cart-line__name {
        grid-column: 2;
        grid-row: 2;
        margin: 0;
        font-size: 14px;
        font-weight: 600;
        line-height: 1.35;
        align-self: start;
    }

    .cart-line__line-total--mobile {
        display: block;
        grid-column: 3;
        grid-row: 1;
        justify-self: end;
        align-self: start;
        padding-top: 2px;
        text-align: right;
    }

    .cart-line__unit,
    .cart-line__subtotal {
        display: none !important;
    }

    .cart-line__qty-cell {
        grid-column: 2;
        grid-row: 3;
        margin: 0;
        padding: 0;
        justify-self: start;
        align-self: end;
        width: 100%;
        max-width: 112px;
    }

    .cart-line__mobile-label {
        display: none !important;
    }

    .cart-line__remove-wrap {
        grid-column: 3;
        grid-row: 3;
        justify-self: end;
        align-self: end;
        position: static;
    }

    .cart-line__remove {
        width: 40px;
        height: 40px;
        padding: 0;
        border-radius: 50%;
        border: 1px solid var(--cart-rule);
        background: #fff;
        color: #222;
        font-size: 1rem;
    }

    .cart-qty {
        max-width: 112px;
        width: 100%;
    }

    .cart-qty__select {
        position: static;
        width: 100%;
        opacity: 1;
        pointer-events: auto;
        clip: auto;
        margin: 0;
        padding: 8px 32px 8px 12px;
        min-height: 40px;
        font-size: 13px;
        border-radius: 5px;
    }

    .cart-summary__title {
        letter-spacing: 0.06em;
    }

    .cart-summary__count-desktop {
        display: none !important;
    }

    .cart-summary__count-mobile {
        display: inline;
        font-size: 13px;
        font-weight: 500;
        letter-spacing: 0.06em;
        text-transform: uppercase;
        color: var(--cart-pink, #ec6b81);
    }

    .cart-card__title {
        letter-spacing: 0.04em;
    }

    /* Narrow phones: 2×2 grid stays (see max-width 991); slightly shorter images so cards fit */
    .cart-rec__grid .product-img,
    .cart-rec__grid .product-listing-card__thumb-placeholder {
        height: min(220px, 42vw);
    }
}

@media (max-width: 575px) {
    .cart-page__title {
        font-size: 22px;
    }
}
