/* ============================================================
   PneuPro — Cart Page Custom Styles
   Targets: shortcode cart with custom cart.php override
   ============================================================ */

/* ── 1. Page wrapper ──────────────────────────────────────── */

.pneu-cart-wrapper {
    width: 100%;
    box-sizing: border-box;
}

/* ── 2. Two-column layout ─────────────────────────────────── */

.pneu-cart-layout {
    display: flex;
    align-items: flex-start;
    gap: 28px;
    padding: 8px 0 40px;
}

.pneu-cart-main {
    flex: 2 1 420px;
    min-width: 0;
}

.pneu-cart-sidebar {
    flex: 1 1 300px;
    min-width: 280px;
    max-width: 380px;
    position: sticky;
    top: 24px;
}

/* ── 3. Cart item card ────────────────────────────────────── */

.pneu-cart-item {
    position: relative;
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 16px;
    background: #ffffff;
    border: 1px solid #F0F4F8;
    border-radius: 16px;
    padding: 18px 20px;
    margin-bottom: 12px;
    box-sizing: border-box;
}

/* ── 4. Thumbnail ─────────────────────────────────────────── */

.pneu-item-image {
    flex: 0 0 88px;
    width: 88px;
    height: 88px;
    border-radius: 12px;
    overflow: hidden;
    background: #F1F5F9;
    display: flex;
    align-items: center;
    justify-content: center;
}

.pneu-item-image img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    display: block;
}

.pneu-item-image a {
    display: flex;
    width: 100%;
    height: 100%;
}

/* ── 5. Product info ──────────────────────────────────────── */

.pneu-item-info {
    flex: 1 1 0;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 4px;
    padding-right: 32px;
}

.pneu-item-brand {
    font-size: 11px;
    font-weight: 700;
    color: #2563EB;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    line-height: 1;
}

.pneu-item-name {
    font-size: 15px;
    font-weight: 700;
    color: #0F172A;
    line-height: 1.35;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.pneu-item-name a {
    color: inherit;
    text-decoration: none;
}

.pneu-item-name a:hover {
    color: #2563EB;
}

.pneu-item-unit-price {
    font-size: 13px;
    color: #0c1118;
    font-weight: 500;
}

.pneu-per-unit {
    font-size: 12px;
    color: #0c1118;
    font-weight : 450;
}

/* ── 6. Right column: qty + subtotal ─────────────────────── */

.pneu-item-right {
    flex: 0 0 auto;
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 10px;
}

/* ── 7. Quantity stepper ──────────────────────────────────── */

.pneu-item-qty .quantity {
    display: flex;
    align-items: center;
    background: #F8FAFC;
    border: 1px solid #E2E8F0;
    border-radius: 50px;
    overflow: hidden;
    padding: 0;
    gap: 0;
    width: auto;
    height: auto;
}

/* Native number input */
.pneu-item-qty .quantity input.qty {
    width: 36px;
    text-align: center;
    border: none !important;
    background: transparent !important;
    font-size: 14px;
    font-weight: 600;
    color: #0F172A;
    padding: 6px 0 !important;
    -moz-appearance: textfield;
    appearance: textfield;
    outline: none;
    box-shadow: none !important;
}

.pneu-item-qty .quantity input.qty::-webkit-outer-spin-button,
.pneu-item-qty .quantity input.qty::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

/* +/- buttons — injected by woocommerce_before/after_quantity_input_field hooks */
.pneu-item-qty .quantity .minus,
.pneu-item-qty .quantity .plus {
    width: 32px;
    height: 32px;
    border: none;
    background: transparent;
    color: #64748B;
    font-size: 18px;
    font-weight: 400;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    line-height: 1;
    border-radius: 0;
    box-shadow: none;
    /* Override any single-product styles bleeding in */
    width: 32px !important;
    height: 32px !important;
    border-radius: 0 !important;
    box-shadow: none !important;
    transform: none !important;
}

.pneu-item-qty .quantity .minus:hover,
.pneu-item-qty .quantity .plus:hover {
    background: #E2E8F0 !important;
    color: #0F172A !important;
    transform: none !important;
}

/* ── 8. Line subtotal ─────────────────────────────────────── */

.pneu-item-subtotal {
    font-size: 16px;
    font-weight: 800;
    color: #2563EB;
    white-space: nowrap;
}

.pneu-item-subtotal .woocommerce-Price-amount {
    font-size: inherit;
    font-weight: inherit;
    color: inherit;
}

/* ── 9. Remove button ─────────────────────────────────────── */

.pneu-item-remove {
    position: absolute;
    top: 14px;
    right: 14px;
    width: 26px;
    height: 26px;
    border-radius: 50%;
    background: #F1F5F9;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    line-height: 1;
    color: #94A3B8;
    text-decoration: none;
    transition: background 0.15s, color 0.15s;
}

.pneu-item-remove:hover {
    background: #FEE2E2;
    color: #DC2626;
}

/* ── 10. Cart actions row ─────────────────────────────────── */

.pneu-cart-actions {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-top: 16px;
    flex-wrap: wrap;
    gap: 12px;
}

.pneu-continue-link {
    font-size: 14px;
    color: #2563EB;
    text-decoration: none;
    font-weight: 500;
}

.pneu-continue-link:hover {
    text-decoration: underline;
}

.pneu-update-btn {
    background: #ffffff;
    border: 1px solid #E2E8F0;
    border-radius: 50px;
    padding: 10px 22px;
    font-size: 14px;
    font-weight: 600;
    color: #0F172A;
    cursor: pointer;
    transition: border-color 0.15s;
}

.pneu-update-btn:hover {
    border-color: #2563EB;
    color: #2563EB;
}

/* ── 11. Sidebar — WC cart_totals output ──────────────────── */

.pneu-cart-sidebar .cart_totals {
    background: #ffffff;
    border: 1px solid #E2E8F0;
    border-radius: 20px;
    padding: 28px;
    box-sizing: border-box;
}

.pneu-cart-sidebar .cart_totals h2 {
    font-size: 20px;
    font-weight: 800;
    color: #0F172A;
    margin: 0 0 20px;
}

.pneu-cart-sidebar .cart_totals table.shop_table thead {
    display: none;
}

.pneu-cart-sidebar .cart_totals table.shop_table {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 0;
    border: none;
}

.pneu-cart-sidebar .cart_totals table.shop_table tr {
    border-bottom: 1px solid #F1F5F9;
}

.pneu-cart-sidebar .cart_totals table.shop_table tr:last-child {
    border-bottom: none;
}

.pneu-cart-sidebar .cart_totals table.shop_table th,
.pneu-cart-sidebar .cart_totals table.shop_table td {
    padding: 12px 0;
    font-size: 14px;
    color: #0F172A;
    border: none;
    background: none;
    vertical-align: middle;
}

.pneu-cart-sidebar .cart_totals table.shop_table th {
    font-weight: 500;
    color: #64748B;
    width: 50%;
}

/* Free shipping */
.pneu-cart-sidebar .cart_totals .woocommerce-shipping-destination,
.pneu-cart-sidebar .cart_totals ul#shipping_method li {
    color: #16A34A;
    font-weight: 600;
    font-size: 14px;
    list-style: none;
    padding: 0;
    margin: 0;
}

/* Order total row */
.pneu-cart-sidebar .cart_totals tr.order-total th {
    font-size: 17px;
    font-weight: 800;
    color: #0F172A;
}

.pneu-cart-sidebar .cart_totals tr.order-total td {
    font-size: 24px;
    font-weight: 900;
    color: #2563EB;
    text-align: right;
}

.pneu-cart-sidebar .cart_totals tr.order-total td .woocommerce-Price-amount {
    font-size: inherit;
    font-weight: inherit;
    color: inherit;
}

/* Tax notice */
.pneu-cart-sidebar .cart_totals tr.order-total td small.includes_tax {
    display: block;
    font-size: 11px;
    font-weight: 400;
    color: #94A3B8;
    margin-top: 2px;
}

/* Checkout button */
.pneu-cart-sidebar .wc-proceed-to-checkout .checkout-button,
.pneu-cart-sidebar .wc-proceed-to-checkout a.button {
    display: block;
    width: 100%;
    background: #2563EB !important;
    color: #ffffff !important;
    border: none !important;
    border-radius: 50px !important;
    padding: 16px 24px !important;
    font-size: 15px !important;
    font-weight: 700 !important;
    text-align: center !important;
    text-decoration: none !important;
    letter-spacing: 0.04em;
    cursor: pointer;
    box-sizing: border-box;
    transition: background 0.15s;
    margin-top: 20px;
}

.pneu-cart-sidebar .wc-proceed-to-checkout .checkout-button:hover,
.pneu-cart-sidebar .wc-proceed-to-checkout a.button:hover {
    background: #1d4ed8 !important;
}

.pneu-cart-sidebar .woocommerce-shipping-destination {
    display: none !important;
}

/* ── Empty Cart State ─────────────────────────────────────── */

.pneu-cart-empty {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 64px 24px;
    background: #ffffff;
    border: 1px solid #F0F4F8;
    border-radius: 20px;
    margin: 16px 0 40px;
}

.pneu-cart-empty__icon {
    font-size: 64px;
    margin-bottom: 24px;
    line-height: 1;
}

.pneu-cart-empty__title {
    font-size: 22px;
    font-weight: 800;
    color: #0F172A;
    margin: 0 0 12px;
}

.pneu-cart-empty__subtitle {
    font-size: 15px;
    color: #94A3B8;
    margin: 0 0 32px;
    max-width: 340px;
    line-height: 1.6;
}

.pneu-cart-empty__btn {
    display: inline-block;
    background: #2563EB;
    color: #ffffff !important;
    text-decoration: none !important;
    border-radius: 50px;
    padding: 14px 32px;
    font-size: 15px;
    font-weight: 700;
    letter-spacing: 0.03em;
    transition: background 0.15s;
}

.pneu-cart-empty__btn:hover {
    background: #1d4ed8;
}

/* Hide the default WC empty cart notice that may still render */
.woocommerce-info.woocommerce-cart-empty-notice,
.wc-empty-cart-message {
    display: none !important;
}

/* ── Empty cart perks row ─────────────────────────────────── */

.pneu-cart-empty__perks {
    display: flex;
    gap: 24px;
    margin-bottom: 32px;
    flex-wrap: wrap;
    justify-content: center;
}

.pneu-cart-empty__perk {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
    font-weight: 600;
    color: #64748B;
    background: #F8FAFC;
    border: 1px solid #E2E8F0;
    border-radius: 50px;
    padding: 8px 16px;
}

.pneu-perk-icon {
    font-size: 16px;
    line-height: 1;
}

/* ── Undo / item removed notice ───────────────────────────── */

/* WC outputs this as .woocommerce-message inside .woocommerce */
.pneu-cart-empty ~ .woocommerce-message,
.woocommerce-cart .woocommerce-message {
    display: none !important; /* hide default */
}

/* We re-implement it as a styled banner via the rule below */
/* WC also outputs it before the cart wrapper as .wc-block-components-notice */
/* For shortcode cart it appears as ul.woocommerce-error or div.woocommerce-message */

/* ── Cart notices (added / removed / undo) ────────────────── */

.woocommerce-cart .woocommerce-notices-wrapper .woocommerce-message {
    display: flex !important;
    align-items: center !important;
    gap: 12px !important;
    background: #F0FDF4 !important;
    border: 1px solid #BBF7D0 !important;
    border-top: 1px solid #BBF7D0 !important;
    border-radius: 14px !important;
    padding: 14px 20px 14px 52px !important; /* left padding makes room for bg icon */
    margin-bottom: 20px !important;
    font-size: 14px !important;
    font-weight: 500 !important;
    color: #15803D !important;
    box-shadow: none !important;
    list-style: none !important;
    /* SVG checkmark circle as background — no pseudo-element needed */
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='28' height='28' viewBox='0 0 28 28'%3E%3Ccircle cx='14' cy='14' r='14' fill='%2316A34A'/%3E%3Cpath d='M8 14l4 4 8-8' stroke='white' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round' fill='none'/%3E%3C/svg%3E") !important;
    background-repeat: no-repeat !important;
    background-position: 16px center !important;
    background-size: 24px 24px !important;
}

/* Kill the ::before entirely */
.woocommerce-cart .woocommerce-notices-wrapper .woocommerce-message::before {
    display: none !important;
    content: none !important;
}

/* Undo / restore link */
.woocommerce-cart .woocommerce-notices-wrapper .woocommerce-message a.restore-item {
    margin-left: auto !important;
    font-size: 13px !important;
    font-weight: 700 !important;
    color: #2563EB !important;
    text-decoration: none !important;
    background: #DBEAFE !important;
    padding: 6px 14px !important;
    border-radius: 50px !important;
    white-space: nowrap !important;
    flex-shrink: 0 !important;
}

.woocommerce-cart .woocommerce-notices-wrapper .woocommerce-message a.restore-item:hover {
    background: #BFDBFE !important;
}

/* Hide WC's default "Continue shopping" button in the notice */
.woocommerce-cart .woocommerce-notices-wrapper .woocommerce-message a.button {
    display: none !important;
}
.entry-title {
    display: none !important;
}

/* ── 12. Mobile ───────────────────────────────────────────── */

@media (max-width: 768px) {

    .pneu-cart-layout {
        flex-direction: column;
        gap: 20px;
        padding-bottom: 32px;
    }

    .pneu-cart-main,
    .pneu-cart-sidebar {
        width: 100%;
        flex: none;
        min-width: 0;
        max-width: 100%;
    }

    .pneu-cart-sidebar {
        position: static;
    }

    /* Card: allow qty row to wrap */
    .pneu-cart-item {
        flex-wrap: wrap;
        padding: 14px;
        gap: 12px;
        align-items: flex-start;
    }

    .pneu-item-image {
        flex: 0 0 72px;
        width: 72px;
        height: 72px;
    }

    .pneu-item-info {
        flex: 1 1 120px;
        padding-right: 30px;
        white-space: normal;
    }

    .pneu-item-name {
        white-space: normal;
    }

    /* Qty + subtotal: full-width second row */
    .pneu-item-right {
        flex: 0 0 100%;
        flex-direction: row;
        justify-content: space-between;
        align-items: center;
        padding-top: 12px;
        border-top: 1px solid #F1F5F9;
    }

    .pneu-cart-actions {
        flex-direction: column;
        align-items: flex-start;
    }

    .pneu-update-btn {
        width: 100%;
        text-align: center;
    }
}
