/*
Theme Name: AHM BMT
Theme URI: https://ahm-bmt.com
Author: AHM Building Materials Trading LLC
Author URI: https://ahm-bmt.com
Description: Custom WordPress theme for A H M Building Materials Trading LLC — Dubai's trusted supplier of building materials, hardware tools, safety equipment, rigging and lifting products. Converted from the RepairPlus HTML template and rebuilt around the AHM BMT content and SEO structure.
Version: 1.0.1
Requires at least: 5.9
Tested up to: 6.8
Requires PHP: 7.4
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: ahm-bmt
Tags: business, construction, building-materials, custom-menu, custom-logo, featured-images
*/

/* -------------------------------------------------------------
   The design styles live in css/style.css and css/responsive.css
   (enqueued from functions.php). This file holds only the theme
   header above and WordPress-specific adjustments below.
------------------------------------------------------------- */

/* WordPress core alignment / caption classes */
.alignnone { margin: 5px 20px 20px 0; }
.aligncenter, div.aligncenter { display: block; margin: 5px auto; }
.alignright { float: right; margin: 5px 0 20px 20px; }
.alignleft { float: left; margin: 5px 20px 20px 0; }
img.alignright { float: right; margin: 5px 0 20px 20px; }
img.alignleft { float: left; margin: 5px 20px 20px 0; }
.wp-caption { background: #fff; border: 1px solid #f0f0f0; max-width: 100%; padding: 5px 3px 10px; text-align: center; }
.wp-caption img { border: 0 none; height: auto; margin: 0; max-width: 98.5%; padding: 0; width: auto; }
.wp-caption p.wp-caption-text { font-size: 12px; line-height: 17px; margin: 0; padding: 5px 4px; }
.screen-reader-text { border: 0; clip: rect(1px, 1px, 1px, 1px); clip-path: inset(50%); height: 1px; margin: -1px; overflow: hidden; padding: 0; position: absolute !important; width: 1px; word-wrap: normal !important; }
.sticky, .bypostauthor, .gallery-caption { /* WP required classes */ }

/* Page / post typographic content */
.entry-content h1, .entry-content h2, .entry-content h3,
.entry-content h4, .entry-content h5, .entry-content h6 { margin: 25px 0 15px; color: #29303b; }
.entry-content p { margin-bottom: 15px; }
.entry-content ul, .entry-content ol { margin: 0 0 20px 20px; }
.entry-content ul li { list-style: disc; margin-bottom: 8px; }
.entry-content ol li { list-style: decimal; margin-bottom: 8px; }
.entry-content table { width: 100%; border-collapse: collapse; margin-bottom: 25px; }
.entry-content table th, .entry-content table td { border: 1px solid #e5e5e5; padding: 10px 15px; text-align: left; }
.entry-content table th { background: #f7f7f7; color: #29303b; }
.entry-content img { max-width: 100%; height: auto; }
.entry-content blockquote { border-left: 3px solid #0e8943; background: #f7f7f7; margin: 20px 0; padding: 20px 25px; font-style: italic; }
.entry-content a { color: #0e8943; text-decoration: underline; }
.entry-content a:hover { color: #0a6a33; }

/* WP menus: map .sub-menu to theme dropdown styles */
.main-menu .navigation li ul.sub-menu { min-width: 230px; }

/* Product specification table */
.ahm-specs-table { width: 100%; border-collapse: collapse; margin-bottom: 30px; }
.ahm-specs-table th, .ahm-specs-table td { border: 1px solid #e5e5e5; padding: 12px 18px; text-align: left; vertical-align: top; }
.ahm-specs-table th { background: #f7f7f7; color: #29303b; width: 32%; font-weight: 600; }

/* Product CTA block */
.ahm-product-cta { background: #29303b; padding: 35px 30px; margin-top: 40px; color: #fff; }
.ahm-product-cta h3 { color: #7bd39b; margin-bottom: 15px; }
.ahm-product-cta p { color: #c5c9d1; }
.ahm-product-cta ul { margin: 20px 0 0; }
.ahm-product-cta ul li { margin-bottom: 10px; color: #fff; }
.ahm-product-cta ul li a { color: #7bd39b; }
.ahm-product-cta .button { margin-top: 20px; }

/* Trust bar non-numeric stat */
.fact-counter-area .single-item h1 .static-stat { font-size: 34px; line-height: 60px; display: inline-block; }

/* WhatsApp floating button */
.ahm-whatsapp-float { position: fixed; bottom: 25px; left: 25px; z-index: 9999; width: 55px; height: 55px; border-radius: 50%; background: #25d366; color: #fff; text-align: center; line-height: 55px; font-size: 26px; box-shadow: 0 3px 12px rgba(0,0,0,.3); transition: all .3s ease; }
.ahm-whatsapp-float:hover { background: #1ebe5b; color: #fff; transform: scale(1.07); }

/* Comments */
.ahm-comments { margin-top: 40px; }
.ahm-comments .comment-list { margin: 0 0 30px; }
.ahm-comments .comment-list li { list-style: none; margin-bottom: 25px; border-bottom: 1px solid #eee; padding-bottom: 20px; }
.ahm-comments .comment-list .children { margin: 20px 0 0 40px; }
.ahm-comments .comment-author img { border-radius: 50%; margin-right: 12px; float: left; }
.ahm-comments .comment-meta { font-size: 13px; color: #9a9a9a; margin-bottom: 8px; }
.ahm-comments .comment-form input[type="text"],
.ahm-comments .comment-form input[type="email"],
.ahm-comments .comment-form input[type="url"],
.ahm-comments .comment-form textarea { width: 100%; border: 1px solid #e5e5e5; padding: 10px 15px; margin-bottom: 15px; }
.ahm-comments .comment-form .submit { background: #0e8943; border: none; color: #fff; font-weight: 600; padding: 12px 30px; text-transform: uppercase; cursor: pointer; }
.ahm-comments .comment-form .submit:hover { background: #0a6a33; }

/* Contact form notices */
.ahm-form-notice { padding: 15px 20px; margin-bottom: 25px; border-left: 3px solid #4caf50; background: #f0f9f1; }
.ahm-form-notice.error { border-color: #e53935; background: #fdf0f0; }

/* Pagination (WP the_posts_pagination) */
.post-pagination li span.current { background: #0e8943; color: #fff; }
.post-pagination li .page-numbers { display: inline-block; }

/* Password form, galleries, misc */
.post-password-form input[type="password"] { border: 1px solid #e5e5e5; padding: 8px 12px; }

/* --- Hero readability on the new photographic slide backgrounds --- */
.rev_slider_wrapper .slide-content-box h1 {
	color: #ffffff;
	text-shadow: 0 2px 12px rgba(0, 0, 0, .45);
}
.rev_slider_wrapper .slide-content-box p {
	color: #eef1f6;
	text-shadow: 0 1px 6px rgba(0, 0, 0, .4);
}
/* Slight scrim so text stays legible regardless of the photo */
.rev_slider_wrapper .tp-caption .slide-content-box {
	position: relative;
}

/* --- Brand green theme to match the previous ahm-bmt.com site --- */
/* Primary green: #0e8943 · darker (hover): #0c7a3b · deepest: #0a6a33 */

/* Main navigation bar green (old site had a green nav, not dark navy) */
.mainmenu-area,
.mainmenu-area.stricky-fixed,
.main-menu .navbar-collapse {
	background: #0e8943;
}
.main-menu .navigation > li:hover > a,
.main-menu .navigation > li.current > a {
	background: #0c7a3b;
	color: #ffffff;
}
/* Dropdown submenus */
.main-menu .navigation > li > ul,
.main-menu .navigation > li > ul > li > ul {
	background: #0c7a3b;
}
.main-menu .navigation > li > ul > li:hover > a {
	background: #0a6a33;
	color: #ffffff;
}
.main-menu .navigation > li > ul > li {
	border-bottom-color: rgba(255, 255, 255, .12);
}

/* Hero primary button: green fill, deeper-green hover */
.rev_slider_wrapper .slide-content-box .button a.bg-1 {
	border-color: #0e8943;
	background: #0e8943;
}
.rev_slider_wrapper .slide-content-box .button a.bg-1:hover {
	border-color: #0a6a33;
	background: #0a6a33;
}

/* Fallback logo text (shown until a logo image is uploaded in the Customizer).
   Sized so a long site title / temporary domain never blows up the header. */
.ahm-logo-text {
	display: inline-block;
	margin: 20px 0;
	color: #29303b;
	font-weight: 700;
	font-size: 24px;
	line-height: 1.25;
	word-break: break-word;
}
.ahm-logo-text:hover { color: #0e8943; }
@media only screen and (max-width: 767px) {
	.ahm-logo-text { font-size: 18px; margin: 14px 0; text-align: center; display: block; }
}

/* Single product featured image: centered, tidy frame */
.single-ahm_product .blog-with-sidebar-area .entry-content + * img,
.single-ahm_product img.attachment-large {
	max-height: 460px;
	width: auto;
}
.single-ahm_product .col-md-12 > div[style*="margin-bottom:30px"] {
	text-align: center;
}
.single-ahm_product .col-md-12 > div[style*="margin-bottom:30px"] img {
	display: inline-block;
	border: 1px solid #eee;
	padding: 10px;
	background: #fff;
	border-radius: 4px;
}

/* Blog/search cards without a featured image: keep the left rail tidy */
.single-blog-item .text-holder { overflow: hidden; }

/* Preloader / splash.
   Default (no logo): a clean green spinner — NOT the old RepairPlus phone gif.
   Logo uploaded: the logo, gently pulsing. */
.preloader { background-image: none; }
.preloader:not(.preloader-has-logo)::after {
	content: "";
	position: absolute;
	top: 50%;
	left: 50%;
	width: 54px;
	height: 54px;
	margin: -27px 0 0 -27px;
	border: 5px solid #e9e9e9;
	border-top-color: #0e8943;
	border-radius: 50%;
	animation: ahmSpin .9s linear infinite;
}
@keyframes ahmSpin { to { transform: rotate(360deg); } }

.preloader.preloader-has-logo {
	background-image: none;
	display: flex;
	align-items: center;
	justify-content: center;
}
.preloader.preloader-has-logo .preloader-logo-img {
	max-width: 220px;
	max-height: 120px;
	width: auto;
	height: auto;
	animation: ahmPreloaderPulse 1.2s ease-in-out infinite;
}
@keyframes ahmPreloaderPulse {
	0%, 100% { opacity: .4; transform: scale(.94); }
	50%      { opacity: 1;  transform: scale(1); }
}

/* Header "Call / WhatsApp" block sits on the green nav bar — the recolor had
   turned its icon + label green (invisible on green); force them light. */
.customer-care .icon-holder span:before { color: #ffffff; }
.customer-care .title-holder h5 { color: rgba(255, 255, 255, .9); }
.customer-care .title-holder h4,
.customer-care .title-holder h4 a { color: #ffffff; }

/* Who We Are — single image (replaces the old 3-image strip) */
.about-us-area .about-content .about-single-image {
	margin: 5px 0 0;
	overflow: hidden;
	border-radius: 6px;
	box-shadow: 0 4px 18px rgba(0, 0, 0, .08);
}
.about-us-area .about-content .about-single-image img {
	width: 100%;
	height: auto;
	display: block;
	border-radius: 6px;
	transition: transform .5s ease;
}
.about-us-area .about-content .about-single-image:hover img {
	transform: scale(1.03);
}

/* Homepage "What We Supply" cards: center the icon inside its green box.
   The theme's table-cell centering didn't work with the Font Awesome icons,
   leaving them stuck top-left — flexbox centers them reliably both ways. */
.categories-area .single-item .icon-holder .icon-box {
	display: flex;
	align-items: center;
	justify-content: center;
	text-align: center;
}
.categories-area .single-item .icon-holder .icon-box .icon {
	display: block;
	width: 100%;
	line-height: 1;
}
.categories-area .single-item .icon-holder span,
.categories-area .single-item .icon-holder span::before {
	display: block;
	width: 100%;
	text-align: center;
	line-height: 1;
}

/* ===== Product archive: category filter pills ===== */
.ahm-cat-filters { margin: 0 auto 45px; max-width: 1000px; }
.ahm-cat-filter {
	display: inline-block;
	margin: 0 5px 12px;
	padding: 9px 18px;
	border: 2px solid #0e8943;
	border-radius: 40px;
	background: #fff;
	color: #0e8943;
	font-size: 13px;
	font-weight: 700;
	text-transform: uppercase;
	letter-spacing: .3px;
	transition: all .3s ease;
}
.ahm-cat-filter span {
	display: inline-block;
	min-width: 18px;
	margin-left: 5px;
	padding: 1px 7px;
	border-radius: 20px;
	background: #0e8943;
	color: #fff;
	font-size: 11px;
	line-height: 16px;
}
.ahm-cat-filter:hover,
.ahm-cat-filter.active { background: #0e8943; color: #fff; }
.ahm-cat-filter:hover span,
.ahm-cat-filter.active span { background: #fff; color: #0e8943; }

/* ===== Product archive: equal-height cards, uniform images, clamped text ===== */
@media (min-width: 992px) {
	.ahm-products-grid { display: flex; flex-wrap: wrap; }
	.ahm-products-grid > [class*="col-"] { display: flex; float: none; }
}
.ahm-products-grid .single-item {
	display: flex;
	flex-direction: column;
	width: 100%;
	background: #fff;
	border: 1px solid #ececec;
	border-radius: 6px;
	overflow: hidden;
	transition: box-shadow .3s ease, transform .3s ease;
}
.ahm-products-grid .single-item:hover {
	box-shadow: 0 10px 26px rgba(0, 0, 0, .10);
	transform: translateY(-4px);
}
.ahm-products-grid .single-item > a h5 { padding: 20px 15px 0; margin: 0; }
.ahm-products-grid .img-holder { margin: 15px 0 0; }
.ahm-products-grid .img-holder img {
	width: 100%;
	height: 230px;
	object-fit: contain;
	background: #fff;
	padding: 10px;
}
.ahm-products-grid .text-holder { flex: 1 0 auto; padding: 16px 22px 24px; }
.ahm-products-grid .text-holder p {
	display: -webkit-box;
	-webkit-line-clamp: 3;
	-webkit-box-orient: vertical;
	line-clamp: 3;
	overflow: hidden;
	margin: 0;
	min-height: 63px;
	line-height: 21px;
}
