/* =========================================================
   Wholesale BD Premium Cart Page (pp-)
   Mobile-first, fully responsive, no horizontal scroll
   ======================================================= */


:root {
    --pp-pink:       #FA5053;
    --pp-pink-dark:  #E63A3D;
    --pp-pink-light: #FFF1F1;
    --pp-pink-soft:  #FFE3E3;
    --pp-dark:       #111111;
    --pp-text:       #1e293b;
    --pp-muted:      #64748b;
    --pp-border:     #e2e8f0;
    --pp-radius:     14px;
    --pp-font-en:    'Poppins', sans-serif;
    --pp-font-bn:    'Anek Bangla', sans-serif;
}

/* Hide the default WooCommerce cart wrapper noise so only our layout shows */
html, body { overflow-x: hidden !important; }

body.woocommerce-cart .page-title,
body.woocommerce-cart .theme-page-header,
body.woocommerce-cart .entry-header,
body.woocommerce-cart h1.entry-title { display: none !important; }

body.woocommerce-cart .woocommerce {
    max-width: 1200px !important;
    margin: 0 auto 60px !important;
    padding: 0 15px !important;
    box-sizing: border-box !important;
    width: 100% !important;
}

.pp-cart-wrap, .pp-cart-wrap * { box-sizing: border-box; }

.pp-cart-wrap {
    width: 100%;
    font-family: var(--pp-font-bn), var(--pp-font-en), sans-serif;
    padding: 28px 0 40px 0;
}

/* ---------- Heading ---------- */
.pp-cart-heading { margin-bottom: 24px; }
.pp-cart-heading-title {
    font-family: var(--pp-font-en), var(--pp-font-bn), sans-serif;
    font-size: 30px;
    font-weight: 800;
    color: var(--pp-dark);
    margin: 0 0 6px 0;
}
.pp-cart-heading-count { font-size: 14px; color: var(--pp-muted); margin: 0; }

/* ---------- Layout Grid ---------- */
.pp-cart-grid {
    display: flex;
    flex-direction: column;
    gap: 24px;
    width: 100%;
    align-items: flex-start;
}

@media (min-width: 992px) {
    .pp-cart-grid { flex-direction: row; gap: 30px; }
    .pp-cart-items-col { flex: 1 1 62%; width: 62%; min-width: 0; }
    .pp-cart-summary-col { flex: 1 1 34%; width: 34%; }
}

.pp-cart-items-col, .pp-cart-summary-col { width: 100%; }

/* ---------- Items List ---------- */
.pp-cart-items {
    display: flex;
    flex-direction: column;
    gap: 14px;
    width: 100%;
}

.pp-cart-item {
    display: flex;
    gap: 14px;
    background: #ffffff;
    border: 1px solid var(--pp-border);
    border-radius: var(--pp-radius);
    padding: 16px;
    width: 100%;
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.04);
    transition: opacity 0.25s ease;
}

.pp-cart-item.pp-item-loading { opacity: 0.5; pointer-events: none; }

.pp-item-thumb {
    flex-shrink: 0;
    width: 84px;
    height: 84px;
    border-radius: 10px;
    overflow: hidden;
    border: 1px solid var(--pp-border);
    background: #fafafa;
}
.pp-item-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; border-radius: 0; }

.pp-item-body { flex: 1 1 auto; min-width: 0; display: flex; flex-direction: column; }

.pp-item-top {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 10px;
}

.pp-item-name {
    font-size: 15px;
    font-weight: 700;
    color: var(--pp-dark);
    line-height: 1.4;
    text-decoration: none;
    word-break: break-word;
}
.pp-item-name:hover { color: var(--pp-pink); }

.pp-item-remove {
    flex-shrink: 0;
    width: 32px;
    height: 32px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: var(--pp-pink-light);
    border: none;
    border-radius: 8px;
    color: var(--pp-pink);
    cursor: pointer;
    transition: background 0.2s ease, color 0.2s ease;
}
.pp-item-remove:hover { background: var(--pp-pink); color: #fff; }
.pp-item-remove svg { width: 16px; height: 16px; }

.pp-item-meta {
    font-size: 12px;
    color: var(--pp-muted);
    margin-top: 4px;
}
.pp-item-meta p { margin: 0; }

.pp-item-price-mobile {
    display: none;
    font-size: 15px;
    font-weight: 700;
    color: var(--pp-pink);
    margin-top: 6px;
}

.pp-item-bottom {
    margin-top: auto;
    padding-top: 12px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    flex-wrap: wrap;
}

.pp-qty {
    display: inline-flex;
    align-items: center;
    border: 1.5px solid var(--pp-border);
    border-radius: 8px;
    background: #fff;
    height: 36px;
    overflow: hidden;
    flex-shrink: 0;
}
.pp-qty-btn {
    width: 34px;
    height: 100%;
    background: #fafafa;
    border: none;
    font-size: 18px;
    font-weight: 700;
    color: var(--pp-dark);
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s ease;
}
.pp-qty-btn:hover { background: var(--pp-pink-soft); color: var(--pp-pink-dark); }
.pp-qty-val {
    width: 38px;
    height: 100%;
    border: none;
    border-left: 1.5px solid var(--pp-border);
    border-right: 1.5px solid var(--pp-border);
    text-align: center;
    font-size: 14px;
    font-weight: 700;
    color: var(--pp-dark);
    background: transparent;
    pointer-events: none;
}

.pp-item-linetotal {
    font-size: 16px;
    font-weight: 800;
    color: var(--pp-dark);
    white-space: nowrap;
}

/* ---------- Order Summary ---------- */
.pp-summary-card {
    background: #ffffff;
    border: 1px solid var(--pp-border);
    border-radius: var(--pp-radius);
    padding: 26px 22px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.05);
    width: 100%;
}

@media (min-width: 992px) {
    .pp-summary-card { position: sticky; top: 20px; }
}

.pp-summary-title {
    font-family: var(--pp-font-en), var(--pp-font-bn), sans-serif;
    font-size: 18px;
    font-weight: 800;
    color: var(--pp-dark);
    margin: 0 0 18px 0;
    padding-bottom: 14px;
    border-bottom: 2px solid #f1f5f9;
}

.pp-summary-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 14px;
    color: var(--pp-muted);
    padding: 8px 0;
    gap: 10px;
}
.pp-summary-row .pp-amt { font-weight: 700; color: var(--pp-dark); }
.pp-discount-row .pp-amt { color: #16a34a; }

.pp-summary-note {
    font-size: 12px;
    color: var(--pp-muted);
    background: #f8fafc;
    border-radius: 8px;
    padding: 8px 12px;
    margin: 8px 0 4px 0;
}

.pp-total-row {
    border-top: 1px dashed var(--pp-border);
    margin-top: 8px;
    padding-top: 14px;
    font-size: 15px;
    font-weight: 700;
    color: var(--pp-dark);
}
.pp-total-row .pp-amt { font-size: 22px; font-weight: 800; color: var(--pp-pink); }

.pp-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    width: 100%;
    padding: 15px 20px;
    font-size: 16px;
    font-weight: 800;
    border: none;
    border-radius: 10px;
    cursor: pointer;
    text-decoration: none;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    box-sizing: border-box;
}
.pp-btn-primary {
    background: linear-gradient(135deg, var(--pp-pink) 0%, var(--pp-pink-dark) 100%);
    color: #fff;
    box-shadow: 0 10px 24px rgba(250, 80, 83, 0.28);
    margin-top: 16px;
}
.pp-btn-primary:hover { transform: translateY(-2px); color: #fff; }
.pp-btn-primary svg { width: 18px; height: 18px; }

.pp-continue-link {
    display: block;
    text-align: center;
    margin-top: 14px;
    font-size: 13px;
    font-weight: 600;
    color: var(--pp-muted);
    text-decoration: none;
}
.pp-continue-link:hover { color: var(--pp-pink); }

/* ---------- Empty Cart ---------- */
.pp-cart-empty {
    text-align: center;
    padding: 70px 20px;
    max-width: 420px;
    margin: 0 auto;
}
.pp-cart-empty svg { width: 110px; height: 110px; margin: 0 auto 20px auto; }
.pp-cart-empty h2 {
    font-family: var(--pp-font-en), var(--pp-font-bn), sans-serif;
    font-size: 22px;
    font-weight: 800;
    color: var(--pp-dark);
    margin: 0 0 10px 0;
}
.pp-cart-empty p { font-size: 14px; color: var(--pp-muted); margin: 0 0 22px 0; }
.pp-cart-empty .pp-btn { display: inline-flex; width: auto; padding: 14px 32px; margin-top: 0; }

/* =========================================================
   Mobile: extra breathing room on both sides (Task requirement)
   ======================================================= */
@media (max-width: 768px) {
    body.woocommerce-cart .woocommerce { padding: 0 10px !important; }

    .pp-cart-heading-title { font-size: 24px; }
    .pp-cart-item { padding: 14px; gap: 12px; }
    .pp-item-thumb { width: 72px; height: 72px; }
    .pp-item-name { font-size: 14px; }
    .pp-summary-card { padding: 22px 18px; }
}

@media (max-width: 480px) {
    body.woocommerce-cart .woocommerce { padding: 0 8px !important; }

    /* Price column collapses onto its own row under the name on very
       small screens so nothing gets squeezed or scrolls horizontally */
    .pp-item-price-mobile { display: block; }
    .pp-item-linetotal { display: none; }
    .pp-item-bottom { justify-content: flex-start; }
    .pp-qty { order: 1; }
}
