.bag {
    width: min(100% - 2rem, var(--max));
    margin-inline: auto;
    padding: 1.5rem 0 3rem;
    color: var(--navy);
}

.bag-head { margin-bottom: 1.25rem; }

.bag-head .sec-kicker { margin-bottom: 0.75rem; }

.bag-title {
    margin: 0 0 0.4rem;
    font-size: clamp(1.9rem, 1.2rem + 3vw, 3.2rem);
    font-weight: 700;
    letter-spacing: -0.035em;
    line-height: 1.05;
}

.bag-intro {
    max-width: 36rem;
    margin: 0;
    color: var(--muted);
    font-size: 0.92rem;
}

.bag-pill {
    gap: 0.5rem;
    padding: 0.85rem 1.35rem;
    border-radius: 999px;
    box-shadow: 0 12px 24px -14px rgba(248, 103, 34, 0.9);
    transition: background-color 0.35s ease;
}

.bag-pill:hover,
.bag-pill:focus-visible { background: var(--navy); }

.bag-link {
    color: var(--navy);
    font-size: 0.82rem;
    font-weight: 700;
    text-underline-offset: 0.35em;
}

.bag-empty {
    display: grid;
    justify-items: center;
    gap: 0.5rem;
    padding: 2.5rem 1.25rem;
    border-radius: 1.25rem;
    background: var(--white);
    text-align: center;
}

.bag-empty-icon {
    display: grid;
    place-items: center;
    width: 5rem;
    height: 5rem;
    margin-bottom: 0.5rem;
    border-radius: 50%;
    background: rgba(248, 103, 34, 0.1);
    color: var(--orange);
}

.bag-empty h2 { margin: 0; font-size: 1.3rem; }

.bag-empty p { max-width: 28rem; margin: 0; color: var(--muted); font-size: 0.92rem; }

.bag-empty-actions {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    align-items: center;
    gap: 0.75rem 1.25rem;
    margin-top: 1rem;
}

.bag-layout {
    display: grid;
    gap: 1.25rem;
}

.bag-lines {
    display: grid;
    gap: 0.75rem;
    margin: 0;
    padding: 0;
    list-style: none;
}

.bag-line {
    display: grid;
    grid-template-columns: 5.25rem minmax(0, 1fr) auto;
    grid-template-areas:
        "thumb info remove"
        "qty qty total";
    align-items: center;
    gap: 0.75rem 0.9rem;
    padding: 0.9rem;
    border-radius: 1rem;
    background: var(--white);
    box-shadow: 0 10px 28px -24px rgba(20, 39, 58, 0.55);
}

.bag-thumb {
    grid-area: thumb;
    display: block;
    overflow: hidden;
    border-radius: 0.75rem;
    background: var(--paper);
}

.bag-thumb img {
    width: 100%;
    aspect-ratio: 1;
    object-fit: contain;
}

.bag-info { grid-area: info; min-width: 0; }

.bag-brand {
    margin: 0;
    color: var(--muted);
    font-size: 0.68rem;
    font-weight: 700;
    letter-spacing: 0.12em;
    text-transform: uppercase;
}

.bag-name {
    margin: 0.1rem 0 0.2rem;
    font-size: 0.95rem;
    line-height: 1.35;
}

.bag-name a { text-decoration: none; }

.bag-name a:hover,
.bag-name a:focus-visible { color: var(--orange); }

.bag-each { margin: 0; color: var(--muted); font-size: 0.8rem; }

.bag-offline {
    margin: 0.4rem 0 0;
    padding: 0.4rem 0.6rem;
    border-radius: 0.5rem;
    background: #fff4ee;
    color: #9d2b12;
    font-size: 0.75rem;
    line-height: 1.45;
}

.bag-qty {
    grid-area: qty;
    display: inline-flex;
    align-items: center;
    justify-self: start;
    gap: 0.25rem;
    padding: 0.2rem;
    border: 1px solid var(--mist);
    border-radius: 999px;
}

.bag-step {
    display: grid;
    place-items: center;
    width: 2.5rem;
    height: 2.5rem;
    border: 0;
    border-radius: 50%;
    background: var(--paper);
    color: var(--navy);
    cursor: pointer;
    transition: background-color var(--ease), color var(--ease);
}

.bag-step:hover:not(:disabled),
.bag-step:focus-visible { background: var(--navy); color: var(--white); }

.bag-step:disabled { opacity: 0.4; cursor: not-allowed; }

.bag-qty input {
    width: 2.6rem;
    min-height: 2.5rem;
    border: 0;
    background: transparent;
    color: var(--navy);
    font-weight: 700;
    text-align: center;
    -moz-appearance: textfield;
    appearance: textfield;
}

.bag-qty input::-webkit-outer-spin-button,
.bag-qty input::-webkit-inner-spin-button { margin: 0; -webkit-appearance: none; }

.bag-update {
    min-height: 2.5rem;
    padding: 0 0.9rem;
    border: 0;
    border-radius: 999px;
    background: var(--navy);
    color: var(--white);
    font-size: 0.75rem;
    font-weight: 700;
    cursor: pointer;
}

.bag-qty.is-live .bag-update { display: none; }

.bag-qty.is-busy { opacity: 0.6; pointer-events: none; }

.bag-total {
    grid-area: total;
    margin: 0;
    font-size: 1rem;
    font-weight: 700;
    white-space: nowrap;
}

.bag-remove { grid-area: remove; align-self: start; }

.bag-remove button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.35rem;
    min-width: 44px;
    min-height: 44px;
    padding: 0;
    border: 0;
    border-radius: 999px;
    background: transparent;
    color: var(--muted);
    font-size: 0.75rem;
    font-weight: 700;
    cursor: pointer;
    transition: color var(--ease), background-color var(--ease);
}

.bag-remove button:hover,
.bag-remove button:focus-visible { background: #fff4ee; color: #9d2b12; }

.bag-remove span { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0, 0, 0, 0); }

.bag-summary {
    display: grid;
    gap: 1rem;
    align-content: start;
    padding: 1.25rem;
    border-radius: 1.25rem;
    background: var(--white);
    box-shadow: 0 18px 40px -30px rgba(20, 39, 58, 0.6);
}

.bag-summary-title { margin: 0; font-size: 1.1rem; }

.bag-sums { display: grid; gap: 0.6rem; margin: 0; }

.bag-sums div {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    gap: 1rem;
}

.bag-sums div:first-child {
    padding-bottom: 0.6rem;
    border-bottom: 1px solid var(--mist);
}

.bag-sums dt { color: var(--muted); font-size: 0.88rem; }

.bag-sums dd { margin: 0; font-weight: 700; }

.bag-sums div:first-child dd { font-size: 1.35rem; }

.bag-sums .bag-muted { color: var(--muted); font-size: 0.82rem; font-weight: 600; }

.bag-checkout { display: grid; gap: 1rem; }

.bag-after {
    display: grid;
    gap: 0.5rem;
    margin: 0;
    padding: 0;
    border: 0;
}

.bag-after legend {
    margin-bottom: 0.5rem;
    padding: 0;
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.12em;
    text-transform: uppercase;
}

.bag-choice {
    display: flex;
    align-items: flex-start;
    gap: 0.7rem;
    padding: 0.75rem 0.85rem;
    border: 1px solid var(--mist);
    border-radius: 0.85rem;
    cursor: pointer;
    transition: border-color var(--ease), background-color var(--ease);
}

.bag-choice:hover { border-color: var(--navy); }

.bag-choice:has(input:checked) {
    border-color: var(--orange);
    background: #fff8f4;
}

.bag-choice:has(input:focus-visible) { outline: 2px solid var(--orange); outline-offset: 2px; }

.bag-choice input {
    flex: none;
    width: 1.1rem;
    height: 1.1rem;
    margin: 0.2rem 0 0;
    accent-color: var(--orange);
}

.bag-choice span { display: grid; gap: 0.1rem; }

.bag-choice strong { font-size: 0.88rem; }

.bag-choice small { color: var(--muted); font-size: 0.76rem; line-height: 1.4; }

.bag-go { width: 100%; }

html[dir="rtl"] .bag-go svg { transform: scaleX(-1); }

.bag-secure {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.4rem;
    margin: -0.25rem 0 0;
    color: var(--muted);
    font-size: 0.76rem;
    text-align: center;
}

.bag-continue { justify-self: center; }

.bag-help {
    display: grid;
    gap: 0.35rem;
    padding-top: 1rem;
    border-top: 1px solid var(--mist);
    font-size: 0.82rem;
}

.bag-help p { margin: 0; color: var(--muted); }

.bag-help a {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    color: var(--navy);
    font-weight: 700;
    text-underline-offset: 0.3em;
}

html[lang="ar"] .bag-title,
html[lang="ar"] .bag-brand,
html[lang="ar"] .bag-after legend { letter-spacing: 0; }

html[lang="ar"] .bag-title { line-height: 1.3; }

@media (min-width: 640px) {
    .bag { padding-top: 2rem; }

    .bag-line {
        grid-template-columns: 6.25rem minmax(0, 1fr) auto auto auto;
        grid-template-areas: "thumb info qty total remove";
        gap: 1.1rem;
        padding: 1rem 1.1rem;
    }

    .bag-remove { align-self: center; }

    .bag-total { min-width: 5.5rem; text-align: end; }
}

@media (min-width: 960px) {
    .bag-head { margin-bottom: 1.75rem; }

    .bag-layout {
        grid-template-columns: minmax(0, 1fr) 22rem;
        align-items: start;
        gap: 1.5rem;
    }

    .bag-summary {
        position: sticky;
        top: 6.5rem;
        padding: 1.5rem;
    }
}

@media (prefers-reduced-motion: reduce) {
    .bag-pill,
    .bag-step,
    .bag-choice,
    .bag-remove button { transition: none; }
}
