:root {
  --ipull-foreground: #1f2933;
  --ipull-muted: #6b7280;
  --ipull-border: #dfe3ea;
  --ipull-surface: #ffffff;
  --ipull-accent: #e41e26;
  --ipull-accent-dark: #b7181e;
  --ipull-background: #f6f7fb;
  --ipull-radius: 16px;
  --ipull-shadow: 0 30px 60px -40px rgba(31, 41, 51, 0.4);
}

.ipull-catalog {
  margin: 2.5rem auto;
  max-width: 1200px;
  padding: 0 1.25rem 3rem;
  color: var(--ipull-foreground);
  background: transparent;
  box-sizing: border-box;
}

.ipull-catalog__header {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  align-items: baseline;
  justify-content: space-between;
  margin-bottom: 1.5rem;
}

.ipull-catalog__header h2 {
  margin: 0;
  font-size: clamp(1.6rem, 3vw, 2rem);
  font-weight: 700;
}

.ipull-catalog__count {
  font-size: 0.95rem;
  color: var(--ipull-muted);
}

/* Search Bar - All controls on same row */
.ipull-catalog__search-bar {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  background: var(--ipull-surface);
  border: 1px solid var(--ipull-border);
  border-radius: var(--ipull-radius);
  padding: 1rem 1.25rem;
  box-shadow: var(--ipull-shadow);
  margin-bottom: 2rem;
  flex-wrap: wrap;
}

.ipull-catalog__filter-buttons {
  display: flex;
  gap: 0.5rem;
  align-items: center;
}

.ipull-catalog__search-group {
  flex: 1 1 250px;
  min-width: 200px;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-wrap: nowrap;
}

.ipull-catalog__search-group input[type="search"] {
  flex: 1 1 auto;
  width: auto;
  border-radius: 12px;
  border: 1px solid var(--ipull-border);
  padding: 0.6rem 0.9rem;
  font-size: 0.95rem;
  background: #fbfcff;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
  box-sizing: border-box;
}

.ipull-catalog__search-submit {
  padding: 0.6rem 1.2rem;
  white-space: nowrap;
}

.ipull-catalog__search-group input[type="search"]:focus {
  outline: none;
  border-color: var(--ipull-accent);
  box-shadow: 0 0 0 3px rgba(228, 30, 38, 0.15);
}

.ipull-catalog__search-group input[type="search"]::placeholder {
  color: var(--ipull-muted);
  opacity: 0.7;
}

/* Quick Filters Bar - displayed above search bar */
.ipull-catalog__quick-filters {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.75rem;
  background: var(--ipull-surface);
  border: 1px solid var(--ipull-border);
  border-radius: var(--ipull-radius);
  padding: 0.875rem 1.25rem;
  margin-bottom: 0.75rem;
  box-shadow: var(--ipull-shadow);
}

.ipull-quick-filter {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex: 0 1 auto;
  min-width: 0;
}

.ipull-quick-filter__label {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--ipull-foreground);
  white-space: nowrap;
}

.ipull-quick-filter__select {
  min-width: 120px;
  max-width: 200px;
  padding: 0.45rem 2rem 0.45rem 0.75rem;
  border-radius: 8px;
  border: 1px solid var(--ipull-border);
  background: #fbfcff url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%236b7280' d='M3 4.5L6 7.5L9 4.5'/%3E%3C/svg%3E") no-repeat right 0.75rem center;
  background-size: 12px;
  font-size: 0.875rem;
  color: var(--ipull-foreground);
  cursor: pointer;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
  appearance: none;
  -webkit-appearance: none;
}

.ipull-quick-filter__select:focus {
  outline: none;
  border-color: var(--ipull-accent);
  box-shadow: 0 0 0 2px rgba(228, 30, 38, 0.15);
}

.ipull-quick-filter__select:hover {
  border-color: var(--ipull-accent);
}

/* Sort and Per-Page Controls */
.ipull-catalog__sort-controls {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.75rem;
  padding: 0.625rem 1.25rem;
  background: var(--ipull-surface);
  border: 1px solid var(--ipull-border);
  border-radius: var(--ipull-radius);
  margin-bottom: 1.25rem;
  font-size: 0.85rem;
}

.ipull-sort-control {
  display: flex;
  align-items: center;
  gap: 0.4rem;
}

.ipull-sort-control__label {
  font-size: 0.8rem;
  font-weight: 500;
  color: var(--ipull-muted);
  white-space: nowrap;
}

.ipull-sort-control__select {
  min-width: 90px;
  padding: 0.35rem 1.75rem 0.35rem 0.6rem;
  border-radius: 6px;
  border: 1px solid var(--ipull-border);
  background: #fbfcff url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='10' viewBox='0 0 12 12'%3E%3Cpath fill='%236b7280' d='M3 4.5L6 7.5L9 4.5'/%3E%3C/svg%3E") no-repeat right 0.5rem center;
  background-size: 10px;
  font-size: 0.8rem;
  color: var(--ipull-foreground);
  cursor: pointer;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
  appearance: none;
  -webkit-appearance: none;
}

.ipull-sort-control__select:focus {
  outline: none;
  border-color: var(--ipull-accent);
  box-shadow: 0 0 0 2px rgba(228, 30, 38, 0.1);
}

.ipull-sort-control__select:hover {
  border-color: var(--ipull-accent);
}

/* Responsive sort controls */
@media (max-width: 640px) {
  .ipull-catalog__sort-controls {
    padding: 0.5rem 0.875rem;
    gap: 0.5rem;
    justify-content: space-between;
  }
  
  .ipull-sort-control {
    flex: 1 1 auto;
    min-width: 0;
  }
  
  .ipull-sort-control__label {
    display: none;
  }
  
  .ipull-sort-control__select {
    width: 100%;
    min-width: 0;
  }
}

/* Responsive quick filters */
@media (max-width: 640px) {
  .ipull-catalog__quick-filters {
    flex-direction: column;
    gap: 0.5rem;
  }
  
  .ipull-quick-filter {
    width: 100%;
    flex-direction: row;
    justify-content: space-between;
  }
  
  .ipull-quick-filter__select {
    flex: 1;
    max-width: none;
  }
}

/* Loading overlay for filters */
.ipull-catalog__loading-overlay {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(255, 255, 255, 0.9);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
  z-index: 10;
  border-radius: var(--ipull-radius);
  color: var(--ipull-foreground);
  font-size: 0.95rem;
  font-weight: 500;
}

.ipull-catalog__loading-spinner {
  width: 20px;
  height: 20px;
  border: 2px solid var(--ipull-border);
  border-top-color: var(--ipull-accent);
  border-radius: 50%;
  animation: ipull-spin 0.8s linear infinite;
}

@keyframes ipull-spin {
  to {
    transform: rotate(360deg);
  }
}

.ipull-catalog__search-bar {
  position: relative;
}

.ipull-catalog__filters {
  background: var(--ipull-surface);
  border: 1px solid var(--ipull-border);
  border-radius: var(--ipull-radius);
  padding: 1.75rem;
  box-shadow: var(--ipull-shadow);
  margin-bottom: 2.25rem;
  box-sizing: border-box;
}

.ipull-catalog__filters-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 1.5rem;
}

.ipull-catalog__filter-group {
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
}

.ipull-catalog__filter-label {
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--ipull-muted);
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.ipull-catalog__filter-group > input[type="search"],
.ipull-catalog__filter-group > input[type="text"],
.ipull-catalog__filter-group > select {
  border-radius: 12px;
  border: 1px solid var(--ipull-border);
  padding: 0.75rem 0.9rem;
  font-size: 1rem;
  background: #fbfcff;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.ipull-catalog__filter-group > input[type="search"]:focus,
.ipull-catalog__filter-group > input[type="text"]:focus,
.ipull-catalog__filter-group > input[type="search"]:focus,
.ipull-catalog__filter-group > input[type="text"]:focus,
.ipull-catalog__filter-group > select:focus {
  outline: none;
  border-color: var(--ipull-accent);
  box-shadow: 0 0 0 3px rgba(228, 30, 38, 0.15);
}

/* Multiselect styling */
.ipull-catalog__filter-select {
  border-radius: 12px;
  border: 1px solid var(--ipull-border);
  padding: 0.5rem;
  font-size: 0.95rem;
  background: #fbfcff;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
  min-height: 120px;
}

.ipull-catalog__filter-select:focus {
  outline: none;
  border-color: var(--ipull-accent);
  box-shadow: 0 0 0 3px rgba(228, 30, 38, 0.15);
}

.ipull-catalog__filter-select option {
  padding: 0.5rem 0.75rem;
  border-radius: 6px;
  margin: 0.15rem 0;
}

.ipull-catalog__filter-select option:checked {
  background: linear-gradient(135deg, var(--ipull-accent), var(--ipull-accent-dark));
  color: white;
}

/* Yard Days filter styling */
.ipull-catalog__filter-group--yard-days {
  margin-bottom: 1rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid var(--ipull-border);
}

.ipull-catalog__yard-days-number {
  width: 100%;
  border-radius: 12px;
  border: 1px solid var(--ipull-border);
  padding: 0.75rem 0.9rem;
  font-size: 1rem;
  background: #fbfcff;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.ipull-catalog__yard-days-number:focus {
  outline: none;
  border-color: var(--ipull-accent);
  box-shadow: 0 0 0 3px rgba(228, 30, 38, 0.15);
}

.ipull-catalog__filter-hint {
  font-size: 0.75rem;
  color: var(--ipull-muted);
  margin-top: 0.25rem;
}

.ipull-catalog__filter-options {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
}

.ipull-catalog__filter-option {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.45rem 0.75rem;
  border: 1px solid var(--ipull-border);
  border-radius: 999px;
  background: rgba(248, 249, 251, 0.8);
  font-size: 0.9rem;
  cursor: pointer;
}

.ipull-catalog__filter-option input {
  margin: 0;
  width: 1rem;
  height: 1rem;
}

.ipull-catalog__filter-actions {
  margin-top: 1.75rem;
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
  align-items: center;
}

.ipull-button {
  border-radius: 999px;
  padding: 0.75rem 1.6rem;
  font-size: 0.95rem;
  font-weight: 600;
  border: none;
  cursor: pointer;
  transition: transform 0.15s ease, box-shadow 0.2s ease;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
}

.ipull-button--primary {
  background: linear-gradient(135deg, var(--ipull-accent), var(--ipull-accent-dark));
  color: #fff;
  box-shadow: 0 18px 35px -20px rgba(228, 30, 38, 0.8);
}

.ipull-button--primary:hover {
  transform: translateY(-1px);
}

.ipull-button--secondary {
  background: rgba(228, 30, 38, 0.08);
  color: var(--ipull-accent);
  border: 1px solid rgba(228, 30, 38, 0.35);
}

.ipull-button--link {
  background: transparent;
  color: var(--ipull-muted);
  padding: 0.5rem 1rem;
}

/* Copy URL Button */
.ipull-copy-url-btn {
  white-space: nowrap;
  padding: 0.6rem 1rem;
}

.ipull-copy-url-btn svg {
  flex-shrink: 0;
}

.ipull-copy-url-btn--success {
  background: #d1f4e0 !important;
  color: #0f5132 !important;
  border-color: #a3d9bb !important;
}

.ipull-copy-url-btn--error {
  background: #f8d7da !important;
  color: #721c24 !important;
  border-color: #f1aeb5 !important;
}

.ipull-catalog__grid {
  display: grid;
  gap: 1.75rem;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
}

.ipull-catalog__item {
  background: var(--ipull-surface);
  border-radius: var(--ipull-radius);
  border: 1px solid var(--ipull-border);
  box-shadow: var(--ipull-shadow);
  overflow: hidden;
  position: relative;
  display: flex;
  flex-direction: column;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.ipull-catalog__edit-link {
  position: absolute;
  top: 0.75rem;
  right: 0.75rem;
  z-index: 5;
  width: 2.25rem;
  height: 2.25rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  border: 1px solid rgba(31, 41, 51, 0.15);
  background: rgba(255, 255, 255, 0.95);
  color: var(--ipull-foreground);
  text-decoration: none;
  opacity: 0;
  pointer-events: none;
  transform: translateY(-2px);
  transition: opacity 0.15s ease, transform 0.15s ease, border-color 0.15s ease;
}

.ipull-catalog__item:hover .ipull-catalog__edit-link {
  opacity: 1;
  pointer-events: auto;
  transform: translateY(0);
}

.ipull-catalog__edit-link:hover {
  border-color: rgba(31, 41, 51, 0.35);
}

.ipull-catalog__edit-icon {
  font-size: 1.05rem;
  line-height: 1;
}

.ipull-catalog__item:hover {
  transform: translateY(-4px);
  box-shadow: 0 30px 50px -35px rgba(31, 41, 51, 0.5);
}

.ipull-catalog__media {
  position: relative;
  padding-top: 62%;
  background: var(--ipull-background);
  overflow: hidden;
  cursor: pointer;
}

.ipull-catalog__media img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: contain;
  cursor: pointer;
}

.ipull-catalog__media-placeholder {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--ipull-muted);
  font-style: italic;
  font-size: 0.95rem;
  padding: 1.5rem;
  text-align: center;
}

.ipull-catalog__body {
  padding: 1.4rem 1.5rem 1.6rem;
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.ipull-catalog__title {
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
}

.ipull-catalog__title h3 {
  margin: 0;
  font-size: 1.25rem;
  word-wrap: break-word;
  overflow-wrap: break-word;
  word-break: break-word;
}

.ipull-catalog__stock {
  font-size: 1.1rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  color: var(--ipull-accent);
  word-wrap: break-word;
  overflow-wrap: break-word;
}

.ipull-catalog__specs {
  display: grid;
  gap: 0.35rem 1rem;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  margin: 0;
}

.ipull-catalog__spec {
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
}

.ipull-catalog__spec dt {
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--ipull-muted);
  word-wrap: break-word;
  overflow-wrap: break-word;
}

.ipull-catalog__spec dd {
  margin: 0;
  font-size: 0.95rem;
  font-weight: 600;
  word-wrap: break-word;
  overflow-wrap: break-word;
  word-break: break-word;
  hyphens: auto;
}

.ipull-catalog__description {
  font-size: 0.95rem;
  color: var(--ipull-foreground);
  line-height: 1.55;
}

.ipull-catalog__description p {
  margin: 0 0 0.7rem;
}

.ipull-catalog__description p:last-child {
  margin-bottom: 0;
}

.ipull-catalog__pagination {
  margin-top: 2rem;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1rem;
  flex-wrap: wrap;
}

.ipull-catalog__pagination-status {
  color: var(--ipull-muted);
  font-size: 0.9rem;
}

.ipull-catalog__empty {
  text-align: center;
  padding: 2.5rem;
  background: rgba(255, 255, 255, 0.8);
  border: 1px dashed var(--ipull-border);
  border-radius: var(--ipull-radius);
  font-size: 1rem;
  color: var(--ipull-muted);
}

.ipull-button:hover {
  box-shadow: 0 20px 35px -28px rgba(31, 41, 51, 0.5);
}

/* Pre-pulled parts row */
.ipull-catalog__parts-row {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  margin-top: 0.5rem;
  padding: 0.4rem 0.6rem;
  background: linear-gradient(135deg, #fef3f2 0%, #fef9f8 100%);
  border: 1px solid rgba(228, 30, 38, 0.15);
  border-radius: 8px;
  flex-wrap: wrap;
}

.ipull-catalog__parts-row--compact {
  margin-top: 0.35rem;
  padding: 0.25rem 0.5rem;
}

.ipull-catalog__parts-label {
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--ipull-foreground);
}

.ipull-catalog__parts-trigger {
  padding: 0 !important;
  border: none !important;
  background: transparent !important;
  color: var(--ipull-foreground) !important;
  font-size: 0.8rem !important;
  font-weight: 600 !important;
  cursor: pointer !important;
  text-decoration: underline !important;
  text-underline-offset: 2px !important;
  line-height: inherit !important;
  margin: 0 !important;
}

.ipull-catalog__parts-trigger:hover {
  color: var(--ipull-accent) !important;
}

.ipull-catalog__parts-info {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  width: 16px;
  height: 16px;
  color: var(--ipull-muted);
  cursor: help;
  transition: color 0.2s ease;
}

.ipull-catalog__parts-info:hover {
  color: var(--ipull-accent);
}

.ipull-catalog__parts-info svg {
  display: block;
}

/* Tooltip */
.ipull-catalog__parts-info::after {
  content: attr(data-tooltip);
  position: absolute;
  bottom: calc(100% + 8px);
  left: 50%;
  transform: translateX(-50%);
  width: max-content;
  max-width: 280px;
  padding: 0.6rem 0.8rem;
  background: var(--ipull-foreground);
  color: #fff;
  font-size: 0.8rem;
  font-weight: 400;
  line-height: 1.4;
  border-radius: 8px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity 0.2s ease, visibility 0.2s ease;
  z-index: 9999;
  text-align: left;
  white-space: normal;
}

.ipull-catalog__parts-info::before {
  content: '';
  position: absolute;
  bottom: calc(100% + 2px);
  left: 50%;
  transform: translateX(-50%);
  border: 6px solid transparent;
  border-top-color: var(--ipull-foreground);
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity 0.2s ease, visibility 0.2s ease;
  z-index: 9999;
}

.ipull-catalog__parts-info:hover::after,
.ipull-catalog__parts-info:hover::before {
  opacity: 1;
  visibility: visible;
}

/* Gallery Modal */

.ipull-gallery-modal {
  position: fixed;
  inset: 0;
  z-index: 2147483600;
  display: none;
}

.ipull-gallery-modal.is-open {
  display: block;
}

.ipull-gallery-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(15, 23, 42, 0.85);
  backdrop-filter: blur(4px);
}

.ipull-gallery-frame {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  max-width: min(900px, 90vw);
  width: 100%;
  background: #111827;
  border-radius: 20px;
  overflow: hidden;
  box-shadow: 0 45px 80px -45px rgba(0, 0, 0, 0.6);
  display: flex;
  flex-direction: column;
}

.ipull-gallery-stage {
  position: relative;
  padding-top: 60%;
  background: #0f172a;
}

.ipull-gallery-stage img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.ipull-gallery-meta {
  padding: 1rem 1.2rem;
  color: #e5e7eb;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  font-size: 0.95rem;
}

.ipull-gallery-nav {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  pointer-events: none;
}

.ipull-gallery-button {
  pointer-events: all;
  border: none;
  background: rgba(15, 23, 42, 0.65);
  color: #f9fafb;
  width: 44px;
  height: 44px;
  border-radius: 999px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.3rem;
  cursor: pointer;
  transition: background 0.2s ease;
}

.ipull-gallery-button:hover {
  background: rgba(30, 64, 175, 0.8);
}

.ipull-gallery-close {
  position: absolute;
  top: 1rem;
  right: 1rem;
  background: transparent;
  border: none;
  color: #f9fafb;
  font-size: 1.5rem;
  cursor: pointer;
}

body.ipull-gallery-open {
  overflow: hidden;
}

/* Parts Modal */

.ipull-parts-modal {
  position: fixed;
  inset: 0;
  z-index: 2147483600;
  display: none;
}

.ipull-parts-modal.is-open {
  display: block;
}

.ipull-parts-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(15, 23, 42, 0.85);
  backdrop-filter: blur(4px);
}

.ipull-parts-frame {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  max-width: min(900px, 90vw);
  width: 100%;
  background: #111827;
  border-radius: 20px;
  overflow: hidden;
  box-shadow: 0 45px 80px -45px rgba(0, 0, 0, 0.6);
  display: flex;
  flex-direction: column;
}

.ipull-parts-stage {
  position: relative;
  padding-top: 60%;
  background: #0f172a;
}

.ipull-parts-stage img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.ipull-parts-empty {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #e5e7eb;
  padding: 1.25rem;
  text-align: center;
}

.ipull-parts-meta {
  padding: 1rem 1.2rem;
  color: #e5e7eb;
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 1rem;
  font-size: 0.95rem;
}

.ipull-parts-title {
  font-weight: 700;
  margin-bottom: 0.25rem;
}

.ipull-parts-price {
  font-size: 1.25rem;
  font-weight: 600;
  color: #22c55e;
  margin-bottom: 0.5rem;
}

.ipull-parts-description {
  color: #cbd5e1;
  line-height: 1.45;
}

.ipull-parts-controls {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 0.5rem;
}

.ipull-parts-select {
  max-width: 220px;
  width: 100%;
  background: rgba(15, 23, 42, 0.65);
  color: #f9fafb;
  border: 1px solid rgba(148, 163, 184, 0.35);
  border-radius: 10px;
  padding: 0.4rem 0.6rem;
}

.ipull-parts-counter {
  color: #cbd5e1;
}

.ipull-parts-nav {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  pointer-events: none;
}

.ipull-parts-button {
  pointer-events: all;
  border: none;
  background: rgba(15, 23, 42, 0.65);
  color: #f9fafb;
  width: 44px;
  height: 44px;
  border-radius: 999px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.3rem;
  cursor: pointer;
  transition: background 0.2s ease;
}

.ipull-parts-button:hover {
  background: rgba(30, 64, 175, 0.8);
}

.ipull-parts-close {
  position: absolute;
  top: 1rem;
  right: 1rem;
  background: transparent;
  border: none;
  color: #f9fafb;
  font-size: 1.5rem;
  cursor: pointer;
}

body.ipull-parts-open {
  overflow: hidden;
}

/* Modal Styles */
.ipull-catalog__modal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 2147483600;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 1rem;
  box-sizing: border-box;
}

.ipull-catalog__modal.show {
  display: flex;
}

.ipull-catalog__modal-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(15, 23, 42, 0.75);
  backdrop-filter: blur(4px);
}

.ipull-catalog__modal-content {
  position: relative;
  background: var(--ipull-surface);
  border-radius: var(--ipull-radius);
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
  max-width: 600px;
  width: 100%;
  max-height: 85vh;
  display: flex;
  flex-direction: column;
  z-index: 1;
}

.ipull-catalog__modal-header {
  padding: 1.5rem 2rem;
  border-bottom: 1px solid var(--ipull-border);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.ipull-catalog__modal-header h3 {
  margin: 0;
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--ipull-foreground);
}

.ipull-catalog__modal-close {
  background: transparent;
  border: none;
  font-size: 1.75rem;
  color: var(--ipull-muted);
  cursor: pointer;
  padding: 0;
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 6px;
  transition: background 0.2s ease, color 0.2s ease;
}

.ipull-catalog__modal-close:hover {
  background: rgba(0, 0, 0, 0.05);
  color: var(--ipull-foreground);
}

.ipull-catalog__modal-body {
  padding: 2rem;
  overflow-y: auto;
  flex: 1;
}

.ipull-catalog__modal-footer {
  padding: 1.25rem 2rem;
  border-top: 1px solid var(--ipull-border);
  display: flex;
  gap: 1rem;
  justify-content: flex-end;
  flex-wrap: wrap;
}

.ipull-catalog__modal-footer .ipull-button {
  white-space: nowrap;
}

.ipull-catalog__modal-footer .ipull-button--link {
  color: var(--ipull-muted) !important;
  background: transparent !important;
  border: none !important;
  padding: 0.75rem 1.2rem !important;
}

.ipull-catalog__modal-footer .ipull-button--link:hover {
  color: var(--ipull-foreground) !important;
  background: rgba(0, 0, 0, 0.05) !important;
}

/* View Toggle Buttons (in sort controls bar, right-aligned) */
.ipull-catalog__view-toggle {
  display: flex;
  gap: 0.35rem;
  align-items: center;
  margin-left: auto;
}

.ipull-view-btn {
  background: #fbfcff;
  border: 1px solid var(--ipull-border);
  padding: 0.35rem 0.5rem;
  border-radius: 6px;
  cursor: pointer;
  transition: all 0.2s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--ipull-muted);
  height: auto;
  line-height: 1;
}

.ipull-view-btn:hover {
  background: rgba(0, 0, 0, 0.03);
  border-color: var(--ipull-accent);
  color: var(--ipull-foreground);
}

.ipull-view-btn.active {
  background: linear-gradient(135deg, var(--ipull-accent), var(--ipull-accent-dark));
  border-color: var(--ipull-accent);
  color: white;
}

.ipull-view-btn svg {
  width: 16px;
  height: 16px;
  fill: currentColor;
  display: block;
}

/* Table View Styles */
.ipull-catalog__table-wrapper {
  background: var(--ipull-surface);
  border: 1px solid var(--ipull-border);
  border-radius: var(--ipull-radius);
  padding: 1.5rem;
  box-shadow: var(--ipull-shadow);
  overflow-x: auto;
  margin-bottom: 2rem;
}

.ipull-catalog__table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.95rem;
}

.ipull-catalog__table thead {
  background: rgba(0, 0, 0, 0.02);
  border-bottom: 2px solid var(--ipull-border);
}

.ipull-catalog__table th {
  padding: 1rem 1.25rem;
  text-align: left;
  font-weight: 600;
  color: var(--ipull-foreground);
  text-transform: uppercase;
  font-size: 0.8rem;
  letter-spacing: 0.05em;
  white-space: nowrap;
}

.ipull-catalog__table-th-vehicle {
  width: 140px;
}

.ipull-catalog__table-th-details {
  width: auto;
}

.ipull-catalog__table td {
  padding: 1rem 1.25rem;
  border-bottom: 1px solid var(--ipull-border);
  color: var(--ipull-foreground);
  vertical-align: top;
}

.ipull-catalog__table tbody tr {
  transition: background 0.15s ease;
}

/* Override grid item styles for table rows */
.ipull-catalog__table .ipull-catalog__item {
  display: table-row;
  background: transparent;
  border: none;
  border-radius: 0;
  box-shadow: none;
  overflow: visible;
  transform: none !important;
}

.ipull-catalog__table .ipull-catalog__item:hover {
  transform: none !important;
  box-shadow: none !important;
}

.ipull-catalog__table tbody tr:hover {
  background: rgba(228, 30, 38, 0.03);
}

.ipull-catalog__table tbody tr:last-child td {
  border-bottom: none;
}

.ipull-catalog__table td strong {
  color: var(--ipull-accent);
  font-weight: 600;
}

/* Table vehicle cell */
.ipull-catalog__table-vehicle {
  width: 140px;
  padding: 0.75rem !important;
}

.ipull-catalog__table-vehicle .ipull-catalog__gallery-trigger {
  display: block;
  cursor: pointer;
  border-radius: 8px;
  overflow: hidden;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  margin-bottom: 0.5rem;
}

.ipull-catalog__table-vehicle .ipull-catalog__gallery-trigger:hover {
  transform: scale(1.05);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.ipull-catalog__table-vehicle img {
  width: 100%;
  height: 70px;
  object-fit: cover;
  display: block;
  border-radius: 6px;
}

.ipull-catalog__table-vehicle-name {
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--ipull-accent);
  margin: 0.5rem 0 0;
  padding: 0;
}

/* Table details cell with specs grid */
.ipull-catalog__table-details {
  width: auto;
}

.ipull-catalog__table-specs {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 0.5rem 1.5rem;
  margin: 0;
  padding: 0;
}

.ipull-catalog__table-spec {
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
  padding: 0.35rem 0;
}

.ipull-catalog__table-spec dt {
  font-size: 0.7rem;
  font-weight: 600;
  color: var(--ipull-muted);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.ipull-catalog__table-spec dd {
  margin: 0;
  font-size: 0.9rem;
  color: var(--ipull-foreground);
  font-weight: 500;
}

.ipull-catalog__table-image-placeholder {
  width: 100%;
  height: 70px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.75rem;
  color: var(--ipull-muted);
  background: var(--ipull-background);
  border-radius: 6px;
  font-style: italic;
}

/* Constrain grid items to max width */
.ipull-catalog__grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 20px;
  max-width: 100%;
}

.ipull-catalog__grid .ipull-catalog__item {
  max-width: 500px;
  width: 100%;
  justify-self: center;
}

@media (max-width: 768px) {
  .ipull-catalog {
    padding: 0 1rem 2.5rem;
  }

  .ipull-catalog__search-bar {
    flex-direction: column;
    align-items: stretch;
    gap: 0.75rem;
    padding: 1rem;
  }

  .ipull-catalog__search-group {
    flex: 1 1 100%;
    min-width: 0;
    width: 100%;
  }

  .ipull-catalog__search-group input[type="search"] {
    flex: 1;
    min-width: 0;
  }

  .ipull-catalog__filter-buttons {
    width: 100%;
    justify-content: space-between;
  }

  .ipull-catalog__filter-buttons .ipull-button {
    flex: 1;
  }

  .ipull-copy-url-btn {
    width: 100%;
    justify-content: center;
  }

  .ipull-copy-url-btn span {
    display: inline;
  }

  .ipull-catalog__filters {
    padding: 1.25rem;
  }

  .ipull-catalog__filters-grid {
    grid-template-columns: 1fr;
  }

  .ipull-catalog__grid {
    grid-template-columns: 1fr;
  }

  .ipull-gallery-frame {
    max-width: 94vw;
  }

  .ipull-parts-frame {
    max-width: 94vw;
  }

  .ipull-catalog__modal-content {
    max-width: 95%;
  }

  .ipull-catalog__modal-header,
  .ipull-catalog__modal-body,
  .ipull-catalog__modal-footer {
    padding: 1.25rem 1.5rem;
  }

  .ipull-catalog__table-wrapper {
    padding: 1rem;
  }

  .ipull-catalog__table-specs {
    grid-template-columns: 1fr 1fr;
    gap: 0.5rem 1rem;
  }

  .ipull-view-btn {
    padding: 0.3rem 0.4rem;
  }
  
  .ipull-view-btn svg {
    width: 14px;
    height: 14px;
  }
}

@media (max-width: 480px) {
  .ipull-catalog__search-bar {
    padding: 0.75rem;
  }

  .ipull-catalog__search-group {
    flex-direction: column;
  }

  .ipull-catalog__search-group input[type="search"] {
    width: 100%;
  }

  .ipull-catalog__search-submit {
    width: 100%;
  }

  .ipull-catalog__table-specs {
    grid-template-columns: 1fr;
  }

  .ipull-catalog__table-image {
    width: 70px;
    padding: 0.5rem !important;
  }

  .ipull-catalog__table-vehicle img {
    height: 50px;
  }

  .ipull-catalog__table th,
  .ipull-catalog__table td {
    padding: 0.75rem;
  }
}

/* Export Modal Styles */
.ipull-export__section {
  margin-bottom: 1.5rem;
}

.ipull-export__section:last-of-type {
  margin-bottom: 0;
}

.ipull-export__label {
  display: block;
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--ipull-muted);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-bottom: 0.75rem;
}

.ipull-export__formats {
  display: flex;
  gap: 1rem;
  justify-content: center;
}

.ipull-export__format-btn {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
  padding: 1.25rem 1.5rem;
  border: 2px solid var(--ipull-border);
  border-radius: var(--ipull-radius);
  background: var(--ipull-surface);
  cursor: pointer;
  transition: all 0.2s ease;
  min-width: 90px;
}

.ipull-export__format-btn:hover {
  border-color: var(--ipull-accent);
  background: rgba(228, 30, 38, 0.05);
}

.ipull-export__format-btn.selected {
  border-color: var(--ipull-accent);
  background: rgba(228, 30, 38, 0.1);
  box-shadow: 0 0 0 3px rgba(228, 30, 38, 0.15);
}

.ipull-export__format-btn svg {
  color: var(--ipull-muted);
  transition: color 0.2s ease;
}

.ipull-export__format-btn:hover svg,
.ipull-export__format-btn.selected svg {
  color: var(--ipull-accent);
}

.ipull-export__format-btn span {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--ipull-foreground);
}

.ipull-export__email-input {
  width: 100%;
  padding: 0.75rem 1rem;
  border: 1px solid var(--ipull-border);
  border-radius: 12px;
  font-size: 1rem;
  background: #fbfcff;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
  box-sizing: border-box;
}

.ipull-export__email-input:focus {
  outline: none;
  border-color: var(--ipull-accent);
  box-shadow: 0 0 0 3px rgba(228, 30, 38, 0.15);
}

.ipull-export__email-input::placeholder {
  color: var(--ipull-muted);
  opacity: 0.7;
}

.ipull-export__status {
  padding: 0.75rem 1rem;
  border-radius: 8px;
  font-size: 0.9rem;
  text-align: center;
  display: none;
}

.ipull-export__status.show {
  display: block;
}

.ipull-export__status.success {
  background: rgba(34, 197, 94, 0.1);
  color: #15803d;
  border: 1px solid rgba(34, 197, 94, 0.3);
}

.ipull-export__status.error {
  background: rgba(239, 68, 68, 0.1);
  color: #dc2626;
  border: 1px solid rgba(239, 68, 68, 0.3);
}

.ipull-export__status.loading {
  background: rgba(59, 130, 246, 0.1);
  color: #2563eb;
  border: 1px solid rgba(59, 130, 246, 0.3);
}

.ipull-export__send-email-btn:disabled,
.ipull-export__download-btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.ipull-export__send-email-btn:disabled:hover,
.ipull-export__download-btn:disabled:hover {
  transform: none;
}

@media (max-width: 480px) {
  .ipull-export__formats {
    flex-direction: column;
  }
  
  .ipull-export__format-btn {
    flex-direction: row;
    justify-content: flex-start;
    gap: 1rem;
    padding: 1rem;
    min-width: auto;
  }
}

