/* ============================================================
   Shopping cart: header icon, "Add to cart" buttons, cart + checkout pages.
   Loaded site-wide after site.css; every rule is scoped to a cart-* or ct-* class.
   ============================================================ */

/* ── Header icon ─────────────────────────────────────────── */
.cart-link {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex: none;
    width: 44px;
    height: 44px;
    border-radius: 999px;
    border: 1.5px solid var(--panel);
    background: var(--white);
    color: var(--ink);
    transition: border-color .3s var(--ease), color .3s var(--ease);
}
.cart-link:hover { border-color: var(--cyan); color: var(--cyan-deep); }
.cart-link:focus-visible { outline: 2px solid var(--cyan); outline-offset: 2px; }

.cart-count {
    position: absolute;
    top: -6px;
    right: -6px;
    min-width: 20px;
    height: 20px;
    padding: 0 5px;
    border-radius: 999px;
    background: var(--cyan);
    color: #fff;
    font-size: 11.5px;
    font-weight: 700;
    line-height: 20px;
    text-align: center;
    box-shadow: 0 0 0 2px var(--white);
}
.cart-count[hidden] { display: none; }
.cart-count.bump { animation: cart-bump .5s var(--ease); }
@keyframes cart-bump { 0% { transform: scale(1); } 40% { transform: scale(1.4); } 100% { transform: scale(1); } }

/* ── "Add to cart" on the (dark) price cards ─────────────── */
.price-card .cart-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    width: 100%;
    margin-top: 10px;
    padding: 12px 0;
    border-radius: 999px;
    border: 1.5px solid transparent;
    background: rgba(255, 255, 255, .1);
    color: #fff;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: background .3s var(--ease), border-color .3s var(--ease), color .3s var(--ease);
}
.price-card .cart-btn svg { width: 17px; height: 17px; flex: none; }
.price-card .cart-btn:hover { background: rgba(255, 255, 255, .18); border-color: rgba(127, 214, 238, .7); color: #7FD6EE; }
.price-card .cart-btn:focus-visible { outline: 2px solid #7FD6EE; outline-offset: 2px; }
.price-card .cart-btn:disabled { opacity: .75; cursor: default; }
.price-card .cart-btn.added { background: rgba(127, 224, 168, .18); border-color: rgba(127, 224, 168, .6); color: #7FE0A8; }

/* ── Cart + checkout pages ───────────────────────────────── */
.ct-page { background: var(--cloud); padding: 48px 24px 96px; }
.ct-wrap { max-width: 1080px; margin: 0 auto; display: grid; grid-template-columns: minmax(0, 1fr) 380px; gap: 28px; align-items: start; }
.ct-main h1 { font-size: clamp(26px, 3vw, 34px); font-weight: 800; letter-spacing: -.015em; color: var(--ink); margin: 0 0 6px; }
.ct-main > p.lede { color: var(--ink-soft); font-size: 15px; margin: 0 0 22px; }
.ct-count { font-size: .55em; font-weight: 700; color: var(--cyan-deep); background: #E6F5FA; padding: 3px 10px; border-radius: 999px; vertical-align: middle; margin-left: 6px; }

/* what was chosen on the configure page, and the way back to change it */
/* what an item includes (cart page and both checkout pages): a panel that folds away */
.ct-incl { margin-top: 10px; border: 1px solid #E3E8EE; border-radius: 12px; background: #F8FAFC; }
.ct-incl summary { display: flex; align-items: center; gap: 8px; padding: 9px 12px; min-height: 38px; box-sizing: border-box; cursor: pointer; list-style: none; user-select: none; font-weight: 700; font-size: 13.5px; color: var(--ink); border-radius: 12px; }
.ct-incl summary::-webkit-details-marker { display: none; }
.ct-incl summary::marker { content: ""; }
.ct-incl summary::before { content: ""; flex: none; width: 7px; height: 7px; margin: 0 5px 1px 2px; border-right: 2px solid currentColor; border-bottom: 2px solid currentColor; transform: rotate(-45deg); transition: transform .15s ease; }   /* points right when folded */
.ct-incl[open] > summary::before { transform: rotate(45deg); margin-bottom: 4px; }                                                                                                               /* points down when open */
.ct-incl summary .n { background: #E1F3F9; color: var(--cyan-deep); border-radius: 999px; font-size: 11.5px; font-weight: 700; padding: 1px 8px; }
.ct-incl summary::after { content: "Show"; margin-left: auto; font-size: 12.5px; font-weight: 600; color: var(--cyan-deep); }
.ct-incl[open] > summary::after { content: "Hide"; }
.ct-incl summary:hover { background: #EEF3F8; }
.ct-incl summary:focus-visible { outline: 2px solid var(--cyan); outline-offset: 2px; }
.ct-incl[open] > summary { border-bottom: 1px solid #E3E8EE; border-bottom-left-radius: 0; border-bottom-right-radius: 0; }
.ct-incl ul { list-style: none; margin: 0; padding: 10px 14px 12px; display: grid; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); gap: 4px 18px; }
.ct-incl li { font-size: 13.5px; color: var(--ink); padding-left: 20px; position: relative; overflow-wrap: anywhere; }
.ct-incl li::before { content: "\2713"; position: absolute; left: 0; color: #16A34A; font-weight: 800; }
.ct-incl li.chosen { font-weight: 600; }

/* each totals row also in dollars, for a visitor viewing in dollars (small, under the rupee amount) */
.ct-totals .row .a { text-align: right; }
.ct-totals .usd { display: block; font-size: 12.5px; font-weight: 500; opacity: .8; margin-top: 1px; }

/* the same total in US dollars, for a visitor viewing in dollars: larger than the ordinary rows so it is easy to read */
.ct-totals .row.approx { font-size: 18px; font-weight: 700; color: #fff; margin-top: 6px; }
.ct-totals .row.approx .a { color: #fff; }

.ct-chosen { list-style: none; margin: 8px 0 0; padding: 0; display: grid; gap: 3px; font-size: 13.5px; color: var(--ink); }
.ct-chosen li span { color: var(--ink-soft); }
.ct-chosen li span::after { content: ":"; }
.ct-chosen em { font-style: normal; color: var(--cyan-deep); font-weight: 600; }
.ct-edit { color: var(--cyan-deep); font-weight: 600; font-size: 14px; text-decoration: none; margin-right: 16px; }
.ct-edit:hover { text-decoration: underline; }
.ct-card { background: #fff; border: 1px solid #E3E8EE; border-radius: 18px; padding: 22px 26px; margin-bottom: 16px; color: var(--ink); }
.ct-card h2 { font-size: 17px; font-weight: 800; color: var(--ink); margin: 0 0 4px; }
.ct-card p.hint { font-size: 13.5px; color: var(--ink-soft); margin: 0 0 16px; line-height: 1.55; }

.ct-item-head { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: flex-start; gap: 12px 20px; }
.ct-kind { display: inline-block; font-size: 11.5px; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; color: var(--cyan-deep); background: #E6F5FA; padding: 4px 10px; border-radius: 999px; margin-bottom: 8px; }
.ct-name { font-size: 21px; font-weight: 800; color: var(--ink); line-height: 1.2; margin: 0; }
.ct-meta { font-size: 13.5px; color: var(--ink-soft); margin-top: 6px; }
.ct-price { text-align: right; }
.ct-price strong { display: block; font-size: 22px; font-weight: 800; color: var(--ink); }
.ct-price span { font-size: 13px; color: var(--ink-soft); }
.ct-problem { margin-top: 10px; font-size: 13.5px; color: #B91C1C; background: #FEF2F2; border-radius: 10px; padding: 9px 12px; }
.ct-item.unavailable { border-color: #F3C9C9; }
.ct-item.unavailable .ct-name, .ct-item.unavailable .ct-price strong { color: #8A94A6; }

.ct-addons { margin-top: 16px; border-top: 1px solid #EDF1F5; padding-top: 12px; }
.ct-addons-title { font-size: 12px; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: var(--ink-soft); margin-bottom: 4px; }
.ct-addon { display: flex; justify-content: space-between; align-items: center; gap: 18px; padding: 12px 0; border-top: 1px solid #EDF1F5; }
.ct-addon:first-of-type { border-top: 0; }
.ct-addon .info strong { display: block; font-size: 15px; color: var(--ink); }
.ct-addon .info .unit { font-size: 13.5px; color: var(--cyan-deep); font-weight: 600; margin-top: 2px; }
.ct-addon .info p { font-size: 13px; color: var(--ink-soft); margin: 4px 0 0; line-height: 1.5; }

.ct-stepper { display: inline-flex; align-items: center; border: 1px solid var(--panel); border-radius: 999px; overflow: hidden; flex: 0 0 auto; background: #fff; }
.ct-stepper button { width: 36px; height: 36px; border: 0; background: #fff; color: var(--ink); font-size: 18px; cursor: pointer; line-height: 1; }
.ct-stepper button:hover { background: var(--cloud); }
.ct-stepper button:disabled { color: #B8C0CC; cursor: default; background: #fff; }
.ct-stepper input { width: 42px; height: 36px; border: 0; border-left: 1px solid var(--panel); border-right: 1px solid var(--panel); text-align: center; font-size: 15px; font-weight: 700; color: var(--ink); background: #fff; -moz-appearance: textfield; }
.ct-stepper input::-webkit-inner-spin-button, .ct-stepper input::-webkit-outer-spin-button { -webkit-appearance: none; margin: 0; }

.ct-switch { position: relative; display: inline-block; width: 46px; height: 26px; flex: 0 0 auto; }
.ct-switch input { opacity: 0; width: 0; height: 0; }
.ct-switch .track { position: absolute; inset: 0; background: #CBD5E1; border-radius: 999px; transition: background .2s var(--ease); cursor: pointer; }
.ct-switch .track::after { content: ""; position: absolute; top: 3px; left: 3px; width: 20px; height: 20px; border-radius: 50%; background: #fff; transition: transform .2s var(--ease); box-shadow: 0 1px 3px rgba(0, 0, 0, .2); }
.ct-switch input:checked + .track { background: var(--cyan); }
.ct-switch input:checked + .track::after { transform: translateX(20px); }
.ct-switch input:focus-visible + .track { outline: 2px solid var(--cyan-deep); outline-offset: 2px; }

.ct-qtyrow { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-top: 16px; padding-top: 14px; border-top: 1px solid #EDF1F5; }
.ct-qtyrow label { font-size: 12px; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: var(--ink-soft); }
.ct-qtyrow .ct-linetotal { font-size: 13.5px; color: var(--ink-soft); margin-right: auto; margin-left: 12px; }
.ct-item-foot { display: flex; justify-content: flex-end; margin-top: 14px; }
.ct-remove { background: none; border: 0; color: var(--ink-soft); font: inherit; font-size: 13.5px; text-decoration: underline; cursor: pointer; padding: 4px 2px; }
.ct-remove:hover { color: #B91C1C; }
.ct-item.busy { opacity: .6; pointer-events: none; }

.ct-loading, .ct-empty { text-align: center; color: var(--ink-soft); padding: 48px 20px; }
.ct-empty { background: #fff; border: 1px dashed #CBD5E1; border-radius: 18px; }
.ct-empty h2 { font-size: 20px; font-weight: 800; color: var(--ink); margin: 0 0 8px; }
.ct-empty p { margin: 0 0 20px; }
.ct-empty-actions { display: flex; justify-content: center; gap: 12px; flex-wrap: wrap; }

.ct-btn { display: inline-block; padding: 12px 24px; border-radius: 999px; font-weight: 700; font-size: 15px; text-align: center; cursor: pointer; border: 1.5px solid var(--cyan); background: var(--cyan); color: #fff; transition: background .2s ease, transform .2s ease; }
.ct-btn:hover { background: var(--cyan-deep); border-color: var(--cyan-deep); transform: translateY(-1px); }
.ct-btn.ghost { background: transparent; color: var(--ink); border-color: var(--ink); }
.ct-btn.ghost:hover { background: var(--ink); color: #fff; border-color: var(--ink); }
.ct-btn[disabled], .ct-btn.disabled { opacity: .55; cursor: default; pointer-events: none; }

/* billing + coupon */
.ct-row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.ct-field label { display: block; font-size: 13px; font-weight: 600; color: var(--ink-soft); margin-bottom: 6px; }
.ct-field input, .ct-field select { width: 100%; padding: 11px 13px; border: 1px solid #D5DCE5; border-radius: 10px; font: inherit; font-size: 15px; color: var(--ink); background: #fff; }
.ct-field input:focus, .ct-field select:focus { outline: 2px solid var(--cyan); outline-offset: 1px; border-color: var(--cyan); }
.ct-field .field-error { font-size: 12.5px; color: #B91C1C; margin-top: 5px; min-height: 0; }
.ct-field.has-error input, .ct-field.has-error select { border-color: #DC2626; }
.ct-field input::placeholder { text-transform: none; color: #94A3B8; }

.ct-coupon { display: flex; gap: 10px; }
.ct-coupon input { flex: 1; text-transform: uppercase; padding: 11px 13px; border: 1px solid #D5DCE5; border-radius: 10px; font: inherit; font-size: 15px; color: var(--ink); }
.ct-coupon input::placeholder { text-transform: none; color: #94A3B8; }
.ct-coupon button { padding: 11px 20px; border-radius: 10px; font-weight: 700; font-size: 14px; border: 1.5px solid var(--ink); background: #fff; color: var(--ink); cursor: pointer; white-space: nowrap; }
.ct-coupon button:hover { background: var(--ink); color: #fff; }
.ct-coupon button:disabled { opacity: .55; cursor: default; }
.ct-coupon-msg { font-size: 13.5px; margin: 8px 0 0; display: none; }
.ct-coupon-msg.ok { display: block; color: #1C7C46; }
.ct-coupon-msg.err { display: block; color: #B91C1C; }
.ct-coupon-msg button { background: none; border: 0; color: var(--ink-soft); text-decoration: underline; cursor: pointer; font: inherit; margin-left: 6px; }

/* summary panel (shared by the cart and the checkout) */
.ct-summary { position: sticky; top: 24px; background: var(--ink); color: #fff; border-radius: 18px; padding: 26px 26px 24px; }
.ct-summary h2 { font-size: 13px; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; color: #7FD6EE; margin: 0 0 16px; }
.ct-lines .row { display: flex; justify-content: space-between; gap: 14px; padding: 9px 0; border-bottom: 1px solid rgba(255, 255, 255, .1); font-size: 14.5px; color: rgba(255, 255, 255, .88); }
.ct-lines .row .d { min-width: 0; }
.ct-lines .row .d small { display: block; color: rgba(255, 255, 255, .55); font-size: 12.5px; margin-top: 2px; }
.ct-lines .row .a { white-space: nowrap; font-weight: 600; color: #fff; }
.ct-lines .row.addon { padding-left: 14px; font-size: 13.5px; }
.ct-lines .row.bad .d { color: #FFB4B4; }
.ct-totals { margin-top: 6px; }
.ct-totals .row { display: flex; justify-content: space-between; gap: 14px; padding: 7px 0; font-size: 14px; color: rgba(255, 255, 255, .75); }
.ct-totals .row.discount .a { color: #7FE0A8; }
.ct-totals .row.grand { border-top: 2px solid rgba(255, 255, 255, .35); margin-top: 8px; padding-top: 14px; font-size: 20px; font-weight: 800; color: #fff; }
.ct-totals .row.grand .a { color: #fff; }
.ct-summary .ct-coupon-box { margin: 16px 0 4px; }
.ct-summary .ct-coupon input { background: rgba(255, 255, 255, .08); border-color: rgba(255, 255, 255, .25); color: #fff; }
.ct-summary .ct-coupon button { border-color: rgba(255, 255, 255, .6); background: transparent; color: #fff; }
.ct-summary .ct-coupon button:hover { background: #fff; color: var(--ink); }
.ct-summary .ct-coupon-msg.ok { color: #7FE0A8; }
.ct-summary .ct-coupon-msg.err { color: #FFB4B4; }
.ct-summary .ct-coupon-msg button { color: rgba(255, 255, 255, .7); border: 0; background: none; padding: 0; }
.ct-actions { margin-top: 18px; display: grid; gap: 10px; }
.ct-actions .ct-btn { width: 100%; padding: 15px 20px; font-size: 16px; }
.ct-actions .ct-btn.ghost { color: #fff; border-color: rgba(255, 255, 255, .6); }
.ct-actions .ct-btn.ghost:hover { background: #fff; color: var(--ink); }
.ct-note { font-size: 13px; color: rgba(255, 255, 255, .7); margin: 14px 0 0; line-height: 1.55; }
.ct-trust { font-size: 12.5px; color: rgba(255, 255, 255, .6); margin: 14px 0 0; line-height: 1.55; }
.ct-error { display: none; margin-top: 12px; font-size: 13.5px; color: #FFB4B4; background: rgba(220, 38, 38, .18); border-radius: 10px; padding: 10px 12px; }
.ct-error.show { display: block; }

/* an error on a light card (the checkout sign-in form); .ct-error above is for the dark order summary */
.co-alert { background: #FEF2F2; border: 1px solid #FECACA; color: #B91C1C; padding: 10px 14px; border-radius: 10px; font-size: 14px; margin-bottom: 12px; }
.co-alert[hidden] { display: none; }
.ct-unavailable { max-width: 560px; margin: 0 auto; text-align: center; }
.ct-unavailable h1 { font-size: 26px; font-weight: 800; color: var(--ink); margin: 0 0 10px; }
.ct-unavailable p { color: var(--ink-soft); margin: 0 0 22px; }

@media (max-width: 900px) {
    .ct-wrap { grid-template-columns: 1fr; }
    .ct-summary { position: static; }
    .ct-price { text-align: left; }
}
@media (max-width: 560px) {
    .ct-page { padding: 28px 16px 72px; }
    .ct-card { padding: 20px 18px; }
    .ct-addon { flex-wrap: wrap; }
    .ct-row { grid-template-columns: 1fr; }
    .ct-coupon { flex-direction: column; }
}
@media (prefers-reduced-motion: reduce) {
    .cart-count.bump { animation: none; }
}
