*{box-sizing:border-box}:root{--bg:#f7f2e9;--panel:#fffdf8;--ink:#211b16;--muted:#6f6355;--border:#ded3bf;--purple:#6d3bbd;--purple-dark:#512998;--header:#211d20;--shadow:0 5px 20px rgba(47,25,71,.08)}body{margin:0;background:var(--bg);color:var(--ink);font-family:system-ui,-apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif}.site-header{background:var(--header);color:#fff;box-shadow:0 3px 16px rgba(0,0,0,.14)}.site-header-inner{width:min(1180px,calc(100% - 32px));min-height:46px;margin:0 auto;display:flex;align-items:center;justify-content:space-between;gap:18px}.site-brand{color:#fff;font-weight:800;text-decoration:none;font-size:1rem;white-space:nowrap}.site-nav{display:flex;align-items:center;justify-content:flex-end;gap:14px;flex-wrap:wrap}.site-nav a{color:#fff;text-decoration:none;font-size:.95rem}.logout-form{display:inline;margin:0}.nav-button{margin:0;padding:0;background:transparent;border:0;color:#fff;font:inherit;font-weight:600;cursor:pointer}.site-main{width:min(1180px,calc(100% - 32px));margin:32px auto}.card{background:var(--panel);border:1px solid var(--border);border-radius:16px;padding:20px;margin-bottom:18px;box-shadow:var(--shadow)}label{display:block;margin-top:12px;font-weight:700}input,textarea,select{width:100%;max-width:640px;padding:10px;border:1px solid #bfb19d;border-radius:9px;background:#fff}button,.button{display:inline-block;background:var(--purple);color:#fff;border:0;border-radius:11px;padding:10px 15px;text-decoration:none;cursor:pointer;margin-top:12px;font-weight:700;line-height:1}button:hover,.button:hover{background:var(--purple-dark)}.button-small{padding:9px 12px;font-size:.9rem;margin-top:0}.muted{color:var(--muted)}.error{background:#ffe4e6;padding:10px;border-radius:8px}.success{background:#dcfce7;padding:10px;border-radius:8px}.grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(220px,1fr));gap:16px}table{width:100%;border-collapse:collapse;background:var(--panel)}th,td{padding:10px;border-bottom:1px solid #eadfce;text-align:left;vertical-align:top}img{max-width:100%}.shop-hero{text-align:center;margin:0 auto 24px}.shop-hero h1{font-size:clamp(2rem,3.4vw,3rem);line-height:1.05;margin:0 0 10px;letter-spacing:.02em}.shop-hero p{margin:0;color:var(--muted);font-size:1.05rem}.product-grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(240px,280px));justify-content:center;align-items:start;gap:22px;width:100%;margin:0 auto}.product-card{width:100%;max-width:280px;background:var(--panel);border:1px solid var(--border);border-radius:16px;overflow:hidden;box-shadow:var(--shadow);display:flex;flex-direction:column}.product-card-media{display:block;width:100%;background:var(--header)}.image-contain-mode{background:#2a2428}.product-card-image,.product-card-placeholder{display:block;width:100%;aspect-ratio:16/9;height:auto}.product-card-image{object-fit:cover;object-position:center}.product-card-placeholder{display:grid;place-items:center;background:linear-gradient(135deg,#2b174a,var(--purple));color:#fff;font-weight:800}.product-card-content{padding:15px;display:flex;flex-direction:column;flex:1}.product-card-content h2{margin:0 0 8px;font-size:1.15rem;line-height:1.2}.product-card-description{margin:0 0 15px;color:#4f473e;line-height:1.45;font-size:.92rem;display:-webkit-box;-webkit-line-clamp:3;-webkit-box-orient:vertical;overflow:hidden;min-height:4em}.product-card-actions{margin-top:auto;display:flex;align-items:center;justify-content:space-between;gap:10px}.product-card-price{font-size:1rem;white-space:nowrap}.product-detail{max-width:860px;margin:0 auto;background:var(--panel);border:1px solid var(--border);border-radius:16px;overflow:hidden;box-shadow:var(--shadow)}.product-detail-media{width:100%;background:var(--header)}.product-detail-image{display:block;width:100%;height:clamp(210px,34vw,360px);object-fit:cover;object-position:center}.product-detail-content{padding:clamp(18px,3vw,30px)}.product-detail-content h1{margin:0 0 14px;font-size:clamp(1.9rem,3vw,2.6rem);line-height:1.05}.product-detail-description{color:#332d27;font-size:1.05rem;line-height:1.6;margin-bottom:18px}.product-detail-price{font-size:1.25rem}.product-detail-full-image-mode{max-width:calc(var(--detail-full-width,720px) + 2px)}.product-detail-full-image-wrap{padding:18px 18px 0;background:var(--panel);text-align:center}.product-detail-full-image{display:block;width:100%;max-width:var(--detail-full-width,720px);height:auto;margin:0 auto;border-radius:14px;border:1px solid var(--border);box-shadow:0 3px 14px rgba(47,25,71,.08)}.crop-editors{display:grid;grid-template-columns:repeat(auto-fit,minmax(320px,1fr));gap:18px;max-width:900px;margin:18px 0}.crop-editor-panel{padding:14px;border:1px solid var(--border);border-radius:14px;background:#fbf7ef}.crop-editor-panel h3{margin:0 0 4px}.crop-editor{width:100%;max-width:420px;position:relative;overflow:hidden;border-radius:12px;background:#2a2428;border:1px solid var(--border);touch-action:none;user-select:none}.crop-editor img{display:block;width:100%;height:auto;pointer-events:none}.crop-box{position:absolute;border:2px solid #fff;box-shadow:0 0 0 9999px rgba(0,0,0,.48),0 0 0 1px rgba(0,0,0,.4);cursor:move}.crop-box:before,.crop-box:after{content:"";position:absolute;inset:33.333% 0 auto 0;border-top:1px solid rgba(255,255,255,.55)}.crop-box:after{inset:66.666% 0 auto 0}.crop-handle{position:absolute;right:-7px;bottom:-7px;width:18px;height:18px;background:var(--purple);border:2px solid #fff;border-radius:50%;cursor:nwse-resize}.crop-buttons{display:flex;gap:8px;flex-wrap:wrap;margin-top:10px}.crop-buttons button{margin-top:0;padding:8px 10px;font-size:.86rem}@media(max-width:720px){.site-header-inner{min-height:auto;padding:12px 0;align-items:flex-start;flex-direction:column}.site-nav{width:100%;justify-content:flex-start;gap:10px 14px}.site-main{width:min(100% - 22px,1180px);margin:22px auto}.shop-hero{text-align:left}.product-grid{grid-template-columns:1fr}.product-card{max-width:none}.product-card-image,.product-card-placeholder{aspect-ratio:16/10}.product-detail-image{height:220px}table{display:block;overflow-x:auto;white-space:nowrap}input,textarea,select{max-width:100%}.crop-editors{grid-template-columns:1fr}.crop-editor{max-width:100%}.product-detail-full-image-wrap{padding:12px 12px 0}.product-detail-full-image-mode{max-width:100%}}


/* Custom watermark admin controls */
.file-settings-card{border:1px solid var(--border);border-radius:14px;background:#fbf7ef;padding:14px;margin:14px 0}.file-settings-header{display:flex;align-items:flex-start;justify-content:space-between;gap:16px;flex-wrap:wrap}.file-settings-header h3{margin:0 0 4px}.file-settings-card details{margin-top:10px}.file-settings-card summary{cursor:pointer;font-weight:800;color:var(--purple)}.watermark-settings-grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(220px,1fr));gap:12px 16px;align-items:end;max-width:980px}.watermark-settings-grid label{margin-top:0}.watermark-settings-grid input,.watermark-settings-grid select{max-width:100%}.checkbox-label{display:flex;align-items:center;gap:8px;font-weight:700}.watermark-wide-field{grid-column:1/-1}.watermark-help code{background:#eee4d4;border:1px solid var(--border);border-radius:5px;padding:1px 4px}.danger-button{background:#9f1239}.danger-button:hover{background:#7f102f}

/* Admin free download links */
.free-link-grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(210px,1fr));gap:12px 16px;align-items:end;max-width:980px}.free-link-form textarea{max-width:860px}.guest-file-row{display:flex;align-items:center;justify-content:space-between;gap:14px;border:1px solid var(--border);background:#fbf7ef;border-radius:12px;padding:12px;margin:10px 0;flex-wrap:wrap}.guest-file-row form{margin:0}.guest-file-row button{margin-top:0}.free-download-page{max-width:860px;margin:0 auto}code{background:#eee4d4;border:1px solid var(--border);border-radius:5px;padding:1px 4px}


/* DiceStory header branding */
.site-header{
  background:
    radial-gradient(circle at 18% 0%, rgba(139, 92, 246, .28), transparent 32%),
    linear-gradient(135deg, #181216 0%, #241727 46%, #141016 100%);
  border-bottom: 1px solid rgba(245, 214, 140, .24);
}
.site-header-inner{
  min-height: 72px;
  padding: 10px 0;
}
.site-brand-logo{
  display:flex;
  align-items:center;
  gap:12px;
  color:#fff;
  text-decoration:none;
  min-width:0;
}
.site-brand-logo:hover{
  color:#fff;
}
.brand-logo{
  display:block;
  width:54px;
  height:54px;
  flex:0 0 auto;
  filter:drop-shadow(0 2px 8px rgba(0,0,0,.35));
}
.brand-copy{
  display:flex;
  flex-direction:column;
  line-height:1.05;
  min-width:0;
}
.brand-name{
  font-weight:900;
  letter-spacing:.04em;
  font-size:1.28rem;
  text-transform:uppercase;
}
.brand-tagline{
  margin-top:5px;
  font-size:.78rem;
  line-height:1.25;
  color:#e8d9c4;
  font-weight:650;
  max-width:320px;
}
.site-nav a,
.nav-button{
  color:#fff;
  opacity:.94;
}
.site-nav a:hover,
.nav-button:hover{
  opacity:1;
  color:#f7d78b;
}
.site-nav a{
  padding:7px 0;
}
@media(max-width:720px){
  .site-header-inner{
    gap:12px;
  }
  .site-brand-logo{
    width:100%;
  }
  .brand-logo{
    width:46px;
    height:46px;
  }
  .brand-name{
    font-size:1.08rem;
  }
  .brand-tagline{
    font-size:.72rem;
    max-width:260px;
  }
}

/* Step 2 product-page conversion upgrades */
.product-detail-upgraded{align-items:flex-start;gap:28px;}
.product-sales-panel .eyebrow{font-size:.78rem;font-weight:800;text-transform:uppercase;letter-spacing:.08em;color:#7b4cc2;margin:0 0 8px;}
.product-buy-box{margin-top:18px;padding:18px;border:1px solid #eadfce;border-radius:16px;background:#fffaf3;display:flex;flex-wrap:wrap;gap:12px;align-items:center;}
.product-buy-box form{margin:0;}
.secondary-button{background:#fff;color:#3b263d;border:1px solid #d9c8af;}
.product-conversion-grid{display:grid;grid-template-columns:1fr 1fr;gap:18px;margin-top:24px;}
.product-info-card h2{margin-top:0;}
.product-policy-card{grid-column:1 / -1;}
.product-detail-list{display:grid;grid-template-columns:150px 1fr;gap:10px 16px;margin:0;}
.product-detail-list dt{font-weight:800;color:#3b263d;}
.product-detail-list dd{margin:0;}
.file-spec-row{margin-bottom:8px;}
.file-spec-row span{display:block;color:#756b62;font-size:.92rem;margin-top:2px;}
@media(max-width:800px){.product-conversion-grid{grid-template-columns:1fr;}.product-detail-list{grid-template-columns:1fr;gap:4px;}.product-detail-list dd{margin-bottom:10px;}}

/* Download active meter */
.download-meter{position:fixed;inset:0;z-index:9999;background:rgba(25,18,26,.44);display:flex;align-items:center;justify-content:center;padding:20px;}
.download-meter[hidden]{display:none;}
.download-meter-card{max-width:420px;width:100%;background:#fffaf3;border:1px solid #eadfce;border-radius:18px;box-shadow:0 20px 60px rgba(0,0,0,.28);padding:22px;text-align:center;}
.download-meter-card p{margin:8px 0 16px;color:#756b62;}
.download-progress{height:10px;border-radius:999px;background:#eadfce;overflow:hidden;}
.download-progress span{display:block;height:100%;width:40%;border-radius:999px;background:#7b4cc2;animation:downloadMeter 1.1s infinite ease-in-out;}
@keyframes downloadMeter{0%{transform:translateX(-110%);}100%{transform:translateX(260%);}}


/* Cohesive product detail page */
.product-hero-card{
  max-width:1180px;
  margin:28px auto;
  background:rgba(255,255,255,.88);
  border:1px solid #ded3bf;
  border-radius:22px;
  box-shadow:0 18px 50px rgba(47,33,20,.10);
  overflow:hidden;
  display:grid;
  grid-template-columns:minmax(320px, 44%) 1fr;
}
.product-hero-media{
  background:#191219;
  min-height:520px;
  display:flex;
  align-items:stretch;
  justify-content:center;
}
.product-hero-image{
  width:100%;
  height:100%;
  min-height:520px;
  object-fit:cover;
  display:block;
}
.product-hero-body{
  padding:34px;
}
.product-hero-body h1{
  margin:.15rem 0 .55rem;
  font-size:clamp(2rem, 4vw, 3.45rem);
  line-height:1.02;
}
.product-hero-description{
  font-size:1.04rem;
  color:#4f4337;
  margin-bottom:20px;
}
.product-action-row{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:18px;
  flex-wrap:wrap;
  margin:18px 0;
}
.product-action-buttons{
  display:flex;
  align-items:center;
  gap:10px;
  flex-wrap:wrap;
}
.product-action-buttons form{
  margin:0;
}
.product-detail-price{
  font-size:1.7rem;
  letter-spacing:.02em;
}
.product-hero-divider{
  height:1px;
  background:linear-gradient(90deg, transparent, #d8c9ae, transparent);
  margin:22px 0;
}
.product-quick-specs{
  display:grid;
  grid-template-columns:repeat(4, minmax(0, 1fr));
  gap:10px;
  margin-bottom:24px;
}
.product-quick-specs div{
  background:#f7f0e4;
  border:1px solid #e2d3b8;
  border-radius:14px;
  padding:12px;
}
.product-quick-specs span{
  display:block;
  color:#7a6855;
  font-size:.76rem;
  font-weight:800;
  text-transform:uppercase;
  letter-spacing:.06em;
  margin-bottom:4px;
}
.product-quick-specs strong{
  display:block;
  font-size:.95rem;
  line-height:1.25;
}
.product-hero-sections{
  display:grid;
  gap:16px;
}
.product-hero-sections section{
  background:#fffaf2;
  border:1px solid #eadcc4;
  border-radius:16px;
  padding:18px;
}
.product-hero-sections h2{
  margin:0 0 10px;
  font-size:1.08rem;
}
.product-copy{
  color:#41372e;
  line-height:1.55;
}
.product-file-list{
  display:grid;
  gap:8px;
}
.product-file-pill{
  display:flex;
  justify-content:space-between;
  gap:12px;
  align-items:center;
  background:#f6efe2;
  border:1px solid #e6d6bd;
  border-radius:12px;
  padding:10px 12px;
}
.product-file-pill strong{
  min-width:0;
  overflow-wrap:anywhere;
}
.product-file-pill span,
.sample-note{
  color:#6d5d4c;
  font-size:.92rem;
}
.sample-note{
  margin:.8rem 0 0;
}
.product-conversion-grid{
  display:none !important;
}

@media(max-width:900px){
  .product-hero-card{
    grid-template-columns:1fr;
    margin:18px auto;
  }
  .product-hero-media,
  .product-hero-image{
    min-height:360px;
    max-height:520px;
  }
  .product-quick-specs{
    grid-template-columns:repeat(2, minmax(0, 1fr));
  }
}
@media(max-width:560px){
  .product-hero-body{
    padding:22px;
  }
  .product-action-row{
    align-items:flex-start;
  }
  .product-action-buttons,
  .product-action-buttons .button,
  .product-action-buttons button,
  .product-action-buttons form{
    width:100%;
  }
  .product-file-pill{
    display:block;
  }
  .product-file-pill span{
    display:block;
    margin-top:4px;
  }
}
