/* =========================================================
   CuciPro — theme.css
   Kelas custom dari acuan (src/_head.html <style>) +
   preloader, toast global, anti-double-click, util WP.
   Dimuat SETELAH assets/css/tailwind.css (hasil salinan dist).
   ========================================================= */

/* ---------- Tipografi dasar (font dari opsi bisa dioverride via var) ---------- */
:root {
	--cp-font-body: 'Inter', system-ui, -apple-system, sans-serif;
	--cp-font-display: 'Sora', 'Inter', sans-serif;
}
body { font-family: var(--cp-font-body); }
h1, h2, h3, .font-display, .btn-primary { font-family: var(--cp-font-display); }

/* ---------- Gradient text ---------- */
.text-gradient {
	background: linear-gradient(90deg, #22d3ee, #67e8f9 40%, #a5f3fc 60%, #22d3ee);
	background-size: 200% auto;
	-webkit-background-clip: text;
	background-clip: text;
	color: transparent;
	animation: gradmove 6s linear infinite;
}
@keyframes gradmove { to { background-position: 200% center; } }

/* ---------- Floaty ---------- */
@keyframes floaty { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-14px); } }
.animate-floaty { animation: floaty 6s ease-in-out infinite; }
.animate-floaty-slow { animation: floaty 9s ease-in-out infinite; }

/* ---------- Bubble (dimatikan bila opsi enable_bubbles = 0 oleh JS) ---------- */
@keyframes bubble {
	0% { transform: translateY(20px) scale(.6); opacity: 0; }
	20% { opacity: .5; }
	100% { transform: translateY(-120px) scale(1.1); opacity: 0; }
}
.bubble {
	position: absolute;
	bottom: 0;
	border-radius: 9999px;
	background: radial-gradient(circle at 30% 30%, rgba(255, 255, 255, .9), rgba(34, 211, 238, .25));
	animation: bubble 8s linear infinite;
}

/* ---------- Shine (badge/tombol grad) ---------- */
@keyframes shine { 0% { transform: translateX(-150%) skewX(-20deg); } 100% { transform: translateX(250%) skewX(-20deg); } }
.shine-badge { position: relative; overflow: hidden; }
.shine-badge::after {
	content: '';
	position: absolute;
	top: 0; left: 0;
	width: 45%; height: 100%;
	background: linear-gradient(90deg, transparent, rgba(255, 255, 255, .55), transparent);
	animation: shine 3.2s ease-in-out infinite;
	pointer-events: none;
}

/* ---------- Marquee ---------- */
.marquee { display: flex; width: max-content; animation: marquee 26s linear infinite; }
@keyframes marquee { to { transform: translateX(-50%); } }

/* ---------- Reveal on scroll ---------- */
.reveal {
	opacity: 0;
	transform: translateY(34px);
	transition: opacity .8s cubic-bezier(.16, 1, .3, 1), transform .8s cubic-bezier(.16, 1, .3, 1);
}
.reveal.is-visible { opacity: 1; transform: none; }
.reveal-1 { transition-delay: .08s; }
.reveal-2 { transition-delay: .16s; }
.reveal-3 { transition-delay: .24s; }
.reveal-4 { transition-delay: .32s; }
.reveal-5 { transition-delay: .4s; }

/* ---------- Tilt / hover card ---------- */
.tilt-card { transition: transform .35s cubic-bezier(.16, 1, .3, 1), box-shadow .35s, border-color .35s; }
.tilt-card:hover { transform: translateY(-8px); }

/* ---------- Buttons ---------- */
.btn-primary {
	position: relative;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: .5rem;
	border-radius: 9999px;
	background: linear-gradient(90deg, #06b6d4, #22d3ee);
	color: #03060f;
	font-weight: 800;
	box-shadow: 0 12px 32px -8px rgba(6, 182, 212, .55);
	transition: transform .25s, box-shadow .25s, opacity .2s;
}
.btn-primary:hover { transform: scale(1.03); box-shadow: 0 16px 40px -8px rgba(34, 211, 238, .65); }
.btn-ghost {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: .5rem;
	border-radius: 9999px;
	border: 1px solid rgba(255, 255, 255, .15);
	background: rgba(255, 255, 255, .05);
	font-weight: 600;
	color: #fff;
	transition: .25s;
}
.btn-ghost:hover { background: rgba(255, 255, 255, .1); border-color: rgba(34, 211, 238, .5); color: #67e8f9; }

/* ---------- Nav ---------- */
.nav-link.active { color: #22d3ee; }
.nav-link.active::after { content: ''; display: block; height: 2px; margin-top: 4px; border-radius: 2px; background: linear-gradient(90deg, #22d3ee, transparent); }
.current-menu-item > a, .nav-link.current-menu-item { color: #22d3ee; }
.current-menu-item > a::after { content: ''; display: block; height: 2px; margin-top: 4px; border-radius: 2px; background: linear-gradient(90deg, #22d3ee, transparent); }

/* ---------- Before/After slider ---------- */
input[type=range].ba-range {
	-webkit-appearance: none;
	appearance: none;
	background: transparent;
	pointer-events: none;
	position: absolute;
	inset: 0;
	width: 100%;
	height: 100%;
	margin: 0;
	cursor: ew-resize;
}
input[type=range].ba-range::-webkit-slider-thumb {
	-webkit-appearance: none;
	pointer-events: auto;
	width: 44px; height: 44px;
	border-radius: 9999px;
	background: #22d3ee;
	border: 4px solid #fff;
	box-shadow: 0 4px 18px rgba(6, 182, 212, .6);
	cursor: ew-resize;
}
input[type=range].ba-range::-moz-range-thumb {
	pointer-events: auto;
	width: 36px; height: 36px;
	border-radius: 9999px;
	background: #22d3ee;
	border: 4px solid #fff;
	cursor: ew-resize;
}
input[type=range].ba-range:focus-visible { outline: 2px solid #67e8f9; outline-offset: 2px; }

/* ---------- Chips filter ---------- */
.chip.active { background: #06b6d4; color: #03060f; border-color: #06b6d4; }

/* ---------- Accordion / FAQ ---------- */
details[open] summary .plus { transform: rotate(45deg); }
.plus { transition: transform .3s; }
details summary::-webkit-details-marker { display: none; }

/* ---------- Progress bar ---------- */
.bar-fill { width: 0; transition: width 1.2s cubic-bezier(.16, 1, .3, 1); }

/* ---------- Selection & grid lines ---------- */
::selection { background: #22d3ee; color: #060b18; }
.grid-lines {
	background-image: linear-gradient(rgba(255, 255, 255, .5) 1px, transparent 1px),
		linear-gradient(90deg, rgba(255, 255, 255, .5) 1px, transparent 1px);
	background-size: 56px 56px;
}

/* ---------- Preloader ---------- */
.cp-preloader {
	position: fixed;
	inset: 0;
	z-index: 9999;
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	gap: 1.25rem;
	background: #03060f;
	transition: opacity .45s ease, visibility .45s;
}
.cp-preloader.is-done { opacity: 0; visibility: hidden; pointer-events: none; }
.cp-preloader__bubble {
	width: 64px; height: 64px;
	border-radius: 9999px;
	background: radial-gradient(circle at 32% 30%, rgba(255, 255, 255, .95), rgba(34, 211, 238, .35));
	box-shadow: 0 0 40px rgba(34, 211, 238, .45);
	animation: cp-bob 1.2s ease-in-out infinite;
}
@keyframes cp-bob { 0%, 100% { transform: translateY(0) scale(1); } 50% { transform: translateY(-16px) scale(1.06); } }
.cp-preloader__label {
	font-family: var(--cp-font-display);
	font-weight: 800;
	letter-spacing: .25em;
	text-transform: uppercase;
	font-size: 12px;
	color: #67e8f9;
}

/* ---------- Skip link ---------- */
.cp-skip-link {
	position: absolute;
	left: -9999px;
	top: 0;
	z-index: 10000;
	background: #22d3ee;
	color: #03060f;
	font-weight: 700;
	padding: .75rem 1.25rem;
	border-radius: 0 0 12px 0;
}
.cp-skip-link:focus { left: 0; }

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

/* ---------- Fokus keyboard konsisten ---------- */
:focus-visible { outline: 2px solid #67e8f9; outline-offset: 3px; border-radius: 4px; }

/* ---------- Konten utama offset header fixed ---------- */
.cp-main { display: block; }
body:not(.page-template-template-landing):not(.is-front-page) .cp-main { padding-top: 0; }

/* ---------- Prose (konten artikel) ---------- */
.cp-prose { color: #cbd5e1; line-height: 1.8; }
.cp-prose h2, .cp-prose h3 { font-family: var(--cp-font-display); color: #fff; font-weight: 800; margin: 2em 0 .75em; line-height: 1.25; }
.cp-prose h2 { font-size: 1.6rem; }
.cp-prose h3 { font-size: 1.25rem; }
.cp-prose p { margin: 0 0 1.25em; }
.cp-prose a { color: #67e8f9; text-decoration: underline; text-underline-offset: 3px; }
.cp-prose a:hover { color: #a5f3fc; }
.cp-prose ul, .cp-prose ol { margin: 0 0 1.25em 1.4em; }
.cp-prose ul { list-style: disc; }
.cp-prose ol { list-style: decimal; }
.cp-prose li { margin: .35em 0; }
.cp-prose img { border-radius: 1rem; border: 1px solid rgba(255, 255, 255, .1); height: auto; max-width: 100%; }
.cp-prose blockquote { border-left: 3px solid #22d3ee; padding: .5em 0 .5em 1.25em; color: #94a3b8; font-style: italic; margin: 1.5em 0; }
.cp-prose code { background: rgba(255, 255, 255, .08); border-radius: 6px; padding: .15em .4em; font-size: .9em; }
.cp-prose pre { background: #060b18; border: 1px solid rgba(255, 255, 255, .1); border-radius: 1rem; padding: 1.25rem; overflow-x: auto; }
.cp-prose pre code { background: transparent; padding: 0; }
.cp-prose table { width: 100%; border-collapse: collapse; margin: 1.5em 0; display: block; overflow-x: auto; }
.cp-prose th, .cp-prose td { border: 1px solid rgba(255, 255, 255, .1); padding: .6rem .8rem; text-align: left; }
.cp-prose th { background: rgba(255, 255, 255, .05); color: #fff; }
.cp-prose hr { border: 0; height: 1px; background: rgba(255, 255, 255, .1); margin: 2em 0; }

/* ---------- Pagination WP ---------- */
.cp-pagination .nav-links { display: flex; flex-wrap: wrap; gap: .5rem; justify-content: center; }
.cp-pagination .page-numbers {
	display: inline-grid;
	place-items: center;
	min-width: 42px; height: 42px;
	padding: 0 .9rem;
	border-radius: 9999px;
	border: 1px solid rgba(255, 255, 255, .15);
	background: rgba(255, 255, 255, .05);
	color: #cbd5e1;
	font-weight: 600;
	font-size: .875rem;
	transition: .2s;
}
.cp-pagination .page-numbers:hover { border-color: rgba(34, 211, 238, .5); color: #67e8f9; }
.cp-pagination .page-numbers.current { background: linear-gradient(90deg, #06b6d4, #22d3ee); color: #03060f; border-color: transparent; }

/* ---------- Comment form bawaan WP dirapikan ---------- */
.comment-form p { margin-bottom: 1rem; }
.comment-form label { display: block; font-size: .75rem; font-weight: 600; color: #94a3b8; margin-bottom: .375rem; }
.comment-form input[type=text], .comment-form input[type=email], .comment-form input[type=url],
.comment-form textarea {
	width: 100%;
	border-radius: .75rem;
	background: rgba(3, 6, 15, .7);
	border: 1px solid rgba(255, 255, 255, .1);
	padding: .75rem 1rem;
	font-size: .875rem;
	color: #fff;
	outline: none;
	transition: border-color .2s;
}
.comment-form input:focus, .comment-form textarea:focus { border-color: #22d3ee; }
.comment-form .submit { cursor: pointer; border: 0; }
.comment-notes, .comment-form-cookies-consent { font-size: .8rem; color: #64748b; }
.comment-list { list-style: none; padding: 0; }
.children { list-style: none; padding-left: 1.5rem; }

/* ---------- CF7 styling halus ---------- */
.cp-cf7 .wpcf7 { color: #cbd5e1; }
.cp-cf7 .wpcf7 label { display: block; font-size: .75rem; font-weight: 600; color: #94a3b8; margin: .75rem 0 .375rem; }
.cp-cf7 input[type=text], .cp-cf7 input[type=email], .cp-cf7 input[type=tel], .cp-cf7 input[type=url],
.cp-cf7 input[type=date], .cp-cf7 input[type=number], .cp-cf7 select, .cp-cf7 textarea {
	width: 100%;
	border-radius: .75rem;
	background: rgba(3, 6, 15, .7);
	border: 1px solid rgba(255, 255, 255, .1);
	padding: .75rem 1rem;
	font-size: .875rem;
	color: #fff;
	outline: none;
}
.cp-cf7 input:focus, .cp-cf7 select:focus, .cp-cf7 textarea:focus { border-color: #22d3ee; }
.cp-cf7 input[type=submit] { margin-top: 1.5rem; }
.cp-cf7 .wpcf7-spinner { border-color: #22d3ee transparent #22d3ee transparent; }
.cp-cf7 .wpcf7-not-valid-tip { color: #fda4af; font-size: .75rem; }
.cp-cf7 div.wpcf7-validation-errors, .cp-cf7 div.wpcf7-mail-sent-ok { border: none; padding: .75rem 1rem; border-radius: .75rem; font-size: .875rem; }
.cp-cf7 div.wpcf7-mail-sent-ng, .cp-cf7 div.wpcf7-aborted, .cp-cf7 div.wpcf7-validation-errors { background: rgba(244, 63, 94, .12); color: #fda4af; }
.cp-cf7 div.wpcf7-mail-sent-ok { background: rgba(16, 185, 129, .12); color: #6ee7b7; }

/* ---------- Scrollbar gelap halus ---------- */
* { scrollbar-width: thin; scrollbar-color: #164e63 #060b18; }
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-track { background: #060b18; }
::-webkit-scrollbar-thumb { background: #164e63; border-radius: 9999px; border: 2px solid #060b18; }
::-webkit-scrollbar-thumb:hover { background: #0e7490; }

/* ---------- Anchor scroll offset (header fixed) ---------- */
section[id], article[id] { scroll-margin-top: 90px; }

/* ---------- Body saat menu mobile terbuka ---------- */
body.menu-open { overflow: hidden; }

/* =========================================================
   GLOBAL LOADING TOAST  (dipakai assets/js/main.js)
   ========================================================= */
.cp-toast-root {
	position: fixed;
	top: 84px;
	right: 16px;
	z-index: 9998;
	display: flex;
	flex-direction: column;
	gap: .5rem;
	width: min(360px, calc(100vw - 32px));
	pointer-events: none;
}
.cp-toast {
	display: flex;
	align-items: center;
	gap: .75rem;
	padding: .8rem 1rem;
	border-radius: 1rem;
	border: 1px solid rgba(255, 255, 255, .12);
	background: rgba(6, 11, 24, .92);
	-webkit-backdrop-filter: blur(12px);
	backdrop-filter: blur(12px);
	color: #e2e8f0;
	font-size: .875rem;
	font-weight: 600;
	box-shadow: 0 16px 40px -12px rgba(0, 0, 0, .6);
	transform: translateX(110%);
	opacity: 0;
	transition: transform .35s cubic-bezier(.16, 1, .3, 1), opacity .35s;
	pointer-events: auto;
}
.cp-toast.is-in { transform: translateX(0); opacity: 1; }
.cp-toast.is-out { transform: translateX(110%); opacity: 0; }
.cp-toast--loading { border-color: rgba(34, 211, 238, .35); }
.cp-toast--success { border-color: rgba(16, 185, 129, .45); }
.cp-toast--error { border-color: rgba(244, 63, 94, .45); }
.cp-toast__icon { flex: 0 0 auto; width: 1.25rem; height: 1.25rem; display: grid; place-items: center; }
.cp-toast__msg { flex: 1 1 auto; min-width: 0; }

.cp-spin {
	width: 18px; height: 18px;
	border-radius: 9999px;
	border: 2.5px solid rgba(34, 211, 238, .25);
	border-top-color: #22d3ee;
	animation: cp-spin .8s linear infinite;
}
@keyframes cp-spin { to { transform: rotate(360deg); } }

/* ---------- ANTI DOUBLE CLICK: state tombol proses ---------- */
.cp-guard[aria-busy="true"] {
	pointer-events: none;
	cursor: wait;
	opacity: .75;
	transform: none !important;
	box-shadow: none;
}
.cp-guard__spinner { display: inline-flex; }
.cp-guard__spinner .cp-spin { width: 16px; height: 16px; border-width: 2px; border-top-color: currentColor; border-color: rgba(3, 6, 15, .25); border-top-color: #03060f; }
.cp-guard[aria-busy="true"] .shine-badge::after { animation: none; }

/* =========================================================
   WOOCOMMERCE — kulit tema (tidak menghapus hook Woo)
   ========================================================= */
.woocommerce-page .cp-main, .woocommerce .cp-main { padding-top: 96px; }
.woocommerce ul.products li.product {
	list-style: none;
	border: 1px solid rgba(255, 255, 255, .1);
	border-radius: 1.5rem;
	background: rgba(255, 255, 255, .03);
	padding: 1rem;
	transition: border-color .25s, transform .25s;
}
.woocommerce ul.products li.product:hover { border-color: rgba(34, 211, 238, .4); transform: translateY(-6px); }
.woocommerce ul.products li.product .woocommerce-loop-product__title { font-family: var(--cp-font-display); color: #fff; font-weight: 700; font-size: 1rem; padding: .75rem 0 .25rem; }
.woocommerce ul.products li.product .price, .woocommerce div.product p.price { color: #67e8f9; font-weight: 800; }
.woocommerce ul.products li.product .price del { color: #475569; }
.woocommerce a.button, .woocommerce button.button, .woocommerce input.button, .woocommerce #respond input#submit,
.woocommerce .single_add_to_cart_button {
	border-radius: 9999px !important;
	background: linear-gradient(90deg, #06b6d4, #22d3ee) !important;
	color: #03060f !important;
	font-weight: 800 !important;
	border: 0 !important;
	text-shadow: none !important;
	padding: .7rem 1.4rem !important;
	transition: transform .2s, box-shadow .2s;
}
.woocommerce a.button:hover, .woocommerce button.button:hover { transform: scale(1.03); }
.woocommerce span.onsale { background: #fbbf24 !important; color: #03060f !important; border-radius: 9999px !important; min-height: 0; line-height: 1; padding: .4rem .7rem; font-weight: 800; }
.woocommerce div.product .product_title { font-family: var(--cp-font-display); color: #fff; }
.woocommerce-message, .woocommerce-info { border-top-color: #22d3ee !important; background: rgba(6, 11, 24, .9) !important; color: #cbd5e1 !important; }
.woocommerce-message::before, .woocommerce-info::before { color: #22d3ee !important; }
.woocommerce form .form-row label { color: #94a3b8; font-size: .8rem; }
.woocommerce form .form-row input.input-text, .woocommerce form .form-row textarea, .woocommerce form .form-row select {
	background: rgba(3, 6, 15, .7);
	border: 1px solid rgba(255, 255, 255, .1);
	border-radius: .75rem;
	color: #fff;
	padding: .75rem 1rem;
}
.woocommerce-table, .woocommerce-checkout-review-order { border: 1px solid rgba(255, 255, 255, .1); }
.woocommerce-table th, .woocommerce-table td, .woocommerce-checkout-review-order th, .woocommerce-checkout-review-order td { border-color: rgba(255, 255, 255, .06); color: #cbd5e1; }

/* =========================================================
   PREFERS-REDUCED-MOTION: matikan semua animasi dekoratif
   ========================================================= */
@media (prefers-reduced-motion: reduce) {
	*, *::before, *::after {
		animation-duration: .01ms !important;
		animation-iteration-count: 1 !important;
		transition-duration: .01ms !important;
		scroll-behavior: auto !important;
	}
	.text-gradient { animation: none; }
	.marquee { animation: none; }
	.bubble { animation: none; opacity: 0; }
	.shine-badge::after { animation: none; }
	.animate-floaty, .animate-floaty-slow { animation: none; }
	.reveal { opacity: 1; transform: none; transition: none; }
	.tilt-card:hover { transform: none; }
	.bar-fill { transition: none; }
	html { scroll-behavior: auto; }
}
