/* cart-auto-update.css */

/* Status Messages */
.cart-status { min-height: 20px; margin: 0 0 12px; color: #4d4d4d; font-size: 13px; font-weight: 500; transition: opacity 0.3s ease; }
.cart-status.is-error { color: #d32f2f; background: #ffebee; padding: 8px 12px; border-radius: 4px; border-left: 4px solid #d32f2f; }
.cart-alert { padding: 15px; background: #fff4f4; border-left: 4px solid #d32f2f; color: #b71c1c; margin-bottom: 20px; border-radius: 4px; font-size: 14px; }

/* Page Title */
.cart-header-area { margin-bottom: 24px; border-bottom: 1px solid #eaeaea; padding-bottom: 12px; }
#container-right .page_title { margin: 0; padding: 0; border: none; background: transparent; color: #1a1a1a; font-size: 28px; font-weight: 700; letter-spacing: -0.5px; line-height: 1.2; text-transform: uppercase; }
#container-right .cart-item-count { font-size: 16px; font-weight: 500; color: #757575; letter-spacing: 0; text-transform: none; margin-left: 8px; }

/* Cart Layout & Table */
.cart-info { background: #fff; }
.cart-info form.is-updating { opacity: 0.6; pointer-events: none; }
.cart-items { width: 100%; border-collapse: separate; border-spacing: 0; margin-bottom: 30px!important; background: #fff; border: 1px solid #eaeaea!important; border-radius: 8px; overflow: hidden; box-shadow: 0 4px 6px rgba(0,0,0,0.02); }
.cart-items thead th { background: #f9fafb!important; color: #4b5563!important; font-weight: 600!important; text-transform: uppercase; font-size: 12px; letter-spacing: 0.5px; padding: 16px!important; text-align: left; border-bottom: 1px solid #eaeaea!important; }
.cart-items tbody tr { transition: all 0.2s ease; }
.cart-items tbody tr:hover { background: #fdfdfd; }
.cart-items tbody tr.is-removing { opacity: 0.3; transform: scale(0.98); }
.cart-items tbody td { padding: 20px 16px!important; vertical-align: middle!important; border-bottom: 1px solid #f0f0f0!important; border-top: 0!important; border-left: 0!important; border-right: 0!important; }
.cart-items tbody tr:last-child td { border-bottom: 0!important; }

/* Columns Styling */
.col-product { width: 45%; }
.col-price { width: 15%; color: #616161; font-weight: 500; }
.col-quantity { width: 15%; }
.col-total { width: 15%; font-weight: 700; color: #1a1a1a; font-size: 16px; }
.col-action { width: 10%; text-align: center!important; }

/* Product Details */
.product-details { display: flex; align-items: center; gap: 16px; }
.product-img { flex-shrink: 0; width: 80px; height: 80px; border-radius: 6px; border: 1px solid #f0f0f0; padding: 4px; display: flex; align-items: center; justify-content: center; background: #fff; }
.product-img img { max-width: 100%; max-height: 100%; object-fit: contain; }
.product-info { display: flex; flex-direction: column; gap: 6px; text-align: left; }
.product-name { font-weight: 600; color: #1a1a1a; font-size: 15px; text-decoration: none; line-height: 1.4; transition: color 0.2s; }
.product-name:hover { color: #a00000; }
.product-code { font-size: 13px; color: #757575; }
.product-code span { font-weight: 500; color: #424242; }

/* Quantity Control */
.quantity-control { display: inline-flex; align-items: center; border: 1px solid #dcdcdc; border-radius: 4px; background: #fff; overflow: hidden; flex-shrink: 0; min-width: 100px; }
.quantity-control button { background: #f9f9f9; color: #424242; border: none; cursor: pointer; padding: 8px 12px; font-size: 16px; line-height: 1; transition: all 0.2s; outline: none; flex-shrink: 0; -webkit-appearance: none; appearance: none; }
.quantity-control button:hover { background: #eeeeee; color: #1a1a1a; }
.quantity-control input { width: 46px!important; padding: 8px 4px!important; text-align: center!important; border: none!important; border-left: 1px solid #dcdcdc!important; border-right: 1px solid #dcdcdc!important; font-size: 14px!important; font-weight: 600!important; color: #1a1a1a!important; border-radius: 0!important; background: #fff!important; height: 32px!important; outline: none!important; -webkit-appearance: none; appearance: none; -moz-appearance: textfield; flex-shrink: 0; box-sizing: border-box; }
.quantity-control input::-webkit-outer-spin-button, .quantity-control input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }

/* Action Buttons in Table */
.cart-remove { background: transparent; color: #9e9e9e; border: none; cursor: pointer; padding: 8px; border-radius: 4px; transition: all 0.2s; display: inline-flex; align-items: center; justify-content: center; outline: none; }
.cart-remove:hover { color: #d32f2f; background: #ffebee; transform: scale(1.05); }

/* Bottom Section */
.cart-bottom { display: flex; justify-content: space-between; align-items: flex-start; margin-top: 20px; flex-wrap: wrap; gap: 20px; }
.cart-actions-left .btn-continue { display: inline-flex; align-items: center; gap: 8px; background: #fff; color: #424242; border: 1px solid #dcdcdc; padding: 12px 20px; border-radius: 6px; font-weight: 600; text-decoration: none; font-size: 14px; transition: all 0.2s; box-shadow: 0 1px 2px rgba(0,0,0,0.05); }
.cart-actions-left .btn-continue:hover { background: #f9f9f9; border-color: #bdbdbd; color: #1a1a1a; transform: translateY(-1px); }

/* Order Summary */
.cart-summary-box { width: 100%; max-width: 380px; background: transparent; border: 0; padding: 0 0 24px 0; box-sizing: border-box; }
.cart-summary-table { width: 100%; border-collapse: collapse; margin-bottom: 24px; }
.summary-row td { padding: 10px 0; border: none!important; }
.summary-label { color: #616161; font-size: 15px; }
.summary-value { text-align: right; font-weight: 600; color: #1a1a1a; font-size: 15px; }
.summary-gst td { padding-bottom: 16px; border-bottom: 1px dashed #dcdcdc!important; }
.grand-total td { padding-top: 16px; font-size: 20px; }
.grand-total .summary-label { font-weight: 700; color: #1a1a1a; }
.grand-total .summary-value { color: #a00000; font-weight: 800; font-size: 22px; }

/* Checkout Button */
.btn-checkout { display: flex; align-items: center; justify-content: center; gap: 10px; width: 100%; background: #a00000; color: #fff; border: none; padding: 16px 24px; border-radius: 6px; font-weight: 700; font-size: 16px; cursor: pointer; transition: all 0.2s; text-decoration: none; text-transform: uppercase; letter-spacing: 0.5px; box-shadow: 0 4px 6px rgba(160,0,0,0.2); }
.btn-checkout:hover { background: #8a0000; box-shadow: 0 6px 12px rgba(160,0,0,0.3); transform: translateY(-2px); color: #fff; }

/* Empty Cart */
.cart-empty { text-align: center; padding: 60px 20px; background: #fff; border: 1px dashed #dcdcdc; border-radius: 8px; }
.cart-empty-icon { font-size: 64px; line-height: 1; margin-bottom: 20px; opacity: 0.5; }
.cart-empty h2 { margin: 0 0 12px; color: #1a1a1a; font-size: 24px; }
.cart-empty p { margin: 0 0 24px; color: #757575; font-size: 16px; }
.cart-empty .btn-primary { display: inline-flex; background: #a00000; color: #fff; padding: 14px 28px; border-radius: 6px; font-weight: 600; text-decoration: none; font-size: 15px; transition: all 0.2s; }
.cart-empty .btn-primary:hover { background: #8a0000; transform: translateY(-1px); }

/* Responsive adjustments */
@media (max-width: 768px) {
    .cart-bottom { flex-direction: column-reverse; }
    .cart-actions-left, .cart-summary-box { width: 100%; max-width: none; }
    .cart-actions-left .btn-continue { width: 100%; justify-content: center; }
}
@media (max-width: 630px) {
    .cart-items thead { display: none; }
    .cart-items tbody tr { display: grid; grid-template-columns: 1fr auto; grid-template-areas: "product product" "quantity action" "total total"; gap: 12px 16px; padding: 16px; position: relative; border-bottom: 1px solid #eaeaea!important; }
    .cart-items tbody td { padding: 0!important; text-align: left!important; border: none!important; display: flex; align-items: center; }
    .col-product { grid-area: product; width: 100%; padding-bottom: 12px!important; border-bottom: 1px dashed #f0f0f0!important; flex-direction: column; align-items: flex-start; }
    .product-details { width: 100%; }
    .col-price { display: none!important; } 
    .col-quantity { grid-area: quantity; justify-content: flex-start; gap: 12px; }
    .col-quantity::before { content: 'Quantity'; font-weight: 600; color: #757575; font-size: 14px; }
    .col-total { grid-area: total; justify-content: space-between; width: 100%; margin-top: 4px; }
    .col-total::before { content: 'Total'; font-weight: 600; color: #757575; font-size: 14px; }
    .col-action { grid-area: action; position: static; width: auto; justify-content: flex-end; }
}
