/* ============================================
   SHR Autoparts - Curated Frontend Enhancements
   Deployed: 2026-07-09
   Scope: search UI + shortcode styles (from shr-quick-search.php)
          + safe WooCommerce store UI polish.
   Note: Redesign-specific (.shr-home / .hero-bg / card) rules from the
   original April CSS are intentionally excluded — the live site uses the
   shr-autoparts-v2 theme, and those selectors would not apply or could
   conflict. Re-add them only if the .shr-home template is reactivated.
   ============================================ */

/* ============================================
   1. STORE NOTICE (EU VAT / promo bar)
   ============================================ */
.woocommerce-store-notice,
.store-notice,
.pinline-notice {
  position: relative !important;
  z-index: 9999 !important;
}

body.has-store-notice .site-header,
body.has-store-notice #masthead {
  margin-top: 0 !important;
}

.woocommerce-store-notice {
  font-size: 13px !important;
  padding: 8px 15px !important;
  line-height: 1.4 !important;
  background: #1e40af !important;
  color: #ffffff !important;
  text-align: center !important;
}

.woocommerce-store-notice a {
  color: #bfdbfe !important;
  text-decoration: underline !important;
}

/* ============================================
   2. HEADER SEARCH TOGGLE + MODAL SEARCH UI
   (consumed by shr-quick-search.php)
   ============================================ */
.header-search-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: 10px;
  transition: all 0.25s ease;
  background: rgba(255,255,255,0.1);
  border: 1px solid rgba(255,255,255,0.15);
  color: #ffffff;
  cursor: pointer;
  font-size: 16px;
}

.home #masthead:not(.item-is-fixed) .header-search-toggle {
  color: #ffffff;
  background: rgba(255,255,255,0.1);
  border-color: rgba(255,255,255,0.15);
}

.kadence-sticky-header.item-is-fixed:not(.item-at-start) .header-search-toggle,
body:not(.home) .header-search-toggle {
  color: #334155;
  background: #f1f5f9;
  border-color: #e2e8f0;
}

.header-search-toggle:hover {
  background: rgba(37, 99, 235, 0.1);
  border-color: rgba(37, 99, 235, 0.3);
  color: #2563eb;
}

.shr-search-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(15, 23, 42, 0.85);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  z-index: 99999;
  display: flex;
  align-items: flex-start;
  justify-content: center;
  padding-top: 15vh;
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s ease;
}

.shr-search-overlay.active {
  opacity: 1;
  visibility: visible;
}

.shr-search-container {
  width: 90%;
  max-width: 720px;
  transform: translateY(-20px);
  transition: transform 0.3s ease;
}

.shr-search-overlay.active .shr-search-container {
  transform: translateY(0);
}

.shr-search-input-wrap {
  position: relative;
  background: #ffffff;
  border-radius: 16px;
  box-shadow: 0 25px 50px rgba(0,0,0,0.25);
  overflow: hidden;
}

.shr-search-input-wrap input[type="text"] {
  width: 100%;
  padding: 20px 60px 20px 56px;
  font-size: 18px;
  font-family: 'Inter', system-ui, sans-serif;
  border: none;
  outline: none;
  background: transparent;
  color: #1e293b;
}

.shr-search-input-wrap input[type="text"]::placeholder {
  color: #94a3b8;
}

.shr-search-icon {
  position: absolute;
  left: 18px;
  top: 50%;
  transform: translateY(-50%);
  color: #94a3b8;
  font-size: 18px;
}

.shr-search-close {
  position: absolute;
  right: 12px;
  top: 50%;
  transform: translateY(-50%);
  width: 36px;
  height: 36px;
  border-radius: 8px;
  background: #f1f5f9;
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #64748b;
  font-size: 14px;
  transition: all 0.2s ease;
}

.shr-search-close:hover {
  background: #e2e8f0;
  color: #334155;
}

.shr-search-results {
  background: #ffffff;
  border-radius: 0 0 16px 16px;
  border-top: 1px solid #f1f5f9;
  max-height: 400px;
  overflow-y: auto;
}

.shr-search-results .search-result-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 18px;
  border-bottom: 1px solid #f8fafc;
  transition: background 0.15s ease;
  text-decoration: none;
  color: #1e293b;
}

.shr-search-results .search-result-item:hover {
  background: #f8fafc;
}

.shr-search-results .search-result-item img {
  width: 48px;
  height: 48px;
  object-fit: contain;
  border-radius: 8px;
  background: #f8fafc;
  padding: 4px;
}

.shr-search-results .result-title {
  font-weight: 600;
  font-size: 14px;
  color: #1e293b;
}

.shr-search-results .result-sku {
  font-size: 12px;
  color: #2563eb;
  font-weight: 500;
}

.shr-search-results .result-category {
  font-size: 12px;
  color: #64748b;
}

.shr-search-hint {
  text-align: center;
  padding: 16px;
  color: #94a3b8;
  font-size: 14px;
}

.shr-search-hint kbd {
  background: #f1f5f9;
  padding: 2px 8px;
  border-radius: 4px;
  font-size: 12px;
  border: 1px solid #e2e8f0;
}

/* ============================================
   3. PRODUCT QUICK-BUY + SEARCH TAG SHORTCODES
   (consumed by [shr_quick_buy] / [shr_search_tag])
   ============================================ */
.shr-product-quick-buy {
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  padding: 20px;
  display: flex;
  align-items: center;
  gap: 16px;
  transition: all 0.3s ease;
  text-decoration: none !important;
  color: #1e293b !important;
}

.shr-product-quick-buy:hover {
  border-color: #bfdbfe;
  box-shadow: 0 8px 24px rgba(37, 99, 235, 0.1);
  transform: translateY(-2px);
}

.shr-product-quick-buy img {
  width: 80px;
  height: 80px;
  object-fit: contain;
  border-radius: 8px;
  background: #f8fafc;
  padding: 6px;
  flex-shrink: 0;
}

.shr-product-quick-buy .quick-buy-info {
  flex: 1;
}

.shr-product-quick-buy .quick-buy-title {
  font-weight: 700;
  font-size: 15px;
  color: #1e293b;
  margin-bottom: 4px;
}

.shr-product-quick-buy .quick-buy-sku {
  font-size: 13px;
  color: #2563eb;
  font-weight: 500;
}

.shr-product-quick-buy .quick-buy-vehicle {
  font-size: 12px;
  color: #64748b;
  margin-top: 2px;
}

.shr-product-quick-buy .quick-buy-btn {
  background: linear-gradient(135deg, #2563eb, #1d4ed8);
  color: #ffffff !important;
  font-weight: 600;
  font-size: 13px;
  padding: 8px 16px;
  border-radius: 8px;
  white-space: nowrap;
  flex-shrink: 0;
}

.shr-product-tag {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: #eff6ff;
  border: 1px solid #bfdbfe;
  color: #1d4ed8;
  padding: 4px 10px;
  border-radius: 6px;
  font-size: 13px;
  font-weight: 600;
  text-decoration: none !important;
  transition: all 0.2s ease;
}

.shr-product-tag:hover {
  background: #dbeafe;
  border-color: #93c5fd;
}

/* ============================================
   4. WOOCOMMERCE STORE UI POLISH (safe, global)
   ============================================ */
body:not(.home) .products .product {
  border-radius: 12px !important;
  overflow: hidden !important;
}

body:not(.home) .products .product .woocommerce-loop-product__title {
  font-weight: 700 !important;
  font-size: 14px !important;
  color: #1e293b !important;
  line-height: 1.4 !important;
}

body:not(.home) .products .product .price {
  color: #2563eb !important;
  font-weight: 700 !important;
}

.woocommerce-breadcrumb {
  font-size: 13px !important;
  color: #64748b !important;
}

.woocommerce-breadcrumb a {
  color: #2563eb !important;
  text-decoration: none !important;
}

.woocommerce-breadcrumb a:hover {
  text-decoration: underline !important;
}

.single-product .product_title {
  font-size: 1.75rem !important;
  font-weight: 800 !important;
  color: #1e293b !important;
  letter-spacing: -0.01em !important;
}

.single-product .price {
  font-size: 1.25rem !important;
  font-weight: 700 !important;
}

.single-product .woocommerce-product-details__short-description {
  color: #475569 !important;
  line-height: 1.7 !important;
}

.search-results .product .woocommerce-loop-product__title {
  font-size: 14px !important;
}

@keyframes shrPulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.4; }
}

.shr-search-loading {
  animation: shrPulse 1.5s infinite;
}
