/*
 * MegaGix Customer Dashboard
 * v1.1.2 - scoped wrapper + matching icons + mini-cart safe layout.
 */

.mgcd-account-page {
	--mgcd-blue: #0d43c5;
	--mgcd-blue-dark: #082d93;
	--mgcd-ink: #111a40;
	--mgcd-panel: rgba(255, 255, 255, 0.88);
	--mgcd-line: rgba(19, 45, 125, 0.11);
	--mgcd-shadow: 0 18px 48px rgba(48, 62, 145, 0.14);
	background:
		radial-gradient(circle at 14% 8%, rgba(255,255,255,0.86), transparent 28%),
		linear-gradient(135deg, #eff1ff 0%, #dfe4ff 100%);
}

.mgcd-account-page .site-content {
	background: transparent !important;
}

.mgcd-account-page .ast-container,
.mgcd-account-page .site-content > .container {
	width: min(100%, 1500px);
	max-width: 1500px !important;
	padding: 36px 22px !important;
}

/* SAFE WRAPPER: only account navigation + content */
.mgcd-account-shell {
	display: grid;
	grid-template-columns: 280px minmax(0, 1fr);
	gap: 28px;
	align-items: start;
	width: 100%;
}

.mgcd-account-shell > .woocommerce-MyAccount-navigation {
	position: sticky;
	top: 28px;
	float: none !important;
	width: 100% !important;
	margin: 0 !important;
	padding: 14px !important;
	border: 1px solid rgba(255,255,255,0.96);
	border-radius: 18px;
	background: var(--mgcd-panel);
	box-shadow: var(--mgcd-shadow), inset 0 1px 0 rgba(255,255,255,0.98);
	backdrop-filter: blur(18px);
	-webkit-backdrop-filter: blur(18px);
}

.mgcd-account-shell > .woocommerce-MyAccount-navigation ul {
	margin: 0 !important;
	padding: 0 !important;
	list-style: none !important;
}

.mgcd-account-shell > .woocommerce-MyAccount-navigation li {
	margin: 0 !important;
	padding: 0 !important;
	border: 0 !important;
}

.mgcd-account-shell > .woocommerce-MyAccount-navigation li a {
	display: flex !important;
	min-height: 57px;
	align-items: center;
	gap: 13px;
	padding: 12px 15px !important;
	border: 0 !important;
	border-bottom: 1px solid var(--mgcd-line) !important;
	border-radius: 9px;
	color: #12235d !important;
	font-size: 15px;
	font-weight: 600;
	line-height: 1.2;
	transition: background .2s ease, color .2s ease, transform .2s ease;
}

.mgcd-account-shell > .woocommerce-MyAccount-navigation li:last-child a {
	border-bottom: 0 !important;
}

.mgcd-account-shell > .woocommerce-MyAccount-navigation li a::before {
	content: "";
	display: inline-block;
	width: 22px;
	height: 22px;
	flex: 0 0 22px;
	background-color: currentColor;
	mask-repeat: no-repeat;
	mask-position: center;
	mask-size: contain;
	-webkit-mask-repeat: no-repeat;
	-webkit-mask-position: center;
	-webkit-mask-size: contain;
}

.mgcd-account-shell > .woocommerce-MyAccount-navigation .woocommerce-MyAccount-navigation-link--dashboard a::before {
	mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Crect x='3' y='3' width='7' height='7' rx='1.5'/%3E%3Crect x='14' y='3' width='7' height='7' rx='1.5'/%3E%3Crect x='3' y='14' width='7' height='7' rx='1.5'/%3E%3Crect x='14' y='14' width='7' height='7' rx='1.5'/%3E%3C/svg%3E");
	-webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Crect x='3' y='3' width='7' height='7' rx='1.5'/%3E%3Crect x='14' y='3' width='7' height='7' rx='1.5'/%3E%3Crect x='3' y='14' width='7' height='7' rx='1.5'/%3E%3Crect x='14' y='14' width='7' height='7' rx='1.5'/%3E%3C/svg%3E");
}
.mgcd-account-shell > .woocommerce-MyAccount-navigation .woocommerce-MyAccount-navigation-link--orders a::before {
	mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M8 3h8v3H8zM7 5h10a2 2 0 0 1 2 2v12a2 2 0 0 1-2 2H7a2 2 0 0 1-2-2V7a2 2 0 0 1 2-2Zm2 6h6v2H9zm0 4h6v2H9z'/%3E%3C/svg%3E");
	-webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M8 3h8v3H8zM7 5h10a2 2 0 0 1 2 2v12a2 2 0 0 1-2 2H7a2 2 0 0 1-2-2V7a2 2 0 0 1 2-2Zm2 6h6v2H9zm0 4h6v2H9z'/%3E%3C/svg%3E");
}
.mgcd-account-shell > .woocommerce-MyAccount-navigation .woocommerce-MyAccount-navigation-link--license-keys a::before {
	mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M14 4a6 6 0 1 1-4.24 10.24L3 21v-4l2-2v-2l2-2 1.76-1.76A6 6 0 0 1 14 4Zm0 3a1.5 1.5 0 1 0 0 .01Z'/%3E%3C/svg%3E");
	-webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M14 4a6 6 0 1 1-4.24 10.24L3 21v-4l2-2v-2l2-2 1.76-1.76A6 6 0 0 1 14 4Zm0 3a1.5 1.5 0 1 0 0 .01Z'/%3E%3C/svg%3E");
}
.mgcd-account-shell > .woocommerce-MyAccount-navigation .woocommerce-MyAccount-navigation-link--downloads a::before {
	mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M11 3h2v10l3-3 1.4 1.4L12 17l-5.4-5.6L8 10l3 3zM5 19h14v2H5z'/%3E%3C/svg%3E");
	-webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M11 3h2v10l3-3 1.4 1.4L12 17l-5.4-5.6L8 10l3 3zM5 19h14v2H5z'/%3E%3C/svg%3E");
}
.mgcd-account-shell > .woocommerce-MyAccount-navigation .woocommerce-MyAccount-navigation-link--edit-address a::before {
	mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M12 21s7-5.5 7-11a7 7 0 1 0-14 0c0 5.5 7 11 7 11Zm0-8a3 3 0 1 1 0-6 3 3 0 0 1 0 6Z'/%3E%3C/svg%3E");
	-webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M12 21s7-5.5 7-11a7 7 0 1 0-14 0c0 5.5 7 11 7 11Zm0-8a3 3 0 1 1 0-6 3 3 0 0 1 0 6Z'/%3E%3C/svg%3E");
}
.mgcd-account-shell > .woocommerce-MyAccount-navigation .woocommerce-MyAccount-navigation-link--edit-account a::before {
	mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M12 12a4 4 0 1 0-4-4 4 4 0 0 0 4 4Zm0 2c-4.4 0-8 2.2-8 5v1h16v-1c0-2.8-3.6-5-8-5Z'/%3E%3C/svg%3E");
	-webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M12 12a4 4 0 1 0-4-4 4 4 0 0 0 4 4Zm0 2c-4.4 0-8 2.2-8 5v1h16v-1c0-2.8-3.6-5-8-5Z'/%3E%3C/svg%3E");
}
.mgcd-account-shell > .woocommerce-MyAccount-navigation .woocommerce-MyAccount-navigation-link--customer-logout a::before {
	mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M10 3h9v18h-9v-6h2v4h5V5h-5v4h-2Zm1 12-1.4-1.4 2.6-2.6H4V9h8.2L9.6 6.4 11 5l5 5Z'/%3E%3C/svg%3E");
	-webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M10 3h9v18h-9v-6h2v4h5V5h-5v4h-2Zm1 12-1.4-1.4 2.6-2.6H4V9h8.2L9.6 6.4 11 5l5 5Z'/%3E%3C/svg%3E");
}

.mgcd-account-shell > .woocommerce-MyAccount-navigation li.is-active a,
.mgcd-account-shell > .woocommerce-MyAccount-navigation li a:hover {
	color: #052d98 !important;
	background: linear-gradient(135deg, rgba(224,230,255,0.98), rgba(247,239,255,0.98));
	transform: translateX(3px);
}

.mgcd-account-shell > .woocommerce-MyAccount-content {
	float: none !important;
	width: 100% !important;
	min-width: 0;
	margin: 0 !important;
	padding: 34px !important;
	border: 1px solid rgba(255,255,255,0.96);
	border-radius: 20px;
	background: var(--mgcd-panel);
	box-shadow: var(--mgcd-shadow), inset 0 1px 0 rgba(255,255,255,0.98);
	backdrop-filter: blur(18px);
	-webkit-backdrop-filter: blur(18px);
}

.mgcd-dashboard-view .woocommerce-MyAccount-content {
	display: flex;
	flex-direction: column;
}
.mgcd-dashboard-view .woocommerce-MyAccount-content > p:first-of-type { display:none !important; }
.mgcd-dashboard-view .woocommerce-MyAccount-content > p:nth-of-type(2) {
	order: 2;
	margin: 28px 0 0 !important;
	color: #263052;
	font-size: 14px;
	line-height: 1.75;
}
.mgcd-dashboard-view .woocommerce-MyAccount-content > p:nth-of-type(2) a { color: var(--mgcd-blue); font-weight: 600; }
.mgcd-dashboard { order: 1; }

.mgcd-welcome {
	display:flex; align-items:center; gap:14px; margin-bottom:28px;
}
.mgcd-avatar {
	width:60px; height:60px; flex:0 0 60px; overflow:hidden; border:3px solid rgba(255,255,255,.96); border-radius:50%; background:#d7d9e5; box-shadow:0 8px 18px rgba(36,51,124,.13);
}
.mgcd-avatar img { display:block; width:100%; height:100%; object-fit:cover; }
.mgcd-greeting { margin:0 !important; color:#15182b; font-size:clamp(19px,2vw,24px); line-height:1.2; }
.mgcd-greeting strong { font-weight:800; }

.mgcd-quick-actions {
	display:grid; grid-template-columns:repeat(4,minmax(0,1fr)); gap:20px; margin-bottom:34px;
}
.mgcd-quick-action {
	display:inline-flex; min-width:0; min-height:68px; align-items:center; justify-content:center; gap:11px; padding:14px 16px; border:1px solid rgba(255,255,255,.45); border-radius:8px; color:#fff !important; font-size:clamp(14px,1.35vw,18px); font-weight:800; line-height:1.1; text-align:center; text-transform:uppercase; background:linear-gradient(180deg,#1450d2 0%, #0a3db9 55%, #072d92 100%); box-shadow:0 11px 20px rgba(5,44,151,.23), inset 0 1px 0 rgba(255,255,255,.28); transition:transform .18s ease, filter .18s ease, box-shadow .18s ease;
}
.mgcd-quick-action:hover, .mgcd-quick-action:focus-visible { color:#fff !important; filter:brightness(1.08); transform:translateY(-3px); box-shadow:0 15px 25px rgba(5,44,151,.28), inset 0 1px 0 rgba(255,255,255,.30); }

.mgcd-svg-icon {
	display:inline-flex; width:24px; height:24px; flex:0 0 24px; align-items:center; justify-content:center; line-height:0; color:currentColor;
}
.mgcd-svg-icon svg {
	display:block; width:100%; height:100%; stroke:currentColor; fill:none; stroke-width:2; stroke-linecap:round; stroke-linejoin:round; vector-effect:non-scaling-stroke;
}
.mgcd-button-svg { width:15px; height:15px; flex-basis:15px; }
.mgcd-buy-now .mgcd-svg-icon svg path { fill: currentColor; stroke:none; }

.mgcd-products-grid { display:grid; grid-template-columns:repeat(4,minmax(0,1fr)); gap:18px; align-items:stretch; }
.mgcd-product-card {
	position:relative; isolation:isolate; display:flex; min-width:0; height:100%; flex-direction:column; overflow:hidden; padding:10px 10px 13px; border:1px solid rgba(255,255,255,.96); border-radius:16px; background:linear-gradient(135deg, rgba(205,219,255,.90) 0%, rgba(255,255,255,.84) 52%, rgba(255,222,245,.84) 100%); box-shadow:0 12px 28px rgba(46,65,155,.15), inset 0 1px 0 rgba(255,255,255,.98); transition:transform .22s ease, box-shadow .22s ease;
}
.mgcd-product-card::before {
	position:absolute; z-index:-1; top:-20%; left:-25%; width:100%; height:65%; border-radius:50%; background:radial-gradient(circle, rgba(255,255,255,.95), rgba(255,255,255,.12) 64%, transparent 74%); content:""; pointer-events:none;
}
.mgcd-product-image-link { display:block; min-width:0; }
.mgcd-product-image, .mgcd-product-image-link img { display:block !important; width:100% !important; height:auto !important; aspect-ratio:1.7 / 1; margin:0 !important; border:1px solid rgba(255,255,255,.96); border-radius:14px; object-fit:cover; background:#fff; box-shadow:0 9px 18px rgba(44,50,122,.14); }
.mgcd-product-content { display:flex; min-width:0; flex:1 1 auto; flex-direction:column; align-items:stretch; padding-top:14px; text-align:center; }
.mgcd-category-pill { align-self:center; display:inline-flex; max-width:calc(100% - 16px); align-items:center; justify-content:center; margin-bottom:11px; padding:7px 13px; border-radius:7px; color:#fff; font-size:10px; font-weight:800; line-height:1.1; background:linear-gradient(180deg,#184bc8 0%, #092c94 100%); box-shadow:0 6px 12px rgba(8,42,147,.24), inset 0 1px 0 rgba(255,255,255,.25); }
.mgcd-product-title { min-height:68px; margin:0; padding:0 4px; color:#080914; font-size:clamp(14px,1.25vw,17px); font-weight:800; letter-spacing:-0.025em; line-height:1.2; text-align:center; text-wrap:balance; overflow-wrap:break-word; }
.mgcd-product-title a { color:inherit !important; }
.mgcd-product-price { display:flex; min-height:54px; flex-wrap:wrap; align-items:center; justify-content:center; gap:5px 8px; margin:8px 0 13px; color:#08090c; font-size:clamp(15px,1.25vw,18px); font-weight:800; line-height:1.2; }
.mgcd-product-price del { color:#6f6f6f; font-weight:700; opacity:1; white-space:nowrap; text-decoration-thickness:2px; }
.mgcd-product-price ins { color:#08090c; font-weight:800; white-space:nowrap; text-decoration:none; }
.mgcd-product-actions { display:grid; grid-template-columns:1fr; gap:9px; margin-top:auto; }
.mgcd-product-button { display:inline-flex !important; width:100% !important; min-width:0 !important; min-height:44px !important; align-items:center !important; justify-content:center !important; gap:8px; margin:0 !important; padding:10px 8px !important; border:1px solid rgba(255,255,255,.48) !important; border-radius:999px !important; color:#fff !important; font-size:13px !important; font-weight:800 !important; line-height:1.1 !important; text-align:center; white-space:nowrap; background:linear-gradient(180deg,#1352dc 0%, #0739b4 55%, #082a8c 100%) !important; box-shadow:0 8px 14px rgba(7,39,139,.24), inset 0 1px 0 rgba(255,255,255,.27); transition:filter .16s ease, transform .16s ease; }
.mgcd-product-button:hover, .mgcd-product-button:focus-visible { color:#fff !important; filter:brightness(1.10); transform:translateY(-2px); }
.mgcd-sale-badge { position:absolute; z-index:5; top:8px; right:8px; display:grid; width:38px; height:38px; place-items:center; border-radius:50%; color:#fff; font-size:10px; font-weight:700; background:#071c73; box-shadow:0 7px 13px rgba(7,28,115,.24); }

.mgcd-account-shell > .woocommerce-MyAccount-content table { width:100%; overflow:hidden; border:1px solid #e1e5f5; border-radius:12px; background:rgba(255,255,255,.86); }
.mgcd-account-shell > .woocommerce-MyAccount-content input.input-text,
.mgcd-account-shell > .woocommerce-MyAccount-content input[type='text'],
.mgcd-account-shell > .woocommerce-MyAccount-content input[type='email'],
.mgcd-account-shell > .woocommerce-MyAccount-content input[type='password'],
.mgcd-account-shell > .woocommerce-MyAccount-content select,
.mgcd-account-shell > .woocommerce-MyAccount-content textarea { min-height:48px; border:1px solid #d8def4 !important; border-radius:9px !important; background:#fff !important; }

@media (hover:hover) {
	.mgcd-product-card:hover { transform:translateY(-5px); box-shadow:0 20px 40px rgba(38,57,143,.20), inset 0 1px 0 #fff; }
}
@media (max-width:1200px) {
	.mgcd-account-shell { grid-template-columns:240px minmax(0,1fr); }
	.mgcd-products-grid { grid-template-columns:repeat(3,minmax(0,1fr)); }
	.mgcd-quick-actions { grid-template-columns:repeat(2,minmax(0,1fr)); }
}
@media (max-width:900px) {
	.mgcd-account-shell { grid-template-columns:1fr; }
	.mgcd-account-shell > .woocommerce-MyAccount-navigation { position:static; }
	.mgcd-account-shell > .woocommerce-MyAccount-navigation ul { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:8px; }
	.mgcd-account-shell > .woocommerce-MyAccount-navigation li a { border:0 !important; background:rgba(238,241,255,.82); }
	.mgcd-products-grid { grid-template-columns:repeat(2,minmax(0,1fr)); }
}
@media (max-width:600px) {
	.mgcd-account-page .ast-container,
	.mgcd-account-page .site-content > .container { padding:16px 12px !important; }
	.mgcd-account-shell > .woocommerce-MyAccount-content { padding:20px 14px !important; border-radius:15px; }
	.mgcd-account-shell > .woocommerce-MyAccount-navigation ul { grid-template-columns:repeat(2,minmax(0,1fr)); }
	.mgcd-account-shell > .woocommerce-MyAccount-navigation li a { min-height:50px; padding:10px !important; font-size:13px; }
	.mgcd-welcome { margin-bottom:22px; }
	.mgcd-quick-actions { grid-template-columns:repeat(2,minmax(0,1fr)); gap:10px; margin-bottom:25px; }
	.mgcd-quick-action { min-height:56px; padding:10px 7px; font-size:13px; }
	.mgcd-svg-icon { width:18px; height:18px; flex-basis:18px; }
	.mgcd-button-svg { width:12px; height:12px; flex-basis:12px; }
	.mgcd-products-grid { grid-template-columns:minmax(0,1fr); gap:16px; }
	.mgcd-product-card { width:min(100%,440px); justify-self:center; }
	.mgcd-product-title { min-height:0; font-size:18px; }
	.mgcd-product-price { font-size:18px; }
}
@media (max-width:380px) {
	.mgcd-quick-action { gap:6px; font-size:12px; }
	.mgcd-account-shell > .woocommerce-MyAccount-navigation ul { grid-template-columns:1fr; }
}
@media (prefers-reduced-motion: reduce) {
	.mgcd-account-page *, .mgcd-account-page *::before, .mgcd-account-page *::after { scroll-behavior:auto !important; transition:none !important; }
}
