/* Membership cart — table + sidebar layout (reference-inspired, dark/gold theme) */

.store-cart-layout {
  align-items: flex-start;
}

.store-cart-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-top: 16px;
  padding: 14px 18px;
  background: #16171d;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 16px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.28);
}

.store-cart-bar[hidden] {
  display: none !important;
}

.store-cart-bar__meta {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}

.store-cart-bar__meta span {
  font-size: 0.78rem;
  font-weight: 600;
  color: #9ca3af;
}

.store-cart-bar__meta strong {
  font-size: 1.15rem;
  font-weight: 800;
  color: #ffd700;
}

.store-cart-bar__btn {
  min-width: 160px;
  min-height: 48px;
  border: none;
  border-radius: 12px;
  font-weight: 700;
}

.store-cart-bar__btn:disabled {
  opacity: 0.55;
  cursor: not-allowed;
}

.store-review-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 360px;
  gap: 24px;
  align-items: start;
}

.store-review-sidebar {
  position: sticky;
  top: 24px;
}

.store-review-crumb {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 0 0 16px;
  font-size: 0.82rem;
  color: #9ca3af;
}

.store-review-crumb a {
  color: #9ca3af;
  text-decoration: none;
  font-weight: 600;
}

.store-review-crumb a:hover {
  color: #ffd700;
}

.store-review-crumb span {
  color: #e5e7eb;
  font-weight: 700;
}

.store-review-note {
  margin: 10px 0 0;
  font-size: 0.76rem;
  color: #6b7280;
  line-height: 1.45;
}

.store-review-page .store-cart-table__head,
.store-review-page .store-cart-row {
  grid-template-columns: minmax(0, 1fr) 34px;
}

.store-review-page .store-cart-row__check {
  display: none;
}

.store-panel {
  background: #16171d;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 16px;
  padding: 20px 22px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.28);
}

.store-panel + .store-panel {
  margin-top: 16px;
}

.store-panel__title {
  margin: 0 0 14px;
  font-size: 1rem;
  font-weight: 700;
  color: #fff;
}

.store-cart-card {
  background: #16171d;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 16px;
  overflow: hidden;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.28);
}

.store-cart-toolbar {
  margin-bottom: 12px;
}

.store-cart-card__head {
  display: grid;
  grid-template-columns: 28px minmax(0, 1fr) auto;
  align-items: center;
  gap: 14px;
  padding: 16px 22px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.store-cart-card__title {
  margin: 0;
  font-size: 1.15rem;
  font-weight: 700;
  color: #fff;
}

.store-cart-select-all {
  display: inline-flex;
  align-items: center;
  margin: 0;
  font-size: 0.82rem;
  font-weight: 600;
  color: #d1d5db;
  cursor: pointer;
  user-select: none;
}

.store-cart-table__head,
.store-cart-row {
  display: grid;
  grid-template-columns: 28px minmax(0, 1fr) 34px;
  gap: 14px;
  align-items: start;
  padding: 14px 22px;
}

.store-cart-table__head {
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  color: #9ca3af;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.store-cart-row {
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  transition: background 0.2s ease;
}

.store-cart-row:hover {
  background: rgba(255, 255, 255, 0.02);
}

.store-cart-row.is-unchecked {
  opacity: 0.55;
}

.store-cart-row__check {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 22px;
  padding-top: 2px;
}

.store-cart-row__check input {
  width: 18px;
  height: 18px;
  margin: 0;
  accent-color: #ffd700;
  cursor: pointer;
}

.store-cart-row__product {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  min-width: 0;
}

.store-cart-product-copy {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 8px;
  min-width: 0;
}

.store-cart-thumb {
  width: 56px;
  height: 56px;
  border-radius: 12px;
  background: linear-gradient(135deg, rgba(255, 215, 0, 0.14), rgba(255, 140, 0, 0.08));
  border: 1px solid rgba(255, 215, 0, 0.24);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #ffd700;
  font-size: 1.2rem;
  flex-shrink: 0;
}

.store-cart-product-name {
  margin: 0;
  font-size: 0.95rem;
  font-weight: 700;
  color: #f9fafb;
  line-height: 1.35;
}

.store-cart-period-select-wrap {
  position: relative;
  display: inline-flex;
  align-items: center;
}

.store-cart-period-select {
  appearance: none;
  -webkit-appearance: none;
  min-width: 118px;
  padding: 7px 28px 7px 10px;
  border-radius: 8px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  background: #0f1014;
  color: #e5e7eb;
  font-size: 0.78rem;
  font-weight: 700;
  line-height: 1.2;
  cursor: pointer;
}

.store-cart-period-select:focus {
  outline: none;
  border-color: rgba(255, 215, 0, 0.45);
  box-shadow: 0 0 0 3px rgba(255, 215, 0, 0.08);
}

.store-cart-period-select-wrap i {
  position: absolute;
  right: 10px;
  font-size: 0.62rem;
  color: #9ca3af;
  pointer-events: none;
}

.store-cart-row__price {
  display: flex;
  align-items: flex-start;
  justify-content: flex-end;
}

.store-cart-price {
  font-size: 0.95rem;
  font-weight: 800;
  color: #ffd700;
  white-space: nowrap;
}

.store-cart-remove {
  width: 34px;
  height: 34px;
  border: none;
  border-radius: 10px;
  background: rgba(239, 68, 68, 0.1);
  color: #f87171;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: background 0.2s ease, color 0.2s ease;
}

.store-cart-remove:hover {
  background: rgba(239, 68, 68, 0.18);
  color: #fca5a5;
}

.store-cart-card__foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 16px 22px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.store-cart-back {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 14px;
  border-radius: 10px;
  background: rgba(255, 215, 0, 0.1);
  border: 1px solid rgba(255, 215, 0, 0.32);
  color: #fde68a;
  text-decoration: none;
  font-size: 0.86rem;
  font-weight: 700;
  transition: background 0.2s ease, border-color 0.2s ease, color 0.2s ease;
}

.store-cart-back:hover {
  background: rgba(255, 215, 0, 0.18);
  border-color: rgba(255, 215, 0, 0.5);
  color: #ffd700;
}

.store-cart-clear {
  border: 1px solid rgba(239, 68, 68, 0.35);
  background: rgba(239, 68, 68, 0.08);
  color: #fca5a5;
  border-radius: 10px;
  padding: 8px 16px;
  font-size: 0.82rem;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.2s ease;
}

.store-cart-clear:hover {
  background: rgba(239, 68, 68, 0.16);
  border-color: rgba(239, 68, 68, 0.5);
  color: #fff;
}

.store-coupon-input {
  display: flex;
  gap: 8px;
}

.store-coupon-input input {
  flex: 1;
  min-width: 0;
  background: #0f1014;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 10px;
  color: #e5e7eb;
  font-size: 0.88rem;
  padding: 10px 12px;
}

.store-coupon-input input::placeholder {
  color: #6b7280;
}

.store-coupon-input input:focus {
  outline: none;
  border-color: rgba(255, 215, 0, 0.4);
  box-shadow: 0 0 0 3px rgba(255, 215, 0, 0.08);
}

.store-coupon-apply {
  flex-shrink: 0;
  border: 1px solid rgba(255, 215, 0, 0.35);
  background: rgba(255, 215, 0, 0.06);
  color: #fde68a;
  border-radius: 10px;
  padding: 0 14px;
  font-size: 0.78rem;
  font-weight: 700;
  cursor: pointer;
  white-space: nowrap;
}

.store-coupon-apply:hover {
  background: rgba(255, 215, 0, 0.12);
}

.store-coupon-apply:disabled {
  cursor: not-allowed;
  opacity: 0.7;
}

.store-coupon-input.is-applied input {
  border-color: rgba(34, 197, 94, 0.45);
  background: rgba(34, 197, 94, 0.06);
}

.store-coupon-apply.is-applied,
.store-coupon-apply.is-applied:hover {
  background: rgba(34, 197, 94, 0.16);
  border-color: rgba(34, 197, 94, 0.45);
  color: #86efac;
}

.store-coupon-note {
  margin: 10px 0 0;
  font-size: 0.76rem;
  color: #9ca3af;
  line-height: 1.45;
}

.store-coupon-note.is-success {
  color: #86efac;
}

.store-coupon-note.is-error {
  color: #fca5a5;
}

.store-summary-line.is-discount strong {
  color: #86efac;
}

.store-summary-line {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 8px 0;
  font-size: 0.88rem;
  color: #d1d5db;
  border-bottom: 1px dashed rgba(255, 255, 255, 0.06);
}

.store-summary-line:last-of-type {
  border-bottom: none;
}

.store-summary-line strong {
  color: #f3f4f6;
  font-weight: 700;
}

.store-summary-total {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: 12px;
  padding-top: 14px;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  font-size: 1.05rem;
  font-weight: 800;
  color: #fff;
}

.store-summary-total span:last-child {
  color: #ffd700;
  font-size: 1.2rem;
}

.cart-upsell-section {
  margin-top: 22px;
}

.cart-upsell-section--in-cart {
  margin-top: 0;
  padding: 14px 22px 16px;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
}

.cart-upsell-head {
  margin-bottom: 10px;
}

.cart-upsell-head h5 {
  margin: 0;
  font-size: 0.82rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: #9ca3af;
}

.cart-upsell-track {
  display: flex;
  gap: 10px;
  overflow-x: auto;
  padding: 2px 0 8px;
  scrollbar-width: thin;
  scrollbar-color: rgba(255, 255, 255, 0.12) transparent;
}

.cart-upsell-card {
  flex: 0 0 196px;
  width: 196px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 10px;
  padding: 12px 14px;
  border-radius: 12px;
  background: #14151a;
  border: 1px solid rgba(255, 255, 255, 0.06);
}

.cart-upsell-card__name {
  margin: 0 0 4px;
  font-size: 0.82rem;
  font-weight: 700;
  color: #e5e7eb;
  line-height: 1.3;
}

.cart-upsell-card__meta {
  margin: 0;
  font-size: 0.72rem;
  color: #6b7280;
  line-height: 1.35;
}

.cart-upsell-card__action {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.cart-upsell-card__price {
  font-size: 0.78rem;
  font-weight: 700;
  color: #d1d5db;
}

.cart-upsell-card__price small {
  margin-left: 2px;
  font-size: 0.68rem;
  font-weight: 600;
  color: #6b7280;
}

.cart-upsell-add {
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: transparent;
  color: #d1d5db;
  border-radius: 8px;
  padding: 5px 10px;
  font-size: 0.72rem;
  font-weight: 700;
  cursor: pointer;
}

.cart-upsell-add:hover {
  border-color: rgba(255, 215, 0, 0.35);
  color: #ffd700;
}

.store-checkout-form {
  margin-top: 16px;
}

.store-checkout-form .btn-yellow {
  border: none;
  border-radius: 12px;
  min-height: 52px;
}

.store-cart-empty {
  text-align: center;
  padding: 56px 24px;
}

.store-cart-empty i {
  font-size: 3rem;
  color: rgba(255, 215, 0, 0.35);
  margin-bottom: 14px;
}

.store-cart-empty h2 {
  font-size: 1.25rem;
  font-weight: 700;
  color: #fff;
  margin-bottom: 8px;
}

.store-cart-empty p {
  margin: 0 0 18px;
  color: #9ca3af;
  font-size: 0.9rem;
}

#membershipCartModal .modal-dialog {
  max-width: 920px;
}

#membershipCartModal .store-cart-table__head,
#membershipCartModal .store-cart-row {
  grid-template-columns: 24px minmax(0, 1fr) 100px;
  padding-left: 16px;
  padding-right: 16px;
}

@media (max-width: 991px) {
  body.store-cart-page .mobile-header {
    display: none !important;
  }

  body.store-cart-page {
    padding-top: 0 !important;
  }

  .store-cart-page .container {
    padding-left: 14px;
    padding-right: 14px;
    margin-top: 0 !important;
    margin-bottom: 0.75rem !important;
  }

  .store-cart-toolbar,
  .store-review-crumb {
    position: sticky;
    top: 0;
    z-index: 1040;
    margin: 0 -14px 12px;
    padding: calc(10px + env(safe-area-inset-top, 0px)) 14px 10px;
    background: rgba(15, 15, 15, 0.96);
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    backdrop-filter: blur(12px);
  }

  .store-review-crumb {
    margin-bottom: 12px;
  }

  .store-panel,
  .store-cart-card {
    border-radius: 14px;
  }

  .store-panel {
    padding: 16px;
  }

  .store-cart-card__head {
    grid-template-columns: 22px minmax(0, 1fr) auto;
    gap: 10px;
    padding: 14px;
  }

  .store-cart-row {
    grid-template-columns: 22px minmax(0, 1fr) 34px;
    gap: 10px;
    padding: 14px;
  }

  .store-cart-card__title {
    font-size: 1.05rem;
  }

  .store-cart-select-all {
    font-size: 0.75rem;
  }

  .store-cart-table__head {
    display: none;
  }

  .store-cart-row {
    align-items: start;
  }

  .store-cart-row__product {
    align-items: flex-start;
    gap: 10px;
  }

  .store-cart-row__price {
    align-items: flex-start;
    justify-content: flex-end;
  }

  .store-cart-thumb {
    width: 44px;
    height: 44px;
    border-radius: 10px;
    font-size: 1rem;
  }

  .store-cart-product-name {
    font-size: 0.9rem;
  }

  .store-review-page .store-cart-row {
    grid-template-columns: minmax(0, 1fr) 34px;
  }

  .store-cart-price {
    font-size: 0.88rem;
  }

  .store-cart-card__foot {
    padding-top: 12px;
    padding-bottom: 12px;
  }

  .store-cart-clear {
    padding: 7px 12px;
    font-size: 0.75rem;
  }

  body.store-cart-page {
    padding-bottom: calc(148px + env(safe-area-inset-bottom, 0px)) !important;
  }

  .store-cart-sidebar {
    padding-bottom: 12px;
  }

  .store-cart-bar {
    position: fixed;
    left: 0;
    right: 0;
    bottom: calc(64px + env(safe-area-inset-bottom, 0px));
    z-index: 1035;
    margin: 0;
    border-radius: 0;
    border-left: none;
    border-right: none;
    border-bottom: none;
    background: rgba(16, 17, 22, 0.96);
    box-shadow: 0 -10px 28px rgba(0, 0, 0, 0.4);
    backdrop-filter: blur(12px);
  }

  .store-review-layout {
    grid-template-columns: 1fr;
    gap: 16px;
  }

  .store-review-sidebar {
    position: static;
  }

  .store-review-page .store-checkout-form {
    position: fixed;
    left: 0;
    right: 0;
    bottom: calc(64px + env(safe-area-inset-bottom, 0px));
    z-index: 1035;
    margin: 0;
    padding: 10px 14px;
    background: rgba(16, 17, 22, 0.96);
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    box-shadow: 0 -10px 28px rgba(0, 0, 0, 0.4);
    backdrop-filter: blur(12px);
  }

  .cart-upsell-section {
    margin-top: 18px;
    margin-bottom: 8px;
  }

  .cart-upsell-section--in-cart {
    padding: 12px 14px 14px;
  }

  .cart-upsell-card {
    flex: 0 0 168px;
    width: 168px;
    padding: 10px 12px;
  }
}

.membership-cart-toast {
  position: fixed;
  top: max(16px, calc(env(safe-area-inset-top, 0px) + 12px));
  left: 50%;
  transform: translateX(-50%) translateY(-10px);
  z-index: 11050;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  max-width: min(420px, calc(100vw - 32px));
  padding: 12px 18px;
  border-radius: 12px;
  background: #16171d;
  border: 1px solid rgba(255, 215, 0, 0.35);
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.4);
  color: #f3f4f6;
  font-size: 0.9rem;
  font-weight: 600;
  opacity: 0;
  pointer-events: none;
  visibility: hidden;
  transition: opacity 0.2s ease, transform 0.2s ease, visibility 0.2s ease;
}

.membership-cart-toast.is-visible {
  opacity: 1;
  visibility: visible;
  transform: translateX(-50%) translateY(0);
}

.membership-cart-toast i {
  font-size: 1.05rem;
  flex-shrink: 0;
}

.membership-cart-toast.is-success {
  border-color: rgba(255, 215, 0, 0.55);
}

.membership-cart-toast.is-success i {
  color: #ffd700;
}

.membership-cart-toast.is-info {
  border-color: rgba(251, 191, 36, 0.45);
}

.membership-cart-toast.is-info i {
  color: #fbbf24;
}

@media (max-width: 991px) {
  .membership-cart-toast {
    top: calc(var(--mobile-header-row1-h, 60px) + 10px);
  }

  body.store-cart-page .membership-cart-toast {
    top: calc(12px + env(safe-area-inset-top, 0px));
  }
}
