/* Quick Add drawer — scoped .tc-quick-add */

.tc-quick-add[hidden] {
  display: none !important;
}

.tc-quick-add {
  position: fixed;
  inset: 0;
  z-index: 10050;
}

.tc-quick-add__overlay {
  position: absolute;
  inset: 0;
  background: rgba(17, 17, 17, 0.42);
}

.tc-quick-add__drawer {
  position: absolute;
  top: 0;
  right: 0;
  display: flex;
  flex-direction: column;
  width: min(460px, 100%);
  height: 100%;
  background: #fff;
  color: var(--ink, #111);
  box-shadow: -8px 0 28px rgba(0, 0, 0, 0.12);
  transform: translateX(100%);
  transition: transform 0.22s ease;
}

.tc-quick-add.is-open .tc-quick-add__drawer {
  transform: translateX(0);
}

.tc-quick-add__header {
  position: relative;
  flex: 0 0 auto;
  padding: 12px 20px 16px;
  border-bottom: 1px solid var(--line, #e8e8e8);
  background: #fff;
}

.tc-quick-add__close {
  position: absolute;
  top: 12px;
  right: 12px;
  z-index: 5;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border: 1px solid var(--line, #e8e8e8);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.96);
  color: var(--ink, #111);
  cursor: pointer;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.06);
}

.tc-quick-add__close:hover {
  border-color: var(--red, #0b8796);
  color: var(--red, #0b8796);
}

.tc-quick-add__product {
  display: flex;
  flex-direction: column;
  gap: 14px;
  width: 100%;
}

.tc-quick-add__thumb {
  width: 100%;
  aspect-ratio: 1 / 1;
  max-height: min(420px, 46vh);
  box-sizing: border-box;
  padding: 20px;
  border-radius: 10px;
  overflow: hidden;
  background: var(--soft, #f8f7f5);
  display: flex;
  align-items: center;
  justify-content: center;
}

.tc-quick-add__thumb img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  object-position: center;
  display: block;
}

.tc-quick-add__meta {
  width: 100%;
  padding-right: 8px;
}

.tc-quick-add__title {
  margin: 0 0 6px;
  font-size: clamp(1.05rem, 2.2vw, 1.25rem);
  font-weight: 700;
  line-height: 1.3;
  color: var(--ink, #111);
}

.tc-quick-add__sku {
  margin: 0 0 8px;
  font-size: 12px;
  font-weight: 600;
  color: var(--muted, #666);
}

.tc-quick-add__price,
.tc-quick-add__footer-price {
  font-size: clamp(1.125rem, 2vw, 1.35rem);
  font-weight: 800;
  line-height: 1.2;
  color: var(--ink, #111);
}

.tc-quick-add__price .amount,
.tc-quick-add__footer-price .amount {
  color: var(--red, #0b8796);
}

.tc-quick-add__price-prefix {
  display: inline-block;
  margin-right: 4px;
  font-size: 12px;
  font-weight: 700;
  color: var(--muted, #666);
  text-transform: uppercase;
}

.tc-quick-add__body {
  flex: 1 1 auto;
  overflow: auto;
  padding: 18px 20px 24px;
  -webkit-overflow-scrolling: touch;
}

.tc-quick-add__loading[hidden],
.tc-quick-add__alert[hidden],
.tc-quick-add__sku[hidden] {
  display: none !important;
}

.tc-quick-add__skeleton {
  height: 56px;
  margin-bottom: 12px;
  border-radius: 8px;
  background: linear-gradient(90deg, #f0f0f0 25%, #f7f7f7 37%, #f0f0f0 63%);
  background-size: 400% 100%;
  animation: tcQaShimmer 1.1s ease infinite;
}

.tc-quick-add__skeleton--sm {
  height: 36px;
  width: 70%;
}

@keyframes tcQaShimmer {
  0% { background-position: 100% 0; }
  100% { background-position: 0 0; }
}

.tc-quick-add__section {
  margin-bottom: 22px;
}

.tc-quick-add__label {
  display: block;
  margin: 0 0 10px;
  font-size: 13px;
  font-weight: 800;
  color: var(--ink, #111);
}

.tc-quick-add__swatches {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.tc-quick-add__swatch {
  width: 36px;
  height: 36px;
  border: 1.5px solid var(--line, #e8e8e8);
  border-radius: 999px;
  background: #fff;
  background-size: cover;
  background-position: center;
  cursor: pointer;
  padding: 0;
}

.tc-quick-add__swatch.is-color-fallback {
  background-color: var(--tc-swatch, #ccc);
}

.tc-quick-add__swatch.is-light {
  box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.12);
}

.tc-quick-add__swatch.is-active {
  border-color: var(--red, #0b8796);
  box-shadow: 0 0 0 2px rgba(11, 135, 150, 0.2);
}

.tc-quick-add__swatch:disabled,
.tc-quick-add__size:disabled,
.tc-quick-add__pill:disabled {
  opacity: 0.35;
  cursor: not-allowed;
}

.tc-quick-add__sizes,
.tc-quick-add__pills {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.tc-quick-add__size,
.tc-quick-add__pill {
  min-width: 44px;
  min-height: 40px;
  padding: 8px 12px;
  border: 1.5px solid var(--line, #e8e8e8);
  border-radius: 8px;
  background: #fff;
  color: var(--ink, #111);
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
}

.tc-quick-add__size.is-active,
.tc-quick-add__pill.is-active {
  border-color: var(--red, #0b8796);
  color: var(--red, #0b8796);
  background: rgba(11, 135, 150, 0.04);
}

.tc-quick-add__qty {
  display: inline-flex;
  align-items: center;
  gap: 0;
  border: 1.5px solid var(--line, #e8e8e8);
  border-radius: 999px;
  overflow: hidden;
}

.tc-quick-add__qty-btn {
  width: 40px;
  height: 40px;
  border: 0;
  background: #fff;
  color: var(--ink, #111);
  font-size: 18px;
  font-weight: 700;
  cursor: pointer;
}

.tc-quick-add__qty-btn:hover {
  background: var(--soft, #f8f7f5);
}

.tc-quick-add__qty-val {
  min-width: 36px;
  text-align: center;
  font-size: 14px;
  font-weight: 800;
}

.tc-quick-add__link {
  display: inline-block;
  margin-top: 10px;
  padding: 0;
  border: 0;
  background: none;
  color: var(--red, #0b8796);
  font-size: 13px;
  font-weight: 700;
  text-decoration: underline;
  cursor: pointer;
}

.tc-quick-add__bulk-table {
  width: 100%;
  border-collapse: collapse;
}

.tc-quick-add__bulk-table th,
.tc-quick-add__bulk-table td {
  padding: 8px 0;
  border-bottom: 1px solid var(--line, #e8e8e8);
  text-align: left;
  font-size: 13px;
}

.tc-quick-add__bulk-table th {
  font-weight: 800;
  color: var(--muted, #666);
}

.tc-quick-add__bulk-total {
  margin-top: 14px;
  font-size: 14px;
  font-weight: 800;
}

.tc-quick-add__alert {
  margin-top: 14px;
  padding: 10px 12px;
  border-radius: 8px;
  font-size: 13px;
  font-weight: 600;
  line-height: 1.4;
}

.tc-quick-add__alert.is-ok {
  background: #f0fdf4;
  color: #166534;
  border: 1px solid #bbf7d0;
}

.tc-quick-add__alert.is-err {
  background: #fef2f2;
  color: #075b66;
  border: 1px solid #fecaca;
}

.tc-quick-add__footer {
  flex: 0 0 auto;
  display: grid;
  gap: 10px;
  padding: 14px 20px calc(14px + env(safe-area-inset-bottom, 0px));
  border-top: 1px solid var(--line, #e8e8e8);
  background: #fff;
}

.tc-quick-add__footer-main[hidden],
.tc-quick-add__success[hidden] {
  display: none !important;
}

.tc-quick-add__success-title {
  margin: 0 0 4px;
  font-size: 1.05rem;
  font-weight: 800;
  color: #166534;
}

.tc-quick-add__success-text {
  margin: 0 0 14px;
  font-size: 13px;
  color: var(--muted, #666);
}

.tc-quick-add__success-actions {
  display: grid;
  gap: 8px;
}

.tc-quick-add__btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  min-height: 46px;
  padding: 12px 16px;
  border-radius: 999px;
  font-family: inherit;
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  cursor: pointer;
}

.tc-quick-add__btn--primary {
  border: 0;
  background: var(--red, #0b8796);
  color: #fff;
}

.tc-quick-add__btn--primary:hover {
  background: var(--red-dk, #075b66);
}

.tc-quick-add__btn--ghost {
  border: 1.5px solid var(--line, #e8e8e8);
  background: #fff;
  color: var(--ink, #111);
}

.tc-quick-add__btn--ghost:hover {
  border-color: var(--red, #0b8796);
  color: var(--red, #0b8796);
}

.tc-quick-add__cta {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  min-height: 48px;
  padding: 12px 18px;
  border: 0;
  border-radius: 999px;
  background: var(--red, #0b8796);
  color: #fff;
  font-family: inherit;
  font-size: 14px;
  font-weight: 800;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  cursor: pointer;
}

.tc-quick-add__cta:hover:not(:disabled) {
  background: var(--red-dk, #075b66);
}

.tc-quick-add__cta:disabled {
  opacity: 0.55;
  cursor: not-allowed;
}

.tc-quick-add__cta.is-success {
  background: #166534;
}

body.tc-quick-add-lock {
  overflow: hidden;
}

/* Card CTA state */
.tc-card-cta--quick {
  cursor: pointer;
}

.tc-card-cta.is-added .tc-card-cta__label {
  letter-spacing: 0.02em;
}

@media (max-width: 768px) {
  .tc-quick-add__drawer {
    top: auto;
    left: 0;
    right: 0;
    bottom: 0;
    width: 100%;
    height: min(92vh, 100%);
    border-radius: 16px 16px 0 0;
    transform: translateY(100%);
    box-shadow: 0 -8px 28px rgba(0, 0, 0, 0.14);
  }

  .tc-quick-add.is-open .tc-quick-add__drawer {
    transform: translateY(0);
  }

  .tc-quick-add__header {
    position: relative;
    z-index: 2;
    padding: 10px 16px 14px;
  }

  .tc-quick-add__thumb {
    max-height: min(340px, 38vh);
    padding: 16px;
  }

  .tc-quick-add__title {
    font-size: 1.1rem;
  }

  .tc-quick-add__price {
    font-size: 1.2rem;
  }

  .tc-quick-add__footer {
    position: sticky;
    bottom: 0;
    z-index: 2;
  }
}
