/*
Theme Name:   Marck Engineers Child
Theme URI:    https://marckengineers.co.in/
Description:  Brand Child Theme with consolidated custom widgets for Marck Engineers
Author:       TheTechiez.in
Author URI:   https://thetechiez.in
Template:     hello-elementor
Version:      1.0.0
Text Domain:  marck-engineers-child
*/

/* Custom styles for the child theme can be added below */

/* ==========================================================================
   Single Product Page B2B Polish
   ========================================================================== */

/* 1. Main Gallery Container & Framing */
.single-product .elementor-widget-woocommerce-product-images,
.single-product .woocommerce-product-gallery {
    background: #f8fafc;
    padding: 20px;
    border: 1px solid #e2e8f0;
    border-radius: 4px;
    margin-bottom: 20px !important;
    box-sizing: border-box;
    text-align: center;
}

/* Fix for main image - Clean centered display */
.single-product .woocommerce-product-gallery__image img {
    margin: 0 auto !important;
    max-height: 350px !important; /* Balanced height for visibility */
    width: auto !important;
    object-fit: contain !important;
    display: block !important;
}

/* Support for thumbnails at the bottom (standard grid) */
.single-product .flex-control-nav, 
.single-product .woocommerce-product-gallery .thumbnails {
    display: flex !important;
    flex-wrap: wrap !important;
    justify-content: center;
    margin: 15px -5px 0 -5px !important;
    padding: 0 !important;
    list-style: none !important;
}

.single-product .flex-control-nav li,
.single-product .woocommerce-product-gallery .thumbnails .thumbnail {
    width: 65px !important;
    padding: 5px !important;
    box-sizing: border-box !important;
}

.single-product .flex-control-nav li img,
.single-product .woocommerce-product-gallery .thumbnails img {
    border: 1px solid #e2e8f0 !important;
    cursor: pointer;
    transition: all 0.2s ease;
    border-radius: 2px;
}

.single-product .flex-control-nav li img.flex-active,
.single-product .flex-control-nav li img:hover,
.single-product .woocommerce-product-gallery .thumbnails img:hover {
    border-color: #dc2626 !important;
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
}

/* 3. Custom Product Slider Widget (Swiper-based) */
.marck-product-slider-container {
    position: relative;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 4px;
    padding: 20px;
    overflow: hidden;
    margin-bottom: 20px;
}

.marck-product-slider {
    width: 100%;
    height: 100%;
    overflow: hidden;
}

.marck-product-slider .swiper-wrapper {
    display: flex !important;
    flex-direction: row !important;
    height: 100%;
    width: 100%;
    box-sizing: content-box;
}

.marck-product-slider .swiper-slide {
    flex-shrink: 0;
    width: 100%;
    height: 100%;
    display: flex !important;
    align-items: center;
    justify-content: center;
    position: relative;
}

.marck-product-slider .swiper-slide img {
    max-width: 100%;
    height: auto;
    object-fit: contain;
    display: block;
}

/* Red Navigation Arrows */
.marck-product-slider-arrow {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 40px;
    height: 40px;
    background: rgba(255,255,255,0.9);
    border: 1px solid #e2e8f0;
    color: #dc2626;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 10;
    transition: all 0.3s ease;
}

.marck-product-slider-arrow:hover {
    background: #dc2626;
    color: #fff;
    border-color: #dc2626;
}

.marck-slider-prev { left: 10px; }
.marck-slider-next { right: 10px; }

/* Red Pagination Dots */
.marck-product-slider-dots.swiper-pagination-bullets {
    bottom: 0px !important;
}

.marck-product-slider-dots .swiper-pagination-bullet {
    background: #ccc;
    opacity: 1;
    width: 8px;
    height: 8px;
    transition: all 0.3s ease;
}

.marck-product-slider-dots .swiper-pagination-bullet-active {
    background: #dc2626 !important;
    width: 20px;
    border-radius: 4px;
}

.single-product .product_title {
    font-size: 32px !important;
    font-weight: 700 !important;
    color: #1e293b;
    margin-bottom: 5px !important;
    line-height: 1.2;
}

.single-product .product_meta {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
    font-size: 13px;
    color: #64748b;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    font-weight: 600;
    border-bottom: 1px solid #f1f5f9;
    padding-bottom: 15px;
    margin-bottom: 15px !important;
}

.single-product .product_meta span.sku_wrapper,
.single-product .product_meta span.posted_in {
    display: flex;
    align-items: center;
    gap: 5px;
}

/* 3. Quote Button Spacing */
.single-product .single-product-quote-btn {
    margin-top: 20px;
}

/* 4. Trust Badges */
.marck-trust-badges svg {
    flex-shrink: 0;
}

/* 5. Custom Widgets (Below the fold) Polish */
/* Tech Specs Table */
.marck-specs-tab-content {
    margin-top: 20px;
}

.marck-spec-table {
    width: 100%;
    border-collapse: collapse;
    border: 1px solid #e2e8f0;
    font-size: 14px;
}

.marck-spec-table tr:nth-child(even) {
    background-color: #f8fafc;
}

.marck-spec-table td {
    padding: 12px 16px;
    border: 1px solid #e2e8f0;
    color: #334155;
    vertical-align: top;
}

.marck-spec-table td.marck-spec-label {
    font-weight: 600;
    width: 35%;
    background-color: #f1f5f9;
    color: #0f172a;
}

/* Resources Downloads */
.marck-resources-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 20px;
    margin-top: 20px;
}

.marck-res-card {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 16px 20px;
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 6px;
    text-decoration: none !important;
    transition: all 0.2s ease;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.02);
}

.marck-res-card:hover {
    border-color: #cbd5e1;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05);
    transform: translateY(-2px);
}

.marck-res-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    color: #dc2626;
    /* Brand Red */
    background: #fef2f2;
    padding: 10px;
    border-radius: 50%;
}

.marck-res-info {
    display: flex;
    flex-direction: column;
    flex-grow: 1;
}

.marck-res-title {
    font-size: 15px;
    font-weight: 600;
    color: #1e293b;
    margin-bottom: 2px;
}

.marck-res-meta {
    font-size: 12px;
    color: #64748b;
}

.marck-res-arrow {
    color: #94a3b8;
    transition: color 0.2s ease, transform 0.2s ease;
}

.marck-res-card:hover .marck-res-arrow {
    color: #dc2626;
    transform: translateX(3px);
}

/* ==========================================================================
   Horizontal Overflow Fixes — Industries Page
   ========================================================================== */

/* 1. Trustindex Reviews Slider — clip off-screen slides */
.ti-widget-container,
.ti-reviews-container,
[class*="ti-review"] {
    overflow: hidden !important;
    max-width: 100% !important;
}

/* 2. Elementor boxed container margin offset fix */
.elementor-element-44eef8a.e-con-boxed {
    margin-left: 0 !important;
    margin-right: 0 !important;
    max-width: 100% !important;
}

/* 3. Global safety net: prevent any element from causing body-level overflow */
body {
    overflow-x: hidden;
}