/* ==========================================================================
   UncleTrips — Reusable components
   Header · dropdown · service search · cards · footer · bottom nav · drawer
   ========================================================================== */

/* ---------------------------------------------------------------- Header */
.site-header {
  position: sticky;
  inset-block-start: 0;
  z-index: var(--z-header);
  background: var(--c-white);
  border-block-end: 1px solid var(--c-border);
}

.header-inner {
  display: flex;
  align-items: center;
  gap: clamp(1rem, 2.5vw, 2.5rem);
  min-height: var(--header-h);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  flex: none;
  color: var(--c-navy-900);
}

.brand-mark {
  width: 48px;
  height: auto;
  border-radius: 50%;
}

.brand-text {
  display: flex;
  flex-direction: column;
  line-height: 1;
}

.brand-name {
  font-size: 1.75rem;
  font-weight: var(--fw-extrabold);
  letter-spacing: -0.03em;
  line-height: 1;
}

.brand-name-accent {
  color: var(--c-orange-500);
}

.brand-tagline {
  margin-block-start: 5px;
  font-size: 0.625rem;
  font-weight: var(--fw-semibold);
  color: var(--c-navy-800);
  letter-spacing: 0.01em;
  white-space: nowrap;
}

.brand--light {
  color: var(--c-white);
}

.main-nav {
  flex: 1 1 auto;
  min-width: 0;
}

.main-nav ul {
  display: flex;
  align-items: center;
  gap: clamp(1rem, 2vw, 1.75rem);
}

.main-nav a {
  position: relative;
  display: inline-flex;
  align-items: center;
  min-height: var(--tap);
  font-size: var(--fs-14);
  font-weight: var(--fw-semibold);
  color: var(--c-navy-900);
  white-space: nowrap;
  transition: color var(--dur) var(--ease);
}

.main-nav a::after {
  content: "";
  position: absolute;
  inset-inline: 0;
  inset-block-end: 6px;
  height: 2px;
  border-radius: 2px;
  background: var(--c-orange-500);
  transform: scaleX(0);
  transition: transform var(--dur) var(--ease);
}

.main-nav a:hover::after,
.main-nav a[aria-current]:not([aria-current="false"])::after {
  transform: scaleX(1);
}

.main-nav-ask::before {
  content: "";
  width: 7px;
  height: 7px;
  margin-inline-end: 7px;
  border-radius: 50%;
  background: var(--c-orange-500);
}

.header-tools {
  display: flex;
  align-items: center;
  gap: var(--sp-1);
  margin-inline-start: auto;
}

.tool-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  min-height: var(--tap);
  min-width: var(--tap);
  padding-inline: 0.6rem;
  border-radius: var(--r-md);
  font-size: var(--fs-14);
  font-weight: var(--fw-semibold);
  color: var(--c-navy-900);
  white-space: nowrap;
  transition: background-color var(--dur) var(--ease);
}

.tool-btn:hover,
.tool-btn[aria-expanded="true"] {
  background: var(--c-grey-50);
}

.tool-btn--icon {
  justify-content: center;
  padding: 0;
}

.tool-btn--icon .icon {
  width: 24px;
  height: 24px;
}

.icon--sm {
  width: 0.95em;
  height: 0.95em;
}

.flag {
  width: 20px;
  height: 20px;
}

.menu-btn {
  display: none;
}

/* ------------------------------------------------------------- Dropdown */
.dropdown {
  position: relative;
}

.dropdown-menu {
  position: absolute;
  inset-block-start: calc(100% + 6px);
  inset-inline-end: 0;
  z-index: var(--z-dropdown);
  min-width: 200px;
  margin: 0;
  padding: var(--sp-2);
  list-style: none;
  background: var(--c-white);
  border: 1px solid var(--c-border);
  border-radius: var(--r-lg);
  box-shadow: var(--sh-md);
}

.dropdown-menu button {
  display: flex;
  align-items: baseline;
  gap: var(--sp-2);
  width: 100%;
  min-height: 40px;
  padding: var(--sp-2) var(--sp-3);
  border-radius: var(--r-sm);
  font-size: var(--fs-14);
  font-weight: var(--fw-semibold);
  text-align: start;
}

.dropdown-menu button span {
  font-weight: var(--fw-regular);
  font-size: var(--fs-13);
  color: var(--c-text-muted);
}

.dropdown-menu button:hover {
  background: var(--c-grey-50);
}

.dropdown-menu button[aria-current="true"] {
  color: var(--c-orange-600);
}

/* --------------------------------------------------------- Service search */
.search {
  position: relative;
}

.search-tabs {
  display: flex;
  align-items: flex-end;
  gap: 6px;
}

.search-tab {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  min-height: 48px;
  padding: 0.6rem 1.1rem;
  border-radius: var(--r-lg) var(--r-lg) 0 0;
  background: rgba(255, 255, 255, 0.82);
  color: var(--c-navy-900);
  font-size: var(--fs-15);
  font-weight: var(--fw-bold);
  white-space: nowrap;
  backdrop-filter: blur(6px);
  transition: background-color var(--dur) var(--ease);
}

.search-tab .icon {
  width: 22px;
  height: 22px;
  color: var(--c-navy-600);
}

.search-tab:hover {
  background: rgba(255, 255, 255, 0.95);
}

.search-tab[aria-selected="true"] {
  min-height: 54px;
  background: var(--c-white);
}

.search-tab[aria-selected="true"] .icon {
  color: var(--c-orange-500);
}

.search-tab--ask {
  position: relative;
  background: rgba(225, 230, 238, 0.86);
}

.search-tab--ask img {
  width: 26px;
  height: auto;
  border-radius: 50%;
}

.badge-new {
  position: absolute;
  inset-block-start: -9px;
  inset-inline-end: 8px;
  padding: 2px 7px;
  border-radius: var(--r-pill);
  background: var(--c-orange-500);
  color: var(--c-white);
  font-size: 0.625rem;
  font-style: normal;
  font-weight: var(--fw-extrabold);
  letter-spacing: 0.06em;
  text-transform: uppercase;
  line-height: 1.4;
}

.search-panel {
  position: relative;
  padding: 12px;
  background: var(--c-white);
  border-radius: 0 var(--r-lg) var(--r-lg) var(--r-lg);
  box-shadow: var(--sh-lg);
}

[dir="rtl"] .search-panel {
  border-radius: var(--r-lg) 0 var(--r-lg) var(--r-lg);
}

.search-form {
  display: flex;
  align-items: stretch;
  gap: 10px;
}

.search-form[hidden] {
  display: none;
}

.sf-field {
  position: relative;
  display: flex;
  align-items: center;
  gap: 0.7rem;
  flex: 1 1 0;
  min-width: 0;
  min-height: 58px;
  padding: 0.45rem 0.9rem;
  border: 1px solid var(--c-border);
  border-radius: var(--r-md);
  background: var(--c-white);
  cursor: text;
  transition: border-color var(--dur) var(--ease), box-shadow var(--dur) var(--ease);
}

.sf-field--grow {
  flex-grow: 1.35;
}

.sf-field:hover {
  border-color: var(--c-grey-300);
}

.sf-field:focus-within {
  border-color: var(--c-navy-600);
  box-shadow: 0 0 0 3px rgba(29, 58, 99, 0.12);
}

.sf-field > .icon {
  width: 22px;
  height: 22px;
  color: var(--c-navy-800);
}

.sf-text {
  display: flex;
  flex-direction: column;
  flex: 1;
  min-width: 0;
  text-align: start;
}

.sf-label {
  font-size: var(--fs-14);
  font-weight: var(--fw-bold);
  color: var(--c-navy-900);
  line-height: 1.3;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.sf-input,
.sf-value {
  width: 100%;
  min-width: 0;
  padding: 0;
  border: 0;
  background: transparent;
  font-size: var(--fs-13);
  color: var(--c-navy-900);
  line-height: 1.4;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.sf-input::placeholder,
.sf-value[data-empty-state] {
  color: var(--c-text-muted);
  opacity: 1;
}

.sf-input:focus {
  outline: none;
}

.sf-select {
  appearance: none;
  cursor: pointer;
}

.sf-select:invalid,
.sf-select.is-empty {
  color: var(--c-text-muted);
}

.sf-field--pax {
  cursor: pointer;
}

.sf-pax-btn {
  align-self: stretch;
  justify-content: center;
}

.sf-pax-btn:focus-visible {
  outline: none;
}

.pax-pop {
  position: absolute;
  inset-block-start: calc(100% + 8px);
  inset-inline-end: 0;
  z-index: var(--z-dropdown);
  width: max(100%, 280px);
  padding: var(--sp-4);
  background: var(--c-white);
  border: 1px solid var(--c-border);
  border-radius: var(--r-lg);
  box-shadow: var(--sh-md);
  cursor: default;
}

.pax-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--sp-4);
  padding-block: var(--sp-2);
  font-size: var(--fs-14);
  font-weight: var(--fw-semibold);
}

.pax-row small {
  display: block;
  font-size: var(--fs-12);
  font-weight: var(--fw-regular);
  color: var(--c-text-muted);
}

.stepper {
  display: inline-flex;
  align-items: center;
  gap: var(--sp-2);
}

.stepper button {
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  border: 1px solid var(--c-grey-300);
  border-radius: 50%;
  color: var(--c-navy-900);
}

.stepper button:disabled {
  opacity: 0.35;
  cursor: not-allowed;
}

.stepper output {
  min-width: 1.5em;
  text-align: center;
  font-weight: var(--fw-bold);
}

.pax-done {
  margin-block-start: var(--sp-3);
  min-height: 42px;
}

.search-submit {
  flex: none;
  min-width: 150px;
  min-height: 58px;
  border-radius: var(--r-md);
}

.btn--sm {
  min-height: 40px;
  padding: 0.55em 1.2em;
  font-size: var(--fs-14);
  border-radius: var(--r-md);
}

/* ------------------------------------------------------------ Trust strip */
.trust-strip {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: var(--sp-4);
  margin: 0;
  padding: 0;
  list-style: none;
}

.trust-strip li {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--sp-3);
  text-align: center;
  font-size: var(--fs-13);
  line-height: 1.35;
  color: rgba(255, 255, 255, 0.82);
}

.trust-strip .icon {
  width: 40px;
  height: 40px;
  stroke-width: 1.4;
  color: var(--c-white);
}

.trust-strip strong {
  display: block;
  font-size: var(--fs-14);
  font-weight: var(--fw-bold);
  color: var(--c-white);
}

/* -------------------------------------------------------- Destination card */
.dest-card {
  position: relative;
  display: block;
  aspect-ratio: 152 / 135;
  overflow: hidden;
  border-radius: var(--r-md);
  background: var(--c-navy-800);
  isolation: isolate;
}

.dest-card img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 500ms var(--ease);
}

.dest-card::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(5, 22, 44, 0) 38%, rgba(5, 22, 44, 0.78) 100%);
}

.dest-card:hover img {
  transform: scale(1.04);
}

.dest-card-text {
  position: absolute;
  inset-inline: var(--sp-3);
  inset-block-end: var(--sp-3);
  z-index: 1;
  display: flex;
  flex-direction: column;
  color: var(--c-white);
  line-height: 1.25;
}

.dest-card-text strong {
  font-size: var(--fs-16);
  font-weight: var(--fw-bold);
}

.dest-card-text span {
  font-size: var(--fs-12);
  opacity: 0.9;
}

/* ----------------------------------------------------------- Category item */
.cat-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--sp-3);
  font-size: var(--fs-13);
  font-weight: var(--fw-semibold);
  text-align: center;
  line-height: 1.3;
  color: var(--c-navy-900);
}

.cat-icon {
  display: grid;
  place-items: center;
  width: 72px;
  height: 72px;
  border-radius: 50%;
  transition: transform var(--dur) var(--ease), box-shadow var(--dur) var(--ease);
}

.cat-icon .icon {
  width: 32px;
  height: 32px;
  stroke-width: 1.6;
}

.cat-icon--warm {
  background: var(--c-orange-100);
  color: var(--c-orange-500);
}

.cat-icon--cool {
  background: var(--c-navy-100);
  color: var(--c-blue-600);
}

.cat-item:hover .cat-icon {
  transform: translateY(-2px);
  box-shadow: var(--sh-sm);
}

/* --------------------------------------------------------------- Tour card */
.tour-card {
  position: relative;
  display: flex;
  flex-direction: column;
  height: 100%;
  overflow: hidden;
  background: var(--c-white);
  border: 1px solid var(--c-border);
  border-radius: var(--r-md);
  box-shadow: var(--sh-xs);
  transition: box-shadow var(--dur) var(--ease), transform var(--dur) var(--ease);
}

.tour-card:hover {
  box-shadow: var(--sh-md);
}

.tour-card-media {
  position: relative;
  aspect-ratio: 182 / 120;
  background: var(--c-grey-100);
}

.tour-card-media img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.wish-btn {
  position: absolute;
  inset-block-start: 8px;
  inset-inline-end: 8px;
  z-index: 2;
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: rgba(7, 25, 55, 0.35);
  color: var(--c-white);
  backdrop-filter: blur(4px);
  transition: background-color var(--dur) var(--ease);
}

.wish-btn .icon {
  width: 21px;
  height: 21px;
}

.wish-btn:hover {
  background: rgba(7, 25, 55, 0.55);
}

.wish-btn[aria-pressed="true"] {
  background: var(--c-white);
  color: var(--c-orange-500);
}

.wish-btn[aria-pressed="true"] .icon {
  fill: currentColor;
}

.tour-card-body {
  display: flex;
  flex-direction: column;
  flex: 1;
  gap: 6px;
  padding: 0.75rem 0.85rem 0.9rem;
}

.rating {
  display: flex;
  align-items: center;
  gap: 4px;
  font-size: var(--fs-13);
}

.rating .icon {
  width: 15px;
  height: 15px;
  color: var(--c-orange-400);
}

.rating span {
  color: var(--c-text-muted);
}

.tour-card-title {
  font-size: var(--fs-15);
  font-weight: var(--fw-bold);
  line-height: 1.32;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* full-card click target */
.tour-card-title a::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 1;
}

.tour-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 12px;
  margin: 0;
  padding: 0;
  list-style: none;
  font-size: var(--fs-12);
  color: var(--c-text-muted);
}

.tour-meta li {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  white-space: nowrap;
}

.tour-meta .icon {
  width: 15px;
  height: 15px;
}

.price {
  margin-block-start: auto;
  padding-block-start: 10px;
  font-size: var(--fs-14);
}

.price strong {
  font-size: var(--fs-20);
  font-weight: var(--fw-extrabold);
  letter-spacing: -0.01em;
}

/* --------------------------------------------------------------- Carousel */
.carousel {
  position: relative;
}

.carousel-btn {
  position: absolute;
  inset-block-start: 45%;
  z-index: 3;
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: var(--c-white);
  color: var(--c-navy-900);
  border: 1px solid var(--c-border);
  box-shadow: var(--sh-md);
  transform: translateY(-50%);
}

.carousel-btn[hidden] {
  display: none;
}

.carousel-btn--next {
  inset-inline-end: -20px;
}

.carousel-btn--prev {
  inset-inline-start: -20px;
}

/* -------------------------------------------------------------- Guide card */
.guide-card {
  display: flex;
  flex-direction: column;
  gap: 6px;
  color: var(--c-navy-900);
}

.guide-card img {
  width: 100%;
  aspect-ratio: 16 / 10;
  object-fit: cover;
  border-radius: var(--r-md);
  margin-block-end: 6px;
  background: var(--c-grey-100);
}

.guide-card strong {
  font-size: var(--fs-16);
  font-weight: var(--fw-bold);
  line-height: 1.35;
}

.guide-card:hover strong {
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
}

.guide-tag {
  font-size: var(--fs-12);
  font-weight: var(--fw-bold);
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--c-orange-600);
}

.guide-meta {
  font-size: var(--fs-13);
  color: var(--c-text-muted);
}

/* ------------------------------------------------------------ Chat bubbles */
.bubble {
  margin: 0;
  padding: 0.85rem 1.1rem;
  border-radius: var(--r-lg);
  font-size: var(--fs-14);
  line-height: 1.5;
  color: var(--c-navy-900);
  box-shadow: var(--sh-sm);
}

.bubble--user {
  background: #eaf0f8;
  border-end-start-radius: 4px;
}

.bubble--uncle {
  background: var(--c-white);
  border-start-start-radius: 4px;
}

.bubble-row {
  display: flex;
  align-items: flex-start;
  gap: var(--sp-2);
}

.bubble-avatar {
  width: 36px;
  flex: none;
  border-radius: 50%;
  box-shadow: 0 0 0 2px var(--c-white);
}

.bubble--typing {
  display: inline-flex;
  gap: 6px;
  width: max-content;
  padding: 0.9rem 1.1rem;
  background: var(--c-white);
}

.bubble--typing i {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--c-grey-300);
  animation: typing 1.2s infinite ease-in-out;
}

.bubble--typing i:nth-child(2) {
  animation-delay: 0.15s;
}

.bubble--typing i:nth-child(3) {
  animation-delay: 0.3s;
}

@keyframes typing {
  0%, 60%, 100% { transform: translateY(0); opacity: 0.6; }
  30% { transform: translateY(-3px); opacity: 1; }
}

/* ------------------------------------------------------------------ Footer */
.site-footer {
  margin-block-start: var(--section-gap);
  padding-block: var(--sp-12) var(--sp-6);
  background: var(--c-navy-950);
  color: rgba(255, 255, 255, 0.72);
  font-size: var(--fs-14);
}

.footer-top {
  display: grid;
  grid-template-columns: minmax(220px, 1.1fr) 3fr;
  gap: var(--sp-10);
  padding-block-end: var(--sp-10);
  border-block-end: 1px solid rgba(255, 255, 255, 0.12);
}

.footer-brand p {
  max-width: 34ch;
  margin-block: var(--sp-4);
  line-height: 1.6;
}

.footer-brand .brand-name {
  font-size: 1.5rem;
}

.social {
  display: flex;
  gap: var(--sp-2);
  margin: 0;
  padding: 0;
  list-style: none;
}

.social a {
  display: grid;
  place-items: center;
  width: var(--tap);
  height: var(--tap);
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, 0.18);
  color: var(--c-white);
  transition: background-color var(--dur) var(--ease);
}

.social a:hover {
  background: rgba(255, 255, 255, 0.1);
}

.footer-cols {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: var(--sp-6);
}

.footer-col summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-block-end: var(--sp-3);
  font-size: var(--fs-15);
  font-weight: var(--fw-bold);
  color: var(--c-white);
  list-style: none;
  cursor: default;
  pointer-events: none;
}

.footer-col summary::-webkit-details-marker {
  display: none;
}

.footer-col summary .icon {
  display: none;
}

.footer-col ul {
  display: grid;
  gap: var(--sp-2);
  margin: 0;
  padding: 0;
  list-style: none;
}

.footer-col a {
  display: inline-block;
  padding-block: 2px;
  transition: color var(--dur) var(--ease);
}

.footer-col a:hover,
.footer-legal a:hover {
  color: var(--c-white);
}

.footer-bottom {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: var(--sp-4) var(--sp-8);
  padding-block-start: var(--sp-6);
}

.footer-prefs {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--sp-3) var(--sp-4);
}

.pref-select {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: var(--sp-2);
  min-height: 40px;
  padding-inline: var(--sp-3);
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: var(--r-md);
  color: var(--c-white);
}

.pref-select select {
  appearance: none;
  min-height: 38px;
  padding-inline-end: var(--sp-2);
  border: 0;
  background: transparent;
  color: inherit;
  font-size: var(--fs-14);
  font-weight: var(--fw-semibold);
  cursor: pointer;
}

.pref-select select option {
  color: var(--c-navy-900);
}

.pref-select--light {
  border-color: var(--c-border);
  color: var(--c-navy-900);
}

.secure-note {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: var(--fs-13);
}

.footer-legal {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--sp-2) var(--sp-6);
  font-size: var(--fs-13);
}

.footer-legal ul {
  display: flex;
  flex-wrap: wrap;
  gap: var(--sp-2) var(--sp-5);
  margin: 0;
  padding: 0;
  list-style: none;
}

/* -------------------------------------------------------------- Bottom nav */
.bottom-nav {
  display: none;
}

/* ------------------------------------------------------------------ Drawer */
.drawer {
  position: fixed;
  inset: 0;
  z-index: var(--z-drawer);
}

.drawer[hidden] {
  display: none;
}

.drawer-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(5, 22, 44, 0.5);
}

.drawer-panel {
  position: absolute;
  inset-block: 0;
  inset-inline-end: 0;
  display: flex;
  flex-direction: column;
  gap: var(--sp-5);
  width: min(360px, 88vw);
  padding: var(--sp-4) var(--sp-5) calc(var(--sp-6) + env(safe-area-inset-bottom));
  overflow-y: auto;
  background: var(--c-white);
  box-shadow: var(--sh-lg);
  animation: drawer-in 220ms var(--ease);
}

@keyframes drawer-in {
  from { transform: translateX(24px); opacity: 0; }
}

[dir="rtl"] .drawer-panel {
  animation-name: drawer-in-rtl;
}

@keyframes drawer-in-rtl {
  from { transform: translateX(-24px); opacity: 0; }
}

.drawer-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.drawer-title {
  font-size: var(--fs-18);
  font-weight: var(--fw-bold);
}

.drawer-nav {
  margin: 0;
  padding: 0;
  list-style: none;
}

.drawer-nav a {
  display: flex;
  align-items: center;
  gap: var(--sp-3);
  min-height: 52px;
  border-block-end: 1px solid var(--c-border);
  font-weight: var(--fw-semibold);
}

.drawer-nav .icon {
  color: var(--c-navy-600);
}

.drawer-nav--secondary a {
  min-height: 46px;
  font-weight: var(--fw-medium);
  color: var(--c-grey-600);
}

.drawer-prefs {
  display: flex;
  gap: var(--sp-3);
}

/* ------------------------------------------------------------------- Toast */
.toast {
  position: fixed;
  inset-inline: 0;
  inset-block-end: calc(var(--sp-6) + env(safe-area-inset-bottom));
  z-index: var(--z-toast);
  width: max-content;
  max-width: calc(100% - 2rem);
  margin-inline: auto;
  padding: var(--sp-3) var(--sp-5);
  border-radius: var(--r-pill);
  background: var(--c-navy-900);
  color: var(--c-white);
  font-size: var(--fs-14);
  box-shadow: var(--sh-lg);
}

/* ============================================================ Responsive */
@media (max-width: 1239px) {
  .tool-btn--text {
    display: none;
  }
}

@media (max-width: 1099px) {
  .main-nav {
    display: none;
  }

  .menu-btn {
    display: inline-flex;
  }
}

@media (max-width: 767px) {
  .brand-mark {
    width: 40px;
  }

  .brand-name {
    font-size: 1.4rem;
  }

  .brand-tagline {
    font-size: 0.55rem;
  }

  .header-tools .dropdown {
    display: none;
  }

  /* Bottom navigation */
  body {
    padding-block-end: calc(var(--bottom-nav-h) + env(safe-area-inset-bottom));
  }

  .bottom-nav {
    position: fixed;
    inset-inline: 0;
    inset-block-end: 0;
    z-index: var(--z-bottom-nav);
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    align-items: end;
    height: calc(var(--bottom-nav-h) + env(safe-area-inset-bottom));
    padding-block-end: env(safe-area-inset-bottom);
    background: var(--c-white);
    border-block-start: 1px solid var(--c-border);
    box-shadow: 0 -4px 16px rgba(7, 25, 55, 0.06);
  }

  .bottom-nav > a,
  .bottom-nav > button {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 3px;
    height: var(--bottom-nav-h);
    min-width: 0;
    font-size: 0.6875rem;
    font-weight: var(--fw-semibold);
    color: var(--c-grey-500);
  }

  .bottom-nav span {
    max-width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .bottom-nav .icon {
    width: 24px;
    height: 24px;
  }

  .bottom-nav [aria-current="page"] {
    color: var(--c-navy-900);
  }

  .bottom-nav [aria-current="page"] .icon {
    color: var(--c-orange-500);
  }

  .bottom-nav-ask {
    color: var(--c-navy-900) !important;
  }

  .bottom-nav-avatar {
    display: grid;
    place-items: center;
    width: 48px;
    height: 48px;
    margin-block-start: -18px;
    border-radius: 50%;
    background: var(--c-navy-900);
    box-shadow: 0 0 0 3px var(--c-white), 0 4px 10px rgba(7, 25, 55, 0.25);
  }

  .bottom-nav-avatar img {
    width: 40px;
    border-radius: 50%;
  }

  .toast {
    inset-block-end: calc(var(--bottom-nav-h) + var(--sp-4) + env(safe-area-inset-bottom));
  }

  /* Footer → accordions */
  .site-footer {
    padding-block-start: var(--sp-8);
  }

  .footer-top {
    grid-template-columns: 1fr;
    gap: var(--sp-6);
    padding-block-end: var(--sp-4);
  }

  .footer-cols {
    grid-template-columns: 1fr;
    gap: 0;
  }

  .footer-col {
    border-block-start: 1px solid rgba(255, 255, 255, 0.12);
  }

  .footer-col summary {
    min-height: 52px;
    margin: 0;
    cursor: pointer;
    pointer-events: auto;
  }

  .footer-col summary .icon {
    display: block;
    transition: transform var(--dur) var(--ease);
  }

  .footer-col[open] summary .icon {
    transform: rotate(180deg);
  }

  .footer-col ul {
    padding-block-end: var(--sp-4);
  }

  .footer-col a {
    padding-block: 6px;
  }

  .footer-bottom {
    flex-direction: column;
    align-items: flex-start;
  }
}

/* Header on very narrow phones (shared by every page) */
@media (max-width: 359px) {
  .brand-tagline {
    display: none;
  }
}

/* ==========================================================================
   Shared since Task 003 (moved verbatim from listing.css so the listing and
   detail pages use one copy): buttons, badges, breadcrumb, Ask Uncle card
   and the Ask Uncle prototype panel.
   ========================================================================== */

/* ------------------------------------------- Buttons · links · badges */
.btn--outline {
  background: var(--c-white);
  color: var(--c-navy-900);
  border: 1px solid var(--c-grey-300);
}

.btn--outline:hover {
  border-color: var(--c-navy-600);
  background: var(--c-grey-50);
}

.link-btn {
  min-height: 32px;
  font-size: var(--fs-14);
  font-weight: var(--fw-semibold);
  color: var(--c-blue-600);
}

.link-btn:hover {
  text-decoration: underline;
  text-underline-offset: 3px;
}

.badge {
  display: inline-flex;
  align-items: center;
  min-height: 22px;
  padding: 0 0.6rem;
  border-radius: var(--r-pill);
  font-size: var(--fs-12);
  font-weight: var(--fw-semibold);
  line-height: 1;
  white-space: nowrap;
}

.badge--highlight {
  background: var(--c-orange-100);
  color: var(--c-orange-600);
}

.badge--positive {
  background: #e7f5ee;
  color: #1e7a50;
}

.badge--neutral {
  background: var(--c-grey-100);
  color: var(--c-navy-800);
}

/* ------------------------------------------------------------ Breadcrumb */
.breadcrumb ol {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 4px;
  margin: 0;
  padding: var(--sp-3) 0 var(--sp-4);
  font-size: var(--fs-13);
  color: var(--c-text-muted);
}

.breadcrumb li {
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.breadcrumb .icon {
  width: 14px;
  height: 14px;
}

.breadcrumb a:hover {
  color: var(--c-navy-900);
  text-decoration: underline;
  text-underline-offset: 3px;
}

.breadcrumb [aria-current="page"] {
  color: var(--c-navy-900);
  font-weight: var(--fw-semibold);
}

/* ----------------------------------------------------- Ask Uncle (inline) */
.assist-card {
  display: flex;
  align-items: center;
  gap: var(--sp-4);
  padding: var(--sp-4) var(--sp-5);
  background: var(--c-cream-100);
  border: 1px solid #f0e4d6;
  border-radius: var(--r-lg);
}

.assist-avatar {
  width: 52px;
  flex: none;
  border-radius: 50%;
}

.assist-text {
  flex: 1;
  min-width: 0;
  font-size: var(--fs-14);
  color: var(--c-grey-600);
}

.assist-title {
  font-size: var(--fs-15);
  font-weight: var(--fw-bold);
  color: var(--c-navy-900);
}

/* ------------------------------------------------- Ask Uncle (dialog) */
.ask-dialog {
  width: min(460px, calc(100% - 2rem));
  padding: 0;
  border: 0;
  border-radius: var(--r-xl);
  box-shadow: var(--sh-lg);
  color: var(--c-navy-900);
}

.ask-dialog::backdrop {
  background: rgba(5, 22, 44, 0.5);
}

.ask-dialog-inner {
  display: grid;
  gap: var(--sp-4);
  padding: var(--sp-5);
}

.ask-dialog-head {
  display: flex;
  align-items: center;
  gap: var(--sp-3);
}

.ask-dialog-head img {
  width: 48px;
  border-radius: 50%;
}

.ask-dialog-head > div {
  flex: 1;
}

.ask-dialog-eyebrow {
  font-size: var(--fs-12);
  font-weight: var(--fw-bold);
  color: var(--c-orange-600);
}

.ask-dialog-title {
  font-size: var(--fs-18);
  font-weight: var(--fw-bold);
  line-height: 1.25;
}

.ask-dialog .bubble--uncle {
  background: var(--c-cream-100);
  box-shadow: none;
}

.ask-chips {
  display: flex;
  flex-wrap: wrap;
  gap: var(--sp-2);
}

.ask-input {
  display: flex;
  gap: var(--sp-2);
}

.ask-input input {
  flex: 1;
  min-width: 0;
  min-height: var(--tap);
  padding-inline: var(--sp-3);
  border: 1px solid var(--c-grey-300);
  border-radius: var(--r-md);
  font-size: var(--fs-14);
}

.ask-input input:focus {
  outline: none;
  border-color: var(--c-navy-600);
  box-shadow: 0 0 0 3px rgba(29, 58, 99, 0.12);
}

.ask-dialog-note {
  font-size: var(--fs-12);
  color: var(--c-text-muted);
}

/* ----------------------------------------------- Soft button · action pill */
.btn--soft {
  background: #eaf1fb;
  color: var(--c-navy-800);
}

.btn--soft:hover {
  background: #dde8f7;
}

.btn--soft img {
  width: 24px;
  border-radius: 50%;
}

.action-btn,
.wish-btn--inline {
  position: static;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  width: auto;
  height: auto;
  min-height: 40px;
  padding: 0 0.9rem;
  border: 1px solid var(--c-border);
  border-radius: var(--r-pill);
  background: var(--c-white);
  color: var(--c-navy-900);
  font-size: var(--fs-14);
  font-weight: var(--fw-semibold);
  backdrop-filter: none;
}

.action-btn:hover,
.wish-btn--inline:hover {
  background: var(--c-grey-50);
}

.action-btn .icon,
.wish-btn--inline .icon {
  width: 18px;
  height: 18px;
}

.wish-btn--inline[aria-pressed="true"] {
  color: var(--c-orange-600);
  border-color: var(--c-orange-100);
  background: var(--c-orange-100);
}

/* ------------------------------------------------------------------ Stars */
.stars {
  display: inline-flex;
  gap: 2px;
  color: var(--c-orange-400);
}

.stars .icon {
  width: 18px;
  height: 18px;
}

.stars .icon.is-empty {
  color: var(--c-grey-200);
}

.stars--sm .icon {
  width: 14px;
  height: 14px;
}

/* -------------------------------------------------------------- Accordion */
.accordion {
  border-block-start: 1px solid var(--c-border);
}

.accordion details {
  border-block-end: 1px solid var(--c-border);
}

.accordion summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--sp-4);
  min-height: 56px;
  padding-block: var(--sp-3);
  font-size: var(--fs-15);
  font-weight: var(--fw-semibold);
  color: var(--c-navy-900);
  list-style: none;
  cursor: pointer;
}

.accordion summary::-webkit-details-marker {
  display: none;
}

.accordion summary .icon {
  flex: none;
  transition: transform var(--dur) var(--ease);
}

.accordion details[open] summary .icon {
  transform: rotate(180deg);
}

.accordion details p {
  max-width: 68ch;
  padding-block-end: var(--sp-4);
  font-size: var(--fs-15);
  color: var(--c-grey-600);
}

/* ---------------------------------------------------------- Price block */
.price-block {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  line-height: 1.25;
}

.price-from,
.price-unit {
  font-size: var(--fs-13);
  color: var(--c-text-muted);
}

.price-block strong {
  font-size: 1.5rem;
  font-weight: var(--fw-extrabold);
  letter-spacing: -0.01em;
  color: var(--c-navy-900);
}

@media (max-width: 767px) {
  .assist-card {
    flex-wrap: wrap;
    padding: var(--sp-4);
  }

  .assist-avatar {
    width: 44px;
  }

  .assist-card .btn {
    width: 100%;
  }

  .ask-dialog {
    margin-block-end: 0;
    width: 100%;
    max-width: 100%;
    border-radius: var(--r-xl) var(--r-xl) 0 0;
  }

  .ask-dialog-inner {
    padding-block-end: calc(var(--sp-5) + env(safe-area-inset-bottom));
  }
}

/* ==========================================================================
   Overnight run additions (Task 005): cart entry, price bidi isolation,
   minimal footer. Shared by every page that carries the header/footer.
   ========================================================================== */

/* Formatted amounts stay one unit inside RTL / mixed-direction text */
[data-price] {
  unicode-bidi: isolate;
}

/* ---------------------------------------------------------- Header cart */
.cart-btn {
  position: relative;
}

.cart-count {
  position: absolute;
  inset-block-start: 4px;
  inset-inline-end: 2px;
  display: grid;
  place-items: center;
  min-width: 18px;
  height: 18px;
  padding-inline: 4px;
  border-radius: var(--r-pill);
  background: var(--c-orange-500);
  color: var(--c-white);
  font-size: 0.6875rem;
  font-weight: var(--fw-bold);
  line-height: 1;
  box-shadow: 0 0 0 2px var(--c-white);
}

.cart-count[hidden] {
  display: none;
}

.tool-btn[aria-current="page"] {
  color: var(--c-orange-600);
}

/* --------------------------------------------- Minimal footer (checkout) */
.site-footer--minimal {
  padding-block: var(--sp-6);
}

.site-footer--minimal .footer-bottom {
  padding-block-start: 0;
}

@media (max-width: 767px) {
  /* Mobile header keeps cart + menu; account lives in the drawer & bottom nav */
  .header-account {
    display: none;
  }
}
