/*
 * World Cellular — Enhanced Search Styles
 * File: custom.css  (upload to WebDAV /content/css/custom.css)
 *
 * ZERO-MAINTENANCE: WebDAV files are completely outside the theme.
 * Flair theme updates never touch WebDAV. This file never needs re-applying.
 *
 * Prerequisite: BC Theme Editor → Header & Footer → enable
 * "Custom store CSS" toggle → this loads the file automatically.
 *
 * If you already have a custom.css, paste everything below the last line
 * of your existing file.
 */

:root {
  --wcs-accent:      #c0392b;   /* World Cellular red — matches logo */
  --wcs-bg:          #ffffff;
  --wcs-border:      rgba(0,0,0,0.10);
  --wcs-shadow:      0 8px 28px rgba(0,0,0,0.12), 0 2px 8px rgba(0,0,0,0.06);
  --wcs-text:        #1a1d24;
  --wcs-subtext:     #6c757d;
  --wcs-hover:       #f5f7fa;
  --wcs-focus-bg:    #fdf2f2;
  --wcs-mark-bg:     rgba(255,235,100,0.65);
  --wcs-thumb:       44px;
  --wcs-radius:      6px;
  --wcs-anim:        150ms ease;
}

.wcs-dropdown {
  background: var(--wcs-bg);
  border: 1px solid var(--wcs-border);
  border-top: none;
  box-shadow: var(--wcs-shadow);
  display: none;
  left: 0;
  max-height: 520px;
  overflow-y: auto;
  overscroll-behavior: contain;
  position: absolute;
  right: 3.25rem;
  top: 100%;
  z-index: 1001;
  animation: wcsIn var(--wcs-anim) both;
}

.wcs-dropdown--open { display: block; }

@keyframes wcsIn {
  from { opacity: 0; transform: translateY(-4px); }
  to   { opacity: 1; transform: translateY(0); }
}

.wcs-dropdown::-webkit-scrollbar       { width: 4px; }
.wcs-dropdown::-webkit-scrollbar-track { background: transparent; }
.wcs-dropdown::-webkit-scrollbar-thumb { background: rgba(0,0,0,0.12); border-radius: 2px; }

.wcs-head {
  color: var(--wcs-subtext);
  font-size: 0.67rem;
  font-weight: 700;
  letter-spacing: 0.09em;
  padding: 12px 14px 4px;
  text-transform: uppercase;
}
.wcs-head:first-child { padding-top: 14px; }

.wcs-item {
  align-items: center;
  border-radius: var(--wcs-radius);
  color: var(--wcs-text);
  cursor: pointer;
  display: flex;
  gap: 10px;
  margin: 2px 6px;
  padding: 8px 10px;
  text-decoration: none;
  transition: background var(--wcs-anim);
}
.wcs-item:hover { background: var(--wcs-hover); text-decoration: none; }
.wcs-item.wcs-item--focus {
  background: var(--wcs-focus-bg);
  border-left: 3px solid var(--wcs-accent);
  padding-left: 7px;
  text-decoration: none;
}

.wcs-item__body {
  display: flex; flex: 1; flex-direction: column; gap: 2px; min-width: 0;
}
.wcs-item__name {
  color: var(--wcs-text);
  font-size: 0.875rem;
  font-weight: 600;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.wcs-item__name mark {
  background: var(--wcs-mark-bg);
  border-radius: 2px;
  color: inherit;
  font-style: normal;
  padding: 0 2px;
}
.wcs-item__sub { color: var(--wcs-subtext); font-size: 0.74rem; }
.wcs-item__meta { align-items: center; display: flex; flex-wrap: wrap; gap: 6px; }

.wcs-arrow {
  color: #ccc;
  flex-shrink: 0;
  font-size: 1rem;
  transition: transform var(--wcs-anim), color var(--wcs-anim);
}
.wcs-item:hover .wcs-arrow,
.wcs-item--focus .wcs-arrow { color: var(--wcs-accent); transform: translateX(3px); }

.wcs-icon {
  align-items: center;
  border-radius: 8px;
  display: flex;
  flex-shrink: 0;
  height: 34px;
  justify-content: center;
  width: 34px;
}
.wcs-icon svg { height: 17px; width: 17px; }
.wcs-icon--cat   { background: rgba(192,57,43,0.08); color: var(--wcs-accent); }
.wcs-icon--brand { background: rgba(0,0,0,0.06); color: var(--wcs-text); }

.wcs-thumb {
  background: #fafafa;
  border: 1px solid var(--wcs-border);
  border-radius: var(--wcs-radius);
  flex-shrink: 0;
  height: var(--wcs-thumb);
  object-fit: contain;
  width: var(--wcs-thumb);
}
.wcs-thumb--blank { background: #f0f2f5; }

.wcs-sku {
  background: rgba(0,0,0,0.05);
  border-radius: 3px;
  color: var(--wcs-subtext);
  font-family: monospace;
  font-size: 0.72rem;
  padding: 1px 5px;
}
.wcs-sku mark { background: var(--wcs-mark-bg); font-style: normal; }

.wcs-subcat {
  background: rgba(192,57,43,0.07);
  border-radius: 3px;
  color: var(--wcs-accent);
  font-size: 0.70rem;
  font-weight: 600;
  padding: 1px 6px;
}

.wcs-price        { color: var(--wcs-text); font-size: 0.8rem; font-weight: 600; }
.wcs-price--sale  { color: #c0392b; }
.wcs-price--was   { color: var(--wcs-subtext); font-weight: 400; text-decoration: line-through; }
.wcs-price--login { color: var(--wcs-subtext); font-size: 0.72rem; font-weight: 400; }

.wcs-empty {
  color: var(--wcs-subtext);
  font-size: 0.875rem;
  padding: 18px 14px;
  text-align: center;
}
.wcs-empty strong { color: var(--wcs-text); }

.wcs-all {
  border-top: 1px solid var(--wcs-border);
  color: var(--wcs-accent);
  display: block;
  font-size: 0.8rem;
  font-weight: 700;
  margin-top: 4px;
  padding: 10px 14px 12px;
  text-align: center;
  text-decoration: none;
  transition: background var(--wcs-anim);
}
.wcs-all:hover { background: var(--wcs-hover); text-decoration: underline; }

@media (max-width: 767px) {
  .wcs-dropdown { left: -10px; right: -10px; max-height: 65vh; }
  :root { --wcs-thumb: 38px; }
}

/* ── Full search.php results page replacement ─────────────────────────────── */
/* Uses Camden's own .productCards/.card classes for the product grid itself,
   so those inherit native styling automatically. These rules only style the
   NEW elements this script adds: the "Shop by Model" quick-link block and
   the empty-state message. */

.wcs-results-heading {
  color: var(--wcs-text);
  font-size: 1rem;
  font-weight: 700;
  margin: 0 0 10px;
}

.wcs-results-models {
  margin: 0 0 28px;
  padding: 16px 18px;
  background: #f8f9fb;
  border: 1px solid var(--wcs-border);
  border-radius: 8px;
}

.wcs-results-model-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  list-style: none;
  margin: 0;
  padding: 0;
}

.wcs-results-model-link {
  background: var(--wcs-hover);
  border: 1px solid var(--wcs-border);
  border-radius: 100px;
  color: var(--wcs-text);
  display: inline-block;
  font-size: 0.84rem;
  font-weight: 600;
  padding: 7px 16px;
  text-decoration: none;
  transition: background 150ms ease, border-color 150ms ease;
}

.wcs-results-model-link:hover {
  background: rgba(192,57,43,0.08);
  border-color: var(--wcs-accent);
  color: var(--wcs-accent);
  text-decoration: none;
}

.wcs-results-subcat {
  color: var(--wcs-accent);
  font-size: 0.74rem;
  font-weight: 600;
}

.wcs-results-empty {
  color: var(--wcs-subtext);
  padding: 40px 0;
  text-align: center;
}

.wcs-results-empty p {
  margin: 0 0 8px;
  font-size: 0.95rem;
}

.wcs-results-empty strong {
  color: var(--wcs-text);
}

.wcs-results-empty a {
  color: var(--wcs-accent);
  font-weight: 600;
}

/* Loading state while search data streams in (cold cache) */
.wcs-empty--loading {
  color: var(--wcs-subtext);
}
.wcs-empty--loading::after {
  content: '';
  display: inline-block;
  width: 12px;
  height: 12px;
  margin-left: 8px;
  border: 2px solid var(--wcs-border);
  border-top-color: var(--wcs-accent);
  border-radius: 50%;
  vertical-align: middle;
  animation: wcsSpin 700ms linear infinite;
}
@keyframes wcsSpin { to { transform: rotate(360deg); } }

/* Banner placeholder chips (shown while category data loads, then replaced
   in place by the real model links — reserves space so nothing shifts) */
.wcs-chip-placeholder {
  background: linear-gradient(90deg, #ececec 25%, #f6f6f6 50%, #ececec 75%);
  background-size: 200% 100%;
  animation: wcsShimmer 1.2s ease-in-out infinite;
  border-radius: 100px;
  display: inline-block;
  height: 34px;
  width: 88px;
}
@keyframes wcsShimmer { to { background-position: -200% 0; } }
