/* CG_SEARCH_EXPERIENCE_V1
 * CaptainGreek premium search presentation.
 * Loaded as the final child-theme stylesheet while cg-search-stable-header.css
 * remains authoritative for fixed-header geometry. The retired
 * cg-site-search.css is intentionally no longer referenced by the layout.
 */

.cg-search-experience {
  --cg-search-navy: #2d337f;
  --cg-search-navy-hover: #242a69;
  --cg-search-gold: #b89b65;
  --cg-search-gold-aa: #8a7142;
  --cg-search-ivory: #fdfdfb;
  --cg-search-cream: #fbf7ee;
  --cg-search-surface: #fff;
  --cg-search-ink: #101828;
  --cg-search-muted: #667085;
  --cg-search-border: rgba(45, 51, 127, .16);
  --cg-search-hover: rgba(45, 51, 127, .055);
  --cg-search-focus: rgba(184, 155, 101, .28);
  --cg-search-shadow: 0 24px 64px rgba(13, 22, 36, .16), 0 3px 10px rgba(13, 22, 36, .08);
  --cg-search-radius-control: 16px;
  --cg-search-radius-panel: 20px;
  --cg-search-motion: 140ms cubic-bezier(.2, .8, .2, 1);
  position: relative;
  width: 100%;
  color: var(--cg-search-ink);
  font-family: inherit;
}

.cg-visually-hidden {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  margin: -1px !important;
  padding: 0 !important;
  overflow: hidden !important;
  clip: rect(0 0 0 0) !important;
  clip-path: inset(50%) !important;
  white-space: nowrap !important;
  border: 0 !important;
}

.cg-search-experience__mobile-head {
  display: none;
}

.cg-search-experience #search_mini_form {
  position: relative;
  width: 100%;
  margin: 0;
}

.cg-search-experience #cg-site-searchbar,
.page-header .cg-search-header .cg-search-experience #cg-site-searchbar {
  position: relative !important;
  width: 100% !important;
  max-inline-size: none !important;
  margin: 0 !important;
}

.cg-search-experience .cg-input,
.page-header .cg-search-header .cg-search-experience .cg-input {
  display: block !important;
  width: 100% !important;
  min-height: 52px !important;
  height: 52px !important;
  margin: 0 !important;
  padding: 13px 104px 13px 17px !important;
  color: var(--cg-search-ink) !important;
  font-size: 16px !important;
  font-weight: 500 !important;
  line-height: 24px !important;
  background: var(--cg-search-surface) !important;
  border: 1px solid var(--cg-search-border) !important;
  border-radius: var(--cg-search-radius-control) !important;
  box-shadow: inset 0 1px 2px rgba(13, 22, 36, .035), 0 1px 2px rgba(13, 22, 36, .04) !important;
  appearance: none;
  -webkit-appearance: none;
  color-scheme: light;
  transition: border-color var(--cg-search-motion), box-shadow var(--cg-search-motion), background-color var(--cg-search-motion) !important;
}

.cg-search-experience .cg-input::placeholder {
  color: var(--cg-search-muted) !important;
  opacity: 1 !important;
}

.cg-search-experience .cg-input::-webkit-search-cancel-button {
  display: none;
}

.cg-search-experience__control:focus-within .cg-input {
  border-color: var(--cg-search-gold-aa) !important;
  box-shadow: 0 0 0 3px var(--cg-search-focus), 0 4px 14px rgba(13, 22, 36, .07) !important;
  outline: none !important;
}

.cg-search-experience .actions {
  position: static !important;
  width: auto !important;
  margin: 0 !important;
  padding: 0 !important;
}

.cg-search-experience .cg-icon-btn.action.search,
.cg-search-experience form.cg-search .cg-icon-btn.action.search {
  position: absolute !important;
  z-index: 3 !important;
  inset: 4px 4px auto auto !important;
  display: grid !important;
  place-items: center !important;
  width: 44px !important;
  min-width: 44px !important;
  height: 44px !important;
  min-height: 44px !important;
  margin: 0 !important;
  padding: 0 !important;
  color: #fff !important;
  background: var(--cg-search-navy) !important;
  border: 0 !important;
  border-radius: 12px !important;
  box-shadow: 0 3px 9px rgba(45, 51, 127, .20) !important;
  cursor: pointer !important;
  translate: none !important;
  transform: none !important;
  opacity: 1 !important;
  visibility: visible !important;
  transition: background-color var(--cg-search-motion), box-shadow var(--cg-search-motion) !important;
}

.cg-search-experience .cg-icon-btn.action.search:hover {
  background: var(--cg-search-navy-hover) !important;
  box-shadow: 0 5px 13px rgba(45, 51, 127, .26) !important;
}

.cg-search-experience .cg-icon-btn.action.search:focus-visible,
.cg-search-experience__clear:focus-visible,
.cg-search-experience__close:focus-visible {
  outline: 3px solid var(--cg-search-focus) !important;
  outline-offset: 2px !important;
}

.cg-search-experience .cg-icon-btn.action.search:disabled {
  cursor: default !important;
  opacity: .52 !important;
  box-shadow: none !important;
}

.cg-search-experience .cg-search-icon {
  display: block !important;
  width: 21px !important;
  height: 21px !important;
  max-width: none !important;
  color: currentColor !important;
  fill: none !important;
  stroke: currentColor !important;
  stroke-width: 2 !important;
  stroke-linecap: round !important;
}

.cg-search-experience__clear {
  position: absolute;
  z-index: 4;
  inset: 6px 51px auto auto;
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  margin: 0;
  padding: 0;
  color: var(--cg-search-muted);
  background: transparent;
  border: 0;
  border-radius: 10px;
  cursor: pointer;
}

.cg-search-experience__clear[hidden] {
  display: none !important;
}

.cg-search-experience__clear:hover {
  color: var(--cg-search-navy);
  background: var(--cg-search-hover);
}

.cg-search-experience__clear svg,
.cg-search-experience__close svg {
  width: 19px;
  height: 19px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
}

.cg-search-experience__panel {
  position: absolute;
  z-index: 2150;
  inset: calc(100% + 8px) 0 auto 0;
  width: 100%;
  max-height: min(560px, calc(100dvh - 158px));
  overflow-x: hidden;
  overflow-y: auto;
  overscroll-behavior: contain;
  color: var(--cg-search-ink);
  background: var(--cg-search-surface);
  border: 1px solid var(--cg-search-border);
  border-radius: var(--cg-search-radius-panel);
  box-shadow: var(--cg-search-shadow);
  scrollbar-color: rgba(45, 51, 127, .34) transparent;
  animation: cgSearchOpen var(--cg-search-motion) both;
}

.cg-search-experience__panel[hidden],
.cg-search-experience__panel [hidden] {
  display: none !important;
}

.cg-search-experience__heading {
  margin: 0;
  padding: 13px 16px 8px;
  color: var(--cg-search-muted);
  background: transparent;
  border: 0;
  letter-spacing: .075em;
  font-size: 11px;
  font-weight: 700;
  line-height: 1.35;
  text-transform: uppercase;
}

.cg-search-experience__suggestion,
.cg-search-experience__product,
.cg-search-experience__view-all {
  color: var(--cg-search-ink) !important;
  text-decoration: none !important;
}

.cg-search-experience__suggestion {
  position: relative;
  display: flex;
  align-items: center;
  min-height: 46px;
  padding: 10px 16px 10px 42px;
  font-size: 14px;
  line-height: 20px;
  border-top: 1px solid rgba(45, 51, 127, .08);
}

.cg-search-experience__suggestion::before {
  content: '';
  position: absolute;
  left: 18px;
  width: 12px;
  height: 12px;
  border: 1.7px solid var(--cg-search-navy);
  border-radius: 50%;
}

.cg-search-experience__suggestion::after {
  content: '';
  position: absolute;
  left: 29px;
  width: 6px;
  height: 1.7px;
  background: var(--cg-search-navy);
  transform: rotate(45deg);
  transform-origin: left center;
}

.cg-search-experience__product {
  position: relative;
  display: grid;
  grid-template-columns: 56px minmax(0, 1fr) auto;
  align-items: center;
  min-height: 78px;
  gap: 12px;
  padding: 10px 16px;
  border-top: 1px solid rgba(45, 51, 127, .09);
}

.cg-search-experience__suggestion:hover,
.cg-search-experience__suggestion.is-active,
.cg-search-experience__product:hover,
.cg-search-experience__product.is-active,
.cg-search-experience__view-all:hover,
.cg-search-experience__view-all.is-active {
  color: var(--cg-search-navy) !important;
  background: var(--cg-search-hover);
}

.cg-search-experience__suggestion.is-active,
.cg-search-experience__product.is-active,
.cg-search-experience__view-all.is-active {
  box-shadow: inset 3px 0 0 var(--cg-search-gold);
  outline: 2px solid rgba(45, 51, 127, .22);
  outline-offset: -2px;
}

.cg-search-experience__image {
  display: grid;
  place-items: center;
  width: 56px;
  height: 56px;
  overflow: hidden;
  background: var(--cg-search-cream);
  border: 1px solid rgba(45, 51, 127, .08);
  border-radius: 11px;
}

.cg-search-experience__image img {
  display: block;
  width: 100%;
  height: 100%;
  padding: 3px;
  object-fit: contain;
}

.cg-search-experience__image.is-placeholder::before {
  content: '';
  width: 21px;
  height: 21px;
  border: 1px solid rgba(45, 51, 127, .20);
  border-radius: 6px;
  background: linear-gradient(135deg, transparent 48%, rgba(45, 51, 127, .12) 49% 53%, transparent 54%);
}

.cg-search-experience__copy {
  display: flex;
  min-width: 0;
  flex-direction: column;
  gap: 3px;
}

.cg-search-experience__meta {
  overflow: hidden;
  color: var(--cg-search-muted);
  font-size: 12px;
  line-height: 1.35;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.cg-search-experience__name {
  display: -webkit-box;
  overflow: hidden;
  color: var(--cg-search-ink);
  font-size: 14px;
  font-weight: 600;
  line-height: 20px;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.cg-search-experience__price {
  display: flex;
  align-items: flex-end;
  flex-direction: column;
  gap: 1px;
  min-width: 70px;
  color: var(--cg-search-navy);
  text-align: right;
  white-space: nowrap;
}

.cg-search-experience__price-label {
  color: var(--cg-search-muted);
  font-size: 12px;
  font-weight: 500;
  line-height: 16px;
}

.cg-search-experience__price-value {
  color: var(--cg-search-navy);
  font-size: 15px;
  font-weight: 700;
  line-height: 20px;
}

.cg-search-experience__view-all {
  position: relative;
  display: flex;
  align-items: center;
  min-height: 52px;
  padding: 12px 48px 12px 16px;
  color: var(--cg-search-navy) !important;
  font-size: 14px;
  font-weight: 700;
  line-height: 20px;
  border-top: 1px solid var(--cg-search-border);
}

.cg-search-experience__view-all::after {
  content: '→';
  position: absolute;
  right: 18px;
  color: var(--cg-search-gold-aa);
}

.cg-search-experience__message {
  display: flex;
  min-height: 116px;
  align-items: flex-start;
  justify-content: center;
  flex-direction: column;
  gap: 6px;
  padding: 22px 20px;
  background: radial-gradient(18rem 8rem at 5% -50%, rgba(184, 155, 101, .12), transparent 70%), var(--cg-search-surface);
}

.cg-search-experience__message strong {
  color: var(--cg-search-navy);
  font-size: 15px;
  font-weight: 700;
  line-height: 21px;
}

.cg-search-experience__message span {
  color: var(--cg-search-muted);
  font-size: 14px;
  line-height: 21px;
}

.cg-search-experience__loading {
  min-height: 252px;
  padding: 6px 0;
}

.cg-search-experience__skeleton {
  display: grid;
  grid-template-columns: 56px minmax(0, 1fr) 68px;
  align-items: center;
  min-height: 78px;
  gap: 12px;
  padding: 10px 16px;
  border-top: 1px solid rgba(45, 51, 127, .07);
}

.cg-search-experience__skeleton:first-of-type {
  border-top: 0;
}

.cg-search-experience__skeleton-image,
.cg-search-experience__skeleton-copy span,
.cg-search-experience__skeleton-price {
  display: block;
  background: linear-gradient(90deg, rgba(45, 51, 127, .065), rgba(184, 155, 101, .12), rgba(45, 51, 127, .065));
  background-size: 220% 100%;
  border-radius: 9px;
  animation: cgSearchSkeleton 1.25s ease-in-out infinite;
}

.cg-search-experience__skeleton-image {
  width: 56px;
  height: 56px;
  border-radius: 11px;
}

.cg-search-experience__skeleton-copy {
  display: flex;
  flex-direction: column;
  gap: 9px;
}

.cg-search-experience__skeleton-copy span:first-child {
  width: min(82%, 280px);
  height: 12px;
}

.cg-search-experience__skeleton-copy span:last-child {
  width: min(56%, 180px);
  height: 10px;
}

.cg-search-experience__skeleton-price {
  width: 68px;
  height: 13px;
}

.page-header .cg-search-header,
.page-header .cg-search-header .header-main-inner,
.page-header .cg-search-header .header-maininner-row,
.page-header .cg-search-header .col-search,
.page-header .cg-search-header .top-search-wrap {
  overflow: visible !important;
}

.btn-search-mobile#cg-search-mobile-trigger {
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  flex-direction: column !important;
  min-height: 56px;
  padding: 4px 6px;
  appearance: none;
  -webkit-appearance: none;
  color: inherit;
  background: transparent;
  border: 0;
  border-radius: 0;
  cursor: pointer;
}

.btn-search-mobile#cg-search-mobile-trigger .mbi {
  display: block;
  font-size: 30px;
  line-height: 42px;
}

.btn-search-mobile#cg-search-mobile-trigger:focus-visible {
  outline: 3px solid rgba(184, 155, 101, .34);
  outline-offset: -3px;
}

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

@keyframes cgSearchSkeleton {
  from { background-position: 100% 0; }
  to { background-position: -120% 0; }
}

@media (max-width: 767px) {
  body:not(.cg-search-mobile-open) .page-header .cg-search-header .col-search {
    display: none !important;
  }

  body.cg-search-mobile-open {
    overflow: hidden !important;
  }

  body.cg-search-mobile-open .page-header .cg-search-header .col-search {
    position: fixed !important;
    z-index: 2600 !important;
    inset: 0 !important;
    display: block !important;
    width: 100% !important;
    max-width: none !important;
    height: 100vh !important;
    height: 100dvh !important;
    margin: 0 !important;
    padding: 0 !important;
    overflow: hidden !important;
    background: var(--cg-search-ivory, #fdfdfb) !important;
  }

  body.cg-search-mobile-open .page-header .cg-search-header .top-search-wrap {
    display: block !important;
    width: 100% !important;
    height: 100% !important;
    margin: 0 !important;
    padding: 0 !important;
  }

  .cg-search-experience {
    display: flex;
    width: 100%;
    height: 100%;
    padding: max(10px, env(safe-area-inset-top)) 12px max(10px, env(safe-area-inset-bottom));
    flex-direction: column;
    background:
      radial-gradient(24rem 10rem at 8% -40%, rgba(184, 155, 101, .13), transparent 68%),
      var(--cg-search-ivory);
  }

  .cg-search-experience__mobile-head {
    display: flex;
    min-height: 46px;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 8px;
  }

  .cg-search-experience__mobile-title {
    color: var(--cg-search-navy);
    font-size: 16px;
    font-weight: 700;
    line-height: 22px;
    letter-spacing: .01em;
  }

  .cg-search-experience__close {
    display: grid;
    place-items: center;
    width: 44px;
    min-width: 44px;
    height: 44px;
    margin: 0;
    padding: 0;
    color: var(--cg-search-navy);
    background: #fff;
    border: 1px solid var(--cg-search-border);
    border-radius: 12px;
    box-shadow: 0 3px 10px rgba(13, 22, 36, .05);
    cursor: pointer;
  }

  .cg-search-experience #search_mini_form {
    display: flex;
    min-height: 0;
    flex: 1;
    flex-direction: column;
  }

  .cg-search-experience #cg-site-searchbar {
    display: flex;
    min-height: 0;
    flex: 1;
    flex-direction: column;
  }

  .cg-search-experience .cg-input {
    flex: 0 0 52px;
  }

  .cg-search-experience__panel {
    position: relative;
    z-index: 1;
    inset: auto;
    width: 100%;
    max-height: none;
    min-height: 0;
    margin-top: 10px;
    flex: 1;
    border-radius: 16px;
    box-shadow: 0 10px 28px rgba(13, 22, 36, .10);
    animation: none;
  }

  .cg-search-experience__product {
    grid-template-columns: 54px minmax(0, 1fr) auto;
    min-height: 76px;
    gap: 10px;
    padding: 10px 12px;
  }

  .cg-search-experience__image {
    width: 54px;
    height: 54px;
  }

  .cg-search-experience__price {
    min-width: 64px;
  }

  .cg-search-experience__heading {
    padding-inline: 12px;
  }

  .cg-search-experience__view-all {
    min-height: 54px;
    padding-left: 12px;
  }
}

@media (forced-colors: active) {
  .cg-search-experience .cg-input,
  .cg-search-experience .cg-icon-btn.action.search,
  .cg-search-experience__panel,
  .cg-search-experience__product.is-active,
  .cg-search-experience__view-all.is-active {
    border: 1px solid CanvasText !important;
  }

  .cg-search-experience__control:focus-within .cg-input {
    outline: 2px solid Highlight !important;
    outline-offset: 2px !important;
  }
}

@media (prefers-reduced-motion: reduce) {
  .cg-search-experience,
  .cg-search-experience *,
  .cg-search-experience *::before,
  .cg-search-experience *::after {
    scroll-behavior: auto !important;
    transition: none !important;
    animation: none !important;
  }
}

/* /CG_SEARCH_EXPERIENCE_V1 */
