/*
Theme Name: Petmarketim Advanced Search Child
Theme URI: https://petmarketim.net
Description: Petmarketim ana temasını bozmadan gelişmiş WooCommerce canlı arama katmanı ekler.
Author: Petmarketim
Template: petmarketim
Version: 1.0.0
Text Domain: petmarketim-search-child
*/

:root{--pm-search-bg:#fff;--pm-search-text:#171717;--pm-search-muted:#6b7280;--pm-search-border:#e6e7eb;--pm-search-soft:#f7f8fa;--pm-search-accent:#111827;--pm-search-success:#0b7a33}
.pm-search-lock{overflow:hidden!important}
#pm-advanced-search{position:fixed;inset:0;z-index:2147483000;display:none;font-family:inherit;color:var(--pm-search-text)}
#pm-advanced-search.pm-open{display:block}
.pm-search-backdrop{position:absolute;inset:0;background:rgba(10,13,18,.56);backdrop-filter:blur(3px);-webkit-backdrop-filter:blur(3px)}
.pm-search-panel{position:relative;width:min(1240px,calc(100vw - 48px));height:min(860px,calc(100vh - 48px));margin:24px auto;background:var(--pm-search-bg);border-radius:28px;box-shadow:0 24px 90px rgba(0,0,0,.28);overflow:hidden;display:flex;flex-direction:column}
.pm-search-top{display:flex;align-items:center;gap:14px;padding:18px 22px;border-bottom:1px solid var(--pm-search-border);background:#fff}
.pm-search-input-wrap{position:relative;flex:1;display:flex;align-items:center;background:#fff;border:1.5px solid #d9dce2;border-radius:20px;min-height:62px;box-shadow:0 4px 18px rgba(17,24,39,.04)}
.pm-search-icon{width:24px;height:24px;margin-left:20px;flex:0 0 auto;color:#111}
#pm-search-input{width:100%;height:60px;border:0!important;outline:0!important;box-shadow:none!important;background:transparent!important;padding:0 54px 0 14px!important;font:inherit;font-size:22px!important;line-height:1.2;color:#111!important;border-radius:20px!important}
#pm-search-input::placeholder{color:#8a8d94}
.pm-search-clear{position:absolute;right:12px;top:50%;transform:translateY(-50%);border:0;background:#f1f2f4;color:#444;width:34px;height:34px;border-radius:50%;display:none;align-items:center;justify-content:center;font-size:20px;cursor:pointer}
.pm-search-clear.pm-show{display:flex}
.pm-search-close{width:48px;height:48px;border-radius:50%;border:1px solid var(--pm-search-border);background:#fff;display:flex;align-items:center;justify-content:center;font-size:28px;line-height:1;cursor:pointer;color:#222;transition:.18s ease}
.pm-search-close:hover{background:#f4f5f7;transform:rotate(3deg)}
.pm-search-body{overflow:auto;overscroll-behavior:contain;padding:28px 32px 34px;scrollbar-width:thin}
.pm-search-section{margin-bottom:30px}
.pm-search-section:last-child{margin-bottom:0}
.pm-search-section-head{display:flex;align-items:center;justify-content:space-between;gap:12px;margin:0 0 16px}
.pm-search-title{font-size:28px;line-height:1.15;font-weight:800;margin:0;color:#171717}
.pm-search-subtitle{font-size:14px;color:var(--pm-search-muted)}
.pm-chip-grid{display:flex;flex-wrap:wrap;gap:12px}
.pm-search-chip{appearance:none;border:1px solid #dedfe3;background:#fff;color:#222;border-radius:12px;padding:13px 18px;display:inline-flex;align-items:center;gap:10px;font:inherit;font-size:17px;line-height:1;cursor:pointer;transition:.16s ease;min-height:48px}
.pm-search-chip:hover{border-color:#aeb2ba;background:#f8f9fa;transform:translateY(-1px)}
.pm-chip-dot{width:19px;height:19px;border:2px solid #686b70;border-radius:50%;position:relative;display:inline-block;flex:0 0 auto}
.pm-chip-dot:after{content:"";position:absolute;width:7px;height:2px;background:#686b70;right:-5px;bottom:-2px;transform:rotate(45deg);border-radius:2px}
.pm-search-recent{display:none}
.pm-search-recent.pm-show{display:block}
.pm-search-products{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:14px}
.pm-product-card{border:1px solid #e3e4e7;border-radius:16px;background:#fff;padding:13px;display:grid;grid-template-columns:92px minmax(0,1fr);gap:14px;min-height:154px;text-decoration:none!important;color:inherit!important;transition:.18s ease;position:relative;overflow:hidden}
.pm-product-card:hover{border-color:#c8cbd1;box-shadow:0 10px 30px rgba(17,24,39,.08);transform:translateY(-1px)}
.pm-product-img{width:92px;height:112px;object-fit:contain;border-radius:10px;background:#fafafa;align-self:center}
.pm-product-info{min-width:0;display:flex;flex-direction:column;padding:2px 0}
.pm-product-name{font-size:16px;font-weight:700;line-height:1.35;color:#202124;display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden;min-height:43px}
.pm-product-rating{margin-top:6px;font-size:13px;color:#555;white-space:nowrap}
.pm-stars{color:#f5a400;letter-spacing:-1px;margin-right:5px}
.pm-product-prices{margin-top:auto;display:flex;align-items:baseline;gap:8px;flex-wrap:wrap}
.pm-price-current{font-size:18px;font-weight:800;color:#111}
.pm-price-old{font-size:13px;color:#8c8f96;text-decoration:line-through}
.pm-product-actions{margin-top:8px;display:flex;align-items:center;gap:8px}
.pm-cart-btn,.pm-product-go{appearance:none;border:1px solid #ccd0d6;background:#fff;border-radius:10px;min-height:36px;padding:7px 11px;font:inherit;font-size:13px;font-weight:700;color:#222;cursor:pointer;text-decoration:none!important;display:inline-flex;align-items:center;justify-content:center;transition:.16s ease}
.pm-cart-btn:hover,.pm-product-go:hover{background:#111;color:#fff;border-color:#111}
.pm-cart-btn.pm-added{background:#e9f8ee;border-color:#8bd2a2;color:#08712e}
.pm-stock{font-size:12px;color:var(--pm-search-success);font-weight:700}
.pm-search-result-meta{display:flex;gap:10px;align-items:center;flex-wrap:wrap;margin:-3px 0 17px}
.pm-result-count{color:#6b7280;font-size:14px}
.pm-search-empty{border:1px dashed #d6d8dc;border-radius:16px;padding:32px;text-align:center;background:#fafbfc;color:#5e6269}
.pm-search-empty strong{display:block;font-size:20px;color:#222;margin-bottom:6px}
.pm-search-skeletons{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:14px}
.pm-skeleton{height:154px;border-radius:16px;background:linear-gradient(90deg,#f1f2f4 25%,#fafafa 37%,#f1f2f4 63%);background-size:400% 100%;animation:pmShimmer 1.2s ease infinite}
@keyframes pmShimmer{0%{background-position:100% 0}100%{background-position:0 0}}
.pm-search-viewall{display:inline-flex;margin-top:16px;border-radius:12px;padding:11px 16px;border:1px solid #d8dadd;background:#fff;color:#111!important;text-decoration:none!important;font-weight:700}
.pm-search-viewall:hover{background:#111;color:#fff!important;border-color:#111}
.pm-search-kbd{font-size:12px;color:#777;border:1px solid #dfe1e5;border-bottom-width:2px;border-radius:6px;padding:3px 7px;background:#fafafa;white-space:nowrap}

/* Var olan tema arama alanlarını daha modern göstermek; JS bunları gelişmiş panele bağlar. */
header input[type="search"],.site-header input[type="search"],#masthead input[type="search"],.woocommerce-product-search .search-field{border-radius:999px!important;cursor:text}

@media(max-width:980px){
  .pm-search-products,.pm-search-skeletons{grid-template-columns:repeat(2,minmax(0,1fr))}
}
@media(max-width:680px){
  .pm-search-panel{width:100vw;height:100dvh;margin:0;border-radius:0}
  .pm-search-top{padding:10px 10px 10px 12px;gap:8px;position:sticky;top:0;z-index:4}
  .pm-search-input-wrap{min-height:52px;border-radius:15px}
  #pm-search-input{height:50px!important;font-size:17px!important;padding-right:42px!important}
  .pm-search-icon{width:20px;height:20px;margin-left:14px}
  .pm-search-clear{right:7px;width:32px;height:32px}
  .pm-search-close{width:42px;height:42px;font-size:24px}
  .pm-search-body{padding:20px 16px 30px}
  .pm-search-title{font-size:22px}
  .pm-search-section{margin-bottom:24px}
  .pm-search-chip{font-size:15px;padding:11px 14px;min-height:44px;border-radius:10px}
  .pm-search-products,.pm-search-skeletons{grid-template-columns:1fr}
  .pm-product-card{grid-template-columns:82px minmax(0,1fr);min-height:138px;padding:11px}
  .pm-product-img{width:82px;height:100px}
  .pm-search-kbd{display:none}
}
