/* ==========================================================================
   Ahanas Gallery — Cart Page (2025 redesign)
   Loaded globally, but every rule is scoped with the .agc- prefix so it only
   affects the cart page (and the order summary used on checkout).
   ========================================================================== */

.agc-section {
    background: #FFFDF5;
    padding: 26px 0 48px;
}

.agc-cart.container {
    width: 100%;
    max-width: 1180px;
    padding: 0 20px;
    color: #1F3A35;
    font-family: 'Poppins', 'Hind Siliguri', system-ui, -apple-system, sans-serif;
    font-size: 14px;
    line-height: 1.5;
}

.agc-cart *,
.agc-sum * {
    box-sizing: border-box;
}

.agc-cart a,
.agc-sum a {
    text-decoration: none;
    color: inherit;
}

/* ---------- layout ---------- */
.agc-wrap {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 360px;
    gap: 28px;
    align-items: start;
}

.agc-h2 {
    display: flex;
    align-items: center;
    gap: 10px;
    margin: 0 0 14px;
    font-size: 18px;
    font-weight: 700;
    color: #1F3A35;
}

.agc-h2::before {
    content: "";
    width: 5px;
    height: 22px;
    border-radius: 3px;
    background: #1F3A35;
}

/* ---------- free delivery progress ---------- */
.agc-ship {
    background: #FFF8DC;
    border: 1px solid #EFE6C8;
    border-radius: 16px;
    padding: 14px 16px;
    margin-bottom: 16px;
}

.agc-ship p {
    margin: 0 0 9px;
    font-weight: 600;
    font-size: 13px;
    color: #1F3A35;
}

.agc-ship p strong {
    color: #B8431B;
}

.agc-bar {
    height: 10px;
    border-radius: 99px;
    background: #EFE6C8;
    overflow: hidden;
}

.agc-bar b {
    display: block;
    height: 100%;
    width: 0;
    border-radius: 99px;
    background: linear-gradient(90deg, #7cd3b0, #1F3A35);
    transition: width .5s ease;
}

.agc-ship-note {
    margin-top: 7px;
    font-size: 11.5px;
    color: #6b7d78;
    line-height: 1.4;
}

/* ---------- select all ---------- */
.agc-sel {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 2px 4px 12px;
    font-weight: 600;
    font-size: 13px;
    color: #1F3A35;
}

/* ---------- custom checkbox ---------- */
.agc-check {
    position: relative;
    display: inline-flex;
    align-items: center;
    gap: 10px;
    margin: 0;
    cursor: pointer;
    flex: none;
}

.agc-check input[type="checkbox"] {
    -webkit-appearance: none;
    appearance: none;
    width: 20px;
    height: 20px;
    margin: 0;
    border: 2px solid #1F3A35;
    border-radius: 6px;
    background: #fff;
    cursor: pointer;
    display: grid;
    place-content: center;
    transition: background .15s ease, border-color .15s ease;
    flex: none;
}

.agc-check input[type="checkbox"]:checked {
    background: #1F3A35;
    border-color: #1F3A35;
}

.agc-check input[type="checkbox"]::after {
    content: "";
    width: 10px;
    height: 6px;
    border-left: 2px solid #FFD84D;
    border-bottom: 2px solid #FFD84D;
    transform: rotate(-45deg) translateY(-1px);
    opacity: 0;
    transition: opacity .15s ease;
}

.agc-check input[type="checkbox"]:checked::after {
    opacity: 1;
}

.agc-check input[type="checkbox"]:focus-visible {
    outline: 2px solid #FFD84D;
    outline-offset: 2px;
}

.agc-check-label {
    font-weight: 600;
    font-size: 13px;
    color: #1F3A35;
    user-select: none;
}

/* ---------- seller group ---------- */
.agc-seller {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 4px 8px;
    margin-top: 4px;
    border-bottom: 1px dashed #EFE6C8;
    font-size: 13px;
    font-weight: 700;
    color: #1F3A35;
}

.agc-seller:first-of-type {
    margin-top: 0;
}

.agc-seller .agc-check input[type="checkbox"] {
    width: 18px;
    height: 18px;
    border-radius: 5px;
}

/* ---------- cart item ---------- */
.agc-item {
    display: grid;
    grid-template-columns: 20px 92px minmax(0, 1fr) auto;
    gap: 16px;
    align-items: center;
    background: #fff;
    border: 1px solid #EFE6C8;
    border-radius: 18px;
    padding: 14px;
    margin-bottom: 12px;
    transition: box-shadow .2s ease, opacity .2s ease;
}

.agc-item:hover {
    box-shadow: 0 6px 18px rgba(31, 58, 53, .07);
}

.agc-item.is-off {
    opacity: .6;
}

.agc-item.is-off:hover {
    opacity: .85;
}

.agc-pic {
    width: 92px;
    height: 92px;
    border-radius: 14px;
    overflow: hidden;
    background: #FFF8DC;
    display: grid;
    place-items: center;
    flex: none;
}

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

.agc-info {
    min-width: 0;
}

.agc-name {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    margin-bottom: 4px;
    font-size: 14px;
    font-weight: 600;
    line-height: 1.45;
    color: #1F3A35;
}

.agc-name:hover {
    color: #B8431B;
}

.agc-var {
    font-size: 12px;
    color: #6b7d78;
    word-break: break-word;
}

.agc-price {
    display: flex;
    align-items: baseline;
    flex-wrap: wrap;
    gap: 6px;
    margin-top: 6px;
    font-size: 16px;
    font-weight: 700;
    color: #B8431B;
}

.agc-price s {
    font-size: 12px;
    font-weight: 400;
    color: #6b7d78;
}

.agc-tax {
    display: block;
    margin-top: 2px;
    font-size: 11.5px;
    color: #6b7d78;
}

.agc-links {
    display: flex;
    flex-wrap: wrap;
    gap: 14px;
    margin-top: 8px;
    font-size: 12px;
}

.agc-link {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 0;
    border: 0;
    background: none;
    color: #6b7d78;
    font-family: inherit;
    font-size: 12px;
    text-decoration: underline;
    cursor: pointer;
}

.agc-link:hover {
    color: #B8431B;
}

.agc-right {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 12px;
}

.agc-step {
    display: inline-flex;
    align-items: center;
    border: 2px solid #FFD84D;
    border-radius: 99px;
    background: #fff;
    overflow: hidden;
}

.agc-step button {
    width: 36px;
    height: 36px;
    padding: 0;
    border: 0;
    background: transparent;
    color: #1F3A35;
    font-size: 19px;
    font-weight: 700;
    line-height: 1;
    cursor: pointer;
    transition: background .15s ease;
}

.agc-step button:hover {
    background: #FFE99A;
}

.agc-step button:disabled {
    opacity: .35;
    cursor: not-allowed;
}

.agc-step input {
    width: 36px;
    padding: 0;
    border: 0;
    background: transparent;
    color: #1F3A35;
    font-family: inherit;
    font-size: 14px;
    font-weight: 700;
    text-align: center;
    -moz-appearance: textfield;
}

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

.agc-qty-static {
    font-size: 13px;
    font-weight: 700;
    color: #6b7d78;
}

.agc-line {
    font-size: 16px;
    font-weight: 700;
    color: #1F3A35;
    white-space: nowrap;
}

/* ---------- welcome coupon banner ---------- */
.agc-welcome {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    margin-bottom: 16px;
    padding: 12px 16px;
    background: #FFF8DC;
    border: 1px dashed #FFD84D;
    border-radius: 14px;
    font-size: 13px;
    color: #1F3A35;
}

.agc-welcome strong {
    color: #B8431B;
}

.agc-welcome button {
    padding: 7px 16px;
    border: 0;
    border-radius: 99px;
    background: #1F3A35;
    color: #FFD84D;
    font-family: inherit;
    font-size: 12px;
    font-weight: 700;
    cursor: pointer;
}

.agc-welcome button:hover {
    background: #0f1d1a;
}

/* ---------- order summary ---------- */
.agc-side {
    position: sticky;
    top: 86px;
    align-self: start;
}

.agc-sum {
    background: #fff;
    border: 1px solid #EFE6C8;
    border-radius: 18px;
    padding: 18px;
    color: #1F3A35;
    font-family: 'Poppins', 'Hind Siliguri', system-ui, -apple-system, sans-serif;
    font-size: 14px;
    line-height: 1.5;
}

.agc-sum-title {
    margin: 0 0 14px;
    font-size: 17px;
    font-weight: 700;
    color: #1F3A35;
}

.agc-tp {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    margin-bottom: 14px;
    padding: 11px 14px;
    border-radius: 12px;
    background: #C1E8D9;
    font-size: 13px;
    font-weight: 700;
    color: #1F3A35;
}

.agc-tp-extra {
    background: #FFF8DC;
    border: 1px solid #EFE6C8;
}

.agc-note {
    display: block;
    margin-bottom: 12px;
    padding: 8px 12px;
    border-radius: 10px;
    background: #FFF3CD;
    color: #8a6100;
    font-size: 12px;
    font-weight: 600;
}

.agc-note.is-error {
    background: #ffd9cf;
    color: #B8431B;
}

/* coupon */
.agc-coupon {
    display: flex;
    gap: 8px;
    margin-bottom: 6px;
}

.agc-coupon input {
    flex: 1 1 auto;
    min-width: 0;
    padding: 9px 16px;
    border: 2px dashed #FFD84D;
    border-radius: 99px;
    background: #fff;
    color: #1F3A35;
    font-family: inherit;
    font-size: 13px;
    outline: none;
    text-transform: uppercase;
}

.agc-coupon input:focus {
    border-color: #e6bf17;
    box-shadow: 0 0 0 3px rgba(255, 216, 77, .25);
}

.agc-coupon input::placeholder {
    text-transform: none;
    color: #9aa8a4;
}

.agc-coupon button {
    flex: none;
    padding: 0 20px;
    border: 0;
    border-radius: 99px;
    background: #FFD84D;
    color: #1F3A35;
    font-family: inherit;
    font-size: 13px;
    font-weight: 700;
    cursor: pointer;
}

.agc-coupon button:hover {
    background: #ffe27a;
}

.agc-coupon-applied {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 6px;
}

.agc-coupon-code {
    flex: 1 1 auto;
    min-width: 0;
    padding: 9px 16px;
    border: 2px dashed #b6ddcc;
    border-radius: 99px;
    background: #f6fffb;
    color: #1F3A35;
    font-size: 13px;
    font-weight: 700;
    letter-spacing: .5px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.agc-coupon-applied button {
    flex: none;
    padding: 9px 16px;
    border: 0;
    border-radius: 99px;
    background: #1F3A35;
    color: #FFD84D;
    font-family: inherit;
    font-size: 12px;
    font-weight: 700;
    cursor: pointer;
}

.agc-msg {
    min-height: 24px;
    margin-bottom: 4px;
    font-size: 12px;
    line-height: 1.4;
}

.agc-chip {
    display: inline-block;
    padding: 4px 12px;
    border-radius: 99px;
    background: #C1E8D9;
    color: #1F3A35;
    font-size: 12px;
    font-weight: 600;
}

.agc-chip.is-err {
    background: #ffd9cf;
    color: #B8431B;
}

/* rows */
.agc-row {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 12px;
    padding: 7px 0;
    font-size: 13.5px;
    color: #6b7d78;
}

.agc-row span:last-child {
    color: #1F3A35;
    font-weight: 600;
    white-space: nowrap;
}

.agc-row.is-disc,
.agc-row.is-disc span:last-child {
    color: #238060;
    font-weight: 700;
}

.agc-row.is-total {
    margin-top: 6px;
    padding-top: 14px;
    border-top: 1px dashed #EFE6C8;
    font-size: 15px;
    font-weight: 700;
    color: #1F3A35;
    text-transform: uppercase;
    letter-spacing: .3px;
}

.agc-row.is-total span:last-child {
    font-size: 20px;
    font-weight: 800;
    color: #B8431B;
}

/* confirm */
.agc-confirm {
    display: block;
    width: 100%;
    margin-top: 14px;
    padding: 15px;
    border: 0;
    border-radius: 99px;
    background: #1F3A35;
    color: #FFD84D !important;
    font-family: 'Hind Siliguri', 'Poppins', sans-serif;
    font-size: 17px;
    font-weight: 700;
    text-align: center;
    line-height: 1.3;
    cursor: pointer;
    transition: transform .2s ease, box-shadow .2s ease, background .2s ease;
}

.agc-confirm:hover {
    background: #16302b;
    transform: translateY(-2px);
    box-shadow: 0 8px 18px rgba(31, 58, 53, .25);
    color: #FFD84D !important;
}

.agc-confirm:active {
    transform: translateY(0);
}

/* trust */
.agc-trust {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 8px;
    margin-top: 14px;
}

.agc-trust div {
    padding: 9px 4px;
    border-radius: 12px;
    background: #FFF8DC;
    font-size: 10.5px;
    font-weight: 600;
    line-height: 1.35;
    text-align: center;
    color: #1F3A35;
}

.agc-trust em {
    display: block;
    margin-bottom: 2px;
    font-style: normal;
    font-size: 17px;
    line-height: 1.2;
}

/* ---------- empty cart ---------- */
.agc-empty {
    max-width: 640px;
    margin: 10px auto;
    padding: 52px 24px;
    background: #fff;
    border: 1px solid #EFE6C8;
    border-radius: 20px;
    text-align: center;
}

.agc-empty-emoji {
    font-size: 54px;
    line-height: 1;
    margin-bottom: 14px;
}

.agc-empty h3 {
    margin: 0 0 8px;
    font-size: 21px;
    font-weight: 700;
    color: #1F3A35;
}

.agc-empty p {
    margin: 0 0 22px;
    font-size: 13.5px;
    color: #6b7d78;
}

.agc-empty .agc-confirm {
    display: inline-block;
    width: auto;
    min-width: 220px;
    margin-top: 0;
    padding: 13px 28px;
    font-size: 15px;
}

/* ---------- mobile checkout bar ---------- */
.agc-mbar {
    display: none;
}

/* ==========================================================================
   Responsive
   ========================================================================== */
@media (max-width: 991.98px) {
    .agc-section {
        padding: 18px 0 40px;
    }

    .agc-cart.container {
        padding: 0 14px;
    }

    .agc-wrap {
        grid-template-columns: 1fr;
        gap: 18px;
    }

    .agc-side {
        position: static;
    }

    .agc-confirm.is-desk {
        display: none;
    }

    .agc-mbar {
        position: fixed;
        left: 0;
        right: 0;
        bottom: 0;
        z-index: 1030;
        display: flex;
        align-items: center;
        gap: 12px;
        padding: 10px 14px calc(10px + env(safe-area-inset-bottom, 0px));
        background: #fff;
        border-top: 1px solid #EFE6C8;
        box-shadow: 0 -6px 18px rgba(0, 0, 0, .10);
    }

    .agc-mbar div {
        line-height: 1.2;
        font-size: 11px;
        color: #6b7d78;
    }

    .agc-mbar b {
        display: block;
        font-size: 18px;
        color: #B8431B;
    }

    .agc-mbar .agc-confirm {
        flex: 1 1 auto;
        margin: 0;
        padding: 13px;
        font-size: 16px;
    }
}

@media (max-width: 767.98px) {
    .agc-h2 {
        font-size: 17px;
        margin-bottom: 12px;
    }

    .agc-item {
        grid-template-columns: 20px 74px minmax(0, 1fr);
        gap: 12px;
        padding: 12px;
        align-items: start;
    }

    .agc-pic {
        width: 74px;
        height: 74px;
        border-radius: 12px;
    }

    .agc-right {
        grid-column: 2 / -1;
        flex-direction: row;
        align-items: center;
        justify-content: space-between;
        width: 100%;
        gap: 10px;
    }

    .agc-step button {
        width: 34px;
        height: 32px;
    }

    .agc-step input {
        width: 32px;
    }

    .agc-trust {
        gap: 6px;
    }

    .agc-trust div {
        font-size: 10px;
        padding: 8px 3px;
    }
}

@media (max-width: 420px) {
    .agc-cart.container {
        padding: 0 12px;
    }

    .agc-item {
        grid-template-columns: 18px 66px minmax(0, 1fr);
        gap: 10px;
        padding: 10px;
    }

    .agc-pic {
        width: 66px;
        height: 66px;
    }

    .agc-check input[type="checkbox"] {
        width: 18px;
        height: 18px;
    }

    .agc-price {
        font-size: 15px;
    }

    .agc-coupon button {
        padding: 0 14px;
    }
}
