/**
 * Dealer Quick Order App product styles.
 */

/* Desktop / tablet grid */
#dqoa-product-results {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
  align-items: start;
}

.dqoa-product-card {
  display: flex;
  flex-direction: column;
  min-width: 0;
  background: #ffffff;
  border: 1px solid #e5e7eb;
  border-radius: 18px;
  overflow: hidden;
}

.dqoa-product-image-wrap {
  height: 170px;
  padding: 18px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-bottom: 1px solid #eef2f7;
  background: #ffffff;
}

.dqoa-product-image-wrap img {
  max-width: 100%;
  max-height: 135px;
  object-fit: contain;
}

.dqoa-product-content {
  display: flex;
  flex-direction: column;
  gap: 9px;
  padding: 16px;
}

.dqoa-product-title {
  margin: 0;
  color: #111827;
  font-size: 24px;
  line-height: 1.1;
  letter-spacing: 0.2px;
  text-transform: uppercase;
}

.dqoa-product-sku {
  color: #6b7280;
  font-size: 13px;
  line-height: 1.3;
  text-transform: uppercase;
}

.dqoa-product-price {
  color: var(--dqoa-red);
  font-size: 34px;
  line-height: 1;
}

.dqoa-product-price del {
  display: block;
  margin-bottom: 4px;
  color: #9ca3af;
  font-size: 18px;
}

.dqoa-product-price ins {
  text-decoration: none;
}

.dqoa-stock-label {
  align-self: flex-start;
  display: inline-flex;
  align-items: center;
  min-height: 26px;
  padding: 0 11px;
  border-radius: 999px;
  background: #dcfce7;
  color: #15803d;
  font-size: 12px;
  line-height: 1;
  text-transform: uppercase;
}

.dqoa-stock-label.dqoa-out-stock {
  background: #fee2e2;
  color: #dc2626;
}

.dqoa-stock-note {
  color: #6b7280;
  font-size: 12px;
  line-height: 1.35;
  text-transform: uppercase;
}

.dqoa-product-actions {
  display: grid;
  grid-template-columns: 118px minmax(0, 1fr);
  gap: 10px;
  margin-top: auto;
  padding-top: 8px;
}

.dqoa-qty-wrap {
  display: grid;
  grid-template-columns: 32px 48px 32px;
  height: 38px;
  overflow: hidden;
  border: 1px solid #e5e7eb;
  border-radius: 10px;
  background: #ffffff;
}

.dqoa-qty-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 38px;
  border: 0;
  background: #f8fafc;
  color: #374151;
  font-size: 16px;
  cursor: pointer;
  padding: 0;
  line-height: 1;
}

.dqoa-qty-btn:hover {
  background: #111820;
  color: #ffffff;
}

.dqoa-qty-input {
  width: 48px;
  height: 38px;
  border: 0;
  border-left: 1px solid #e5e7eb;
  border-right: 1px solid #e5e7eb;
  background: #ffffff;
  color: #111827;
  font-size: 17px;
  text-align: center;
  outline: none;
  padding: 0;
}

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

.dqoa-qty-input {
  -moz-appearance: textfield;
  appearance: textfield;
}

.dqoa-add-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 42px;
  border: 1px solid var(--dqoa-red);
  border-radius: 12px;
  background: #ffffff;
  color: var(--dqoa-red);
  font-size: 18px;
  letter-spacing: 0.4px;
  text-transform: uppercase;
  cursor: pointer;
}

.dqoa-add-btn:hover {
  background: var(--dqoa-red-dark);
  color: #ffffff;
}

.dqoa-add-btn:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

.dqoa-load-more-wrap {
  display: flex;
  justify-content: center;
  margin-top: -5px;
}

#dqoa-load-more-products {
  min-width: 220px;
  min-height: 48px;
}

/* Mobile product list */
@media (max-width: 767px) {
  #dqoa-product-results {
    display: block;
    background: #ffffff;
    border: 1px solid #eef2f7;
    border-radius: 18px;
    overflow: hidden;
  }

  #dqoa-product-results .dqoa-product-card {
    display: grid;
    grid-template-columns: 84px minmax(0, 1fr) 42px;
    column-gap: 12px;
    align-items: center;
    padding: 12px;
    border: 0;
    border-bottom: 1px solid #edf2f7;
    border-radius: 0;
    background: #ffffff;
    min-height: 104px;
  }

  #dqoa-product-results .dqoa-product-card:last-child {
    border-bottom: 0;
  }

  #dqoa-product-results .dqoa-product-image-wrap {
    width: 84px;
    height: 84px;
    padding: 0;
    border: 0;
    background: transparent;
  }

  #dqoa-product-results .dqoa-product-image-wrap img {
    width: 84px;
    height: 84px;
    max-width: 84px;
    max-height: 84px;
    object-fit: contain;
  }

  #dqoa-product-results .dqoa-product-content {
    display: block;
    padding: 0;
    min-width: 0;
  }

  #dqoa-product-results .dqoa-product-title {
    margin: 0 0 4px;
    font-size: 16px;
    line-height: 1.12;
    letter-spacing: 0.1px;
  }

  #dqoa-product-results .dqoa-product-sku {
    margin: 0 0 3px;
    font-size: 11px;
    line-height: 1.2;
    color: #9ca3af;
  }

  #dqoa-product-results .dqoa-product-price {
    margin: 0 0 3px;
    font-size: 17px;
    line-height: 1;
    color: var(--dqoa-red);
  }

  #dqoa-product-results .dqoa-product-price del {
    display: none;
  }

  #dqoa-product-results .dqoa-stock-label {
    display: inline-flex;
    min-height: auto;
    padding: 0;
    border-radius: 0;
    background: transparent;
    color: #15803d;
    font-size: 11px;
    line-height: 1.2;
  }

  #dqoa-product-results .dqoa-stock-label::before {
    content: "✓";
    margin-right: 4px;
  }

  #dqoa-product-results .dqoa-stock-label.dqoa-out-stock {
    color: #dc2626;
  }

  #dqoa-product-results .dqoa-stock-label.dqoa-out-stock::before {
    content: "×";
  }

  #dqoa-product-results .dqoa-stock-note {
    display: none;
  }

  #dqoa-product-results .dqoa-product-actions {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 42px;
    margin: 0;
    padding: 0;
  }

  #dqoa-product-results .dqoa-qty-wrap {
    display: none;
  }

  #dqoa-product-results .dqoa-add-btn {
    width: 38px;
    min-width: 38px;
    height: 38px;
    min-height: 38px;
    padding: 0;
    border: 0;
    border-radius: 10px;
    background: var(--dqoa-red);
    color: #ffffff;
    font-size: 0;
    box-shadow: 0 8px 18px rgba(227, 6, 19, 0.25);
  }

  #dqoa-product-results .dqoa-add-btn::before {
    content: "+";
    font-size: 24px;
    line-height: 1;
    color: #ffffff;
  }

  #dqoa-product-results .dqoa-add-btn:disabled {
    background: #d1d5db;
    color: #ffffff;
    opacity: 1;
  }

  #dqoa-product-results .dqoa-add-btn:disabled::before {
    content: "×";
  }
}
/**
 * Mobile product list final plus button alignment.
 */
@media (max-width: 767px) {
  #dqoa-product-results .dqoa-product-card {
    position: relative;
    display: grid;
    grid-template-columns: 84px minmax(0, 1fr);
    gap: 12px;
    align-items: center;
    padding: 12px 62px 12px 12px;
    min-height: 104px;
  }

  #dqoa-product-results .dqoa-product-image-wrap {
    width: 84px;
    height: 84px;
  }

  #dqoa-product-results .dqoa-product-content {
    display: block;
    padding: 0;
    min-width: 0;
  }

  #dqoa-product-results .dqoa-product-actions {
    position: absolute;
    right: 14px;
    top: 50%;
    transform: translateY(-50%);
    width: 40px;
    height: 40px;
    margin: 0;
    padding: 0;
    display: flex;
    align-items: center;
    justify-content: center;
  }

  #dqoa-product-results .dqoa-qty-wrap {
    display: none;
  }

  #dqoa-product-results .dqoa-add-btn {
    width: 40px;
    min-width: 40px;
    height: 40px;
    min-height: 40px;
    padding: 0;
    border: 0;
    border-radius: 10px;
    background: var(--dqoa-red);
    color: #ffffff;
    font-size: 0;
    box-shadow: 0 8px 18px rgba(227, 6, 19, 0.25);
  }

  #dqoa-product-results .dqoa-add-btn::before {
    content: "+";
    font-size: 24px;
    line-height: 1;
    color: #ffffff;
  }

  #dqoa-product-results .dqoa-add-btn:disabled::before {
    content: "×";
  }
}
/**
 * Mobile cart count badge.
 */
@media (max-width: 1024px) {
  #dqoa-mobile-cart-toggle {
    position: relative;
  }

  .dqoa-mobile-cart-count {
    position: absolute;
    top: 6px;
    right: 10px;
    display: none;
    min-width: 18px;
    height: 18px;
    padding: 0 5px;
    border-radius: 999px;
    background: var(--dqoa-red);
    color: #ffffff;
    font-size: 11px;
    line-height: 18px;
    text-align: center;
    box-shadow: 0 6px 14px rgba(227, 6, 19, 0.35);
  }

  .dqoa-mobile-cart-count.dqoa-show {
    display: inline-block;
  }
  .dqoa-cart-panel {
    padding-bottom: 120px !important;
  }

  /* #dqoa-save-quote-btn {
    margin-bottom: 20px !important;
  } */
}
/**
 * Final clean product quantity and add button UI.
 */
@media (min-width: 768px) {
  .dqoa-product-actions {
    display: grid !important;
    grid-template-columns: 106px minmax(0, 1fr) !important;
    gap: 10px !important;
    align-items: center !important;
    padding-top: 12px !important;
  }

  .dqoa-qty-wrap {
    display: grid !important;
    grid-template-columns: 30px 46px 30px !important;
    height: 38px !important;
    border: 1px solid #e5e7eb !important;
    border-radius: 999px !important;
    overflow: hidden !important;
    background: #ffffff !important;
  }

  .dqoa-qty-btn {
    min-height: 38px !important;
    border: 0 !important;
    background: #f8fafc !important;
    color: #374151 !important;
    font-size: 15px !important;
    padding: 0 !important;
    line-height: 1 !important;
  }

  .dqoa-qty-btn:hover {
    background: #111820 !important;
    color: #ffffff !important;
  }

  .dqoa-qty-input {
    width: 46px !important;
    height: 38px !important;
    border: 0 !important;
    border-left: 1px solid #e5e7eb !important;
    border-right: 1px solid #e5e7eb !important;
    background: #ffffff !important;
    color: #111827 !important;
    font-size: 16px !important;
    text-align: center !important;
    padding: 0 !important;
    outline: none !important;
    box-shadow: none !important;
  }

  .dqoa-add-btn {
    min-height: 38px !important;
    border: 0 !important;
    border-radius: 999px !important;
    background: var(--dqoa-red) !important;
    color: #ffffff !important;
    font-size: 14px !important;
    letter-spacing: 0.4px !important;
    box-shadow: 0 8px 18px rgba(227, 6, 19, 0.18) !important;
  }

  .dqoa-add-btn:hover {
    background: var(--dqoa-red-dark) !important;
    color: #ffffff !important;
  }
}
/**
 * Desktop compact product cards.
 */
@media (min-width: 1025px) {
  .dqoa-product-image-wrap {
    height: 145px;
    padding: 14px;
  }

  .dqoa-product-image-wrap img {
    max-height: 115px;
  }

  .dqoa-product-content {
    gap: 7px;
    padding: 14px;
  }

  .dqoa-product-title {
    font-size: 21px;
    line-height: 1.08;
  }

  .dqoa-product-sku {
    font-size: 12px;
  }

  .dqoa-product-price {
    font-size: 30px;
  }

  .dqoa-stock-label {
    min-height: 22px;
    padding: 0 10px;
    font-size: 10px;
  }

  .dqoa-stock-note {
    font-size: 11px;
  }

  .dqoa-product-actions {
    grid-template-columns: 104px minmax(0, 1fr) !important;
    gap: 9px !important;
    padding-top: 8px !important;
  }

  .dqoa-qty-wrap {
    grid-template-columns: 28px 44px 28px !important;
    height: 34px !important;
  }

  .dqoa-qty-btn {
    min-height: 34px !important;
    font-size: 14px !important;
  }

  .dqoa-qty-input {
    width: 44px !important;
    height: 34px !important;
    font-size: 15px !important;
  }

  .dqoa-add-btn {
    min-height: 34px !important;
    font-size: 13px !important;
  }
}
/**
 * Product skeleton loading.
 */
.dqoa-skeleton-card {
  display: flex;
  flex-direction: column;
  border: 1px solid #e5e7eb;
  border-radius: 24px;
  overflow: hidden;
  background: #ffffff;
  min-height: 420px;
}

.dqoa-skeleton-image,
.dqoa-skeleton-line,
.dqoa-skeleton-badge,
.dqoa-skeleton-action {
  position: relative;
  overflow: hidden;
  background: #edf2f7;
}

.dqoa-skeleton-image::before,
.dqoa-skeleton-line::before,
.dqoa-skeleton-badge::before,
.dqoa-skeleton-action::before {
  content: "";
  position: absolute;
  inset: 0;
  transform: translateX(-100%);
  background: linear-gradient(
    90deg,
    transparent,
    rgba(255, 255, 255, 0.7),
    transparent
  );
  animation: dqoaSkeleton 1.3s infinite;
}

@keyframes dqoaSkeleton {
  100% {
    transform: translateX(100%);
  }
}

.dqoa-skeleton-image {
  height: 220px;
}

.dqoa-skeleton-content {
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 20px;
}

.dqoa-skeleton-line {
  border-radius: 999px;
}

.dqoa-skeleton-title {
  width: 72%;
  height: 22px;
}

.dqoa-skeleton-sku {
  width: 38%;
  height: 12px;
}

.dqoa-skeleton-price {
  width: 42%;
  height: 34px;
}

.dqoa-skeleton-badge {
  width: 110px;
  height: 24px;
  border-radius: 999px;
}

.dqoa-skeleton-note {
  width: 54%;
  height: 12px;
}

.dqoa-skeleton-actions {
  display: grid;
  grid-template-columns: 104px 1fr;
  gap: 10px;
  margin-top: auto;
  padding-top: 12px;
}

.dqoa-skeleton-action {
  height: 38px;
  border-radius: 999px;
}

/**
* Mobile skeleton list.
*/
@media (max-width: 767px) {
  .dqoa-skeleton-card {
    flex-direction: row;
    align-items: center;
    min-height: auto;
    border: 0;
    border-bottom: 1px solid #eceff3;
    border-radius: 0;
    padding: 16px;
    gap: 14px;
  }

  .dqoa-skeleton-image {
    width: 72px;
    min-width: 72px;
    height: 72px;
    border-radius: 14px;
  }

  .dqoa-skeleton-content {
    flex: 1;
    padding: 0;
    gap: 8px;
  }

  .dqoa-skeleton-title {
    width: 78%;
    height: 16px;
  }

  .dqoa-skeleton-sku {
    width: 40%;
    height: 10px;
  }

  .dqoa-skeleton-price {
    width: 34%;
    height: 18px;
  }

  .dqoa-skeleton-badge {
    width: 92px;
    height: 18px;
  }

  .dqoa-skeleton-note {
    width: 44%;
    height: 10px;
  }

  .dqoa-skeleton-actions {
    display: none;
  }
}
/**
 * MSRP and saving label.
 */
.dqoa-product-msrp {
  color: #6b7280;
  font-size: 13px;
  line-height: 1.2;
  text-transform: uppercase;
}

.dqoa-product-msrp span {
  color: #111827;
  text-decoration: line-through;
}

.dqoa-product-saving {
  align-self: flex-start;
  display: inline-flex;
  align-items: center;
  min-height: 22px;
  padding: 0 10px;
  border-radius: 999px;
  background: #fff1f2;
  color: var(--dqoa-red);
  font-size: 11px;
  line-height: 1;
  text-transform: uppercase;
}

@media (max-width: 767px) {
  .dqoa-product-msrp {
    font-size: 10px;
    margin-bottom: 3px;
  }

  .dqoa-product-saving {
    display: none;
  }
}
/**
 * Desktop compact card height for 2-row viewport.
 */
@media (min-width: 1025px) {
  .dqoa-product-image-wrap {
    height: 135px;
    padding: 12px;
  }

  .dqoa-product-image-wrap img {
    max-height: 105px;
  }

  .dqoa-product-content {
    gap: 6px;
    padding: 14px;
  }

  .dqoa-product-title {
    min-height: 44px;
    max-height: 44px;
    overflow: hidden;
    font-size: 20px;
    line-height: 1.1;
  }

  .dqoa-product-sku {
    font-size: 11px;
    line-height: 1.1;
  }

  .dqoa-product-price {
    font-size: 28px;
    line-height: 1;
  }

  .dqoa-product-msrp {
    font-size: 11px;
    line-height: 1.1;
  }

  .dqoa-product-saving {
    min-height: 20px;
    padding: 0 9px;
    font-size: 10px;
  }

  .dqoa-stock-label {
    min-height: 22px;
    padding: 0 10px;
    font-size: 10px;
  }

  .dqoa-stock-note {
    font-size: 10px;
    line-height: 1.2;
  }

  .dqoa-product-actions {
    grid-template-columns: 104px minmax(0, 1fr) !important;
    gap: 9px !important;
    padding-top: 8px !important;
  }

  .dqoa-qty-wrap {
    height: 34px !important;
  }

  .dqoa-add-btn {
    min-height: 34px !important;
  }
}
