/*
 * GAINVO Storefront v0.10.59 — Screen-by-screen Visual Acceptance
 * Final typography/reflow hardening after v0.10.57-v0.10.58.
 * Scope: Home, Search, Shops, Shop, Product Details, Basket, Checkout,
 * Orders, Favourites, Account and bottom navigation.
 */

:root{
  --gv-accept-copy:clamp(.78rem,calc(.74rem + .16vw),.90rem);
  --gv-accept-meta:clamp(.67rem,calc(.64rem + .12vw),.76rem);
  --gv-accept-card-title:clamp(.76rem,calc(.72rem + .17vw),.86rem);
  --gv-accept-section:clamp(1.05rem,calc(.99rem + .34vw),1.22rem);
  --gv-accept-page:clamp(1.25rem,calc(1.15rem + .55vw),1.55rem);
}

/* Prevent legacy components from creating typography overflow. */
.screen,
.screen *{min-width:0}

.screen h1,.screen h2,.screen h3,.screen p,.screen span,.screen strong,
.product-modal h1,.product-modal h2,.product-modal h3,.product-modal p,
.cart-sheet h1,.cart-sheet h2,.cart-sheet h3,.cart-sheet p,
.checkout-sheet h1,.checkout-sheet h2,.checkout-sheet h3,.checkout-sheet p{
  max-width:100%;
}

/* Ordinary words should wrap only at sensible boundaries. */
.product-title,.product-title-link,.shop-meta h3,.merchant-name-row h1,
.search-result-title,.result-copy h3,.customer-order-head h3,
.cart-line h3,.pdp-heading-v9 h2,.product-detail-title{
  overflow-wrap:break-word!important;
  word-break:normal!important;
  hyphens:none!important;
}

/* Technical identifiers and very long user-supplied strings may break safely. */
.customer-order-subtitle,.order-reference,.account-email,.account-phone,
.field-error,.checkout-location-status,.shop-map-note{
  overflow-wrap:anywhere;
  word-break:break-word;
}

/* ------------------------------------------------------------------
   HOME
   ------------------------------------------------------------------ */
.screen[data-screen="home"] .section-head h2{
  font-size:var(--gv-accept-section)!important;
  line-height:1.12!important;
  max-width:calc(100% - 64px);
}
.screen[data-screen="home"] .section-head .text-button,
.screen[data-screen="home"] .section-head .home-see-all{
  flex:0 0 auto;
  white-space:nowrap;
}
.screen[data-screen="home"] .home-product-grid .product-title,
.screen[data-screen="home"] .home-product-grid .product-title-link{
  font-size:var(--gv-accept-card-title)!important;
  line-height:1.18!important;
  font-weight:720!important;
}
.screen[data-screen="home"] .home-product-grid .product-shop-row{
  white-space:nowrap;
  overflow:hidden;
  text-overflow:ellipsis;
}
.screen[data-screen="home"] .home-product-grid .product-price,
.screen[data-screen="home"] .home-product-grid .product-price-sale{
  white-space:nowrap;
}
.screen[data-screen="home"] .home-category-rail-approved .category-tile strong{
  overflow-wrap:normal!important;
  word-break:normal!important;
}

/* ------------------------------------------------------------------
   SEARCH
   ------------------------------------------------------------------ */
.screen[data-screen="search"] .search-topline h1{
  font-size:var(--gv-accept-page)!important;
  line-height:1.08!important;
}
.screen[data-screen="search"] .search-group-head h2,
.screen[data-screen="search"] .search-browse-head h2{
  font-size:var(--gv-accept-section)!important;
  line-height:1.12!important;
}
.screen[data-screen="search"] .search-kind,
.screen[data-screen="search"] .search-active-chip,
.screen[data-screen="search"] .search-sort-options button,
.screen[data-screen="search"] .search-quick-options button{
  font-size:clamp(.70rem,2.8vw,.80rem)!important;
}
.screen[data-screen="search"] .search-kind,
.screen[data-screen="search"] .search-active-chip{white-space:nowrap}
.screen[data-screen="search"] .search-product-grid .product-title,
.screen[data-screen="search"] .search-product-grid .product-title-link{
  font-size:var(--gv-accept-card-title)!important;
  line-height:1.18!important;
}

/* ------------------------------------------------------------------
   SHOPS DIRECTORY
   ------------------------------------------------------------------ */
.screen[data-screen="shops"] .shops-directory-head h1{
  font-size:var(--gv-accept-page)!important;
  line-height:1.08!important;
}
.screen[data-screen="shops"] .shop-card-v2 .shop-meta h3,
.screen[data-screen="shops"] .shop-meta h3{
  font-size:clamp(.80rem,calc(.75rem + .20vw),.92rem)!important;
  line-height:1.18!important;
  display:-webkit-box;
  -webkit-box-orient:vertical;
  -webkit-line-clamp:2;
  overflow:hidden;
}
.screen[data-screen="shops"] .shop-card-v2 .shop-meta p,
.screen[data-screen="shops"] .shop-card-v2 .shop-card-foot{
  font-size:var(--gv-accept-meta)!important;
  line-height:1.32!important;
}

/* ------------------------------------------------------------------
   INDIVIDUAL SHOP
   ------------------------------------------------------------------ */
.screen[data-screen="shop"] .merchant-name-row h1{
  font-size:clamp(1.18rem,calc(1.08rem + .45vw),1.42rem)!important;
  line-height:1.08!important;
  display:-webkit-box;
  -webkit-box-orient:vertical;
  -webkit-line-clamp:2;
  overflow:hidden;
}
.screen[data-screen="shop"] .merchant-catalogue-heading h2{
  font-size:var(--gv-accept-section)!important;
}
.screen[data-screen="shop"] .shop-product-grid .product-title,
.screen[data-screen="shop"] .shop-product-grid .product-title-link{
  font-size:var(--gv-accept-card-title)!important;
  line-height:1.18!important;
}
.screen[data-screen="shop"] .shop-product-grid .product-shop-row{
  white-space:nowrap;
  overflow:hidden;
  text-overflow:ellipsis;
}

/* ------------------------------------------------------------------
   PRODUCT DETAILS
   ------------------------------------------------------------------ */
.product-modal .pdp-heading-v9 h2,
.product-modal .product-detail-title{
  font-size:clamp(1.18rem,calc(1.08rem + .48vw),1.48rem)!important;
  line-height:1.08!important;
  display:-webkit-box;
  -webkit-box-orient:vertical;
  -webkit-line-clamp:3;
  overflow:hidden;
}
.product-modal .pdp-price-row-v9 .pdp-price,
.product-modal .product-detail-price{
  font-size:clamp(1.14rem,calc(1.05rem + .42vw),1.38rem)!important;
  line-height:1!important;
  white-space:nowrap;
}
.product-modal .pdp-related-grid .product-title{
  font-size:var(--gv-accept-card-title)!important;
  line-height:1.18!important;
}

/* ------------------------------------------------------------------
   BASKET / CHECKOUT
   ------------------------------------------------------------------ */
.cart-sheet>.sheet-head h2,
.checkout-sheet>.sheet-head h2{
  font-size:clamp(1.08rem,calc(1rem + .34vw),1.28rem)!important;
  line-height:1.12!important;
}
.cart-sheet .cart-line h3{
  font-size:clamp(.80rem,calc(.76rem + .18vw),.90rem)!important;
  line-height:1.22!important;
  display:-webkit-box;
  -webkit-box-orient:vertical;
  -webkit-line-clamp:2;
  overflow:hidden;
}
.cart-sheet .cart-line p,.cart-sheet .cart-line-meta,
.checkout-sheet .checkout-preview-card p,
.checkout-sheet .checkout-section-help{
  font-size:var(--gv-accept-copy)!important;
}
.cart-sheet .cart-line-total,.checkout-sheet .checkout-total-lockup strong,
.checkout-sheet .checkout-breakdown-row strong{white-space:nowrap}
.checkout-sheet .checkout-progress span{
  font-size:clamp(.64rem,2.55vw,.74rem)!important;
  line-height:1.12!important;
}
.checkout-sheet .checkout-fields label,
.checkout-sheet .checkout-location-input{
  font-size:clamp(.78rem,calc(.74rem + .16vw),.88rem)!important;
}
@media (max-width:759px){
  .checkout-sheet input,.checkout-sheet select,.checkout-sheet textarea,
  .location-dialog input{font-size:1rem!important}
}

/* ------------------------------------------------------------------
   ORDERS
   ------------------------------------------------------------------ */
.screen[data-screen="orders"] .orders-native-head h1{
  font-size:var(--gv-accept-page)!important;
  line-height:1.08!important;
}
.screen[data-screen="orders"] .orders-group-head h2,
.screen[data-screen="orders"] .orders-section-title{
  font-size:var(--gv-accept-section)!important;
}
.screen[data-screen="orders"] .customer-order-head h3{
  font-size:clamp(.86rem,calc(.81rem + .20vw),1rem)!important;
  line-height:1.2!important;
}
.screen[data-screen="orders"] .customer-order-subtitle,
.screen[data-screen="orders"] .customer-order-lines>div,
.screen[data-screen="orders"] .customer-order-help{
  font-size:var(--gv-accept-copy)!important;
}
.screen[data-screen="orders"] .customer-order-total strong{
  font-size:clamp(1.05rem,calc(.98rem + .32vw),1.24rem)!important;
  white-space:nowrap;
}
.screen[data-screen="orders"] .customer-order-status,
.screen[data-screen="orders"] .history-status{
  font-size:var(--gv-accept-meta)!important;
  white-space:nowrap;
}

/* ------------------------------------------------------------------
   FAVOURITES
   ------------------------------------------------------------------ */
.screen[data-screen="favourites"] .favourites-title-row h1{
  font-size:var(--gv-accept-page)!important;
}
.screen[data-screen="favourites"] .favourites-product-grid .product-title{
  font-size:var(--gv-accept-card-title)!important;
  line-height:1.18!important;
}

/* ------------------------------------------------------------------
   ACCOUNT
   ------------------------------------------------------------------ */
.screen[data-screen="account"] .account-hero h1,
.screen[data-screen="account"] .account-hero-v2 h1{
  font-size:clamp(1.16rem,calc(1.07rem + .42vw),1.42rem)!important;
  line-height:1.08!important;
}
.screen[data-screen="account"] .account-section-head h2{
  font-size:var(--gv-accept-section)!important;
}
.screen[data-screen="account"] .account-setting-row strong,
.screen[data-screen="account"] .account-action-row strong{
  font-size:clamp(.80rem,calc(.76rem + .16vw),.90rem)!important;
  line-height:1.22!important;
}
.screen[data-screen="account"] .account-setting-row small,
.screen[data-screen="account"] .account-action-row small{
  font-size:var(--gv-accept-meta)!important;
  line-height:1.35!important;
}

/* Bottom navigation: one line, calm scale, no truncation at common widths. */
.bottom-nav .nav-item small,.nav-item small{
  font-size:clamp(.64rem,2.65vw,.73rem)!important;
  line-height:1!important;
  white-space:nowrap;
  overflow:visible;
  text-overflow:clip;
}

/* Small-phone acceptance: preserve breathing room instead of shrinking text endlessly. */
@media (max-width:359px){
  :root{
    --gv-accept-card-title:.75rem;
    --gv-accept-section:1.04rem;
    --gv-accept-page:1.22rem;
  }
  .screen[data-screen="home"] .section-head h2{max-width:calc(100% - 56px)}
  .bottom-nav .nav-item small,.nav-item small{font-size:.62rem!important}
}

/* Large phones and tablets: increase hierarchy gently, never proportionally to screen width. */
@media (min-width:430px) and (max-width:759px){
  :root{
    --gv-accept-card-title:.82rem;
    --gv-accept-section:1.16rem;
    --gv-accept-page:1.42rem;
  }
}

/* Reflow resilience for browser text zoom / large text settings. */
@media (max-width:759px){
  .section-head,.search-group-head,.shops-section-head,
  .merchant-catalogue-heading,.favourites-title-row{
    align-items:flex-start!important;
  }
  .screen button,.screen a,.cart-sheet button,.checkout-sheet button,
  .product-modal button{max-width:100%}
}
