/* MacCollys store polish — batch 2. Does not change the eBay badge or footer. */

.mc-sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.mc-header-search {
  display: flex;
  flex-direction: row;
  align-items: stretch;
  /* 16rem basis is horizontal only — the desktop form sits in a row.
     A fixed 40px height prevents that basis from becoming a 16rem-tall
     bar when the mobile form is a column flex item in the header. */
  flex: 1 1 16rem;
  max-width: 28rem;
  min-width: 0;
  height: 2.5rem;
  min-height: 2.5rem;
  max-height: 2.5rem;
  box-sizing: border-box;
}
/* Compiled Tailwind is missing md:flex / md:hidden / md:inline, so visibility is owned here. */
.mc-header-search--desktop { display: none; }
.mc-header-search--mobile {
  display: flex;
  flex: 0 0 auto; /* do not use 16rem as a vertical flex-basis */
  max-width: none;
  width: 100%;
  height: 2.5rem;
  min-height: 2.5rem;
  max-height: 2.5rem;
}
.mc-nav-desktop { display: none; }
.mc-nav-desktop-flex { display: none; }
.mc-header-search input[type="search"],
.mc-header-search input[type="text"] {
  flex: 1 1 auto;
  min-width: 0;
  height: 100%;
  max-height: 2.5rem;
  box-sizing: border-box;
  border: 1px solid #e5e7eb;
  border-right: 0;
  border-radius: 0.375rem 0 0 0.375rem;
  padding: 0 0.75rem;
  background: #fff;
  color: #111827;
  font-size: 0.875rem;
  line-height: 1.25;
  -webkit-appearance: none;
  appearance: none;
}
.mc-header-search button {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 100%;
  max-height: 2.5rem;
  box-sizing: border-box;
  border-radius: 0 0.375rem 0.375rem 0;
  padding: 0 0.9rem;
  background: #2563eb;
  color: #fff;
  font-size: 0.875rem;
  font-weight: 600;
  line-height: 1;
  border: 1px solid #2563eb;
  -webkit-appearance: none;
  appearance: none;
}
.mc-header-search button:hover {
  background: #1d4ed8;
  border-color: #1d4ed8;
}
.mc-menu-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.5rem;
  height: 2.5rem;
  border-radius: 0.375rem;
  border: 1px solid #e5e7eb;
  background: #fff;
  color: #111827;
}
.mc-mobile-menu {
  display: none;
  border-top: 1px solid #e5e7eb;
  padding: 0.75rem 0 0.25rem;
}
.mc-mobile-menu.is-open {
  display: block;
}
.mc-mobile-menu a {
  display: block;
  padding: 0.55rem 0.25rem;
  font-weight: 600;
  color: #111827;
}
.mc-mobile-menu a:hover {
  color: #2563eb;
}
.mc-category-pills {
  display: none;
}

@media (min-width: 768px) {
  .mc-menu-btn { display: none !important; }
  .mc-mobile-menu,
  .mc-mobile-menu.is-open { display: none !important; }
  .mc-category-pills { display: flex; flex-wrap: wrap; gap: 0.5rem; }
  .mc-header-search--desktop { display: flex; }
  .mc-header-search--mobile { display: none !important; }
  .mc-nav-desktop { display: inline; }
  .mc-nav-desktop-flex { display: flex; align-items: center; gap: 0.75rem; }
}

@media (max-width: 767px) {
  header .logo-wrap {
    width: 48px;
    height: 48px;
  }
  header .mc-wordmark {
    font-size: 1.25rem;
  }
}

.mc-product-card__media {
  position: relative;
}
.mc-soldout-ribbon {
  position: absolute;
  top: 0.7rem;
  left: -0.4rem;
  z-index: 2;
  background: #111827;
  color: #fff;
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  padding: 0.28rem 0.7rem;
  box-shadow: 0 1px 2px rgba(0,0,0,0.2);
}
.mc-soldout-ribbon::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: -6px;
  border-style: solid;
  border-width: 0 6px 6px 0;
  border-color: transparent #111827 transparent transparent;
  filter: brightness(0.7);
}
.mc-condition-badge {
  position: absolute;
  right: 0.5rem;
  bottom: 0.5rem;
  z-index: 2;
  background: rgba(255,255,255,0.95);
  color: #1e3a8a;
  border: 1px solid #bfdbfe;
  font-size: 0.65rem;
  font-weight: 700;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  padding: 0.2rem 0.45rem;
  border-radius: 999px;
}
.mc-condition-badge--open_box,
.mc-condition-badge--refurbished,
.mc-condition-badge--used,
.mc-condition-badge--damaged,
.mc-condition-badge--for_parts {
  background: #fff7ed;
  color: #9a3412;
  border-color: #fdba74;
}
.mc-condition-badge--new,
.mc-condition-badge--like_new {
  background: #ecfdf5;
  color: #065f46;
  border-color: #6ee7b7;
}
.mc-price-row {
  display: flex;
  align-items: baseline;
  gap: 0.5rem;
  flex-wrap: wrap;
}
.mc-compare-at {
  font-size: 0.8rem;
  color: #6b7280;
  text-decoration: line-through;
  font-weight: 500;
}
.mc-product-page-price .mc-compare-at {
  font-size: 1rem;
}

.mc-hero-mosaic {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.75rem;
}
.mc-hero-tile {
  position: relative;
  display: block;
  overflow: hidden;
  border-radius: 0.75rem;
  background: #f3f4f6;
  aspect-ratio: 1 / 1;
  min-height: 0;
}
.mc-hero-tile img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.mc-hero-tile:hover img {
  transform: scale(1.03);
  transition: transform 0.3s ease;
}

.mc-review-banner {
  border: 1px solid #f59e0b;
  background: #fffbeb;
  color: #92400e;
  border-radius: 0.5rem;
  padding: 1rem 1.1rem;
  margin-bottom: 1.25rem;
}

@media (min-width: 1024px) {
  .mc-thumb-hint-mobile { display: none; }
}

/* Dark mode */
@media (prefers-color-scheme: dark) {
  .mc-header-search input[type="search"],
  .mc-header-search input[type="text"] {
    border-color: #374151;
    background: #111827;
    color: #f9fafb;
  }
  .mc-menu-btn {
    border-color: #374151;
    background: #111827;
    color: #f9fafb;
  }
  .mc-mobile-menu { border-top-color: #374151; }
  .mc-mobile-menu a { color: #f9fafb; }
  .mc-soldout-ribbon { background: #f9fafb; color: #111827; }
  .mc-soldout-ribbon::after { border-color: transparent #d1d5db transparent transparent; }
  .mc-condition-badge {
    background: rgba(17,24,39,0.92);
    color: #bfdbfe;
    border-color: #1e3a8a;
  }
  .mc-condition-badge--open_box,
  .mc-condition-badge--refurbished,
  .mc-condition-badge--used,
  .mc-condition-badge--damaged,
  .mc-condition-badge--for_parts {
    color: #fdba74;
    border-color: #9a3412;
  }
  .mc-condition-badge--new,
  .mc-condition-badge--like_new {
    color: #6ee7b7;
    border-color: #065f46;
  }
  .mc-compare-at { color: #9ca3af; }
  .mc-hero-tile { background: #1f2937; }
  .mc-review-banner {
    background: #451a03;
    border-color: #b45309;
    color: #fde68a;
  }
}

/* Sticky add-to-cart (shown when the product-page ATC block scrolls away) */
.mc-sticky-atc {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 40;
  background: rgba(255, 255, 255, 0.96);
  border-top: 1px solid #e5e7eb;
  box-shadow: 0 -8px 24px rgba(15, 23, 42, 0.08);
  padding: 0.75rem 1rem calc(0.75rem + env(safe-area-inset-bottom, 0px));
}
.mc-sticky-atc[hidden] { display: none; }
.mc-sticky-atc__inner {
  max-width: 72rem;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
}
.mc-sticky-atc__name {
  font-size: 0.8rem;
  font-weight: 600;
  color: #111827;
  line-height: 1.2;
  max-width: 14rem;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.mc-sticky-atc__price {
  font-size: 0.95rem;
  font-weight: 700;
  color: #111827;
}
.mc-sticky-atc__btn {
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: #1d4ed8;
  color: #fff;
  font-weight: 600;
  font-size: 0.9rem;
  padding: 0.7rem 1rem;
  border-radius: 0.375rem;
  text-decoration: none;
  border: 0;
  cursor: pointer;
}
.mc-sticky-atc__btn:hover { background: #2563eb; }
@media (prefers-color-scheme: dark) {
  .mc-sticky-atc {
    background: rgba(17, 24, 39, 0.96);
    border-top-color: #374151;
  }
  .mc-sticky-atc__name,
  .mc-sticky-atc__price { color: #f9fafb; }
}
body:has(#mcStickyAtc:not([hidden])) {
  padding-bottom: 5.5rem;
}

/* Keep product thumbs from inflating via width/height attributes */
.thumb-btn img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
#mainImage {
  height: auto;
  max-height: 480px;
}
