/* Tina's Cake Haven Core – front-end components. Colours fall back to the brand values
   if the active theme does not define the presets, so features look right in any theme. */
.tch-grid, .tch-form, .tch-order, .tch-myorders, .tch-details, .tch-pricelist, .tch-account, .tch-account-auth {
	--c-pink: var(--wp--preset--color--magenta, #c2185b);
	--c-pink-d: var(--wp--preset--color--magenta-dark, #8e0f43);
	--c-blush: var(--wp--preset--color--blush, #fde4ee);
	--c-cream: var(--wp--preset--color--cream, #fff8ee);
	--c-cream-d: var(--wp--preset--color--cream-dark, #f7e9d7);
	--c-choc: var(--wp--preset--color--chocolate, #4a2c21);
	--c-ok: #1f7a46; --c-err: #b3261e; --c-info: #1d5f8a;
	--r: 16px; --sh: 0 10px 30px rgba(74, 44, 33, .10);
}

/* Buttons */
.tch-btn { display: inline-flex; align-items: center; justify-content: center; gap: .4rem; background: var(--c-pink, #c2185b); color: #fff !important; border: 2px solid var(--c-pink, #c2185b); padding: .7rem 1.4rem; border-radius: 999px; font-weight: 800; text-decoration: none !important; cursor: pointer; font-size: 1rem; line-height: 1.2; transition: transform .15s, background .2s; font-family: inherit; }
.tch-btn:hover, .tch-btn:focus-visible { background: var(--c-pink-d, #8e0f43); border-color: var(--c-pink-d, #8e0f43); transform: translateY(-2px); }
.tch-btn--ghost { background: transparent; color: var(--c-pink-d, #8e0f43) !important; }
.tch-btn--ghost:hover { color: #fff !important; }
.tch-btn--whatsapp { background: #1f8f4e; border-color: #1f8f4e; }
.tch-btn--whatsapp:hover { background: #16703c; border-color: #16703c; }
.tch-btn--sm { padding: .45rem 1rem; font-size: .9rem; }
.tch-btn--lg { padding: .9rem 1.8rem; font-size: 1.08rem; }
.tch-btn:disabled { opacity: .6; cursor: wait; transform: none; }
.tch-link-btn { background: none; border: 0; color: var(--c-err); cursor: pointer; font-weight: 700; padding: .2rem; font-family: inherit; }
.tch-actions { display: flex; flex-wrap: wrap; gap: .6rem; }

/* Product cards */
.tch-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 210px), 1fr)); gap: 1.3rem; margin-block: 1.5rem; }
.tch-card { background: #fff; border-radius: var(--r); overflow: hidden; box-shadow: var(--sh); display: flex; flex-direction: column; transition: transform .2s, box-shadow .2s; }
.tch-card:hover { transform: translateY(-5px); box-shadow: 0 18px 44px rgba(74, 44, 33, .16); }
.tch-card__media { position: relative; display: block; aspect-ratio: 1; background: var(--c-cream-d); overflow: hidden; }
.tch-card__media img { width: 100%; height: 100%; object-fit: cover; transition: transform .4s; display: block; }
.tch-card:hover .tch-card__media img { transform: scale(1.05); }
.tch-card__tag { position: absolute; left: 12px; top: 12px; background: rgba(255, 255, 255, .92); color: var(--c-pink-d); font-size: .75rem; font-weight: 800; padding: .25rem .7rem; border-radius: 999px; }
.tch-card__illus { position: absolute; right: 10px; bottom: 10px; background: rgba(0, 0, 0, .55); color: #fff; font-size: .7rem; padding: .15rem .55rem; border-radius: 999px; }
.tch-card__body { padding: 1.1rem 1.2rem 1.3rem; display: flex; flex-direction: column; gap: .35rem; flex: 1; }
.tch-card__title { margin: 0 !important; font-size: 1.25rem !important; }
.tch-card__title a { color: var(--c-choc); text-decoration: none; }
.tch-card__price { margin: 0; font-weight: 900; color: var(--c-pink); font-size: 1.1rem; }
.tch-card__text { margin: 0; font-size: .93rem; opacity: .85; }
.tch-card__meta { margin: 0; font-size: .8rem; color: var(--c-pink-d); font-weight: 700; }
.tch-card__actions { display: flex; flex-wrap: wrap; gap: .5rem; margin-top: auto; padding-top: .7rem; }
.tch-card__actions .tch-btn { padding: .5rem 1.1rem; font-size: .92rem; }

/* Product details */
.tch-details__price { font-size: 1.6rem; font-weight: 900; color: var(--c-pink); margin: .3rem 0 1rem; }
.tch-details__label { font-weight: 800; margin: 1rem 0 .4rem; }
.tch-details__actions { display: flex; flex-wrap: wrap; gap: .6rem; margin-top: 1.3rem; }
.tch-chips { list-style: none; padding: 0; margin: 0; display: flex; flex-wrap: wrap; gap: .4rem; }
.tch-chips li { background: var(--c-blush); color: var(--c-pink-d); border-radius: 999px; padding: .25rem .85rem; font-weight: 700; font-size: .88rem; }

/* Tables */
.tch-table { width: 100%; border-collapse: collapse; background: #fff; border-radius: 12px; overflow: hidden; box-shadow: 0 3px 12px rgba(74, 44, 33, .06); font-size: .95rem; }
.tch-table caption { text-align: left; font-weight: 800; padding-bottom: .4rem; }
.tch-table th, .tch-table td { padding: .6rem .8rem; border-bottom: 1px solid var(--c-cream-d); text-align: left; }
.tch-table tfoot th, .tch-table tfoot td { background: var(--c-cream); }
.tch-table .num, .tch-table--prices td { text-align: right; white-space: nowrap; font-weight: 700; }

/* Price list */
.tch-pricelist { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 300px), 1fr)); gap: 1.5rem; margin-top: 1.5rem; }
.tch-pricelist__col { background: #fff; border-radius: var(--r); padding: 1.4rem 1.6rem; box-shadow: var(--sh); }
.tch-pricelist__col h3 { margin-top: 0 !important; }
.tch-pricelist ul { list-style: none; padding: 0; margin: 0; }
.tch-pricelist li { display: flex; justify-content: space-between; gap: 1rem; padding: .55rem 0; border-bottom: 1px dashed rgba(74, 44, 33, .2); }
.tch-pricelist li b { color: var(--c-pink-d); white-space: nowrap; }

/* Forms */
.tch-form { max-width: 820px; }
.tch-form--narrow { max-width: 480px; }
.tch-fieldset { border: 0; background: #fff; border-radius: var(--r); padding: 1.3rem 1.4rem; margin: 0 0 1.2rem; box-shadow: var(--sh); }
.tch-fieldset legend { font-family: var(--wp--preset--font-family--heading, Georgia, serif); font-weight: 700; font-size: 1.2rem; color: var(--c-choc); padding: 0; float: left; width: 100%; margin-bottom: .8rem; }
.tch-fieldset legend + * { clear: both; }
.tch-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 220px), 1fr)); gap: 0 1rem; }
.tch-field { margin: 0 0 .9rem; }
.tch-field label { display: block; font-weight: 700; font-size: .92rem; margin-bottom: .3rem; }
.tch-field input[type=text], .tch-field input[type=tel], .tch-field input[type=email], .tch-field input[type=number], .tch-field input[type=password], .tch-field input[type=datetime-local], .tch-field select, .tch-field textarea,
.tch-account-auth input[type=text], .tch-account-auth input[type=password] {
	width: 100%; box-sizing: border-box; padding: .7rem .85rem; border: 1.5px solid #e2cdbb; border-radius: 12px; background: #fffdf9; font: inherit; color: inherit; transition: border-color .15s, box-shadow .15s; }
.tch-field input:focus, .tch-field select:focus, .tch-field textarea:focus, .tch-account-auth input:focus { outline: none; border-color: var(--c-pink); box-shadow: 0 0 0 3px rgba(194, 24, 91, .15); }
.tch-field input[type=file] { font-size: .9rem; }
.tch-field input:disabled { opacity: .7; }
.tch-help { display: block; font-size: .8rem; opacity: .75; margin-top: .25rem; }
.req { color: var(--c-pink); }
.tch-note { font-size: .88rem; opacity: .8; }
.tch-hp { position: absolute !important; left: -9999px !important; height: 1px; overflow: hidden; }
[hidden] { display: none !important; }

.tch-choice { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 220px), 1fr)); gap: .7rem; margin-bottom: .8rem; }
.tch-choice__item { display: flex; gap: .7rem; align-items: flex-start; border: 2px solid #ecd9c8; border-radius: 14px; padding: .8rem 1rem; cursor: pointer; transition: border-color .15s, background .15s; }
.tch-choice__item:has(input:checked) { border-color: var(--c-pink); background: var(--c-blush); }
.tch-choice__item input { margin-top: .3rem; accent-color: var(--c-pink); }
.tch-choice__item span { display: flex; flex-direction: column; }
.tch-choice__item small { opacity: .75; }

.tch-item { border: 1.5px dashed #e2cdbb; border-radius: 14px; padding: .9rem 1rem .4rem; margin-bottom: .8rem; background: var(--c-cream); }
.tch-item__grid { display: grid; grid-template-columns: 2fr 1.4fr 1.2fr .9fr; gap: 0 .8rem; }
@media (max-width: 760px) { .tch-item__grid { grid-template-columns: 1fr 1fr; } .tch-field--product { grid-column: 1 / -1; } }
.tch-item__foot { display: flex; justify-content: space-between; align-items: center; min-height: 1.6rem; margin-bottom: .4rem; }
.tch-item__line { font-weight: 900; color: var(--c-pink-d); }

.tch-summary { position: sticky; bottom: 10px; z-index: 5; background: var(--c-choc); color: #fff; border-radius: var(--r); padding: 1rem 1.3rem; margin: 1rem 0; display: flex; flex-wrap: wrap; gap: .5rem 2rem; align-items: center; box-shadow: 0 12px 30px rgba(0, 0, 0, .2); }
.tch-summary div { display: flex; flex-direction: column; }
.tch-summary span { font-size: .8rem; opacity: .8; }
.tch-summary strong { font-size: 1.35rem; }
.tch-summary small { flex-basis: 100%; opacity: .75; }

/* Alerts & badges */
.tch-alert { border-radius: 12px; padding: .85rem 1.1rem; margin: 0 0 1rem; border-left: 5px solid; background: #fff; box-shadow: 0 3px 12px rgba(0, 0, 0, .05); }
.tch-alert--success { border-color: var(--c-ok); background: #eaf7ef; }
.tch-alert--error { border-color: var(--c-err); background: #fdeceb; }
.tch-alert--info { border-color: var(--c-info); background: #eaf3fa; }
.tch-badge { display: inline-block; font-size: .76rem; font-weight: 800; padding: .2rem .65rem; border-radius: 999px; background: #eee; color: #333; white-space: nowrap; }
.tch-badge--pending, .tch-badge--unpaid { background: #fff1d6; color: #7a4b00; }
.tch-badge--awaiting_verification, .tch-badge--pending_verification { background: #e3f0fb; color: #174f78; }
.tch-badge--confirmed, .tch-badge--preparing { background: #efe4ff; color: #5a2d91; }
.tch-badge--ready, .tch-badge--out_for_delivery { background: #fde4ee; color: #8e0f43; }
.tch-badge--completed, .tch-badge--verified, .tch-badge--fully_paid { background: #e2f5e9; color: #1b6b3d; }
.tch-badge--partially_paid { background: #e8f6f3; color: #15625a; }
.tch-badge--cancelled, .tch-badge--rejected { background: #fdeceb; color: #9b1c15; }
.tch-error-text { color: var(--c-err); }

/* Panels */
.tch-panel { background: #fff; border-radius: var(--r, 16px); padding: 1.3rem 1.4rem; box-shadow: var(--sh, 0 10px 30px rgba(74, 44, 33, .1)); }
.tch-panel--soft { background: var(--c-blush, #fde4ee); }
.tch-panel--center { text-align: center; }
.tch-panel--center .tch-actions { justify-content: center; }
.tch-panel h3 { margin-top: 0 !important; }
.tch-muted { opacity: .7; margin: 0; }
.tch-eyebrow { text-transform: uppercase; letter-spacing: .14em; font-size: .75rem; font-weight: 800; color: var(--c-pink); margin: 0 0 .2rem; }

/* Order view */
.tch-order__head { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: flex-end; gap: 1rem; margin-bottom: 1rem; }
.tch-order__ref { margin: 0 !important; letter-spacing: .02em; }
.tch-order__badges { display: flex; gap: .4rem; flex-wrap: wrap; }
.tch-order__grid { display: grid; grid-template-columns: 1.2fr 1fr; gap: 1.4rem; align-items: start; }
@media (max-width: 880px) { .tch-order__grid { grid-template-columns: 1fr; } }
.tch-steps { list-style: none; padding: 0; margin: 0 0 1.5rem; display: grid; grid-template-columns: repeat(6, 1fr); gap: .3rem; counter-reset: s; }
.tch-steps li { counter-increment: s; text-align: center; font-size: .75rem; font-weight: 700; opacity: .55; position: relative; padding-top: 2.2rem; }
.tch-steps li::before { content: counter(s); position: absolute; top: 0; left: 50%; transform: translateX(-50%); width: 1.8rem; height: 1.8rem; border-radius: 50%; background: var(--c-cream-d); display: grid; place-items: center; }
.tch-steps li.is-done, .tch-steps li.is-current { opacity: 1; }
.tch-steps li.is-done::before { content: "✓"; background: var(--c-ok); color: #fff; }
.tch-steps li.is-current::before { background: var(--c-pink); color: #fff; box-shadow: 0 0 0 5px rgba(194, 24, 91, .18); }
@media (max-width: 600px) { .tch-steps { grid-template-columns: repeat(3, 1fr); row-gap: .8rem; } }
.tch-dl { display: grid; grid-template-columns: auto 1fr; gap: .3rem 1rem; margin-top: 1rem; font-size: .93rem; }
.tch-dl dt { font-weight: 800; }
.tch-dl dd { margin: 0; }
.tch-paybox { background: var(--c-blush); border-radius: 14px; padding: 1rem 1.2rem; margin-bottom: 1rem; }
.tch-paybox__label { margin: 0; font-weight: 700; font-size: .85rem; }
.tch-paybox__amount { margin: 0 0 .5rem; font-size: 2rem; font-weight: 900; color: var(--c-pink-d); }
.tch-form--compact .tch-field { margin-bottom: .7rem; }
.tch-list { list-style: none; padding: 0; }
.tch-list li { padding: .5rem 0; border-bottom: 1px solid var(--c-cream-d); }
.tch-timeline { list-style: none; padding: 0 0 0 1rem; border-left: 3px solid var(--c-blush); font-size: .9rem; }
.tch-timeline li { margin-bottom: .6rem; position: relative; }
.tch-timeline li::before { content: ""; position: absolute; left: -1.45rem; top: .45rem; width: .7rem; height: .7rem; border-radius: 50%; background: var(--c-pink); }
.tch-timeline__date { display: block; font-size: .78rem; opacity: .7; }

/* My orders / account */
.tch-myorders__head { display: flex; justify-content: space-between; align-items: center; gap: 1rem; flex-wrap: wrap; }
.tch-ordercards { display: grid; gap: .9rem; margin-bottom: 1.2rem; }
.tch-ordercard { display: grid; grid-template-columns: 1fr auto; grid-template-areas: "ref badges" "date badges" "money badges"; gap: .2rem 1rem; align-items: center; background: #fff; border-radius: 14px; padding: 1rem 1.2rem; box-shadow: var(--sh); color: inherit !important; text-decoration: none !important; border-left: 5px solid var(--c-pink); transition: transform .15s; }
.tch-ordercard:hover { transform: translateX(4px); }
.tch-ordercard__ref { grid-area: ref; font-weight: 900; font-size: 1.1rem; }
.tch-ordercard__date { grid-area: date; }
.tch-ordercard__money { grid-area: money; }
.tch-ordercard__badges { grid-area: badges; display: flex; flex-direction: column; gap: .3rem; align-items: flex-end; }
.tch-ordercard__date, .tch-ordercard__money { font-size: .88rem; opacity: .85; }
@media (max-width: 560px) { .tch-ordercard { grid-template-columns: 1fr; grid-template-areas: "ref" "badges" "date" "money"; } .tch-ordercard__badges { flex-direction: row; align-items: flex-start; } }
.tch-pager { display: flex; gap: 1rem; align-items: center; justify-content: center; margin: 1rem 0; }
.tch-account__summary { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 1rem; margin-bottom: 1.4rem; }
.tch-account__grid, .tch-account-auth { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 320px), 1fr)); gap: 1.4rem; }
.tch-account-auth form p { margin: 0 0 .8rem; }
.tch-account-auth label { display: block; font-weight: 700; margin-bottom: .3rem; }
.tch-account-auth .login-remember label { display: inline; font-weight: 400; }
.tch-account-auth input[type=submit] { background: var(--c-pink); color: #fff; border: 0; border-radius: 999px; padding: .7rem 1.6rem; font-weight: 800; cursor: pointer; font: inherit; font-weight: 800; }
.tch-account-auth input[type=submit]:hover { background: var(--c-pink-d); }
.tch-link { font-weight: 700; }
