/* AppleHunt v12: responsive catalog, stable cart and clearer product choices. */

.product-media-column,
.product-media-column.is-color-changing {
  opacity: 1;
  transform: none;
  transition: none;
}

.app {
  padding-bottom: 0;
}

.site-footer {
  margin-top: 48px;
  padding-top: 42px;
  padding-bottom: 42px;
}

.site-footer__grid {
  grid-template-columns: minmax(240px, 1.2fr) repeat(3, minmax(160px, 0.8fr));
}

.site-footer__brand {
  gap: 10px;
}

.site-footer__brand p {
  max-width: 330px;
}

.site-footer__brand .footer-hours {
  color: #343a41;
  font-weight: 700;
}

.footer-contacts p + p {
  margin-top: 2px;
}

.site-footer__legal {
  margin-top: 34px;
}

.cart-preview-content {
  background: #fff;
}

@media (min-width: 1181px) {
  .catalog {
    align-items: start;
    grid-auto-rows: 406px;
  }

  .product-card {
    height: 406px;
    min-height: 0;
    align-self: start;
  }

  .product-media-wrapper,
  .product-media-column,
  .product-media,
  .product-gallery,
  .product-gallery-slide {
    height: 208px;
    min-height: 208px;
    max-height: 208px;
  }

  .product-media-wrapper,
  .product-media-column,
  .product-media {
    flex: 0 0 208px;
  }

  .product-gallery-slide {
    flex-basis: 100%;
  }

  .product-gallery-slide img {
    width: 100%;
    height: 100%;
    max-height: 188px;
  }
}

@media (min-width: 1181px) and (max-width: 1480px) {
  .catalog {
    grid-auto-rows: 378px;
  }

  .product-card {
    height: 378px;
  }

  .product-media-wrapper,
  .product-media-column,
  .product-media,
  .product-gallery,
  .product-gallery-slide {
    height: 184px;
    min-height: 184px;
    max-height: 184px;
  }

  .product-media-wrapper,
  .product-media-column,
  .product-media {
    flex-basis: 184px;
  }

  .product-gallery-slide img {
    max-height: 164px;
  }
}

@media (min-width: 861px) {
  .cart-preview-content {
    width: min(1120px, calc(100vw - 48px));
    max-width: 1120px;
    height: min(760px, calc(100dvh - 48px));
    max-height: calc(100dvh - 48px);
    overflow: hidden;
    border-radius: 24px;
  }

  .cart-preview-header {
    padding: 30px 34px 22px;
  }

  .cart-preview-title h2 {
    font-size: 38px;
  }

  .cart-preview-scroll {
    flex: 1 1 auto;
    grid-template-columns: minmax(0, 2fr) minmax(320px, 0.82fr);
    gap: 0;
    padding: 0 34px 22px;
  }

  .cart-preview-order {
    min-height: 100%;
    padding: 10px 28px 0 0;
    border: 0;
    border-right: 1px solid #e1e4e7;
    border-radius: 0;
  }

  .cart-preview-suggestions-wrapper {
    min-height: 100%;
    margin-left: 20px;
    padding: 17px;
    overflow: auto;
    border-radius: 16px;
  }

  .cart-preview-item {
    min-height: 190px;
    grid-template-columns: 168px minmax(0, 1fr) auto 38px;
    gap: 20px;
    padding: 18px 0;
  }

  .cart-preview-thumb {
    width: 168px;
    height: 168px;
    padding: 8px;
    border: 0;
    border-radius: 16px;
    background: #f7f8f9;
  }

  .cart-preview-item-title {
    font-size: 18px;
    line-height: 1.2;
  }

  .cart-preview-item-meta {
    display: grid;
    gap: 7px;
    font-size: 13px;
  }

  .cart-preview-purchase {
    min-width: 138px;
    gap: 16px;
  }

  .cart-preview-item-total {
    font-size: 20px;
  }

  .cart-preview-item-cash {
    font-size: 12px;
  }

  .cart-preview-cta {
    grid-template-columns: minmax(0, 1fr) minmax(360px, 0.75fr);
    padding: 20px 34px;
  }

  .cart-preview-cta #cart-preview-checkout.glass-button.primary {
    min-height: 58px;
    font-size: 15px;
  }
}

@media (max-width: 1180px) {
  .site-footer__grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 760px) {
  .catalog {
    grid-auto-rows: auto;
  }

  .product-card {
    height: auto;
  }

  .site-footer {
    margin-top: 40px;
    padding: 38px 20px 94px;
  }

  body:not(.cart-has-items) .site-footer {
    padding-bottom: 38px;
  }

  .site-footer__grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 28px 20px;
  }
}

@media (max-width: 460px) {
  .site-footer__grid {
    grid-template-columns: minmax(0, 1fr);
  }
}

/* The cart stays anchored: feedback no longer changes its size or position. */
.cart-fab--pulse {
  animation: none !important;
}

.product-card[data-product-id="poco-f7-pro"] .product-gallery-slide img {
  object-fit: contain;
  object-position: center;
}

.cart-fab {
  transition: box-shadow 180ms ease, border-color 180ms ease, opacity 180ms ease;
}

/* A selected finish is marked by a neutral check badge instead of a coral halo. */
.variant-pills {
  min-width: 0;
  flex-wrap: nowrap;
  align-items: center;
  gap: 7px;
  overflow-x: auto;
  overflow-y: visible;
  padding: 4px 5px 4px 1px;
  scrollbar-width: none;
}

.variant-pills::-webkit-scrollbar,
.storage-row::-webkit-scrollbar {
  display: none;
}

.variant-pills::after {
  min-width: 0;
  max-width: 112px;
  flex: 0 1 auto;
  overflow: hidden;
  color: #656d76;
  content: attr(data-selected-name);
  font-size: 10px;
  font-weight: 650;
  line-height: 1.2;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.variant-pill {
  position: relative;
  width: 26px;
  height: 26px;
  flex: 0 0 26px;
  border: 1px solid #c7cdd2;
  background: #fff;
  box-shadow: none;
}

.variant-pill.active {
  border-color: #20252b;
  background: #fff;
  box-shadow: none;
}

.variant-pill.active::after {
  position: absolute;
  top: -5px;
  right: -5px;
  z-index: 2;
  width: 13px;
  height: 13px;
  display: grid;
  place-items: center;
  border: 2px solid #fff;
  border-radius: 50%;
  background: #20252b;
  color: #fff;
  content: "✓";
  font-size: 8px;
  font-weight: 850;
  line-height: 1;
}

.color-dot {
  width: 18px;
  height: 18px;
  border-color: rgba(30, 35, 40, 0.2);
}

.storage-row {
  min-width: 0;
  flex-wrap: nowrap;
  overflow-x: auto;
  scrollbar-width: none;
}

/* Complete styling for the tablet price filter, which previously fell into native browser controls. */
@media (min-width: 761px) {
  .catalog-price-filter {
    display: block;
    padding-bottom: 20px;
    border-bottom: 1px solid #e0e4e7;
  }

  .catalog-price-inputs {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
  }

  .catalog-price-inputs label {
    min-width: 0;
    height: 40px;
    display: flex;
    align-items: center;
    gap: 4px;
    padding: 0 9px;
    border: 1px solid #d2d7dc;
    border-radius: 9px;
    background: #fff;
    color: #818892;
    font-size: 10px;
  }

  .catalog-price-inputs input {
    min-width: 0;
    width: 100%;
    padding: 0;
    border: 0;
    outline: 0;
    background: transparent;
    color: #3f464e;
    font: inherit;
    font-size: 10px;
    font-weight: 680;
  }

  .catalog-price-range {
    position: relative;
    height: 28px;
    margin: 8px 8px -3px;
  }

  .catalog-price-range::before,
  .catalog-price-range > span {
    position: absolute;
    top: 12px;
    right: 0;
    left: 0;
    height: 4px;
    content: "";
    border-radius: 999px;
    background: #dfe3e7;
  }

  .catalog-price-range > span {
    z-index: 1;
    background: var(--accent);
  }

  .catalog-price-range input {
    position: absolute;
    inset: 0;
    z-index: 2;
    width: 100%;
    height: 28px;
    margin: 0;
    appearance: none;
    -webkit-appearance: none;
    background: transparent;
    pointer-events: none;
  }

  .catalog-price-range input::-webkit-slider-thumb {
    width: 16px;
    height: 16px;
    appearance: none;
    -webkit-appearance: none;
    border: 3px solid var(--accent);
    border-radius: 50%;
    background: #fff;
    box-shadow: 0 2px 7px rgba(36, 42, 48, 0.16);
    pointer-events: auto;
    cursor: grab;
  }

  .catalog-price-range input::-moz-range-thumb {
    width: 12px;
    height: 12px;
    border: 3px solid var(--accent);
    border-radius: 50%;
    background: #fff;
    box-shadow: 0 2px 7px rgba(36, 42, 48, 0.16);
    pointer-events: auto;
    cursor: grab;
  }
}

/* Cards reserve the same space for media, choices and actions at every breakpoint. */
@media (min-width: 1181px) {
  .catalog {
    grid-auto-rows: 448px;
  }

  .product-card {
    height: 448px;
  }

  .product-info {
    min-height: 212px;
    align-content: start;
    gap: 7px;
  }

  .product-heading h2,
  .product-heading-top h2 {
    font-size: 15px;
    line-height: 1.25;
  }

  .product-heading .tagline {
    min-height: 28px;
    display: -webkit-box;
    overflow: hidden;
    color: #717983;
    font-size: 11px;
    line-height: 1.3;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
  }

  .product-spec-line {
    display: none;
  }

  .product-availability {
    font-size: 10px;
  }

  .price-line .price-card {
    font-size: 20px;
  }

  .storage-btn {
    font-size: 10px;
  }
}

@media (min-width: 1181px) and (max-width: 1480px) {
  .catalog {
    grid-auto-rows: 420px;
  }

  .product-card {
    height: 420px;
  }

  .product-info {
    min-height: 218px;
  }
}

@media (min-width: 761px) and (max-width: 1180px) {
  .catalog {
    grid-auto-rows: 438px;
  }

  .product-card {
    height: 438px;
    min-height: 438px;
  }

  .product-media-wrapper,
  .product-media-column,
  .product-media,
  .product-gallery,
  .product-gallery-slide {
    height: 205px;
    min-height: 205px;
    max-height: 205px;
  }

  .product-media-wrapper,
  .product-media-column,
  .product-media {
    flex: 0 0 205px;
  }

  .product-info {
    min-height: 208px;
    align-content: start;
    gap: 7px;
  }

  .product-heading h2,
  .product-heading-top h2 {
    overflow: hidden;
    font-size: 14px;
    line-height: 1.25;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .product-heading .tagline {
    min-height: 27px;
    display: -webkit-box;
    overflow: hidden;
    color: #717983;
    font-size: 10px;
    line-height: 1.3;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
  }

  .product-spec-line {
    display: none;
  }
}

@media (min-width: 761px) and (max-width: 980px) {
  .catalog {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 760px) {
  .catalog {
    grid-auto-rows: 206px;
  }

  .product-card {
    height: 206px;
    min-height: 206px;
    grid-template-columns: 116px minmax(0, 1fr);
    align-items: stretch;
    gap: 12px;
    padding: 10px;
  }

  .product-media-wrapper,
  .product-media-column,
  .product-media,
  .product-gallery,
  .product-gallery-slide {
    height: 184px;
    min-height: 184px;
    max-height: 184px;
  }

  .product-info {
    height: 184px;
    min-height: 0;
    align-content: start;
    gap: 5px;
  }

  .product-config {
    min-height: 30px;
    overflow: visible;
  }

  .variant-pills {
    max-width: 100%;
    padding-top: 4px;
  }

  .variant-pills::after {
    max-width: 86px;
    font-size: 9px;
  }

  .variant-pill {
    width: 24px;
    height: 24px;
    flex-basis: 24px;
  }

  .color-dot {
    width: 16px;
    height: 16px;
  }

  .product-heading h2,
  .product-heading-top h2 {
    font-size: 14px;
  }

  .product-heading .tagline {
    min-height: 25px;
    display: -webkit-box;
    overflow: hidden;
    color: #747c85;
    font-size: 10px;
    line-height: 1.25;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
  }

  .product-spec-line {
    display: none;
  }

  .product-availability {
    font-size: 10px;
  }

  .price-line .price-card {
    font-size: 18px;
  }

  .price-line .price-cash {
    font-size: 10px;
  }

  .storage-btn {
    min-height: 27px;
    padding-inline: 8px;
    font-size: 9.5px;
  }

  .product-actions .quantity,
  .product-actions .glass-button.primary {
    min-height: 36px;
  }

  .product-actions .glass-button.primary {
    font-size: 11px;
  }
}

@media (max-width: 390px) {
  .product-card {
    grid-template-columns: 106px minmax(0, 1fr);
    gap: 10px;
  }

  .variant-pills::after {
    max-width: 72px;
  }
}

/* Payment totals read as two compact methods, each with a familiar icon. */
.cart-preview-summary-item {
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr);
  align-items: center;
  gap: 11px;
  padding-left: 0;
  border-left: 0;
}

.cart-preview-payment-icon {
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  border: 1px solid #d9dde1;
  border-radius: 12px;
  background: #f6f7f8;
  color: #32383f;
}

.cart-preview-summary-item--cash .cart-preview-payment-icon {
  border-color: rgba(244, 75, 55, 0.22);
  background: rgba(244, 75, 55, 0.08);
  color: var(--accent);
}

.cart-preview-payment-icon svg {
  width: 22px;
  height: 22px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.7;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.cart-preview-summary-copy {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.cart-preview-summary-copy > span {
  color: #747a82;
  font-size: 10px;
  font-weight: 680;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.cart-preview-summary-copy > strong {
  color: var(--text-main);
  font-size: clamp(19px, 2vw, 24px);
  font-weight: 770;
  letter-spacing: -0.025em;
  white-space: nowrap;
}

.cart-preview-summary-item--cash .cart-preview-summary-copy > strong {
  color: var(--accent);
}

@media (min-width: 861px) {
  .cart-preview-content:has(.cart-preview-item:only-child) {
    height: min(650px, calc(100dvh - 48px));
  }
}

@media (max-width: 620px) {
  .cart-preview-summary-item {
    grid-template-columns: 36px minmax(0, 1fr);
    gap: 8px;
  }

  .cart-preview-payment-icon {
    width: 36px;
    height: 36px;
    border-radius: 10px;
  }

  .cart-preview-payment-icon svg {
    width: 19px;
    height: 19px;
  }
}

/* AppleHunt v13: one product frame, stable choices and uncropped mobile cards. */
.catalog {
  align-items: start;
  grid-auto-rows: auto;
}

.product-card {
  height: auto;
  min-height: 0;
  align-items: stretch;
  gap: 12px;
  overflow: visible;
}

.product-media-wrapper,
.product-media-column,
.product-media,
.product-gallery {
  width: 100%;
  min-width: 0;
}

.product-media-wrapper,
.product-media-column {
  flex: 0 0 auto;
}

.product-media {
  height: auto;
  min-height: 0;
  max-height: none;
  aspect-ratio: 1.18 / 1;
  border: 1px solid #e1e4e8;
  border-radius: 14px;
  background: #fff;
  overflow: hidden;
  box-shadow: 0 8px 22px rgba(36, 44, 56, 0.06);
}

.product-gallery,
.product-gallery-slide {
  height: 100%;
  min-height: 0;
  max-height: none;
}

.product-gallery-slide {
  width: 100%;
  padding: 12px;
  align-items: center;
  justify-content: center;
  background: #fff;
}

.product-gallery-slide img,
.product-card--transparent-images .product-gallery-slide img {
  width: 100%;
  height: 100%;
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
  object-position: center;
  background: #fff !important;
  filter: drop-shadow(0 14px 14px rgba(36, 44, 56, 0.1));
}

.product-info {
  height: auto;
  min-height: 0;
  align-items: stretch;
  gap: 7px;
}

.product-heading {
  gap: 4px;
}

.product-heading-top,
.product-heading-top h2 {
  width: 100%;
}

.product-config {
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 6px;
}

.product-config-divider {
  display: none !important;
}

.product-config-row--colors {
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 4px;
}

.variant-pills {
  width: 100%;
  max-width: 100%;
  flex: 0 0 auto;
  flex-wrap: nowrap;
  align-items: center;
  overflow-x: auto;
  overflow-y: visible;
  padding: 5px 8px 4px 2px;
}

.variant-pills::after {
  content: none;
}

.variant-pill.active {
  border-color: var(--accent) !important;
  box-shadow: 0 0 0 2px rgba(239, 78, 55, 0.13) !important;
}

.variant-pill.active::after {
  background: var(--accent);
  content: "\2713";
}

.variant-name {
  display: block;
  width: 100%;
  min-height: 13px;
  overflow: hidden;
  color: #656d76;
  font-size: 10px;
  font-weight: 650;
  line-height: 1.2;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.product-config-row--storage,
.storage-row {
  width: 100%;
  min-width: 0;
}

.storage-row {
  flex-wrap: nowrap;
  overflow-x: auto;
}

.storage-btn {
  flex: 0 0 auto;
}

.product-availability {
  align-self: flex-start;
}

.price-line,
.product-actions {
  width: 100%;
}

@media (min-width: 761px) {
  .product-card {
    overflow: visible;
  }

  .product-info {
    gap: 8px;
  }
}

@media (max-width: 760px) {
  .catalog {
    grid-auto-rows: auto;
  }

  .product-card {
    height: auto;
    min-height: 0;
    grid-template-columns: 112px minmax(0, 1fr);
    align-items: stretch;
    gap: 12px;
    padding: 10px;
    overflow: visible;
  }

  .product-media-wrapper,
  .product-media-column,
  .product-media {
    width: 112px;
    flex-basis: 112px;
  }

  .product-media-wrapper,
  .product-media-column,
  .product-media {
    height: 184px;
  }

  .product-media {
    aspect-ratio: auto;
  }

  .product-info {
    height: auto;
    min-height: 184px;
    gap: 5px;
  }

  .product-heading h2,
  .product-heading-top h2 {
    font-size: 14px;
    line-height: 1.15;
  }

  .product-heading .tagline {
    min-height: 0;
    max-height: 26px;
    display: -webkit-box;
    overflow: hidden;
    font-size: 10px;
    line-height: 1.25;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
  }

  .variant-name {
    min-height: 12px;
    font-size: 9px;
  }

  .storage-btn {
    min-height: 27px;
    padding-inline: 8px;
    font-size: 9.5px;
  }

  .product-actions .quantity,
  .product-actions .glass-button.primary {
    min-height: 36px;
  }
}

@media (max-width: 390px) {
  .product-card {
    grid-template-columns: 106px minmax(0, 1fr);
    gap: 10px;
  }

  .product-media-wrapper,
  .product-media-column,
  .product-media {
    width: 106px;
    flex-basis: 106px;
  }
}

/* AppleHunt v18: equal mobile photo stages, larger square phone images and color assets. */
@media (min-width: 761px) {
  .brand-chip:not([data-brand="all"])::before {
    display: grid;
    place-items: center;
    width: 15px;
    height: 15px;
    border-radius: 4px;
    color: #fff;
    font-size: 10px;
    font-weight: 850;
    line-height: 1;
  }

  .brand-chip.active:not([data-brand="all"])::before {
    content: "\2713";
    border-color: var(--accent);
    background: var(--accent);
    box-shadow: none;
  }
}

@media (max-width: 760px) {
  .product-card {
    --mobile-media-width: clamp(126px, 34vw, 136px);
    grid-template-columns: var(--mobile-media-width) minmax(0, 1fr);
    gap: 12px;
  }

  .product-media-wrapper,
  .product-media-column,
  .product-media {
    width: var(--mobile-media-width);
    flex-basis: var(--mobile-media-width);
  }

  .product-media-wrapper,
  .product-media-column,
  .product-media,
  .product-info {
    min-height: 196px;
  }

  .product-media-wrapper,
  .product-media-column,
  .product-media {
    height: 196px;
  }

  .product-media {
    aspect-ratio: auto;
  }

  .product-gallery-slide {
    padding: 6px;
  }

  .product-gallery-slide img,
  .product-card--transparent-images .product-gallery-slide img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    object-position: center;
    background: #fff !important;
  }

  .product-card[data-product-id="google-pixel-10-pro"] .product-gallery-slide img,
  .product-card[data-product-id="google-pixel-10-pro-xl"] .product-gallery-slide img,
  .product-card[data-product-id="google-pixel-10"] .product-gallery-slide img,
  .product-card[data-product-id="poco-x7-pro"] .product-gallery-slide img,
  .product-card[data-product-id="poco-f7-pro"] .product-gallery-slide img {
    transform: scale(1.28);
    transform-origin: center;
  }

  .brands-bar {
    align-items: center;
  }

  .brand-chip {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    padding-inline: 10px;
    color: #4d555f;
  }

  .brand-chip:not([data-brand="all"])::before {
    position: static;
    content: "";
    display: grid;
    place-items: center;
    width: 15px;
    height: 15px;
    flex: 0 0 15px;
    border: 1px solid #bdc4cb;
    border-radius: 4px;
    background: #fff;
    color: #fff;
    font-size: 10px;
    font-weight: 850;
    line-height: 1;
    transform: none;
  }

  .brand-chip.active:not([data-brand="all"]) {
    border-color: var(--accent);
    background: #fff;
    color: #252a30;
  }

  .brand-chip.active:not([data-brand="all"])::before {
    content: "\2713";
    border-color: var(--accent);
    background: var(--accent);
  }

  .brand-chip[data-brand="all"] {
    gap: 0;
  }
}

/* Product details: side inspector on desktop, dedicated screen on mobile. */
body.product-detail-open {
  overflow: hidden;
}

body.product-detail-open .cart-fab,
body.product-detail-open .scroll-top-btn {
  opacity: 0;
  pointer-events: none;
}

.product-card {
  position: relative;
}

.product-card .product-config,
.product-card .product-actions,
.product-card .product-spec-line {
  display: none !important;
}

.product-card .product-info {
  gap: 11px;
}

.product-card .price-line {
  padding-top: 11px;
}

.product-media-wrapper {
  position: relative;
}

.product-card-media-open {
  position: absolute;
  inset: 0;
  z-index: 3;
  width: 100%;
  padding: 0;
  border: 0;
  border-radius: 18px;
  background: transparent;
  cursor: pointer;
}

.product-card-media-open:focus-visible {
  outline: 3px solid rgba(204, 64, 40, 0.34);
  outline-offset: 3px;
}

.product-card-open {
  width: 100%;
  min-height: 42px;
  padding: 0 14px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border: 1px solid #c9c9c3;
  border-radius: 12px;
  background: transparent;
  color: var(--text-main);
  font-size: 12px;
  font-weight: 750;
  cursor: pointer;
  transition: border-color 160ms ease, background-color 160ms ease, color 160ms ease, transform 160ms ease;
}

.product-card-open:hover {
  border-color: var(--text-main);
  background: var(--text-main);
  color: #fff;
}

.product-card-open:active {
  transform: translateY(1px);
}

.product-card-open__arrow {
  font-size: 18px;
  font-weight: 500;
}

.product-card.is-selected .product-media {
  border-color: var(--accent);
  box-shadow: 0 0 0 2px rgba(204, 64, 40, 0.14), 0 16px 34px rgba(23, 23, 25, 0.08);
}

.product-card.is-selected .product-card-open {
  border-color: var(--accent);
  color: var(--accent);
}

.product-detail {
  position: fixed;
  inset: 0;
  z-index: 70;
  display: flex;
  justify-content: flex-end;
  isolation: isolate;
}

.product-detail__backdrop {
  position: absolute;
  inset: 0;
  z-index: -1;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: rgba(23, 23, 25, 0.22);
  cursor: default;
  animation: product-detail-backdrop-in 180ms ease-out both;
}

.product-detail__panel {
  width: min(660px, 46vw);
  height: 100dvh;
  min-width: 520px;
  display: grid;
  grid-template-rows: auto minmax(0, 1fr) auto;
  overflow: hidden;
  background: #f2f2ef;
  color: var(--text-main);
  box-shadow: -28px 0 80px rgba(23, 23, 25, 0.18);
  animation: product-detail-panel-in 220ms cubic-bezier(0.2, 0.8, 0.2, 1) both;
}

.product-detail__header {
  min-height: 66px;
  padding: 0 24px;
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: center;
  gap: 16px;
  border-bottom: 1px solid var(--line);
  background: rgba(242, 242, 239, 0.96);
  backdrop-filter: blur(18px) saturate(1.15);
}

.product-detail__brand {
  width: max-content;
  color: var(--text-main);
  text-decoration: none;
  font-size: 21px;
  line-height: 1;
  font-weight: 850;
  letter-spacing: -0.05em;
}

.product-detail__brand span {
  color: var(--accent);
}

.product-detail__back,
.product-detail__close {
  border: 0;
  background: transparent;
  color: var(--text-main);
  cursor: pointer;
}

.product-detail__back {
  display: none;
  align-items: center;
  gap: 9px;
  padding: 8px 0;
  font-size: 13px;
  font-weight: 700;
}

.product-detail__back-icon {
  width: 9px;
  height: 9px;
  border-left: 1.5px solid currentColor;
  border-bottom: 1.5px solid currentColor;
  transform: rotate(45deg);
}

.product-detail__close {
  width: 40px;
  height: 40px;
  padding: 0;
  border: 1px solid #c9c9c3;
  border-radius: 12px;
  font-size: 24px;
  line-height: 1;
}

.product-detail__close:hover {
  border-color: var(--text-main);
  background: var(--text-main);
  color: #fff;
}

.product-detail__body {
  min-height: 0;
  padding: 24px 28px 32px;
  overflow-y: auto;
  overscroll-behavior: contain;
  scrollbar-width: thin;
  scrollbar-color: #aaa9a3 transparent;
}

.product-detail__body::-webkit-scrollbar {
  width: 5px;
}

.product-detail__body::-webkit-scrollbar-thumb {
  border-radius: 999px;
  background: #aaa9a3;
}

.product-detail-summary {
  display: grid;
  grid-template-columns: minmax(210px, 0.9fr) minmax(230px, 1.1fr);
  align-items: center;
  gap: 24px;
}

.product-detail-media {
  min-width: 0;
  min-height: 270px;
  padding: 22px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 12px;
  border: 1px solid #deded8;
  border-radius: 16px;
  background: #fff;
}

.product-detail-media__image {
  width: 100%;
  height: 220px;
  object-fit: contain;
  filter: drop-shadow(0 14px 13px rgba(23, 23, 25, 0.11));
}

.product-detail-thumbs {
  display: flex;
  justify-content: center;
  gap: 6px;
  overflow-x: auto;
  scrollbar-width: none;
}

.product-detail-thumb {
  width: 36px;
  height: 36px;
  flex: 0 0 auto;
  padding: 3px;
  border: 1px solid #d6d6d0;
  border-radius: 9px;
  background: #f7f7f4;
  cursor: pointer;
}

.product-detail-thumb.active {
  border-color: var(--accent);
  box-shadow: 0 0 0 2px rgba(204, 64, 40, 0.13);
}

.product-detail-thumb img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.product-detail-identity {
  min-width: 0;
}

.product-detail-identity__meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.product-detail-category {
  color: #777772;
  font-size: 11px;
  font-weight: 700;
}

.product-detail-availability {
  color: var(--success);
  font-size: 10px;
  font-weight: 750;
  white-space: nowrap;
}

.product-detail-availability--low {
  color: var(--warning);
}

.product-detail-availability--unavailable {
  color: #9a4d43;
}

.product-detail-title {
  margin: 14px 0 0;
  font-size: clamp(27px, 2.5vw, 38px);
  line-height: 0.98;
  letter-spacing: -0.055em;
}

.product-detail-tagline {
  margin: 10px 0 0;
  color: var(--text-muted);
  font-size: 12px;
  line-height: 1.45;
}

.product-detail-prices {
  margin-top: 22px;
  padding-top: 16px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
  border-top: 1px solid var(--line);
}

.product-detail-price {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.product-detail-price span {
  color: #858580;
  font-size: 9px;
  font-weight: 700;
}

.product-detail-price strong {
  font-size: 18px;
  line-height: 1;
  letter-spacing: -0.035em;
  white-space: nowrap;
}

.product-detail-price--accent strong {
  color: var(--accent);
}

.product-detail-configuration,
.product-detail-specifications {
  margin-top: 24px;
}

.product-detail-configuration {
  padding: 20px;
  display: grid;
  gap: 18px;
  border: 1px solid #deded8;
  border-radius: 16px;
  background: #fff;
}

.product-detail-option-group h3,
.product-detail-section-title {
  margin: 0 0 10px;
  color: var(--text-main);
  font-size: 13px;
  line-height: 1.2;
  font-weight: 800;
}

.product-detail-options {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.product-detail-option {
  min-height: 40px;
  padding: 0 13px;
  border: 1px solid #c9c9c3;
  border-radius: 11px;
  background: #fff;
  color: #555551;
  font-size: 11px;
  font-weight: 700;
  cursor: pointer;
}

.product-detail-option:hover:not(:disabled) {
  border-color: #777772;
}

.product-detail-option.active {
  border-color: var(--text-main);
  background: var(--text-main);
  color: #fff;
}

.product-detail-option.unavailable:not(.active) {
  opacity: 0.52;
  text-decoration: line-through;
}

.product-detail-option:disabled {
  opacity: 0.35;
  cursor: not-allowed;
}

.product-detail-option--color {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.product-detail-color-dot {
  width: 16px;
  height: 16px;
  flex: 0 0 auto;
  border: 1px solid rgba(23, 23, 25, 0.14);
  border-radius: 50%;
}

.product-detail-option--color.active .product-detail-color-dot {
  box-shadow: 0 0 0 2px var(--text-main), 0 0 0 3px rgba(255, 255, 255, 0.82);
}

.product-detail-spec-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.product-detail-spec-card {
  min-height: 92px;
  padding: 15px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 14px;
  border: 1px solid #deded8;
  border-radius: 14px;
  background: #fff;
}

.product-detail-spec-card span {
  color: #858580;
  font-size: 9px;
  font-weight: 750;
}

.product-detail-spec-card strong {
  font-size: 14px;
  line-height: 1.18;
  letter-spacing: -0.02em;
}

.product-detail-characteristics {
  margin-top: 12px;
  border: 1px solid #deded8;
  border-radius: 14px;
  background: #fff;
  overflow: hidden;
}

.product-detail-characteristics summary {
  min-height: 52px;
  padding: 0 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  list-style: none;
  font-size: 12px;
  font-weight: 800;
  cursor: pointer;
}

.product-detail-characteristics summary::-webkit-details-marker {
  display: none;
}

.product-detail-characteristics summary::after {
  content: "+";
  color: var(--accent);
  font-size: 20px;
  font-weight: 500;
}

.product-detail-characteristics[open] summary::after {
  content: "−";
}

.product-detail-characteristic-groups {
  padding: 0 16px 16px;
  display: grid;
  gap: 16px;
}

.product-detail-characteristic-group {
  padding-top: 14px;
  border-top: 1px solid var(--line);
}

.product-detail-characteristic-group h4 {
  margin: 0 0 12px;
  font-size: 11px;
  font-weight: 800;
}

.product-detail-characteristic-grid {
  margin: 0;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px 18px;
}

.product-detail-characteristic {
  min-width: 0;
}

.product-detail-characteristic dt {
  color: #858580;
  font-size: 9px;
  font-weight: 650;
}

.product-detail-characteristic dd {
  margin: 4px 0 0;
  font-size: 12px;
  line-height: 1.3;
  font-weight: 700;
}

.product-detail-service-note {
  margin-top: 12px;
  padding: 15px 16px;
  display: flex;
  flex-direction: column;
  gap: 5px;
  border-radius: 14px;
  background: #e7e7e2;
}

.product-detail-service-note strong {
  font-size: 11px;
}

.product-detail-service-note span {
  color: #6e6e69;
  font-size: 10px;
  line-height: 1.4;
}

.product-detail__footer {
  padding: 14px 18px calc(14px + env(safe-area-inset-bottom, 0px));
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 10px;
  border-top: 1px solid var(--line);
  background: rgba(242, 242, 239, 0.97);
  backdrop-filter: blur(18px) saturate(1.15);
}

.product-detail-quantity {
  min-height: 50px;
  display: grid;
  grid-template-columns: 38px 34px 38px;
  align-items: center;
  border: 1px solid #c9c9c3;
  border-radius: 12px;
  background: #fff;
}

.product-detail-quantity button {
  height: 100%;
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--text-main);
  font-size: 18px;
  cursor: pointer;
}

.product-detail-quantity button:disabled {
  opacity: 0.3;
  cursor: default;
}

.product-detail-quantity span {
  text-align: center;
  font-size: 13px;
  font-weight: 800;
}

.product-detail-add {
  min-width: 0;
  min-height: 50px;
  padding: 0 17px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  border: 0;
  border-radius: 12px;
  background: var(--accent);
  color: #fff;
  font-size: 12px;
  font-weight: 800;
  cursor: pointer;
  transition: transform 150ms ease, background-color 150ms ease;
}

.product-detail-add:hover:not(:disabled) {
  background: #b93722;
}

.product-detail-add:active:not(:disabled) {
  transform: translateY(1px);
}

.product-detail-add strong {
  font-size: 13px;
  white-space: nowrap;
}

.product-detail-add:disabled {
  background: #a2a29c;
  cursor: not-allowed;
}

@keyframes product-detail-panel-in {
  from { transform: translateX(28px); opacity: 0; }
  to { transform: translateX(0); opacity: 1; }
}

@keyframes product-detail-backdrop-in {
  from { opacity: 0; }
  to { opacity: 1; }
}

@media (max-width: 900px) {
  .product-detail__panel {
    width: 100%;
    min-width: 0;
    max-width: none;
    box-shadow: none;
  }

  .product-detail__backdrop {
    display: none;
  }

  .product-detail__header {
    min-height: 58px;
    padding: env(safe-area-inset-top, 0px) 16px 0;
    grid-template-columns: auto 1fr auto;
  }

  .product-detail__back {
    display: inline-flex;
  }

  .product-detail__brand {
    justify-self: center;
    font-size: 18px;
  }

  .product-detail__close {
    width: 36px;
    height: 36px;
    border: 0;
    font-size: 22px;
  }

  .product-detail__body {
    padding: 16px 16px 24px;
  }

  .product-detail-summary {
    grid-template-columns: minmax(0, 1fr);
    gap: 18px;
  }

  .product-detail-media {
    min-height: 260px;
    padding: 18px;
  }

  .product-detail-media__image {
    height: 238px;
  }

  .product-detail-title {
    margin-top: 12px;
    font-size: clamp(30px, 9vw, 40px);
  }

  .product-detail-tagline {
    max-width: 36ch;
  }

  .product-detail-configuration,
  .product-detail-specifications {
    margin-top: 20px;
  }

  .product-detail__footer {
    padding-inline: 12px;
  }
}

@media (max-width: 520px) {
  .product-card {
    padding-bottom: 22px;
  }

  .product-card .product-heading h2,
  .product-card .product-heading-top h2 {
    font-size: 22px;
  }

  .product-card-open {
    min-height: 46px;
  }

  .product-detail__header {
    padding-inline: 14px;
  }

  .product-detail__close {
    width: 34px;
  }

  .product-detail__body {
    padding-inline: 14px;
  }

  .product-detail-media {
    min-height: 246px;
  }

  .product-detail-media__image {
    height: 215px;
  }

  .product-detail-prices {
    margin-top: 18px;
  }

  .product-detail-configuration {
    padding: 16px;
  }

  .product-detail-option {
    min-height: 42px;
  }

  .product-detail-spec-card {
    min-height: 88px;
    padding: 13px;
  }

  .product-detail-spec-card strong {
    font-size: 13px;
  }

  .product-detail-characteristic-grid {
    grid-template-columns: minmax(0, 1fr);
  }

  .product-detail__footer {
    grid-template-columns: 104px minmax(0, 1fr);
  }

  .product-detail-quantity {
    grid-template-columns: 34px 34px 34px;
  }

  .product-detail-add {
    padding-inline: 14px;
  }

  .product-detail-add strong {
    font-size: 12px;
  }
}

html.is-telegram-webapp .product-detail__header {
  padding-top: max(env(safe-area-inset-top, 0px), 4px);
}

html.is-telegram-webapp .product-detail__footer {
  padding-bottom: max(calc(14px + env(safe-area-inset-bottom, 0px)), 18px);
}

/* Product cards v21: choose a configuration, add immediately, or inspect details. */
.product-card .product-config {
  display: flex !important;
  min-height: 30px;
  align-items: center;
  gap: 8px 10px;
}

.product-card .product-config-row {
  min-width: 0;
}

.product-card .product-config-row--colors {
  flex: 0 1 auto;
}

.product-card .product-config-row--storage {
  flex: 1 1 150px;
}

.product-card .variant-pills,
.product-card .storage-row {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.product-card .variant-label,
.product-card .variant-name,
.product-card .product-config-divider {
  display: none !important;
}

.product-card .variant-pill {
  width: 26px;
  height: 26px;
}

.product-card .color-dot {
  width: 18px;
  height: 18px;
}

.product-card .storage-btn {
  min-height: 29px;
  padding-inline: 9px;
  border-radius: 8px;
  font-size: 10px;
}

.product-card-actions {
  display: grid;
  grid-template-columns: minmax(0, 1.14fr) minmax(0, 0.86fr);
  gap: 8px;
}

.product-card-add,
.product-card-actions .product-card-open {
  min-width: 0;
  min-height: 42px;
  padding: 0 13px;
  border-radius: 11px;
  font-size: 12px;
  font-weight: 780;
}

.product-card-add {
  border: 1px solid var(--accent);
  background: var(--accent);
  color: #fff;
  cursor: pointer;
  transition: background-color 160ms ease, border-color 160ms ease, transform 160ms ease;
}

.product-card-add:hover:not(:disabled) {
  border-color: #b93722;
  background: #b93722;
}

.product-card-add:active:not(:disabled) {
  transform: translateY(1px);
}

.product-card-add:disabled {
  border-color: #d1d1cb;
  background: #d1d1cb;
  color: #777772;
  cursor: not-allowed;
}

.product-card-actions .product-card-open {
  justify-content: center;
  gap: 8px;
}

.product-card-actions .product-card-open__arrow {
  font-size: 15px;
}

.product-detail-characteristic-group h4 {
  color: #5f5f5a;
}

@media (max-width: 760px) {
  .product-card {
    min-height: 218px;
  }

  .product-card .product-info {
    align-content: start;
    gap: 7px;
  }

  .product-card .product-config {
    min-height: 0;
    display: grid !important;
    grid-template-columns: 1fr;
    gap: 5px;
  }

  .product-card .product-config-row--colors,
  .product-card .product-config-row--storage {
    width: 100%;
  }

  .product-card .variant-pills,
  .product-card .storage-row {
    flex-wrap: nowrap;
    overflow-x: auto;
    scrollbar-width: none;
  }

  .product-card .variant-pills::-webkit-scrollbar,
  .product-card .storage-row::-webkit-scrollbar {
    display: none;
  }

  .product-card .variant-pill {
    width: 22px;
    height: 22px;
    flex: 0 0 22px;
  }

  .product-card .color-dot {
    width: 15px;
    height: 15px;
  }

  .product-card .storage-btn {
    min-height: 25px;
    flex: 0 0 auto;
    padding-inline: 7px;
    font-size: 9px;
  }

  .product-card .price-line {
    padding-top: 2px;
  }

  .product-card-actions {
    gap: 5px;
  }

  .product-card-add,
  .product-card-actions .product-card-open {
    min-height: 34px;
    padding-inline: 7px;
    border-radius: 8px;
    font-size: 9.5px;
  }

  .product-card-actions .product-card-open__arrow {
    display: none;
  }
}

@media (max-width: 360px) {
  .product-card {
    grid-template-columns: 110px minmax(0, 1fr);
  }

  .product-card-actions {
    grid-template-columns: 1fr;
  }
}

/* AppleHunt v22: compact configuration rows and unmistakable shop chat. */
.product-card .product-config {
  display: grid !important;
  grid-template-columns: minmax(0, 1fr);
  align-items: start;
  align-content: start;
  min-height: 0;
  gap: 6px;
  overflow: visible;
}

.product-card .product-config-row--colors,
.product-card .product-config-row--storage {
  width: 100%;
  min-height: 0;
  flex: none;
}

.header-contact__label--compact {
  display: none;
}

.store-info__actions [data-action="open-consultant"],
.footer-question {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

.store-info__actions [data-action="open-consultant"] svg,
.footer-question svg {
  width: 16px;
  height: 16px;
  flex: 0 0 16px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

@media (max-width: 760px) {
  .scroll-top-btn {
    display: none !important;
  }

  .header-contact {
    width: auto;
    min-width: 70px;
    padding: 0 11px;
    gap: 7px;
  }

  .header-contact span {
    position: static;
    width: auto;
    height: auto;
    padding: 0;
    margin: 0;
    overflow: visible;
    clip: auto;
    white-space: nowrap;
  }

  .header-contact__label--wide {
    display: none;
  }

  .header-contact__label--compact {
    display: inline;
  }
}

@media (max-width: 360px) {
  .header-contact {
    width: 42px;
    min-width: 42px;
    padding: 0;
  }

  .header-contact__label--compact {
    display: none;
  }
}
.footer-staff-link {
    color: inherit;
    opacity: .62;
    text-decoration: none;
    transition: opacity .18s ease;
}

.footer-staff-link:hover,
.footer-staff-link:focus-visible {
    opacity: 1;
}
