/* DFA Search Results — mockup-matched layout */

:root {
  --dfa-search-red: #e30613;
  --dfa-search-red-dark: #c4000f;
  --dfa-search-border: #e5e5e5;
  --dfa-search-muted: #666;
  --dfa-search-bg: #f5f5f7;
}

body.dfa-search-page #column-left,
body.dfa-search-page #column-right {
  display: none !important;
}

body.dfa-search-page #content {
  flex: 0 0 100% !important;
  max-width: 100% !important;
  width: 100% !important;
  padding: 0 !important;
  background: #fff;
}

body.dfa-search-page #content > .container,
body.dfa-search-page .container:has(.dfa-search-page) {
  max-width: 100% !important;
  width: 100% !important;
  padding: 0 !important;
}

.dfa-search-page {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Arial, sans-serif;
  color: #111;
}

.dfa-search-page *,
.dfa-search-page *::before,
.dfa-search-page *::after {
  box-sizing: border-box;
}

.dfa-search-page .dfa-module-zone {
  display: none !important;
}

/* Breadcrumb strip */
.dfa-search-crumb-bar {
  background: var(--dfa-search-bg);
  border-bottom: 1px solid #ececec;
}

.dfa-search-crumb-inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 12px 20px;
}

.dfa-search-breadcrumb {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 14px;
  font-weight: 600;
  color: #444;
}

.dfa-search-breadcrumb a {
  color: var(--dfa-search-red);
  text-decoration: none;
}

.dfa-search-breadcrumb a:hover {
  text-decoration: underline;
}

.dfa-search-breadcrumb .sep {
  color: #999;
  font-weight: 400;
}

/* Main content */
.dfa-search-inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 24px 20px 48px;
}

.dfa-search-page-title {
  margin: 0 0 20px;
  font-size: clamp(22px, 3vw, 28px);
  font-weight: 800;
  line-height: 1.2;
}

/* Search criteria panel */
.dfa-search-criteria {
  margin-bottom: 28px;
}

.dfa-search-criteria-label {
  display: block;
  margin-bottom: 10px;
  font-size: 15px;
  font-weight: 800;
}

.dfa-search-criteria-grid {
  display: grid;
  grid-template-columns: 1fr 280px;
  gap: 16px 20px;
  align-items: start;
}

.dfa-search-criteria-main {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.dfa-search-input {
  width: 100%;
  height: 44px;
  border: 1px solid var(--dfa-search-border);
  border-radius: 6px;
  padding: 0 14px;
  font-size: 15px;
  color: #111;
  background: #fff;
}

.dfa-search-input:focus {
  outline: none;
  border-color: var(--dfa-search-red);
  box-shadow: 0 0 0 3px rgba(227, 6, 19, 0.1);
}

.dfa-search-criteria-side {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.dfa-search-select {
  width: 100%;
  height: 44px;
  border: 1px solid var(--dfa-search-border);
  border-radius: 6px;
  padding: 0 36px 0 12px;
  font-size: 14px;
  color: #111;
  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 fill='%23666' d='M1.41 0 6 4.58 10.59 0 12 1.41l-6 6-6-6z'/%3E%3C/svg%3E") no-repeat right 12px center;
  appearance: none;
}

.dfa-search-check {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 14px;
  font-weight: 500;
  color: #333;
  cursor: pointer;
  user-select: none;
}

.dfa-search-check input {
  width: 18px;
  height: 18px;
  accent-color: var(--dfa-search-red);
  margin: 0;
}

.dfa-search-submit {
  align-self: flex-start;
  min-width: 120px;
  height: 42px;
  padding: 0 24px;
  border: none;
  border-radius: 6px;
  background: var(--dfa-search-red);
  color: #fff;
  font-size: 14px;
  font-weight: 800;
  letter-spacing: 0.04em;
  cursor: pointer;
  transition: background 0.2s;
}

.dfa-search-submit:hover {
  background: var(--dfa-search-red-dark);
}

/* Results toolbar */
.dfa-search-results-head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 14px 20px;
  margin-bottom: 18px;
}

.dfa-search-results-title {
  margin: 0;
  font-size: 17px;
  font-weight: 800;
  flex: 1 1 220px;
}

.dfa-search-toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px 18px;
}

.dfa-search-view-toggle {
  display: inline-flex;
  border: 1px solid var(--dfa-search-border);
  border-radius: 6px;
  overflow: hidden;
  background: #fff;
}

.dfa-search-view-btn {
  width: 40px;
  height: 36px;
  border: none;
  background: #fff;
  color: #888;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 15px;
  transition: color 0.2s, background 0.2s;
}

.dfa-search-view-btn + .dfa-search-view-btn {
  border-left: 1px solid var(--dfa-search-border);
}

.dfa-search-view-btn.is-active {
  color: var(--dfa-search-red);
  background: #fff5f5;
}

.dfa-search-compare-link {
  font-size: 14px;
  font-weight: 700;
  color: var(--dfa-search-red);
  text-decoration: none;
  white-space: nowrap;
}

.dfa-search-compare-link:hover {
  text-decoration: underline;
}

.dfa-search-toolbar-field {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 14px;
  font-weight: 600;
  color: #333;
  white-space: nowrap;
}

.dfa-search-toolbar-field select {
  height: 36px;
  min-width: 110px;
  border: 1px solid var(--dfa-search-border);
  border-radius: 6px;
  padding: 0 30px 0 10px;
  font-size: 14px;
  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 fill='%23666' d='M1.41 0 6 4.58 10.59 0 12 1.41l-6 6-6-6z'/%3E%3C/svg%3E") no-repeat right 10px center;
  appearance: none;
}

/* Product grid */
.dfa-search-products {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 18px;
  margin-bottom: 28px;
}

.dfa-search-product-card {
  background: #fff;
  border: 1px solid var(--dfa-search-border);
  border-radius: 8px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: box-shadow 0.2s;
}

.dfa-search-product-card:hover {
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.07);
}

.dfa-search-product-media {
  position: relative;
  padding: 8px;
  background: #fafafa;
  display: flex;
  align-items: center;
  justify-content: center;
  aspect-ratio: 1;
  min-height: 0;
  overflow: hidden;
}

.dfa-search-product-media > a {
  display: flex;
  width: 100%;
  height: 100%;
  align-items: center;
  justify-content: center;
}

.dfa-search-product-media img {
  width: 100%;
  height: 100%;
  max-width: none;
  max-height: none;
  object-fit: contain;
}

.dfa-search-product-badge {
  position: absolute;
  top: 12px;
  left: 12px;
  width: 52px;
  height: 52px;
  border-radius: 50%;
  background: #1f6feb;
  color: #fff;
  font-size: 8px;
  font-weight: 900;
  line-height: 1.1;
  text-align: center;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 4px;
  letter-spacing: 0.02em;
}

.dfa-search-product-body {
  padding: 0 16px 16px;
  display: flex;
  flex-direction: column;
  flex: 1;
}

.dfa-search-product-name {
  margin: 0 0 8px;
  font-size: 14px;
  font-weight: 800;
  line-height: 1.35;
}

.dfa-search-product-name a {
  color: #111;
  text-decoration: none;
}

.dfa-search-product-name a:hover {
  color: var(--dfa-search-red);
}

.dfa-search-product-desc {
  margin: 0 0 12px;
  font-size: 13px;
  line-height: 1.45;
  color: var(--dfa-search-muted);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  min-height: 38px;
}

.dfa-search-product-price {
  margin: 0 0 14px;
}

.dfa-search-product-price-main {
  display: block;
  font-size: 22px;
  font-weight: 900;
  color: var(--dfa-search-red);
  line-height: 1.1;
}

.dfa-search-product-price-old {
  display: block;
  font-size: 14px;
  color: #999;
  text-decoration: line-through;
  font-weight: 600;
  margin-top: 2px;
}

.dfa-search-product-tax {
  display: block;
  margin-top: 4px;
  font-size: 13px;
  color: var(--dfa-search-muted);
}

.dfa-search-product-actions {
  display: grid;
  grid-template-columns: 1fr 42px 42px;
  gap: 8px;
  margin-top: auto;
}

.dfa-search-add-cart {
  height: 40px;
  border: none;
  border-radius: 6px;
  background: var(--dfa-search-red);
  color: #fff;
  font-size: 13px;
  font-weight: 800;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  transition: background 0.2s;
}

.dfa-search-add-cart:hover {
  background: var(--dfa-search-red-dark);
}

.dfa-search-icon-btn {
  width: 42px;
  height: 40px;
  border: 1px solid var(--dfa-search-border);
  border-radius: 6px;
  background: #fff;
  color: #555;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  transition: border-color 0.2s, color 0.2s;
}

.dfa-search-icon-btn:hover {
  border-color: var(--dfa-search-red);
  color: var(--dfa-search-red);
}

/* List view */
.dfa-search-products.is-list {
  grid-template-columns: 1fr;
  gap: 14px;
}

.dfa-search-products.is-list .dfa-search-product-card {
  flex-direction: row;
  align-items: stretch;
}

.dfa-search-products.is-list .dfa-search-product-media {
  flex: 0 0 200px;
  min-height: 0;
  border-right: 1px solid var(--dfa-search-border);
}

.dfa-search-products.is-list .dfa-search-product-body {
  padding: 16px 18px;
}

.dfa-search-products.is-list .dfa-search-product-actions {
  max-width: 360px;
}

/* Empty + pagination */
.dfa-search-empty {
  text-align: center;
  padding: 48px 24px;
  border: 1px solid var(--dfa-search-border);
  border-radius: 8px;
  background: #fafafa;
  margin-bottom: 24px;
}

.dfa-search-empty p {
  margin: 0;
  color: var(--dfa-search-muted);
  font-size: 15px;
}

.dfa-search-pagination {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  margin-top: 8px;
}

.dfa-search-pagination .pagination {
  margin: 0;
}

.dfa-search-pagination .text-muted {
  font-size: 13px;
  color: #777;
}

@media (max-width: 1199px) {
  .dfa-search-products {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (max-width: 991px) {
  .dfa-search-criteria-grid {
    grid-template-columns: 1fr;
  }

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

  .dfa-search-results-head {
    flex-direction: column;
    align-items: flex-start;
  }
}

@media (max-width: 767px) {
  .dfa-search-inner {
    padding: 18px 14px 36px;
  }

  .dfa-search-products.is-list .dfa-search-product-card {
    flex-direction: column;
  }

  .dfa-search-products.is-list .dfa-search-product-media {
    flex: none;
    border-right: none;
    border-bottom: 1px solid var(--dfa-search-border);
  }
}

@media (max-width: 479px) {
  .dfa-search-products {
    grid-template-columns: 1fr;
  }

  .dfa-search-toolbar {
    width: 100%;
  }

  .dfa-search-toolbar-field {
    flex: 1;
  }

  .dfa-search-toolbar-field select {
    width: 100%;
    min-width: 0;
  }
}
