/* Storefront and cart responsive safeguards. */

.cart-icon {
  display: block;
  flex: 0 0 auto;
  width: 22px;
  height: 22px;
  object-fit: contain;
}

.cart-header-button .cart-icon { width: 24px; height: 24px; }
.cart-header-button {
  min-width: 0 !important;
  padding-right: 16px;
  padding-left: 16px;
}
.cart-button-with-icon { gap: 10px; }

.product-card { container-type: inline-size; }
.product-image,
.product-card-body { overflow: hidden; }

.product-buy-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  width: 100%;
  min-width: 0;
}

.product-price { min-width: 0; }
.product-price span {
  max-width: 100%;
  line-height: 1.25;
  overflow-wrap: anywhere;
}
.product-price strong {
  display: block;
  max-width: 100%;
  font-variant-numeric: tabular-nums;
}

.product-add-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  max-width: 100%;
  overflow: hidden;
}
.product-add-button .cart-icon { width: 26px; height: 26px; }

.product-card .outline-button {
  width: 100%;
  max-width: 100%;
  min-width: 0;
  overflow: hidden;
}
.product-card .outline-button .lbl-short {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

@container (max-width: 260px) {
  .product-buy-row {
    grid-template-columns: minmax(0, 1fr) 46px;
    gap: 8px;
  }
  .product-add-button {
    width: 46px;
    min-width: 46px;
    min-height: 46px;
    padding: 0;
    border-radius: 11px;
  }
  .product-add-label { display: none; }
}

.floating-cart-icon { transform: none; }
.floating-cart-icon .cart-icon { width: 27px; height: 27px; }
.cart-empty-icon .cart-icon { width: 52px; height: 52px; }

.cart-item-copy,
.cart-item-top > div,
.cart-item-bottom { min-width: 0; }
.cart-item-top > div > span {
  display: block;
  overflow-wrap: anywhere;
}
.cart-line-total,
.cart-total-card strong,
.checkout-submit strong { font-variant-numeric: tabular-nums; }

@media (max-width: 560px) {
  .header { gap: 8px; }
  .cart-header-button {
    display: inline-flex !important;
    flex: 0 0 auto;
    min-width: 0 !important;
    min-height: 40px;
    margin-left: auto;
    padding: 0 9px;
    gap: 6px;
  }
  .cart-header-button .cta-label { display: none; }
  .cart-header-button .cart-count {
    min-width: 22px;
    height: 22px;
    padding: 0 5px;
    font-size: 10px;
  }
  .language-switcher { margin-left: 0; }

  .product-buy-row {
    grid-template-columns: minmax(0, 1fr) 46px;
    align-items: center;
    gap: 8px;
    margin: 12px 0 10px;
    padding: 11px 0;
  }
  .product-price { gap: 3px; }
  .product-price span { font-size: 9px; letter-spacing: .055em; }
  .product-price strong {
    font-size: clamp(17px, 5.25vw, 21px);
    line-height: 1.1;
  }
  .product-add-button {
    width: 46px;
    min-width: 46px;
    min-height: 46px;
    padding: 0;
    border-radius: 11px;
  }
  .product-add-label { display: none; }

  .floating-cart { display: none; }

  .cart-item-top,
  .cart-item-bottom { gap: 7px; }
  .cart-item-bottom {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr);
  }
  .cart-line-total {
    justify-self: end;
    font-size: 14px;
  }
  .checkout-submit {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 9px;
    padding-right: 14px;
    padding-left: 14px;
    font-size: 12px;
  }
  .checkout-submit strong {
    padding-left: 10px;
    white-space: nowrap;
  }
}

@media (min-width: 1181px) and (max-width: 1450px) {
  .header {
    grid-template-columns: auto minmax(0, 1fr) auto auto;
    gap: 14px;
    width: calc(100% - 48px);
  }
  .desktop-nav {
    min-width: 0;
    gap: 18px;
    padding-right: 18px;
    padding-left: 18px;
  }
  .desktop-nav a { font-size: 12px; }
  .cart-header-button {
    padding-right: 12px;
    padding-left: 12px;
  }
  .cart-header-button .cta-label { display: none; }
  .language-switcher { margin-left: 0; }
}

@media (max-width: 359px) {
  .header {
    padding-right: 9px;
    padding-left: 9px;
    gap: 5px;
  }
  .brand { gap: 5px; }
  .brand-mark { width: 32px; }
  .brand-text small { display: none; }
  .cart-header-button { padding: 0 7px; }
  .language-switcher { padding: 0 5px; }

  .product-buy-row {
    grid-template-columns: minmax(0, 1fr) 40px;
    gap: 4px;
  }
  .product-add-button {
    width: 40px;
    min-width: 40px;
    min-height: 40px;
  }
  .product-price strong { font-size: 15px; }
  .product-card .outline-button {
    padding-right: 7px;
    padding-left: 7px;
    font-size: 9.5px;
  }

  .cart-item {
    grid-template-columns: 62px minmax(0, 1fr);
    gap: 8px;
    padding: 8px;
  }
  .cart-item-visual { min-height: 92px; }
  .cart-item-visual img { height: 82px; }
  .quantity-control button { width: 29px; }
  .quantity-control strong { min-width: 23px; }
}
