/*
Theme Name: Astek Classic
Theme URI: https://astekcorp.com/
Author: Astek Corporation
Description: A responsive WordPress recreation of Astek Corporation's Joomla DestinyFX/Gantry design.
Version: 1.0.0
Requires at least: 6.4
Tested up to: 6.8
Requires PHP: 7.4
Text Domain: astek-classic
License: GNU General Public License v2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
*/

:root {
	--astek-orange: #ff9d00;
	--astek-orange-dark: #e78900;
	--astek-teal: #143d4b;
	--astek-text: #454545;
	--astek-muted: #7e7e7e;
	--astek-border: #e2e2e2;
	--astek-surface: #f7f7f7;
	--astek-width: 1030px;
}

*,
*::before,
*::after {
	box-sizing: border-box;
}

html {
	scroll-behavior: smooth;
}

body {
	margin: 0;
	background: #fff;
	color: var(--astek-text);
	font-family: Arial, Helvetica, sans-serif;
	font-size: 14px;
	line-height: 1.55;
}

body.admin-bar .site-header {
	top: 32px;
}

img {
	max-width: 100%;
	height: auto;
}

a {
	color: var(--astek-orange-dark);
	text-decoration: none;
	transition: color .18s ease, background-color .18s ease;
}

a:hover,
a:focus {
	color: #b86e00;
}

button,
input,
select,
textarea {
	font: inherit;
}

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

.screen-reader-text:focus {
	position: fixed;
	z-index: 100000;
	top: 5px;
	left: 5px;
	width: auto;
	height: auto;
	padding: 12px 18px;
	clip: auto;
	background: #fff;
	color: #111;
}

.site-wrap {
	width: min(calc(100% - 40px), var(--astek-width));
	margin-inline: auto;
}

.topbar {
	min-height: 35px;
	border-bottom: 1px solid var(--astek-border);
	color: #7b7b7b;
	font-size: 12px;
}

.topbar__inner {
	display: grid;
	grid-template-columns: 1fr 1fr 1fr;
	align-items: center;
	min-height: 35px;
}

.topbar__phone::before {
	content: "●";
	margin-right: 10px;
	color: #7b8b91;
	font-size: 9px;
}

.topbar__cart {
	text-align: center;
}

.topbar__cart::before {
	content: "▾";
	display: inline-block;
	margin-right: 8px;
	transform: rotate(-45deg);
	color: #8b8b8b;
}

.topbar__account {
	text-align: right;
}

.topbar__button,
.woocommerce a.button,
.woocommerce button.button,
.woocommerce input.button,
.button {
	display: inline-block;
	padding: 6px 18px;
	border: 1px solid var(--astek-orange-dark);
	border-radius: 3px;
	background: var(--astek-orange);
	color: #fff;
	line-height: 1.1;
	text-shadow: 0 -1px rgba(0, 0, 0, .16);
	box-shadow: 0 1px 2px rgba(0, 0, 0, .2);
}

.topbar__button + .topbar__button {
	margin-left: 4px;
}

.topbar__button:hover,
.topbar__button:focus,
.button:hover,
.button:focus {
	background: var(--astek-orange-dark);
	color: #fff;
}

.masthead {
	background: #fff;
}

.masthead__inner {
	display: flex;
	align-items: center;
	justify-content: space-between;
	min-height: 88px;
	gap: 30px;
}

.site-branding {
	flex: 0 0 180px;
}

.custom-logo-link,
.default-logo {
	display: block;
	width: 180px;
}

.custom-logo {
	display: block;
	max-width: 180px;
	max-height: 70px;
	object-fit: contain;
}

.default-logo img {
	display: block;
	width: 180px;
	height: 65px;
	object-fit: contain;
}

.site-title {
	margin: 0;
	font-size: 28px;
	line-height: 1;
}

.menu-toggle {
	display: none;
	padding: 8px 12px;
	border: 1px solid var(--astek-border);
	border-radius: 3px;
	background: #fff;
	color: var(--astek-text);
}

.primary-menu,
.primary-menu ul {
	padding: 0;
	margin: 0;
	list-style: none;
}

.primary-menu {
	display: flex;
	align-items: center;
	gap: 4px;
}

.primary-menu li {
	position: relative;
}

.primary-menu > li > a {
	display: block;
	padding: 33px 17px;
	color: #777;
	font-size: 15px;
}

.primary-menu > .current-menu-item > a,
.primary-menu > .current-menu-ancestor > a,
.primary-menu > li > a:hover,
.primary-menu > li > a:focus {
	color: var(--astek-orange);
}

.primary-menu .sub-menu {
	position: absolute;
	z-index: 30;
	top: calc(100% - 16px);
	left: 0;
	visibility: hidden;
	opacity: 0;
	transition: opacity .2s ease, visibility 0s linear .2s;
	min-width: 240px;
	padding: 8px 0;
	border-top: 3px solid var(--astek-orange);
	background: var(--astek-teal);
	box-shadow: 0 8px 22px rgba(0, 0, 0, .18);
}

.primary-menu li:hover > .sub-menu,
.primary-menu li:focus-within > .sub-menu {
	visibility: visible;
	opacity: 1;
	transition: opacity .1s ease;
}

.primary-menu .sub-menu a {
	display: block;
	padding: 9px 16px;
	color: #eef4f6;
}

.primary-menu .sub-menu a:hover,
.primary-menu .sub-menu a:focus {
	background: rgba(255, 255, 255, .08);
	color: var(--astek-orange);
}

.primary-menu .sub-menu .sub-menu {
	top: -8px;
	left: 100%;
}

.context-bar {
	min-height: 41px;
	background: var(--astek-teal);
	color: #fff;
}

.context-bar__inner {
	display: flex;
	align-items: center;
	justify-content: space-between;
	min-height: 41px;
	gap: 24px;
}

.header-search {
	width: 190px;
}

.header-search .search-form {
	display: flex;
}

.header-search label {
	width: 100%;
}

.header-search .search-field {
	width: 100%;
	height: 30px;
	padding: 4px 14px;
	border: 1px solid #d8d8d8;
	border-radius: 0;
	background: #fff;
	color: var(--astek-text);
}

.header-search .search-submit {
	display: none;
}

.breadcrumbs {
	font-size: 12px;
	font-weight: 700;
}

.breadcrumbs a {
	color: #fff;
}

.breadcrumbs__label {
	margin-right: 13px;
}

.page-shell {
	padding: 50px 0 70px;
}

.content-grid {
	display: grid;
	grid-template-columns: minmax(0, 1fr) 260px;
	gap: 42px;
}

.content-grid--full {
	grid-template-columns: minmax(0, 1fr);
}

.entry-title,
.archive-title {
	margin: 0 0 20px;
	color: #383838;
	font-size: 27px;
	line-height: 1.25;
	font-weight: 500;
}

.entry-content > *:first-child {
	margin-top: 0;
}

.entry-content h2,
.entry-content h3,
.entry-content h4 {
	color: #3d3d3d;
	line-height: 1.25;
}

.entry-content table {
	width: 100%;
	border-collapse: collapse;
}

.entry-content th,
.entry-content td {
	padding: 10px;
	border: 1px solid var(--astek-border);
	text-align: left;
}

.entry-meta {
	margin: -12px 0 20px;
	color: var(--astek-muted);
	font-size: 12px;
}

.post-card {
	padding: 0 0 32px;
	margin: 0 0 32px;
	border-bottom: 1px solid var(--astek-border);
}

.post-card .entry-title {
	font-size: 23px;
}

.sidebar .widget {
	padding: 0 0 26px;
	margin: 0 0 26px;
	border-bottom: 1px solid var(--astek-border);
}

.widget-title {
	margin: 0 0 14px;
	font-size: 18px;
}

.widget ul {
	padding-left: 18px;
}

.pagination {
	margin-top: 30px;
}

.nav-links {
	display: flex;
	gap: 6px;
}

.page-numbers {
	padding: 6px 10px;
	border: 1px solid var(--astek-border);
}

.page-numbers.current {
	background: var(--astek-orange);
	color: #fff;
}

/* Homepage */
.home-slider-section {
	position: relative;
	padding: 60px 0;
	overflow: hidden;
	background-color: #f2f2f2;
	background-image:
		linear-gradient(rgba(255,255,255,.47) 1px, transparent 1px),
		linear-gradient(90deg, rgba(255,255,255,.47) 1px, transparent 1px);
	background-size: 6px 6px;
}

.astek-slider {
	position: relative;
	height: 350px;
	background: #e9e9e9;
	box-shadow: 0 34px 19px -25px rgba(0, 0, 0, .78);
}

.astek-slide {
	position: absolute;
	inset: 0;
	opacity: 0;
	visibility: hidden;
	transition: opacity .65s ease, visibility .65s ease;
}

.astek-slide.is-active {
	opacity: 1;
	visibility: visible;
}

.astek-slide img {
	width: 100%;
	height: 350px;
	object-fit: cover;
}

.astek-slide__caption {
	position: absolute;
	left: 45px;
	bottom: 34px;
	max-width: 430px;
	padding: 16px 22px;
	background: rgba(20, 61, 75, .9);
	color: #fff;
}

.astek-slide__caption h2 {
	margin: 0 0 5px;
	color: var(--astek-orange);
	font-size: 25px;
}

.astek-slide__caption p {
	margin: 0;
}

.slider-dots {
	position: absolute;
	z-index: 5;
	right: 16px;
	bottom: 14px;
	display: flex;
	gap: 7px;
}

.slider-dot {
	width: 10px;
	height: 10px;
	padding: 0;
	border: 1px solid #fff;
	border-radius: 50%;
	background: transparent;
	box-shadow: none;
}

.slider-dot.is-active {
	background: var(--astek-orange);
}

.home-categories {
	padding: 60px 0;
	background: var(--astek-surface);
	border-bottom: 1px solid var(--astek-border);
}

.category-grid {
	display: grid;
	grid-template-columns: repeat(3, 1fr);
	border: 1px solid var(--astek-border);
	background: #fff;
}

.category-card {
	min-width: 0;
	padding: 2px 28px 24px;
	text-align: center;
}

.category-card + .category-card {
	border-left: 1px solid var(--astek-border);
}

.category-card__image {
	display: flex;
	align-items: center;
	justify-content: center;
	height: 165px;
}

.category-card__image img {
	max-height: 160px;
	object-fit: contain;
}

.category-card h3 {
	margin: 5px 0 7px;
	color: #404040;
	font-size: 18px;
}

.category-card p {
	margin: 0;
	color: var(--astek-orange);
	font-size: 13px;
}

.featured-products {
	padding: 57px 0 70px;
}

.section-title {
	padding-bottom: 14px;
	margin: 0 0 24px;
	border-bottom: 1px solid var(--astek-border);
	color: #3d3d3d;
	font-size: 18px;
}

.legacy-product-table {
	width: 100%;
	border-collapse: collapse;
	font-size: 13px;
}

.legacy-product-table th {
	padding: 10px 8px;
	color: #222;
	font-weight: 400;
	text-align: left;
}

.legacy-product-table th:last-child {
	text-align: right;
}

.legacy-product-table td {
	padding: 10px 8px 18px;
	border-top: 1px solid var(--astek-border);
	vertical-align: top;
}

.legacy-product-table tbody tr:nth-child(odd) {
	background: #fafafa;
}

.legacy-product-table__image {
	width: 84px;
}

.legacy-product-table__image img {
	width: 68px;
	height: 55px;
	object-fit: contain;
}

.legacy-product-table__name {
	display: block;
	margin-bottom: 26px;
	color: #555;
	font-weight: 700;
}

.legacy-product-table__description {
	color: #333;
	line-height: 1.35;
}

.legacy-product-table__price {
	width: 130px;
	text-align: right;
	white-space: nowrap;
}

.legacy-product-table__price strong {
	color: var(--astek-orange);
}

.legacy-product-table__price .button {
	margin-top: 7px;
	padding: 7px 12px;
	border-color: #cfcfcf;
	background: #fff;
	color: #333;
	text-shadow: none;
	box-shadow: none;
}

.home-page-content {
	padding-top: 35px;
}

/* Footer */
.site-footer {
	background: var(--astek-teal);
	color: #dbe4e7;
	font-size: 12px;
}

.footer-widgets {
	display: grid;
	grid-template-columns: repeat(3, 1fr);
	gap: 34px;
	padding: 35px 0 18px;
}

.footer-widgets .widget-title {
	color: #fff;
}

.footer-widgets a {
	color: #fff;
}

.footer-bottom {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 25px;
	padding: 19px 0;
	border-top: 1px solid rgba(255, 255, 255, .14);
}

.footer-menu {
	display: flex;
	flex-wrap: wrap;
	justify-content: flex-end;
	gap: 6px 15px;
	padding: 0;
	margin: 0;
	list-style: none;
}

.footer-menu a {
	color: #fff;
}

.to-top {
	position: fixed;
	z-index: 20;
	right: 20px;
	bottom: 20px;
	display: none;
	width: 38px;
	height: 38px;
	border: 0;
	border-radius: 3px;
	background: var(--astek-orange);
	color: #fff;
	box-shadow: 0 3px 8px rgba(0, 0, 0, .22);
}

.to-top.is-visible {
	display: block;
}

/* WordPress and WooCommerce */
.alignleft {
	float: left;
	margin: 0 22px 16px 0;
}

.alignright {
	float: right;
	margin: 0 0 16px 22px;
}

.aligncenter {
	display: block;
	margin-right: auto;
	margin-left: auto;
}

.wp-caption {
	max-width: 100%;
}

.wp-caption-text,
.gallery-caption {
	color: var(--astek-muted);
	font-size: 12px;
}

.sticky,
.bypostauthor {
	display: block;
}

.woocommerce .products ul,
.woocommerce ul.products {
	display: grid;
	grid-template-columns: repeat(3, 1fr);
	gap: 25px;
}

.woocommerce ul.products::before,
.woocommerce ul.products::after {
	display: none;
}

.woocommerce ul.products li.product {
	float: none;
	width: auto;
	margin: 0;
	padding: 18px;
	border: 1px solid var(--astek-border);
}

.woocommerce ul.products li.product .price,
.woocommerce div.product p.price {
	color: var(--astek-orange-dark);
}

.woocommerce span.onsale {
	background: var(--astek-orange);
}

@media (max-width: 900px) {
	body.admin-bar .site-header {
		top: 46px;
	}

	.site-wrap {
		width: min(calc(100% - 28px), var(--astek-width));
	}

	.masthead__inner {
		min-height: 76px;
	}

	.menu-toggle {
		display: block;
	}

	.primary-navigation {
		position: relative;
	}

	.primary-menu {
		position: absolute;
		z-index: 50;
		top: 45px;
		right: 0;
		display: none;
		width: min(84vw, 340px);
		align-items: stretch;
		padding: 8px 0;
		background: var(--astek-teal);
		box-shadow: 0 10px 25px rgba(0, 0, 0, .23);
	}

	.primary-navigation.is-open .primary-menu {
		display: block;
	}

	.primary-menu > li > a {
		padding: 11px 17px;
		color: #fff;
	}

	.primary-menu .sub-menu {
		position: static;
		display: block;
		visibility: visible;
		opacity: 1;
		transition: none;
		padding: 0 0 4px 18px;
		border: 0;
		box-shadow: none;
	}

	.content-grid {
		grid-template-columns: minmax(0, 1fr);
	}

	.astek-slider,
	.astek-slide img {
		height: 300px;
	}

	.category-card {
		padding-inline: 15px;
	}

	.woocommerce .products ul,
	.woocommerce ul.products {
		grid-template-columns: repeat(2, 1fr);
	}
}

@media (max-width: 640px) {
	.topbar__inner {
		grid-template-columns: 1fr auto;
	}

	.topbar__cart {
		display: none;
	}

	.topbar__account {
		display: flex;
	}

	.topbar__button {
		padding-inline: 10px;
	}

	.site-branding,
	.custom-logo-link,
	.default-logo {
		flex-basis: 145px;
		width: 145px;
	}

	.default-logo img,
	.custom-logo {
		max-width: 145px;
		height: auto;
	}

	.context-bar__inner {
		align-items: stretch;
		flex-direction: column;
		gap: 7px;
		padding: 7px 0;
	}

	.header-search {
		width: 100%;
	}

	.breadcrumbs {
		text-align: right;
	}

	.home-slider-section {
		padding: 25px 0;
	}

	.astek-slider,
	.astek-slide img {
		height: 230px;
	}

	.astek-slide__caption {
		right: 15px;
		bottom: 18px;
		left: 15px;
		padding: 11px 15px;
	}

	.astek-slide__caption h2 {
		font-size: 18px;
	}

	.home-categories {
		padding: 35px 0;
	}

	.category-grid {
		grid-template-columns: 1fr;
	}

	.category-card + .category-card {
		border-top: 1px solid var(--astek-border);
		border-left: 0;
	}

	.category-card__image {
		height: 145px;
	}

	.legacy-product-table thead {
		display: none;
	}

	.legacy-product-table,
	.legacy-product-table tbody,
	.legacy-product-table tr,
	.legacy-product-table td {
		display: block;
		width: 100%;
	}

	.legacy-product-table tr {
		position: relative;
		padding: 15px 12px;
		border-top: 1px solid var(--astek-border);
	}

	.legacy-product-table td {
		padding: 3px 0;
		border: 0;
	}

	.legacy-product-table__image {
		float: left;
		width: 78px;
	}

	.legacy-product-table__name {
		margin-bottom: 8px;
	}

	.legacy-product-table__price {
		clear: both;
		text-align: left;
	}

	.footer-widgets {
		grid-template-columns: 1fr;
	}

	.footer-bottom {
		align-items: flex-start;
		flex-direction: column;
	}

	.footer-menu {
		justify-content: flex-start;
	}

	.woocommerce .products ul,
	.woocommerce ul.products {
		grid-template-columns: 1fr;
	}
}

/* Center and constrain the featured products table */
.featured-products .container {
    max-width: 1140px;
    margin-left: auto;
    margin-right: auto;
    padding-left: 15px;
    padding-right: 15px;
}
.featured-products .legacy-product-table {
    max-width: 1140px;
    margin: 0 auto;
}

/* ---- Sticky footer: pin footer to viewport bottom on short pages ---- */
body {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

body.admin-bar {
    min-height: calc(100vh - 32px);
}

@media (max-width: 782px) {
    body.admin-bar {
        min-height: calc(100vh - 46px);
    }
}

.site-main {
    flex: 1 0 auto;
}

.site-footer {
    flex-shrink: 0;
}

/* ---- Footer bottom: legacy centered layout with pipe separators ---- */
.footer-bottom {
    flex-direction: column;
    align-items: center;
    gap: 10px;
    text-align: center;
}

.footer-menu {
    justify-content: center;
    gap: 4px 0;
}

.footer-menu li {
    display: flex;
    align-items: center;
}

.footer-menu li::before {
    content: "|";
    margin: 0 9px;
    color: rgba(255, 255, 255, .45);
}

.footer-menu li:last-child::after {
    content: "|";
    margin: 0 9px;
    color: rgba(255, 255, 255, .45);
}

/* ---- Topbar: current user display ---- */
.topbar__user {
    margin-right: 10px;
}

@media (max-width: 640px) {
    .topbar__user {
        display: none;
    }
}

/* ---- Topbar: pinned on scroll + real phone/cart icons (old-site behavior) ---- */
.topbar {
    position: sticky;
    top: 0;
    z-index: 100;
    background: #fff;
}

body.admin-bar .topbar {
    top: 32px;
}

@media (max-width: 782px) {
    body.admin-bar .topbar {
        top: 46px;
    }
}

.topbar__phone::before {
    content: "";
    display: inline-block;
    width: 13px;
    height: 13px;
    vertical-align: -2px;
    background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="%237b8b91"><path d="M6.62 10.79c1.44 2.83 3.76 5.14 6.59 6.59l2.2-2.2c.27-.27.67-.36 1.02-.24 1.12.37 2.33.57 3.57.57.55 0 1 .45 1 1V20c0 .55-.45 1-1 1-9.39 0-17-7.61-17-17 0-.55.45-1 1-1h3.5c.55 0 1 .45 1 1 0 1.25.2 2.45.57 3.57.11.35.03.74-.25 1.02l-2.2 2.2z"/></svg>') no-repeat center / contain;
}

.topbar__cart::before {
    content: "";
    display: inline-block;
    width: 14px;
    height: 14px;
    margin-right: 8px;
    vertical-align: -2px;
    transform: none;
    background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="%238b8b8b"><path d="M7 18c-1.1 0-1.99.9-1.99 2S5.9 22 7 22s2-.9 2-2-.9-2-2-2zM1 2v2h2l3.6 7.59-1.35 2.45c-.16.28-.25.61-.25.96 0 1.1.9 2 2 2h12v-2H7.42c-.14 0-.25-.11-.25-.25l.03-.12.9-1.63h7.45c.75 0 1.41-.41 1.75-1.03l3.58-6.49c.08-.14.12-.31.12-.49 0-.55-.45-1-1-1H5.21l-.94-2H1zm15 16c-1.1 0-1.99.9-1.99 2s.89 2 1.99 2 2-.9 2-2-.9-2-2-2z"/></svg>') no-repeat center / contain;
}
