/* Store surfaces below the campaign. The header and campaign retain their own styles. */
#root {
  --catalog-ink: #152334;
  --catalog-muted: #526174;
  --catalog-line: #e3e8ee;
  --catalog-wash: #f2f5f8;
  --catalog-blue: #0664bf;
}

#root .studio-catalog > .storefront-content > .store-quick-links {
  grid-area: 3 / 1 / auto / -1;
  order: 2;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  width: min(640px, 100%);
  margin: 18px auto 24px;
  gap: 8px;
}

#root .store-quick-links a {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: start;
  gap: 8px;
  text-align: center;
  text-decoration: none;
  color: var(--catalog-ink);
  font-size: 13px;
  font-weight: 600;
  line-height: 1.35;
  padding: 4px 2px;
  border-radius: 12px;
}

#root .store-quick-links a > span {
  display: grid;
  place-items: center;
  width: 50px;
  height: 50px;
  border-radius: 50%;
  background: var(--catalog-wash);
  color: #263f59;
}

#root .store-quick-links a:hover > span { background: #e5f0fc; color: var(--catalog-blue); }
#root .store-quick-links svg { width: 23px; height: 23px; }

#root .studio-catalog > .storefront-content > .store-service-card {
  grid-area: 4 / 1 / auto / -1;
  order: 3;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 30px;
  position: relative;
  isolation: isolate;
  overflow: hidden;
  min-width: 0;
  padding: clamp(24px, 4vw, 46px);
  border-radius: 24px;
  background: #123c34;
  color: #fff;
}

#root .store-service-copy { position: relative; z-index: 1; }
#root .store-service-card h2 {
  color: #fff;
  margin: 0;
  font-size: clamp(24px, 3.35vw, 40px);
  font-weight: 600;
  letter-spacing: -.035em;
  line-height: 1.12;
}

#root .store-service-card p { margin: 10px 0 18px; color: #d8e9e3; font-size: 14px; line-height: 1.5; }
#root .store-service-card a {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  min-height: 44px;
  border-radius: 999px;
  padding: 0 16px;
  background: #fff;
  color: #123c34;
  text-decoration: none;
  font-size: 13px;
  font-weight: 600;
}

#root .store-service-card a:hover { background: #e6f2ec; }
#root .store-service-card a svg { width: 17px; height: 17px; }
#root .store-service-symbol {
  display: grid;
  place-items: center;
  flex: none;
  width: clamp(105px, 13vw, 176px);
  aspect-ratio: 1;
  color: #a8d4c5;
  border: 1px solid #a8d4c553;
  border-radius: 50%;
  background: #ffffff0b;
}

#root .store-service-symbol svg { width: 58%; height: 58%; stroke-width: 1.15; }
#root .store-quick-links a:focus-visible, #root .store-service-card a:focus-visible { outline: 2px solid var(--catalog-blue); outline-offset: 4px; }
#root .store-service-card a:focus-visible { outline-color: #fff; }

#root .studio-catalog:not(.is-new-devices):not(.favorites-catalog) #store-catalog { grid-row: 5; order: 4; }
#root .studio-catalog:not(.is-new-devices):not(.favorites-catalog) .edit-category-rail { grid-row: 5; order: 4; }
#root .studio-catalog:not(.is-new-devices):not(.favorites-catalog) .catalog-query { grid-area: 6 / 1 / auto / -1; order: 5; }
#root .studio-catalog:not(.is-new-devices):not(.favorites-catalog) :is(.product-grid, .empty-catalog, .store-state) { grid-area: 7 / 1 / auto / -1; order: 6; }
#root .studio-catalog:not(.is-new-devices):not(.favorites-catalog) .catalog-demo-notice { grid-area: 8 / 1 / auto / -1; order: 7; }
#root .store-catalog-filtered > .storefront-content > :is(.store-quick-links, .store-service-card) { display: none; }
#root .studio-catalog:is(.is-new-devices, .favorites-catalog) > .storefront-content > :is(.store-quick-links, .store-service-card) { display: none; }

#root .studio-catalog #store-catalog { scroll-margin-top: 18px; }
#root .studio-catalog #store-catalog h2 { font-weight: 600; color: var(--catalog-ink); }
#root .studio-catalog .product-grid { gap: 18px; align-items: stretch; }
#root .studio-catalog .product-grid .product-card {
  padding: 0;
  min-width: 0;
  border: 1px solid var(--catalog-line);
  border-radius: 20px;
  background: #fff;
  box-shadow: none;
}

#root .studio-catalog .product-grid .product-card-open {
  display: flex;
  width: 100%;
  flex-direction: column;
  align-items: stretch;
  gap: 0;
  border-radius: inherit;
  text-align: left;
}

#root .studio-catalog .product-grid .product-card-image {
  display: grid;
  place-items: center;
  width: 100%;
  height: auto;
  min-height: 0;
  flex: none;
  aspect-ratio: 1.05;
  border-radius: 19px 19px 12px 12px;
  background: var(--catalog-wash);
}

#root .studio-catalog .product-grid .product-card-image img {
  display: block;
  position: absolute;
  inset: 50% auto auto 50%;
  width: auto;
  max-width: calc(100% - 16px);
  height: calc(100% - 16px);
  object-fit: contain;
  border-radius: 8px;
  transform: translate(-50%, -50%);
}

#root .studio-catalog .product-grid .card-favorite { top: 9px; right: 9px; width: 44px; height: 44px; box-shadow: none; }
#root .studio-catalog .product-grid .card-photo-count { bottom: 9px; right: 9px; }
#root .studio-catalog .product-grid .product-card-body {
  display: flex;
  flex-direction: column;
  flex: 1;
  width: 100%;
  min-width: 0;
  padding: 14px 15px 5px;
  box-sizing: border-box;
}

#root .studio-catalog .product-grid .product-card h3 {
  color: var(--catalog-ink);
  font-size: clamp(16px, 1.55vw, 22px);
  line-height: 1.22;
  font-weight: 600;
  overflow-wrap: anywhere;
}

#root .studio-catalog .product-grid :is(.product-card-meta, .card-history, .card-packaging) {
  color: var(--catalog-muted);
  font-size: 12px;
  line-height: 1.5;
  white-space: normal;
  overflow-wrap: anywhere;
}

#root .studio-catalog .product-grid .card-device-facts { gap: 9px 14px; padding: 0; margin: 10px 0 5px; }
#root .studio-catalog .product-grid .card-device-facts > div { min-width: 0; }
#root .studio-catalog .product-grid .card-device-facts dt { color: var(--catalog-muted); }
#root .studio-catalog .product-grid .card-device-facts dd { font-size: 13px; }
#root .studio-catalog .product-grid .retail-battery-fact { grid-template-columns: 36px auto; gap: 6px; }
#root .studio-catalog .product-grid .retail-battery-fact dd { width: 36px; height: 36px; font-size: 11px; }
#root .studio-catalog .product-grid .card-packaging { margin-bottom: 8px; }
#root .studio-catalog .product-grid .product-card-bottom {
  margin-top: auto;
  padding-top: 9px;
  border-top: 1px solid var(--catalog-line);
}

#root .studio-catalog .product-grid .card-price-pending .product-card-price strong { color: var(--catalog-muted); font-size: 11px; }
#root .studio-catalog .product-grid .card-detail-link { min-height: 38px; color: var(--catalog-blue); font-size: 13px; }

#root .product-page .gallery-main { border-radius: 22px; background: var(--catalog-wash); overflow: hidden; }
#root .product-page .gallery-main > img { object-fit: contain; }
#root .product-page .product-intro h1 { color: var(--catalog-ink); font-weight: 600; }
#root .product-page .detail-tabs { margin-bottom: 18px; }
#root .product-page .detail-tabs > button { min-height: 44px; }
#root .product-page .device-condition-report { background: var(--catalog-wash); border-color: var(--catalog-line); box-shadow: none; }
#root .product-page .condition-report-heading { background: transparent; }
#root .product-page .condition-report-layout { gap: 16px; }
#root .product-page .condition-overview {
  border: 1px solid var(--catalog-line);
  border-radius: 16px;
  background: #fff;
  overflow: hidden;
}

#root .product-page .condition-overview :is(.condition-battery, .condition-facts) {
  border: 0;
  box-shadow: none;
  border-radius: 0;
  margin: 0;
}

#root .product-page .condition-overview .condition-battery { border-bottom: 1px solid var(--catalog-line); }
#root .product-page .condition-parts { border-color: var(--catalog-line); }
#root .store-footer { background: var(--catalog-wash); border-color: var(--catalog-line); }
#root .store-footer .footer-inner { gap: clamp(22px, 4vw, 54px); }
#root .store-footer .footer-contact-actions a { min-height: 44px; }

@media (min-width: 1100px) {
  #root .studio-catalog .product-grid:not(:has(.product-card:only-child)) { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}

@media (max-width: 700px) {
  #root .studio-catalog > .storefront-content > .store-quick-links {
    width: auto;
    margin: 12px 16px 16px;
    gap: 5px;
  }

  #root .store-quick-links a { font-size: 11px; }
  #root .store-quick-links a > span { width: 46px; height: 46px; }
  #root .store-quick-links svg { width: 21px; height: 21px; }
  #root .studio-catalog > .storefront-content > .store-service-card { margin-inline: 16px; padding: 22px; border-radius: 22px; }
  #root .store-service-card h2 { max-width: 220px; }
  #root .store-service-card p { max-width: 235px; font-size: 13px; }
  #root .store-service-symbol { position: absolute; right: -23px; top: -24px; opacity: .23; transform: rotate(-12deg); }
  #root .studio-catalog .product-grid { gap: 11px; }
  #root .studio-catalog .product-grid .product-card { border-radius: 15px; }
  #root .studio-catalog .product-grid .product-card-image { border-radius: 14px 14px 9px 9px; }
  #root .studio-catalog .product-grid .product-card-image img { max-width: calc(100% - 12px); height: calc(100% - 12px); }
  #root .studio-catalog .product-grid .product-card-body { padding: 10px 10px 4px; }
  #root .studio-catalog .product-grid .product-card h3 { font-size: 15px; }
  #root .studio-catalog .product-grid :is(.product-card-meta, .card-history, .card-packaging) { font-size: 11px; }
  #root .studio-catalog .product-grid .card-favorite { top: 5px; right: 5px; }
  #root .studio-catalog .product-grid .card-detail-link { font-size: 12px; }
  #root .product-page .gallery-main { aspect-ratio: 4 / 4.4; }
  #root .product-page .gallery-thumbs {
    display: flex;
    justify-content: flex-start;
    width: 100%;
    height: auto;
    margin: 8px 0 18px;
    padding: 2px 2px 5px;
    gap: 7px;
    overflow-x: auto;
    box-sizing: border-box;
  }
  #root .product-page .gallery-thumbs .thumb {
    display: block;
    flex: 0 0 48px;
    width: 48px;
    min-height: 48px;
    border: 1px solid var(--catalog-line);
    border-radius: 9px;
    background: var(--catalog-wash);
    overflow: hidden;
  }
  #root .product-page .gallery-thumbs .thumb img { display: block; width: 100%; height: 100%; object-fit: contain; }
  #root .product-page .gallery-thumbs .thumb::after { display: none; }
  #root .product-page .gallery-thumbs .thumb.selected { border: 2px solid var(--catalog-blue); }
  #root .product-page .device-purchase-facts { display: flex; flex-wrap: wrap; gap: 12px; }
  #root .product-page .condition-report-layout { padding: 12px; }
  #root .store-footer .footer-inner { display: grid; grid-template-columns: minmax(0,1fr) minmax(0,1fr); }
  #root .store-footer :is(.footer-brand, .footer-contact) { grid-column: 1 / -1; }
}
