.store-shell{
  max-width:1180px;
  margin:0 auto;
  padding:24px 32px 64px;
}

.store-header{
  position:sticky;
  top:0;
  z-index:10;
  backdrop-filter:blur(18px);
  background:color-mix(in srgb,var(--store-bg) 82%, transparent);
  border-bottom:1px solid color-mix(in srgb,var(--store-line) 70%, transparent);
}

.store-header-inner{
  max-width:1180px;
  margin:0 auto;
  padding:18px 32px;
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:18px;
}

.store-header-tools{
  display:flex;
  align-items:center;
  justify-content:flex-end;
  gap:16px;
  flex:1 1 auto;
  min-width:0;
  flex-wrap:nowrap;
}

.store-brand,
.store-nav{
  display:flex;
  align-items:center;
  gap:14px;
  flex-wrap:nowrap;
}

.store-brand-hidden{
  visibility:hidden;
  min-width:40px;
}

.store-auth-shell{
  display:flex;
  align-items:center;
  gap:12px;
  flex-wrap:nowrap;
  justify-content:flex-end;
  min-width:0;
}

.store-login-form{
  display:flex;
  align-items:center;
  gap:10px;
  flex-wrap:nowrap;
  justify-content:flex-end;
  min-width:0;
}

.store-login-form input{
  width:190px;
  min-height:42px;
  min-width:0;
  flex:0 1 190px;
}

.store-forgot-link{
  color:var(--store-muted);
  font-size:.92rem;
  font-weight:600;
}

.store-auth-member{
  display:flex;
  align-items:center;
  gap:10px;
  flex-wrap:nowrap;
  min-width:0;
}

.store-user-email,
.account-user-email{
  color:var(--store-muted);
  font-size:.92rem;
  max-width:260px;
  overflow:hidden;
  text-overflow:ellipsis;
  white-space:nowrap;
}

.account-icon-btn,
.account-header-link{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  min-height:42px;
  border:0;
  border-radius:8px;
  background:var(--store-panel-strong);
  color:var(--store-ink);
  text-decoration:none;
}

.btn.mode-toggle{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  gap:6px;
  padding:8px 12px;
  border:1px solid var(--store-line);
  border-radius:8px;
  background:var(--store-panel-strong);
  color:var(--store-ink);
  cursor:pointer;
  text-decoration:none;
  font:inherit;
  font-weight:400;
}

.btn.mode-toggle.live-mode{
  background:#1f8f4e;
  border-color:#1f8f4e;
  color:#fff;
  box-shadow:inset 0 0 0 1px rgba(255,255,255,.08);
}

.btn.mode-toggle.live-mode:hover{
  background:#187341;
  border-color:#187341;
  color:#fff;
}

.btn.mode-toggle.sandbox-mode{
  background:#b12b35;
  border-color:#b12b35;
  color:#fff;
  box-shadow:inset 0 0 0 1px rgba(255,255,255,.08);
}

.btn.mode-toggle.sandbox-mode:hover{
  background:#92222b;
  border-color:#92222b;
  color:#fff;
}

.account-icon-btn{
  width:42px;
  padding:0;
}

.account-header-link{
  padding:8px 12px;
  font-weight:400;
  white-space:nowrap;
}

.store-stripe-mode-btn{
  min-width:92px;
}

.account-icon-btn svg{
  display:block;
}

.store-brand a,
.store-nav a{
  color:var(--store-ink);
  text-decoration:none;
}

.store-brand-mark{
  display:inline-flex;
  align-items:center;
}

.store-brand-logo{
  display:block;
  width:132px;
  height:auto;
  flex:0 0 auto;
}

.cart-pill{
  display:inline-flex;
  align-items:center;
  gap:8px;
  padding:10px 14px;
  border-radius:999px;
  background:color-mix(in srgb,var(--store-panel-strong) 88%, transparent);
  border:1px solid var(--store-line);
}

.store-button{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  gap:8px;
  min-height:46px;
  padding:0 18px;
  border-radius:8px;
  border:1px solid transparent;
  background:linear-gradient(135deg,var(--store-accent),var(--store-accent-alt-2));
  color:#fff;
  text-decoration:none;
  font-weight:400;
  cursor:pointer;
  appearance:none;
}

.store-login-form .store-button{
  background:linear-gradient(135deg,var(--store-accent),var(--store-accent-alt-2));
  border-color:transparent;
  color:#fff;
}

.store-button.ghost{
  background:transparent;
  color:var(--store-ink);
  border-color:var(--store-line);
}

.content-panel{
  padding:32px;
  margin-bottom:24px;
}

.eyebrow{
  margin-bottom:10px;
  color:var(--store-accent-soft);
  text-transform:uppercase;
  letter-spacing:.12em;
  font-size:.82rem;
  font-weight:700;
}

.section-copy{
  max-width:72ch;
  line-height:1.7;
}

.section-copy.compact{
  font-size:.95rem;
}

.flash-banner{
  margin-bottom:20px;
  padding:14px 18px;
  border-radius:18px;
  border:1px solid var(--store-line);
  background:color-mix(in srgb,var(--store-panel-strong) 92%, transparent);
  color:var(--store-ink);
}

.flash-banner.error{
  border-color:#b55252;
}

.flash-banner.success{
  border-color:#4e8f63;
}

.slug-link-list,
.product-grid,
.auth-grid{
  display:grid;
  gap:18px;
}

.slug-link-list{
  grid-template-columns:repeat(auto-fit,280px);
  justify-content:center;
  justify-items:center;
  margin:0 auto;
}

.product-grid{
  grid-template-columns:repeat(auto-fit,minmax(280px,1fr));
  align-items:stretch;
}

.product-card,
.cart-item,
.auth-panel,
.checkout-item{
  padding:20px;
}

.product-card{
  display:grid;
  grid-template-rows:auto 1fr;
  gap:14px;
  height:100%;
}

.product-card-content{
  display:grid;
  grid-template-rows:1fr auto;
  gap:18px;
  min-height:100%;
}

.product-card-body{
  display:grid;
  gap:16px;
  align-content:start;
  min-height:0;
}

.product-card-title{
  margin:0;
  margin-bottom:10px;
}

.product-card-copy{
  line-height:1.7;
}

.product-card-footer{
  display:grid;
  grid-template-columns:minmax(0,1fr) auto;
  align-items:center;
  gap:12px;
  width:100%;
  margin-top:auto;
}

.product-card-price{
  color:var(--store-accent-soft);
  font-size:1.2rem;
  justify-self:start;
}

.product-card-footer .store-button{
  justify-self:end;
}

.section-title-center{
  text-align:center;
}

.product-card-image,
.gallery-image,
.empty-image{
  width:100%;
  border-radius:18px;
  border:1px solid var(--store-line);
  background:color-mix(in srgb,var(--store-panel-strong) 88%, transparent);
}

.product-card-image,
.empty-image{
  aspect-ratio:16/10;
  object-fit:cover;
}

.empty-image{
  display:grid;
  place-items:center;
  color:var(--store-muted);
}

.mini-product-card{
  display:grid;
  grid-template-rows:auto 1fr;
  gap:12px;
  width:280px;
  padding:16px;
}

.mini-product-card .product-card-image,
.mini-product-card .empty-image{
  aspect-ratio:16/9;
}

.mini-product-card-body{
  display:grid;
  gap:14px;
  align-content:space-between;
}

.mini-product-card-title{
  margin:0;
  font-size:1.15rem;
  line-height:1.2;
  color:var(--store-ink);
}

.mini-product-card-actions{
  display:flex;
  justify-content:center;
}

.product-card h2,
.content-panel h1,
.hero-copy h1,
.product-copy-column h1{
  font-size:clamp(2rem,4.6vw,3.6rem);
  line-height:1;
  letter-spacing:-.04em;
}

.product-card h2{
  font-size:1.6rem;
}

.product-detail-shell{
  display:grid;
  grid-template-columns:minmax(280px,420px) minmax(0,1fr);
  gap:28px;
  padding:28px;
}

.product-gallery-column{
  display:grid;
  gap:16px;
  align-content:start;
}

.gallery-stack{
  display:grid;
  gap:14px;
}

.gallery-image{
  display:block;
}

.price-tag{
  margin:14px 0 18px;
  font-size:1.3rem;
  color:var(--store-accent-soft);
  font-weight:700;
}

.product-copy{
  line-height:1.7;
  margin-bottom:34px;
}

.product-form,
.auth-panel,
.checkout-item{
  display:grid;
  gap:14px;
}

.auth-grid .auth-panel{
  align-content:start;
  gap:0;
}

.checkout-auth-title-panel h1{
  margin:0;
}

.auth-panel h2{
  margin:0 0 18px;
  font-size:1rem;
  font-weight:700;
  text-align:center;
  color:var(--store-ink);
}

.checkout-auth-label{
  display:grid;
  gap:6px;
  margin-bottom:12px;
  font-size:.86rem;
  font-weight:600;
  color:var(--store-muted);
}

.checkout-auth-input{
  width:100%;
  min-height:0;
  padding:10px 12px;
  border-radius:10px;
  border:1px solid var(--store-line);
  background:var(--store-panel-strong);
  color:var(--store-ink);
}

.auth-panel .checkout-auth-label:last-of-type{
  margin-bottom:18px;
}

.checkout-auth-link-row{
  margin:-4px 0 18px;
  text-align:center;
}

.checkout-auth-link{
  display:inline-block;
  color:var(--store-muted);
  font-size:.9rem;
  text-decoration:none;
}

.checkout-auth-link:hover,
.checkout-auth-link:focus-visible{
  color:var(--store-accent-soft);
  text-decoration:underline;
}

.checkout-auth-notice{
  margin:14px 0 16px;
  color:#f0a0aa;
  font-size:.92rem;
}

.checkout-password-rules{
  margin:14px 0 16px;
  padding-left:0;
  list-style:none;
  display:grid;
  gap:8px;
}

.checkout-password-rules li{
  display:flex;
  align-items:center;
  gap:10px;
  color:var(--store-muted);
  font-size:.9rem;
}

.rule-icon{
  width:18px;
  display:inline-flex;
  align-items:center;
  justify-content:center;
  font-weight:700;
}

.rule-icon.bad{
  color:#f0a0aa;
}

.rule-icon.good{
  color:#77c39b;
}

.auth-grid .auth-panel .store-button{
  width:100%;
  min-height:0;
  padding:10px 14px;
}

.product-form .store-button{
  font-size:1rem;
  font-weight:400;
}

.product-option-grid{
  display:grid;
  gap:16px;
}

.product-option-row{
  display:grid;
  grid-template-columns:minmax(0,1fr) auto;
  align-items:center;
  gap:14px 18px;
}

.product-option-label{
  display:block;
  position:relative;
  color:var(--store-ink);
  font-weight:600;
}

.product-option-control{
  display:flex;
  align-items:center;
  justify-content:flex-end;
}

.product-option-control-checkbox{
  min-width:64px;
}

.product-option-help{
  grid-column:1 / -1;
  margin-top:-6px;
}

.product-option-label-text{
  display:inline-block;
}

.product-option-hover-help{
  position:absolute;
  left:0;
  top:calc(100% + 10px);
  z-index:2;
  display:none;
  width:min(320px,50vw);
  padding:10px 12px;
  border:1px solid var(--store-line);
  border-radius:12px;
  background:color-mix(in srgb,var(--store-panel-strong) 96%, transparent);
  color:var(--store-muted);
  font-size:.92rem;
  font-weight:400;
  line-height:1.5;
  box-shadow:0 16px 32px rgba(0,0,0,.26);
}

.product-option-label:hover .product-option-hover-help{
  display:block;
}

.product-option-checkbox{
  width:30px;
  height:30px;
  min-height:30px;
  margin:0;
  accent-color:var(--store-accent);
  cursor:pointer;
}

.product-option-qty{
  width:84px;
  min-width:84px;
  text-align:center;
}

.field-grid{
  display:grid;
  gap:14px;
}

label{
  display:grid;
  gap:8px;
  color:var(--store-ink);
  font-weight:600;
}

input,
select,
textarea{
  width:100%;
  min-height:46px;
  padding:12px 14px;
  border-radius:14px;
  border:1px solid var(--store-line);
  background:color-mix(in srgb,var(--store-panel-strong) 92%, transparent);
  color:var(--store-ink);
  font:inherit;
}

.field-help{
  color:var(--store-muted);
  font-size:.92rem;
  font-weight:400;
}

.form-actions{
  display:flex;
  flex-wrap:wrap;
  gap:12px;
}

.cart-layout,
.checkout-layout{
  display:grid;
  grid-template-columns:minmax(0,1fr) 320px;
  gap:24px;
}

.cart-items,
.checkout-items{
  display:grid;
  gap:18px;
}

.cart-item,
.checkout-item,
.cart-summary{
  background:color-mix(in srgb,var(--store-panel) 92%, transparent);
  border:1px solid var(--store-line);
  border-radius:24px;
}

.cart-item{
  --cart-remove-col:22px;
  --cart-price-col:78px;
}

.cart-item-list{
  padding:0;
  overflow:hidden;
}

.cart-item-row{
  padding:20px;
}

.cart-item-row:nth-child(odd){
  background:color-mix(in srgb,var(--store-panel) 96%, transparent);
}

.cart-item-row:nth-child(even){
  background:color-mix(in srgb,var(--store-row-alt) 26%, var(--store-panel));
}

.cart-item-row + .cart-item-row{
  border-top:1px solid var(--store-line);
}

.cart-item-head,
.summary-row{
  display:flex;
  justify-content:space-between;
  gap:16px;
}

.cart-item-main{
  display:grid;
  gap:6px;
  min-width:0;
  align-self:start;
}

.cart-item-main h2{
  margin:0;
}

.cart-item-head{
  display:grid;
  width:100%;
  grid-template-columns:minmax(0,1fr) var(--cart-remove-col) var(--cart-price-col);
  align-items:start;
  justify-content:stretch;
  column-gap:14px;
  row-gap:6px;
}

.cart-item-price-row{
  display:contents;
}

.cart-item-remove-form{
  margin:0;
  width:var(--cart-remove-col);
  justify-self:center;
  align-self:start;
}

.cart-remove-button{
  cursor:pointer;
  width:var(--cart-remove-col);
  height:var(--cart-remove-col);
  min-height:var(--cart-remove-col);
  border-radius:8px;
}

.cart-item-price{
  align-self:start;
  justify-self:end;
  white-space:nowrap;
  width:var(--cart-price-col);
  text-align:right;
}

.cart-item-link{
  color:var(--store-ink);
  text-decoration:none;
}

.cart-item-link:hover,
.cart-item-link:focus-visible{
  color:var(--store-accent-soft);
}

.option-list,
.meta-list{
  display:grid;
  gap:8px;
  margin-top:14px;
}

.option-chip{
  display:inline-flex;
  padding:8px 12px;
  border-radius:999px;
  background:color-mix(in srgb,var(--store-row-alt) 68%, transparent);
  color:var(--store-ink);
}

.cart-item .option-list{
  grid-column:1 / -1;
  display:block;
  margin-top:0;
}

.cart-item .option-chip{
  padding:0;
  border-radius:0;
  background:transparent;
  color:var(--store-muted);
}

.cart-option-list{
  width:100%;
}

.cart-option-line{
  display:grid;
  width:100%;
  grid-template-columns:minmax(0,1fr) var(--cart-remove-col) var(--cart-price-col);
  align-items:start;
  justify-content:stretch;
  column-gap:14px;
}

.cart-option-line + .cart-option-line{
  margin-top:4px;
}

.cart-option-label{
  color:var(--store-muted);
  font-weight:400;
  min-width:0;
}

.cart-option-remove-form{
  margin:0;
  width:var(--cart-remove-col);
  justify-self:center;
  align-self:start;
}

.cart-option-remove-button{
  width:var(--cart-remove-col);
  height:var(--cart-remove-col);
  min-height:var(--cart-remove-col);
  border-radius:8px;
  cursor:pointer;
}

.cart-option-price{
  width:var(--cart-price-col);
  text-align:right;
  color:var(--store-muted);
  font-weight:400;
  white-space:nowrap;
  justify-self:end;
}

.cart-item .muted{
  grid-column:1 / -1;
}

.cart-summary{
  padding:24px;
  align-self:start;
  display:grid;
  gap:14px;
}

.cart-empty-state{
  display:grid;
  justify-items:center;
  align-content:center;
  gap:16px;
  min-height:260px;
  text-align:center;
}

.cart-empty-copy{
  margin:0;
  color:var(--store-ink);
  font-size:1.2rem;
  font-weight:700;
}

.auth-grid{
  grid-template-columns:repeat(2,minmax(0,1fr));
}

.muted{
  color:var(--store-muted);
}

.hidden{
  display:none !important;
}

.order-summary{
  display:grid;
  gap:18px;
}

.license-capture-shell{
  margin-top:24px;
}

.license-capture-form{
  display:grid;
  gap:24px;
}

.order-summary-table{
  width:100%;
  border-collapse:collapse;
}

.order-summary-table td,
.order-summary-table th{
  padding:10px 12px;
  border:1px solid var(--store-line);
}

.store-footer{
  margin-top:32px;
  border-top:1px solid color-mix(in srgb,var(--store-line) 70%, transparent);
  background:color-mix(in srgb,var(--store-bg) 88%, transparent);
}

.store-footer-inner{
  max-width:1180px;
  margin:0 auto;
  padding:22px 32px 28px;
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:16px;
  flex-wrap:wrap;
  color:var(--store-muted);
  font-size:.92rem;
}

.store-footer-link{
  color:var(--store-accent-soft);
  text-decoration:none;
  font-weight:600;
}

.store-footer-link:hover{
  text-decoration:underline;
}

.store-footer-brand,
.store-footer-copy{
  margin:0;
}

@media (max-width:1160px){
  .store-shell,
  .store-header-inner,
  .store-footer-inner{
    padding-left:20px;
    padding-right:20px;
  }

  .store-brand-logo{
    width:120px;
  }

  .store-header-inner{
    gap:14px;
  }

  .store-header-tools{
    gap:12px;
  }

  .store-login-form input{
    width:160px;
    flex-basis:160px;
  }
}

@media (max-width:860px){
  .product-detail-shell,
  .cart-layout,
  .checkout-layout,
  .auth-grid{
    grid-template-columns:1fr;
  }

  .store-header-inner{
    padding-left:18px;
    padding-right:18px;
    flex-direction:column;
    align-items:stretch;
    gap:12px;
  }

  .store-header-tools{
    width:100%;
    flex-direction:column;
    align-items:stretch;
    gap:12px;
  }

  .store-nav,
  .store-auth-shell{
    width:100%;
    justify-content:space-between;
  }

  .store-login-form,
  .store-auth-member{
    width:100%;
    justify-content:flex-end;
  }

  .store-stripe-mode-btn{
    display:none;
  }

  .store-login-form input{
    width:auto;
    flex:1 1 0;
  }

  .product-option-row{
    grid-template-columns:1fr;
    align-items:start;
  }

  .product-option-control{
    justify-content:flex-start;
  }

  .product-option-help{
    display:block;
  }

  .product-option-hover-help{
    display:none !important;
  }

  .slug-link-list{
    grid-template-columns:repeat(auto-fit,minmax(240px,280px));
  }

  .store-footer-inner{
    justify-content:center;
    text-align:center;
  }
}

@media (min-width:861px){
  .product-option-help{
    display:none;
  }
}

@media (max-width:520px){
  .store-shell,
  .store-header-inner,
  .store-footer-inner{
    padding-left:14px;
    padding-right:14px;
  }

  .store-brand-logo{
    width:108px;
  }

  .content-panel,
  .hero-panel,
  .product-detail-shell,
  .cart-summary,
  .cart-item,
  .checkout-item,
  .auth-panel{
    padding:18px;
    border-radius:16px;
  }

  .store-button,
  .account-header-link{
    width:100%;
  }

  .store-header .store-button,
  .store-header .account-header-link{
    width:auto;
  }

  .store-header-tools,
  .store-nav,
  .store-auth-shell,
  .store-login-form,
  .store-auth-member{
    gap:8px;
  }

  .store-login-form{
    justify-content:space-between;
  }

  .store-login-form input{
    flex-basis:0;
  }

  .account-icon-btn{
    width:42px;
    flex:0 0 auto;
  }

  .slug-link-list{
    grid-template-columns:minmax(0,280px);
  }
}
