/* ===================================================
 * ABCISSE CART WIDGET
 * =================================================== */
.pcart-wrapper {
    --pcart-accent: #0073e6;
    width: 100%;
    max-width: 1240px;
    margin: 0 auto;
    padding: 50px 20px;
}
.pcart-notice {
    text-align: center;
    padding: 40px;
    background: #fef3c7;
    border: 1px solid #fcd34d;
    border-radius: 8px;
    color: #92400e;
}

.pcart-page-title {
    font-size: 32px;
    font-weight: 700;
    color: #0f172a;
    margin: 0 0 40px;
    letter-spacing: -0.015em;
}

/* ===== ÉTAT VIDE ===== */
.pcart-empty {
    text-align: center;
    padding: 80px 20px;
    background: #ffffff;
    border-radius: 16px;
    border: 1px solid #e5e7eb;
}
.pcart-empty-icon {
    width: 100px;
    height: 100px;
    margin: 0 auto 24px;
    color: var(--pcart-accent);
    opacity: 0.4;
}
.pcart-empty-icon svg { width: 100%; height: 100%; }
.pcart-empty-title {
    font-size: 24px;
    font-weight: 700;
    color: #0f172a;
    margin: 0 0 12px;
}
.pcart-empty-text {
    font-size: 16px;
    color: #5a6068;
    margin: 0 0 30px;
}
.pcart-empty-btn {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 14px 28px;
    background: var(--pcart-accent);
    color: #ffffff;
    text-decoration: none;
    border-radius: 8px;
    font-weight: 700;
    font-size: 15px;
    transition: all 0.3s ease;
    box-shadow: 0 8px 20px rgba(0, 115, 230, 0.2);
}
.pcart-empty-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 12px 28px rgba(0, 115, 230, 0.3);
    color: #fff;
}

/* ===== GRID ===== */
.pcart-grid { display: block; }
.pcart-items {
    background: #ffffff;
    border-radius: 16px;
    border: 1px solid #e5e7eb;
    padding: 28px;
}

/* ===== STYLING DU SHORTCODE WC ===== */

/* Table panier */
.pcart-items .woocommerce-cart-form {
    margin: 0;
}
.pcart-items .shop_table {
    width: 100%;
    border-collapse: collapse;
    border: 0 !important;
    background: transparent;
}
.pcart-items .shop_table thead {
    border-bottom: 1px solid #e5e7eb;
}
.pcart-items .shop_table th {
    background: transparent !important;
    color: #94a3b8 !important;
    font-size: 12px !important;
    font-weight: 700 !important;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    text-align: left;
    padding: 14px 12px !important;
    border: 0 !important;
}
.pcart-items .shop_table .product-remove { width: 40px; text-align: center; }
.pcart-items .shop_table .product-thumbnail { width: 80px; }

.pcart-items .shop_table tbody tr {
    border-bottom: 1px solid #f1f5f9;
}
.pcart-items .shop_table tbody tr.cart_item:last-child { border-bottom: 0; }

.pcart-items .shop_table td {
    padding: 20px 12px !important;
    border: 0 !important;
    vertical-align: middle;
    background: transparent !important;
}

/* Remove button */
.pcart-items .product-remove a.remove {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: #f1f5f9;
    color: #5a6068 !important;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.25s ease;
    border: 0;
}
.pcart-items .product-remove a.remove:hover {
    background: #ef4444 !important;
    color: #ffffff !important;
}

/* Thumbnail */
.pcart-items .product-thumbnail img {
    width: 64px;
    height: 64px;
    object-fit: cover;
    border-radius: 8px;
    border: 1px solid #e5e7eb;
}

/* Product name */
.pcart-items .product-name {
    font-weight: 600;
    color: #0f172a;
}
.pcart-items .product-name a {
    color: inherit;
    text-decoration: none;
    transition: color 0.3s;
}
.pcart-items .product-name a:hover {
    color: var(--pcart-accent);
}
.pcart-items .product-name .variation {
    font-size: 12px;
    color: #5a6068;
    margin-top: 4px;
    font-weight: 400;
}

/* Price */
.pcart-items .product-price,
.pcart-items .product-subtotal {
    color: #0f172a;
    font-weight: 600;
}
.pcart-items .product-price .amount,
.pcart-items .product-subtotal .amount {
    font-weight: 600;
}

/* Quantity input */
.pcart-items .quantity {
    display: inline-flex;
    align-items: stretch;
    border: 1.5px solid #e5e7eb;
    border-radius: 8px;
    overflow: hidden;
    background: #fff;
}
.pcart-items .quantity input.qty {
    width: 60px;
    text-align: center;
    border: 0 !important;
    background: transparent !important;
    padding: 8px 4px !important;
    font-size: 14px !important;
    font-weight: 600 !important;
    color: #0f172a !important;
    font-family: inherit !important;
    -moz-appearance: textfield;
    box-shadow: none !important;
}
.pcart-items .quantity input.qty::-webkit-outer-spin-button,
.pcart-items .quantity input.qty::-webkit-inner-spin-button {
    -webkit-appearance: none; margin: 0;
}

/* Coupon + update buttons row */
.pcart-items .actions {
    padding-top: 20px !important;
    border-top: 1px solid #f1f5f9;
}
.pcart-items .coupon {
    display: inline-flex;
    align-items: stretch;
    gap: 0;
    margin-right: 12px;
}
.pcart-items .coupon label { display: none; }
.pcart-items .coupon input[type="text"] {
    border: 1.5px solid #e5e7eb !important;
    border-right: 0 !important;
    border-radius: 8px 0 0 8px !important;
    padding: 10px 14px !important;
    font-size: 14px !important;
    width: 200px;
    background: #fff;
    color: #0f172a;
    font-family: inherit;
    box-shadow: none !important;
}
.pcart-items .coupon input[type="text"]:focus {
    outline: none;
    border-color: var(--pcart-accent) !important;
}
.pcart-items .coupon button,
.pcart-items .actions button[name="update_cart"] {
    border: 0 !important;
    padding: 10px 20px !important;
    font-size: 14px !important;
    font-weight: 600 !important;
    cursor: pointer;
    font-family: inherit !important;
    line-height: 1 !important;
    transition: background-color 0.3s ease !important;
    text-transform: none !important;
}
.pcart-items .coupon button {
    background: #0f172a !important;
    color: #fff !important;
    border-radius: 0 8px 8px 0 !important;
}
.pcart-items .coupon button:hover { background: var(--pcart-accent) !important; }
.pcart-items .actions button[name="update_cart"] {
    background: #f1f5f9 !important;
    color: #0f172a !important;
    border-radius: 8px !important;
    margin-left: 8px;
}
.pcart-items .actions button[name="update_cart"]:hover { background: #e2e8f0 !important; }

/* Cart totals */
.pcart-items .cart-collaterals {
    margin-top: 30px;
    padding-top: 30px;
    border-top: 1px solid #e5e7eb;
}
.pcart-items .cart_totals {
    background: #f8fafc;
    padding: 30px;
    border-radius: 12px;
    width: 100% !important;
    max-width: 480px;
    margin-left: auto;
    float: none !important;
}
.pcart-items .cart_totals h2 {
    font-size: 20px !important;
    font-weight: 700 !important;
    color: #0f172a !important;
    margin: 0 0 20px !important;
    border: 0 !important;
}
.pcart-items .cart_totals table {
    width: 100% !important;
    border: 0 !important;
}
.pcart-items .cart_totals table tr {
    border-bottom: 1px solid #e5e7eb;
}
.pcart-items .cart_totals table tr:last-child { border-bottom: 0; }
.pcart-items .cart_totals table th,
.pcart-items .cart_totals table td {
    padding: 14px 0 !important;
    border: 0 !important;
    background: transparent !important;
    font-size: 14px;
    color: #5a6068;
}
.pcart-items .cart_totals table th {
    color: #0f172a !important;
    font-weight: 600 !important;
    width: 50%;
}
.pcart-items .cart_totals .order-total td,
.pcart-items .cart_totals .order-total th {
    font-size: 18px !important;
    color: #0f172a !important;
    font-weight: 700 !important;
}
.pcart-items .cart_totals .amount { font-weight: inherit; }

/* Shipping methods */
.pcart-items .cart_totals .shipping ul#shipping_method {
    margin: 0;
    list-style: none;
    padding: 0;
}
.pcart-items .cart_totals .shipping ul#shipping_method li {
    margin-bottom: 6px;
    font-size: 14px;
}
.pcart-items .cart_totals .shipping ul#shipping_method label {
    cursor: pointer;
}
.pcart-items .woocommerce-shipping-calculator { margin-top: 10px; }
.pcart-items .shipping-calculator-button {
    color: var(--pcart-accent);
    text-decoration: none;
    font-size: 13px;
    font-weight: 600;
}
.pcart-items .shipping-calculator-button:hover { text-decoration: underline; }

/* Proceed to checkout button */
.pcart-items .wc-proceed-to-checkout {
    padding: 20px 0 0 !important;
    margin-top: 8px;
    border-top: 1px solid #e5e7eb;
}
.pcart-items .wc-proceed-to-checkout .checkout-button,
.pcart-checkout-btn {
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 10px !important;
    width: 100% !important;
    padding: 16px 24px !important;
    background: #0f172a !important;
    color: #ffffff !important;
    border: 0 !important;
    border-radius: 10px !important;
    font-size: 15px !important;
    font-weight: 700 !important;
    text-decoration: none !important;
    text-transform: none !important;
    transition: all 0.3s ease !important;
    box-shadow: 0 8px 20px rgba(15, 23, 42, 0.15) !important;
    font-family: inherit !important;
    line-height: 1 !important;
    height: auto !important;
}
.pcart-items .wc-proceed-to-checkout .checkout-button:hover {
    background: var(--pcart-accent) !important;
    transform: translateY(-2px);
    box-shadow: 0 12px 28px rgba(0, 115, 230, 0.3) !important;
}

/* Continue shopping */
.pcart-continue {
    margin-top: 20px;
    text-align: center;
}
.pcart-continue-link {
    color: var(--pcart-accent);
    text-decoration: none;
    font-weight: 600;
    font-size: 14px;
    transition: opacity 0.3s;
}
.pcart-continue-link:hover { opacity: 0.7; }

/* Cross-sells */
.pcart-items .cross-sells {
    margin-top: 50px !important;
    padding-top: 40px !important;
    border-top: 1px solid #e5e7eb;
    width: 100% !important;
    float: none !important;
}
.pcart-items .cross-sells > h2 {
    font-size: 20px !important;
    font-weight: 700 !important;
    color: #0f172a !important;
    margin-bottom: 20px !important;
    border: 0 !important;
}

/* WC Messages */
.pcart-items .woocommerce-message,
.pcart-items .woocommerce-info,
.pcart-items .woocommerce-error,
.pcart-items .woocommerce-notice {
    background: #f0fdf4 !important;
    color: #166534 !important;
    border: 1px solid #bbf7d0 !important;
    border-radius: 8px !important;
    padding: 14px 18px !important;
    font-size: 14px !important;
    margin-bottom: 20px !important;
}
.pcart-items .woocommerce-error,
.pcart-items .woocommerce-notice.notice-error {
    background: #fef2f2 !important;
    color: #b91c1c !important;
    border-color: #fecaca !important;
}
.pcart-items .woocommerce-info {
    background: #eff6ff !important;
    color: #1d4ed8 !important;
    border-color: #bfdbfe !important;
}

/* ===== LAYOUT SPLIT (items + totals côte-à-côte sur grand écran) ===== */
@media (min-width: 1024px) {
    .pcart-layout-split .pcart-items .cart-collaterals {
        position: sticky;
        top: 100px;
    }
}

/* RESPONSIVE */
@media (max-width: 768px) {
    .pcart-wrapper { padding: 30px 16px; }
    .pcart-page-title { font-size: 24px; margin-bottom: 24px; }
    .pcart-items { padding: 20px 14px; }
    .pcart-items .shop_table thead { display: none; }
    .pcart-items .shop_table tbody tr {
        display: grid;
        grid-template-columns: 80px 1fr;
        grid-template-areas:
            "thumb name name"
            "thumb price qty"
            "thumb subtotal subtotal"
            "remove remove remove";
        gap: 8px 12px;
        padding: 16px 0;
    }
    .pcart-items .shop_table td { padding: 4px 0 !important; }
    .pcart-items .product-thumbnail { grid-area: thumb; }
    .pcart-items .product-name { grid-area: name; }
    .pcart-items .product-price { grid-area: price; font-size: 14px; }
    .pcart-items .product-quantity { grid-area: qty; }
    .pcart-items .product-subtotal { grid-area: subtotal; font-size: 16px; font-weight: 700; }
    .pcart-items .product-remove { grid-area: remove; text-align: right; }
    .pcart-items .product-price::before { content: 'Prix : '; font-size: 11px; color: #94a3b8; text-transform: uppercase; letter-spacing: 0.1em; display: inline-block; margin-right: 6px; }
    .pcart-items .product-subtotal::before { content: 'Total : '; font-size: 11px; color: #94a3b8; text-transform: uppercase; letter-spacing: 0.1em; display: inline-block; margin-right: 6px; font-weight: 600; }

    .pcart-items .actions { display: flex; flex-direction: column; gap: 12px; }
    .pcart-items .coupon { width: 100%; }
    .pcart-items .coupon input[type="text"] { flex: 1; width: auto !important; }
    .pcart-items .actions button[name="update_cart"] { width: 100%; margin: 0 !important; }

    .pcart-items .cart_totals { padding: 20px; max-width: 100%; }
}
