.tnwc-modal[hidden] {
  display: none !important;
}
.tnwc-modal {
  --tnwc-ink: #352d26;
  --tnwc-accent: var(--tnwc-primary, #805634);
  --tnwc-line: #e9e1d8;
  position: fixed;
  inset: 0;
  z-index: 999999;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  color: var(--tnwc-ink);
}
.tnwc-modal * {
  box-sizing: border-box;
}
.tnwc-modal-overlay {
  position: absolute;
  inset: 0;
  background: rgba(30, 24, 19, 0.66);
  backdrop-filter: blur(4px);
}
.tnwc-modal-content {
  position: relative;
  width: min(940px, 100%);
  max-height: 90vh;
  max-height: 90dvh;
  overflow: auto;
  overscroll-behavior: contain;
  background: #fffdfb;
  border-radius: 22px;
  box-shadow: 0 24px 90px #0005;
  padding: 30px;
}
.tnwc-header {
  display: flex;
  justify-content: space-between;
  gap: 20px;
  padding-bottom: 20px;
}
.tnwc-eyebrow {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 1.6px;
  color: var(--tnwc-accent);
}
.tnwc-modal .tnwc-header h2 {
  font-size: 27px;
  line-height: 1.25;
  color: var(--tnwc-ink);
  margin: 7px 0 8px;
  text-transform: uppercase;
}
.tnwc-header p {
  font-size: 13px;
  color: #81756a;
  margin: 0;
}
.tnwc-modal button.tnwc-modal-close {
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  min-height: 0;
  line-height: 1;
  border: 1px solid var(--tnwc-line);
  border-radius: 50%;
  background: #fff;
  color: #665648;
  font-size: 25px;
  padding: 0;
  margin: 0;
  cursor: pointer;
  box-shadow: none;
}
.tnwc-product {
  display: flex;
  align-items: center;
  gap: 18px;
  padding: 18px;
  background: #f5efe7;
  border: 1px solid #ece0d2;
  border-radius: 14px;
  margin-bottom: 26px;
}
.tnwc-product-image {
  width: 86px;
  height: 100px;
  object-fit: cover;
  flex-shrink: 0;
  border-radius: 8px;
  background: #fff;
}
.tnwc-modal h3.tnwc-product-name {
  font-size: 17px;
  line-height: 1.4;
  color: var(--tnwc-ink);
  margin: 5px 0 8px;
}
.tnwc-product-price {
  font-size: 19px;
  font-weight: 700;
  color: var(--tnwc-accent);
}
.tnwc-product-price del {
  font-size: 13px;
  font-weight: 400;
  color: #948476;
  margin-right: 8px;
}
.tnwc-product-price ins {
  background: none;
  text-decoration: none;
}
.tnwc-product-sku {
  display: block;
  font-size: 11px;
  color: #81756a;
  margin-top: 5px;
}
.tnwc-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr);
  gap: 28px;
}
.tnwc-modal h3.tnwc-section-title {
  display: flex;
  align-items: center;
  gap: 9px;
  font-size: 15px;
  margin: 0 0 17px;
  color: var(--tnwc-ink);
}
.tnwc-section-title > span {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  width: 23px;
  height: 23px;
  border-radius: 50%;
  background: #eadbca;
  color: #795438;
}
.tnwc-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}
.tnwc-wide {
  grid-column: 1/-1;
}
.tnwc-field label {
  display: block;
  font-size: 12px;
  color: #594b3e;
  font-weight: 600;
  margin: 0 0 6px;
}
.tnwc-field label b {
  color: #b8794c;
}
.tnwc-field label small {
  font-weight: 400;
  color: #948476;
}
.tnwc-modal .tnwc-field input,
.tnwc-modal .tnwc-field select,
.tnwc-modal .tnwc-field textarea {
  width: 100%;
  max-width: 100%;
  height: 43px;
  padding: 10px 12px;
  margin: 0;
  border: 1px solid #ded5cb;
  border-radius: 8px;
  background: #fff;
  color: var(--tnwc-ink);
  font-size: 13px;
  box-shadow: none;
  line-height: 1.4;
}
.tnwc-modal .tnwc-field textarea {
  height: 76px;
  min-height: 76px;
  resize: vertical;
}
.tnwc-modal input:focus,
.tnwc-modal select:focus,
.tnwc-modal textarea:focus {
  outline: 2px solid #cba983;
  outline-offset: 1px;
  border-color: #b08c69;
}
.tnwc-summary {
  border: 0;
  border-radius: 0;
  border-left: 1px solid var(--tnwc-line);
  padding-left: 28px;
}
.tnwc-shipping-options,
.tnwc-payment-options {
  margin-bottom: 23px;
}
.tnwc-option {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 12px;
  border: 1px solid var(--tnwc-line);
  border-radius: 9px;
  margin: 0 0 8px;
  cursor: pointer;
  background: #fff;
  font-weight: 400;
  font-size: 13px;
}
.tnwc-option:has(input:checked) {
  border-color: #b28c64;
  background: #faf3ea;
}
.tnwc-modal .tnwc-option input {
  flex-shrink: 0;
  width: 16px;
  height: 16px;
  min-height: 0;
  margin: 2px 0 0;
  accent-color: var(--tnwc-accent);
}
.tnwc-option-body {
  flex: 1;
  min-width: 0;
}
.tnwc-option-title {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  font-weight: 600;
  color: #554333;
}
.tnwc-option-title strong {
  font-size: 12px;
  white-space: nowrap;
}
.tnwc-payment-description {
  font-size: 12px;
  color: #857565;
  margin-top: 6px;
  line-height: 1.5;
  display: none;
}
.tnwc-option:has(input:checked) .tnwc-payment-description {
  display: block;
}
.tnwc-payment-description p {
  margin: 0 0 5px;
}
.tnwc-totals {
  border-top: 1px dashed #d8cbbb;
  padding-top: 15px;
  font-size: 12px;
  color: #7a6a5b;
}
.tnwc-totals > div:not(.tnwc-fees),
.tnwc-fees > div {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 10px;
}
.tnwc-totals strong {
  color: #493a2d;
  white-space: nowrap;
}
.tnwc-totals .tnwc-grand-total {
  border-top: 1px solid var(--tnwc-line);
  padding-top: 14px;
  margin-top: 14px;
  font-size: 15px;
  font-weight: 700;
  color: #493a2d;
  align-items: center;
}
.tnwc-grand-total strong {
  font-size: 23px;
  color: var(--tnwc-accent);
}
.tnwc-quote-status {
  font-size: 11px;
  color: #857565;
  margin: 10px 0 15px;
}
.tnwc-modal button.tnwc-submit-order {
  display: flex;
  justify-content: space-between;
  align-items: center;
  width: 100%;
  margin: 8px 0 0;
  padding: 13px 18px;
  min-height: 48px;
  line-height: 1.4;
  border: 0;
  border-radius: 9px;
  background: var(--tnwc-accent);
  color: #fff;
  font-size: 14px;
  font-weight: 700;
  text-transform: none;
  letter-spacing: 0;
  cursor: pointer;
  box-shadow: 0 5px 12px #8b613e22;
}
.tnwc-submit-order:hover {
  background: var(--tnwc-primary-hover, #614026) !important;
}
.tnwc-submit-order:disabled {
  opacity: 0.5;
  cursor: wait;
}
.tnwc-hint {
  font-size: 12px;
  color: #8d7d6f;
  line-height: 1.5;
  margin: 6px 0;
}
.tnwc-payment-note {
  text-align: center;
  font-size: 11px;
  margin-top: 12px;
}
.tnwc-message {
  font-size: 13px;
  color: #ad3f2b;
  line-height: 1.5;
  margin: 10px 0;
}
.tnwc-message:empty {
  display: none;
}
.tnwc-terms {
  display: flex;
  gap: 8px;
  font-size: 12px;
  font-weight: 400;
}
.tnwc-terms input {
  margin: 3px 0 0;
  accent-color: var(--tnwc-accent);
}
body.tnwc-modal-open {
  overflow: hidden;
}
.tnwc-summary[aria-busy="true"] .tnwc-totals {
  opacity: 0.5;
}
.tnwc-modal :focus-visible {
  outline: 2px solid #b28c64;
  outline-offset: 3px;
}
@media (max-width: 700px) {
  .tnwc-modal {
    padding: 10px;
  }
  .tnwc-modal-content {
    padding: 20px 16px;
    border-radius: 16px;
    max-height: 94dvh;
  }
  .tnwc-modal .tnwc-header h2 {
    font-size: 22px;
  }
  .tnwc-layout {
    grid-template-columns: 1fr;
    gap: 24px;
  }
  .tnwc-summary {
    padding: 22px 0 0;
    border-left: 0;
    border-top: 1px solid var(--tnwc-line);
  }
  .tnwc-product {
    gap: 12px;
    padding: 12px;
    margin-bottom: 22px;
  }
  .tnwc-product-image {
    width: 70px;
    height: 85px;
  }
  .tnwc-modal h3.tnwc-product-name {
    font-size: 15px;
  }
  .tnwc-grid {
    gap: 12px;
  }
  .tnwc-grand-total strong {
    font-size: 22px;
  }
}
@media (max-width: 360px) {
  .tnwc-grid {
    grid-template-columns: 1fr;
  }
  .tnwc-wide {
    grid-column: auto;
  }
}
