/* YOREN Store Premium R5 - isolated storefront UX redesign.
 * Scope ONLY body.store-premium-r5 on /store.php?id=N.
 * Preserves business rules, ownership, product APIs, checkout & native bottom_nav.
 */
body.store-premium-r5{
  --r5-ink:#172a43;--r5-navy:#193450;--r5-gold:#c59a51;
  --r5-line:#e4e9ef;--r5-soft:#f6f8fb;
  background:#f7f8fa!important;color:#1a2d46!important;
  overflow-x:clip;
}
/* The global nav is included ahead of <main>. Its content spacer is
 * for bottom reserve, not a top-of-page block. Main already reserves bottom. */
body.store-premium-r5 > .lk-bottom-nav-content-spacer {
  display:none!important;height:0!important;min-height:0!important;
  max-height:0!important;padding:0!important;margin:0!important;
  border:0!important;flex:0 0 0!important;
}
body.store-premium-r5 > .store-wrap {
  box-sizing:border-box!important;
  width:min(1340px,100%)!important;
  max-width:1340px!important;margin:0 auto!important;
  padding:12px 16px calc(var(--lk-bottom-nav-content-reserve,80px) + 50px)!important;
  gap:12px!important;
}
body.store-premium-r5 > .store-wrap::before,
body.store-premium-r5 > .store-wrap::after{
  display:none!important;content:none!important;
}
body.store-premium-r5 .store-hero.store-premium-hero-r2 {
  display:flex!important;flex-direction:column!important;
  gap:0!important;padding:7px!important;
  border:1px solid #e6e9ef!important;border-radius:20px!important;
  background:#fff!important;overflow:hidden!important;
  box-shadow:0 12px 32px rgba(18,38,62,.075)!important;
}
body.store-premium-r5 .store-hero .hero-banner {
  display:block!important;position:relative!important;
  width:100%!important;height:clamp(185px,22vw,270px)!important;
  min-height:185px!important;max-height:270px!important;
  margin:0!important;border-radius:14px!important;
  overflow:hidden!important;background:#eef3f8!important;
}
body.store-premium-r5 .store-hero .hero-banner::after{
  content:''!important;display:block!important;position:absolute;inset:0;
  pointer-events:none;opacity:.6;
  background:linear-gradient(to bottom,transparent 66%,rgba(13,29,48,.15));
}
body.store-premium-r5 .store-hero .hero-banner img{
  display:block!important;width:100%!important;height:100%!important;
  object-fit:contain!important;object-position:center!important;
  filter:none!important;transform:none!important;
  background:#eef2f7;
}
body.store-premium-r5 .store-hero .hero-row {
  box-sizing:border-box;display:grid!important;
  grid-template-columns:94px minmax(0,1fr)!important;
  grid-template-rows:auto auto!important;
  gap:8px 17px!important;align-items:start!important;
  width:100%!important;margin:-38px 0 0!important;
  padding:0 17px 17px!important;
}
body.store-premium-r5 .store-hero .hero-avatar {
  grid-row:1 / span 2!important;grid-column:1!important;
  position:relative;z-index:2;
  width:94px!important;height:94px!important;
  margin:0!important;border:4px solid #fff!important;
  border-radius:23px!important;background:#fff!important;
  box-shadow:0 7px 21px rgba(19,37,58,.16)!important;
}
body.store-premium-r5 .store-hero .hero-avatar img{
  width:100%!important;height:100%!important;object-fit:cover!important;
  border-radius:18px!important;
}
body.store-premium-r5 .store-hero .hero-text{
  grid-row:1!important;grid-column:2!important;
  min-width:0!important;align-self:start!important;
  padding:42px 8px 4px!important;
  background:transparent!important;border:0!important;
  border-radius:0!important;box-shadow:none!important;
}
body.store-premium-r5 .store-premium-title-r2{
  min-width:0;gap:7px!important;flex-wrap:wrap!important;
}
body.store-premium-r5 .store-premium-title-r2 h1{
  font-size:clamp(20px,2.8vw,29px)!important;
  font-weight:840!important;color:#1b334e!important;
  white-space:normal!important;overflow-wrap:anywhere;
  line-height:1.3!important;letter-spacing:-.025em!important;
}
body.store-premium-r5 .store-premium-trust-r2,
body.store-premium-r5 .store-premium-status-line-r4r2,
body.store-premium-r5 .store-premium-info-line-r4r2{
  flex-wrap:wrap!important;min-width:0!important;
  font-size:11.5px!important;color:#687b91!important;
}
body.store-premium-r5 .store-premium-status-r2.is-open{color:#138052!important}
body.store-premium-r5 .store-hero .store-premium-actions-r2{
  grid-row:2!important;grid-column:2!important;
  display:flex!important;flex-wrap:wrap!important;
  align-items:stretch!important;justify-content:flex-start!important;
  width:100%!important;max-width:100%!important;
  gap:8px!important;margin:0!important;padding:0!important;
}
body.store-premium-r5 .store-hero .store-premium-actions-r2 > .btn{
  display:inline-flex!important;flex:0 1 auto!important;
  align-items:center!important;justify-content:center!important;
  gap:8px!important;
  width:auto!important;min-width:104px!important;
  max-width:none!important;height:auto!important;
  min-height:43px!important;padding:8px 14px!important;
  border:1px solid #e0e6ed!important;border-radius:11px!important;
  background:#f9fbfd!important;color:#30475f!important;
  text-decoration:none!important;box-shadow:none!important;
  font-size:12px!important;font-weight:760!important;
}
body.store-premium-r5 .store-hero .store-premium-actions-r2 > .btn:hover{
  background:#eef4fa!important;border-color:#bdd0e4!important;
}
body.store-premium-r5 .store-premium-action-r2__icon,
body.store-premium-r5 .store-premium-action-r2__icon > i{
  position:static!important;display:inline-flex!important;
  width:auto!important;height:auto!important;
  margin:0!important;padding:0!important;
  background:none!important;color:inherit!important;
  font-size:16px!important;
}
body.store-premium-r5 .store-premium-action-r2__label{
  position:static!important;clip:auto!important;clip-path:none!important;
  display:inline!important;overflow:visible!important;
  width:auto!important;height:auto!important;
  white-space:nowrap!important;
  font:inherit!important;color:inherit!important;
}
body.store-premium-r5 .store-hero .store-premium-actions-r2 > .store-premium-owner-action-r4r2 {
  color:#fff!important;background:#193650!important;
  border-color:#193650!important;min-width:126px!important;
  box-shadow:0 3px 9px rgba(19,40,61,.12)!important;
}
body.store-premium-r5 .store-hero .store-premium-actions-r2 > .store-premium-owner-action-r4r2:hover{
  background:#264969!important;border-color:#264969!important;
}
body.store-premium-r5 .store-hero .store-premium-actions-r2 > .store-premium-owner-action-r4r2:nth-child(2) {
  background:#f4ecd9!important;color:#76562c!important;
  border-color:#e3cda4!important;
  box-shadow:none!important;
}
/* Search submits through pre-existing f-q -> btn-apply filters, NOT a local page-only search. */
body.store-premium-r5 .store-r5-search{
  display:flex;align-items:center;gap:10px;
  min-width:0;width:100%;
  padding:11px 13px!important;margin:0 0 2px!important;
  border:1px solid #e3e7ed;border-radius:15px;
  background:#fff;box-shadow:0 4px 16px rgba(25,44,66,.04);
}
body.store-premium-r5 .store-r5-search-icon{
  flex:0 0 auto;font-size:17px;color:#b4935c;
}
body.store-premium-r5 .store-r5-search-field{
  box-sizing:border-box;flex:1 1 0;min-width:0;
  width:100%;height:44px;padding:9px 12px!important;
  border:1px solid #dfe5ed!important;background:#f9fafc!important;
  border-radius:10px!important;color:#1a314a!important;
  font:inherit;font-size:13px!important;
}
body.store-premium-r5 .store-r5-search-field:focus{
  outline:2px solid rgba(202,157,79,.3);outline-offset:0;
  border-color:#c39b55!important;
}
body.store-premium-r5 .store-r5-search-btn,
body.store-premium-r5 .store-r5-search-clear{
  display:inline-flex;align-items:center;justify-content:center;
  flex:0 0 auto;min-height:44px;padding:8px 18px;
  font-size:12.5px;font-weight:800;
  border-radius:10px;cursor:pointer;
}
body.store-premium-r5 .store-r5-search-btn{
  border:1px solid #b78c43;background:#c19751;color:#fff;
}
body.store-premium-r5 .store-r5-search-clear{
  background:#fff;border:1px solid #dce3eb;color:#53647b;
}
body.store-premium-r5 .store-r5-search-help{
  color:#708094;font-size:11px;line-height:1.35;
  margin:0 0 4px!important;padding:0 6px!important;
}
body.store-premium-r5 .store-catalog-controls-r4{
  display:flex!important;align-items:center!important;
  justify-content:space-between!important;flex-wrap:wrap!important;
  gap:8px!important;width:100%!important;
  padding:8px 12px!important;border:1px solid #e8edf2!important;
  border-radius:12px!important;background:#fff!important;
  margin:0!important;box-shadow:none!important;
}
body.store-premium-r5 .store-catalog-controls-r4 .view-toolbar{
  margin:0!important;padding:0!important;
}
body.store-premium-r5 .store-catalog-controls-r4 .store-filter-toggle-r4{
  min-height:37px!important;border-radius:9px!important;
  background:#f6f8fb!important;color:#40566e!important;
}
body.store-premium-r5 .product-list {
  box-sizing:border-box;min-width:0;
  margin-top:2px!important;padding-top:0!important;
}
body.store-premium-r5 #product-grid[data-view="grid"]{
  display:grid!important;grid-template-columns:repeat(4,minmax(0,1fr))!important;
  gap:15px!important;width:100%!important;min-width:0!important;
}
body.store-premium-r5 #product-grid > .product-card{
  min-width:0!important;height:100%!important;
  border:1px solid #e2e6ed!important;border-radius:14px!important;
  box-shadow:0 4px 14px rgba(18,39,61,.055)!important;
}
body.store-premium-r5 #product-grid .product-card .name{
  overflow-wrap:anywhere;
  font-size:13.5px!important;line-height:1.45!important;
  min-height:2.9em!important;
}
body.store-premium-r5 #product-grid .product-card img.thumb{
  object-fit:contain!important;background:#f5f7f9!important;
}
body.store-premium-r5 #featured-product-grid-r1,
body.store-premium-r5 #bestseller-product-grid-r3{
  display:grid!important;
  grid-template-columns:repeat(4,minmax(0,1fr))!important;
  gap:15px!important;justify-items:stretch!important;
  align-items:stretch!important;width:100%!important;
}
body.store-premium-r5 #featured-product-grid-r1 > *,
body.store-premium-r5 #bestseller-product-grid-r3 > *{
  min-width:0!important;max-width:none!important;
  width:100%!important;height:100%!important;
}
body.store-premium-r5 .featured-products-section-r1,
body.store-premium-r5 .bestseller-products-section-r3{
  padding:12px!important;border:1px solid #e6e9ef!important;
  border-radius:15px!important;background:#fff!important;
  margin:0 0 12px!important;
}
body.store-premium-r5 .featured-products-header-r1,
body.store-premium-r5 .bestseller-products-header-r3{
  margin-bottom:13px!important;
}
body.store-premium-r5 #grid-loading.loading{
  box-sizing:border-box!important;
  position:relative;display:grid;
  place-items:center;min-height:190px!important;
  border:1px dashed #dfe6ee;border-radius:13px;
  background:linear-gradient(105deg,#f6f8fb 12%,#eff3f8 23%,#f6f8fb 36%);
  background-size:200% 100%;
  animation:storeR5Shimmer 1.8s ease-in-out infinite;
  color:#8493a6;text-align:center;
}
body.store-premium-r5 #grid-loading.loading::after{
  content:'Đang tải sản phẩm của cửa hàng…';
  display:block;font-size:12px;font-weight:650;margin-top:8px;
  color:#75859b;
}
body.store-premium-r5 #grid-loading.loading i{
  display:block!important;color:#b2925b!important;
  font-size:23px!important;
}
@keyframes storeR5Shimmer{to{background-position-x:-200%}}
body.store-premium-r5 .store-r5-owner-kicker{
  display:flex;align-items:center;gap:7px;
  color:#765930;font-size:11px;font-weight:790;
  background:#fff8e9;border:1px solid #ead6b1;
  border-radius:8px;padding:5px 9px;
  width:max-content;max-width:100%;margin:0 0 5px;
}
@media(max-width:1020px){
  body.store-premium-r5 #product-grid[data-view="grid"],
  body.store-premium-r5 #featured-product-grid-r1,
  body.store-premium-r5 #bestseller-product-grid-r3{
    grid-template-columns:repeat(3,minmax(0,1fr))!important;
  }
}
@media(max-width:760px){
  body.store-premium-r5 > .store-wrap{
    padding:8px 10px calc(var(--lk-bottom-nav-content-reserve,80px) + 38px)!important;
    gap:9px!important;
  }
  body.store-premium-r5 .store-hero.store-premium-hero-r2{
    padding:5px!important;border-radius:14px!important;
  }
  body.store-premium-r5 .store-hero .hero-banner{
    height:clamp(154px,41vw,190px)!important;
    min-height:154px!important;max-height:190px!important;
    border-radius:10px!important;
  }
  body.store-premium-r5 .store-hero .hero-row{
    grid-template-columns:65px minmax(0,1fr)!important;
    grid-template-rows:auto auto!important;
    margin:-24px 0 0!important;padding:0 7px 9px!important;
    gap:7px 9px!important;
  }
  body.store-premium-r5 .store-hero .hero-avatar{
    width:65px!important;height:65px!important;
    grid-row:1!important;grid-column:1!important;
    border:3px solid #fff!important;border-radius:16px!important;
  }
  body.store-premium-r5 .store-hero .hero-text{
    grid-column:2!important;grid-row:1!important;
    padding:26px 0 0!important;min-width:0!important;
  }
  body.store-premium-r5 .store-premium-title-r2 h1{
    font-size:clamp(16px,4.3vw,20px)!important;line-height:1.35!important;
  }
  body.store-premium-r5 .store-premium-trust-r2,
  body.store-premium-r5 .store-premium-info-line-r4r2{
    font-size:10.5px!important;gap:5px!important;
  }
  body.store-premium-r5 .store-hero .store-premium-actions-r2{
    grid-column:1/-1!important;grid-row:2!important;
    display:grid!important;
    grid-template-columns:repeat(3,minmax(0,1fr))!important;
    gap:7px!important;padding:1px 1px 0!important;
  }
  body.store-premium-r5 .store-hero .store-premium-actions-r2 > .btn{
    display:flex!important;width:100%!important;max-width:100%!important;
    min-width:0!important;min-height:49px!important;
    height:auto!important;flex:1 1 auto!important;
    flex-direction:column!important;gap:4px!important;
    padding:6px 4px!important;border-radius:10px!important;
    font-size:10.5px!important;line-height:1.25!important;
  }
  body.store-premium-r5 .store-hero .store-premium-actions-r2 > .store-premium-owner-action-r4r2{
    grid-column:span 1;min-height:53px!important;
  }
  body.store-premium-r5 .store-hero .store-premium-actions-r2 > .store-premium-owner-action-r4r2:nth-child(2){
    background:#f3e8d4!important;color:#795a2d!important;
  }
  body.store-premium-r5 .store-r5-search{
    padding:9px!important;gap:7px!important;
    flex-wrap:wrap;
    border-radius:12px;
  }
  body.store-premium-r5 .store-r5-search-icon{display:none}
  body.store-premium-r5 .store-r5-search-field{
    flex:1 1 100%!important;min-height:43px!important;height:43px!important;
  }
  body.store-premium-r5 .store-r5-search-btn,
  body.store-premium-r5 .store-r5-search-clear{
    min-height:39px!important;flex:1 1 100px!important;
    padding:8px 10px!important;
  }
  body.store-premium-r5 .store-r5-search-help{
    font-size:10px!important;padding:0 3px!important;
  }
  body.store-premium-r5 .store-catalog-controls-r4{
    padding:7px!important;border-radius:10px!important;
  }
  body.store-premium-r5 #product-grid[data-view="grid"],
  body.store-premium-r5 #featured-product-grid-r1,
  body.store-premium-r5 #bestseller-product-grid-r3{
    grid-template-columns:repeat(2,minmax(0,1fr))!important;
    gap:8px!important;
  }
  body.store-premium-r5 #product-grid .product-card .name{
    font-size:12px!important;line-height:1.4!important;
  }
  body.store-premium-r5 #grid-loading.loading{min-height:146px!important}
}
@media(min-width:560px) and (max-width:760px){
  body.store-premium-r5 #product-grid[data-view="grid"],
  body.store-premium-r5 #featured-product-grid-r1,
  body.store-premium-r5 #bestseller-product-grid-r3{
    grid-template-columns:repeat(3,minmax(0,1fr))!important;
  }
}
@media(max-width:355px){
  body.store-premium-r5 .store-hero .store-premium-actions-r2 > .btn{font-size:10px!important}
  body.store-premium-r5 .store-hero .store-premium-actions-r2 > .btn .store-premium-action-r2__label{
    white-space:normal!important;text-align:center!important;
  }
}
@media(prefers-reduced-motion:reduce){
  body.store-premium-r5 #grid-loading.loading{animation:none!important}
}

/* R5 finishing pass: accessible compact tools, no obstructive notification layer. */
body.store-premium-r5 .store-r5-search-more{
 display:inline-flex;align-items:center;justify-content:center;gap:5px;
 flex:0 0 auto;min-height:44px;
 padding:8px 14px;border:1px solid #d9e2ec;border-radius:10px;
 background:#f7f9fb;color:#425873;cursor:pointer;
 font-size:12.5px;font-weight:770;
}
body.store-premium-r5 .store-r5-search-more:hover{background:#edf2f7}
body.store-premium-r5 #fab-filter{display:none!important}
body.store-premium-r5 #ai-fab-order,
body.store-premium-r5 #fab-cart{
 width:46px!important;height:46px!important;min-width:46px!important;
 min-height:46px!important;right:9px!important;
 border-radius:50%!important;
}
body.store-premium-r5 #ai-fab-order .fab-ai__icon{font-size:19px!important}
body.store-premium-r5 #ai-fab-order .fab-ai__text{font-size:9px!important}
/* The original permission prompt remains functional; style as a small opt-in toast.
   Never auto-accept or suppress its consent controls. */
body.store-premium-r5 #yoren-pwa-notification-consent{
 left:10px!important;right:10px!important;
 bottom:calc(74px + env(safe-area-inset-bottom,0px))!important;
 justify-content:flex-end!important;
 pointer-events:none!important;
}
body.store-premium-r5 #yoren-pwa-notification-consent .yoren-pwa-consent-card{
 box-sizing:border-box!important;
 display:grid!important;
 grid-template-columns:minmax(0,1fr) auto!important;
 grid-template-rows:auto!important;
 width:min(390px,100%)!important;max-width:100%!important;
 gap:8px!important;padding:8px 10px!important;
 border:1px solid rgba(218,231,244,.35)!important;
 background:rgba(23,46,68,.97)!important;
 border-radius:12px!important;
 box-shadow:0 8px 25px rgba(9,28,44,.17)!important;
 pointer-events:auto!important;
}
body.store-premium-r5 #yoren-pwa-notification-consent .yoren-pwa-consent-mark{
 display:none!important;
}
body.store-premium-r5 #yoren-pwa-notification-consent .yoren-pwa-consent-copy{
 grid-column:1!important;grid-row:1!important;
 display:flex!important;flex-direction:column!important;
 min-width:0!important;gap:3px!important;
}
body.store-premium-r5 #yoren-pwa-notification-consent .yoren-pwa-consent-copy strong{
 font-size:10.5px!important;font-weight:800!important;
 line-height:1.2!important;color:#fff!important;
}
body.store-premium-r5 #yoren-pwa-notification-consent .yoren-pwa-consent-copy span{
 display:block!important;font-size:9.5px!important;
 line-height:1.25!important;max-height:2.6em!important;
 overflow:hidden!important;color:#e9f0f6!important;
}
body.store-premium-r5 #yoren-pwa-notification-consent .yoren-pwa-consent-actions{
 grid-column:2!important;grid-row:1!important;
 display:flex!important;flex-direction:column!important;
 justify-content:center!important;gap:4px!important;
 margin:0!important;min-width:105px!important;
}
body.store-premium-r5 #yoren-pwa-notification-consent .yoren-pwa-consent-actions button{
 box-sizing:border-box!important;
 min-height:31px!important;height:auto!important;
 margin:0!important;padding:5px 8px!important;
 border-radius:8px!important;font-size:10px!important;
 font-weight:760!important;line-height:1.2!important;
}
@media(max-width:760px){
 body.store-premium-r5 .store-hero .store-premium-actions-r2{
  grid-template-columns:repeat(4,minmax(0,1fr))!important;
  gap:6px!important;
 }
 body.store-premium-r5 .store-hero .store-premium-actions-r2>.btn{
  min-height:49px!important;
  gap:3px!important;padding:6px 3px!important;
  font-size:10px!important;
 }
 body.store-premium-r5 .store-r5-search-btn,
 body.store-premium-r5 .store-r5-search-clear,
 body.store-premium-r5 .store-r5-search-more{
  flex:1 1 90px!important;min-width:0!important;
  min-height:40px!important;padding:7px 5px!important;
  font-size:10.5px!important;
  white-space:normal!important;text-align:center!important;
 }
 body.store-premium-r5 #yoren-pwa-notification-consent{
  bottom:calc(66px + env(safe-area-inset-bottom,0px))!important;
  left:8px!important;right:8px!important;
 }
 body.store-premium-r5 #yoren-pwa-notification-consent .yoren-pwa-consent-card{
  width:100%!important;padding:7px 8px!important;gap:7px!important;
 }
 body.store-premium-r5 #yoren-pwa-notification-consent .yoren-pwa-consent-actions{
  min-width:100px!important;
 }
}
@media(max-width:355px){
 body.store-premium-r5 .store-hero .store-premium-actions-r2{
  grid-template-columns:repeat(2,minmax(0,1fr))!important;
 }
}

/* Match the R5 responsive catalog rule above all legacy dynamic grid rules. */
@media (min-width:560px) and (max-width:760px){
  html body.store-premium-r5[data-store-commerce-ui-release="YOREN_STORE_PREMIUM_UI_R4"] #product-grid[data-view="grid"],
  html body.store-premium-r5[data-store-commerce-ui-release="YOREN_STORE_PREMIUM_UI_R4"] #featured-product-grid-r1,
  html body.store-premium-r5[data-store-commerce-ui-release="YOREN_STORE_PREMIUM_UI_R4"] #bestseller-product-grid-r3{
    display:grid!important;
    grid-template-columns:repeat(3,minmax(0,1fr))!important;
    gap:9px!important;
  }
}
