
.cart-wrap{display:grid;grid-template-columns:1fr 320px;gap:20px;align-items:start}
.cart-empty,.cart-success{ text-align:center; padding:60px 20px; background:#fff; border-radius:10px; border:1px solid #e9ecef; max-width:70%; margin:0 auto; font-family:var(--cpc-font-primary, inherit)}
.cart-empty p{ font-size:18px; color:#6c757d; margin-bottom:20px }
.cart-card{border:1px solid #e1e1e1;border-radius:10px;background:#fff;overflow:hidden;width:100%;max-width:100%;}
.cart-card__head{padding:14px 16px;font-weight:700;background:#f8fafc;border-bottom:1px solid #eef2f7;display:flex;align-items:center;justify-content:space-between}
.cart-card__head .button{font-weight:600}
.cart-card__tools{margin-left:auto;display:flex;align-items:center;gap:10px}
.cpc-select-all{font-weight:500;display:inline-flex;align-items:center;gap:6px}
.cart-item{
    display: flex;
    gap: 12px;
    align-items: center;
    padding: 12px 16px;
    border-top: 1px solid #f1f5f9;
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
}
.cart-item:hover{background:#fafafa}
.cart-item .cart-item__thumb{width:66px;height:66px;border-radius:6px;overflow:hidden;border:1px solid #e1e1e1;background:#fff;display:flex;align-items:center;justify-content:center}
.cart-item__thumb img{width:100%;height:100%;object-fit:cover;}
.cart-item__thumb .cp-placeholder{
    width:100%;
    height:100%;
    background:#f3f4f6;
    border-radius:6px;
    display:flex;
    align-items:center;
    justify-content:center;
    border:none;
}
.cart-item__thumb .cp-placeholder svg{
    width:32px;
    height:32px;
    color:#9ca3af;
    opacity:0.6;
}
.cart-item__title{font-weight:400;margin:0 0 4px;line-height:1.35}
.cart-item__variant,.cart-item__spec{color:#6b7280;font-size:12px;margin-top:4px}
.cart-item__meta{color:#64748b;font-size:13px}
.cart-item__meta .cp-slide-price{display:flex;flex-direction:column;gap:6px}
.cart-item__meta .cp-slide-price .price{display:flex;align-items:center;gap:8px}
.cart-item__meta .cp-slide-price .price del{color:#6b7280;font-size:12px}
.cart-item__meta .cp-slide-price .price ins{all:unset}
.cart-item__meta .cp-slide-price + .product-savings-info{margin-top:0}
.cart-item__meta .product-savings-info{display:flex;align-items:center;gap:6px}
.cart-item__meta .product-savings-info .savings-text{font-size:12px;color:#6b7280}
.cart-item__meta .product-savings-info .cpc-discount-badge{background:#ef4444;color:#fff;border-radius:6px;padding:2px 6px;font-size:11px;font-weight:700}
.cart-item__meta .price ins{display:block;font-size:16px;font-weight:800;color:#16a34a}

.cart-item__actions{
    display: grid;
    grid-template-columns: 66px 1fr auto auto auto auto auto;
    align-items: center;
    gap: 10px;
    width: 100%;
}

/* Map children to grid columns for predictable sizing */
/* Map children to grid columns for predictable sizing */
.cart-item__actions .cart-item__thumb{grid-column:1}
.cart-item__actions .cart-item__info{grid-column:2;min-width:0;}
.cart-item__actions .cart-item__meta{grid-column:3}
.cart-item__actions .qty{grid-column:4;justify-self:start;}
.cart-item__actions .cart-item__subtotal{grid-column:5;font-weight:700}
.cart-item__actions .cart-remove{grid-column:6;justify-self:end}
.cart-item__actions .cart-item__select{grid-column:7;justify-self:end}

/* Checkbox appearance */
.cart-item__select input[type="checkbox"]{width:16px;height:16px;cursor:pointer}
.qty{display:flex;align-items:center;border:1px solid #e1e1e1;border-radius:8px;overflow:hidden;background:#fff}
.qty button{background:#fff;border:0;padding:8px 12px;cursor:pointer;line-height:1.2;color:#111827}
.qty button:hover{background:#f3f4f6}
.qty input{width:48px;text-align:center;border:0;height:36px;font-weight:600;color:#111827}
.price{font-weight:700;color:#0f172a}
.cart-remove a{color:#ef4444;text-decoration:none}
.cart-remove a:hover{color:#dc2626;text-decoration:underline}
.cart-remove a{display:inline-flex;align-items:center;justify-content:center;width:28px;height:28px;border-radius:6px}
.cart-remove a:hover{text-decoration:none;background:#fee2e2}
.cart-remove .material-icons{font-size:18px;line-height:1}

.cart-summary{position:sticky;top:16px;border:1px solid #e1e1e1;border-radius:12px;background:#fff;padding:16px;box-shadow:0 4px 12px rgba(15,23,42,0.06)}
.cart-summary h3{margin:0 0 10px}
.cart-summary__rows{display:flex;flex-direction:column;gap:15px;margin:6px 0 12px}
.cart-summary .row{display:flex;justify-content:space-between;margin:0}
.cart-summary .total{font-weight:800;color:#059669}
.cart-summary .btn-buy{
    display:block;
    width:100%;
    max-width:100%;
    box-sizing:border-box;
    margin-top:16px;
    padding:14px 20px;
    font-size:16px;
    font-weight:700;
    text-align:center;
    text-decoration:none;
    border-radius:10px;
    background:linear-gradient(135deg, #dc2626 0%, #b91c1c 100%);
    color:#fff;
    border:none;
    box-shadow:0 4px 12px rgba(220, 38, 38, 0.3), 0 2px 4px rgba(0, 0, 0, 0.1);
    transition:all 0.3s ease;
    cursor:pointer;
    position:relative;
    overflow:hidden;
}

.cart-summary .btn-buy::before {
    content:'';
    position:absolute;
    top:0;
    left:-100%;
    width:100%;
    height:100%;
    background:linear-gradient(90deg, transparent, rgba(255,255,255,0.2), transparent);
    transition:left 0.5s;
}

.cart-summary .btn-buy:hover {
    background:linear-gradient(135deg, #b91c1c 0%, #991b1b 100%);
    box-shadow:0 6px 16px rgba(220, 38, 38, 0.4), 0 4px 6px rgba(0, 0, 0, 0.15);
    transform:translateY(-2px);
}

.cart-summary .btn-buy:hover::before {
    left:100%;
}

.cart-summary .btn-buy:active {
    transform:translateY(0);
    box-shadow:0 2px 8px rgba(220, 38, 38, 0.3), 0 1px 2px rgba(0, 0, 0, 0.1);
}

/* Clear all button */
#cpc-cart-clear{background:#f1f5f9;border:1px solid #e1e1e1;border-radius:8px;padding:8px 10px;cursor:pointer}
#cpc-cart-clear:hover{background:#e1e1e1}

/* Success alert on add-to-cart */
.cpc-cart-alert{margin:12px 0;padding:10px 14px;border-radius:8px;background:#ecfdf5;color:#065f46;border:1px solid #a7f3d0}

@media (max-width: 900px){.cart-wrap{grid-template-columns:1fr}}

/* Responsive refinements */
@media (min-width: 900px) {
  .cart-card, .cart-item { width: 840px; max-width: 100%; box-sizing: border-box; }
  .cart-item__actions {
    grid-template-columns: 66px 250px 100px 120px 120px 30px 24px;
    width: 840px;
    max-width: 100%;
  }
}
@media (max-width: 899px) {
  .cart-card, .cart-item, .cart-item__actions { width: 100%!important; max-width: 100%!important; }
  .cart-item__actions { grid-template-columns: 66px 1fr auto auto auto auto auto; }
}
.cart-item__actions .cart-item__info { min-width: 0; }

.cpc-cart-head-flex {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: #f8fafc;
    padding: 14px 16px;
    border-bottom: 1px solid #eef2f7;
    font-weight: 700;
}
.cart-card__selected-count {
    font-size: 15px;
    color: #111827;
}
.cart-card__tools {
    display: flex;
    align-items: center;
    gap: 18px;
}
.cpc-cart-remove-all {
    display: flex;
    align-items: center;
    gap: 6px;
    color: #059669;
    background: none;
    border: none;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    padding: 0 10px;
}
.cpc-cart-remove-all .material-icons {
    font-size: 20px;
    color: #059669;
}
.cart-tools-divider {
    display: inline-block;
    width: 1px;
    height: 24px;
    background: #e1e1e1;
    margin: 0 14px;
}
.cpc-select-all {
    display: flex;
    align-items: center;
    gap: 8px;
    font-weight: 500;
    color: #111827;
}
.cpc-select-all input[type="checkbox"] {
    width: 18px;
    height: 18px;
}

.cart-note-box {
    background: #fff;
    border-radius: 12px;
    border: 1px solid #e1e1e1;
    padding: 18px 12px;
    margin-top: 30px;
}
.cart-note-desc {
    font-size: 15px;
    color: #222;
    margin-bottom: 10px;
}
.cart-note-input {
    width: 100%;
    border: 1px solid #e1e1e1;
    border-radius: 6px;
    padding: 12px;
    font-size: 15px;
    min-height: 60px;
    background: #fcfcfc;
    box-sizing: border-box;
    resize: vertical;
    transition: border-color 0.2s, box-shadow 0.2s;
}
.cart-note-input:focus {
    border-color: #3b82f6;
    box-shadow: 0 0 0 2px rgba(59,130,246,0.07);
    outline: none;
}

/* Cart Coupon Section */
.cart-coupon-section {
    margin: 16px 0;
    padding: 14px;
    background: linear-gradient(135deg, #f8fafc 0%, #f1f5f9 100%);
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
    box-sizing: border-box;
    width: 100%;
    max-width: 100%;
}

.cart-coupon-input-wrapper {
    display: flex;
    gap: 8px;
    align-items: stretch;
    width: 100%;
    box-sizing: border-box;
}

.cart-coupon-input-wrapper input {
    flex: 1;
    min-width: 0;
    padding: 10px 14px;
    border: 1px solid #d1d5db;
    border-radius: 8px;
    font-size: 14px;
    transition: all 0.2s;
    background: #fff;
    box-sizing: border-box;
}

.cart-coupon-input-wrapper input:focus {
    outline: none;
    border-color: #059669;
    box-shadow: 0 0 0 3px rgba(5, 150, 105, 0.1);
}

.cart-coupon-input-wrapper .button {
    padding: 10px 16px;
    border-radius: 8px;
    font-weight: 600;
    transition: all 0.2s;
    white-space: nowrap;
    flex-shrink: 0;
    box-sizing: border-box;
    min-width: fit-content;
}

.cart-coupon-input-wrapper .button:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

.cart-coupon-message {
    margin-top: 10px;
    padding: 10px 12px;
    border-radius: 6px;
    font-size: 13px;
    line-height: 1.5;
    display: none;
}

.cart-coupon-message.error {
    background: #fef2f2;
    color: #991b1b;
    border: 1px solid #fecaca;
}

.cart-coupon-message.success {
    background: #f0fdf4;
    color: #166534;
    border: 1px solid #bbf7d0;
}

.cart-coupon-applied {
    margin-top: 10px;
    padding: 12px;
    background: linear-gradient(135deg, #d1fae5 0%, #a7f3d0 100%);
    border: 1px solid #6ee7b7;
    border-radius: 8px;
    display: none;
    align-items: center;
    justify-content: space-between;
    box-shadow: 0 2px 4px rgba(5, 150, 105, 0.1);
}

.cart-coupon-applied-info {
    display: flex;
    align-items: center;
    gap: 10px;
    flex: 1;
}

.cart-coupon-code-display {
    font-weight: 700;
    color: #065f46;
    font-size: 14px;
    letter-spacing: 0.5px;
    text-transform: uppercase;
}

.cart-coupon-remove {
    background: rgba(255, 255, 255, 0.6);
    border: none;
    cursor: pointer;
    padding: 6px;
    color: #065f46;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 6px;
    transition: all 0.2s;
    width: 28px;
    height: 28px;
}

.cart-coupon-remove:hover {
    background: rgba(255, 255, 255, 0.9);
    transform: scale(1.1);
}

.cart-coupon-remove svg {
    width: 16px;
    height: 16px;
}

