/* ==========================================================================
   HEXARISE SHOPPING CART & ORDER SUMMARY STYLES
   ========================================================================== */

body.cart-body {
  background-color: var(--bg-surface);
  color: var(--text-on-surface);
  min-height: 100vh;
  font-family: var(--font-editorial);
  position: relative;
  padding-bottom: 120px;
}

@media (min-width: 768px) {
  body.cart-body {
    padding-bottom: 100px;
  }
}

/* Header */
.cart-header {
  position: sticky;
  top: 0;
  left: 0;
  width: 100%;
  height: 64px;
  background-color: var(--bg-surface);
  border-bottom: 1px solid var(--border-dark);
  z-index: 50;
  display: flex;
  align-items: center;
}

.header-inner {
  width: 100%;
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 var(--space-md);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.btn-icon-back {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  border-radius: var(--radius-full);
  color: var(--text-on-surface);
  text-decoration: none;
  transition: color 0.2s ease, background-color 0.2s ease;
}

.btn-icon-back:hover {
  color: var(--primary-yellow);
  background-color: var(--bg-elevated-dark);
}

.header-page-title {
  font-size: 18px;
  font-weight: 700;
  color: #ffffff;
}

.cart-badge-wrapper {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
}

.cart-icon {
  font-size: 24px;
  color: #ffffff;
}

.cart-count-badge {
  position: absolute;
  top: 2px;
  right: 2px;
  background-color: var(--primary-yellow);
  color: var(--text-ink);
  font-size: 11px;
  font-weight: 700;
  width: 18px;
  height: 18px;
  border-radius: var(--radius-full);
  display: flex;
  align-items: center;
  justify-content: center;
}

/* Main Container */
.cart-main {
  width: 100%;
  max-width: 900px;
  margin: 0 auto;
  padding: var(--space-xl) clamp(16px, 4vw, 32px) var(--space-xxl) clamp(16px, 4vw, 32px);
  display: flex;
  flex-direction: column;
  gap: var(--space-xl);
}

.cart-section {
  display: flex;
  flex-direction: column;
  gap: var(--space-md);
}

.section-title {
  font-size: 22px;
  font-weight: 700;
  color: #ffffff;
}

.section-subtitle {
  font-size: 18px;
  font-weight: 600;
  color: #ffffff;
}

/* Cart Items Container Spacing */
#cart-items-container {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

/* Cart Item Cards */
.cart-item-card {
  background-color: var(--bg-card-dark);
  border: 1px solid var(--border-dark);
  border-radius: var(--radius-xl);
  padding: 24px;
  display: flex;
  flex-direction: column;
  gap: 16px;
  margin-bottom: 4px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.2);
  transition: border-color 0.2s ease, transform 0.2s ease;
}

.cart-item-card:hover {
  border-color: rgba(252, 213, 53, 0.35);
}

.item-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
}

.item-name {
  font-size: 18px;
  font-weight: 600;
  color: #ffffff;
  margin-bottom: 2px;
}

.item-tier-badge {
  display: inline-block;
  font-size: 12px;
  color: var(--text-variant);
}

.item-price-col {
  text-align: right;
}

.item-price {
  font-family: var(--font-number);
  font-size: 20px;
  font-weight: 700;
  color: #ffffff;
}

.item-period {
  font-size: 12px;
  color: var(--text-variant);
}

.item-includes-text {
  font-size: 13px;
  color: var(--text-muted);
  line-height: 1.5;
}

.item-actions-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-top: 1px solid var(--bg-elevated-dark);
  padding-top: var(--space-md);
}

.item-actions-row.flex-end {
  justify-content: flex-end;
}

.quantity-controller {
  display: flex;
  align-items: center;
  gap: var(--space-xs);
  background-color: var(--bg-elevated-dark);
  padding: 4px 8px;
  border-radius: var(--radius-lg);
}

.btn-qty {
  background: none;
  border: none;
  color: var(--text-variant);
  cursor: pointer;
  padding: 2px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: color 0.2s ease;
}

.btn-qty:hover {
  color: #ffffff;
}

.qty-number {
  font-family: var(--font-number);
  font-size: 14px;
  font-weight: 600;
  color: #ffffff;
  width: 24px;
  text-align: center;
}

.item-action-btns {
  display: flex;
  align-items: center;
  gap: var(--space-md);
}

.btn-action-text {
  font-size: 13px;
  color: var(--text-variant);
  text-decoration: none;
  transition: color 0.2s ease;
}

.btn-action-text:hover {
  color: var(--primary-yellow);
}

.btn-action-delete {
  background: none;
  border: none;
  font-size: 13px;
  color: var(--trading-down);
  cursor: pointer;
  transition: opacity 0.2s ease;
}

.btn-action-delete:hover {
  opacity: 0.8;
}

/* Add-ons Rows */
.addons-list {
  display: flex;
  flex-direction: column;
  gap: var(--space-xs);
}

.addon-row {
  background-color: var(--bg-container-high);
  border: 1px solid var(--border-dark);
  border-radius: var(--radius-lg);
  padding: var(--space-md);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.addon-row-left {
  display: flex;
  align-items: center;
  gap: var(--space-md);
}

.icon-yellow {
  color: var(--primary-yellow);
  font-size: 22px;
}

.addon-name {
  font-size: 14px;
  font-weight: 500;
  color: #ffffff;
}

.addon-price-text {
  font-family: var(--font-number);
  font-size: 13px;
  font-weight: 600;
  color: var(--primary-yellow);
}

.btn-remove-addon {
  background: none;
  border: none;
  color: var(--text-variant);
  cursor: pointer;
  padding: 4px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: color 0.2s ease;
}

.btn-remove-addon:hover {
  color: var(--trading-down);
}

/* Smart Bundle Upsell Card */
.bundle-upsell-card {
  background: linear-gradient(135deg, var(--bg-elevated-dark) 0%, var(--bg-card-dark) 100%);
  border: 1px solid rgba(252, 213, 53, 0.3);
  border-radius: var(--radius-xl);
  padding: var(--space-xl);
  position: relative;
  overflow: hidden;
}

.upsell-badge-row {
  display: flex;
  align-items: center;
  gap: var(--space-xs);
  margin-bottom: var(--space-xs);
}

.upsell-title {
  font-size: 18px;
  font-weight: 700;
  color: var(--primary-yellow);
}

.upsell-desc {
  font-size: 14px;
  color: var(--text-variant);
  margin-bottom: var(--space-md);
}

.upsell-price-row {
  display: flex;
  align-items: baseline;
  gap: var(--space-sm);
  margin-bottom: var(--space-lg);
}

.upsell-price {
  font-family: var(--font-number);
  font-size: 32px;
  font-weight: 700;
  color: #ffffff;
}

.upsell-original-price {
  font-family: var(--font-number);
  font-size: 14px;
  color: var(--text-muted);
  text-decoration: line-through;
}

.bundle-btn {
  width: 100%;
}

/* Bottom Action Bar */
.cart-bottom-bar {
  position: fixed;
  bottom: 0;
  left: 0;
  width: 100%;
  background-color: var(--bg-container-high);
  border-top: 1px solid var(--border-dark);
  z-index: 50;
  padding: var(--space-md) var(--space-lg);
  box-shadow: 0 -4px 24px rgba(0, 0, 0, 0.5);
}

.bar-inner {
  width: 100%;
  max-width: 1100px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: var(--space-md);
}

@media (min-width: 768px) {
  .bar-inner {
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
  }
}

.total-due-col {
  display: flex;
  flex-direction: column;
}

.total-label {
  font-size: 12px;
  color: var(--text-variant);
}

.total-amount {
  font-family: var(--font-number);
  font-size: 28px;
  font-weight: 700;
  color: var(--primary-yellow);
}

.bar-action-btns {
  display: flex;
  align-items: center;
  gap: var(--space-md);
  width: 100%;
}

@media (min-width: 768px) {
  .bar-action-btns {
    width: auto;
  }
}

.bar-action-btns .btn-secondary,
.bar-action-btns .btn-primary {
  flex: 1;
}

@media (min-width: 768px) {
  .bar-action-btns .btn-secondary,
  .bar-action-btns .btn-primary {
    flex: initial;
  }
}
