/*
 Theme Name:   Woodmart Child
 Description:  Woodmart Child Theme
 Author:       XTemos
 Author URI:   http://xtemos.com
 Template:     woodmart
 Version:      1.0.0
 Text Domain:  woodmart
*/

/* =========================================================
   Shopify-style left sidebar navigation
   Reference: https://vaporcafeonline.net/ (see context/screenshots/)
   Colors: border #3f94cd, text #575e62
   ========================================================= */

/* --- Sidebar column: fixed 220px + theme 30px gap (Shopify: 250px col incl. gutter).
       Covers both the page/shop layout grid and the nested single-product grid. --- */
@media (min-width: 769px) {
	.wd-grid-g:has(> .wd-sidebar.sidebar-left) {
		grid-template-columns: 220px repeat(11, minmax(0, 1fr));
	}

	.wd-grid-g > .wd-sidebar.sidebar-left {
		grid-column: 1 / span 1;
	}

	.wd-grid-g:has(> .wd-sidebar.sidebar-left) > .wd-content-area,
	.wd-grid-g:has(> .wd-sidebar.sidebar-left) > .product-image-summary {
		grid-column: 2 / span 11;
	}
}

/* --- Nav list --- */
.wd-sidebar .widget_nav_menu {
	margin-bottom: 30px;
}

.wd-sidebar .widget_nav_menu ul.menu,
.wd-sidebar .widget_nav_menu ul.sub-menu {
	list-style: none;
	margin: 0;
	padding: 0;
}

.wd-sidebar .widget_nav_menu ul.menu li {
	margin: 0;
	padding: 0;
}

.wd-sidebar .widget_nav_menu ul.menu > li {
	border-bottom: 1px solid #3f94cd;
}

.wd-sidebar .widget_nav_menu ul.menu > li:first-child {
	border-top: 1px solid #3f94cd;
}

.wd-sidebar .widget_nav_menu a {
	display: block;
	padding: 12px 0;
	font-size: 16px;
	line-height: 1.6;
	color: #575e62;
}

.wd-sidebar .widget_nav_menu a:hover {
	color: #3f94cd;
}

.wd-sidebar .widget_nav_menu li.current-menu-item > a {
	color: #575e62;
	font-weight: 700;
}

/* --- Submenu (accordion) --- */
.wd-sidebar .widget_nav_menu ul.sub-menu {
	display: none;
	margin: 0 0 16px;
}

.wd-sidebar .widget_nav_menu li.wd-nav-opened > ul.sub-menu {
	display: block;
}

.wd-sidebar .widget_nav_menu ul.sub-menu a {
	padding: 4px 0;
	font-size: 13.6px;
}

/* --- +/− toggle on items with children --- */
.wd-sidebar .widget_nav_menu .menu-item-has-children > a {
	position: relative;
	padding-right: 20px;
}

.wd-shopify-nav-toggle {
	position: absolute;
	top: 50%;
	right: 0;
	transform: translateY(-50%);
	opacity: .8;
}

.wd-shopify-nav-toggle::before {
	content: "+";
}

.wd-sidebar .widget_nav_menu li.wd-nav-opened > a .wd-shopify-nav-toggle::before {
	content: "\2212"; /* minus sign */
}

/* --- Top border on main content, aligned with sidebar top border (all pages except homepage).
       On single product the sidebar is nested inside .wd-content-area, on other pages it is a
       sibling — scoping :has() to body covers both. --- */
@media (min-width: 769px) {
	body:not(.home):not(.single-product):has(.wd-sidebar.sidebar-left) .wd-content-area.site-content {
		border-top: 1px solid #3f94cd;
	}

	/* On single product the sidebar sits inside .wd-content-area, so the line goes on
	   the product column itself — two separate lines with a gap, like on Shopify. */
	body.single-product .wd-grid-g:has(> .wd-sidebar.sidebar-left) > .product-image-summary {
		border-top: 1px solid #3f94cd;
	}
}

/* ============================================================
   Age verify popup — Shopify-style DOB gate
   (values measured from the HulkApps age gate on vaporcafeonline.net;
   markup rendered by woodmart_age_verify_popup() override in functions.php)
   ============================================================ */

.mfp-wrap.wd-age-verify-wrap {
	--wd-popup-width: 400px;
	--wd-popup-padding: 32px;
}

/* Shopify pins the gate near the top of the viewport instead of centering it */
.mfp-wrap.wd-age-verify-wrap .mfp-container {
	padding-top: 32px;
	align-items: flex-start;
}

/* Shopify dims the page towards white, not black */
.mfp-bg:has(+ .mfp-wrap.wd-age-verify-wrap) {
	background-color: rgba(255, 255, 255, .85);
}

/* white overlay needs a visible popup edge */
.mfp-wrap.wd-age-verify-wrap .wd-popup.wd-age-verify {
	box-shadow: 0 0 8px rgba(0, 0, 0, .15);
}

.wd-popup.wd-age-verify {
	border-radius: 2px;
}

.wd-age-verify .wd-age-verify-text p {
	font-size: 15px;
	line-height: 1.4;
	color: #3d4246;
	margin-bottom: 12px;
}

/* logo image block */
.wd-age-verify .wd-age-verify-text p:first-child {
	margin-bottom: 24px;
}

/* Red feedback line between message and fields. Shopify always reserves its
   space (~34px), so keep the block in flow and toggle visibility only. */
.wd-popup.wd-age-verify .wd-age-verify-text-error {
	display: block;
	visibility: hidden;
	animation: none;
	margin-top: 12px;
	min-height: 34px;
}

.wd-popup.wd-age-verify.wd-forbidden .wd-age-verify-text-error {
	visibility: visible;
	animation: wd-fadeIn .6s ease;
}

.wd-age-verify .wd-age-verify-text-error p {
	font-size: 12px;
	line-height: 1.4;
	color: #b00;
	margin-bottom: 0;
}

/* Woodmart hides .wd-age-verify-text in the forbidden state — keep it visible */
.wd-popup.wd-age-verify.wd-forbidden .wd-age-verify-text {
	display: block;
}

/* --- DOB form --- */
.wd-age-verify .wd-age-verify-dob {
	margin-top: 12px;
}

.wd-age-verify .wd-dob-fields {
	display: flex;
	justify-content: center;
}

.wd-age-verify .wd-dob-field {
	display: flex;
	flex-direction: column;
	align-items: center;
	margin-inline-end: 8px;
}

.wd-age-verify .wd-dob-field:last-child {
	margin-inline-end: 0;
}

.wd-age-verify .wd-dob-field label {
	font-size: 11px;
	font-weight: 700;
	line-height: 1.1;
	color: #4a4a4a;
	margin: 0 0 4px;
}

.wd-age-verify .wd-dob-field select {
	-webkit-appearance: none;
	appearance: none;
	background: #fff;
	background-image: none;
	border: 1px solid #949494;
	border-radius: 2px;
	box-shadow: none;
	color: #000;
	font-size: 15px;
	line-height: 1.15;
	height: auto;
	width: auto;
	max-width: none;
	padding: 10px 18px;
	cursor: pointer;
}

.wd-age-verify .wd-dob-submit {
	margin-top: 32px;
}

.wd-age-verify .wd-dob-submit input[type="submit"] {
	background-color: #fff;
	border: 1px solid #949494;
	border-radius: 2px;
	box-shadow: none;
	color: #000;
	font-size: 15px;
	font-weight: 400;
	letter-spacing: normal;
	text-transform: none;
	line-height: 1.15;
	height: auto;
	min-height: 0;
	padding: 10px 18px;
	cursor: pointer;
}

.wd-age-verify .wd-dob-submit input[type="submit"]:hover {
	background-color: #f5f5f5;
	color: #000;
}

.wd-age-verify .wd-age-verify-disclaimer {
	margin-top: 22px;
	font-size: 11px;
	line-height: 1.4;
	color: #3d4246;
}

/* ============================================================
   Product variation dropdown — sold-out flavors
   (options disabled + labeled by woodmart_child_variation_dropdown_stock_labels()
   in functions.php)
   ============================================================ */

.variations select option:disabled {
	color: #a5a5a5;
}
