/* =========================================================================
   Pill header for Tex Deal Inc. - adapted from the pill-header kit.
   Liquid glass: the bar, the menu pill, the About/product modals and the map panel share one recipe
   (navy tint + soft light from the top + blur + fine edge). Change the numbers in :root to tune them.
   ========================================================================= */
:root {
  --ph-accent: #00C6FF;                 /* highlight: hover, focus, search marks */
  --ph-accent-2: #0072FF;
  --ph-accent-rgb: 0, 198, 255;
  --ph-accent-ink: #06121f;             /* text on top of the cyan accent */
  --ph-on-grad: #ffffff;                /* text on the blue gradient (active link) */
  --ph-grad: linear-gradient(135deg, #0072FF 0%, #3B4DFF 100%);
  --ph-height: 78px; --ph-height-scrolled: 66px; --ph-height-mobile: 64px;
  --ph-tint: 7, 17, 31;                 /* glass tint (RGB) */
  --ph-glass-a: .10;                    /* bar at the top of the page: 90% transparent */
  --ph-glass-a-scrolled: .50;           /* bar while scrolling: 50% transparent (modals and map panel use this too) */
  --ph-pill-a: .50;                     /* menu pill while the bar is clear: same glass as the modals */
  --ph-pill-a-scrolled: .30;            /* menu pill once the bar itself has turned darker */
  --ph-panel: rgba(7, 17, 31, .97);
  --ph-on-dark: #ffffff;
  --ph-max-width: 1520px;
  --ph-font: "Work Sans", system-ui, sans-serif;
  --ph-surface: #0f1a2e; --ph-surface-2: #182640; --ph-heading: #f1f5fb; --ph-text: #b8c4d9; --ph-muted: #8392ad;
  --ph-border: rgba(255, 255, 255, .10); --ph-shadow: 0 22px 50px rgba(0, 0, 0, .6);
}
/* anchor links (e.g. search results -> products.html#denim-fabrics) land below the fixed header */
html { scroll-padding-top: calc(var(--ph-height-scrolled) + 24px); }

.ph { position: fixed; top: 0; left: 0; right: 0; z-index: 1000; height: var(--ph-height); font-family: var(--ph-font); transition: height .35s ease; }
/* glass layer of the bar: tinted, blurred, soft light on top, no line at the bottom */
.ph::before { content: ""; position: absolute; inset: 0; z-index: -1; pointer-events: none;
  background-color: rgba(var(--ph-tint), var(--ph-glass-a));
  background-image: linear-gradient(180deg, rgba(255, 255, 255, .10), rgba(255, 255, 255, 0) 70%);
  -webkit-backdrop-filter: blur(18px) saturate(1.7); backdrop-filter: blur(18px) saturate(1.7);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .16);
  transition: background-color .35s ease, box-shadow .35s ease; }
.ph.is-scrolled::before, .ph.ph-open::before { background-color: rgba(var(--ph-tint), var(--ph-glass-a-scrolled));
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .16), 0 12px 34px rgba(0, 0, 0, .12); }
.ph.is-scrolled, .ph.ph-open { height: var(--ph-height-scrolled); }
.ph-inner { height: 100%; max-width: var(--ph-max-width); margin: 0 auto; padding: 0 28px; display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 18px; }

.ph a.ph-brand { display: inline-flex; align-items: center; justify-self: start; text-decoration: none; }
.ph-brand img { height: 48px; width: auto; display: block; }

/* menu pill: the same liquid glass as the About / product modals */
.ph-nav { justify-self: center; display: flex; align-items: center; gap: 2px; padding: 5px; border-radius: 999px;
  background-color: rgba(var(--ph-tint), var(--ph-pill-a));
  background-image: linear-gradient(180deg, rgba(255, 255, 255, .10), rgba(255, 255, 255, 0) 70%);
  border: 1px solid rgba(255, 255, 255, .14);
  box-shadow: 0 10px 30px rgba(0, 0, 0, .25), inset 0 1px 0 rgba(255, 255, 255, .18);
  -webkit-backdrop-filter: blur(18px) saturate(1.7); backdrop-filter: blur(18px) saturate(1.7);
  transition: background-color .35s ease, border-color .35s ease, box-shadow .35s ease; }
@media (min-width: 992px) {
  .ph.is-scrolled .ph-nav { background-color: rgba(var(--ph-tint), var(--ph-pill-a-scrolled));
    box-shadow: 0 6px 20px rgba(0, 0, 0, .18), inset 0 1px 0 rgba(255, 255, 255, .16); }
}
.ph a.ph-link { padding: 9px 15px; border-radius: 999px; font-size: 14.5px; font-weight: 600; line-height: 1.2; white-space: nowrap; color: rgba(255, 255, 255, .88); text-decoration: none; transition: background-color .25s ease, color .25s ease; }
.ph a.ph-link:hover, .ph a.ph-link:focus-visible { background: rgba(255, 255, 255, .14); color: #fff; }
.ph a.ph-link.active { background: var(--ph-grad); color: var(--ph-on-grad); box-shadow: 0 4px 14px rgba(0, 114, 255, .45); }

.ph-search { margin-left: 6px; display: inline-flex; align-items: center; gap: 8px; height: 38px; padding: 0 16px; border: 0; border-radius: 999px;
  background: rgba(255, 255, 255, .14); color: #fff; font: inherit; font-size: 14px; font-weight: 600; cursor: pointer; transition: background-color .25s ease, color .25s ease; }
.ph-search:hover, .ph-search:focus-visible { background: var(--ph-accent); color: var(--ph-accent-ink); }
.ph svg.ph-ic { width: 16px; height: 16px; flex: 0 0 auto; }

.ph-actions { display: none; }
.ph-burger, .ph-search-m { width: 44px; height: 44px; border-radius: 50%; border: 1px solid rgba(255, 255, 255, .28); background: rgba(255, 255, 255, .08); color: #fff; cursor: pointer; padding: 0; position: relative; }
.ph-search-m { display: inline-flex; align-items: center; justify-content: center; }
.ph-search-m:hover { background: var(--ph-accent); color: var(--ph-accent-ink); border-color: var(--ph-accent); }
.ph-burger span { position: absolute; left: 12px; right: 12px; height: 2px; border-radius: 2px; background: #fff; transition: transform .35s ease, opacity .25s ease, top .35s ease; }
.ph-burger span:nth-child(1) { top: 15px; } .ph-burger span:nth-child(2) { top: 21px; } .ph-burger span:nth-child(3) { top: 27px; }
.ph-open .ph-burger span:nth-child(1) { top: 21px; transform: rotate(45deg); }
.ph-open .ph-burger span:nth-child(2) { opacity: 0; }
.ph-open .ph-burger span:nth-child(3) { top: 21px; transform: rotate(-45deg); }

/* narrower desktops (992-1199px): tighter pill, icon-only search */
@media (min-width: 992px) and (max-width: 1199.98px) {
  .ph-inner { padding: 0 20px; gap: 12px; }
  .ph a.ph-link { padding: 9px 11px; font-size: 14px; }
  .ph-search span { display: none; } .ph-search { padding: 0 13px; }
}

/* tablets and phones: burger menu (same breakpoint as the old Bootstrap navbar) */
@media (max-width: 991.98px) {
  .ph, .ph.is-scrolled, .ph.ph-open { height: var(--ph-height-mobile); }
  .ph-inner { grid-template-columns: 1fr auto; padding: 0 14px 0 16px; }
  .ph-brand img { height: 40px; }
  .ph-actions { display: flex; align-items: center; gap: 8px; justify-self: end; }
  .ph-nav { position: fixed; top: var(--ph-height-mobile); left: 0; right: 0; width: 100%; justify-self: stretch; flex-direction: column; align-items: stretch; gap: 2px;
    max-height: 0; overflow: hidden; padding: 0 14px; border: 0; border-radius: 0; background: var(--ph-panel); box-shadow: none;
    -webkit-backdrop-filter: blur(18px); backdrop-filter: blur(18px); transition: max-height .35s ease, padding .35s ease; }
  .ph-open .ph-nav { max-height: calc(100vh - var(--ph-height-mobile)); max-height: calc(100dvh - var(--ph-height-mobile)); overflow-y: auto; padding: 10px 14px 20px; box-shadow: 0 30px 50px rgba(0, 0, 0, .4); }
  .ph a.ph-link { padding: 14px 16px; border-radius: 12px; font-size: 16.5px; }
  .ph-search { display: none; }
}
body.ph-nav-open { overflow: hidden; }

/* ---------------------------------------------------------- site search box */
body.ps-open { overflow: hidden; }
.ps-overlay { position: fixed; inset: 0; z-index: 10050; display: flex; align-items: flex-start; justify-content: center; padding: 9vh 16px 16px; background: rgba(4, 10, 20, .72); -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px); font-family: var(--ph-font); }
.ps-overlay[hidden] { display: none; }
.ps-box { width: min(720px, 100%); max-height: 78vh; display: flex; flex-direction: column; background: var(--ph-surface); color: var(--ph-text); border: 1px solid var(--ph-border); border-radius: 20px; box-shadow: 0 40px 90px rgba(0, 0, 0, .55); overflow: hidden; }
.ps-field { display: flex; align-items: center; gap: 12px; padding: 0 16px; border-bottom: 1px solid var(--ph-border); background: linear-gradient(90deg, rgba(var(--ph-accent-rgb), .10), transparent 60%); }
.ps-field > svg { width: 18px; height: 18px; color: var(--ph-accent); flex: 0 0 auto; }
.ps-field input { flex: 1; min-width: 0; height: 60px; border: 0; outline: 0; background: transparent; color: var(--ph-heading); font: inherit; font-size: 17px; }
.ps-field input::placeholder { color: var(--ph-muted); }
.ps-field input::-webkit-search-cancel-button, .ps-field input::-webkit-search-decoration { -webkit-appearance: none; appearance: none; display: none; }
.ps-close { width: 34px; height: 34px; border-radius: 50%; border: 0; background: var(--ph-surface-2); color: var(--ph-muted); cursor: pointer; display: inline-flex; align-items: center; justify-content: center; padding: 0; transition: background-color .25s ease, color .25s ease, border-color .25s ease; }
.ps-close:hover { background: var(--ph-accent); color: var(--ph-accent-ink); }
.ps-close svg { width: 14px; height: 14px; }
.ps-status { padding: 10px 20px 4px; font-size: 13px; color: var(--ph-muted); }
.ps-list { list-style: none; margin: 0; padding: 6px 10px 12px; overflow-y: auto; }
.ps-list li { display: flex; gap: 14px; align-items: flex-start; padding: 10px 12px; border-radius: 12px; cursor: pointer; transition: background-color .25s ease; }
.ps-list li.is-active, .ps-list li:hover { background: var(--ph-surface-2); }
.ps-list li.ps-group { cursor: default; padding: 12px 12px 4px; font-size: 12px; letter-spacing: .5px; text-transform: uppercase; font-weight: 700; color: var(--ph-muted); background: transparent !important; }
.ps-ico { flex: 0 0 36px; height: 36px; display: inline-flex; align-items: center; justify-content: center; border-radius: 10px; background: var(--ph-surface-2); color: var(--ph-accent); font-weight: 700; }
.ps-list li.is-active .ps-ico { background: var(--ph-grad); color: var(--ph-on-grad); }
.ps-t { display: block; color: var(--ph-heading); font-weight: 700; line-height: 1.4; }
.ps-s { display: block; font-size: 13.5px; color: var(--ph-muted); line-height: 1.5; }
.ps-list em { font-style: normal; display: inline-block; margin-top: 3px; font-size: 11.5px; padding: 1px 8px; border-radius: 999px; background: rgba(var(--ph-accent-rgb), .14); color: var(--ph-accent); }
.ps-list mark { background: rgba(var(--ph-accent-rgb), .32); color: inherit; padding: 0 1px; border-radius: 3px; }
.ps-list a { display: flex; gap: 14px; align-items: center; width: 100%; color: inherit; text-decoration: none; }
.ps-hint { padding: 9px 18px; border-top: 1px solid var(--ph-border); font-size: 12px; color: var(--ph-muted); display: flex; gap: 6px; align-items: center; flex-wrap: wrap; }
.ps-hint kbd { background: var(--ph-surface-2); border: 1px solid var(--ph-border); border-radius: 6px; padding: 0 6px; font-family: inherit; color: var(--ph-heading); }
@media (max-width: 575.98px) { .ps-overlay { padding-top: 4vh; } .ps-hint { display: none; } }
@media (prefers-reduced-motion: reduce) { .ph *, .ph { transition: none !important; } }

/* readable menu text while the bar is almost clear */
.ph:not(.is-scrolled):not(.ph-open) a.ph-link, .ph:not(.is-scrolled):not(.ph-open) .ph-search { text-shadow: 0 1px 10px rgba(0, 0, 0, .35); }
