/*
Theme Name:   Divi Child — MagiHelena
Theme URI:    https://magihelena.com
Description:  Child theme for MagiHelena. Holds ONLY presentation: GenesisAstrology-aligned typography (black fonts, H-tag sizes, link color), white canvas, black bottom nav, and template CSS overrides. All functionality lives in the "MagiHelena Astro Engine" plugin.
Author:       MagiHelena Dev
Template:     Divi
Version:      1.0.8
*/

/* ============ Design tokens (from homepage/product-template prototypes) ====
 * Swap --mh-link / fonts for the exact Genesis values once provided.
 */
:root {
	--mh-text: #000000;
	--mh-link: #6b4e8f;
	--mh-link-hover: #4a3466;
	--mh-bg: #ffffff;
	--mh-nav-bg: #000000;
	--mh-hairline: #e6e6e6;
	--mh-muted: #666666;
	--mh-tint: #faf9fc;
	--mh-serif: "Iowan Old Style", "Palatino Linotype", Palatino, Georgia, "Times New Roman", serif;
	--mh-sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

/* NOTE: base typography, colors, buttons and footer colors are applied through
 * native Divi Theme Options by "Apply NIRA styles" (MH Divi Setup) — do not
 * duplicate them here. This file only covers what Divi has no option for. */

/* link hover color (no Divi option) */
a:hover { color: var(--mh-link-hover); }

/* eyebrow labels */
.mh-eyebrow { font-size: .72rem; letter-spacing: .24em; text-transform: uppercase; color: var(--mh-muted); margin-bottom: 10px; font-family: var(--mh-sans); }

/* black bottom nav: colors come from Divi Theme Options (footer_bg etc.);
   only the uppercase/letter-spacing treatment is added here */
#main-footer a, .et-l--footer a { font-size: .78rem; letter-spacing: .13em; text-transform: uppercase; }
#main-footer a:hover, .et-l--footer a:hover { opacity: .7; }
#footer-info { font-size: .72rem; letter-spacing: .1em; }

/* footer nav is a flat list — no dropdowns (a submenu at the page bottom
   overflows the footer and leaves blank space below it) */
body.et-db #et-boc .et-l--footer .et_pb_menu .nav li ul,
body.et-db #et-boc .et-l--footer .et_pb_menu .sub-menu { display: none !important; }

/* footer nav: right-aligned, always the flat inline list — no mobile
   hamburger (the prototype footer has no menu toggle at any width) */
body.et-db #et-boc .et-l--footer .mh-footer-menu .et_pb_menu_inner_container,
body.et-db #et-boc .et-l--footer .mh-footer-menu .et_pb_menu__wrap,
body.et-db #et-boc .et-l--footer .mh-footer-menu .et-menu-nav { justify-content: flex-end; }
body.et-db #et-boc .et-l--footer .mh-footer-menu .et_pb_menu__menu { display: flex !important; }
body.et-db #et-boc .et-l--footer .mh-footer-menu .et-menu-nav { display: flex !important; }
body.et-db #et-boc .et-l--footer .mh-footer-menu .et-menu { display: flex !important; flex-wrap: wrap; justify-content: flex-end; }
body.et-db #et-boc .et-l--footer .mh-footer-menu .et_mobile_nav_menu,
body.et-db #et-boc .et-l--footer .mh-footer-menu .et_pb_menu__icon,
body.et-db #et-boc .et-l--footer .mh-footer-menu .mobile_menu_bar { display: none !important; }

/* header dropdown: wider than the 240px Divi default, anchored to the right
   edge of its item so it stays inside the nav container */
body.et-db #et-boc .et-l .mh-header-menu.et_pb_menu .nav li ul {
	width: 340px !important;
	left: auto !important;
	right: 0 !important;
}
body.et-db #et-boc .et-l .mh-header-menu.et_pb_menu .nav li ul li { width: 100%; }
body.et-db #et-boc .et-l .mh-header-menu.et_pb_menu .nav li ul a {
	width: auto !important;
	max-width: none;
}

/* ================================================================
 * Home page (homepage-template prototype)
 * ================================================================ */

/* hero: height (82vh / min 520px) is set natively in the section's Design >
   Sizing options; Divi has no option for vertical centering of the row */
body.et-db #et-boc .et-l .mh-hero.et_pb_section {
	display: flex;
	align-items: center;
	justify-content: center;
	overflow: hidden;
}
body.et-db #et-boc .et-l .mh-hero.et_pb_section .et_pb_row { width: 100%; }

/* product slider: Divi Shop module with class .mh-home-slider becomes a
   horizontal snap-scroll row of cards */
.mh-home-slider ul.products {
	display: flex !important; gap: 22px; overflow-x: auto;
	scroll-snap-type: x mandatory; padding-bottom: 10px; scrollbar-width: thin;
}
.mh-home-slider ul.products::-webkit-scrollbar { height: 6px; }
.mh-home-slider ul.products::-webkit-scrollbar-thumb { background: #ccc; }
.mh-home-slider ul.products li.product {
	flex: 0 0 300px; width: 300px !important; margin: 0 !important; scroll-snap-align: start;
}
/* title/price fonts & colors: native Shop module options (Design > Title /
   Price Text) */
.mh-home-slider ul.products li.product h2,
.mh-home-slider ul.products li.product .woocommerce-loop-product__title { margin: 16px 0 4px; }
@media (max-width: 820px) {
	.mh-home-slider ul.products li.product { flex-basis: 78vw; }
}

/* ================================================================
 * Product page — NIRA-style layout (see product-page-guide.md)
 * Layout itself (2 columns, module order) is built in Divi Theme
 * Builder; below is only the styling of the Woo elements.
 * ================================================================ */

/* breadcrumb + rating */
.mh-product .woocommerce-breadcrumb { font-size: 12px; letter-spacing: .04em; color: #777; }
.mh-product .woocommerce-breadcrumb a { color: #777; }
.mh-product .woocommerce-product-rating { font-size: 13px; color: #111; }
.mh-product .star-rating span::before { color: #111; }

/* title: large serif, black */
.mh-product .product_title {
	font-family: var(--mh-serif);
	font-size: 2.2rem; font-weight: 600; color: #000; line-height: 1.18;
}

/* price: current bold, old struck-through gray */
.mh-product .price { font-size: 26px; color: #000; }
.mh-product .price del { color: #999; font-size: 18px; margin-left: .35em; }
.mh-product .price ins { text-decoration: none; font-weight: 700; }

/* FORMAT label + variation buttons (selects are converted to buttons by
   the child-theme JS, mh-variation-buttons.js) */
.mh-product table.variations label {
	font-size: 11px; letter-spacing: .12em; text-transform: uppercase; color: #777;
}
.mh-product table.variations, .mh-product table.variations td { border: 0; padding: 0; }
/* stack each attribute: label line on top, option buttons below */
.mh-product table.variations,
.mh-product table.variations tbody,
.mh-product table.variations tr,
.mh-product table.variations th.label,
.mh-product table.variations td.value {
	display: block; width: 100%; text-align: left; border: 0; padding: 0;
}
.mh-product table.variations tr { margin: 0 0 6px; }
.mh-product table.variations th.label { padding: 0 0 6px; }
.mh-product table.variations select { display: none !important; } /* replaced by buttons */
/* Divi wraps the select in a styled span (custom dropdown) — hide it too */
.mh-product table.variations td.value > span { display: none !important; }
.mh-variation-buttons { display: flex; flex-wrap: wrap; gap: 10px; margin: .35em 0 1em; }
.mh-variation-buttons button {
	background: #fff; color: #111; border: 1px solid #ddd;
	padding: 12px 18px; font-size: 14px; cursor: pointer; transition: border-color .15s;
}
.mh-variation-buttons button:hover { border-color: #111; }
.mh-variation-buttons button.active { border: 2px solid #111; font-weight: 600; }

/* quantity stepper: - 1 + in a bordered box */
.mh-product .quantity {
	display: inline-flex; align-items: center; border: 1px solid #111;
}
.mh-product .quantity .qty {
	border: 0; width: 56px; text-align: center; font-size: 15px;
	-moz-appearance: textfield; appearance: textfield;
}
.mh-product .quantity .qty::-webkit-outer-spin-button,
.mh-product .quantity .qty::-webkit-inner-spin-button { -webkit-appearance: none; }
.mh-product .quantity .mh-qty-btn {
	background: none; border: 0; width: 40px; height: 44px;
	font-size: 18px; cursor: pointer; color: #111;
}
.mh-stock-note { display: inline-block; margin-left: 14px; font-size: 13px; color: #555; }

/* ADD TO CART: full-width black */
.mh-product .single_add_to_cart_button {
	display: block; width: 100%; margin-top: 1em;
	background: #000 !important; color: #fff !important; border: 0; border-radius: 0;
	padding: 18px 0; font-size: 13px; letter-spacing: .18em; text-transform: uppercase;
}
.mh-product .single_add_to_cart_button:hover { background: #222 !important; }

/* trust row under the button */
.mh-trust-row {
	display: flex; flex-wrap: wrap; gap: 8px 22px;
	margin-top: 14px; font-size: 13px; color: #333;
}
.mh-trust-row span::before { content: '\2713'; margin-right: 6px; }

/* gallery thumbnails row */
.mh-product .flex-control-thumbs { display: flex; gap: 10px; margin-top: 10px; padding: 0; }
.mh-product .flex-control-thumbs li { width: 72px; list-style: none; }
.mh-product .flex-control-thumbs img { border: 1px solid transparent; cursor: pointer; }
.mh-product .flex-control-thumbs img.flex-active,
.mh-product .flex-control-thumbs img:hover { border-color: #111; }

@media (max-width: 980px) {
	.mh-product .product_title { font-size: 30px; }
}

/* ============ Header (Theme Builder global header) ============ */
.mh-header { border-bottom: 1px solid #1c1c1c; }
/* row height (74px, prototype header.top .wrap) is set natively in the row's
   Design > Sizing (min height); Divi has no option for vertical centering */
.mh-header .mh-header-row {
	display: flex; align-items: center; padding-top: 0; padding-bottom: 0;
}
.mh-header .mh-header-row > .et_pb_column { margin-bottom: 0; display: flex; align-items: center; }
.mh-header .mh-header-row > .et_pb_column:last-child { justify-content: flex-end; }
.mh-header-brand { margin-bottom: 0 !important; }
.mh-header-brand a { font-family: var(--serif, Georgia, serif); }
.mh-header-menu { width: 100%; }
.mh-header-menu .et_pb_menu__wrap,
.mh-header-menu .et-menu-nav { justify-content: flex-end; }
.mh-header .et_pb_menu .et_pb_menu_inner_container,
.mh-header .et_pb_menu .et_pb_menu__wrap { padding-top: 0; padding-bottom: 0; }
.mh-header-menu ul li a { color: #fff; }

/* Light header variant: every page except the homepage gets a white header
   with dark logo/menu text (the dark header stays on the home page).
   Selectors mirror Divi's generated `#et-boc` rules so they win the cascade. */
body.et-db:not(.home) #et-boc .et-l .mh-header.et_pb_section,
body.et-db:not(.home) #et-boc .et-l .mh-header .et_pb_menu,
body.et-db:not(.home) #et-boc .et-l .mh-header .et_pb_row { background-color: #ffffff !important; }
body:not(.home) .mh-header { border-bottom: 1px solid var(--mh-hairline); }
body.et-db:not(.home) #et-boc .et-l .mh-header-brand a { color: #000000 !important; }
body.et-db:not(.home) #et-boc .et-l .mh-header-menu.et_pb_menu ul li a { color: #000000 !important; }
body.et-db:not(.home) #et-boc .et-l .mh-header-menu.et_pb_menu ul li a:hover { color: var(--mh-link) !important; opacity: 1; }
/* active menu item: brand color on both header variants (mirrors the native
   Menu module Active Link Color, which the light-header override above would
   otherwise beat on some templates) */
body.et-db #et-boc .et-l .mh-header-menu.et_pb_menu ul.et-menu li.menu-item[class*="current"] > a { color: var(--mh-link) !important; }
/* dropdown (submenu) on the light header: white panel, dark links */
body.et-db:not(.home) #et-boc .et-l .mh-header-menu.et_pb_menu .nav li ul,
body.et-db:not(.home) #et-boc .et-l .mh-header-menu.et_pb_menu .sub-menu {
	background-color: #ffffff !important;
	border-top: 2px solid #000000;
	box-shadow: 0 6px 18px rgba(0, 0, 0, .08);
}
body.et-db:not(.home) #et-boc .et-l .mh-header-menu.et_pb_menu .nav li ul a,
body.et-db:not(.home) #et-boc .et-l .mh-header-menu.et_pb_menu .sub-menu li a { color: #000000 !important; }
/* mobile hamburger + mobile menu panel */
body.et-db:not(.home) #et-boc .et-l .mh-header .mobile_menu_bar:before,
body.et-db:not(.home) #et-boc .et-l .mh-header .et_pb_menu__icon { color: #000000 !important; }
body.et-db:not(.home) #et-boc .et-l .mh-header .et_pb_menu .et_mobile_menu,
body.et-db:not(.home) #et-boc .et-l .mh-header .et_pb_menu .et_mobile_menu ul { background-color: #ffffff !important; }
body.et-db:not(.home) #et-boc .et-l .mh-header .et_pb_menu .et_mobile_menu li a { color: #000000 !important; }

/* ============ Home hero ============ */
.mh-hero {
	background:
		radial-gradient(1px 1px at 12% 30%, #ffffffcc 50%, transparent 51%),
		radial-gradient(1px 1px at 28% 64%, #ffffff99 50%, transparent 51%),
		radial-gradient(1.5px 1.5px at 45% 22%, #ffffffb3 50%, transparent 51%),
		radial-gradient(1px 1px at 62% 48%, #ffffff8c 50%, transparent 51%),
		radial-gradient(1.5px 1.5px at 78% 30%, #ffffffcc 50%, transparent 51%),
		radial-gradient(1px 1px at 88% 70%, #ffffff99 50%, transparent 51%),
		radial-gradient(circle at 50% 40%, #2a1d4a 0%, #150e29 45%, #0a0713 100%) !important;
}

/* ============ No-sidebar archives (horoscope CPT) ============ */
.mh-no-sidebar #sidebar { display: none; }
.mh-no-sidebar #left-area { width: 100%; padding-right: 0; }

/* ============ Blog grid (Divi Blog module, .mh-blog-grid) ============
   card border: native Blog module Design > Border options */
.mh-blog-grid .et_pb_post { padding: 0 0 18px; }
.mh-blog-grid .et_pb_post .entry-featured-image-url { margin-bottom: 14px; }
.mh-blog-grid .et_pb_post .entry-title,
.mh-blog-grid .et_pb_post .post-meta,
.mh-blog-grid .et_pb_post .post-content { padding: 0 18px; }
.mh-blog-grid .et_pb_post .entry-title a { color: #000; }
.mh-blog-grid .wp-pagenavi,
.mh-blog-grid .pagination { margin-top: 28px; }

/* ============ Category sidebars (shop / horoscopes) ============ */
.mh-side-nav h3 {
	font-size: .8rem; letter-spacing: .2em; text-transform: uppercase;
	font-family: var(--mh-sans); margin: 0 0 14px;
}
.mh-side-nav ul { list-style: none; margin: 0; padding: 0 !important; }
.mh-side-nav li { border-bottom: 1px solid var(--mh-hairline); }
.mh-side-nav li a { display: block; padding: 10px 0; color: #111; text-decoration: none; font-size: .92rem; }
.mh-side-nav li a:hover { color: var(--mh-link); }
.mh-side-nav li.current-cat > a { font-weight: 700; color: #000; }
.mh-side-nav ul ul { margin-left: 14px; }
.mh-side-nav ul ul li:last-child { border-bottom: 0; }

/* ============ My Account navigation (same treatment as .mh-side-nav) ====== */
.woocommerce-MyAccount-navigation ul { list-style: none; margin: 0; padding: 0 !important; }
.woocommerce-MyAccount-navigation li {
  list-style: none !important;
  border-bottom: 1px solid var(--mh-hairline);
}
.woocommerce-MyAccount-navigation li a {
	display: block; padding: 10px 0; color: #111; text-decoration: none;
	font-size: .92rem;
}
.woocommerce-MyAccount-navigation li a:hover { color: var(--mh-link); }
.woocommerce-MyAccount-navigation li.is-active > a { font-weight: 700; color: #000; }

/* ============ Shop loop (Theme Builder shop/category template) ============ */
.mh-shop-header h1 { margin-bottom: 8px; }
.mh-shop-loop .woocommerce-result-count { color: var(--mh-muted); font-size: .85rem; }
.mh-shop-loop ul.products { padding: 0; }
.mh-shop-loop ul.products li.product .woocommerce-loop-product__title {
	font-family: var(--mh-serif); color: var(--mh-text);
}

/* ============ Horoscope archive ============ */
.mh-horoscope-filter { display: flex; flex-wrap: wrap; gap: 10px; margin: 0 0 28px; }
.mh-horoscope-filter a {
	display: inline-block; padding: 8px 18px; border: 1px solid #111;
	font-size: 12px; letter-spacing: .16em; text-transform: uppercase;
	color: #111; text-decoration: none;
}
.mh-horoscope-filter a.is-active,
.mh-horoscope-filter a:hover { background: #000; color: #fff; }
.mh-horoscope-list { display: flex; flex-direction: column; }
.mh-horoscope-item {
	display: flex; gap: 26px; align-items: flex-start;
	padding: 24px 0; border-bottom: 1px solid var(--mh-hairline);
}
.mh-horoscope-item:first-child { border-top: 1px solid var(--mh-hairline); }
.mh-horoscope-thumb { flex: 0 0 220px; }
.mh-horoscope-thumb img { width: 100%; height: auto; display: block; }
.mh-horoscope-body { flex: 1 1 auto; min-width: 0; }
.mh-horoscope-body .mh-eyebrow { margin-bottom: 4px; }
.mh-horoscope-body h3 { margin: 0 0 6px; font-size: 22px; }
.mh-horoscope-body h3 a { color: #000; text-decoration: none; }
.mh-horoscope-body h3 a:hover { color: var(--mh-link); }
.mh-horoscope-body time { display: block; font-size: 12px; color: #666; margin-bottom: 8px; }
.mh-horoscope-pagination { margin-top: 32px; }
body.et-db #et-boc .et-l .mh-horoscope-pagination ul.page-numbers {
	display: flex !important; flex-wrap: wrap; gap: 8px; list-style: none;
	margin: 0; padding: 0 !important; justify-content: center;
}
body.et-db #et-boc .et-l .mh-horoscope-pagination ul.page-numbers > li { margin: 0; padding: 0; list-style: none; }
.mh-horoscope-pagination ul.page-numbers {
	border: 0;
	min-width: 0;
}
.mh-horoscope-pagination li .page-numbers {
	display: inline-block; min-width: 38px; padding: 8px 10px; text-align: center;
	border: 1px solid #111; color: #111; text-decoration: none; font-size: 13px;
}
.mh-horoscope-pagination .page-numbers.current,
.mh-horoscope-pagination a.page-numbers:hover { background: #000; color: #fff; }

@media (max-width: 600px) {
	.mh-horoscope-item { flex-direction: column; gap: 14px; }
	.mh-horoscope-thumb { flex-basis: auto; width: 100%; }
}
