:root{
  --blue:#0a16ff;
  --blue-600:#0712d6;
  --blue-800:#080c7a;
  --deep:#050837;
  --violet:#6e68ff;
  --ink:#0f1630;
  --muted:#66708a;
  --line:#e6e9f2;
  --soft:#f5f7fb;
  --soft-blue:#eef0ff;
  --white:#fff;
  --success:#117a55;
  --warning:#a76400;
  --danger:#bd2b2b;
  --radius:22px;
  --radius-sm:14px;
  --shadow:0 22px 60px rgba(15,22,48,.12);
  --shadow-sm:0 10px 28px rgba(15,22,48,.08);
  --max:1240px;
  --header-h:72px;
  --header-control:#131642;
}

*,*::before,*::after{box-sizing:border-box}
html{scroll-behavior:smooth}
body{margin:0;min-width:320px;font-family:Inter,ui-sans-serif,system-ui,-apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif;color:var(--ink);background:#fff;line-height:1.5}
body.no-scroll{overflow:hidden}
a{color:inherit;text-decoration:none}
button,input,select{font:inherit}
button{cursor:pointer}
img,svg{display:block;max-width:100%}
.container{width:min(calc(100% - 32px),var(--max));margin:auto}

.skip-link{position:fixed;left:16px;top:-80px;z-index:9999;background:#fff;color:var(--ink);padding:10px 14px;border-radius:10px;box-shadow:var(--shadow)}
.skip-link:focus{top:16px}

/* Header V3.7 preservado como shell visual; dados passam a ser WooCommerce. */
.site-header{position:sticky;top:0;z-index:50;background:rgba(255,255,255,.96);backdrop-filter:blur(14px);border-bottom:1px solid rgba(230,233,242,.9)}
.v3-header{background:rgba(5,8,55,.985);border-bottom:1px solid rgba(255,255,255,.08);box-shadow:0 10px 30px rgba(5,8,55,.12);backdrop-filter:blur(14px)}
.header-main{height:var(--header-h);display:grid;grid-template-columns:220px minmax(260px,1fr) auto;align-items:center;gap:24px}
.v3-header .header-main{color:#fff}
.brand{display:inline-flex;align-items:center}
.brand img{width:205px;height:auto}
.header-actions{display:flex;align-items:center;gap:8px}

.icon-btn{display:inline-flex;align-items:center;justify-content:center;gap:8px;min-height:44px;border:1px solid var(--line);background:#fff;color:var(--ink);border-radius:13px;padding:0 13px}
.icon-btn svg{width:21px;height:21px}
.v3-header .icon-btn{background:var(--header-control);border-color:rgba(255,255,255,.16);color:#fff}
.v3-header .icon-btn:hover{background:#1a1e55;border-color:rgba(255,255,255,.28)}

.cart-count{min-width:20px;height:20px;display:grid;place-items:center;padding:0 5px;background:var(--blue);color:#fff;border-radius:999px;font-size:.72rem;font-weight:800;line-height:1}
.cart-count.is-empty{display:none}

.search-shell{position:relative}
.search-form{height:46px;display:flex;align-items:center;background:var(--soft);border:1px solid transparent;border-radius:14px;overflow:hidden}
.search-form:focus-within{border-color:#bfc3ff;box-shadow:0 0 0 4px rgba(10,22,255,.08)}
.search-form svg{margin-left:14px;width:19px;color:#687087;flex:0 0 auto}
.search-form input{width:100%;border:0;outline:0;background:transparent;padding:0 12px;font-size:.94rem;color:var(--ink)}
.v3-header .search-form{background:#fff;border-color:rgba(255,255,255,.10)}
.v3-header .search-form button{height:100%;background:var(--header-control);color:#fff;border:1px solid rgba(255,255,255,.16);border-radius:0 13px 13px 0;padding:0 18px;font-weight:800;transition:background .2s ease,border-color .2s ease}
.v3-header .search-form button:hover{background:#1a1e55;border-color:rgba(255,255,255,.28)}
.v3-header .search-form button:focus-visible{outline:3px solid rgba(110,104,255,.42);outline-offset:-3px}

.mobile-search{display:none}
.category-nav{background:#fff;border-top:1px solid rgba(230,233,242,.9);color:var(--ink)}
.category-nav .category-nav-inner{display:flex;align-items:center;justify-content:space-between;gap:8px;min-height:46px;overflow:visible}
.category-nav-primary,.category-nav-secondary{display:flex;align-items:center;gap:4px;min-width:0}
.category-nav-primary{flex:1}
.category-nav-secondary{flex:0 0 auto}
.category-nav-divider{width:1px;height:24px;margin:0 4px;background:var(--line)}
.nav-link{display:inline-flex;align-items:center;gap:8px;padding:10px 12px;font-size:.86rem;font-weight:700;color:#394158;border-radius:10px;transition:background .18s ease,color .18s ease}
.nav-link:hover,.nav-link.is-active{background:var(--soft-blue);color:var(--blue)}
.nav-link.sale{color:#c33434}
.nav-link.sale.is-active{background:#fff1f1;color:#b62222}
.category-quick-icon{display:none;flex:0 0 auto;color:var(--blue)}
.category-quick-icon svg{width:28px;height:28px}
.category-quick-label{line-height:1.2}
.menu-trigger{display:none}

/* Menu mobile complementar — ETAPA 3.9. */
.drawer-backdrop{position:fixed;inset:0;background:rgba(3,5,25,.48);backdrop-filter:blur(2px);z-index:100;opacity:0;pointer-events:none;transition:opacity .2s ease}
.drawer-backdrop.is-open{opacity:1;pointer-events:auto}
.drawer{position:fixed;top:0;bottom:0;right:0;width:min(420px,92vw);background:#fff;z-index:110;transform:translateX(105%);transition:transform .28s ease;display:flex;flex-direction:column;box-shadow:-20px 0 70px rgba(3,5,25,.16)}
.drawer.left{right:auto;left:0;transform:translateX(-105%)}
.drawer.is-open{transform:none}
.drawer-head{display:flex;align-items:center;justify-content:space-between;padding:20px 22px;border-bottom:1px solid var(--line)}
.drawer-head strong{font-size:1.2rem;letter-spacing:-.02em}
.drawer-close{width:42px;height:42px;border:1px solid var(--line);background:#fff;border-radius:12px;font-size:1.5rem;line-height:1;color:var(--ink)}
.drawer-close:hover,.drawer-close:focus-visible{background:var(--soft-blue);border-color:#c8cdf8;outline:0}
.drawer-body{flex:1;overflow:auto;padding:14px 18px 28px}
.crazy-drawer-nav{display:grid;gap:4px}
.drawer-section{border-bottom:1px solid var(--line);padding:4px 0}
.drawer-main-link,.drawer-accordion-toggle{width:100%;min-height:54px;display:grid;grid-template-columns:34px 1fr 20px;align-items:center;gap:10px;padding:10px 8px;border:0;border-radius:12px;background:transparent;color:var(--ink);font-weight:750;text-align:left}
.drawer-main-link{grid-template-columns:34px 1fr}
.drawer-main-link:hover,.drawer-main-link.is-active,.drawer-accordion-toggle:hover{background:var(--soft-blue);color:var(--blue)}
.drawer-main-link:focus-visible,.drawer-accordion-toggle:focus-visible,.drawer-category-link:focus-visible,.drawer-accordion-panel>a:focus-visible{outline:3px solid rgba(10,22,255,.18);outline-offset:1px}
.drawer-link-icon{display:grid;place-items:center;width:30px;height:30px;color:var(--blue)}
.drawer-link-icon svg{width:25px;height:25px}
.drawer-chevron{width:18px;height:18px;transition:transform .2s ease}
.drawer-accordion-toggle[aria-expanded="true"] .drawer-chevron{transform:rotate(180deg)}
.drawer-accordion-panel{display:grid;gap:2px;padding:3px 0 8px 42px}
.drawer-accordion-panel[hidden]{display:none}
.drawer-category-link,.drawer-accordion-panel>a{min-height:46px;display:grid;grid-template-columns:30px 1fr;align-items:center;gap:10px;padding:8px 10px;border-radius:10px;color:#394158;font-weight:650}
.drawer-accordion-panel>a{grid-template-columns:1fr}
.drawer-category-link:hover,.drawer-category-link.is-active,.drawer-accordion-panel>a:hover{background:#f7f8ff;color:var(--blue)}
.drawer-all-categories{color:var(--blue);font-weight:800}

/* Rodapé migrado da Home V3.7. */
.site-footer{background:#040625;color:#fff;padding:58px 0 24px}
.footer-grid{display:grid;grid-template-columns:1.4fr 1fr 1fr 1fr;gap:34px}
.footer-logo{width:190px;height:auto;margin-bottom:16px}
.site-footer p,.site-footer a{color:#9ea4b6;font-size:.84rem}
.site-footer p{margin:8px 0}
.site-footer a{display:block;margin:8px 0}
.site-footer a:hover{color:#fff}
.footer-title{font-size:.82rem;font-weight:900;text-transform:uppercase;letter-spacing:.08em;margin-bottom:12px}
.footer-bottom{display:flex;align-items:center;justify-content:space-between;gap:20px;border-top:1px solid rgba(255,255,255,.09);margin-top:38px;padding-top:22px;color:#777f96;font-size:.75rem}

/* Apenas para o fallback enquanto front-page/shop/PDP ainda serão migrados. */
.crazy-fallback{padding:56px 0 80px;min-height:50vh}
.crazy-fallback h1{font-size:clamp(2rem,5vw,3.6rem);line-height:1.05;letter-spacing:-.04em}
.crazy-empty-state{padding:60px 0;text-align:center}

@media(max-width:1024px){
  .header-main{grid-template-columns:175px minmax(220px,1fr) auto;gap:14px}
  .brand img{width:165px}
  .account-label{display:none}
  .footer-grid{grid-template-columns:1.2fr 1fr 1fr}
  .footer-grid>div:last-child{grid-column:2/4}
}

@media(max-width:760px){
  :root{--header-h:62px}
  .container{width:min(calc(100% - 24px),var(--max))}
  .header-main{height:62px;grid-template-columns:44px 1fr auto;gap:9px}
  .menu-trigger{display:grid}
  .brand{justify-self:center;max-width:100%}
  .v3-header .brand img{width:clamp(174px,52vw,190px);max-width:100%}
  .desktop-search{display:none}
  .header-actions .account-btn{display:none}
  .icon-btn{width:44px;height:44px;min-height:44px;padding:0}
  .icon-btn .cart-label{display:none}
  .crazy-cart-link{position:relative;overflow:visible}
  .crazy-cart-link .cart-count{position:absolute;z-index:1;top:-5px;right:-5px;min-width:22px;height:22px;padding:0 5px;border:2px solid var(--deep)}
  .mobile-search{display:block;padding:8px 0 10px;background:transparent}
  .mobile-search .search-form{height:44px}
  .mobile-search .search-form button{display:none}
  .category-nav{overflow:hidden;padding:10px 0;background:#fff}
  .category-nav .category-nav-inner{width:100%;min-height:0;margin:0;padding-left:12px;overflow:visible;scrollbar-width:auto}
  .category-nav-primary{display:flex;gap:8px;overflow-x:auto;overscroll-behavior-inline:contain;scroll-snap-type:x proximity;scrollbar-width:none;padding:0 12px 1px 0}
  .category-nav-primary::-webkit-scrollbar{display:none}
  .category-nav-secondary{display:none}
  .category-quick-link{flex:0 0 148px;min-height:72px;scroll-snap-align:start;display:grid;grid-template-columns:34px 1fr;align-items:center;gap:9px;padding:10px 11px;border:1px solid var(--line);border-radius:18px;background:#fff;color:var(--ink);white-space:normal}
  .category-quick-link:hover,.category-quick-link.is-active{border-color:#cbd0ff;background:#fafaff;color:var(--blue)}
  .category-quick-icon{display:grid;place-items:center;width:32px;height:32px}
  .category-quick-icon svg{width:28px;height:28px}
  .category-quick-label{font-size:.74rem;font-weight:800;line-height:1.18}
  .footer-grid{grid-template-columns:1fr 1fr}
  .footer-grid>div:first-child{grid-column:1/-1}
  .footer-grid>div:last-child{grid-column:auto}
  .footer-bottom{flex-direction:column;align-items:flex-start}
}

@media(max-width:390px){
  .category-quick-link{flex-basis:142px}
  .drawer{width:min(390px,94vw)}
  .drawer-body{padding-left:14px;padding-right:14px}
  .footer-grid{grid-template-columns:1fr}
  .footer-grid>div:first-child{grid-column:auto}
}

@media(prefers-reduced-motion:reduce){
  *{scroll-behavior:auto!important;transition:none!important}
}


/* ETAPA 3.7 — Home dinâmica */
.product-media .crazy-product-image,
.product-media img {
	width:100%;
	height:100%;
	object-fit:contain;
	padding:18px;
	transition:transform .25s ease;
}

.product-card:hover .crazy-product-image,
.product-card:hover .product-media img {
	transform:scale(1.025);
}

.crazy-price {
	min-height:48px;
	display:flex;
	align-items:flex-end;
	flex-wrap:wrap;
	gap:6px;
	font-weight:900;
	font-size:1.22rem;
	letter-spacing:-.025em;
}

.crazy-price del {
	color:#8d95a7;
	font-size:.76rem;
	font-weight:500;
}

.crazy-price ins {
	text-decoration:none;
}

.crazy-products-empty {
	grid-column:1 / -1;
	min-height:160px;
	border:1px dashed #cfd4e3;
	border-radius:20px;
	background:#fff;
	display:flex;
	flex-direction:column;
	align-items:center;
	justify-content:center;
	text-align:center;
	padding:28px;
	color:#66708a;
}

.crazy-products-empty strong {
	color:#0f1630;
	margin-bottom:4px;
}

.crazy-cat-number {
	font-size:.78rem;
	font-weight:950;
	letter-spacing:.08em;
}

@media(min-width:1025px) {
	.category-scroller-v2 {
		grid-template-columns:repeat(5,minmax(0,1fr));
	}
}

@media(max-width:760px) {
	.crazy-price {
		font-size:1.12rem;
	}

	.product-card .card-actions .btn {
		white-space:nowrap;
	}
}

/* Acessibilidade visual reutilizável. */
.screen-reader-text{
  position:absolute!important;
  width:1px!important;
  height:1px!important;
  padding:0!important;
  margin:-1px!important;
  overflow:hidden!important;
  clip:rect(0,0,0,0)!important;
  white-space:nowrap!important;
  border:0!important;
}
