/* Website content module. Uses the existing InstaPrints variables; nothing here changes other pages. */
.ip-cms-body { line-height: 1.75; font-size: 1.05rem; color: var(--ip-foreground); overflow-wrap: anywhere; }
.ip-cms-body h2, .ip-cms-body h3, .ip-cms-body h4 { color: var(--ip-primary); margin: 1.6rem 0 .6rem; font-weight: 700; }
.ip-cms-body img { max-width: 100%; height: auto; border-radius: .6rem; }
.ip-cms-body blockquote { border-left: 4px solid var(--ip-brand); padding: .25rem 1rem; margin: 1rem 0; color: var(--ip-muted-foreground); }
.ip-cms-body table { width: 100%; border-collapse: collapse; margin: 1rem 0; display: block; overflow-x: auto; }
.ip-cms-body td, .ip-cms-body th { border: 1px solid var(--ip-border); padding: .5rem .75rem; vertical-align: top; }
.ip-cms-body iframe { width: 100%; aspect-ratio: 16 / 9; height: auto; border: 0; border-radius: .6rem; margin: 1rem 0; }
.ip-cms-body .ql-align-center { text-align: center; } .ip-cms-body .ql-align-right { text-align: right; } .ip-cms-body .ql-align-justify { text-align: justify; }
.ip-cms-body .ql-indent-1 { padding-left: 3em; } .ip-cms-body .ql-indent-2 { padding-left: 6em; }
.ip-cms-body a.ip-cms-btn, .ip-cms-body .ip-cms-btn a, .ip-cms-btn { display: inline-block; background: var(--ip-primary); color: #fff; padding: .6rem 1.2rem; border-radius: 999px; font-weight: 600; text-decoration: none; }
.ip-cms-body a.ip-cms-btn:hover, .ip-cms-body .ip-cms-btn a:hover { background: #1f1f3d; color: #fff; }
.ip-cms-section + .ip-cms-section { margin-top: 2rem; padding-top: 1.5rem; border-top: 1px solid var(--ip-border); }
.ip-cms-feature { width: 100%; max-height: 360px; object-fit: cover; border-radius: 1rem; }

/* Home blocks */
.ip-cat-card { display: block; text-decoration: none; color: inherit; overflow: hidden; height: 100%; }
.ip-cat-card img { aspect-ratio: 4 / 3; object-fit: cover; width: 100%; }
.ip-cat-card .ip-cat-body { padding: .9rem 1rem 1rem; }
.ip-banner { border-radius: 1rem; overflow: hidden; display: flex; flex-wrap: wrap; align-items: center; gap: 1rem; padding: 1.5rem; }
.ip-banner--light { background: var(--ip-accent); color: var(--ip-primary); }
.ip-banner--dark { background: #15204A; color: #fff; }
.ip-banner--accent { background: var(--ip-gradient-brand); color: #fff; }
.ip-banner img { max-height: 140px; border-radius: .6rem; object-fit: cover; }
.ip-banner-eyebrow { text-transform: uppercase; letter-spacing: .08em; font-size: .75rem; font-weight: 700; opacity: .85; }
.ip-quote-card { height: 100%; padding: 1.25rem; display: flex; flex-direction: column; gap: .75rem; }
.ip-quote-card blockquote { margin: 0; font-size: 1rem; line-height: 1.6; }
.ip-stars { color: #B88000; letter-spacing: 2px; }
.ip-avatar { width: 44px; height: 44px; border-radius: 50%; object-fit: cover; background: var(--ip-secondary); }
.ip-verified { font-size: .72rem; background: #E4F4EC; color: #1F6B49; border-radius: 999px; padding: .1rem .5rem; font-weight: 600; }
.ip-tab-btn { border: 1px solid var(--ip-border); background: #fff; color: var(--ip-primary); border-radius: 999px; padding: .35rem .9rem; font-size: .85rem; font-weight: 600; }
.ip-tab-btn[aria-selected="true"] { background: var(--ip-primary); color: #fff; border-color: var(--ip-primary); }
.ip-social a { display: inline-flex; width: 40px; height: 40px; border-radius: 50%; align-items: center; justify-content: center; background: var(--ip-secondary); color: var(--ip-primary); font-size: 1.1rem; }
.ip-social a:hover { background: var(--ip-primary); color: #fff; }
.ip-footer .ip-social a { background: rgba(255,255,255,.1); color: #fff; }
.ip-footer .ip-social a:hover { background: #fff; color: #0E1733; }
.ip-hp { position: absolute; left: -9999px; height: 0; width: 0; overflow: hidden; }

/* Admin editor */
.ip-cms-editor-host { position: relative; background: #fff; }
.ip-cms-editor-host .ql-container { min-height: 280px; font-size: 1rem; }
.ip-cms-editor-host .ql-editor { min-height: 280px; max-height: 70vh; overflow-y: auto; }
.ip-cms-editor-host .ql-editor img { max-width: 100%; cursor: pointer; }
.ip-cms-editor-host .ql-editor table { border-collapse: collapse; width: 100%; }
.ip-cms-editor-host .ql-editor td { border: 1px solid #bbb; padding: 4px 8px; }
.ip-cms-imgbar { position: absolute; z-index: 5; background: #fff; border: 1px solid var(--ip-border); border-radius: .5rem; padding: .35rem .5rem; box-shadow: 0 6px 18px rgba(0,0,0,.15); display: flex; flex-wrap: wrap; gap: .25rem; align-items: center; }
.ip-cms-imgbar[hidden] { display: none; }
.ip-cms-imgbar button { border: 1px solid var(--ip-border); background: #f8f8fa; border-radius: .35rem; font-size: .75rem; padding: .15rem .45rem; }
.ip-cms-preview-frame { width: 100%; height: 640px; border: 1px solid var(--ip-border); border-radius: .5rem; background: #fff; transition: width .2s; margin: 0 auto; display: block; }

/* ---- HTML editor (x-cms.html-editor) ---- */
.ip-hed { border: 1px solid var(--ip-border); border-radius: .6rem; background: #fff; }
.ip-hed-bar { display: flex; flex-wrap: wrap; gap: .5rem; align-items: center; padding: .5rem; border-bottom: 1px solid var(--ip-border); background: #f8f8fb; border-radius: .6rem .6rem 0 0; }
.ip-hed-body { display: grid; grid-template-columns: 1fr; gap: 0; }
.ip-hed-pane { min-width: 0; display: flex; flex-direction: column; }
.ip-hed-ta { display: block; width: 100%; min-height: 480px; height: 480px; resize: vertical; border: 0; outline: 0; padding: .85rem 1rem; tab-size: 2; white-space: pre; overflow: auto;
  font: 13.5px/1.55 ui-monospace, SFMono-Regular, Menlo, Consolas, "Liberation Mono", monospace; color: #1b1f33; background: #fff; }
.ip-hed-ta:focus { box-shadow: inset 0 0 0 2px rgba(58, 91, 255, .35); }
.ip-hed-visual .ql-container { min-height: 480px; font-size: 1rem; }
.ip-hed-visual .ql-editor { min-height: 480px; }
.ip-hed-prevbar { display: flex; justify-content: space-between; padding: .35rem .75rem; background: #f8f8fb; border-bottom: 1px solid var(--ip-border); }
.ip-hed-framewrap { flex: 1 1 auto; background: #eef0f6; padding: .5rem; min-height: 480px; display: flex; justify-content: center; }
.ip-hed-frame { width: 100%; height: 100%; min-height: 480px; border: 1px solid var(--ip-border); background: #fff; border-radius: .4rem; transition: width .2s; }
.ip-hed[data-width="mobile"] .ip-hed-frame { width: 390px; max-width: 100%; }
.ip-hed-foot { display: flex; flex-wrap: wrap; gap: .5rem 1rem; justify-content: space-between; padding: .35rem .75rem; border-top: 1px solid var(--ip-border); }
.ip-hed-warn, .ip-hed-vnote { border-radius: 0; }
/* narrow screens: tabs (one pane at a time). wide screens: HTML mode shows editor and preview side by side */
.ip-hed .ip-hed-visual, .ip-hed .ip-hed-prev { display: none; }
.ip-hed[data-mode="html"] .ip-hed-src .ip-hed-ta { display: block; }
.ip-hed[data-mode="visual"] .ip-hed-ta { display: none; }
.ip-hed[data-mode="visual"] .ip-hed-visual { display: block; }
.ip-hed[data-mode="preview"] .ip-hed-src { display: none; }
.ip-hed[data-mode="preview"] .ip-hed-prev { display: flex; }
.ip-hed[data-mode="visual"] [data-hed-open], .ip-hed[data-mode="preview"] [data-hed-open] { opacity: .6; }
@media (min-width: 992px) {
  .ip-hed[data-mode="html"] .ip-hed-body { grid-template-columns: 1fr 1fr; }
  .ip-hed[data-mode="html"] .ip-hed-prev { display: flex; border-left: 1px solid var(--ip-border); }
}
/* picture panel */
.ip-hed-panel { border-bottom: 1px solid var(--ip-border); background: #fcfcfe; }
.ip-mp { padding: .5rem .75rem .75rem; }
.ip-mp-head { display: flex; align-items: center; gap: .25rem; border-bottom: 1px solid var(--ip-border); margin-bottom: .6rem; }
.ip-mp-head .ip-mp-close { margin-left: auto; }
.ip-mp-tab { border: 0; background: none; padding: .4rem .8rem; font-weight: 600; font-size: .9rem; color: var(--ip-muted-foreground); border-bottom: 3px solid transparent; }
.ip-mp-tab[aria-selected="true"] { color: var(--ip-primary); border-bottom-color: var(--ip-primary); }
.ip-mp-drop { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: .25rem; min-height: 120px; border: 2px dashed #b9bfd6; border-radius: .6rem; background: #fff; cursor: pointer; text-align: center; padding: 1rem; }
.ip-mp-drop:hover, .ip-mp-drop.is-over { border-color: var(--ip-primary); background: #f3f5ff; }
.ip-mp-drop-big { font-weight: 600; color: var(--ip-primary); }
.ip-mp-drop-small { font-size: .8rem; color: var(--ip-muted-foreground); }
.ip-mp-msg { font-size: .85rem; margin-top: .4rem; color: #8a3b00; min-height: 1.2em; }
.ip-mp-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(110px, 1fr)); gap: .5rem; max-height: 260px; overflow-y: auto; padding: 2px; }
.ip-mp-card { border: 2px solid transparent; border-radius: .5rem; background: #fff; padding: 0; overflow: hidden; text-align: left; box-shadow: 0 0 0 1px var(--ip-border); }
.ip-mp-card[aria-selected="true"] { border-color: var(--ip-primary); }
.ip-mp-card img { display: block; width: 100%; aspect-ratio: 4 / 3; object-fit: cover; }
.ip-mp-cap { display: block; font-size: .7rem; padding: .15rem .35rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; color: var(--ip-muted-foreground); }
.ip-mp-sel { margin-top: .75rem; padding-top: .75rem; border-top: 1px solid var(--ip-border); }
.ip-mp-thumb { width: 150px; max-height: 120px; object-fit: contain; background: #eef0f6; border-radius: .4rem; align-self: flex-start; }

/* ---- Offers (public) ---- */
.ip-offers-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 1rem; }
.ip-offers-carousel { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(260px, 320px); gap: 1rem; overflow-x: auto; scroll-snap-type: x mandatory; padding-bottom: .5rem; }
.ip-offers-carousel > * { scroll-snap-align: start; }
.ip-offer { display: flex; flex-direction: column; overflow: hidden; height: 100%; }
.ip-offer-img { aspect-ratio: 16 / 9; object-fit: cover; width: 100%; background: var(--ip-secondary); }
.ip-offer-body { padding: 1rem; display: flex; flex-direction: column; gap: .5rem; flex: 1 1 auto; }
.ip-offer-badge { align-self: flex-start; background: var(--ip-primary); color: #fff; border-radius: 999px; padding: .15rem .65rem; font-size: .75rem; font-weight: 700; }
.ip-offer-code { display: flex; gap: .5rem; align-items: center; flex-wrap: wrap; }
.ip-offer-code code { background: #f1f3fa; border: 1px dashed #aab; border-radius: .4rem; padding: .2rem .6rem; font-size: .95rem; letter-spacing: .04em; }
.ip-offer-end { font-size: .8rem; color: var(--ip-muted-foreground); }
