/**
 * Gameosophy - Modern E-Commerce Cart UI System
 * Sleek, professional, trustworthy, and fully responsive
 */

.gm-cart-page {
  background-color: #f8fafc;
  min-height: 85vh;
  padding: 95px 0 90px 0;
  color: #0f172a;
}

/* Page Intro Header */
.gm-cart-header {
  margin-bottom: 32px;
}

.gm-cart-title {
  font-size: 28px;
  font-weight: 800;
  color: #0f172a;
  letter-spacing: -0.02em;
  margin: 0 0 6px 0;
  display: flex;
  align-items: center;
  gap: 12px;
}

.gm-cart-count-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: rgba(99, 102, 241, 0.12);
  color: #4f46e5;
  font-size: 14px;
  font-weight: 700;
  padding: 4px 12px;
  border-radius: 9999px;
}

.gm-cart-subtitle {
  font-size: 15px;
  color: #64748b;
  margin: 0;
}

/* Cart Card */
.gm-cart-card {
  background: #ffffff;
  border-radius: 16px;
  border: 1px solid #e2e8f0;
  box-shadow: 0 4px 20px rgba(15, 23, 42, 0.04);
  overflow: hidden;
  margin-bottom: 30px;
}

.gm-cart-card-header {
  padding: 18px 24px;
  background: #ffffff;
  border-bottom: 1px solid #f1f5f9;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.gm-cart-card-title {
  font-size: 17px;
  font-weight: 700;
  color: #0f172a;
  margin: 0;
  display: flex;
  align-items: center;
  gap: 8px;
}

.gm-cart-card-title i {
  color: #6366f1;
}

.gm-cart-card-body {
  padding: 0;
}

/* Cart Table Styling */
.gm-cart-table {
  width: 100%;
  margin-bottom: 0;
  border-collapse: separate;
  border-spacing: 0;
}

.gm-cart-table thead th {
  background: #f8fafc;
  color: #64748b;
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  padding: 12px 20px;
  border-bottom: 1px solid #e2e8f0;
  border-top: none;
}

.gm-cart-table tbody tr {
  transition: background 0.15s ease;
}

.gm-cart-table tbody tr:hover {
  background: #fafafa;
}

.gm-cart-table tbody td {
  padding: 20px;
  vertical-align: middle;
  border-bottom: 1px solid #f1f5f9;
  border-top: none;
}

.gm-cart-table tbody tr:last-child td {
  border-bottom: none;
}

/* Product Info Cell */
.gm-cart-prod-cell {
  display: flex;
  align-items: center;
  gap: 16px;
}

.gm-cart-thumb-wrap {
  flex-shrink: 0;
  width: 88px;
  height: 60px;
  border-radius: 10px;
  overflow: hidden;
  background: #e2e8f0;
  border: 1px solid #e2e8f0;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.04);
}

.gm-cart-thumb-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.2s ease;
}

.gm-cart-thumb-wrap:hover .gm-cart-thumb-img {
  transform: scale(1.05);
}

.gm-cart-prod-meta {
  min-width: 0;
  flex: 1;
}

.gm-cart-prod-name {
  font-size: 15px;
  font-weight: 700;
  color: #0f172a;
  margin: 0 0 5px 0;
  line-height: 1.35;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 320px;
}

.gm-cart-prod-name a {
  color: #0f172a;
  text-decoration: none;
  transition: color 0.2s ease;
}

.gm-cart-prod-name a:hover {
  color: #4f46e5;
  text-decoration: none;
}

.gm-cart-badge-license {
  display: inline-block;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.03em;
  padding: 2px 8px;
  border-radius: 6px;
  text-transform: uppercase;
  background: #f1f5f9;
  color: #475569;
  border: 1px solid #e2e8f0;
}

.gm-cart-badge-license.extended {
  background: rgba(99, 102, 241, 0.1);
  color: #4f46e5;
  border-color: rgba(99, 102, 241, 0.25);
}

.gm-cart-addons-list {
  margin-top: 6px;
  font-size: 12px;
  color: #64748b;
  line-height: 1.4;
}

.gm-cart-addons-list span {
  color: #059669;
  font-weight: 700;
}

/* Stepper Quantity Control */
.gm-cart-qty-wrapper {
  display: inline-flex;
  align-items: center;
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 10px;
  padding: 3px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.03);
}

.gm-qty-btn {
  width: 28px;
  height: 28px;
  border-radius: 8px;
  background: #f8fafc;
  border: none;
  color: #475569;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  font-size: 11px;
  transition: all 0.15s ease;
}

.gm-qty-btn:hover {
  background: #e2e8f0;
  color: #0f172a;
}

.gm-qty-input {
  width: 36px;
  border: none;
  background: transparent;
  text-align: center;
  font-size: 13.5px;
  font-weight: 700;
  color: #0f172a;
  outline: none;
  padding: 0;
}

/* Price Display */
.gm-cart-item-price {
  font-size: 16.5px;
  font-weight: 800;
  color: #0f172a;
}

.gm-cart-unit-price-sub {
  font-size: 12px;
  color: #94a3b8;
  margin-top: 4px;
}

/* Action Button */
.btn-cart-delete {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  border-radius: 8px;
  background: #fef2f2;
  border: 1px solid #fee2e2;
  color: #ef4444;
  font-size: 13px;
  transition: all 0.2s ease;
  text-decoration: none;
}

.btn-cart-delete:hover {
  background: #ef4444;
  border-color: #ef4444;
  color: #ffffff;
  transform: translateY(-1px);
  box-shadow: 0 3px 8px rgba(239, 68, 68, 0.25);
  text-decoration: none;
}

/* Card Footer Actions */
.gm-cart-card-footer {
  padding: 16px 24px;
  background: #ffffff;
  border-top: 1px solid #f1f5f9;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.btn-cart-continue {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: #475569;
  font-size: 14px;
  font-weight: 600;
  text-decoration: none;
  transition: all 0.2s ease;
  padding: 8px 14px;
  border-radius: 8px;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
}

.btn-cart-continue:hover {
  background: #f1f5f9;
  color: #0f172a;
  text-decoration: none;
}

/* ==========================================================================
   ORDER SUMMARY SIDEBAR (Sticky)
   ========================================================================== */
.gm-order-summary-card {
  background: #ffffff;
  border-radius: 16px;
  border: 1px solid #e2e8f0;
  box-shadow: 0 4px 20px rgba(15, 23, 42, 0.04);
  padding: 24px;
  position: sticky;
  top: 90px;
}

.gm-order-summary-title {
  font-size: 18px;
  font-weight: 800;
  color: #0f172a;
  letter-spacing: -0.01em;
  margin: 0 0 18px 0;
  padding-bottom: 14px;
  border-bottom: 1px solid #f1f5f9;
}

.gm-summary-list {
  list-style: none;
  padding: 0;
  margin: 0 0 20px 0;
}

.gm-summary-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 0;
  font-size: 14.5px;
  color: #475569;
}

.gm-summary-row.total {
  border-top: 1px solid #e2e8f0;
  margin-top: 12px;
  padding-top: 16px;
  color: #0f172a;
  font-size: 17px;
  font-weight: 800;
}

.gm-summary-row.total .grandTotal {
  font-size: 24px;
  font-weight: 900;
  color: #4f46e5;
  letter-spacing: -0.02em;
}

.gm-summary-val {
  font-weight: 700;
  color: #0f172a;
}

.gm-summary-val.discount {
  color: #ef4444;
}

/* Large Primary Checkout Button */
.btn-checkout-cta {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  width: 100%;
  background: linear-gradient(135deg, #6366f1 0%, #4f46e5 100%);
  color: #ffffff !important;
  font-size: 16px;
  font-weight: 800;
  padding: 15px 24px;
  border-radius: 12px;
  border: none;
  cursor: pointer;
  text-decoration: none;
  box-shadow: 0 6px 20px rgba(79, 70, 229, 0.35);
  transition: all 0.25s ease;
  margin-bottom: 20px;
}

.btn-checkout-cta:hover {
  background: linear-gradient(135deg, #4f46e5 0%, #4338ca 100%);
  box-shadow: 0 8px 24px rgba(79, 70, 229, 0.5);
  transform: translateY(-2px);
  text-decoration: none;
  color: #ffffff !important;
}

.btn-checkout-cta i {
  font-size: 14px;
  transition: transform 0.2s ease;
}

.btn-checkout-cta:hover i {
  transform: translateX(3px);
}

/* Trust Value Props */
.gm-cart-trust-box {
  background: #f8fafc;
  border-radius: 12px;
  border: 1px solid #f1f5f9;
  padding: 14px 16px;
  margin-bottom: 18px;
}

.gm-trust-item {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 12.5px;
  color: #475569;
  margin-bottom: 8px;
  font-weight: 500;
}

.gm-trust-item:last-child {
  margin-bottom: 0;
}

.gm-trust-item i {
  font-size: 14px;
  flex-shrink: 0;
}

/* Accepted Payment Badges */
.gm-cart-payments {
  text-align: center;
  padding-top: 6px;
}

.gm-cart-payments-label {
  font-size: 11.5px;
  color: #94a3b8;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  font-weight: 700;
  margin-bottom: 10px;
}

.gm-cart-payment-icons {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  flex-wrap: wrap;
}

.gm-pay-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 6px;
  padding: 4px 8px;
  font-size: 11px;
  font-weight: 700;
  color: #475569;
}

.gm-pay-badge i {
  font-size: 13px;
}

/* ==========================================================================
   EMPTY CART STATE
   ========================================================================== */
.gm-empty-cart-wrap {
  text-align: center;
  padding: 60px 20px;
}

.gm-empty-icon-wrap {
  width: 96px;
  height: 96px;
  border-radius: 50%;
  background: rgba(99, 102, 241, 0.1);
  border: 1px solid rgba(99, 102, 241, 0.2);
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 24px auto;
  color: #6366f1;
  font-size: 38px;
}

.gm-empty-title {
  font-size: 24px;
  font-weight: 800;
  color: #0f172a;
  margin: 0 0 10px 0;
  letter-spacing: -0.01em;
}

.gm-empty-desc {
  font-size: 15px;
  color: #64748b;
  max-width: 480px;
  margin: 0 auto 28px auto;
  line-height: 1.6;
}

.gm-empty-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 12px;
  margin-bottom: 30px;
}

.gm-empty-quick-links {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  flex-wrap: wrap;
  padding-top: 20px;
  border-top: 1px solid #e2e8f0;
  max-width: 520px;
  margin: 0 auto;
}

.gm-empty-pill {
  font-size: 12.5px;
  font-weight: 600;
  color: #475569;
  background: #f1f5f9;
  padding: 6px 14px;
  border-radius: 9999px;
  text-decoration: none;
  transition: all 0.15s ease;
}

.gm-empty-pill:hover {
  background: #6366f1;
  color: #ffffff;
  text-decoration: none;
}

/* ==========================================================================
   RECOMMENDED PRODUCTS SECTION
   ========================================================================== */
.gm-cart-rec-section {
  margin-top: 60px;
  padding-top: 40px;
  border-top: 1px solid #e2e8f0;
}

.gm-cart-rec-header {
  margin-bottom: 28px;
}

.gm-cart-rec-title {
  font-size: 22px;
  font-weight: 800;
  color: #0f172a;
  margin: 0 0 6px 0;
  display: flex;
  align-items: center;
  gap: 8px;
}

.gm-cart-rec-title i {
  color: #f59e0b;
}

.gm-cart-rec-subtitle {
  font-size: 14px;
  color: #64748b;
  margin: 0;
}

/* Responsive Breakpoints */
@media (max-width: 991px) {
  .gm-cart-page {
    padding: 80px 0 70px 0;
  }

  .gm-order-summary-card {
    position: static;
    margin-top: 20px;
  }

  .gm-cart-prod-name {
    max-width: 220px;
  }
}

@media (max-width: 767px) {
  .gm-cart-page {
    padding: 60px 0 60px 0;
  }

  .gm-cart-title {
    font-size: 22px;
  }

  .gm-cart-table thead {
    display: none;
  }

  .gm-cart-table tbody td {
    display: block;
    padding: 12px 16px;
    text-align: left !important;
  }

  .gm-cart-table tbody tr {
    display: block;
    border-bottom: 1px solid #f1f5f9;
    padding: 10px 0;
  }

  .gm-cart-prod-cell {
    gap: 12px;
  }

  .gm-cart-thumb-wrap {
    width: 70px;
    height: 50px;
  }

  .gm-cart-prod-name {
    max-width: 100%;
    white-space: normal;
    font-size: 14px;
  }

  .btn-checkout-cta {
    font-size: 15px;
    padding: 14px;
  }
}