/**
 * Pendu Mart – Custom Shopping Cart Styles
 * Matches the reference mockup "same to same"
 */

/* Suppress Astra Page Title & Article Header */
.woocommerce-cart .entry-header,
.woocommerce-cart .entry-title,
.woocommerce-cart .ast-article-single > header {
    display: none !important;
}

.pm-cart-page-wrapper {
    background-color: #F8FAFC;
    padding: 20px 0 60px 0;
    min-height: 80vh;
}

/* Breadcrumbs */
.pm-cart-breadcrumbs {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
    color: var(--pm-muted);
    margin-bottom: 20px;
}

.pm-cart-breadcrumbs a {
    color: var(--pm-muted);
    text-decoration: none;
}

.pm-cart-breadcrumbs a:hover {
    color: var(--pm-primary);
}

.pm-cart-breadcrumbs .pm-sep {
    color: #CBD5E1;
}

.pm-cart-breadcrumbs .pm-current {
    font-weight: 600;
    color: var(--pm-heading);
}

/* Header */
.pm-cart-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 20px;
}

.pm-cart-title {
    font-size: 24px;
    font-weight: 800;
    color: var(--pm-heading);
    display: flex;
    align-items: center;
    gap: 10px;
    margin: 0;
}

.pm-cart-title .pm-cart-icon {
    font-size: 24px;
}

.pm-cart-title .pm-cart-item-count {
    font-size: 18px;
    font-weight: 600;
    color: var(--pm-muted);
}

.pm-continue-shopping-link {
    font-size: 14px;
    font-weight: 600;
    color: var(--pm-primary);
    text-decoration: none;
    transition: color var(--pm-transition-fast);
}

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

/* Free Shipping Banner */
.pm-free-shipping-banner {
    background-color: #ECFDF5;
    border: 1px solid #A7F3D0;
    border-radius: var(--pm-radius-default);
    padding: 14px 20px;
    margin-bottom: 24px;
}

.pm-fs-top {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
    flex-wrap: wrap;
    gap: 10px;
}

.pm-fs-msg {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 14px;
    color: #065F46;
}

.pm-fs-icon svg {
    width: 20px;
    height: 20px;
    stroke: #059669;
    stroke-width: 2;
    fill: none;
    display: block;
}

.pm-fs-add-more {
    font-size: 13px;
    font-weight: 700;
    color: var(--pm-primary);
    text-decoration: none;
}

.pm-fs-add-more:hover {
    text-decoration: underline;
}

.pm-fs-bar {
    width: 100%;
    height: 8px;
    background-color: #D1FAE5;
    border-radius: 999px;
    overflow: hidden;
}

.pm-fs-bar-fill {
    height: 100%;
    background: linear-gradient(90deg, #10B981 0%, #059669 100%);
    border-radius: 999px;
    transition: width 0.4s ease;
}

/* Main Layout Grid */
.pm-cart-layout {
    display: grid;
    grid-template-columns: 1fr 380px;
    gap: 28px;
    align-items: start;
    margin-bottom: 40px;
}

/* Cart Items Column */
.pm-cart-items-col {
    background: #ffffff;
    border: 1px solid var(--pm-border);
    border-radius: var(--pm-radius-default);
    box-shadow: var(--pm-shadow-sm);
    overflow: hidden;
}

.pm-cart-items-list {
    display: flex;
    flex-direction: column;
}

.pm-cart-item-card {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 20px;
    border-bottom: 1px solid var(--pm-border);
    transition: background-color var(--pm-transition-fast);
}

.pm-cart-item-card:hover {
    background-color: #FAFAFA;
}

.pm-cart-item-select input[type="checkbox"],
.pm-select-all-label input[type="checkbox"] {
    width: 18px;
    height: 18px;
    accent-color: var(--pm-primary);
    cursor: pointer;
}

.pm-cart-item-media {
    width: 90px;
    height: 90px;
    flex-shrink: 0;
    border-radius: 8px;
    overflow: hidden;
    background: #F1F5F9;
    border: 1px solid var(--pm-border);
    display: flex;
    align-items: center;
    justify-content: center;
}

.pm-cart-item-media img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.pm-cart-item-info {
    flex: 1;
    min-width: 0;
}

.pm-cart-item-title {
    font-size: 15px;
    font-weight: 700;
    margin: 0 0 6px 0;
    line-height: 1.3;
}

.pm-cart-item-title a {
    color: var(--pm-heading);
    text-decoration: none;
    transition: color var(--pm-transition-fast);
}

.pm-cart-item-title a:hover {
    color: var(--pm-primary);
}

.pm-cart-item-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    font-size: 12px;
    color: var(--pm-muted);
    margin-bottom: 8px;
}

.pm-cart-stock-badge {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    font-size: 11px;
    font-weight: 700;
    padding: 2px 8px;
    border-radius: 4px;
    margin-bottom: 10px;
}

.pm-cart-stock-badge.in-stock {
    background-color: #ECFDF5;
    color: #059669;
}

.pm-cart-item-actions-links {
    display: flex;
    align-items: center;
    gap: 16px;
}

.pm-action-link {
    background: none;
    border: none;
    padding: 0;
    display: inline-flex;
    align-items: center;
    gap: 5px;
    font-size: 12px;
    font-weight: 600;
    color: var(--pm-muted);
    cursor: pointer;
    text-decoration: none;
    transition: color var(--pm-transition-fast);
}

.pm-action-link svg {
    width: 14px;
    height: 14px;
    stroke: currentColor;
    stroke-width: 2;
    fill: none;
}

.pm-action-link:hover {
    color: var(--pm-primary);
}

.pm-action-link.pm-remove-btn:hover {
    color: #DC2626;
}

/* Pricing Block */
.pm-cart-item-pricing {
    text-align: right;
    min-width: 100px;
    display: flex;
    flex-direction: column;
    align-items: flex-end;
}

.pm-discount-tag {
    background: #FEE2E2;
    color: #DC2626;
    font-size: 11px;
    font-weight: 800;
    padding: 2px 6px;
    border-radius: 4px;
    margin-bottom: 4px;
}

.pm-item-price-current {
    font-size: 16px;
    font-weight: 800;
    color: var(--pm-heading);
}

.pm-item-price-regular {
    font-size: 12px;
    color: var(--pm-muted);
    text-decoration: line-through;
}

/* Quantity Stepper */
.pm-qty-stepper {
    display: inline-flex;
    align-items: center;
    border: 1px solid var(--pm-border);
    border-radius: var(--pm-radius-default);
    background: #ffffff;
    overflow: hidden;
}

.pm-qty-btn {
    width: 32px;
    height: 32px;
    background: #F8FAFC;
    border: none;
    font-size: 16px;
    font-weight: 700;
    color: var(--pm-heading);
    cursor: pointer;
    transition: background-color var(--pm-transition-fast);
    display: flex;
    align-items: center;
    justify-content: center;
}

.pm-qty-btn:hover {
    background: #E2E8F0;
}

.pm-qty-input {
    width: 42px;
    height: 32px;
    border: none;
    border-left: 1px solid var(--pm-border);
    border-right: 1px solid var(--pm-border);
    text-align: center;
    font-size: 14px;
    font-weight: 700;
    color: var(--pm-heading);
    -moz-appearance: textfield;
}

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

.pm-cart-item-subtotal {
    font-size: 16px;
    font-weight: 800;
    color: var(--pm-heading);
    min-width: 90px;
    text-align: right;
}

/* Bottom Actions Toolbar */
.pm-cart-actions-toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 20px;
    background: #F8FAFC;
    border-top: 1px solid var(--pm-border);
    flex-wrap: wrap;
    gap: 14px;
}

.pm-cart-bulk-actions {
    display: flex;
    align-items: center;
    gap: 18px;
}

.pm-select-all-label {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
    font-weight: 600;
    color: var(--pm-heading);
    cursor: pointer;
}

.pm-toolbar-link {
    background: none;
    border: none;
    padding: 0;
    font-size: 13px;
    font-weight: 600;
    color: var(--pm-muted);
    cursor: pointer;
    transition: color var(--pm-transition-fast);
}

.pm-toolbar-link:hover {
    color: var(--pm-primary);
}

.pm-cart-coupon-box {
    display: flex;
    align-items: center;
    gap: 8px;
}

.pm-coupon-input {
    padding: 8px 12px;
    border: 1px solid var(--pm-border);
    border-radius: var(--pm-radius-default);
    font-size: 13px;
    width: 170px;
    outline: none;
}

.pm-coupon-input:focus {
    border-color: var(--pm-primary);
}

.pm-coupon-btn {
    background-color: var(--pm-primary);
    color: #ffffff;
    border: none;
    padding: 8px 16px;
    border-radius: var(--pm-radius-default);
    font-size: 13px;
    font-weight: 700;
    cursor: pointer;
    transition: background-color var(--pm-transition-fast);
}

.pm-coupon-btn:hover {
    background-color: var(--pm-primary-dark);
}

/* Order Summary Column (Sticky) */
.pm-cart-summary-col {
    position: sticky;
    top: 20px;
}

.pm-order-summary-card {
    background: #ffffff;
    border: 1px solid var(--pm-border);
    border-radius: var(--pm-radius-default);
    box-shadow: var(--pm-shadow-sm);
    padding: 24px;
}

.pm-summary-title {
    font-size: 18px;
    font-weight: 800;
    color: var(--pm-heading);
    margin: 0 0 18px 0;
    border-bottom: 1px solid var(--pm-border);
    padding-bottom: 12px;
}

.pm-summary-rows {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-bottom: 18px;
}

.pm-summary-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 14px;
}

.pm-row-label {
    color: var(--pm-muted);
}

.pm-row-value {
    font-weight: 600;
    color: var(--pm-heading);
}

.pm-text-green {
    color: #059669;
}

.pm-summary-divider {
    height: 1px;
    background-color: var(--pm-border);
    margin: 4px 0;
}

.pm-total-row .pm-row-label {
    font-size: 16px;
    font-weight: 800;
    color: var(--pm-heading);
}

.pm-total-row .pm-total-price {
    font-size: 20px;
    font-weight: 900;
    color: var(--pm-primary);
}

.pm-savings-badge {
    background-color: #ECFDF5;
    border: 1px solid #A7F3D0;
    border-radius: var(--pm-radius-default);
    padding: 10px 14px;
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
    color: #065F46;
    margin-bottom: 18px;
}

.pm-savings-badge svg {
    width: 16px;
    height: 16px;
    fill: #059669;
    flex-shrink: 0;
}

.pm-btn-checkout {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    width: 100%;
    background: linear-gradient(135deg, #FF6B35 0%, #EA580C 100%);
    color: #ffffff;
    padding: 14px;
    border-radius: var(--pm-radius-default);
    font-size: 16px;
    font-weight: 800;
    text-decoration: none;
    box-shadow: 0 4px 12px rgba(255, 107, 53, 0.3);
    transition: all var(--pm-transition-fast);
    margin-bottom: 20px;
}

.pm-btn-checkout:hover {
    box-shadow: 0 6px 16px rgba(255, 107, 53, 0.4);
    transform: translateY(-1px);
    color: #ffffff;
}

.pm-btn-checkout svg {
    width: 18px;
    height: 18px;
    stroke: currentColor;
    stroke-width: 2;
    fill: none;
}

/* Mini Free Delivery Card */
.pm-mini-delivery-card {
    background: #F8FAFC;
    border: 1px solid var(--pm-border);
    border-radius: var(--pm-radius-default);
    padding: 12px 14px;
    margin-bottom: 20px;
}

.pm-mini-delivery-header {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    margin-bottom: 8px;
}

.pm-mini-truck-icon {
    font-size: 20px;
    line-height: 1;
}

.pm-mini-delivery-header strong {
    display: block;
    font-size: 13px;
    color: var(--pm-heading);
}

.pm-mini-delivery-header p {
    font-size: 11px;
    color: var(--pm-muted);
    margin: 2px 0 0 0;
}

.pm-mini-bar {
    width: 100%;
    height: 6px;
    background: #E2E8F0;
    border-radius: 999px;
    overflow: hidden;
}

.pm-mini-bar-fill {
    height: 100%;
    background: #10B981;
    border-radius: 999px;
}

/* 4 Trust Badges 2x2 Grid */
.pm-summary-trust-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
    border-top: 1px solid var(--pm-border);
    padding-top: 18px;
}

.pm-trust-mini-item {
    display: flex;
    align-items: flex-start;
    gap: 8px;
}

.pm-trust-mini-icon {
    font-size: 16px;
    color: var(--pm-primary);
    line-height: 1;
}

.pm-trust-mini-item strong {
    display: block;
    font-size: 12px;
    color: var(--pm-heading);
    line-height: 1.2;
}

.pm-trust-mini-item span {
    display: block;
    font-size: 10px;
    color: var(--pm-muted);
    line-height: 1.2;
    margin-top: 2px;
}

/* Recommendations & Trust Strip */
.pm-cart-recommendations {
    margin-top: 50px;
}

.pm-rec-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.pm-rec-title {
    font-size: 20px;
    font-weight: 800;
    color: var(--pm-heading);
    display: flex;
    align-items: center;
    gap: 8px;
    margin: 0;
}

.pm-rec-view-all {
    font-size: 14px;
    font-weight: 700;
    color: var(--pm-primary);
    text-decoration: none;
}

.pm-rec-grid {
    display: grid;
    grid-template-columns: repeat(6, 1fr);
    gap: 16px;
}

.pm-cart-bottom-trust-strip {
    background: #ffffff;
    border: 1px solid var(--pm-border);
    border-radius: var(--pm-radius-default);
    margin-top: 50px;
    padding: 18px 24px;
}

.pm-trust-strip-inner {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 16px;
}

.pm-trust-box {
    display: flex;
    align-items: center;
    gap: 10px;
}

.pm-trust-svg {
    font-size: 24px;
    color: var(--pm-primary);
}

.pm-trust-txt strong {
    display: block;
    font-size: 13px;
    color: var(--pm-heading);
}

.pm-trust-txt span {
    display: block;
    font-size: 11px;
    color: var(--pm-muted);
}

/* Empty State */
.pm-cart-empty-state {
    text-align: center;
    padding: 60px 20px;
    background: #ffffff;
    border-radius: var(--pm-radius-default);
    border: 1px solid var(--pm-border);
    max-width: 600px;
    margin: 40px auto;
}

.pm-empty-icon {
    font-size: 60px;
    margin-bottom: 16px;
}

.pm-cart-empty-state h2 {
    font-size: 24px;
    font-weight: 800;
    color: var(--pm-heading);
    margin-bottom: 8px;
}

.pm-cart-empty-state p {
    color: var(--pm-muted);
    margin-bottom: 24px;
}

/* Responsive */
@media (max-width: 1024px) {
    .pm-cart-layout {
        grid-template-columns: 1fr;
    }
    .pm-rec-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (max-width: 640px) {
    .pm-cart-page-wrapper {
        padding: 12px 0 40px;
    }
    .pm-cart-breadcrumbs {
        font-size: 12px;
        margin-bottom: 12px;
    }
    .pm-cart-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 8px;
        margin-bottom: 16px;
    }
    .pm-cart-title {
        font-size: 20px;
    }
    .pm-free-shipping-banner {
        padding: 12px 14px;
        margin-bottom: 16px;
    }
    .pm-fs-top {
        flex-direction: column;
        align-items: flex-start;
        gap: 6px;
    }
    .pm-cart-item-card {
        flex-direction: column;
        align-items: flex-start;
        padding: 14px;
        gap: 12px;
    }
    .pm-cart-item-details {
        width: 100%;
    }
    .pm-cart-item-actions {
        width: 100%;
        justify-content: space-between;
        flex-wrap: wrap;
        gap: 10px;
    }
    .pm-cart-item-pricing,
    .pm-cart-item-subtotal {
        text-align: left;
        align-items: flex-start;
    }
    .pm-cart-bottom-actions {
        flex-direction: column;
        align-items: stretch;
        gap: 12px;
    }
    .pm-coupon-form-group {
        width: 100%;
    }
    .pm-rec-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 10px;
    }
}
