*{
  box-sizing:border-box;
}

:root{
  --nav:#223247;
  --bg:#f5f6f8;
  --text:#202634;
  --muted:#e9edf2;
  --orange:#ff9900;
  --border:#dfe3e8;
  --danger:#b42318;
  --ok:#067647;
}

html,body{
  margin:0;
  padding:0;
  font-family:Arial,Helvetica,sans-serif;
  color:var(--text);
  background:var(--bg);
}

a{
  text-decoration:none;
  color:inherit;
}


/* =========================
   TOP BAR
========================= */

.topbar{
  background:var(--nav);
  color:#fff;
  padding:14px 18px 16px;
}

.topbar-main{
  max-width:1040px;
  margin:auto;
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:18px;
  min-height:44px;
}

.brand{
  font-weight:800;
  font-size:23px;
  line-height:1.05;
  white-space:nowrap;
}

.navlinks{
  display:flex;
  gap:18px;
  align-items:center;
}

.navlinks a{
  white-space:nowrap;
}

.menu-toggle{
  display:none;
  background:transparent;
  border:0;
  color:#fff;
  font-size:28px;
  line-height:1;
  padding:4px 8px;
}

.searchbar{
  max-width:1040px;
  margin:14px auto 0;
  display:flex;
}

.searchbar input{
  flex:1;
  min-width:0;
  border:0;
  border-radius:8px 0 0 8px;
  padding:12px 13px;
  font-size:16px;
}

.searchbar button{
  border:0;
  background:var(--orange);
  font-weight:700;
  padding:0 18px;
  border-radius:0 8px 8px 0;
}


/* =========================
   GENERAL
========================= */

.container{
  max-width:1040px;
  margin:auto;
  padding:28px 18px;
}

.narrow{
  max-width:680px;
}

h1{
  font-size:34px;
  margin:5px 0 25px;
}

h2{
  font-size:26px;
  margin:0 0 18px;
}

.card{
  background:#fff;
  border:1px solid var(--border);
  border-radius:10px;
  padding:26px;
  margin-bottom:26px;
  box-shadow:0 2px 5px rgba(0,0,0,.04);
}

.actions{
  display:flex;
  gap:13px;
  flex-wrap:wrap;
  margin-bottom:26px;
}

.small-gap{
  margin-top:14px;
  margin-bottom:0;
}

.btn{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  border:0;
  border-radius:9px;
  padding:13px 20px;
  font-size:17px;
  font-weight:700;
  cursor:pointer;
}

.btn-primary{
  background:var(--orange);
  color:#222;
}

.btn-muted{
  background:var(--muted);
  color:var(--text);
}

.btn-danger{
  background:#fee4e2;
  color:var(--danger);
}


/* =========================
   FORMS
========================= */

.form-stack{
  display:grid;
  gap:17px;
}

.form-stack label{
  display:grid;
  gap:7px;
  font-weight:700;
}

.form-stack input,
.form-stack select,
.form-stack textarea{
  width:100%;
  padding:13px;
  border:1px solid var(--border);
  border-radius:8px;
  font-size:16px;
  background:#fff;
}


/* =========================
   NOTICES
========================= */

.notice{
  padding:13px 14px;
  border-radius:8px;
  margin:12px 0 18px;
  line-height:1.45;
  background:#fff5dc;
  border:1px solid #ffd57a;
}

.notice.ok{
  background:#ecfdf3;
  border-color:#abefc6;
  color:var(--ok);
}

.notice.err{
  background:#fef3f2;
  border-color:#fecdca;
  color:var(--danger);
}


/* =========================
   DASHBOARD STATS
========================= */

.stats{
  display:grid;
  grid-template-columns:repeat(2,minmax(0,1fr));
  gap:14px;
}

.stat{
  background:#fff;
  border:1px solid var(--border);
  border-radius:9px;
  padding:20px;
  min-height:112px;
}

.num{
  font-size:31px;
  font-weight:800;
}

.label,
.muted{
  color:#6b7280;
  margin-top:5px;
}


/* =========================
   FOOTER
========================= */

.footer{
  margin-top:55px;
  background:var(--nav);
  color:#fff;
  padding:28px 18px;
}

.footer .container{
  padding:0;
}

.footer-links{
  display:flex;
  gap:22px;
  flex-wrap:wrap;
  margin:20px 0;
}

.small-muted{
  opacity:.6;
}


/* =========================
   COPY FIELD
========================= */

.copy-row{
  display:flex;
  gap:8px;
  align-items:center;
}

.copy-row input{
  flex:1;
  min-width:0;
  padding:11px;
  border:1px solid var(--border);
  border-radius:8px;
  font-size:14px;
}

.copy-row.compact input{
  font-size:12px;
  padding:10px;
}


/* =========================
   MY PRODUCTS GRID
========================= */

.product-grid{
  display:grid;
  grid-template-columns:repeat(3,minmax(0,1fr));
  gap:18px;
}

.product-mini{
  display:flex;
  flex-direction:column;
  padding:14px;
  margin:0;
  min-width:0;
  overflow:hidden;
}

.product-mini form{
  display:inline;
  margin:0;
}

.mini-image,
.image-placeholder{
  width:100%;
  height:180px;
  object-fit:contain;
  background:#f7f7f7;
  border-radius:8px;
  display:flex;
  align-items:center;
  justify-content:center;
  color:#7a7f87;
  font-size:13px;
}

.product-mini-body{
  display:flex;
  flex-direction:column;
  flex:1;
  min-width:0;
}

.product-mini .muted{
  font-size:12px;
  line-height:1.3;
  margin-top:10px;
  white-space:nowrap;
  overflow:hidden;
  text-overflow:ellipsis;
}

.product-mini h2{
  font-size:16px;
  line-height:1.3;
  margin:6px 0 12px;

  display:-webkit-box;
  -webkit-line-clamp:3;
  -webkit-box-orient:vertical;
  overflow:hidden;

  min-height:62px;
}

.product-mini .copy-row{
  margin-top:auto;
}

.product-mini .actions{
  display:grid;
  grid-template-columns:repeat(2,minmax(0,1fr));
  gap:8px;
  width:100%;
  margin-top:10px;
}

.product-mini .actions form{
  width:100%;
}

.product-mini .actions .btn,
.product-mini .actions a{
  width:100%;
}

.product-mini .btn{
  font-size:13px;
  padding:10px 8px;
  border-radius:8px;
}


/* =========================
   SHOP GRID
========================= */

.shop-grid{
  display:grid;
  grid-template-columns:repeat(2,minmax(0,1fr));
  gap:18px;
}

.shop-product{
  display:flex;
  flex-direction:column;
  gap:12px;
}

.shop-image{
  width:100%;
  height:260px;
  object-fit:contain;
  background:#fff;
  border-radius:8px;
}


/* =========================
   PRODUCT PAGE
========================= */

.product-card{
  display:grid;
  grid-template-columns:minmax(260px,42%) 1fr;
  gap:34px;
  align-items:start;
}

.product-image-wrap{
  display:flex;
  justify-content:center;
}

.product-image{
  max-width:100%;
  max-height:560px;
  object-fit:contain;
}

.large-placeholder{
  width:100%;
  min-height:320px;
  display:flex;
  align-items:center;
  justify-content:center;
  background:#f4f4f4;
  border-radius:10px;
  color:#80858d;
}

.product-description{
  font-size:18px;
  line-height:1.6;
}

.feature-list{
  padding-left:22px;
  line-height:1.55;
}

.feature-list li{
  margin-bottom:10px;
}

.amazon-btn{
  margin-top:12px;
}

.disclosure{
  font-size:14px;
  color:#6b7280;
  margin-top:18px;
}


/* =========================
   TABLET
========================= */

@media(max-width:900px){

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

}


/* =========================
   MOBILE
========================= */

@media(max-width:700px){

  .topbar{
    padding:12px 16px 14px;
  }

  .topbar-main{
    flex-wrap:wrap;
    gap:10px;
  }

  .brand{
    font-size:20px;
  }

  .menu-toggle{
    display:block;
    margin-left:auto;
  }

  .navlinks{
    display:none;
    width:100%;
    flex-direction:column;
    align-items:stretch;
    gap:0;
    padding-top:8px;
  }

  .nav-open .navlinks{
    display:flex;
  }

  .navlinks a{
    display:block;
    padding:11px 0;
    border-top:1px solid rgba(255,255,255,.13);
  }

  .searchbar{
    margin-top:10px;
  }

  .searchbar input{
    padding:11px 12px;
  }

  .container{
    padding:20px 12px;
  }

  h1{
    font-size:25px;
    margin-bottom:18px;
  }

  h2{
    font-size:22px;
  }

  .card{
    padding:16px;
  }

  .stats{
    grid-template-columns:repeat(2,minmax(0,1fr));
    gap:10px;
  }

  .stat{
    min-height:100px;
    padding:16px;
  }

  .footer-links{
    gap:16px;
  }


  /* MY PRODUCTS MOBILE GRID */

  .product-grid{
    grid-template-columns:repeat(2,minmax(0,1fr));
    gap:10px;
  }

  .product-mini{
    padding:9px;
    border-radius:10px;
  }

  .mini-image,
  .image-placeholder{
    width:100%;
    height:125px;
    border-radius:7px;
  }

  .product-mini .muted{
    font-size:10px;
    margin-top:7px;
  }

  .product-mini h2{
    font-size:13px;
    line-height:1.25;
    margin:5px 0 8px;
    min-height:49px;
    -webkit-line-clamp:3;
  }

  .product-mini .copy-row{
    gap:5px;
  }

  .product-mini .copy-row input{
    width:100%;
    padding:8px 6px;
    font-size:9px;
    border-radius:6px;
  }

  .product-mini .copy-row .btn{
    width:auto;
    padding:8px 7px;
    font-size:10px;
  }

  .product-mini .actions{
    grid-template-columns:1fr 1fr;
    gap:5px;
    margin-top:7px;
  }

  .product-mini .actions .btn{
    padding:8px 4px;
    font-size:10px;
    border-radius:6px;
    white-space:nowrap;
  }

  .product-card{
    grid-template-columns:1fr;
  }

  .shop-grid{
    grid-template-columns:1fr;
  }

  .shop-image{
    height:300px;
  }

}


/* =========================
   VERY SMALL PHONES
========================= */

@media(max-width:360px){

  .container{
    padding-left:8px;
    padding-right:8px;
  }

  .product-grid{
    gap:7px;
  }

  .product-mini{
    padding:7px;
  }

  .mini-image,
  .image-placeholder{
    height:110px;
  }

  .product-mini h2{
    font-size:12px;
  }

  .product-mini .actions .btn{
    font-size:9px;
  }

}


/* ======================================================
   V5 PUBLIC STORE
====================================================== */

.store-header{
  background:#223247;
  color:#fff;
  padding:16px 18px;
}

.store-header-top{
  max-width:1040px;
  margin:auto;
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:18px;
}

.store-brand{
  font-size:24px;
  font-weight:800;
  letter-spacing:-.2px;
}

.store-menu-btn{
  display:none;
  background:transparent;
  border:0;
  color:#fff;
  font-size:28px;
  cursor:pointer;
}

.store-nav{
  display:flex;
  gap:20px;
  align-items:center;
}

.store-nav a{
  white-space:nowrap;
}

.store-search{
  max-width:1040px;
  margin:14px auto 0;
  display:flex;
}

.store-search input{
  flex:1;
  min-width:0;
  border:0;
  border-radius:8px 0 0 8px;
  padding:13px 14px;
  font-size:16px;
}

.store-search button{
  border:0;
  background:#ff9900;
  color:#222;
  font-weight:700;
  padding:0 22px;
  border-radius:0 8px 8px 0;
}

.store-main{
  max-width:1040px;
  margin:auto;
  padding:34px 18px 54px;
}

.store-hero{
  display:flex;
  justify-content:space-between;
  align-items:flex-start;
  gap:20px;
  margin-bottom:30px;
}

.store-eyebrow{
  margin:0 0 8px;
  color:#6b7280;
  text-transform:uppercase;
  letter-spacing:.08em;
  font-size:13px;
  font-weight:700;
}

.store-hero h1{
  margin:0 0 8px;
  font-size:38px;
}

.store-subtitle{
  margin:0;
  color:#6b7280;
  font-size:17px;
}

.store-count{
  background:#fff;
  border:1px solid #dfe3e8;
  border-radius:999px;
  padding:9px 14px;
  font-weight:700;
  white-space:nowrap;
}

.empty-store-card{
  background:#fff;
  border:1px solid #dfe3e8;
  border-radius:12px;
  padding:50px 24px;
  text-align:center;
  box-shadow:0 2px 5px rgba(0,0,0,.04);
}

.empty-store-icon{
  font-size:42px;
  margin-bottom:10px;
}

.empty-store-card h2{
  margin:0 0 10px;
}

.empty-store-card p{
  margin:0;
  color:#6b7280;
}


/* PUBLIC STORE PRODUCT GRID */

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

.store-product-card{
  background:#fff;
  border:1px solid #dfe3e8;
  border-radius:12px;
  padding:18px;
  box-shadow:0 2px 5px rgba(0,0,0,.04);
  display:flex;
  flex-direction:column;
}

.store-product-image-link{
  display:block;
  background:#fff;
  border-radius:10px;
  overflow:hidden;
}

.store-product-image{
  width:100%;
  height:260px;
  object-fit:contain;
  background:#fff;
}

.store-product-image.placeholder{
  display:flex;
  align-items:center;
  justify-content:center;
  background:#f5f6f8;
  color:#7a7f87;
}

.store-product-meta{
  color:#6b7280;
  font-size:13px;
  margin-top:14px;
}

.store-product-title{
  font-size:20px;
  line-height:1.35;
  margin:8px 0 16px;
  flex:1;
}

.store-view-btn{
  width:100%;
}


/* PUBLIC STORE FOOTER */

.store-footer{
  background:#223247;
  color:#fff;
  padding:34px 18px;
}

.store-footer-inner{
  max-width:1040px;
  margin:auto;
}

.store-footer-links{
  display:flex;
  gap:20px;
  flex-wrap:wrap;
  margin:20px 0;
}

.store-copyright{
  opacity:.65;
  margin-bottom:0;
}

.store-back-link{
  font-weight:700;
}


/* PUBLIC PRODUCT PAGE */

.public-product-card{
  background:#fff;
  border:1px solid #dfe3e8;
  border-radius:12px;
  padding:28px;
  display:grid;
  grid-template-columns:minmax(280px,42%) 1fr;
  gap:36px;
  box-shadow:0 2px 5px rgba(0,0,0,.04);
}

.public-product-image-wrap{
  display:flex;
  align-items:flex-start;
  justify-content:center;
}

.public-product-image{
  max-width:100%;
  max-height:560px;
  object-fit:contain;
}

.public-product-image.placeholder{
  width:100%;
  min-height:340px;
  display:flex;
  align-items:center;
  justify-content:center;
  background:#f5f6f8;
  color:#7a7f87;
}

.public-product-content h1{
  margin-top:8px;
}

.public-product-description{
  font-size:17px;
  line-height:1.6;
}

.amazon-buy-btn{
  width:100%;
  margin-top:16px;
}

.disclosure{
  color:#6b7280;
  font-size:14px;
  margin-top:18px;
}


/* PUBLIC STORE TABLET */

@media(max-width:800px){

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

}


/* PUBLIC STORE MOBILE */

@media(max-width:700px){

  .store-header{
    padding:14px 16px;
  }

  .store-header-top{
    flex-wrap:wrap;
  }

  .store-brand{
    font-size:21px;
  }

  .store-menu-btn{
    display:block;
    margin-left:auto;
  }

  .store-nav{
    display:none;
    width:100%;
    flex-direction:column;
    align-items:stretch;
    gap:0;
  }

  .store-menu-open .store-nav{
    display:flex;
  }

  .store-nav a{
    display:block;
    padding:10px 0;
    border-top:1px solid rgba(255,255,255,.15);
  }

  .store-search{
    margin-top:12px;
  }

  .store-main{
    padding:28px 16px 44px;
  }

  .store-hero{
    flex-direction:column;
    align-items:flex-start;
  }

  .store-hero h1{
    font-size:32px;
  }

  .store-count{
    font-size:14px;
  }

  .store-product-grid{
    grid-template-columns:1fr;
  }

  .store-product-image{
    height:300px;
  }

  .public-product-card{
    grid-template-columns:1fr;
    padding:20px;
    gap:24px;
  }

  .store-footer-links{
    gap:14px 18px;
  }

}