/* Storefront V22 — polished responsive home, cards, templates and footer */
:root{
  --store-shell: min(1440px, calc(100% - 40px));
  --store-radius-xl: 30px;
  --store-radius-lg: 22px;
  --store-radius-md: 16px;
  --store-soft-shadow: 0 18px 50px rgba(15,23,42,.10);
  --store-card-shadow: 0 10px 30px rgba(15,23,42,.08);
  --store-card-shadow-hover: 0 24px 58px rgba(15,23,42,.16);
}

body.store-play{
  background:
    radial-gradient(900px 400px at 100% 0%, color-mix(in srgb, var(--md-primary) 8%, transparent), transparent 72%),
    var(--md-bg);
  color: var(--md-text);
}

body.store-play .home-page-container{
  width: var(--store-shell) !important;
  max-width: none !important;
  padding-inline: 0 !important;
  padding-top: 24px !important;
}

body.store-play .home-ad-layout__main{
  max-width: none !important;
  gap: 34px !important;
}

body.store-play .store-appbar{
  border-bottom: 1px solid var(--md-outline);
  box-shadow: 0 8px 28px rgba(15,23,42,.06);
  backdrop-filter: blur(18px) saturate(1.2);
}

body.store-play .store-appbar__inner{
  width: var(--store-shell);
  margin-inline: auto;
}

body.store-play .store-search{
  border-radius: 999px;
  min-height: 48px;
  border: 1px solid var(--md-outline);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.35);
}

body.store-play .store-tabs{
  border-bottom: 1px solid var(--md-outline);
}

body.store-play .store-tabs__inner{
  width: var(--store-shell);
  margin-inline: auto;
}

/* Hero */
body.store-play .home-cover{
  min-height: 420px !important;
  border-radius: var(--store-radius-xl) !important;
  box-shadow: 0 30px 80px rgba(15,23,42,.22) !important;
  background-position: center;
  background-size: cover;
  position: relative;
}

body.store-play .home-cover__overlay{
  background:
    linear-gradient(90deg, rgba(4,11,28,.84) 0%, rgba(4,11,28,.58) 48%, rgba(4,11,28,.14) 100%) !important;
}

html[dir="rtl"] body.store-play .home-cover__overlay{
  background:
    linear-gradient(270deg, rgba(4,11,28,.84) 0%, rgba(4,11,28,.58) 48%, rgba(4,11,28,.14) 100%) !important;
}

body.store-play .home-cover__content{
  min-height: 420px;
  display: flex;
  align-items: center;
  padding: clamp(30px,5vw,72px) !important;
  position: relative;
  z-index: 2;
}

body.store-play .home-cover__text{
  max-width: 720px;
}

body.store-play .home-cover__eyebrow{
  display: inline-flex;
  align-items: center;
  gap: 9px;
  padding: 8px 14px;
  border-radius: 999px;
  background: rgba(255,255,255,.12);
  border: 1px solid rgba(255,255,255,.20);
  font-weight: 800;
  font-size: 13px;
  backdrop-filter: blur(12px);
  margin-bottom: 18px;
}

body.store-play .home-cover__title{
  font-size: clamp(2.25rem,5vw,4.6rem) !important;
  line-height: 1.08 !important;
  letter-spacing: -.045em;
  max-width: 800px;
  text-shadow: 0 12px 32px rgba(0,0,0,.28);
}

body.store-play .home-cover__sub{
  font-size: clamp(1rem,1.5vw,1.25rem) !important;
  line-height: 1.9 !important;
  max-width: 660px !important;
  color: rgba(255,255,255,.88) !important;
  margin-top: 18px !important;
}

body.store-play .home-cover__actions{
  margin-top: 26px !important;
  gap: 12px !important;
}

body.store-play .home-cover__btn{
  min-height: 50px;
  padding-inline: 22px;
  border-radius: 14px;
  font-weight: 900;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  transition: transform .2s ease, box-shadow .2s ease, background-color .2s ease;
}

body.store-play .home-cover__btn.primary{
  background: var(--md-primary) !important;
  color: var(--md-on-primary) !important;
  box-shadow: 0 14px 30px color-mix(in srgb, var(--md-primary) 36%, transparent);
}

body.store-play .home-cover__btn.secondary{
  color: #fff !important;
  background: rgba(255,255,255,.10);
  border: 1px solid rgba(255,255,255,.32);
  backdrop-filter: blur(14px);
}

body.store-play .home-cover__btn:hover{
  transform: translateY(-2px);
  text-decoration: none;
}

body.store-play .home-cover__mini-stats{
  display: flex;
  flex-wrap: wrap;
  gap: 16px 24px;
  margin-top: 28px;
  font-size: 13px;
  color: rgba(255,255,255,.78);
}

body.store-play .home-cover__mini-stats span{
  display: inline-flex;
  align-items: center;
  gap: 7px;
}

body.store-play .home-cover__mini-stats strong{
  color: #fff;
  font-size: 16px;
}

/* Trust strip */
.home-trust-strip{
  display: grid;
  grid-template-columns: repeat(4,minmax(0,1fr));
  gap: 12px;
  padding: 16px;
  margin-top: -22px;
  margin-inline: 24px;
  position: relative;
  z-index: 5;
  background: color-mix(in srgb, var(--md-surface) 92%, transparent);
  border: 1px solid var(--md-outline);
  border-radius: 22px;
  box-shadow: var(--store-soft-shadow);
  backdrop-filter: blur(18px);
}

.home-trust-item{
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: 68px;
  padding: 10px 14px;
  border-inline-end: 1px solid var(--md-outline);
}

.home-trust-item:last-child{ border-inline-end: 0; }

.home-trust-item > span{
  width: 42px;
  height: 42px;
  flex: 0 0 42px;
  border-radius: 14px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--md-primary);
  background: color-mix(in srgb, var(--md-primary) 12%, var(--md-surface));
}

.home-trust-item strong,
.home-trust-item small{ display:block; }

.home-trust-item strong{ font-size: 14px; }
.home-trust-item small{ color: var(--md-muted); margin-top: 3px; font-size: 12px; }

/* Shelves and filters */
body.store-play .shelf{
  margin-top: 0 !important;
}

body.store-play .home-projects-shelf,
body.store-play .storefront-section{
  padding: 26px;
  background: var(--md-surface);
  border: 1px solid var(--md-outline);
  border-radius: var(--store-radius-xl);
  box-shadow: var(--store-card-shadow);
}

body.store-play .shelf-head{
  align-items: end !important;
  margin-bottom: 20px;
}

body.store-play .shelf-title{
  font-size: clamp(1.3rem,2vw,1.75rem) !important;
  font-weight: 950 !important;
  display: flex;
  align-items: center;
  gap: 10px;
}

body.store-play .shelf-title i{ color: var(--md-primary); }

.shelf-subtitle{
  margin: 7px 0 0;
  color: var(--md-muted);
  font-size: 14px;
}

body.store-play .shelf-more{
  min-height: 40px;
  padding: 0 15px;
  border: 1px solid var(--md-outline);
  border-radius: 12px;
  display: inline-flex;
  align-items: center;
  color: var(--md-primary);
  background: var(--md-surface2);
  text-decoration: none !important;
}

body.store-play .home-project-count{
  color: var(--md-text) !important;
  border-color: var(--md-outline) !important;
  background: var(--md-surface2) !important;
}

body.store-play .home-project-filters{
  margin-bottom: 22px !important;
  padding: 14px !important;
  border-radius: 18px !important;
  border-color: var(--md-outline) !important;
  background: var(--md-surface2) !important;
  backdrop-filter: none !important;
}

body.store-play .home-project-filters .home-cat-menu{
  flex-wrap: nowrap !important;
  overflow-x: auto;
  scrollbar-width: none;
  padding-bottom: 2px;
}

body.store-play .home-project-filters .home-cat-menu::-webkit-scrollbar{ display:none; }

body.store-play .home-project-filters .chip{
  flex: 0 0 auto;
  border-radius: 999px !important;
  min-height: 42px !important;
  padding-inline: 16px !important;
}

/* Product grid and card */
body.store-play .shelf-row.home-project-grid,
body.store-play .storefront-grid{
  display: grid !important;
  grid-template-columns: repeat(4,minmax(0,1fr)) !important;
  gap: 20px !important;
  overflow: visible !important;
}

body.store-play .app-tile{
  width: 100% !important;
  min-width: 0 !important;
  height: 100%;
  display: flex !important;
  flex-direction: column;
  overflow: hidden;
  border-radius: var(--store-radius-lg) !important;
  border: 1px solid var(--md-outline) !important;
  background: var(--md-surface) !important;
  color: var(--md-text) !important;
  text-decoration: none;
  box-shadow: 0 4px 18px rgba(15,23,42,.05);
  transition: transform .24s ease, box-shadow .24s ease, border-color .24s ease !important;
}

body.store-play .app-tile:hover{
  transform: translateY(-7px) !important;
  box-shadow: var(--store-card-shadow-hover) !important;
  border-color: color-mix(in srgb, var(--md-primary) 42%, var(--md-outline)) !important;
}

.app-tile__media{
  position: relative;
  overflow: hidden;
  aspect-ratio: 16/10;
  background: var(--md-surface2);
}

.app-tile__image-link{
  display: block;
  width: 100%;
  height: 100%;
}

body.store-play .shelf-row.home-project-grid .app-tile__img,
body.store-play .app-tile__img{
  width: 100%;
  height: 100% !important;
  object-fit: cover;
  display: block;
  transition: transform .45s ease, filter .45s ease !important;
}

body.store-play .app-tile:hover .app-tile__img{
  transform: scale(1.055) !important;
}

.app-tile__badges{
  position: absolute;
  top: 12px;
  inset-inline-start: 12px;
  display: flex;
  gap: 7px;
  flex-wrap: wrap;
  pointer-events: none;
}

.product-badge{
  display: inline-flex;
  align-items: center;
  min-height: 26px;
  padding: 0 10px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 900;
  box-shadow: 0 5px 16px rgba(15,23,42,.18);
}

.product-badge--featured{ background:#172554; color:#fff; }
.product-badge--free{ background:#047857; color:#fff; }
.product-badge--sale{ background:#be123c; color:#fff; }

body.store-play .shelf-row.home-project-grid .app-tile__body,
body.store-play .app-tile__body{
  padding: 17px 17px 18px !important;
  display: flex;
  flex-direction: column;
  flex: 1;
}

.app-tile__category{
  color: var(--md-primary);
  font-size: 11px;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: .03em;
  margin-bottom: 8px;
}

body.store-play .app-tile__title{
  color: var(--md-text) !important;
  font-size: 1.03rem !important;
  line-height: 1.5;
  font-weight: 950 !important;
  text-decoration: none;
  min-height: 3em;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

body.store-play .app-devline{
  color: var(--md-muted);
  margin-top: 8px;
  font-size: 12px !important;
}

body.store-play .app-tile__sub{
  color: var(--md-muted) !important;
  line-height: 1.7 !important;
  font-size: 13px !important;
  min-height: 3.4em;
  margin-top: 10px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.app-tile__stats{
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
  color: var(--md-muted);
  font-size: 12px;
  padding-top: 13px;
  margin-top: auto;
}

.app-tile__stats .rating-line i{ color:#f59e0b; }
.app-tile__stats small{ color: var(--md-muted); }

body.store-play .app-tile__meta{
  margin-top: 14px !important;
  padding-top: 14px;
  border-top: 1px solid var(--md-outline);
}

.app-price-wrap{
  display:flex;
  flex-direction:column;
  align-items:flex-start;
  gap:3px;
}

body.store-play .price-badge{
  background: transparent !important;
  color: var(--md-text) !important;
  font-size: .95rem !important;
  font-weight: 950;
  padding: 0 !important;
  height: auto !important;
}

.app-price-wrap del{
  color: var(--md-muted);
  font-size: 11px;
}

.app-tile__details{
  display: inline-flex;
  align-items: center;
  gap: 7px;
  min-height: 36px;
  padding: 0 12px;
  border-radius: 10px;
  background: color-mix(in srgb, var(--md-primary) 11%, var(--md-surface));
  color: var(--md-primary);
  font-size: 12px;
  font-weight: 900;
  text-decoration: none;
}

.app-tile__details:hover{
  color: var(--md-on-primary);
  background: var(--md-primary);
}

/* Benefits */
.home-benefits{
  padding: 42px 30px;
  border-radius: var(--store-radius-xl);
  background:
    radial-gradient(500px 220px at 100% 0%, color-mix(in srgb, var(--md-primary) 14%, transparent), transparent 70%),
    var(--md-surface2);
  border: 1px solid var(--md-outline);
}

.home-section-heading{
  max-width: 650px;
  margin-bottom: 24px;
}

.home-section-heading > span{
  color: var(--md-primary);
  font-weight: 900;
  font-size: 13px;
}

.home-section-heading h2{
  margin: 8px 0 0;
  font-size: clamp(1.5rem,2.5vw,2.35rem);
  font-weight: 950;
  color: var(--md-text);
}

.home-benefits__grid{
  display:grid;
  grid-template-columns:repeat(4,minmax(0,1fr));
  gap:16px;
}

.home-benefits__grid article{
  padding: 22px;
  border-radius: 20px;
  border: 1px solid var(--md-outline);
  background: var(--md-surface);
  box-shadow: 0 8px 24px rgba(15,23,42,.05);
}

.home-benefits__grid article > span{
  width:48px;
  height:48px;
  border-radius:16px;
  display:inline-flex;
  align-items:center;
  justify-content:center;
  background: color-mix(in srgb, var(--md-primary) 12%, var(--md-surface));
  color: var(--md-primary);
  font-size:18px;
}

.home-benefits__grid h3{
  font-size:16px;
  font-weight:950;
  margin:16px 0 8px;
}

.home-benefits__grid p{
  color:var(--md-muted);
  line-height:1.8;
  font-size:13px;
  margin:0;
}

/* Seller CTA */
.home-seller-cta{
  display:grid;
  grid-template-columns:auto minmax(0,1fr) auto;
  align-items:center;
  gap:24px;
  padding:30px;
  border-radius:var(--store-radius-xl);
  color:#fff;
  background:
    radial-gradient(460px 200px at 12% 15%, rgba(255,255,255,.18), transparent 72%),
    linear-gradient(135deg, color-mix(in srgb, var(--md-primary) 84%, #081124), #081124);
  box-shadow:0 28px 64px color-mix(in srgb, var(--md-primary) 25%, transparent);
}

.home-seller-cta__icon{
  width:72px;
  height:72px;
  border-radius:22px;
  display:flex;
  align-items:center;
  justify-content:center;
  font-size:27px;
  background:rgba(255,255,255,.13);
  border:1px solid rgba(255,255,255,.20);
}

.home-seller-cta__content > span{ font-size:12px; font-weight:900; opacity:.74; }
.home-seller-cta__content h2{ font-size:clamp(1.4rem,2.4vw,2rem); font-weight:950; margin:7px 0; }
.home-seller-cta__content p{ margin:0; opacity:.82; line-height:1.7; }

.home-seller-cta__btn{
  min-height:48px;
  padding:0 20px;
  border-radius:14px;
  background:#fff;
  color:#111827;
  display:inline-flex;
  align-items:center;
  gap:9px;
  font-weight:950;
  text-decoration:none;
  white-space:nowrap;
}

/* Footer */
body.store-play .store-footer{
  margin-top: 64px !important;
  border-top: 1px solid var(--md-outline) !important;
  background: var(--md-surface) !important;
}

.store-footer__inner{
  width: var(--store-shell);
  margin-inline:auto;
  padding:48px 0 26px;
}

.store-footer__grid{
  display:grid;
  grid-template-columns:1.4fr repeat(3,minmax(0,1fr));
  gap:34px;
}

.store-footer__brand{
  font-size:1.25rem;
  font-weight:950;
  color:var(--md-text);
}

.store-footer__about{
  color:var(--md-muted);
  line-height:1.9;
  margin-top:12px;
  max-width:460px;
}

.store-footer h3{
  font-size:14px;
  font-weight:950;
  margin:0 0 14px;
}

.store-footer ul{
  list-style:none;
  padding:0;
  margin:0;
  display:grid;
  gap:10px;
}

.store-footer a{
  color:var(--md-muted);
  text-decoration:none;
}

.store-footer a:hover{ color:var(--md-primary); }

.store-footer__contact{
  display:grid;
  gap:10px;
  color:var(--md-muted);
}

.store-footer__contact span{
  display:flex;
  align-items:center;
  gap:9px;
}

.store-footer__bottom{
  margin-top:34px;
  padding-top:22px;
  border-top:1px solid var(--md-outline);
  display:flex;
  justify-content:space-between;
  gap:16px;
  flex-wrap:wrap;
  color:var(--md-muted);
  font-size:12px;
}

/* Templates */
body.home-template-premium .home-cover{
  min-height:500px !important;
}
body.home-template-premium .home-cover__content{ min-height:500px; }
body.home-template-premium .home-projects-shelf,
body.home-template-premium .storefront-section{
  box-shadow:0 24px 60px rgba(15,23,42,.10);
}
body.home-template-premium .app-tile{ border-radius:28px !important; }

body.home-template-compact .home-cover{
  min-height:330px !important;
}
body.home-template-compact .home-cover__content{
  min-height:330px;
  padding-block:36px !important;
}
body.home-template-compact .home-cover__title{
  font-size:clamp(2rem,4vw,3.25rem) !important;
}
body.home-template-compact .home-trust-strip{ margin-top:14px; }
body.home-template-compact .home-projects-shelf,
body.home-template-compact .storefront-section{ padding:20px; }
body.home-template-compact .shelf-row.home-project-grid,
body.home-template-compact .storefront-grid{
  grid-template-columns:repeat(5,minmax(0,1fr)) !important;
  gap:14px !important;
}
body.home-template-compact .app-tile__body{ padding:13px !important; }
body.home-template-compact .app-tile__sub{ display:none !important; }

body.home-template-cinematic .home-page-container{
  width:min(1680px,calc(100% - 28px)) !important;
}
body.home-template-cinematic .home-cover{
  min-height:600px !important;
  border-radius:36px !important;
}
body.home-template-cinematic .home-cover__content{
  min-height:600px;
  align-items:flex-end;
}
body.home-template-cinematic .home-cover__text{
  padding:28px;
  border-radius:26px;
  background:rgba(5,10,24,.40);
  border:1px solid rgba(255,255,255,.16);
  backdrop-filter:blur(18px);
}
body.home-template-cinematic .home-cover__overlay{
  background:linear-gradient(0deg,rgba(3,8,20,.88),rgba(3,8,20,.12) 72%) !important;
}
body.home-template-cinematic .home-cover__mini-stats{ display:none; }

/* Responsive */
@media (max-width:1199.98px){
  :root{ --store-shell:min(100% - 28px,1120px); }
  body.store-play .shelf-row.home-project-grid,
  body.store-play .storefront-grid,
  body.home-template-compact .shelf-row.home-project-grid,
  body.home-template-compact .storefront-grid{
    grid-template-columns:repeat(3,minmax(0,1fr)) !important;
  }
  .home-benefits__grid{ grid-template-columns:repeat(2,minmax(0,1fr)); }
  .home-trust-strip{ grid-template-columns:repeat(2,minmax(0,1fr)); }
  .home-trust-item:nth-child(2){ border-inline-end:0; }
}

@media (max-width:767.98px){
  :root{ --store-shell:calc(100% - 18px); }
  body.store-play .home-page-container{ padding-top:14px !important; }
  body.store-play .home-cover,
  body.home-template-premium .home-cover,
  body.home-template-cinematic .home-cover{
    min-height:460px !important;
    border-radius:22px !important;
  }
  body.store-play .home-cover__content,
  body.home-template-premium .home-cover__content,
  body.home-template-cinematic .home-cover__content{
    min-height:460px;
    align-items:flex-end;
    padding:24px !important;
  }
  body.store-play .home-cover__title{ font-size:2.15rem !important; }
  body.store-play .home-cover__actions{ display:grid !important; grid-template-columns:1fr; }
  body.store-play .home-cover__btn{ width:100%; }
  body.store-play .home-cover__mini-stats{ gap:10px; }
  .home-trust-strip{
    grid-template-columns:1fr;
    margin:12px 0 0;
    padding:10px;
  }
  .home-trust-item{ border-inline-end:0; border-bottom:1px solid var(--md-outline); }
  .home-trust-item:last-child{ border-bottom:0; }
  body.store-play .home-projects-shelf,
  body.store-play .storefront-section{ padding:17px; border-radius:22px; }
  body.store-play .shelf-head{ align-items:flex-start !important; }
  body.store-play .shelf-row.home-project-grid,
  body.store-play .storefront-grid,
  body.home-template-compact .shelf-row.home-project-grid,
  body.home-template-compact .storefront-grid{
    grid-template-columns:1fr !important;
  }
  .home-benefits{ padding:26px 17px; border-radius:22px; }
  .home-benefits__grid{ grid-template-columns:1fr; }
  .home-seller-cta{
    grid-template-columns:1fr;
    text-align:center;
    border-radius:22px;
  }
  .home-seller-cta__icon{ margin-inline:auto; }
  .home-seller-cta__btn{ justify-content:center; }
  .store-footer__grid{ grid-template-columns:1fr; gap:26px; }
}

@media (prefers-reduced-motion:reduce){
  body.store-play .app-tile,
  body.store-play .home-cover__btn{ transition:none !important; }
}

body.ui-skin-graphite .store-appbar,
body.ui-skin-gold .store-appbar,
body.ui-skin-graphite .store-tabs,
body.ui-skin-gold .store-tabs{
  background: color-mix(in srgb, var(--md-surface) 88%, transparent) !important;
  border-color: var(--md-outline) !important;
}
body.ui-skin-graphite .dropdown-menu,
body.ui-skin-gold .dropdown-menu{
  background: var(--md-surface);
  color: var(--md-text);
  border-color: var(--md-outline);
}
