/* Cart page — content layout; nav/footer/base use app.css */

.cart-page {
    background: var(--green-mist);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* Header / breadcrumbs */
.cart-head {
    text-align: center;
    padding: 54px 20px 14px;
}

.cart-head .crumbs {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-wrap: wrap;
    gap: 6px;
    font-size: 0.82rem;
    color: var(--slate-faint);
    margin-bottom: 22px;
}

.cart-head .crumbs a {
    color: var(--slate-faint);
    text-decoration: none;
}

.cart-head .crumbs a:hover {
    color: var(--green-deep);
    text-decoration: none;
}

.cart-head .crumbs .sep {
    color: var(--line);
    font-weight: 600;
}

.cart-head .crumbs .here {
    color: var(--slate);
    font-weight: 600;
}

.cart-head h1 {
    font-family: 'Poppins', sans-serif;
    font-weight: 800;
    font-size: clamp(2rem, 4vw, 2.9rem);
    letter-spacing: -1px;
    color: var(--slate);
}

.cart-head h1 em {
    font-style: normal;
    color: var(--green);
}

.cart-head p {
    color: var(--slate-soft);
    font-size: 1.02rem;
    margin-top: 8px;
}

/* Layout */
.cart-wrap {
    max-width: 1240px;
    margin: 0 auto;
    width: 100%;
    padding: 24px clamp(20px, 4vw, 40px) 64px;
    display: grid;
    grid-template-columns: 1fr 380px;
    gap: 28px;
    align-items: start;
}

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

/* Card */
.cart-card {
    background: #fff;
    border: 1px solid var(--line);
    border-radius: 18px;
    box-shadow: 0 14px 40px rgba(30, 42, 58, 0.05);
    overflow: hidden;
}

.cart-card-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 18px 22px;
    border-bottom: 1px solid var(--line-soft);
}

.cart-card-head h2 {
    font-family: 'Poppins', sans-serif;
    font-weight: 600;
    font-size: 1.05rem;
    color: var(--slate);
}

.cart-card-head .count {
    font-size: 0.82rem;
    font-weight: 600;
    color: var(--green-deep);
    background: var(--green-pale);
    padding: 4px 11px;
    border-radius: 20px;
}

/* Cart items */
.cart-items {
    display: flex;
    flex-direction: column;
}

.cart-item {
    display: grid;
    grid-template-columns: 54px 1fr auto auto;
    gap: 16px;
    align-items: center;
    padding: 18px 22px;
    border-bottom: 1px solid var(--line-soft);
    transition: background 0.2s;
}

.cart-item:last-child {
    border-bottom: none;
}

.cart-item:hover {
    background: var(--green-mist);
}

.cart-item .ic {
    width: 54px;
    height: 54px;
    border-radius: 13px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    flex-shrink: 0;
}

.cart-item .ic svg {
    width: 24px;
    height: 24px;
    stroke: #fff;
    fill: none;
    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.cart-item .info b {
    display: block;
    font-family: 'Poppins', sans-serif;
    font-weight: 600;
    font-size: 0.98rem;
    color: var(--slate);
}

.cart-item .info small {
    font-size: 0.84rem;
    color: var(--slate-faint);
}

.cart-item .badge {
    display: inline-block;
    margin-top: 4px;
    font-size: 0.7rem;
    font-weight: 700;
    letter-spacing: 0.4px;
    text-transform: uppercase;
    color: var(--green-deep);
    background: var(--green-pale);
    padding: 2px 8px;
    border-radius: 12px;
}

/* Qty */
.cart-qty {
    display: flex;
    align-items: center;
    border: 1.5px solid var(--line);
    border-radius: 9px;
    overflow: hidden;
}

.cart-qty button {
    width: 30px;
    height: 32px;
    border: none;
    background: #fff;
    color: var(--slate-soft);
    font-size: 1.1rem;
    cursor: pointer;
    transition: background 0.15s;
}

.cart-qty button:hover {
    background: var(--green-pale);
    color: var(--green-deep);
}

.cart-qty span {
    min-width: 30px;
    text-align: center;
    font-weight: 600;
    font-size: 0.92rem;
    color: var(--slate);
}

/* Price */
.cart-item .price {
    text-align: right;
    min-width: 96px;
}

.cart-item .price b {
    font-family: 'JetBrains Mono', monospace;
    font-weight: 600;
    font-size: 1rem;
    color: var(--slate);
    display: block;
}

.cart-item .price small {
    font-size: 0.74rem;
    color: var(--slate-faint);
}

/* Remove */
.cart-item .rm {
    background: none;
    border: none;
    cursor: pointer;
    color: var(--slate-faint);
    padding: 6px;
    border-radius: 8px;
    transition: all 0.15s;
    line-height: 0;
}

.cart-item .rm:hover {
    color: var(--red);
    background: rgba(226, 114, 91, 0.1);
}

.cart-item .rm svg {
    width: 17px;
    height: 17px;
    stroke: currentColor;
    fill: none;
    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round;
}

/* Empty state */
.cart-empty {
    display: none;
    flex-direction: column;
    align-items: center;
    text-align: center;
    padding: 56px 22px;
}

.cart-empty.show {
    display: flex;
}

.cart-empty svg {
    width: 60px;
    height: 60px;
    stroke: var(--slate-faint);
    fill: none;
    stroke-width: 1.4;
    margin-bottom: 16px;
}

.cart-empty b {
    font-family: 'Poppins', sans-serif;
    color: var(--slate);
    font-size: 1.1rem;
    margin-bottom: 4px;
}

.cart-empty p {
    font-size: 0.92rem;
    margin-bottom: 20px;
}

/* Upsells */
.cart-ups {
    margin-top: 26px;
}

.ups-title {
    display: flex;
    align-items: center;
    gap: 9px;
    font-family: 'Poppins', sans-serif;
    font-weight: 600;
    font-size: 1.05rem;
    color: var(--slate);
    margin-bottom: 6px;
}

.ups-title .spark {
    color: var(--amber);
}

.ups-sub {
    font-size: 0.9rem;
    color: var(--slate-faint);
    margin-bottom: 16px;
}

.ups-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 14px;
}

@media (max-width: 720px) {
    .ups-grid {
        grid-template-columns: 1fr;
    }
}

.ups-card {
    background: #fff;
    border: 1px solid var(--line);
    border-radius: 14px;
    padding: 18px;
    transition: all 0.2s;
    display: flex;
    flex-direction: column;
}

.ups-card:hover {
    border-color: var(--green);
    box-shadow: 0 10px 28px rgba(61, 190, 154, 0.12);
    transform: translateY(-2px);
}

.ups-card .ic {
    width: 42px;
    height: 42px;
    border-radius: 11px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 12px;
}

.ups-card .ic svg {
    width: 20px;
    height: 20px;
    stroke: #fff;
    fill: none;
    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.ups-card b {
    font-family: 'Poppins', sans-serif;
    font-weight: 600;
    font-size: 0.95rem;
    color: var(--slate);
}

.ups-card small {
    font-size: 0.82rem;
    color: var(--slate-faint);
    flex: 1;
    margin: 4px 0 14px;
}

.ups-card .foot {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.ups-card .p {
    font-family: 'JetBrains Mono', monospace;
    font-weight: 600;
    color: var(--slate);
    font-size: 0.95rem;
}

.ups-card .add {
    background: var(--green-pale);
    color: var(--green-deep);
    border: none;
    font-weight: 600;
    font-size: 0.84rem;
    padding: 8px 14px;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s;
}

.ups-card .add:hover {
    background: var(--green);
    color: #fff;
}

.ups-card .add.added {
    background: var(--slate);
    color: #fff;
    pointer-events: none;
}

/* Summary */
.cart-summary {
    position: sticky;
    top: 90px;
}

.cart-summary-body {
    padding: 22px;
}

.sum-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-size: 0.95rem;
    margin-bottom: 13px;
}

.sum-row span:first-child {
    color: var(--slate-soft);
}

.sum-row span:last-child {
    font-family: 'JetBrains Mono', monospace;
    font-weight: 600;
    color: var(--slate);
}

.sum-row.disc span {
    color: var(--green-deep);
}

.sum-divide {
    height: 1px;
    background: var(--line-soft);
    margin: 16px 0;
}

.sum-total {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    margin-bottom: 20px;
}

.sum-total span:first-child {
    font-family: 'Poppins', sans-serif;
    font-weight: 600;
    font-size: 1.05rem;
    color: var(--slate);
}

.sum-total span:last-child {
    font-family: 'Poppins', sans-serif;
    font-weight: 800;
    font-size: 1.7rem;
    color: var(--slate);
}

.sum-total .per {
    font-size: 0.8rem;
    font-weight: 500;
    color: var(--slate-faint);
}

/* Coupon */
.coupon {
    margin-bottom: 18px;
}

.coupon label {
    display: block;
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--slate);
    margin-bottom: 7px;
}

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

.coupon-row input {
    flex: 1;
    min-width: 0;
    padding: 11px 13px;
    border: 1.5px solid var(--line);
    border-radius: 9px;
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.86rem;
    text-transform: uppercase;
    color: var(--slate);
    background: #fff;
    transition: border-color 0.2s, box-shadow 0.2s;
}

.coupon-row input:focus {
    outline: none;
    border-color: var(--green);
    box-shadow: 0 0 0 3px rgba(61, 190, 154, 0.14);
}

.coupon-row input::placeholder {
    color: var(--slate-faint);
    text-transform: none;
    font-family: 'Inter', sans-serif;
}

.coupon-row button {
    background: var(--slate);
    color: #fff;
    border: none;
    padding: 0 18px;
    border-radius: 9px;
    font-weight: 600;
    font-size: 0.88rem;
    cursor: pointer;
    transition: background 0.2s;
    white-space: nowrap;
}

.coupon-row button:hover {
    background: var(--panel);
}

.coupon-msg {
    font-size: 0.82rem;
    margin-top: 8px;
    min-height: 18px;
    font-weight: 500;
}

.coupon-msg.ok {
    color: var(--green-deep);
}

.coupon-msg.err {
    color: var(--red);
}

.coupon-hint {
    font-size: 0.78rem;
    color: var(--slate-faint);
    margin-top: 8px;
}

.coupon-hint code {
    font-family: 'JetBrains Mono', monospace;
    background: var(--green-pale);
    color: var(--green-deep);
    padding: 1px 6px;
    border-radius: 5px;
    cursor: pointer;
    font-size: 0.74rem;
}

/* Applied tag */
.applied-tag {
    display: none;
    align-items: center;
    justify-content: space-between;
    background: var(--green-pale);
    border: 1px solid rgba(61, 190, 154, 0.3);
    border-radius: 9px;
    padding: 9px 12px;
    margin-bottom: 18px;
    font-size: 0.86rem;
}

.applied-tag.show {
    display: flex;
}

.applied-tag b {
    font-family: 'JetBrains Mono', monospace;
    color: var(--green-deep);
}

.applied-tag button {
    background: none;
    border: none;
    color: var(--slate-faint);
    cursor: pointer;
    font-size: 0.8rem;
    font-weight: 600;
}

.applied-tag button:hover {
    color: var(--red);
}

/* Checkout button */
.btn-checkout {
    width: 100%;
    background: var(--green);
    color: #fff;
    border: none;
    padding: 15px;
    border-radius: 11px;
    font-family: 'Inter', sans-serif;
    font-weight: 600;
    font-size: 1rem;
    cursor: pointer;
    box-shadow: 0 8px 24px rgba(61, 190, 154, 0.28);
    transition: all 0.25s;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    text-decoration: none;
}

.btn-checkout:hover {
    background: var(--green-deep);
    transform: translateY(-2px);
    box-shadow: 0 12px 32px rgba(61, 190, 154, 0.36);
}

.btn-checkout:disabled,
.btn-checkout.disabled {
    background: var(--line);
    color: var(--slate-faint);
    box-shadow: none;
    cursor: not-allowed;
    transform: none;
    pointer-events: none;
}

.btn-clear {
    width: 100%;
    background: none;
    border: none;
    color: var(--slate-faint);
    font-size: 0.85rem;
    font-weight: 500;
    padding: 12px;
    cursor: pointer;
    margin-top: 6px;
}

.btn-clear:hover {
    color: var(--red);
}

.cart-trust {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 7px;
    font-size: 0.8rem;
    color: var(--slate-faint);
    margin-top: 14px;
}

.cart-trust svg {
    width: 14px;
    height: 14px;
    stroke: var(--green-deep);
    fill: none;
    stroke-width: 2;
}

/* Mono helper */
.cart-page .mono {
    font-family: 'JetBrains Mono', monospace;
}

/* Compact footer (cart page) */
body.cart-page footer {
    background: var(--slate);
    color: rgba(255, 255, 255, 0.6);
    padding: 26px clamp(28px, 4vw, 64px);
    margin-top: 0;
}

body.cart-page .foot-row {
    max-width: 1320px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
    flex-wrap: wrap;
}

body.cart-page .foot-left {
    display: flex;
    align-items: center;
    gap: 16px;
    flex-wrap: wrap;
}

body.cart-page .foot-copy {
    font-size: 0.82rem;
    color: rgba(255, 255, 255, 0.5);
}

body.cart-page .foot-links {
    display: flex;
    gap: 18px;
    font-size: 0.84rem;
}

body.cart-page .foot-links a {
    color: rgba(255, 255, 255, 0.65);
    text-decoration: none;
}

body.cart-page .foot-links a:hover {
    color: var(--green-bright);
    text-decoration: none;
}
