/*
Theme Name: Customgifts
Template: erp-theme
Description: customgifts.gr — child of ERP Theme. Brand, customgifts-only pages and the look the store had on its own theme.
Author: Konstantinos Droulias
Version: 1.0.0
Requires Base: 1.2.13
Text Domain: customgifts
*/

/* Manrope (self-hosted; same files and ranges as the old customgifts theme). */
@font-face { font-family: "Manrope"; font-style: normal; font-weight: 400 800; font-display: swap; src: url(assets/fonts/manrope-greek.woff2) format("woff2"); unicode-range: U+0370-0377, U+037A-037F, U+0384-038A, U+038C, U+038E-03A1, U+03A3-03FF; }
@font-face { font-family: "Manrope"; font-style: normal; font-weight: 400 800; font-display: swap; src: url(assets/fonts/manrope-latin-ext.woff2) format("woff2"); unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: "Manrope"; font-style: normal; font-weight: 400 800; font-display: swap; src: url(assets/fonts/manrope-latin.woff2) format("woff2"); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }

/* Old names, for anything that still reads them (legacy pages, plugin CSS written for customgifts). */
:root {
	--cg-red: var(--erp-primary); --cg-red-600: var(--erp-primary-600); --cg-red-700: var(--erp-primary-700);
	--cg-red-50: var(--erp-primary-50); --cg-red-100: var(--erp-primary-100); --cg-red-200: var(--erp-primary-200);
	--cg-ink: var(--erp-ink); --cg-text: var(--erp-text); --cg-muted: var(--erp-muted); --cg-subtle: var(--erp-subtle);
	--cg-line: var(--erp-line); --cg-line-strong: var(--erp-line-strong); --cg-soft: var(--erp-soft); --cg-bg: var(--erp-bg); --cg-dark: var(--erp-dark);
	--cg-green: var(--erp-green); --cg-green-50: var(--erp-green-50); --cg-blue: var(--erp-blue); --cg-blue-50: var(--erp-blue-50);
	--cg-amber: var(--erp-amber); --cg-amber-50: var(--erp-amber-50); --cg-star: var(--erp-star);
	--cg-font: var(--erp-font);
	--cg-fs-xs: var(--erp-fs-xs); --cg-fs-sm: var(--erp-fs-sm); --cg-fs-base: var(--erp-fs-base); --cg-fs-md: var(--erp-fs-md);
	--cg-fs-lg: var(--erp-fs-lg); --cg-fs-xl: var(--erp-fs-xl); --cg-fs-2xl: var(--erp-fs-2xl); --cg-fs-3xl: var(--erp-fs-3xl);
	--cg-r-sm: var(--erp-r-sm); --cg-r: var(--erp-r); --cg-r-lg: var(--erp-r-lg); --cg-r-xl: var(--erp-r-xl); --cg-r-pill: var(--erp-r-pill);
	--cg-shadow-sm: var(--erp-shadow-sm); --cg-shadow: var(--erp-shadow); --cg-shadow-lg: var(--erp-shadow-lg);
	--cg-container: var(--erp-container); --cg-gutter: var(--erp-gutter); --cg-header-h: var(--erp-header-h);
}

/* ==========================================================================
   Restores: where ERP Theme moved on from the customgifts look, customgifts keeps its own.
   ========================================================================== */

/* ---------- Product page (ERP Commerce restyled these for other stores) ---------- */
.cg-product__title { font-size: clamp(1.5rem, 1.1rem + 1.4vw, 2.1rem); font-weight: 800; line-height: 1.15; letter-spacing: -.02em; }

/* Print-design choice: two cards side by side, not tabs. */
.cg-alt-switch { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 10px; margin-bottom: 14px; border-bottom: 0; }
.cg-alt { position: static; flex: initial; min-width: auto; gap: 12px; padding: 14px 16px; margin-bottom: 0; border: 1.5px solid var(--erp-line); border-radius: var(--erp-r); background: transparent; }
.cg-alt__radio { width: 20px; height: 20px; }
.cg-alt__radio::after { width: 10px; height: 10px; }
.cg-alt__text strong { color: var(--erp-ink); }
.cg-alt:has(input:checked) { border: 1.5px solid var(--erp-primary); background: var(--erp-primary-50); }
.cg-alt-panel { padding-top: 0; }
@media (max-width: 520px) { .cg-alt { padding: 14px 16px; } .cg-alt__radio { display: grid; } }

/* Add to cart greyed while something is still missing (hover lists it, click highlights it). */
.cg-sumbar__cta.is-blocked, .cg-sumbar__cta.is-blocked:hover { background: #b9bcc2; border-color: #b9bcc2; color: #fff; box-shadow: none; cursor: not-allowed; }

/* Summary bar colours of the old theme. */
:root { --cg-sumbar-bg: linear-gradient(180deg, #fff6f6, #fdeeee); }

/* ---------- Main menu: one row, the old spacing (ERP Theme wraps it and tightens the padding) ---------- */
.cg-menu { flex: 0 1 auto; min-width: auto; flex-wrap: nowrap; row-gap: normal; gap: var(--erp-space-1); }
.cg-menu > li > a { min-height: 0; padding: 0 18px; gap: var(--erp-space-2); }
.cg-menu > li.menu-item-has-children > a::after { width: 14px; height: 14px; }
@media (max-width: 1440px) { .cg-menu > li > a { padding: 0 18px; } }
@media (max-width: 1200px) { .cg-menu > li > a { padding: 0 18px; font-size: inherit; } .cg-allcats > button { padding-right: 28px; } }

/* ---------- Product cards: bold 2-line titles, both lines fade when cut ---------- */
.cg-pcard__title { font-size: var(--erp-fs-md); font-weight: 700; letter-spacing: -.01em; line-height: 1.3; max-height: calc(2 * 1.3em); }
.cg-pcard__title.is-clipped {
	--cgc-fade: linear-gradient(#000, #000) top / 100% calc(100% - 2.6em) no-repeat,
		linear-gradient(to right, #000 55%, rgba(0, 0, 0, .55)) 0 calc(100% - 1.3em) / 100% 1.3em no-repeat,
		linear-gradient(to right, rgba(0, 0, 0, .55), rgba(0, 0, 0, .25) 45%, transparent 85%) bottom / 100% 1.3em no-repeat;
	-webkit-mask: var(--cgc-fade); mask: var(--cgc-fade);
}
@media (max-width: 640px) { .cg-pcard__title { font-size: var(--erp-fs-base); } }

/* ---------- Filters ---------- */
.cg-fcheck__count { color: var(--erp-subtle); }

/* ---------- Page hero: the old pink gradient ---------- */
.cg-pagehero { background: linear-gradient(100deg, #fff6f6 0%, #fdeeee 55%, #fbe3e3 100%); }
.cg-pagehero__media::before { background: linear-gradient(90deg, #fdeeee 0%, rgba(253, 238, 238, 0) 30%); }
@media (max-width: 1024px) { .cg-pagehero__media::before { background: linear-gradient(0deg, #fdeeee 0%, rgba(253, 238, 238, 0) 40%); } }

/* ---------- Footer (customgifts footer.php; ERP Theme restyled the shared footer) ---------- */
.cg-footer { line-height: inherit; }
.cg-footer a { color: #c9ccd1; text-decoration: none; }
.cg-footer a:hover { color: #fff; text-decoration: none; }
.cg-footer__top { grid-template-columns: 1.4fr repeat(3, 1fr) 1.2fr; }
.cg-footer h4 { margin: 0 0 14px; font-weight: 800; letter-spacing: -.02em; line-height: 1.15; }
.cg-footer .cg-logo img { max-height: none; }
.cg-footer__about, .cg-footer .cg-footer__about { margin: 14px 0 0; max-width: 34ch; color: inherit; }
.cg-footer__contact li { overflow-wrap: normal; }
.cg-footer__contact .cg-icon { margin-top: 1px; }
.cg-social { flex-wrap: nowrap; }
.cg-social a { width: 36px; height: 36px; background: rgba(255, 255, 255, .08); }
.cg-footer__bottom { border-top-color: rgba(255, 255, 255, .1); gap: 14px; }
@media (max-width: 1280px) { .cg-footer__top { grid-template-columns: 1fr 1fr 1fr; } }
@media (max-width: 1024px) { .cg-footer__top { grid-template-columns: 1fr 1fr 1fr; } .cg-footer__brand { grid-column: auto; } }
@media (max-width: 640px) {
	.cg-footer__top { grid-template-columns: 1fr 1fr; gap: var(--erp-space-8); padding-block: var(--erp-space-12) var(--erp-space-8); }
	.cg-footer__brand { grid-column: 1 / -1; }
	.cg-footer__bottom { flex-direction: row; align-items: center; }
}

/* ---------- Top bar: all three left items stay up to tablet size ---------- */
@media (min-width: 1025px) and (max-width: 1480px) { .cg-topbar__list--left li:nth-child(2), .cg-topbar__list--left li:nth-child(3) { display: flex; } }

/* Summary bar: always visible, pinned to the bottom of the screen — no hiding, no parking above the footer
   (the footer is taller than a phone screen, so a parked bar would scroll away). The page keeps bar-height space
   at the end so the footer's last lines are never covered. */
.cg-sumbar.is-hidden, .cg-sumbar.is-off { transform: none; display: block; }
.cg-sumbar, .cg-sumbar.is-docked { bottom: 0 !important; box-shadow: var(--cg-sumbar-shadow, 0 -8px 24px rgba(17, 20, 24, .08)); }
.single-product footer.cg-footer { margin-top: 0 !important; }
/* The bar lives in the «Επιλογές & Προσθήκη» tab: when another tab is open, that tab shows only the bar. */
.single-product #tab-options[hidden] { display: block !important; height: 0; margin: 0; padding: 0; overflow: visible; }
.single-product #tab-options[hidden] > :not(.cg-config),
.single-product #tab-options[hidden] .cg-config > :not(.cg-sumbar) { display: none !important; }

/* Availability colours of the old plugin (ERP Commerce darkened them; they are inline styles). */
.cg-avail--green .cg-avail__dot { background: #16a34a !important; } .cg-avail--green strong { color: #16a34a !important; }
.cg-avail--orange .cg-avail__dot { background: #ea8a0c !important; } .cg-avail--orange strong { color: #ea8a0c !important; }
.cg-avail--red .cg-avail__dot { background: #dc2626 !important; } .cg-avail--red strong { color: #dc2626 !important; }

/* Room above the price table for the guide kid who sits on it; cookie-settings bubble hidden during the tour. */
@media (min-width: 701px) { .single-product .cg-product__summary .cg-pt-box { margin-top: 3.25rem; } }
@media (max-width: 700px) { .single-product .cg-product__summary .cg-pt-box { margin-top: 2.5rem; } }
/* «Δείγματα δουλειάς» link (inc/portfolio.php): the room the helper kid needs moves above the link, so the link sits right on the price table */
@media (min-width: 701px) { .single-product .cg-product__facts:has(.cg-pf-fact) + .cg-pt-box { margin-top: -10px; } .single-product .cg-pf-fact { margin-top: 2.75rem; } }
@media (max-width: 700px) { .single-product .cg-product__facts:has(.cg-pf-fact) + .cg-pt-box { margin-top: -10px; } .single-product .cg-pf-fact { margin-top: 2rem; } }
body:has(.cgg-spot:not([hidden])) .cky-btn-revisit-wrapper { display: none !important; }

/* Short pages (empty cart, thank-you …): the content stretches so the footer always reaches the bottom of the screen. */
body:not(.wp-admin) { display: flex; flex-direction: column; min-height: 100vh; min-height: 100dvh; }
body:not(.wp-admin) > .cg-main { flex: 1 0 auto; }
body:not(.wp-admin) > * { flex-shrink: 0; }

/* Accessibility button (left): sits above the cookie-settings button (CookieYes, bottom-left 15px + 45px). */
:root { --erp-a11y-bottom: 4.5rem; }
