/* ==========================================================================
   TPR Parts Browser
   ========================================================================== */

/* --------------------------------------------------------------------------
   Loading
   -------------------------------------------------------------------------- */
.tpr-loading {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 60px 20px;
  color: #666;
  font-size: 14px;
}

.tpr-spinner {
  width: 40px;
  height: 40px;
  border: 3px solid #e0e0e0;
  border-top-color: #d00;
  border-radius: 50%;
  animation: tpr-spin 0.7s linear infinite;
  margin-bottom: 12px;
}

@keyframes tpr-spin {
  to { transform: rotate(360deg); }
}

.tpr-error {
  color: #c00;
  font-size: 15px;
}

/* --------------------------------------------------------------------------
   Toolbar
   -------------------------------------------------------------------------- */
#tpr-parts-browser {
  max-width: 1568px;
  margin: 0 auto;
}

.tpr-browser-shell {
  width: 100%;
}

.tpr-toolbar {
  display: grid;
  grid-template-columns: minmax(260px, 1fr) auto auto auto;
  gap: 14px;
  margin-bottom: 24px;
  align-items: center;
}

.tpr-search-wrap {
  position: relative;
  width: 100%;
  min-width: 0;
  height: 42px;
}

.tpr-search-wrap svg {
  position: absolute;
  left: 14px;
  top: 50%;
  transform: translateY(-50%);
  width: 20px;
  height: 20px;
  pointer-events: none;
  color: #888;
}

#tpr-search {
  width: 100%;
  height: 42px;
  padding: 0 16px 0 44px;
  border: 1px solid #bdbdbd;
  border-radius: 22px;
  font-size: 15px;
  background: #fff;
  box-sizing: border-box;
  vertical-align: top;
}

#tpr-search:focus {
  outline: none;
  border-color: #111;
  box-shadow: 0 0 0 2px rgba(0,0,0,0.08);
}

#tpr-category {
  min-height: 42px;
  padding: 8px 12px;
  border: 0;
  border-radius: 0;
  font-size: 14px;
  background: transparent;
  cursor: pointer;
}

#tpr-sort {
  border: 0;
  background: transparent;
  font-size: 14px;
  color: #333;
  cursor: pointer;
  padding: 2px 0;
  margin: 0;
  line-height: 1.5;
  appearance: none;
  -webkit-appearance: none;
}

#tpr-sort:focus,
#tpr-sort:focus-visible {
  outline: none;
  box-shadow: none;
}

.tpr-results-meta {
  font-size: 16px;
  color: #333;
  white-space: nowrap;
}

.tpr-sort-label {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 42px;
  padding: 0 16px;
  border: 1px solid #bdbdbd;
  border-radius: 22px;
  font-size: 14px;
  color: #555;
  white-space: nowrap;
  cursor: pointer;
  overflow: visible;
  line-height: 1.5;
}

.tpr-view-toggle {
  display: inline-flex;
  gap: 8px;
}

.tpr-view-btn {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  background: #f3f3f3;
  position: relative;
}

.tpr-view-btn.active {
  background: #333;
}

.tpr-view-btn::before {
  content: "";
  position: absolute;
  inset: 13px;
  background:
    radial-gradient(circle, currentColor 0 2px, transparent 3px) 0 0 / 8px 8px;
  color: #999;
}

.tpr-view-btn.active::before {
  color: #fff;
}

.tpr-browser-layout {
  display: grid;
  grid-template-columns: 368px minmax(0, 1fr);
  gap: 24px;
  align-items: start;
}

.tpr-filter-sidebar {
  position: sticky;
  top: 24px;
  max-height: calc(100vh - 48px);
  overflow-y: auto;
  scrollbar-width: thin;
}

.tpr-filter-summary {
  padding: 0 18px 18px;
  border-bottom: 1px solid #ddd;
}

.tpr-filter-summary h3 {
  margin: 0 0 12px;
  color: #222;
  font-size: 17px;
  line-height: 1.3;
}

.tpr-clear-filters {
  min-height: 38px;
  padding: 0 18px;
  border: 0;
  border-radius: 20px;
  background: #333;
  color: #fff;
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
}

.tpr-clear-filters:disabled {
  opacity: 0.45;
  cursor: default;
}

.tpr-selected-filter-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  padding: 0 14px;
  margin-top: 10px;
}

.tpr-selected-filter-chip {
  display: inline-flex;
  align-items: center;
  min-height: 32px;
  padding: 0 14px;
  border: 2px solid #333;
  border-radius: 18px;
  color: #222;
  font-size: 14px;
  font-weight: 700;
}

.tpr-filter-group {
  padding: 0 12px;
  border-bottom: 1px solid #ddd;
}

.tpr-filter-group.open {
  padding-bottom: 12px;
}

.tpr-filter-group:not(.open) {
  padding-bottom: 0;
}

.tpr-filter-heading {
  display: flex;
  justify-content: space-between;
  align-items: center;
  width: 100%;
  min-height: 56px;
  margin: 0;
  padding: 0;
  border: 0;
  background: transparent;
  color: #222;
  font-size: 15px;
  font-weight: 800;
  text-align: left;
}

.tpr-filter-heading::after {
  content: "";
  width: 9px;
  height: 9px;
  border-right: 2px solid #111;
  border-bottom: 2px solid #111;
  transform: rotate(45deg);
}

.tpr-filter-group.open .tpr-filter-heading::after {
  transform: rotate(225deg);
}

.tpr-filter-group:not(.open) .tpr-filter-content {
  display: none;
}

.tpr-category-options {
  display: flex;
  flex-direction: column;
  gap: 14px;
  margin: 0 0 4px;
}

.tpr-category-group {
  display: flex;
  flex-direction: column;
  gap: 0;
}

.tpr-category-group-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
  width: 100%;
  min-height: 34px;
  padding: 0;
  border: 0;
  background: transparent;
  color: #111;
  font-size: 15px;
  font-weight: 800;
  text-align: left;
  cursor: pointer;
}

.tpr-category-group-title small {
  margin-left: auto;
  color: #666;
  font-size: 12px;
  font-weight: 500;
}

.tpr-category-group-title::after {
  content: "";
  width: 8px;
  height: 8px;
  border-right: 2px solid #111;
  border-bottom: 2px solid #111;
  transform: rotate(45deg);
  margin-left: 8px;
}

.tpr-category-group:not(.collapsed) .tpr-category-group-title::after {
  transform: rotate(225deg);
}

.tpr-category-group.collapsed .tpr-category-group-items {
  display: none;
}

.tpr-category-filter {
  display: grid;
  grid-template-columns: 24px minmax(0, 1fr) auto 18px;
  gap: 8px;
  align-items: center;
  min-height: 36px;
  margin: 0 0 0 18px;
  color: #333;
  font-size: 14px;
  cursor: pointer;
}

.tpr-category-filter input {
  width: 18px;
  height: 18px;
  margin: 0;
  accent-color: #2164d9;
  cursor: pointer;
}

.tpr-category-filter span {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.tpr-category-filter small {
  color: #666;
  font-size: 12px;
}

.tpr-category-filter i {
  width: 8px;
  height: 8px;
  border-right: 2px solid #1b64d8;
  border-bottom: 2px solid #1b64d8;
  transform: rotate(-45deg);
}

.tpr-category-filter:has(input:checked) {
  color: #111;
  font-weight: 800;
}

.tpr-filter-static {
  margin: -8px 0 16px;
  color: #666;
  font-size: 14px;
}

.tpr-checkbox-filter {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 34px;
  margin: -2px 0 10px;
  color: #333;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
}

.tpr-checkbox-filter:last-child {
  margin-bottom: 16px;
}

.tpr-checkbox-filter input {
  width: 18px;
  height: 18px;
  margin: 0;
  accent-color: #333;
  cursor: pointer;
}

.tpr-filter-group #tpr-category,
.tpr-filter-group #tpr-color-filter {
  width: 100%;
  margin: -4px 0 16px;
  border: 1px solid #bdbdbd;
  border-radius: 4px;
  background: #fff;
}

/* --------------------------------------------------------------------------
   Grid
   -------------------------------------------------------------------------- */
.tpr-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0;
  border-top: 1px solid #ddd;
  border-left: 1px solid #ddd;
}

@media (min-width: 600px) {
  .tpr-grid { grid-template-columns: repeat(3, 1fr); }
}

@media (min-width: 900px) {
  .tpr-grid { grid-template-columns: repeat(3, 1fr); }
}

@media (min-width: 1200px) {
  .tpr-grid { grid-template-columns: repeat(4, 1fr); }
}

.tpr-no-results {
  grid-column: 1 / -1;
  text-align: center;
  color: #888;
  padding: 40px 0;
}

/* --------------------------------------------------------------------------
   Card
   -------------------------------------------------------------------------- */
.tpr-card {
  background: #fff;
  border: 0;
  border-right: 1px solid #ddd;
  border-bottom: 1px solid #ddd;
  border-radius: 0;
  overflow: visible;
  cursor: pointer;
  transition: background 0.15s;
  display: flex;
  flex-direction: column;
  min-height: 300px;
}

.tpr-card:hover,
.tpr-card:focus {
  background: #fafafa;
  box-shadow: inset 0 0 0 2px #222;
  transform: none;
  outline: none;
}

.tpr-card:focus-visible {
  box-shadow: 0 0 0 3px rgba(204,0,0,0.35);
}

.tpr-card-img {
  aspect-ratio: 1.2 / 1;
  background: transparent;
  overflow: visible;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px 22px 10px;
}

.tpr-card-img img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
}

.tpr-no-img {
  width: 100%;
  height: 100%;
  background: #ececec;
}

.tpr-card-body {
  padding: 8px 12px 14px;
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.tpr-card-num {
  order: 3;
  font-size: 12px;
  color: #777;
  margin: 0;
  font-weight: 500;
  text-transform: none;
  letter-spacing: 0;
}

.tpr-card-name {
  order: 1;
  font-size: 13px;
  font-weight: 700;
  margin: 0;
  line-height: 1.35;
  color: #222;
  text-transform: uppercase;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.tpr-card-price {
  order: 4;
  font-size: 14px;
  color: #333;
  margin: 4px 0 0;
  font-weight: 800;
}

.tpr-card-stock {
  display: none;
}

.tpr-card-swatches {
  order: 2;
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  margin-top: 10px;
  margin-bottom: 4px;
}

.tpr-swatch {
  display: inline-block;
  width: 18px;
  height: 18px;
  border-radius: 2px;
  border: 1px solid rgba(0,0,0,0.25);
  flex-shrink: 0;
}

.tpr-card-stock {
  font-size: 12px;
  color: #666;
  margin: 0;
}

.tpr-oos {
  color: #c00;
}

.tpr-swatch-more {
  font-size: 11px;
  color: #888;
  line-height: 18px;
  align-self: center;
}

/* --------------------------------------------------------------------------
   Pagination
   -------------------------------------------------------------------------- */
.tpr-pagination {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 14px;
  margin-top: 28px;
  padding-top: 16px;
  border-top: 1px solid #eee;
}

.tpr-page-btn {
  padding: 7px 18px;
  border: 1px solid #ccc;
  background: #fff;
  border-radius: 4px;
  font-size: 14px;
  cursor: pointer;
  transition: background 0.12s, border-color 0.12s;
}

.tpr-page-btn:hover:not(:disabled) {
  background: #d00;
  border-color: #d00;
  color: #fff;
}

.tpr-page-btn:disabled {
  opacity: 0.35;
  cursor: default;
}

.tpr-page-info {
  font-size: 14px;
  color: #555;
}

@media (max-width: 980px) {
  .tpr-toolbar {
    grid-template-columns: 1fr;
  }

  .tpr-results-meta,
  .tpr-view-toggle,
  .tpr-sort-label {
    justify-self: start;
  }

  .tpr-browser-layout {
    grid-template-columns: 1fr;
  }

  .tpr-filter-sidebar {
    position: static;
  }
}

@media (max-width: 560px) {
  .tpr-grid {
    grid-template-columns: 1fr;
  }

  .tpr-card {
    min-height: 260px;
  }
}

/* --------------------------------------------------------------------------
   Modal overlay
   -------------------------------------------------------------------------- */
.tpr-modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.6);
  z-index: 99999;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  overflow-y: auto;
}

body.tpr-modal-open {
  overflow: hidden;
}

.tpr-modal {
  background: #fff;
  border-radius: 8px;
  max-width: 860px;
  width: 100%;
  position: relative;
  max-height: calc(100vh - 32px);
  overflow-y: auto;
  box-shadow: 0 20px 60px rgba(0,0,0,0.3);
  outline: none;
}

.tpr-modal:focus {
  outline: none;
}

.tpr-modal-close {
  position: absolute;
  top: 12px;
  right: 12px;
  cursor: pointer;
  color: #555;
  z-index: 10;
  width: 32px;
  height: 32px;
  padding: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: #ebebeb;
  font-size: 18px;
  line-height: 1;
  transition: background 0.15s;
  box-sizing: border-box;
  user-select: none;
}

.tpr-modal-close:hover {
  background: #d5d5d5;
  color: #111;
}

/* --------------------------------------------------------------------------
   Modal body
   -------------------------------------------------------------------------- */
.tpr-modal-body {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0;
}

@media (min-width: 640px) {
  .tpr-modal-body {
    grid-template-columns: 3fr 2fr;
  }
}

.tpr-modal-image {
  background: #f5f5f5;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  border-radius: 8px 0 0 8px;
  min-height: 220px;
  overflow: hidden;
}

@media (max-width: 639px) {
  .tpr-modal-image {
    border-radius: 8px 8px 0 0;
    min-height: 200px;
    max-height: 280px;
  }
}

.tpr-modal-image img,
.tpr-modal-img {
  width: 100%;
  height: 100%;
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
  display: block;
}

.tpr-modal-info {
  padding: 24px 24px 28px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.tpr-modal-part-number {
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: #999;
  margin: 0;
}

.tpr-modal-title {
  font-size: 20px;
  font-weight: 700;
  margin: 0;
  line-height: 1.25;
  color: #111;
}

/* --------------------------------------------------------------------------
   Color selector
   -------------------------------------------------------------------------- */
.tpr-color-selector {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.tpr-color-label {
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: #555;
}

.tpr-color-name-input {
  width: 100%;
  padding: 9px 12px;
  border: 1px solid #ccc;
  border-radius: 4px;
  font-size: 14px;
  background: #fafafa;
  cursor: default;
  color: #222;
  box-sizing: border-box;
}

.tpr-color-name-input:focus {
  outline: none;
}

.tpr-color-swatches {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.tpr-color-dot {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  border: 2px solid rgba(0,0,0,0.12);
  cursor: pointer;
  padding: 0;
  transition: transform 0.1s, border-color 0.1s;
  flex-shrink: 0;
}

.tpr-color-dot:hover {
  transform: scale(1.1);
  border-color: rgba(0,0,0,0.4);
}

.tpr-color-dot.active {
  border: 3px solid #111;
  box-shadow: 0 0 0 2px #fff inset;
}

/* --------------------------------------------------------------------------
   Price / stock in modal
   -------------------------------------------------------------------------- */
.tpr-modal-stock {
  font-size: 14px;
}

.tpr-in-stock  { color: #2a7d2a; }
.tpr-out-of-stock { color: #c00; }

/* --------------------------------------------------------------------------
   Qty stepper
   -------------------------------------------------------------------------- */
.tpr-qty-price-row {
  display: flex;
  align-items: center;
  gap: 14px;
}

.tpr-qty-row {
  display: inline-flex;
  align-items: stretch;
  height: 44px;
  border: 1px solid #ccc;
  border-radius: 4px;
  overflow: hidden;
  flex-shrink: 0;
}

.tpr-qty-btn {
  width: 44px;
  flex-shrink: 0;
  border: none;
  background: #fff;
  font-size: 20px;
  line-height: 1;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.12s;
}

.tpr-qty-btn:first-child {
  border-right: 1px solid #ccc;
}

.tpr-qty-btn:last-child {
  border-left: 1px solid #ccc;
}

.tpr-qty-btn:hover {
  background: #f0f0f0;
}

#tpr-qty {
  width: 48px;
  border: none;
  text-align: center;
  font-size: 16px;
  -moz-appearance: textfield;
  background: #fff;
}

.tpr-qty-price-label {
  font-size: 14px;
  color: #444;
  white-space: nowrap;
}

#tpr-qty::-webkit-inner-spin-button,
#tpr-qty::-webkit-outer-spin-button {
  -webkit-appearance: none;
}

/* --------------------------------------------------------------------------
   Add to cart button
   -------------------------------------------------------------------------- */
.tpr-add-to-cart-btn {
  display: block;
  width: 100%;
  padding: 12px 20px;
  background: #d00;
  color: #fff;
  border: none;
  border-radius: 4px;
  font-size: 15px;
  font-weight: 700;
  cursor: pointer;
  transition: background 0.15s;
  letter-spacing: 0.02em;
}

.tpr-add-to-cart-btn:hover:not(:disabled) {
  background: #b00;
}

.tpr-add-to-cart-btn:disabled {
  background: #bbb;
  cursor: not-allowed;
}

.tpr-cart-message {
  font-size: 13px;
  min-height: 18px;
}

.tpr-cart-success { color: #2a7d2a; }
.tpr-cart-error   { color: #c00; }

/* --------------------------------------------------------------------------
   View product link
   -------------------------------------------------------------------------- */
.tpr-view-product {
  font-size: 13px;
  color: #555;
  text-decoration: underline;
  margin-top: 2px;
  display: block;
  text-align: center;
}

.tpr-view-product:hover {
  color: #d00;
}

/* --------------------------------------------------------------------------
   LEGO-style detail modal
   -------------------------------------------------------------------------- */
.tpr-modal-overlay {
  background: rgba(0,0,0,0.58);
  padding: 20px;
}

.tpr-modal {
  width: min(1022px, calc(100vw - 40px));
  max-width: none;
  max-height: calc(100vh - 40px);
  border: 2px solid #d5d5d5;
  border-radius: 10px;
  box-shadow: 0 18px 60px rgba(0,0,0,0.32);
  overflow: hidden;
  font-family: inherit;
}

.tpr-modal-close:hover {
  background: #d5d5d5;
  color: #111;
}

.tpr-modal-body {
  display: grid;
  grid-template-columns: minmax(0, 58.7%) minmax(360px, 41.3%);
  min-height: 638px;
}

.tpr-modal-image {
  position: relative;
  height: 638px;
  min-height: 638px;
  padding: 72px 54px 58px;
  background-color: transparent;
  border-radius: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: visible;
}

.tpr-modal-img {
  width: calc(100% - 96px);
  height: calc(100% - 124px);
  min-height: 420px;
  background-color: transparent;
  background-position: center center;
  background-repeat: no-repeat;
  background-size: contain;
}

.tpr-modal-nav {
  position: absolute;
  top: 50%;
  width: 42px;
  height: 58px;
  padding: 0;
  transform: translateY(-50%);
  border: 0;
  background: transparent;
  color: #111;
  cursor: pointer;
  font-size: 54px;
  font-weight: 300;
  line-height: 1;
}

.tpr-modal-nav:hover {
  background: transparent;
  color: #000;
}

.tpr-modal-nav-prev {
  left: 12px;
}

.tpr-modal-nav-next {
  right: 12px;
}

.tpr-modal-info {
  padding: 24px 20px 22px;
  gap: 0;
  background: #fff;
  color: #111;
}

.tpr-modal-title {
  margin: 0 0 7px;
  padding-right: 48px;
  font-size: 17px;
  font-weight: 800;
  line-height: 22px;
  color: #000;
  letter-spacing: 0;
}

.tpr-modal-breadcrumb {
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: 28px;
  padding-bottom: 8px;
  margin-bottom: 12px;
  border-bottom: 1px solid #ddd;
  color: #005ad4;
  font-size: 14px;
  font-weight: 700;
}

.tpr-modal-breadcrumb a {
  color: #005ad4;
  text-decoration: none;
}

.tpr-modal-breadcrumb a:hover {
  color: #003b91;
  text-decoration: underline;
}

.tpr-modal-breadcrumb a:first-child {
  padding: 2px 3px;
  line-height: 18px;
}

.tpr-modal-crumb-divider {
  color: #111;
  font-size: 24px;
  font-weight: 300;
  line-height: 18px;
}

.tpr-color-selector {
  position: relative;
  gap: 8px;
  padding: 0 2px;
}

.tpr-color-label {
  color: #666;
  font-size: 14px;
  font-weight: 500;
  line-height: 18px;
  letter-spacing: 0;
  text-transform: none;
}

.tpr-color-name-input {
  height: 45px;
  padding: 10px 42px 10px 15px;
  border: 1px solid #bdbdbd;
  border-radius: 4px;
  background: #fff url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1l5 5 5-5' stroke='%23111' stroke-width='1.5' fill='none' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") no-repeat right 15px center;
  color: #111;
  font-size: 14px;
  line-height: 20px;
  pointer-events: none;
}

#tpr-color-select {
  position: absolute;
  top: 26px;
  left: 0;
  width: 100%;
  height: 45px;
  opacity: 0;
  cursor: pointer;
  -webkit-appearance: none;
  -moz-appearance: none;
  appearance: none;
}

.tpr-color-swatches {
  display: grid;
  grid-template-columns: repeat(6, 52px);
  gap: 11px 11px;
  max-height: 225px;
  padding: 4px 4px 0;
  overflow: hidden;
}

.tpr-color-dot {
  width: 52px;
  height: 52px;
  border-radius: 3px;
  border: 1px solid rgba(0,0,0,0.22);
  box-shadow: none;
  transition: none;
}

.tpr-color-dot:hover {
  transform: none;
  border-color: #111;
}

.tpr-color-dot.active {
  border: 2px solid #1b64d8;
  box-shadow: 0 0 0 2px #fff inset, 0 0 0 1px #1b64d8;
}

.tpr-modal-stock {
  display: none;
}

.tpr-qty-price-row {
  display: grid;
  grid-template-columns: auto 1fr auto;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  padding: 16px 0 18px;
  border-top: 1px solid #ddd;
}

.tpr-qty-row {
  display: grid;
  grid-template-columns: 32px 46px 32px;
  align-items: stretch;
  height: 32px;
  border-color: #a9a9a9;
  border-radius: 3px;
  overflow: hidden;
  background: #fff;
  box-sizing: border-box;
}

.tpr-qty-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  min-width: 32px;
  height: 30px;
  min-height: 30px;
  margin: 0;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: #fff;
  font-size: 25px;
  font-weight: 400;
  line-height: 30px;
  color: #222;
  box-shadow: none;
  text-shadow: none;
  box-sizing: border-box;
}

#tpr-qty {
  display: block;
  width: 46px;
  height: 30px;
  min-height: 30px;
  margin: 0;
  padding: 0;
  border-top: 0;
  border-right: 1px solid #ccc;
  border-bottom: 0;
  border-left: 1px solid #ccc;
  border-radius: 0;
  font-size: 14px;
  line-height: 30px;
  color: #111;
  box-shadow: none;
  appearance: textfield;
  -webkit-appearance: none;
  -moz-appearance: textfield;
  box-sizing: border-box;
}

.tpr-qty-price-label {
  display: flex;
  align-items: center;
  gap: 4px;
  color: #555;
  font-size: 13px;
}

.tpr-qty-price-label strong {
  color: #555;
  font-weight: 500;
}

.tpr-modal-line-price {
  color: #000;
  font-size: 17px;
  font-weight: 800;
  text-align: right;
}

.tpr-modal-action-row {
  display: grid;
  grid-template-columns: 1fr 52px;
  gap: 16px;
  align-items: center;
  padding-bottom: 17px;
  border-bottom: 1px solid #ddd;
}

.tpr-add-to-cart-btn {
  height: 48px;
  padding: 0 20px;
  border-radius: 24px;
  background: #2461d8;
  font-size: 17px;
  font-weight: 800;
  line-height: 48px;
  text-transform: uppercase;
  letter-spacing: 0;
}

.tpr-add-to-cart-btn:hover:not(:disabled) {
  background: #174db7;
}

.tpr-add-to-cart-btn:disabled {
  background: #b7b7b7;
}

.tpr-modal-trash {
  position: relative;
  width: 52px;
  height: 52px;
  border: 0;
  border-radius: 50%;
  background: #f5f5f5;
  color: #8d8d8d;
  cursor: pointer;
  font-size: 0;
  line-height: 1;
}

.tpr-modal-trash::before,
.tpr-modal-trash::after {
  content: "";
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  border: 2px solid currentColor;
}

.tpr-modal-trash::before {
  top: 18px;
  width: 16px;
  height: 17px;
  border-top: 0;
  border-radius: 0 0 3px 3px;
}

.tpr-modal-trash::after {
  top: 13px;
  width: 18px;
  height: 4px;
  border-right: 0;
  border-left: 0;
}

.tpr-modal-trash:hover {
  background: #ececec;
  color: #555;
}

.tpr-cart-message {
  min-height: 16px;
  margin-top: 8px;
  font-size: 12px;
}

.tpr-modal-details {
  padding-top: 4px;
  color: #666;
  font-size: 15px;
  line-height: 23px;
}

.tpr-modal-details p {
  margin: 0;
}

.tpr-modal-details strong {
  color: #111;
  font-weight: 800;
}

@media (max-width: 860px) {
  .tpr-modal {
    width: min(560px, calc(100vw - 24px));
    max-height: calc(100vh - 24px);
  }

  .tpr-modal-body {
    grid-template-columns: 1fr;
    min-height: 0;
  }

  .tpr-modal-image {
    height: auto;
    min-height: 320px;
    max-height: none;
    padding: 58px 42px 34px;
  }

  .tpr-modal-img {
    width: calc(100% - 72px);
    height: 300px;
    min-height: 300px;
  }

  .tpr-modal-info {
    padding: 22px 18px 20px;
  }

  .tpr-color-swatches {
    grid-template-columns: repeat(5, minmax(42px, 1fr));
    gap: 9px;
  }

  .tpr-color-dot {
    width: 100%;
    height: auto;
    aspect-ratio: 1;
  }
}
