/* CloudPastry — unified modern header for Odoo pages (matches static homepage) */
@import url('https://fonts.googleapis.com/css2?family=Manrope:wght@400;500;600;700;800&family=Cairo:wght@400;600;700;800&display=swap');
:root{
  --cpm-red:#C8102E; --cpm-red-bright:#E11D2E; --cpm-ink:#0E1420;
  --cpm-txt:#EAEEF6; --cpm-muted:#9BA8BE; --cpm-line:rgba(255,255,255,.10);
  --cpm-container:1180px; --cpm-font:'Manrope','Segoe UI',system-ui,sans-serif;
  --cpm-font-ar:'Cairo','Tajawal',sans-serif;
}
/* hide EVERY native Odoo / theme_prime header (our injected .cpm-header lives outside #wrapwrap) */
#wrapwrap > header, #wrapwrap > .o_header_standard, header#top, .o_header_standard, .o_top_menu, #oe_main_menu_navbar, .o_main_navbar, .o_header_affixed { display:none !important; }
/* push page content below the fixed modern header */
#wrapwrap{ padding-top:90px; }
@media(max-width:991px){ #wrapwrap{ padding-top:70px; } }

.cpm-header{position:fixed !important;inset:0 0 auto 0 !important;z-index:2000 !important;background:rgba(14,20,32,.97) !important;height:auto !important;transform:none !important;
  -webkit-backdrop-filter:blur(14px);backdrop-filter:blur(14px);border-bottom:1px solid var(--cpm-line);font-family:var(--cpm-font)}
.cpm-inner{display:flex !important;align-items:center;gap:1.4rem;max-width:var(--cpm-container);margin-inline:auto !important;padding:.55rem 1.4rem !important;height:auto !important}
.cpm-brand{display:flex;align-items:center;flex:0 0 auto}
.cpm-brand img{height:50px !important;width:auto;display:block;max-width:none !important}
.cpm-nav{display:flex;gap:1.5rem;font-size:.92rem;font-weight:600;color:var(--cpm-muted);list-style:none;margin:0 auto 0 0;padding:0;margin-inline-start:auto}
.cpm-nav a{color:var(--cpm-muted);text-decoration:none;transition:color .2s}
.cpm-nav a:hover{color:#fff}
.cpm-actions{display:flex;align-items:center;gap:1rem;flex:0 0 auto}
.cpm-lang{display:flex;align-items:center;gap:.3rem;font-weight:700;font-size:.9rem;color:var(--cpm-muted)}
.cpm-lang button{background:none;border:none;color:var(--cpm-muted);cursor:pointer;font:inherit;padding:.2rem .3rem}
.cpm-lang button.active{color:#fff}
.cpm-lang .sep{opacity:.4}
.cpm-signin{color:#fff;text-decoration:none;font-weight:600;font-size:.9rem;white-space:nowrap}
.cpm-signin:hover{color:var(--cpm-red)}
.cpm-cart{color:#fff;text-decoration:none;font-weight:700;font-size:.9rem;white-space:nowrap;display:inline-flex;align-items:center;gap:.3rem}
.cpm-cart .cnt{background:var(--cpm-red);color:#fff;border-radius:999px;padding:0 .45rem;font-size:.72rem;line-height:1.4}
.cpm-cta{display:inline-flex;align-items:center;background:var(--cpm-red);color:#fff;text-decoration:none;font-weight:700;
  font-size:.9rem;padding:.58rem 1.2rem;border-radius:999px;box-shadow:0 10px 28px -8px rgba(200,16,46,.7);white-space:nowrap;transition:background .2s,transform .2s}
.cpm-cta:hover{background:var(--cpm-red-bright);transform:translateY(-2px);color:#fff}
.cpm-toggle{display:none;flex-direction:column;gap:5px;background:none;border:none;cursor:pointer;padding:.4rem}
.cpm-toggle span{width:24px;height:2px;background:#fff;border-radius:2px}
html[dir='rtl'] .cpm-nav, html[lang^='ar'] .cpm-nav{font-family:var(--cpm-font-ar)}
.cpm-mobile{position:fixed;inset:0;z-index:1001;background:rgba(10,15,25,.98);-webkit-backdrop-filter:blur(8px);backdrop-filter:blur(8px);
  display:flex;flex-direction:column;justify-content:center;align-items:center;gap:1.4rem;transform:translateY(-100%);
  transition:transform .4s cubic-bezier(.16,1,.3,1);visibility:hidden;font-family:var(--cpm-font)}
.cpm-mobile.open{transform:translateY(0);visibility:visible}
.cpm-mobile a{color:#fff;text-decoration:none;font-size:1.3rem;font-weight:700}
.cpm-mobile .cpm-close{position:absolute;top:1rem;inset-inline-end:1.2rem;font-size:2rem;color:#fff;background:none;border:none;cursor:pointer}
@media(max-width:991px){
  .cpm-nav,.cpm-cta,.cpm-signin{display:none}
  .cpm-toggle{display:flex}
  .cpm-brand img{height:44px}
}

/* ===== Phase 2: dark modern CONTENT pages (scoped via html.cpm-content; never the shop) ===== */
html.cpm-content, html.cpm-content body, html.cpm-content #wrapwrap{ background:var(--cpm-ink) !important; }
html.cpm-content #wrapwrap{ color:var(--cpm-txt); }
html.cpm-content #wrap{ font-family:var(--cpm-font); padding-bottom:3rem; }
html.cpm-content #wrap .container, html.cpm-content #wrap .container-fluid{ max-width:920px; }
html.cpm-content #wrap section, html.cpm-content #wrap .o_colored_level{ background:transparent !important; }
html.cpm-content #wrap h1, html.cpm-content #wrap h2, html.cpm-content #wrap h3, html.cpm-content #wrap h4{
  color:#fff !important; font-weight:800; letter-spacing:-.01em; margin-top:2.1rem; margin-bottom:.6rem; line-height:1.25; }
html.cpm-content #wrap h1{ font-size:clamp(2rem,1.4rem+3vw,3rem); }
html.cpm-content #wrap h2{ font-size:clamp(1.5rem,1.1rem+1.8vw,2.1rem); }
html.cpm-content #wrap h2::after{ content:''; display:block; width:54px; height:4px; border-radius:3px;
  background:linear-gradient(90deg,var(--cpm-red),var(--cpm-red-bright)); margin-top:.7rem; }
html.cpm-content #wrap p, html.cpm-content #wrap li, html.cpm-content #wrap span:not(.cnt){
  color:var(--cpm-muted) !important; font-size:1.06rem; line-height:1.95; }
html.cpm-content #wrap strong, html.cpm-content #wrap b{ color:#fff !important; }
html.cpm-content #wrap a:not(.cpm-cta):not(.cpm-signin):not(.cpm-cart):not(.cpm-brand){ color:var(--cpm-red-soft) !important; }
html.cpm-content #wrap ul{ list-style:none; padding-inline-start:0; margin-top:1rem; }
html.cpm-content #wrap ul li{ position:relative; padding-inline-start:1.5rem; margin-bottom:.7rem; }
html.cpm-content #wrap ul li::before{ content:''; position:absolute; inset-inline-start:0; top:.72em;
  width:9px; height:9px; border-radius:50%; background:var(--cpm-red); box-shadow:0 0 12px -1px rgba(200,16,46,.8); }
/* RTL Arabic typography */
html.cpm-content[dir='rtl'] #wrap, html.cpm-content[lang^='ar'] #wrap{ font-family:var(--cpm-font-ar); }
/* hero feel for the first heading */
html.cpm-content #wrap section:first-of-type{ padding-top:2.5rem !important; }
/* footer on dark */
html.cpm-content #wrapwrap footer, html.cpm-content #wrapwrap .o_footer{ background:#0b111c !important; border-top:1px solid var(--cpm-line); }
html.cpm-content #wrapwrap footer, html.cpm-content #wrapwrap footer *{ color:var(--cpm-muted) !important; }

/* Phase 2b: stronger modern headings on content pages */
html.cpm-content #wrap h1, html.cpm-content #wrap h2, html.cpm-content #wrap h3,
html.cpm-content #wrap h4, html.cpm-content #wrap h5{
  color:#fff !important; font-weight:800 !important; letter-spacing:-.01em; line-height:1.25 !important;
  margin-top:2.2rem !important; margin-bottom:.7rem !important; }
html.cpm-content #wrap h1{ font-size:clamp(2.1rem,1.4rem+3vw,3rem) !important; }
html.cpm-content #wrap h2, html.cpm-content #wrap h3{ font-size:clamp(1.5rem,1.1rem+1.9vw,2.15rem) !important; }
html.cpm-content #wrap h4, html.cpm-content #wrap h5{ font-size:clamp(1.3rem,1rem+1.3vw,1.7rem) !important; }
html.cpm-content #wrap h1::after, html.cpm-content #wrap h2::after,
html.cpm-content #wrap h3::after, html.cpm-content #wrap h4::after{
  content:''; display:block; width:54px; height:4px; border-radius:3px;
  background:linear-gradient(90deg,var(--cpm-red),var(--cpm-red-bright)); margin-top:.7rem;
  box-shadow:0 0 16px -2px rgba(200,16,46,.7); }
html.cpm-content[dir='rtl'] #wrap h1::after, html.cpm-content[dir='rtl'] #wrap h2::after,
html.cpm-content[dir='rtl'] #wrap h3::after, html.cpm-content[dir='rtl'] #wrap h4::after{ margin-inline-start:0; }

/* ---- Portal (/my account) brand polish + logout button ---- */
.cpm-logout{opacity:.85}
.cpm-logout:hover{color:var(--cpm-red)}
/* hide the empty grey breadcrumb band under the header on portal pages */
.o_portal_wrap > .o_portal_navbar, .o_portal_wrap ol.breadcrumb, .o_portal nav[aria-label="breadcrumb"], #wrap > .container > ol.breadcrumb{display:none !important}
.o_portal_wrap, .o_portal_my_home, .o_portal_my_details{background:#f5f6f8}
.o_portal_wrap h3, .o_portal_my_home h3, .o_portal_docs h2, .o_portal_docs h3{color:#0E1420;font-weight:800}
/* document count cards */
.o_portal_my_home .card, .o_portal_docs .card{border:1px solid #e2e5ea !important;border-radius:14px !important;box-shadow:0 6px 18px rgba(14,20,32,.06);transition:transform .2s,box-shadow .2s}
.o_portal_my_home .card:hover, .o_portal_docs .card:hover{transform:translateY(-3px);box-shadow:0 14px 30px rgba(14,20,32,.12)}
/* primary buttons -> brand red pill */
.o_portal_wrap .btn-primary, .o_portal .btn-primary{background:var(--cpm-red) !important;border-color:var(--cpm-red) !important;border-radius:999px !important;font-weight:700}
.o_portal_wrap .btn-primary:hover{background:var(--cpm-red-bright) !important;border-color:var(--cpm-red-bright) !important}
/* links inside portal -> brand red */
.o_portal_wrap a:not(.btn):not(.cpm-cta):not(.cpm-signin):not(.cpm-cart):not(.cpm-brand){color:var(--cpm-red)}
/* unify portal background so there is no grey seam under the fixed header */
html.cpm-portal, html.cpm-portal body, html.cpm-portal #wrapwrap, html.cpm-portal main, html.cpm-portal .o_portal_wrap{background:#f3f5f8 !important}
html.cpm-portal #wrapwrap{padding-top:90px}
