/* 
 * Cart and Checkout Styles 
 */

/* Cart Item */
.cart-item {
    border-bottom: 1px solid #eee;
    padding: 15px 0;
}

.cart-item:last-child {
    border-bottom: none;
}

.cart-item-image {
    width: 80px;
    height: 80px;
    object-fit: contain;
    background-color: white;
    padding: 5px;
    border: 1px solid #eee;
    border-radius: 5px;
}

.cart-item-title {
    font-weight: 500;
    margin-bottom: 10px;
}

.cart-item-price {
    font-weight: 600;
    color: var(--bs-primary);
}

.cart-item-quantity {
    width: 80px;
}

.cart-item-total {
    font-weight: 600;
    color: var(--bs-primary);
}

.cart-item-remove {
    color: var(--bs-danger);
    cursor: pointer;
    font-size: 1.2rem;
    transition: all 0.3s;
}

.cart-item-remove:hover {
    color: #a71d2a;
}

/* Cart Summary */
.cart-summary {
    background-color: #f8f9fa;
    padding: 20px;
    border-radius: 8px;
}

.cart-summary-item {
    display: flex;
    justify-content: space-between;
    padding: 10px 0;
    border-bottom: 1px solid #dee2e6;
}

.cart-summary-item:last-child {
    border-bottom: none;
}

.cart-summary-label {
    font-weight: 500;
}

.cart-summary-value {
    font-weight: 600;
}

.cart-summary-total {
    font-size: 1.2rem;
    font-weight: 700;
    padding: 15px 0;
}

.cart-summary-total .cart-summary-value {
    color: var(--bs-primary);
}

.cart-actions {
    margin-top: 20px;
}

/* Empty Cart */
.empty-cart {
    text-align: center;
    padding: 40px 0;
}

.empty-cart-icon {
    font-size: 4rem;
    color: #ccc;
    margin-bottom: 20px;
}

/* Checkout */
.checkout-section {
    margin-bottom: 30px;
}

.section-title {
    margin-bottom: 20px;
    padding-bottom: 10px;
    border-bottom: 1px solid #eee;
    font-weight: 600;
}

.shipping-address {
    background-color: #f8f9fa;
    padding: 15px;
    border-radius: 8px;
    margin-bottom: 20px;
}

.shipping-address-header {
    display: flex;
    justify-content: space-between;
    margin-bottom: 10px;
}

.shipping-address-name {
    font-weight: 600;
}

.shipping-address-details {
    line-height: 1.6;
}

.payment-method {
    display: block;
    padding: 15px;
    border: 1px solid #eee;
    border-radius: 8px;
    margin-bottom: 15px;
    cursor: pointer;
    transition: all 0.3s;
}

.payment-method:hover,
.payment-method.active {
    border-color: var(--bs-primary);
    background-color: rgba(0, 123, 255, 0.05);
}

.payment-method-header {
    display: flex;
    justify-content: space-between;
}

.payment-method-title {
    font-weight: 500;
    display: flex;
    align-items: center;
}

.payment-method-title img {
    max-height: 24px;
    margin-right: 10px;
}

.payment-method-details {
    margin-top: 10px;
    display: none;
}

.payment-method.active .payment-method-details {
    display: block;
}

/* Order Summary */
.order-summary {
    background-color: #f8f9fa;
    padding: 20px;
    border-radius: 8px;
    position: sticky;
    top: 20px;
}

.order-summary-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-bottom: 15px;
    margin-bottom: 15px;
    border-bottom: 1px solid #dee2e6;
}

.order-summary-title {
    font-weight: 600;
    margin-bottom: 0;
}

.order-summary-edit {
    font-size: 0.9rem;
}

.order-summary-items {
    max-height: 300px;
    overflow-y: auto;
    margin-bottom: 15px;
}

.order-item {
    display: flex;
    padding: 10px 0;
    border-bottom: 1px solid #eee;
}

.order-item:last-child {
    border-bottom: none;
}

.order-item-image {
    width: 50px;
    height: 50px;
    object-fit: contain;
    margin-right: 10px;
}

.order-item-details {
    flex-grow: 1;
}

.order-item-name {
    font-weight: 500;
    margin-bottom: 5px;
}

.order-item-price {
    font-size: 0.9rem;
    color: var(--bs-primary);
}

.order-item-quantity {
    background-color: #e9ecef;
    padding: 2px 8px;
    border-radius: 4px;
    font-size: 0.8rem;
    margin-left: 10px;
}

.order-summary-row {
    display: flex;
    justify-content: space-between;
    padding: 8px 0;
    border-bottom: 1px solid #dee2e6;
}

.order-summary-row:last-child {
    border-bottom: none;
    padding-top: 15px;
    padding-bottom: 15px;
    font-weight: 700;
    font-size: 1.1rem;
}

.order-summary-label {
    color: #666;
}

.order-summary-value {
    font-weight: 600;
}

.checkout-btn {
    margin-top: 20px;
}

/* Order Complete */
.order-complete {
    text-align: center;
    padding: 40px 0;
}

.order-complete-icon {
    font-size: 4rem;
    color: var(--bs-success);
    margin-bottom: 20px;
}

.order-complete-number {
    background-color: #f8f9fa;
    padding: 15px;
    border-radius: 8px;
    margin-bottom: 20px;
}

.order-complete-actions {
    margin-top: 30px;
}

/* Responsive Styles */
@media (max-width: 767px) {
    .cart-item-image {
        width: 60px;
        height: 60px;
    }
    
    .cart-item-title {
        font-size: 0.9rem;
    }
    
    .cart-item-quantity {
        width: 60px;
    }
    
    .order-summary {
        position: static;
        margin-top: 30px;
    }
}

/* MING LIFE cream / champagne transactional-page palette */
:root {
  --ml-tx-green:var(--theme-primary);
  --ml-tx-green-dark:var(--theme-primary-dark);
  --ml-tx-ink:var(--theme-text);
  --ml-tx-muted:var(--theme-muted);
  --ml-tx-border:var(--theme-border);
  --ml-tx-canvas:var(--theme-background);
  --ml-tx-surface:var(--theme-surface);
  --ml-tx-gold:var(--theme-accent);
  --ml-tx-gold-soft:color-mix(in srgb, var(--theme-accent) 24%, var(--theme-surface));
  --ml-tx-shadow:0 12px 30px rgba(91,70,37,.08);
}

body {
  color:var(--ml-tx-ink);
  background:
    radial-gradient(circle at 92% 8%,rgba(199,164,90,.08),transparent 24%),
    var(--ml-tx-canvas) !important;
}

body .breadcrumb {
  padding:9px 13px;
  border:1px solid var(--ml-tx-border);
  border-radius:12px;
  background:rgba(255,253,248,.86);
}

body .breadcrumb-item,
body .breadcrumb-item.active,
body .text-muted,
body .form-text {
  color:var(--ml-tx-muted) !important;
}

body .breadcrumb-item a,
body a.text-primary {
  color:var(--ml-tx-green-dark) !important;
}

body .page-title,
body h1,
body h2,
body h3,
body h4,
body h5,
body .card-title,
body .summary-title,
body .order-summary-title {
  color:var(--ml-tx-ink);
}

body .card,
body .cart-summary,
body .order-summary,
body .order-success-container,
body .order-details-card,
body .payment-instructions,
body .shipping-details,
body .selected-variant-info .card {
  border:1px solid var(--ml-tx-border) !important;
  border-radius:16px !important;
  background:var(--ml-tx-surface) !important;
  box-shadow:var(--ml-tx-shadow) !important;
}

body .card-header {
  color:var(--ml-tx-ink);
  border-bottom:1px solid var(--ml-tx-border) !important;
  background:#f8f3e8 !important;
}

body .card-header.bg-success {
  color:#fff !important;
  background:var(--ml-tx-green) !important;
}

body .form-control,
body .form-select,
body .input-group-text {
  color:var(--ml-tx-ink) !important;
  border-color:var(--ml-tx-border) !important;
  background:var(--ml-tx-surface) !important;
}

body .form-control:focus,
body .form-select:focus {
  border-color:var(--ml-tx-gold) !important;
  box-shadow:0 0 0 .2rem rgba(199,164,90,.14) !important;
}

body .form-check-input:checked {
  border-color:var(--ml-tx-green) !important;
  background-color:var(--ml-tx-green) !important;
}

body .btn-primary {
  color:#fff !important;
  border-color:var(--ml-tx-green) !important;
  background:var(--ml-tx-green) !important;
}

body .btn-primary:hover,
body .btn-primary:focus-visible {
  border-color:var(--ml-tx-green-dark) !important;
  background:var(--ml-tx-green-dark) !important;
}

body .btn-outline-primary,
body .btn-outline-secondary,
body .btn-outline-dark {
  color:var(--ml-tx-green-dark) !important;
  border-color:#d8bd7d !important;
  background:var(--ml-tx-surface) !important;
}

body .btn-outline-primary:hover,
body .btn-outline-secondary:hover,
body .btn-outline-dark:hover {
  color:var(--ml-tx-green-dark) !important;
  border-color:var(--ml-tx-gold) !important;
  background:var(--ml-tx-gold-soft) !important;
}

body .text-primary,
body .cart-item-price,
body .cart-item-total,
body .cart-summary-total .cart-summary-value,
body .order-item-price,
body .fw-bold.text-primary {
  color:var(--ml-tx-green) !important;
}

body .cart-item,
body .order-item,
body .summary-item,
body .order-summary-row,
body .review-item {
  border-color:var(--ml-tx-border) !important;
}

body .cart-item-image,
body .order-item-image,
body .product-image,
body .thumbnail-image {
  border-color:var(--ml-tx-border) !important;
  background:var(--ml-tx-surface) !important;
}

body .shipping-address,
body .payment-method,
body .payment-details,
body .login-prompt,
body .secure-checkout,
body .order-info,
body .order-summary,
body .selected-variant-details > .border {
  border-color:var(--ml-tx-border) !important;
  background:#f8f3e8 !important;
}

body .payment-method:hover,
body .payment-method.active {
  border-color:var(--ml-tx-gold) !important;
  background:var(--ml-tx-gold-soft) !important;
}

body .table {
  --bs-table-bg:transparent;
  --bs-table-color:var(--ml-tx-ink);
  --bs-table-border-color:var(--ml-tx-border);
}

body .table > :not(caption) > * > * {
  border-color:var(--ml-tx-border) !important;
}

body .table thead th {
  color:var(--ml-tx-green-dark);
  background:#f8f3e8 !important;
}

body .pagination .page-link {
  color:var(--ml-tx-green-dark) !important;
  border-color:var(--ml-tx-border) !important;
  background:var(--ml-tx-surface) !important;
}

body .pagination .page-item.active .page-link {
  color:#fff !important;
  border-color:var(--ml-tx-green) !important;
  background:var(--ml-tx-green) !important;
}

body .modal-content {
  border:1px solid var(--ml-tx-border);
  background:var(--ml-tx-surface);
}

body .modal-header,
body .modal-footer {
  border-color:var(--ml-tx-border);
}

/* Cart + order success */
body .empty-cart-icon,
body .order-success-icon {
  color:var(--ml-tx-green) !important;
}

body .order-success-header {
  color:var(--ml-tx-ink);
}

body .order-success-actions {
  border-top-color:var(--ml-tx-border);
}

/* Returns */
body #returns-page .card-header,
body #returns-page .bg-white {
  background:var(--ml-tx-surface) !important;
}

body #returns-page .btn-warning {
  border-color:#d9bc76;
}

/* Legacy product page */
body .product-page {
  color:var(--ml-tx-ink);
}

body .product-page .product-image,
body .product-page .product-info,
body .product-page .nav-tabs,
body .product-page .tab-content {
  border-color:var(--ml-tx-border) !important;
}

body .product-page .product-title {
  color:var(--ml-tx-ink);
}

body .product-page .product-brand,
body .product-page .product-short-description {
  color:var(--ml-tx-muted) !important;
}

body .product-page .nav-tabs .nav-link {
  color:#5c625b;
}

body .product-page .nav-tabs .nav-link.active {
  color:var(--ml-tx-green-dark) !important;
  border-color:var(--ml-tx-border) var(--ml-tx-border) var(--ml-tx-surface) !important;
  background:var(--ml-tx-surface) !important;
  box-shadow:inset 0 3px 0 var(--ml-tx-gold);
}

/* Payment summary / wallet-use panels */
body .alert-info {
  color:#4f564f;
  border-color:#ddc99d;
  background:#f5efe3;
}

body .alert-success {
  border-color:rgba(12,107,77,.22);
}

body .bg-light {
  background:#f8f3e8 !important;
}

@media (max-width:767.98px) {
  body .card,
  body .cart-summary,
  body .order-summary,
  body .order-success-container {
    border-radius:14px !important;
  }

  body .container.mt-4,
  body .container.py-4 {
    padding-left:12px;
    padding-right:12px;
  }
}

