/* ============================================================
   INSPERO cart — editorial dark cart.
   Black #010001 / Gold #DCAE30 · Cormorant Garamond + Jost.
   Markup hooks (.cart-item, .quantity-btn, .quantity-input,
   .remove-btn, .checkout-btn, coupon ids) are sacred — style only.
   ============================================================ */

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

/* ---------- Header ---------- */

.cart-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    gap: 16px;
    margin-bottom: 34px;
    padding-bottom: 18px;
    border-bottom: 1px solid var(--ins-line);
}

.cart-header-titles {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.cart-header h1 {
    font-family: 'Cormorant Garamond', serif;
    font-size: clamp(1.9rem, 4vw, 2.8rem);
    font-weight: 600;
    line-height: 1.05;
    color: var(--ins-text);
    margin: 0;
}

.cart-summary {
    color: var(--ins-gold);
    font-size: 12px;
    font-weight: 600;
    letter-spacing: .24em;
    text-transform: uppercase;
    border: 1px solid var(--ins-line);
    border-radius: 999px;
    padding: 8px 18px;
    white-space: nowrap;
}

/* ---------- Layout ---------- */

.cart-container {
    display: flex;
    flex-direction: column;
    gap: 30px;
    align-items: flex-start;
}

@media (min-width: 768px) {
    .cart-container { flex-direction: row; gap: 30px; }
    .cart-items { flex: 2; }
    .cart-total { flex: 1; min-width: 350px; }
}

@media (max-width: 767px) {
    .cart-total { width: 100%; }
}

.cart-items {
    flex: 2;
    width: 100%;
}

/* ---------- Line items (ins-card rows) ---------- */

.cart-item {
    display: flex;
    flex-direction: column;
    border-radius: 18px;
    padding: 18px;
    margin-bottom: 16px;
    transition: border-color .45s ease, transform .45s cubic-bezier(.16, 1, .3, 1),
                box-shadow .45s ease, opacity .3s ease;
}

.cart-item:hover {
    border-color: rgba(220, 174, 48, 0.5);
    transform: translateY(-3px);
    box-shadow: 0 26px 50px -26px rgba(220, 174, 48, .25);
}

@media (min-width: 576px) {
    .cart-item { flex-direction: row; }
}

.item-image {
    width: 100%;
    max-width: 120px;
    height: 130px;
    background: var(--ins-surface-2);
    border: 1px solid var(--ins-line-soft);
    border-radius: 12px;
    margin-bottom: 15px;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

@media (min-width: 576px) {
    .item-image { margin-bottom: 0; margin-right: 22px; }
}

.item-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.item-details {
    flex: 1;
    display: flex;
    flex-direction: column;
}

.item-name {
    font-family: 'Cormorant Garamond', serif;
    font-weight: 600;
    font-size: 22px;
    line-height: 1.15;
    color: var(--ins-text);
    margin-bottom: 4px;
    transition: color .25s ease;
}

.item-variant {
    font-size: 12px;
    letter-spacing: .18em;
    text-transform: uppercase;
    color: var(--ins-muted);
    margin-bottom: 8px;
}

.item-image-link { display: block; text-decoration: none; }

.item-name-link { text-decoration: none; color: inherit; }
.item-name-link:hover .item-name { color: var(--ins-gold-bright); }

.item-price {
    color: var(--ins-gold);
    font-weight: 600;
    font-size: 17px;
    letter-spacing: .04em;
    margin-bottom: 12px;
}

.item-description {
    color: var(--ins-muted);
    margin-bottom: 15px;
    font-size: 14px;
}

.item-actions {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: auto;
    gap: 12px;
}

/* Minimal gold qty stepper */
.quantity-selector {
    display: flex;
    align-items: center;
    border: 1px solid var(--ins-line);
    border-radius: 999px;
    overflow: hidden;
    background: var(--ins-surface-2);
    transition: border-color .3s ease, box-shadow .3s ease;
}
.quantity-selector:hover {
    border-color: var(--ins-gold);
    box-shadow: 0 0 0 1px rgba(220, 174, 48, 0.3);
}

.quantity-btn {
    background: transparent;
    border: none;
    color: var(--ins-gold);
    padding: 7px 14px;
    cursor: pointer;
    font-size: 16px;
    line-height: 1;
    transition: background-color 0.25s ease, transform .15s ease;
}
.quantity-btn:hover { background-color: rgba(220, 174, 48, 0.14); }
.quantity-btn:active { transform: scale(.88); }

.cart-item .quantity-input {
    width: 40px;
    border: none !important;
    text-align: center;
    font-size: 15px;
    font-weight: 600;
    padding: 5px 0;
    color: var(--ins-text) !important;
    background: transparent !important;
    box-shadow: none !important;
}

.remove-btn {
    background-color: transparent;
    border: none;
    color: var(--ins-muted);
    cursor: pointer;
    font-size: 12px;
    font-weight: 600;
    letter-spacing: .16em;
    text-transform: uppercase;
    padding: 6px 10px;
    border-radius: 999px;
    transition: color 0.25s ease, background-color .25s ease;
}
.remove-btn:hover {
    color: #ff8f8f;
    background-color: rgba(231, 76, 60, 0.12);
}

/* ---------- Order summary (sticky luxe card) ---------- */

.cart-total {
    flex: 1;
    background: var(--ins-surface);
    border: 1px solid var(--ins-line);
    border-radius: 18px;
    padding: 26px 24px;
    box-shadow: 0 24px 60px -30px rgba(0, 0, 0, 0.9);
    align-self: flex-start;
    position: sticky;
    top: 110px;
    animation: insSummaryIn .6s cubic-bezier(.16, 1, .3, 1);
}
@keyframes insSummaryIn {
    from { opacity: 0; transform: translateY(18px); }
    to   { opacity: 1; transform: none; }
}

.cart-total h2 {
    font-family: 'Cormorant Garamond', serif;
    font-size: 26px;
    font-weight: 600;
    color: var(--ins-text);
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 1px solid var(--ins-line);
}

.total-row {
    display: flex;
    justify-content: space-between;
    margin-bottom: 10px;
}

.total-label { color: var(--ins-muted); font-size: 14px; }
.total-value { font-weight: 600; color: var(--ins-text); font-size: 14px; }

.grand-total {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    margin-top: 20px;
    padding-top: 16px;
    border-top: 1px solid var(--ins-line);
}

.grand-total-label {
    font-weight: 600;
    font-size: 12px;
    letter-spacing: .24em;
    text-transform: uppercase;
    color: var(--ins-text);
}

.grand-total-value {
    font-family: 'Cormorant Garamond', serif;
    font-weight: 600;
    font-size: 28px;
    color: var(--ins-gold) !important;
}

/* Checkout CTA — gold gradient + shimmer sweep (mirrors .ins-btn-gold
   since the widget markup can't take extra classes) */
.checkout-btn {
    width: 100%;
    position: relative;
    overflow: hidden;
    background: linear-gradient(135deg, var(--ins-gold-bright), var(--ins-gold) 55%, var(--ins-gold-deep));
    color: var(--ins-on-gold);
    border: none;
    padding: 15px;
    margin-top: 22px;
    border-radius: 999px;
    font-size: 13px;
    font-weight: 600;
    letter-spacing: .2em;
    text-transform: uppercase;
    cursor: pointer;
    box-shadow: 0 14px 34px -16px rgba(220, 174, 48, .55);
    transition: transform .35s cubic-bezier(.16, 1, .3, 1), filter .35s ease;
}
.checkout-btn:hover { transform: translateY(-2px); filter: brightness(1.08); }
.checkout-btn::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(115deg, transparent 30%, rgba(255, 255, 255, .5) 50%, transparent 70%);
    transform: translateX(-120%);
    animation: insCheckoutShimmer 3.2s ease-in-out infinite;
    pointer-events: none;
}
@keyframes insCheckoutShimmer {
    0%, 55% { transform: translateX(-120%); }
    85%, 100% { transform: translateX(120%); }
}

.secure-checkout {
    margin-top: 14px;
    text-align: center;
    font-size: 11px;
    letter-spacing: .28em;
    text-transform: uppercase;
    color: var(--ins-muted);
}
.secure-checkout::before { content: "✦"; margin-right: 8px; color: var(--ins-gold); }

/* ---------- Empty state ---------- */
/* cart.js re-injects .empty-cart markup, so the monogram and the
   headline copy live in CSS to cover both server & JS renders. */

.empty-cart {
    text-align: center;
    margin: 60px auto;
    max-width: 460px;
    color: var(--ins-muted);
}

.empty-cart::before {
    content: "I";
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 84px;
    height: 84px;
    margin-bottom: 22px;
    border: 1px solid var(--ins-line);
    border-radius: 50%;
    font-family: 'Cormorant Garamond', serif;
    font-size: 44px;
    font-weight: 600;
    color: var(--ins-gold);
    background: radial-gradient(circle at 50% 30%, rgba(220, 174, 48, 0.14), transparent 70%);
    box-shadow: 0 0 0 8px rgba(220, 174, 48, 0.05);
    animation: insFloat 6s ease-in-out infinite;
}

/* Force the luxe headline even on the JS-injected markup */
.empty-cart h2 {
    font-size: 0;
    line-height: 0;
    margin: 0 0 12px;
}
.empty-cart h2::after {
    content: "Your cart awaits its first treasure";
    display: block;
    font-family: 'Cormorant Garamond', serif;
    font-size: clamp(1.7rem, 3.4vw, 2.3rem);
    font-weight: 600;
    line-height: 1.15;
    color: var(--ins-text);
}

.empty-cart p {
    font-size: 14px;
    color: var(--ins-muted);
    margin-bottom: 26px;
}

.continue-shopping {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: .6rem;
    padding: .9rem 2.2rem;
    border-radius: 999px;
    border: 1px solid var(--ins-gold);
    background: transparent;
    color: var(--ins-gold) !important;
    font-size: .78rem;
    font-weight: 600;
    letter-spacing: .22em;
    text-transform: uppercase;
    text-decoration: none;
    transition: background .35s ease, transform .35s cubic-bezier(.16, 1, .3, 1), box-shadow .35s ease;
}
.continue-shopping:hover {
    background: rgba(220, 174, 48, .12);
    transform: translateY(-2px);
    box-shadow: 0 14px 30px -18px rgba(220, 174, 48, .5);
    text-decoration: none;
}

/* ---------- Coupon / promo code ---------- */

.cart-coupon {
    margin-top: 18px;
    padding-top: 16px;
    border-top: 1px dashed var(--ins-line);
}

.coupon-heading {
    display: block;
    font-size: 11px;
    color: var(--ins-gold);
    font-weight: 600;
    letter-spacing: .24em;
    text-transform: uppercase;
    margin-bottom: 10px;
}

.coupon-input-group {
    display: flex;
    gap: 8px;
}

.coupon-code-input {
    flex: 1;
    min-width: 0;
    padding: 10px 14px;
    border-radius: 999px;
    font-size: 13px;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    transition: border-color 0.25s ease, box-shadow 0.25s ease;
}

.coupon-apply-btn {
    flex: 0 0 auto;
    padding: 10px 20px;
    background: transparent;
    color: var(--ins-gold);
    border: 1px solid var(--ins-gold);
    border-radius: 999px;
    font-size: 12px;
    font-weight: 600;
    letter-spacing: .16em;
    text-transform: uppercase;
    cursor: pointer;
    transition: background-color 0.25s ease, opacity 0.25s ease, transform .3s cubic-bezier(.16, 1, .3, 1);
}
.coupon-apply-btn:hover { background-color: rgba(220, 174, 48, 0.12); transform: translateY(-1px); }
.coupon-apply-btn:disabled { opacity: 0.55; cursor: not-allowed; transform: none; }

.coupon-applied {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    background: rgba(46, 160, 90, 0.12);
    border: 1px solid rgba(46, 160, 90, 0.35);
    border-radius: 12px;
    padding: 10px 14px;
    animation: insCouponIn .4s cubic-bezier(.16, 1, .3, 1);
}
@keyframes insCouponIn {
    from { opacity: 0; transform: translateY(8px); }
    to   { opacity: 1; transform: none; }
}

.coupon-applied-info {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

.coupon-tick {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: #2e9e5b;
    color: #fff;
    font-size: 12px;
    font-weight: 700;
}

.coupon-applied-code {
    font-weight: 700;
    color: #8fdcac;
    letter-spacing: 0.1em;
    text-transform: uppercase;
}

.coupon-applied-label { color: var(--ins-muted); font-size: 13px; }

.coupon-remove-btn {
    background: none;
    border: none;
    color: #ff8f8f;
    font-size: 12px;
    font-weight: 600;
    letter-spacing: .08em;
    cursor: pointer;
    padding: 4px 8px;
    border-radius: 999px;
    transition: background-color 0.25s ease;
}
.coupon-remove-btn:hover { background: rgba(231, 76, 60, 0.14); }

.coupon-message {
    font-size: 13px;
    margin-top: 8px;
    min-height: 0;
}
.coupon-message.error { color: #ff8f8f; }
.coupon-message.success { color: #8fdcac; }

.discount-row .discount-value { color: #8fdcac !important; }
