/* ============================================================
   PUPstreat – Cart Widget  |  cart.css
   ============================================================ */

/* ── Wrap ── */
.pupc-wrap {
    background-color: #faf6f1;
    padding: 32px 0;
    width: 100%;
    box-sizing: border-box;
}

/* ── Two-column grid ── */
.pupc-grid {
    display: grid;
    grid-template-columns: 1fr 380px;
    gap: 24px;
    align-items: start;
    max-width: 1100px;
    margin: 0 auto;
    box-sizing: border-box;
}

/* ── Shared card ── */
.pupc-card {
    background: #ffffff;
    border-radius: 16px;
    overflow: hidden;
    box-sizing: border-box;
}

/* ── Empty state ── */
.pupc-empty {
    text-align: center;
    padding: 80px 24px;
    color: #2a1f1a;
    font-size: 17px;
}

/* ============================================================
   CART ITEMS (left card)
   ============================================================ */

.pupc-item {
    display: flex;
    align-items: flex-start;
    gap: 16px;
    padding: 20px 24px;
    border-bottom: 1px solid #ede8e3;
    position: relative;
}

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

/* Thumbnail */
.pupc-thumb {
    flex-shrink: 0;
    width: 82px;
    height: 82px;
    border-radius: 12px;
    overflow: hidden;
    display: block;
    background: #f5f0eb;
}

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

.pupc-no-img {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 28px;
    background: #f5f0eb;
}

/* Item info */
.pupc-item-info {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.pupc-item-name {
    font-size: 15px;
    font-weight: 700;
    color: #2a1f1a;
    text-decoration: none;
    line-height: 1.3;
    display: block;
}

.pupc-item-name:hover {
    color: #8b5c3e;
}

.pupc-item-desc {
    font-size: 13px;
    color: #8b7b74;
    line-height: 1.4;
    display: block;
}

/* Qty stepper */
.pupc-qty-stepper {
    display: inline-flex;
    align-items: center;
    border: 1.5px solid #ede8e3;
    border-radius: 999px;
    overflow: hidden;
    margin-top: 10px;
    width: fit-content;
    background: #fff;
}

.pupc-qty-btn {
    width: 34px;
    height: 34px;
    background: transparent;
    border: none;
    font-size: 18px;
    line-height: 1;
    color: #2a1f1a;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    text-transform: none !important;
    padding: 0;
    transition: background 0.15s;
}

.pupc-qty-btn:hover {
    background: #f5f0eb;
}

.pupc-qty-num {
    min-width: 28px;
    text-align: center;
    font-size: 14px;
    font-weight: 600;
    color: #2a1f1a;
    user-select: none;
}

/* Right side: price + delete */
.pupc-item-right {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 8px;
    flex-shrink: 0;
}

.pupc-remove-btn {
    background: none;
    border: none;
    padding: 4px;
    cursor: pointer;
    color: #b0a49e;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 6px;
    transition: color 0.15s, background 0.15s;
    line-height: 1;
}

.pupc-remove-btn:hover {
    color: #c0392b;
    background: #fdf0ef;
}

.pupc-item-price {
    font-size: 16px;
    font-weight: 700;
    color: #2a1f1a;
    margin-top: auto;
}

/* ============================================================
   ORDER SUMMARY (right card)
   ============================================================ */

.pupc-summary-card {
    padding: 24px;
    display: flex;
    flex-direction: column;
    gap: 0;
}

.pupc-summary-heading {
    font-size: 18px;
    font-weight: 700;
    color: #2a1f1a;
    margin: 0 0 16px 0;
    padding: 0;
    border: none;
}

/* Summary rows */
.pupc-summary-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 0;
    border-bottom: 1px solid #ede8e3;
    font-size: 14px;
}

.pupc-summary-row:last-of-type {
    border-bottom: none;
}

.pupc-row-label {
    color: #8b7b74;
    font-weight: 400;
}

.pupc-row-value {
    color: #2a1f1a;
    font-weight: 500;
}

/* Discount row */
.pupc-discount-val {
    color: #6b8f5e !important;
    font-weight: 600 !important;
}

/* Shipping free */
.pupc-shipping-val strong {
    color: #6b8f5e;
    font-weight: 700;
}

/* Total row */
.pupc-total-row {
    padding: 16px 0 !important;
    border-bottom: none !important;
}

.pupc-total-label {
    font-size: 16px !important;
    font-weight: 700 !important;
    color: #2a1f1a !important;
}

.pupc-total-val {
    font-size: 18px !important;
    font-weight: 800 !important;
    color: #2a1f1a !important;
}

/* Promo code */
.pupc-promo-wrap {
    border-top: 1px solid #ede8e3;
    padding-top: 14px;
    margin-top: 4px;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.pupc-promo-toggle {
    background: none;
    border: none;
    padding: 0;
    font-size: 13px;
    color: #8b7b74;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    text-align: left;
    text-transform: none !important;
    transition: color 0.15s;
}

.pupc-promo-toggle:hover { color: #2a1f1a; }

.pupc-promo-toggle svg {
    transition: transform 0.2s;
    flex-shrink: 0;
}

.pupc-promo-toggle[aria-expanded="true"] svg {
    transform: rotate(90deg);
}

.pupc-promo-body {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

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

.pupc-promo-input {
    flex: 1;
    border: 1.5px solid #ede8e3;
    border-radius: 8px;
    padding: 10px 12px;
    font-size: 13px;
    color: #2a1f1a;
    outline: none;
    background: #faf6f1;
    font-family: inherit;
    transition: border-color 0.15s;
}

.pupc-promo-input:focus { border-color: #8b5c3e; }

.pupc-promo-apply {
    background: #2a1f1a;
    color: #ffffff;
    border: none;
    border-radius: 8px;
    padding: 10px 16px;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    white-space: nowrap;
    text-transform: none !important;
    font-family: inherit;
    transition: background 0.15s;
}

.pupc-promo-apply:hover { background: #5c3a2a; }

.pupc-promo-msg {
    font-size: 12px;
    margin: 0;
    min-height: 16px;
    color: #8b7b74;
}

.pupc-promo-msg.success { color: #6b8f5e; }
.pupc-promo-msg.error   { color: #c0392b; }

/* Checkout button */
.pupc-checkout-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: #2a1f1a;
    color: #ffffff !important;
    text-decoration: none !important;
    font-size: 15px;
    font-weight: 700;
    padding: 16px 20px;
    border-radius: 999px;
    text-align: center;
    margin-top: 16px;
    transition: background-color 0.2s;
    text-transform: none !important;
    letter-spacing: normal !important;
    cursor: pointer;
    border: none;
    font-family: inherit;
    width: 100%;
    box-sizing: border-box;
    line-height: 1.4;
}

.pupc-checkout-btn:hover {
    background-color: #5c3a2a;
    color: #ffffff !important;
}

/* Continue shopping */
.pupc-continue {
    display: block;
    text-align: center;
    font-size: 13px;
    color: #8b7b74;
    text-decoration: none;
    margin-top: 12px;
    transition: color 0.15s;
    text-transform: none !important;
}

.pupc-continue:hover { color: #2a1f1a; }

/* Trust badges */
.pupc-trust {
    border-top: 1px solid #ede8e3;
    margin-top: 16px;
    padding-top: 16px;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.pupc-trust-item {
    display: flex;
    align-items: center;
    gap: 9px;
    font-size: 13px;
    color: #5a4a42;
}

.pupc-trust-item svg {
    color: #8b7b74;
    flex-shrink: 0;
}

/* Loading overlay */
.pupc-loading {
    opacity: 0.5;
    pointer-events: none;
    transition: opacity 0.2s;
}

/* ============================================================
   RESPONSIVE
   ============================================================ */

@media (max-width: 860px) {
    .pupc-grid {
        grid-template-columns: 1fr;
    }
    .pupc-summary-card {
        order: -1; /* summary on top on mobile */
    }
}

@media (max-width: 600px) {
    .pupc-wrap { padding: 20px 0; }

    .pupc-item { padding: 16px; gap: 12px; }

    .pupc-thumb { width: 68px; height: 68px; }

    .pupc-item-name { font-size: 14px; }
    .pupc-item-desc { font-size: 12px; }

    .pupc-item-price { font-size: 15px; }

    .pupc-summary-card { padding: 20px; }

    .pupc-summary-heading { font-size: 16px; }

    .pupc-checkout-btn { font-size: 14px; padding: 14px; }
}
