:root {
  --qe-primary: #0a6f4f;
  --qe-secondary: #f5f7f6;
  --qe-text: #1f2937;
  --qe-font: Arial, sans-serif;
}

.qepro-form-wrap,
.qepro-products-wrap,
.qepro-product-single {
  font-family: var(--qe-font);
  color: var(--qe-text);
}

.qepro-form-wrap {
  background: var(--qe-secondary);
  border: 1px solid rgba(31, 41, 55, 0.12);
  border-radius: 12px;
  padding: 20px;
  max-width: 720px;
}

.qepro-form-title {
  margin: 0 0 16px;
  font-size: 22px;
}

.qepro-field {
  margin-bottom: 14px;
}

.qepro-field label {
  display: block;
  margin-bottom: 6px;
  font-size: 14px;
  font-weight: 600;
}

.qepro-field input,
.qepro-field textarea,
.qepro-field select {
  width: 100%;
  border: 1px solid rgba(31, 41, 55, 0.2);
  border-radius: 8px;
  padding: 10px 12px;
  font-size: 14px;
  line-height: 1.4;
  box-sizing: border-box;
  background: #fff;
}

.qepro-field textarea {
  min-height: 92px;
  resize: vertical;
}

.qepro-inline {
  display: flex;
  gap: 8px;
  align-items: center;
  margin: 6px 0;
}

.qepro-inline input[type='checkbox'],
.qepro-inline input[type='radio'] {
  width: auto;
}

.qepro-required {
  color: #d23131;
}

.qepro-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin-top: 16px;
  padding: 6px 4px 4px;
}

.qepro-btn {
  border: none;
  border-radius: 8px;
  padding: 12px 18px;
  font-weight: 600;
  line-height: 1.25;
  cursor: pointer;
  text-decoration: none !important;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.qepro-btn:disabled {
  opacity: 0.65;
  cursor: not-allowed;
}

.qepro-btn-primary {
  background: var(--qe-primary);
  color: #fff;
}

.qepro-btn-whatsapp {
  background: #0e8d54;
  color: #fff;
}

.qepro-response {
  margin-top: 12px;
  font-size: 14px;
}

.qepro-response.is-error {
  color: #c61b1b;
}

.qepro-response.is-success {
  color: #0a6f4f;
}

.qepro-products-filter {
  display: grid;
  grid-template-columns: repeat(4, minmax(140px, 1fr));
  gap: 10px;
  margin-bottom: 14px;
}

.qepro-products-filter input,
.qepro-products-filter select {
  width: 100%;
  border: 1px solid rgba(31, 41, 55, 0.2);
  border-radius: 8px;
  padding: 9px 11px;
}

.qepro-products-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
}

.qepro-products-wrap {
  background: transparent;
  padding: 0;
}

.qepro-product-card {
  border: 1px solid rgba(31, 41, 55, 0.14);
  border-radius: 10px;
  background: #fff;
  overflow: hidden;
}

.qepro-product-thumb {
  position: relative;
  background: #d1d5db;
}

.qepro-product-thumb img {
  width: 100%;
  height: 220px;
  object-fit: cover;
  display: block;
}

.qepro-product-thumb::after {
  content: '';
  position: absolute;
  right: 0;
  bottom: 0;
  width: 0;
  height: 0;
  border-left: 22px solid transparent;
  border-top: 22px solid #fff;
}

.qepro-product-thumb-empty {
  min-height: 220px;
}

.qepro-product-thumb-link {
  display: block;
}

.qepro-product-card-body {
  padding: 18px 16px 16px;
  display: flex;
  flex-direction: column;
  min-height: 0;
}

.qepro-product-card h4 {
  margin: 0;
  font-size: 22px;
  line-height: 1.2;
  font-size: clamp(20px, 1.6vw, 30px);
  font-weight: 700;
}

.qepro-product-card h4 a {
  color: #111827;
  text-decoration: none;
}

.qepro-product-divider {
  height: 1px;
  background: #d4d4d8;
  margin: 14px 0 14px;
  position: relative;
}

.qepro-product-divider::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0;
  width: 78px;
  height: 1px;
  background: #dc2626;
}

.qepro-product-excerpt {
  margin: 0 0 14px;
  color: #334155;
  font-size: 14px;
  line-height: 1.65;
  font-size: clamp(14px, 0.95vw, 16px);
  flex: 1;
}

.qepro-product-readmore {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-weight: 700;
  color: #0f172a;
  font-size: 14px;
  font-size: clamp(13px, 0.75vw, 15px);
}

.qepro-product-readmore span {
  color: #dc2626;
  font-size: 20px;
  line-height: 1;
}

.qepro-product-single {
  border: 1px solid rgba(31, 41, 55, 0.14);
  border-radius: 10px;
  padding: 16px;
  background: #fff;
}

.qepro-product-short-description {
  margin: 6px 0 12px;
  color: #334155;
}

.qepro-product-short-description p {
  margin: 0 0 8px;
}

.qepro-product-meta {
  margin: 0 0 12px;
}

.qepro-product-meta p {
  margin: 0 0 6px;
}

.qepro-product-single-layout {
  display: grid;
  grid-template-columns: minmax(0, 2fr) minmax(300px, 1fr);
  gap: 18px;
  align-items: flex-start;
}

.qepro-product-main-image img {
  width: 100%;
  height: auto;
  border-radius: 10px;
  margin-bottom: 10px;
}

.qepro-product-gallery {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(80px, 1fr));
  gap: 8px;
  margin-bottom: 12px;
}

.qepro-gallery-item img {
  width: 100%;
  height: 80px;
  object-fit: cover;
  border-radius: 6px;
  display: block;
}

.qepro-product-form-panel .qepro-form-wrap {
  max-width: 100%;
}

.qepro-product-form-panel .qepro-actions {
  margin-top: 18px;
  padding: 8px 6px 6px;
  gap: 8px;
  flex-wrap: nowrap;
}

.qepro-product-form-panel .qepro-actions .qepro-btn {
  min-height: 40px;
  padding: 9px 12px;
  font-size: 12px;
  flex: 1 1 0;
  min-width: 0;
  white-space: nowrap;
}

.qepro-back-link {
  display: inline-block;
  margin-bottom: 10px;
  color: var(--qe-primary);
}

.qepro-pagination {
  margin-top: 16px;
  display: flex;
  gap: 6px;
}

.qepro-page {
  border: 1px solid rgba(31, 41, 55, 0.24);
  border-radius: 6px;
  padding: 4px 8px;
  color: var(--qe-text);
  text-decoration: none;
}

.qepro-page.is-active {
  background: var(--qe-primary);
  color: #fff;
  border-color: var(--qe-primary);
}

@media (max-width: 900px) {
  .qepro-product-single-layout {
    grid-template-columns: 1fr;
  }

  .qepro-products-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .qepro-products-filter {
    grid-template-columns: repeat(2, minmax(140px, 1fr));
  }

  .qepro-products-wrap {
    padding: 0;
  }

  .qepro-product-thumb img,
  .qepro-product-thumb-empty {
    height: 220px;
    min-height: 220px;
  }

  .qepro-product-card-body {
    padding: 16px;
    min-height: 0;
  }
}

@media (max-width: 640px) {
  .qepro-product-single-layout,
  .qepro-products-grid,
  .qepro-products-filter {
    grid-template-columns: 1fr;
  }

  .qepro-form-wrap {
    padding: 14px;
  }

  .qepro-products-wrap {
    padding: 0;
  }

  .qepro-product-card-body {
    padding: 14px;
    min-height: 0;
  }

  .qepro-product-thumb img,
  .qepro-product-thumb-empty {
    height: 200px;
    min-height: 200px;
  }

  .qepro-product-form-panel .qepro-actions {
    padding: 8px 0 2px;
    gap: 8px;
    flex-wrap: nowrap;
  }

  .qepro-product-form-panel .qepro-actions .qepro-btn {
    width: auto;
    font-size: 12px;
    padding: 9px 10px;
  }
}
