/* ==========================================================================
   SHOPPING CART CSS — Namespaced with sc- prefix to prevent conflicts
   ========================================================================== */

/* ==========================================================================
   1. ЗМІННІ ТА ОСНОВА
   ========================================================================== */
:root {
  --sc-primary: #15171c;
  --sc-primary-hover: #1b1d23;
  --sc-text-dark: #1f2937;
  --sc-text-medium: #6b7280;
  --sc-text-light: #9ca3af;
  --sc-bg-soft: #f8fafc;
  --sc-bg-white: #ffffff;
  --sc-border-color: #e5e7eb;
  --sc-radius-md: 0.5rem;
  --sc-radius-lg: 0.75rem;
  --sc-shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
  --sc-transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Скидання для кошика */
.sc-cart-container * {
  box-sizing: border-box;
}

/* ==========================================================================
   2. ОВЕРЛЕЙ ТА ПАНЕЛЬ (РОЗШИРЕНА)
   ========================================================================== */
.sc-cart-container {
  position: fixed;
  inset: 0;
  z-index: 1110;
  pointer-events: none;
}

.sc-cart-overlay {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.6);
  backdrop-filter: blur(4px);
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.4s ease;
  pointer-events: auto;
}

.sc-cart-container.active .sc-cart-overlay,
.sc-cart-container[aria-hidden="false"] .sc-cart-overlay {
  opacity: 1;
  visibility: visible;
}

.sc-cart-panel {
  position: fixed;
  top: 0;
  right: 0;
  width: 100%;
  max-width: 550px;
  height: 100vh;
  background: var(--sc-bg-white);
  z-index: 1120;
  display: flex;
  flex-direction: column;
  transform: translateX(100%);
  transition: transform 0.5s cubic-bezier(0.16, 1, 0.3, 1);
  box-shadow: var(--sc-shadow-xl);
  pointer-events: auto;
}

.sc-cart-container.active .sc-cart-panel,
.sc-cart-container[aria-hidden="false"] .sc-cart-panel {
  transform: translateX(0);
}

/* ==========================================================================
   3. ШАПКА КОШИКА (HEADER)
   ========================================================================== */
.sc-cart-header {
  padding: 1.25rem 1.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid var(--sc-border-color);
  flex-shrink: 0;
}

.sc-cart-title {
  font-size: 1.5rem;
  font-weight: 800;
  margin: 0;
  color: var(--sc-text-dark);
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.sc-cart-close-btn {
  background: var(--sc-bg-soft);
  border: none;
  cursor: pointer;
  color: var(--sc-text-medium);
  width: 40px;
  height: 40px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: var(--sc-transition);
}

.sc-cart-close-btn:hover {
  background: #fee2e2;
  color: #ef4444;
  transform: rotate(90deg);
}

/* ==========================================================================
   4. СПИСОК ТОВАРІВ (ЗБІЛЬШЕНА ЗОНА)
   ========================================================================== */
.sc-cart-body {
  flex: 1;
  overflow-y: auto;
  padding: 1.5rem;
  scrollbar-width: thin;
  scrollbar-color: var(--sc-border-color) transparent;
}

.sc-cart-body::-webkit-scrollbar {
  width: 6px;
}

.sc-cart-body::-webkit-scrollbar-thumb {
  background-color: var(--sc-border-color);
  border-radius: 10px;
}

.sc-cart-items-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

/* Картка товару */
.sc-cart-prod {
  display: flex;
  gap: 1.25rem;
  padding: 1rem;
  border: 1px solid var(--sc-border-color);
  border-radius: var(--sc-radius-lg);
  align-items: flex-start;
  min-height: 96px;
  background: var(--sc-bg-white);
  transition: var(--sc-transition);
  position: relative;
}

.sc-cart-prod:hover {
  border-color: var(--sc-text-light);
  box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05);
}

.sc-cart-prod .sc-img {
  width: 80px;
  height: 80px;
  flex-shrink: 0;
  background: var(--sc-bg-soft);
  border-radius: var(--sc-radius-md);
  padding: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.sc-cart-prod .sc-img img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

/* Small thumbnail used in checkout and other minimal fallbacks */
.sc-checkout-thumb {
  width: 96px;
  height: 96px;
  object-fit: contain;
  border-radius: 8px;
  flex-shrink: 0;
  display: block;
}

/* Checkout product list layout */
.sc-checkout-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.sc-checkout-left {
  display: flex;
  gap: 1rem;
  align-items: center;
  flex: 1 1 auto;
  min-width: 0;
}

.sc-checkout-meta {
  min-width: 0;
}

.sc-checkout-title {
  white-space: normal;
  overflow: hidden;
  text-overflow: ellipsis;
}

.sc-checkout-price {
  flex: 0 0 auto;
  min-width: 90px;
  text-align: right;
}

@media (max-width: 900px) {
  .sc-checkout-thumb {
    width: 72px;
    height: 72px;
  }
}

@media (max-width: 600px) {
  .sc-checkout-thumb {
    width: 56px;
    height: 56px;
  }
}

/* Helper: controls row for quantity + delete button */
.sc-controls-row {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

@media (max-width: 600px) {

  /* Keep image slightly larger for visual prominence on mobile */
  .sc-cart-prod .sc-img {
    width: 72px;
    height: 72px;
  }

  .sc-cart-prod .sc-img img {
    width: 72px;
    height: 72px;
    object-fit: contain;
    border-radius: 8px;
  }

  /* Move delete button next to the quantity input */
  .sc-controls-row {
    justify-content: center;
  }

  .sc-remove-item-btn {
    position: static;
    margin-left: 0;
    transform: none;
  }
}

.sc-cart-prod .sc-text {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.sc-cart-prod .sc-title {
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--sc-text-dark);
  margin: 0 0 0.4rem 0;
  white-space: normal;
  overflow: hidden;
}

/* ==========================================================================
   5. ДІЇ ТА ЦІНИ (ВИРІВНЮВАННЯ В РЯДОК)
   ========================================================================== */
.sc-cart-item-actions {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  width: 100%;
  flex-wrap: wrap;
}

/* Ліва група: ціна та лічильник залишаються поруч */
.sc-cart-item-price {
  flex: 0 0 auto;
  margin-right: 0.5rem;
}

.sc-count-b {
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  border: 1px solid var(--sc-border-color);
  border-radius: 8px;
  background: var(--sc-bg-soft);
  height: 36px;
  width: 100px;
  overflow: hidden;
  flex-shrink: 0;
}

.sc-cart-item-total {
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--sc-text-dark);
  margin-left: auto;
  min-width: 90px;
  text-align: right;
}

.sc-remove-item-btn {
  margin-left: 8px;
  align-self: center;
  background: transparent;
  border: none;
  color: #ef4444;
  cursor: pointer;
  padding: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: var(--sc-transition);
  flex-shrink: 0;
}

.sc-remove-item-btn:hover {
  color: #b91c1c;
  transform: scale(1.2) rotate(5deg);
}

.sc-remove-item-btn svg {
  width: 20px;
  height: 20px;
  display: block;
}

.sc-unit-price {
  font-size: 0.9rem;
  color: var(--sc-text-medium);
  min-width: 90px;
}

/* Блок лічильника */
.sc-count-b button {
  width: 32px;
  height: 100%;
  border: none;
  background: transparent;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.2rem;
  color: var(--sc-text-dark);
  transition: background 0.2s;
}

.sc-count-b button:hover {
  background: #e5e7eb;
}

.sc-count-b input {
  width: 34px;
  flex: 1;
  border: none;
  background: transparent;
  text-align: center;
  font-weight: 700;
  font-size: 0.9rem;
  color: var(--sc-text-dark);
  padding: 0;
  appearance: textfield;
  -moz-appearance: textfield;
}

.sc-count-b input::-webkit-outer-spin-button,
.sc-count-b input::-webkit-inner-spin-button {
  -webkit-appearance: none;
  margin: 0;
}

/* ==========================================================================
   6. КОМПАКТНИЙ ФУТЕР (FOOTER)
   ========================================================================== */
.sc-cart-footer {
  padding: 1.25rem 1.5rem;
  border-top: 1px solid var(--sc-border-color);
  background: var(--sc-bg-white);
  flex-shrink: 0;
}

.sc-cart-summary-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1rem;
}

.sc-cart-summary-row .sc-label {
  font-weight: 700;
  color: var(--sc-text-medium);
  text-transform: uppercase;
  font-size: 0.8rem;
  letter-spacing: 0.1em;
}

.sc-cart-summary-row .sc-amount {
  font-size: 1.75rem;
  font-weight: 900;
  color: var(--sc-primary);
  letter-spacing: -0.02em;
}

.sc-btn-checkout {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
  width: 100%;
  padding: 1.1rem;
  background: var(--sc-primary);
  color: white;
  text-decoration: none;
  border-radius: var(--sc-radius-md);
  font-weight: 700;
  text-transform: uppercase;
  font-size: 0.95rem;
  letter-spacing: 0.05em;
  transition: var(--sc-transition);
  border: none;
  cursor: pointer;
}

.sc-btn-checkout:hover:not(.sc-disabled) {
  background: var(--sc-primary-hover);
  box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
  transform: translateY(-2px);
}

.sc-btn-checkout.sc-disabled,
.sc-btn-checkout[aria-disabled="true"] {
  opacity: 0.4;
  cursor: not-allowed;
  filter: grayscale(1);
}

.sc-btn-clear {
  display: block;
  margin: 0.8rem auto 0;
  background: none;
  border: none;
  color: var(--sc-text-light);
  font-size: 0.8rem;
  cursor: pointer;
  text-decoration: underline;
  transition: color 0.2s;
}

.sc-btn-clear:hover {
  color: #ef4444;
}

/* ==========================================================================
   7. СТАН ПОРОЖНЬОГО КОШИКА ТА АНІМАЦІЇ
   ========================================================================== */
.sc-cart-empty-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 5rem 2rem;
  text-align: center;
}

.sc-cart-empty-state[style*="display: none"] {
  display: none !important;
}

.sc-cart-empty-state svg {
  width: 64px;
  height: 64px;
  color: var(--sc-border-color);
  margin-bottom: 1.5rem;
}

.sc-cart-empty-state p {
  color: var(--sc-text-medium);
  font-size: 1.1rem;
  margin-bottom: 1.5rem;
}

/* Пульсація при оновленні */
.sc-updated {
  animation: scPricePulse 0.5s ease;
}

@keyframes scPricePulse {
  0% {
    transform: scale(1);
  }

  50% {
    transform: scale(1.08);
    color: #10b981;
  }

  100% {
    transform: scale(1);
  }
}

/* ==========================================================================
   8. АДАПТИВНІСТЬ
   ========================================================================== */
@media (max-width: 600px) {
  .sc-cart-panel {
    max-width: 100%;
  }

  .sc-cart-prod {
    gap: 0.75rem;
    padding: 0.75rem;
    min-height: auto;
  }

  .sc-cart-prod .sc-img {
    width: 56px;
    height: 56px;
  }

  .sc-cart-prod .sc-title {
    text-align: center;
  }

  .sc-cart-prod .sc-text {
    align-items: center;
  }

  .sc-unit-price {
    display: none;
  }

  .sc-count-b {
    width: auto;
    height: 34px;
  }

  .sc-count-b button {
    width: 40px;
  }

  .sc-count-b input {
    width: 44px;
  }

  .sc-cart-item-actions {
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
  }

  .sc-cart-item-total {
    font-size: 1rem;
    min-width: auto;
    text-align: center;
    margin-left: 0;
    margin-top: 0.5rem;
  }

  .sc-remove-item-btn {
    position: static;
    margin-left: 8px;
    transform: none;
  }

  .sc-cart-summary-row .sc-amount {
    font-size: 1.5rem;
  }
}

/* ==========================================================================
   LEGACY CLASS ALIASES (for backward compatibility during migration)
   ========================================================================== */
.cart-container {
  position: fixed;
  inset: 0;
  z-index: 1110;
  pointer-events: none;
}

.cart-container * {
  box-sizing: border-box;
}

.cart-container.active .cart-overlay,
.cart-container[aria-hidden="false"] .cart-overlay {
  opacity: 1;
  visibility: visible;
}

.cart-container.active .cart-panel,
.cart-container[aria-hidden="false"] .cart-panel {
  transform: translateX(0);
}

.cart-overlay {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.6);
  backdrop-filter: blur(4px);
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.4s ease;
  pointer-events: auto;
}

.cart-panel {
  position: fixed;
  top: 0;
  right: 0;
  width: 100%;
  max-width: 550px;
  height: 100vh;
  background: var(--sc-bg-white, #fff);
  z-index: 1120;
  display: flex;
  flex-direction: column;
  transform: translateX(100%);
  transition: transform 0.5s cubic-bezier(0.16, 1, 0.3, 1);
  box-shadow: var(--sc-shadow-xl);
  pointer-events: auto;
}

.cart-header {
  padding: 1.25rem 1.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid var(--sc-border-color);
  flex-shrink: 0;
}

.cart-title {
  font-size: 1.5rem;
  font-weight: 800;
  margin: 0;
  color: var(--sc-text-dark);
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.cart-close-btn {
  background: var(--sc-bg-soft);
  border: none;
  cursor: pointer;
  color: var(--sc-text-medium);
  width: 40px;
  height: 40px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: var(--sc-transition);
}

.cart-close-btn:hover {
  background: #fee2e2;
  color: #ef4444;
  transform: rotate(90deg);
}

.cart-body {
  flex: 1;
  overflow-y: auto;
  padding: 1.5rem;
  scrollbar-width: thin;
  scrollbar-color: var(--sc-border-color) transparent;
}

.cart-items-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

.cart_prod {
  display: flex;
  gap: 1.25rem;
  padding: 1rem;
  border: 1px solid var(--sc-border-color);
  border-radius: var(--sc-radius-lg);
  align-items: flex-start;
  min-height: 96px;
  background: var(--sc-bg-white);
  transition: var(--sc-transition);
  position: relative;
}

.cart_prod:hover {
  border-color: var(--sc-text-light);
  box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05);
}

.cart_prod .img {
  width: 80px;
  height: 80px;
  flex-shrink: 0;
  background: var(--sc-bg-soft);
  border-radius: var(--sc-radius-md);
  padding: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.cart_prod .img img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.cart_prod .text {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.cart_prod .title {
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--sc-text-dark);
  margin: 0 0 0.4rem 0;
  white-space: normal;
  overflow: hidden;
}

.cart-item-actions {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  width: 100%;
  flex-wrap: wrap;
}

.cart-item-price {
  flex: 0 0 auto;
  margin-right: 0.5rem;
}

.cart-item-total {
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--sc-text-dark);
  margin-left: auto;
  min-width: 90px;
  text-align: right;
}

.unit-price {
  font-size: 0.9rem;
  color: var(--sc-text-medium);
  min-width: 90px;
}

.count_b {
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  border: 1px solid var(--sc-border-color);
  border-radius: 8px;
  background: var(--sc-bg-soft);
  height: 36px;
  width: 100px;
  overflow: hidden;
  flex-shrink: 0;
}

.count_b button {
  width: 32px;
  height: 100%;
  border: none;
  background: transparent;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.2rem;
  color: var(--sc-text-dark);
  transition: background 0.2s;
}

.count_b button:hover {
  background: #e5e7eb;
}

.count_b input {
  width: 34px;
  flex: 1;
  border: none;
  background: transparent;
  text-align: center;
  font-weight: 700;
  font-size: 0.9rem;
  color: var(--sc-text-dark);
  padding: 0;
  appearance: textfield;
  -moz-appearance: textfield;
}

.count_b input::-webkit-outer-spin-button,
.count_b input::-webkit-inner-spin-button {
  -webkit-appearance: none;
  margin: 0;
}

.remove-item-btn {
  margin-left: 8px;
  align-self: center;
  background: transparent;
  border: none;
  color: #ef4444;
  cursor: pointer;
  padding: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: var(--sc-transition);
  flex-shrink: 0;
}

.remove-item-btn:hover {
  color: #b91c1c;
  transform: scale(1.2) rotate(5deg);
}

.remove-item-btn svg {
  width: 20px;
  height: 20px;
  display: block;
}

.controls-row {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.cart-footer {
  padding: 1.25rem 1.5rem;
  border-top: 1px solid var(--sc-border-color);
  background: var(--sc-bg-white);
  flex-shrink: 0;
}

.cart-summary-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1rem;
}

.cart-summary-row .label {
  font-weight: 700;
  color: var(--sc-text-medium);
  text-transform: uppercase;
  font-size: 0.8rem;
  letter-spacing: 0.1em;
}

.cart-summary-row .amount {
  font-size: 1.75rem;
  font-weight: 900;
  color: var(--sc-primary);
  letter-spacing: -0.02em;
}

.btn-checkout {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
  width: 100%;
  padding: 1.1rem;
  background: var(--sc-primary);
  color: white;
  text-decoration: none;
  border-radius: var(--sc-radius-md);
  font-weight: 700;
  text-transform: uppercase;
  font-size: 0.95rem;
  letter-spacing: 0.05em;
  transition: var(--sc-transition);
  border: none;
  cursor: pointer;
}

.btn-checkout:hover:not(.disabled) {
  background: var(--sc-primary-hover);
  box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
  transform: translateY(-2px);
}

.btn-checkout.disabled,
.btn-checkout[aria-disabled="true"] {
  opacity: 0.4;
  cursor: not-allowed;
  filter: grayscale(1);
}

.btn-clear {
  display: block;
  margin: 0.8rem auto 0;
  background: none;
  border: none;
  color: var(--sc-text-light);
  font-size: 0.8rem;
  cursor: pointer;
  text-decoration: underline;
  transition: color 0.2s;
}

.btn-clear:hover {
  color: #ef4444;
}

.cart-empty-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 5rem 2rem;
  text-align: center;
}

.cart-empty-state[style*="display: none"] {
  display: none !important;
}

.cart-empty-state svg {
  width: 64px;
  height: 64px;
  color: var(--sc-border-color);
  margin-bottom: 1.5rem;
}

.cart-empty-state p {
  color: var(--sc-text-medium);
  font-size: 1.1rem;
  margin-bottom: 1.5rem;
}

.updated {
  animation: scPricePulse 0.5s ease;
}

.checkout-thumb {
  width: 96px;
  height: 96px;
  object-fit: contain;
  border-radius: 8px;
  flex-shrink: 0;
  display: block;
}

.checkout-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.checkout-left {
  display: flex;
  gap: 1rem;
  align-items: center;
  flex: 1 1 auto;
  min-width: 0;
}

.checkout-meta {
  min-width: 0;
}

.checkout-title {
  white-space: normal;
  overflow: hidden;
  text-overflow: ellipsis;
}

.checkout-price {
  flex: 0 0 auto;
  min-width: 90px;
  text-align: right;
}

@media (max-width: 600px) {
  .cart-panel {
    max-width: 100%;
  }

  .cart_prod {
    gap: 0.75rem;
    padding: 0.75rem;
    min-height: auto;
  }

  .cart_prod .img {
    width: 56px;
    height: 56px;
  }

  .cart_prod .title {
    text-align: center;
  }

  .cart_prod .text {
    align-items: center;
  }

  .unit-price {
    display: none;
  }

  .count_b {
    width: auto;
    height: 34px;
  }

  .count_b button {
    width: 40px;
  }

  .count_b input {
    width: 44px;
  }

  .cart-item-actions {
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
  }

  .cart-item-total {
    font-size: 1rem;
    min-width: auto;
    text-align: center;
    margin-left: 0;
    margin-top: 0.5rem;
  }

  .remove-item-btn {
    position: static;
    margin-left: 8px;
    transform: none;
  }

  .controls-row {
    justify-content: center;
  }

  .cart-summary-row .amount {
    font-size: 1.5rem;
  }

  .checkout-thumb {
    width: 72px;
    height: 72px;
  }
}

@media (max-width: 900px) {
  .checkout-thumb {
    width: 72px;
    height: 72px;
  }
}

/* ==========================================================================
   9. CHECKOUT PAGE STYLES
   ========================================================================== */

/* Checkout Page */
.sc-checkout-page,
.sc-checkout-page * {
  box-sizing: border-box;
}

.sc-checkout-page {
  font-family: inherit;
  background: var(--sc-bg-soft, #f9fafb);
  color: var(--sc-text-dark, #374151);
  line-height: 1.5;
  min-height: 100vh;
  padding: 2rem 1rem;
  margin: 0;
}

.sc-checkout-container {
  max-width: 1100px;
  margin: 0 auto;
}

.sc-checkout-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 2rem;
}

@media (min-width: 900px) {
  .sc-checkout-grid {
    grid-template-columns: 1.3fr 0.7fr;
    gap: 3rem;
  }
}

.sc-checkout-card {
  background: var(--sc-bg-white, #ffffff);
  border-radius: var(--sc-radius-lg, 16px);
  border: 1px solid var(--sc-border-color, #e5e7eb);
  padding: 1.5rem;
  margin-bottom: 1.5rem;
}

.sc-card-header {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-bottom: 1.25rem;
}

.sc-step-number {
  width: 40px;
  height: 40px;
  border-radius: 10px;
  background: var(--sc-primary, #111827);
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 600;
  font-size: 1rem;
  flex-shrink: 0;
}

.sc-overline {
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.15em;
  color: var(--sc-text-light, #9ca3af);
  margin-bottom: 0.25rem;
}

.sc-card-title {
  font-size: 1.25rem;
  font-weight: 600;
  color: var(--sc-text-dark, #111827);
  margin: 0;
}

/* Forms */
.sc-form-row {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1rem;
}

@media (min-width: 600px) {
  .sc-form-row {
    grid-template-columns: 1fr 1fr;
  }
}

.sc-input-group {
  display: flex;
  flex-direction: column;
  gap: 0.375rem;
}

.sc-label-text {
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--sc-text-dark);
}

.sc-form-input {
  width: 100%;
  padding: 0.75rem 1rem;
  background: var(--sc-bg-soft, #f9fafb);
  border: 1px solid var(--sc-border-color, #e5e7eb);
  border-radius: var(--sc-radius-md, 12px);
  color: var(--sc-text-dark, #111827);
  font-size: 1rem;
  font-family: inherit;
  transition: border-color 0.2s, background 0.2s;
}

.sc-form-input:focus {
  outline: none;
  background: var(--sc-bg-white, white);
  border-color: var(--sc-primary, #111827);
}

textarea.sc-form-input {
  resize: vertical;
  min-height: 80px;
}

select.sc-form-input {
  cursor: pointer;
}

/* Checkboxes */
.sc-checkbox-group {
  display: inline-flex;
  align-items: flex-start;
  gap: 0.5rem;
  font-size: 0.875rem;
  color: var(--sc-text-dark);
  cursor: pointer;
}

.sc-checkbox-group input[type="checkbox"] {
  width: 18px;
  height: 18px;
  margin-top: 2px;
  flex-shrink: 0;
  accent-color: var(--sc-primary, #111827);
}

.sc-checkbox-group a {
  color: var(--sc-primary, #111827);
  text-decoration: underline;
}

/* Radio Cards */
.sc-radio-stack {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.sc-radio-card {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  padding: 1rem;
  background: var(--sc-bg-soft, #f9fafb);
  border: 1px solid var(--sc-border-color, #e5e7eb);
  border-radius: var(--sc-radius-md, 12px);
  cursor: pointer;
  transition: border-color 0.2s;
}

.sc-radio-card:hover {
  border-color: var(--sc-text-light);
}

.sc-radio-card input[type="radio"] {
  width: 18px;
  height: 18px;
  margin-top: 2px;
  accent-color: var(--sc-primary, #111827);
}

.sc-radio-content {
  flex: 1;
}

.sc-radio-title {
  font-weight: 600;
  color: var(--sc-text-dark);
  margin-bottom: 0.125rem;
}

.sc-radio-desc {
  font-size: 0.8125rem;
  color: var(--sc-text-light);
}

/* Submit Button */
.sc-form-footer {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.sc-submit-btn {
  width: 100%;
  padding: 1rem 1.5rem;
  background: var(--sc-primary, #111827);
  color: white;
  border: none;
  border-radius: var(--sc-radius-md, 12px);
  font-size: 1rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  cursor: pointer;
  transition: background 0.2s, transform 0.1s;
}

.sc-submit-btn:hover {
  background: var(--sc-primary-hover, #1f2937);
}

.sc-submit-btn:active {
  transform: scale(0.98);
}

.sc-submit-btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

/* Order Summary */
.sc-order-summary {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

@media (min-width: 900px) {
  .sc-order-summary {
    position: sticky;
    top: 2rem;
  }
}

.sc-summary-card {
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
}

.sc-checkout-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.75rem 0;
}

.sc-checkout-left {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  flex: 1;
  min-width: 0;
}

.sc-checkout-thumb {
  width: 56px;
  height: 56px;
  object-fit: cover;
  border-radius: 8px;
  background: var(--sc-bg-soft, #f3f4f6);
  flex-shrink: 0;
}

.sc-checkout-meta {
  min-width: 0;
}

.sc-checkout-title {
  font-weight: 500;
  color: var(--sc-text-dark);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 180px;
}

.sc-checkout-qty {
  font-size: 0.8125rem;
  color: var(--sc-text-light);
}

.sc-checkout-price {
  font-weight: 600;
  color: var(--sc-text-dark);
  flex-shrink: 0;
}

.sc-divide-list>*+* {
  border-top: 1px solid var(--sc-border-color, #f3f4f6);
}

.sc-summary-details {
  margin-top: 1rem;
  font-size: 0.875rem;
  color: var(--sc-text-light);
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.sc-flex-between {
  display: flex;
  justify-content: space-between;
}

.sc-total-section {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-top: 1rem;
  margin-top: 1rem;
  border-top: 1px solid var(--sc-border-color, #e5e7eb);
}

.sc-total-amount {
  font-size: 1.75rem;
  font-weight: 600;
  color: var(--sc-text-dark);
}

.sc-back-link {
  display: inline-block;
  font-size: 0.875rem;
  color: var(--sc-text-light);
  text-decoration: none;
  transition: color 0.2s;
}

.sc-back-link:hover {
  color: var(--sc-text-dark);
}

.sc-checkout-empty {
  text-align: center;
  padding: 2rem;
  color: var(--sc-text-light);
}

/* Utility classes */
.sc-mt-6 {
  margin-top: 1.5rem;
}

.sc-mb-5 {
  margin-bottom: 1.25rem;
}

@media (max-width: 600px) {
  .sc-checkout-page {
    padding: 1rem 0.75rem;
  }

  .sc-checkout-card {
    padding: 1.25rem;
    border-radius: var(--sc-radius-md);
  }

  .sc-checkout-thumb {
    width: 48px;
    height: 48px;
  }

  .sc-total-amount {
    font-size: 1.5rem;
  }
}

/* ==========================================================================
   10. THANK YOU PAGE STYLES
   ========================================================================== */
.sc-thankyou-page {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--sc-bg-soft, #f9fafb);
  padding: 2rem;
  margin: 0;
}

.sc-thankyou-card {
  background: var(--sc-bg-white, #ffffff);
  border-radius: 20px;
  border: 1px solid var(--sc-border-color, #e5e7eb);
  padding: 3rem 2rem;
  text-align: center;
  max-width: 500px;
  width: 100%;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.08);
}

.sc-thankyou-icon {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  background: linear-gradient(135deg, #22c55e 0%, #16a34a 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 1.5rem;
  animation: sc-pop 0.5s ease-out;
}

@keyframes sc-pop {
  0% {
    transform: scale(0);
    opacity: 0;
  }

  50% {
    transform: scale(1.1);
  }

  100% {
    transform: scale(1);
    opacity: 1;
  }
}

.sc-thankyou-icon svg {
  width: 40px;
  height: 40px;
  color: white;
}

.sc-thankyou-title {
  font-size: 1.75rem;
  font-weight: 700;
  color: var(--sc-text-dark, #111827);
  margin: 0 0 0.75rem 0;
}

.sc-thankyou-text {
  color: var(--sc-text-light, #6b7280);
  font-size: 1rem;
  line-height: 1.6;
  margin: 0 0 1.5rem 0;
}

.sc-order-info {
  background: var(--sc-bg-soft, #f3f4f6);
  border-radius: 12px;
  padding: 1rem;
  margin-bottom: 1.5rem;
  text-align: left;
}

.sc-order-info-row {
  display: flex;
  justify-content: space-between;
  padding: 0.5rem 0;
  font-size: 0.9375rem;
}

.sc-order-info-row+.sc-order-info-row {
  border-top: 1px solid var(--sc-border-color, #e5e7eb);
}

.sc-order-info-label {
  color: var(--sc-text-light);
}

.sc-order-info-value {
  font-weight: 600;
  color: var(--sc-text-dark);
}

.sc-thankyou-btn {
  display: inline-block;
  padding: 0.875rem 2rem;
  background: var(--sc-primary, #111827);
  color: white;
  text-decoration: none;
  border-radius: 10px;
  font-weight: 600;
  font-size: 0.9375rem;
  transition: background 0.2s, transform 0.1s;
}

.sc-thankyou-btn:hover {
  background: var(--sc-primary-hover, #1f2937);
}

.sc-thankyou-btn:active {
  transform: scale(0.98);
}

.sc-thankyou-footer {
  margin-top: 2rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--sc-border-color, #e5e7eb);
  font-size: 0.8125rem;
  color: var(--sc-text-light, #9ca3af);
}

.sc-thankyou-footer a {
  color: var(--sc-primary, #111827);
  text-decoration: none;
}

.sc-thankyou-footer a:hover {
  text-decoration: underline;
}