/* Shared public card corrections for templates 01-25. Keep theme-specific colors and design. */
:root{--dvc-fix-width:480px;--dvc-fix-gap:12px}
body.dvc-public-card,body.dvcx{overflow-x:clip}
body.dvc-public-card :is(#home,.card,.card2,.share-section,.modern-share,.qr-section,.social-media-card,.social-card,.dvc-premium-social,.dvc-advanced-wrap,.dvc-brand-footer,#mdc-commerce,.mdc-commerce),
body.dvcx :is(.dvcx-hero,.dvcx-top-actions,.dvcx-section,.dvc-premium-social,.dvc-advanced-wrap,.dvcx-footer,.dvc-brand-footer,#mdc-commerce,.mdc-commerce,.dvcx-create-card-cta-v31){width:min(calc(100% - 16px),var(--dvc-fix-width))!important;max-width:var(--dvc-fix-width)!important;min-width:0!important;margin-left:auto!important;margin-right:auto!important;box-sizing:border-box!important}
body.dvc-public-card :is(.card,.card2,.share-section,.modern-share,.qr-section,.social-media-card,.social-card,.dvc-premium-social,.dvc-advanced-wrap),body.dvcx :is(.dvcx-section,.dvc-premium-social,.dvc-advanced-wrap){margin-bottom:var(--dvc-fix-gap)!important}
body.dvc-public-card :is(.card2,.dvc-advanced-card,.social-card),body.dvcx :is(.dvcx-section,.dvc-advanced-card){min-height:0;height:auto;overflow-wrap:anywhere}
body.dvc-public-card :is(.gallery_row,.project-gallery,.gallery-grid),body.dvcx :is(.dvcx-gallery,.dvcx-card-grid){min-width:0;max-width:100%}
body.dvc-public-card :is(.card,.card2,.dvc-advanced-card,.gallery_row,.project-gallery) img,body.dvcx :is(.dvcx-section,.dvc-advanced-card,.dvcx-hero,.dvcx-gallery) img{max-width:100%;box-sizing:border-box}
body.dvc-public-card :is(#gallery,.gallery_row,.project-gallery) img,body.dvcx :is(#gallery,.dvcx-gallery,#projects) img{cursor:zoom-in}
body.dvc-public-card :is(#gallery,.gallery_row,.project-gallery) img,body.dvcx :is(#gallery,.dvcx-gallery,#projects) img{height:auto;max-height:100%;object-fit:contain}
body.dvc-public-card :is(.gallery_row,.project-gallery) img,body.dvcx .dvcx-gallery img{width:100%;aspect-ratio:4/3;object-fit:contain!important;background:rgba(128,128,128,.07);border-radius:12px}
body.dvc-public-card :is(.gallery_row,.project-gallery),body.dvcx .dvcx-gallery{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:10px}
body.dvc-public-card :is(.gallery_row,.project-gallery)>*,body.dvcx .dvcx-gallery>*{min-width:0}
body.dvc-public-card :is(.card,.card2,.dvc-advanced-card),body.dvcx :is(.dvcx-section,.dvcx-item-card,.dvc-advanced-card){overflow-wrap:anywhere}
.dvc-customer-cta-v32{box-sizing:border-box;width:min(calc(100% - 16px),480px);margin:12px auto;padding:16px;border-radius:16px;background:linear-gradient(120deg,#142849,#284b7e);color:white;text-align:center;box-shadow:0 8px 25px #0002}
.dvc-customer-cta-v32 strong{display:block;color:white;font-size:16px}.dvc-customer-cta-v32 p{margin:7px 0 13px;color:#eff5ff;font-size:13px}.dvc-customer-cta-v32__links{display:flex;justify-content:center;gap:10px;flex-wrap:wrap}
.dvc-customer-cta-v32 a{color:#112443!important;background:#fff;padding:10px 15px;border-radius:9px;text-decoration:none!important;font-weight:700;font-size:13px}
.dvc-customer-cta-v32 a+a{color:#fff!important;background:transparent;border:1px solid #dce7fa}
.dvc-gallery-v32{position:fixed!important;inset:0!important;z-index:2147483647!important;display:none!important;align-items:center;justify-content:center;background:rgba(3,8,20,.95)!important;padding:12px;box-sizing:border-box}
.dvc-gallery-v32.is-open{display:flex!important}.dvc-gallery-v32 [hidden]{display:none!important}
.dvc-gallery-v32__panel{position:relative;width:min(100%,1050px);height:min(92dvh,900px);display:flex;align-items:center;justify-content:center;padding:56px 44px 52px;box-sizing:border-box}
.dvc-gallery-v32__image{display:block;max-width:100%;max-height:100%;width:auto;height:auto;object-fit:contain!important;border-radius:8px}
.dvc-gallery-v32 button{position:absolute;z-index:2;display:grid;place-items:center;min-width:42px;min-height:42px;border:0;border-radius:50%;background:#fff;color:#111;font-size:24px;cursor:pointer}
.dvc-gallery-v32__close{top:4px;right:4px}.dvc-gallery-v32__prev{top:50%;left:0;transform:translateY(-50%)}.dvc-gallery-v32__next{top:50%;right:0;transform:translateY(-50%)}
.dvc-gallery-v32__caption{position:absolute;bottom:8px;left:12px;right:12px;text-align:center;color:white;font-size:13px;overflow-wrap:anywhere}
body.dvc-gallery-v32-lock{overflow:hidden!important}
@media(max-width:540px){body.dvc-public-card :is(.gallery_row,.project-gallery),body.dvcx .dvcx-gallery{grid-template-columns:repeat(2,minmax(0,1fr))}.dvc-gallery-v32__panel{padding:52px 40px 44px}.dvc-customer-cta-v32__links a{flex:1 1 140px}}

/* FIX-33: Keep customer acquisition CTA adjacent to the final card footer. */
body.dvc-public-card .dvc-customer-cta-v32,
body.dvcx .dvcx-create-card-cta-v31 {
  margin-top: 12px!important;
  margin-bottom: 12px!important;
  clear: none!important;
}
body.dvc-public-card .dvc-brand-footer,
body.dvcx .dvc-brand-footer,
body.dvcx .dvcx-footer {
  margin-top: 0!important;
  margin-bottom: 0!important;
}
/* Reduce bottom empty space; reserve only enough room for fixed menu. */
body.dvc-public-card { padding-bottom: 76px!important; }
body.dvcx { padding-bottom: 76px!important; }
@media(max-width:540px){
 body.dvc-public-card .dvc-customer-cta-v32,
 body.dvcx .dvcx-create-card-cta-v31 { margin-top: 8px!important; margin-bottom: 8px!important; }
}
