/*
Theme Name: reclaimdev Child
Theme URI: https://reclaimdev.com
Description: Lightweight child theme for reclaimdev front page panels (products slider, blog, YouTube).
Author: reclaimdev
Version: 1.3
Tags: custom, responsive
Text Domain: reclaimdev-child
*/

:root{
	--accent:#d62828;
	--bg:#ffffff;
	--text-primary:#111;
	--text-muted:#666;
	--border-subtle:#e5e5e5;
	--panel-shadow:0 18px 48px rgba(18,27,43,0.08);
}

body{
	font-family:'Inter',-apple-system,BlinkMacSystemFont,'Segoe UI',Helvetica,Arial,sans-serif;
	background:var(--bg);
	color:var(--text-primary);
	margin:0;
	line-height:1.6;
	display:flex;
	flex-direction:column;
	align-items:center;
}

main, .site{
	width:100%;
}

h1,h2,h3,.title{
	font-family:'Crimson Text',Georgia,'Times New Roman',serif;
	font-weight:700;
	letter-spacing:.01em;
	color:var(--text-primary);
}

/* Basic header */
.header{
	display:flex;
	justify-content:space-between;
	align-items:center;
	padding:22px 32px;
	background:#ffffff;
	border-bottom:1px solid var(--border-subtle);
}
.header .brand{font-weight:700;font-size:24px;}
.header .nav a{
	color:var(--text-primary);
	margin-left:18px;
	text-decoration:none;
	font-weight:600;
	transition:color .2s ease;
}
.top-nav{list-style:none;margin:0;padding:0;display:flex;gap:18px;align-items:center}
.top-nav li{margin:0}
.top-nav li a{color:var(--text-primary);text-decoration:none;padding:6px 10px;border-radius:6px}
.top-nav li a:hover{color:var(--accent);}

/* Grid layout for panels */
.front-grid{
	display:grid;
	grid-template-columns:minmax(0,2.1fr) minmax(0,1fr);
	grid-auto-rows:minmax(180px,auto);
	gap:28px;
	padding:32px 0 48px;
	max-width:960px;
	margin:0 auto;
}
@media (max-width:900px){.front-grid{grid-template-columns:1fr;}}

.panel{
	background:#ffffff;
	padding:24px;
	border-radius:16px;
	border:1px solid var(--border-subtle);
	box-shadow:var(--panel-shadow);
}
.panel.large{grid-row:span 2;min-height:420px;display:flex;flex-direction:column;gap:22px;}
.panel .title{font-size:22px;margin-bottom:14px;text-transform:uppercase;letter-spacing:.14em;}

/* Slider styles */
.swiper{width:100%;min-height:340px;}
.swiper-slide{
	display:flex;
	align-items:flex-end;
	justify-content:flex-start;
	background:#f6f6f6;
	color:var(--text-primary);
	position:relative;
	border-radius:12px;
	overflow:hidden;
	border:1px solid var(--border-subtle);
}
.slide-caption{
	position:absolute;
	inset:auto 0 0 0;
	padding:16px 18px;
	background:linear-gradient(180deg,rgba(15,23,32,0) 0%,rgba(15,23,32,0.55) 100%);
	color:#fff;
	font-family:'Crimson Text',Georgia,'Times New Roman',serif;
	font-size:20px;
}
.no-image{
	width:100%;
	height:100%;
	display:flex;
	flex-direction:column;
	justify-content:center;
	align-items:flex-start;
	padding:24px;
	background:#fafafa;
	color:var(--text-primary);
}

/* Blog list */
.blog-list .item{margin-bottom:18px;}
.blog-list .item a{color:var(--text-primary);text-decoration:none;font-weight:600;}
.blog-list .item a:hover{color:var(--accent);}
.blog-list .item .meta{font-size:14px;color:var(--text-muted);}

/* YouTube responsive */
.video-wrap{position:relative;padding-bottom:56.25%;height:0;border-radius:12px;overflow:hidden;}
.video-wrap iframe{position:absolute;left:0;top:0;width:100%;height:100%;}

footer.site-footer{
	text-align:center;
	padding:32px 18px 48px;
	color:var(--text-muted);
	border-top:1px solid var(--border-subtle);
	background:#ffffff;
}
.container{max-width:1040px;margin:0 auto;padding:0 24px;box-sizing:border-box;}

/* Single product layout */
.product-single{
	max-width:880px;
	margin:48px auto 96px;
}

.product-entry{
	padding:32px;
	gap:24px;
}

.product-breadcrumb{
	font-size:14px;
	text-transform:uppercase;
	letter-spacing:.12em;
	margin-bottom:16px;
	color:var(--text-muted);
}
.product-breadcrumb a{color:var(--text-muted);text-decoration:none;}
.product-breadcrumb .sep{margin:0 6px;}

.product-title{margin-bottom:24px;}

.product-hero{margin-bottom:28px;}
.product-featured-image{
	width:100%;
	height:auto;
	display:block;
	border-radius:16px;
	box-shadow:0 20px 60px rgba(15,23,32,0.18);
}

.product-meta{
	display:flex;
	flex-wrap:wrap;
	gap:16px;
	align-items:center;
	margin-bottom:24px;
}
.product-price{font-weight:700;font-size:20px;}
.product-cta{
	padding:10px 18px;
	background:var(--accent);
	color:#fff;
	border-radius:999px;
	text-decoration:none;
	font-weight:600;
}

.product-content img{
	max-width:100%;
	height:auto;
	display:block;
	margin:22px auto;
	border-radius:12px;
}

.product-footer{margin-top:32px;}
.back-link{color:var(--accent);text-decoration:none;font-weight:600;}
/* === Submenu hover fix (2025-11-05) === */
@media (min-width: 768px) {
  /* Hide and position submenu by default on desktop */
  .top-nav .sub-menu {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    background: #fff;
    min-width: 200px;
    box-shadow: 0 6px 18px rgba(0,0,0,0.12);
    z-index: 9999;
    opacity: 0;
    visibility: hidden;
    transform: translateY(6px);
    transition: opacity .16s ease, transform .16s ease, visibility .16s;
  }
  /* Anchor absolute submenu to each li */
  .top-nav li { position: relative; }
  /* Reveal submenu on hover or keyboard focus */
  .top-nav li:hover > .sub-menu,
  .top-nav li:focus-within > .sub-menu {
    display: block;
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
  }
  /* Submenu item/link styles */
  .top-nav .sub-menu li { display: block; }
  .top-nav .sub-menu a {
    display: block;
    padding: 0.5rem 1rem;
    color: #222;
    text-decoration: none;
    white-space: nowrap;
  }
  .top-nav .sub-menu a:hover,
  .top-nav .sub-menu a:focus { background: rgba(0,0,0,0.04); color: #000; }
}
/* JS fallback hook (optional): show when parent has .hover */
.top-nav .menu-item-has-children.hover > .sub-menu {
  display: block;
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}
/* === End submenu hover fix === *//* === Mobile menu/layout fixes (2025-11-05) === */
@media (max-width: 768px) {
  .header { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
  .nav { position: relative; width: 100%; }
  /* Toggle button */
  .nav .menu-toggle { display: inline-flex; align-items: center; gap: 8px; padding: 10px 14px; background:#34495e; color:#fff; border:0; border-radius:6px; font-weight:600; cursor:pointer; }
  .nav .menu-toggle:focus { outline: 2px solid #3498db; outline-offset: 2px; }
  /* Collapsible menu */
  .top-nav { display: none; flex-direction: column; align-items: flex-start; gap: 0; margin-top: 10px; }
  .nav.is-open .top-nav, .top-nav.is-open { display: flex; }
  .top-nav > li { width: 100%; }
  .top-nav a { display: block; padding: 10px 12px; color: #fff; background: #34495e; border-top: 1px solid rgba(255,255,255,0.08); }
  .top-nav a:hover, .top-nav a:focus { background: #3f5874; }
  /* Submenu inside mobile: stacked, hidden until toggled */
  .top-nav .sub-menu { position: static; display: none; background: #2c3e50; box-shadow: none; opacity: 1; visibility: visible; transform: none; margin: 0; }
  .top-nav .menu-item-has-children.open > .sub-menu { display: block; }
  .top-nav .sub-menu a { background: #2c3e50; padding-left: 24px; }
  /* Caret toggle button for parents */
  .submenu-toggle { background: transparent; border: 0; color: #fff; padding: 10px 12px; cursor: pointer; margin-left: auto; }
  .submenu-toggle:focus { outline: 2px solid #3498db; outline-offset: 2px; }
}
/* === End mobile menu/layout fixes === *//* === Mobile menu button restyle (2025-11-05) === */
@media (max-width: 768px){
  .nav .menu-toggle {
    appearance: none; -webkit-appearance:none; -moz-appearance:none;
    background: transparent;
    color: #1f2937;
    border: 1px solid rgba(0,0,0,0.2);
    border-radius: 8px;
    padding: 8px 12px;
    line-height: 1;
    box-shadow: none;
  }
  .nav .menu-toggle::before{
    content: "\2630"; /* hamburger */
    font-size: 18px; margin-right: 8px; display:inline-block; vertical-align: middle;
  }
  .submenu-toggle{ color:#1f2937; padding:8px 10px; }
  .top-nav a{ color:#1f2937; background:#fff; }
  .top-nav a:hover,.top-nav a:focus{ background:#f4f6f8; }
  .top-nav .sub-menu a{ background:#f7fafc; }
}
/* === End mobile menu button restyle === *//* === Mobile responsiveness normalize (2025-11-05) === */
/* Prevent horizontal overflow */
html, body { overflow-x: hidden; }
/* Make media responsive by default */
img, svg, video, canvas, iframe { max-width: 100%; height: auto; }

@media (max-width: 768px){
  .container{ max-width: 100%; padding: 0 16px; }
  .header{ padding: 14px 16px; }
  .front-grid{ gap: 18px; padding: 16px 0 28px; max-width: 100%; }
  .panel{ padding: 16px; border-radius: 12px; }
  .panel.large{ min-height: 360px; }
  /* Slider smaller min height on phones */
  .swiper{ min-height: 260px; }
  .product-image, .no-image{ min-height: 220px; }
  /* Menu list items fit viewport */
  .top-nav{ width: 100%; }
}

@media (max-width: 420px){
  .header .brand{ font-size: 20px; }
  .panel .title{ font-size: 18px; }
}
/* === End mobile responsiveness normalize === */
/* === Desktop: hide mobile toggles (2025-11-05) === */
@media (min-width: 769px){
  .nav .menu-toggle, .submenu-toggle { display: none !important; }
}
/* === Mobile slider sizing adjustments === */
@media (max-width: 768px){
  .mySwiper, .swiper{ width: 100%; max-width: 100%; overflow: hidden; }
  .swiper-wrapper{ margin: 0; }
  .swiper-slide{ border-radius: 10px; }
  .product-image{ min-height: 180px; height: auto; }
}
/* === End desktop/mobile adjustments === */
