/* Dayava Loyalty System — storefront. Inherits the theme font; brand colour via --cfl-brand. */
.cfl-fe{--cfl-brand:#7a4b1f;--cfl-soft:color-mix(in srgb,var(--cfl-brand) 9%,#fff);--cfl-line:#ebe5dd;--cfl-muted:#71695f;--cfl-good:#1e7a4c;--cfl-bad:#b3261e;--cfl-warn:#9a5b00;color:inherit;line-height:1.5}
.cfl-fe *{box-sizing:border-box}
.cfl-fe h3{font-size:1.1em;margin:0 0 12px;font-weight:700}
.cfl-fe p{margin:0}
.cfl-fe svg{flex:none;width:18px;height:18px}
.cfl-fe .cfl-fe-scan svg,.cfl-fe svg[role=img]{width:auto;height:auto}
.cfl-fe-muted{color:var(--cfl-muted)}
.cfl-fe-btn{display:inline-flex;align-items:center;justify-content:center;gap:6px;border:0;border-radius:999px;background:var(--cfl-brand);color:#fff!important;font-weight:650;font-size:.92em;padding:9px 18px;line-height:1.2;cursor:pointer;text-decoration:none!important;transition:filter .15s,transform .05s}
.cfl-fe-btn:hover{filter:brightness(1.08)}
.cfl-fe-btn:active{transform:translateY(1px)}
.cfl-fe-btn--ghost{background:transparent;color:var(--cfl-brand)!important;box-shadow:inset 0 0 0 1.5px currentColor}
.cfl-fe-btn--link{background:none;color:var(--cfl-muted)!important;padding:4px 0;font-weight:500;text-decoration:underline!important}
.cfl-fe-bar{height:8px;border-radius:999px;background:color-mix(in srgb,var(--cfl-brand) 14%,#fff);overflow:hidden}
.cfl-fe-bar i{display:block;height:100%;border-radius:999px;background:var(--cfl-brand);transition:width .4s}
.cfl-fe-panel{border:1px solid var(--cfl-line);border-radius:16px;padding:20px;background:#fff}
.cfl-fe-section{margin-top:32px}
.cfl-fe-section__head{display:flex;align-items:baseline;justify-content:space-between;gap:12px;margin-bottom:14px}
.cfl-fe-section__head h3{margin:0}

/* hero */
.cfl-fe-hero{display:grid;grid-template-columns:minmax(0,1.15fr) minmax(0,1fr);gap:16px}
@media (max-width:720px){.cfl-fe-hero{grid-template-columns:1fr}}
.cfl-fe-card{position:relative;border-radius:20px;padding:22px 24px;color:#fff;min-height:200px;overflow:hidden;background:radial-gradient(120% 140% at 100% 0%,color-mix(in srgb,var(--cfl-brand) 55%,#e6b77f) 0%,var(--cfl-brand) 55%,color-mix(in srgb,var(--cfl-brand) 70%,#000) 100%);box-shadow:0 14px 30px -16px color-mix(in srgb,var(--cfl-brand) 80%,transparent)}
.cfl-fe-card::before{content:"";position:absolute;right:-50px;bottom:-70px;width:220px;height:220px;border-radius:50%;background:rgba(255,255,255,.08)}
.cfl-fe-card::after{content:"";position:absolute;right:60px;top:-90px;width:160px;height:160px;border-radius:50%;background:rgba(255,255,255,.06)}
.cfl-fe-card__top{display:flex;justify-content:space-between;align-items:center;gap:8px;position:relative;z-index:1}
.cfl-fe-card__logo{height:30px;max-width:150px;object-fit:contain;filter:brightness(0) invert(1)}
.cfl-fe-card__brand{font-weight:750;letter-spacing:.01em}
.cfl-fe-chip{background:rgba(255,255,255,.2);border-radius:999px;padding:3px 12px;font-size:.8em;font-weight:650;white-space:nowrap}
.cfl-fe-card__label{margin-top:26px;font-size:.75em;text-transform:uppercase;letter-spacing:.08em;opacity:.8;position:relative;z-index:1}
.cfl-fe-card__balance{font-size:2.4em;font-weight:800;letter-spacing:-.02em;line-height:1.1;position:relative;z-index:1}
.cfl-fe-card__balance *{color:#fff!important}
.cfl-fe-card__sub{opacity:.85;font-size:.88em;position:relative;z-index:1;margin-top:2px}
.cfl-fe-card__foot{display:flex;justify-content:space-between;align-items:flex-end;margin-top:18px;position:relative;z-index:1;gap:8px;flex-wrap:wrap}
.cfl-fe-card__holder{font-weight:650}
.cfl-fe-card__number{font-family:ui-monospace,Menlo,Consolas,monospace;font-size:.85em;letter-spacing:.08em;opacity:.9}
.cfl-fe-scan{display:flex;flex-direction:column;justify-content:center;gap:10px;text-align:center}
.cfl-fe-scan svg{max-width:100%;height:auto}
.cfl-fe-scan small{color:var(--cfl-muted)}

/* stats */
.cfl-fe-stats{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:12px;margin-top:16px}
@media (max-width:620px){.cfl-fe-stats{grid-template-columns:1fr}}
.cfl-fe-stat{border:1px solid var(--cfl-line);border-radius:14px;padding:14px 16px;background:#fff}
.cfl-fe-stat>span{display:block;font-size:.8em;color:var(--cfl-muted)}
.cfl-fe-stat strong{font-size:1.35em;font-weight:750}
.cfl-fe-stat--warn{border-color:#f1d7a6;background:#fffaf0}
.cfl-fe-stat--warn strong{color:var(--cfl-warn)}

/* tier */
.cfl-fe-tier{display:flex;align-items:center;gap:16px;margin-top:16px;background:var(--cfl-soft);border-radius:14px;padding:14px 18px}
.cfl-fe-tier__badge svg{width:22px;height:22px}
.cfl-fe-tier__badge{width:44px;height:44px;border-radius:50%;display:grid;place-items:center;background:#fff;color:var(--cfl-brand);flex:none}
.cfl-fe-tier__main{flex:1;min-width:0}
.cfl-fe-tier__main strong{display:block}
.cfl-fe-tier__main small{display:block;color:var(--cfl-muted);margin-top:6px}

/* coupons */
.cfl-fe-coupons{display:grid;grid-template-columns:repeat(auto-fill,minmax(250px,1fr));gap:14px;list-style:none;margin:0;padding:0}
.cfl-fe-coupon{position:relative;display:flex;flex-direction:column;gap:8px;border-radius:16px;background:#fff;border:1.5px dashed color-mix(in srgb,var(--cfl-brand) 40%,#fff);padding:18px 18px 16px;margin:0}
.cfl-fe-coupon::before,.cfl-fe-coupon::after{content:"";position:absolute;top:58px;width:16px;height:16px;border-radius:50%;background:var(--cfl-page-bg,#fff);border:1.5px dashed color-mix(in srgb,var(--cfl-brand) 40%,#fff)}
.cfl-fe-coupon::before{left:-9px;clip-path:inset(0 0 0 50%)}
.cfl-fe-coupon::after{right:-9px;clip-path:inset(0 50% 0 0)}
.cfl-fe-coupon.is-active{border-style:solid;border-color:color-mix(in srgb,var(--cfl-brand) 55%,#fff);background:linear-gradient(180deg,var(--cfl-soft),#fff 70%)}
.cfl-fe-coupon.is-active::before,.cfl-fe-coupon.is-active::after{border-style:solid;border-color:color-mix(in srgb,var(--cfl-brand) 55%,#fff)}
.cfl-fe-coupon__top{display:flex;align-items:center;gap:10px}
.cfl-fe-coupon__ico{width:38px;height:38px;border-radius:12px;display:grid;place-items:center;background:var(--cfl-brand);color:#fff}
.cfl-fe-coupon__name{font-weight:700;line-height:1.25}
.cfl-fe-coupon__text{font-size:.95em}
.cfl-fe-coupon__desc{font-size:.85em;color:var(--cfl-muted)}
.cfl-fe-coupon__meta{display:flex;justify-content:space-between;align-items:center;gap:8px;margin-top:auto;padding-top:6px;font-size:.82em;color:var(--cfl-muted)}
.cfl-fe-coupon form{margin:0}
.cfl-fe-loaded{display:inline-flex;align-items:center;gap:5px;color:var(--cfl-good);font-weight:700;font-size:.9em}
.cfl-fe-empty{text-align:center;padding:28px;border:1px dashed var(--cfl-line);border-radius:16px;color:var(--cfl-muted)}

/* history */
.cfl-fe-history{list-style:none;margin:0;padding:0;border:1px solid var(--cfl-line);border-radius:16px;background:#fff;overflow:hidden}
.cfl-fe-history li{display:flex;align-items:center;gap:12px;padding:12px 16px;border-bottom:1px solid var(--cfl-line);margin:0}
.cfl-fe-history li:last-child{border-bottom:0}
.cfl-fe-history__ico{width:34px;height:34px;border-radius:50%;display:grid;place-items:center;background:#eef7f1;color:var(--cfl-good)}
.cfl-fe-history__ico.is-neg{background:#fdecea;color:var(--cfl-bad)}
.cfl-fe-history__main{flex:1;min-width:0}
.cfl-fe-history__main strong{display:block;font-weight:600}
.cfl-fe-history__main small{display:block;color:var(--cfl-muted);font-size:.82em;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.cfl-fe-amount{font-weight:750;white-space:nowrap}
.cfl-fe-amount.is-pos{color:var(--cfl-good)}
.cfl-fe-amount.is-neg{color:var(--cfl-bad)}
.cfl-fe-pending{display:inline-block;background:#fdf3e1;color:var(--cfl-warn);font-size:.72em;font-weight:700;border-radius:999px;padding:1px 8px;margin-left:6px;vertical-align:middle}

/* forms */
.cfl-fe-two{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:16px}
@media (max-width:720px){.cfl-fe-two{grid-template-columns:1fr}}
.cfl-fe-field{display:flex;flex-direction:column;gap:5px;margin-bottom:12px}
.cfl-fe-field label{font-weight:600;font-size:.9em}
.cfl-fe input.cfl-fe-input{width:100%;border:1px solid #d9d1c7;border-radius:10px;padding:9px 12px;background:#fff;font:inherit}
.cfl-fe input.cfl-fe-input:focus{outline:none;border-color:var(--cfl-brand);box-shadow:0 0 0 3px color-mix(in srgb,var(--cfl-brand) 18%,transparent)}
.cfl-fe-check{display:flex;gap:8px;align-items:flex-start;font-size:.92em;margin:4px 0 14px}
.cfl-fe-check input{accent-color:var(--cfl-brand);margin-top:3px}
.cfl-fe-inline{display:flex;gap:8px}
.cfl-fe-inline .cfl-fe-input{flex:1}
.cfl-fe-cards{list-style:none;margin:0 0 14px;padding:0}
.cfl-fe-cards li{display:flex;align-items:center;gap:10px;padding:8px 0;border-bottom:1px solid var(--cfl-line);margin:0;flex-wrap:wrap}
.cfl-fe-cards li:last-child{border-bottom:0}
.cfl-fe-cards code{font-family:ui-monospace,Menlo,Consolas,monospace;background:none;padding:0;font-size:.9em}
.cfl-fe-tag{font-size:.75em;font-weight:650;border-radius:999px;padding:1px 8px;background:#f1ece6;color:#5a524a}
.cfl-fe-tag--bad{background:#fdecea;color:var(--cfl-bad)}
.cfl-fe-cards form{margin:0 0 0 auto}

/* product + cart */
.cfl-fe-product{display:flex;flex-wrap:wrap;gap:8px;align-items:center;margin:14px 0}
.cfl-fe-pill{display:inline-flex;align-items:center;gap:7px;border-radius:999px;padding:6px 14px 6px 8px;background:var(--cfl-soft);color:var(--cfl-brand);font-weight:650;font-size:.9em}
.cfl-fe-pill b{display:grid;place-items:center;width:24px;height:24px;border-radius:50%;background:var(--cfl-brand);color:#fff;font-size:.8em}
.cfl-fe-pill a{color:inherit;text-decoration:underline}
.cfl-fe-pill--coupon{background:#fff;border:1.5px dashed color-mix(in srgb,var(--cfl-brand) 45%,#fff);padding:5px 12px}
.cfl-fe-cart{border:1px solid var(--cfl-line);border-radius:16px;background:#fff;margin:0 0 24px;overflow:hidden}
.cfl-fe-cart__head{display:flex;align-items:center;gap:12px;padding:14px 18px;background:var(--cfl-soft);flex-wrap:wrap}
.cfl-fe-cart__logo{width:40px;height:28px;border-radius:6px;background:linear-gradient(135deg,var(--cfl-brand),color-mix(in srgb,var(--cfl-brand) 60%,#e6b77f));flex:none}
.cfl-fe-cart__title{flex:1;min-width:160px}
.cfl-fe-cart__title strong{display:block}
.cfl-fe-cart__title small{color:var(--cfl-muted)}
.cfl-fe-cart__body{padding:12px 18px 16px}
.cfl-fe-cart__earn{display:flex;align-items:center;gap:8px;font-weight:600;color:var(--cfl-good);margin:4px 0}
.cfl-fe-goal{padding:10px 0;border-top:1px solid var(--cfl-line)}
.cfl-fe-goal:first-child{border-top:0}
.cfl-fe-goal__text{display:flex;justify-content:space-between;gap:10px;font-size:.92em;margin-bottom:6px}
.cfl-fe-goal__text b{white-space:nowrap}
.cfl-fe-goal.is-done .cfl-fe-goal__text{color:var(--cfl-good);font-weight:650}
.cfl-fe-cart--guest{display:flex;align-items:center;gap:12px;padding:14px 18px}

.cfl-fe-more{margin-top:10px}
.cfl-fe-more>summary{cursor:pointer;color:var(--cfl-brand);font-weight:650;list-style:none;display:inline-block;padding:6px 0}
.cfl-fe-more>summary::-webkit-details-marker{display:none}
.cfl-fe-more[open]>summary{margin-bottom:10px}
