/**
* Theme Name: Machic Child
* Description: This is a child theme of Machic, generated by Merlin WP.
* Author: <a href="http://themeforest.net/user/KlbTheme">KlbTheme (Sinan ISIK)</a>
* Template: machic
* Version: 1.5.9
*/

/* =========================================
   CAM STORE - CLEAN & PRO THEME (FIXED LIGHT MODE)
   Palette: Red (#A00000), White (#FFFFFF), Dark Grey (#222)
   Style: Minimalist, Professional, eCommerce Standard
   ========================================= */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&display=swap');

:root {
    --cam-red: #cc0000;
    /* Brighter, more professional red */
    --cam-red-dark: #a00000;
    --cam-black: #222222;
    --cam-text: #333333;
    --cam-grey: #f4f4f4;
    --cam-border: #e0e0e0;
}

/* --- Global Reset & Typography --- */
body {
    background-color: #ffffff !important;
    background-image: none !important;
    color: var(--cam-text);
    font-family: 'Inter', Helvetica, Arial, sans-serif !important;
}

h1,
h2,
h3,
h4,
h5,
h6 {
    color: var(--cam-black) !important;
    font-weight: 700;
    letter-spacing: -0.5px;
}

a {
    color: var(--cam-black);
    text-decoration: none;
}

a:hover {
    color: var(--cam-red);
}

/* --- Header --- */
.site-header {
    background: #ffffff !important;
    border-bottom: 1px solid var(--cam-border);
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.03);
}

/* --- Search Bar --- */
/* Kept clean for Theme Defaults, just ensure relative positioning for AJAX dropdown */
.search-form {
    position: relative !important;
}

/* --- AJAX Search Results Dropdown --- */
.cam-ajax-search-results {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: #ffffff;
    border: 1px solid var(--cam-border);
    border-top: none;
    border-radius: 0 0 6px 6px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.1);
    z-index: 100000;
    /* Super high z-index */
    margin-top: 0;
    display: none;
    text-align: left;
}

.cam-ajax-search-results ul {
    list-style: none !important;
    margin: 0 !important;
    padding: 0 !important;
}

.cam-ajax-search-results li {
    border-bottom: 1px solid #f0f0f0;
    margin: 0 !important;
}

.cam-ajax-search-results li:last-child {
    border-bottom: none;
}

.cam-ajax-search-results li a {
    display: flex !important;
    align-items: center;
    padding: 15px;
    background: #fff;
    transition: background 0.1s;
}

.cam-ajax-search-results li a:hover {
    background-color: #f9f9f9;
}

/* Thumbnail */
.cam-search-thumb {
    width: 60px;
    height: 60px;
    flex-shrink: 0;
    margin-right: 15px;
    border: 1px solid #eee;
    border-radius: 4px;
    background: #fff;
    display: flex;
    justify-content: center;
    align-items: center;
}

.cam-search-thumb img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    border-radius: 2px;
}

/* Product Info */
.cam-search-info {
    display: flex;
    flex-direction: column;
}

.cam-search-title {
    font-size: 15px;
    font-weight: 500;
    color: #333;
    line-height: 1.3;
    margin-bottom: 4px;
}

.cam-ajax-search-results li a:hover .cam-search-title {
    color: var(--cam-red);
}

.cam-search-price {
    color: var(--cam-red);
    font-weight: 700;
    font-size: 14px;
}

.cam-search-price del {
    color: #999;
    font-weight: 400;
    font-size: 12px;
    margin-right: 5px;
}

/* Footer & Errors */
.cam-search-footer {
    padding: 12px;
    text-align: center;
    background: #f8f8f8;
    border-top: 1px solid #eee;
}

.cam-search-footer a {
    font-size: 13px;
    font-weight: 600;
    color: var(--cam-red);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.cam-search-no-results {
    padding: 20px;
    color: #666;
    text-align: center;
    font-style: italic;
}

/* Spinner */
.cam-search-spinner {
    padding: 30px;
    text-align: center;
    display: flex;
    justify-content: center;
}

.cam-search-spinner div {
    box-sizing: border-box;
    display: block;
    position: absolute;
    width: 32px;
    height: 32px;
    margin: 8px;
    border: 4px solid var(--cam-red);
    border-radius: 50%;
    animation: cam-ring 1.2s cubic-bezier(0.5, 0, 0.5, 1) infinite;
    border-color: var(--cam-red) transparent transparent transparent;
}

.cam-search-spinner div:nth-child(1) {
    animation-delay: -0.45s;
}

.cam-search-spinner div:nth-child(2) {
    animation-delay: -0.3s;
}

.cam-search-spinner div:nth-child(3) {
    animation-delay: -0.15s;
}

@keyframes cam-ring {
    0% {
        transform: rotate(0deg);
    }

    100% {
        transform: rotate(360deg);
    }
}

/* --- Clean Modern Product Cards (Grid) --- */
.product-inner,
.product-wrapper {
    background: #ffffff !important;
    border: 1px solid #eee !important;
    border-radius: 8px !important;
    box-shadow: none !important;
    transition: transform 0.2s, box-shadow 0.2s;
}

.product-inner:hover,
.product-wrapper:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.08) !important;
    border-color: #ddd !important;
}

.product-title a {
    color: #333 !important;
    font-weight: 600;
}

.price {
    color: var(--cam-red) !important;
    font-weight: 700;
}

/* --- Buttons --- */
button,
.button,
.btn-primary,
.wp-block-button__link,
input[type="submit"] {
    background: var(--cam-red) !important;
    color: white !important;
    border-radius: 4px !important;
    /* Professional radius */
    padding: 10px 24px !important;
    font-weight: 600 !important;
    text-transform: uppercase;
    font-size: 13px !important;
    letter-spacing: 0.5px;
    border: none !important;
}

button:hover,
.button:hover,
.wp-block-button__link:hover,
input[type="submit"]:hover {
    background: var(--cam-red-dark) !important;
    transform: none !important;
    box-shadow: none !important;
}

/* --- Footer --- */
.site-footer {
    background: #111 !important;
    color: #999;
}

.site-footer h3,
/* --- Skeleton Loading (Modern UX) --- */
.cam-skeleton-wrapper {
    padding: 0;
}

.cam-skeleton-item {
    display: flex;
    align-items: center;
    padding: 15px;
    border-bottom: 1px solid #f0f0f0;
}

.cam-skeleton-thumb {
    width: 60px;
    height: 60px;
    background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
    background-size: 200% 100%;
    animation: cam-skeleton-loading 1.5s infinite;
    border-radius: 4px;
    margin-right: 15px;
}

.cam-skeleton-content {
    flex-grow: 1;
}

.cam-skeleton-line {
    height: 12px;
    background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
    background-size: 200% 100%;
    animation: cam-skeleton-loading 1.5s infinite;
    border-radius: 4px;
    margin-bottom: 8px;
}

.cam-skeleton-line.title {
    width: 70%;
    height: 14px;
}

.cam-skeleton-line.price {
    width: 40%;
}

@keyframes cam-skeleton-loading {
    0% {
        background-position: 200% 0;
    }

    100% {
        background-position: -200% 0;
    }
}

.cam-highlight {
    background-color: rgba(255, 200, 0, 0.2);
    font-weight: 700;
}

.cam-search-arrow {
    color: #ccc;
    transition: transform 0.2s;
}

/* FIX: transform syntax error in previous block (lines 409-411) */
.cam-ajax-search-results li a:hover .cam-search-arrow {
    transform: translateX(3px);
    color: var(--cam-red);
}

/* =========================================
   CAM STORE - ELEMENTOR CATEGORY BLOCK
   ========================================= */

.cam-modern-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
    gap: 20px;
    padding: 20px 0;
}

.cam-cat-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    background: #ffffff;
    border: 1px solid #eee;
    border-radius: 12px;
    padding: 25px 15px;
    text-align: center;
    transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
    position: relative;
    overflow: hidden;
    height: 100%;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.02);
}

.cam-cat-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.08);
    border-color: var(--cam-red);
}

.cam-cat-icon {
    width: 60px;
    height: 60px;
    background: #fcfcfc;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 15px;
    color: var(--cam-red);
    transition: all 0.3s ease;
    border: 1px solid #f0f0f0;
}

.cam-cat-card:hover .cam-cat-icon {
    background: var(--cam-red);
    color: #ffffff;
    transform: scale(1.1);
    border-color: var(--cam-red);
}

.cam-cat-icon svg {
    width: 28px;
    height: 28px;
    stroke-width: 1.5;
}

.cam-cat-title {
    font-size: 0.95em;
    font-weight: 600;
    color: #222;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    font-family: var(--font-heading);
}

.cam-cat-card:hover .cam-cat-title {
    color: var(--cam-red);
}

.cam-cat-arrow {
    position: absolute;
    bottom: 15px;
    right: 15px;
    opacity: 0;
    transform: translateX(-10px);
    transition: all 0.3s ease;
    color: var(--cam-red);
}

.cam-cat-arrow svg {
    width: 16px;
    height: 16px;
}

.cam-cat-card:hover .cam-cat-arrow {
    opacity: 1;
    transform: translateX(0);
}

/* Response Mobile Grid */
@media (max-width: 600px) {
    .cam-modern-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 15px;
    }

    .cam-cat-card {
        padding: 20px 10px;
    }

    .cam-cat-icon {
        width: 50px;
        height: 50px;
        margin-bottom: 10px;
    }
}

/* =========================================
   PERFORMANCE FIX: GLOBAL SCROLL STABILIZATION
   ========================================= */
/* Prevents "bounce" (overscroll) and layout anchoring jumps on mobile */
html,
body {
    overscroll-behavior-y: none !important;
    /* Stops rubber-banding/bounce */
    overflow-anchor: none !important;
    /* Prevents jump when content loads above */
}

@media (max-width: 767px) {

    /* Stabilize Header Height to prevent collapse jumping */
    .site-header {
        min-height: 60px;
        /* Approximate mobile header height */
    }

    /* Fix Sticky Header Jump on Mobile - DISABLE STICKY */
    .site-header.sticky-header {
        position: relative !important;
        top: auto !important;
        left: auto !important;
        right: auto !important;
        animation: none !important;
        transform: none !important;
        box-shadow: none !important;
        width: 100% !important;
    }
}

/* =========================================
   CAM STORE - BRANDS CAROUSEL WIDGET
   ========================================= */
.cam-brands-wrapper {
	position: relative;
	width: 100%;
	padding: 20px 0;
}

.cam-brands-carousel {
	display: flex;
	overflow-x: auto;
	overflow-y: hidden;
	gap: 20px;
	padding: 10px 5px 20px 5px; /* Bottom padding for shadow */
	-webkit-overflow-scrolling: touch;
	scrollbar-width: none; /* Firefox: Hide native */
	-ms-overflow-style: none; /* IE: Hide native */
	scroll-snap-type: x mandatory;
}

.cam-brands-carousel::-webkit-scrollbar {
	display: none; /* Chrome/Safari: Hide native */
}

.cam-brand-card {
	flex: 0 0 auto;
	width: 150px;
	height: 100px;
	background: #ffffff;
	border: 1px solid #eee;
	border-radius: 8px;
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 15px;
	transition: all 0.3s ease;
	scroll-snap-align: start;
	box-shadow: 0 2px 5px rgba(0,0,0,0.02);
}

.cam-brand-card:hover {
	transform: translateY(-5px);
	box-shadow: 0 10px 20px rgba(0,0,0,0.08);
	border-color: var(--cam-red);
}

.cam-brand-img-wrap {
	width: 100%;
	height: 100%;
	display: flex;
	align-items: center;
	justify-content: center;
}

.cam-brand-img {
	max-width: 100%;
	max-height: 100%;
	object-fit: contain;
	filter: grayscale(100%);
	opacity: 0.7;
	transition: all 0.3s ease;
}

.cam-brand-card:hover .cam-brand-img {
	filter: grayscale(0%);
	opacity: 1;
}

.cam-brand-title {
	display: none; /* Hide title, we just want logos */
}

/* Mobile Responsiveness */
@media (max-width: 767px) {
	.cam-brand-card {
		width: 110px;
		height: 80px;
		padding: 10px;
	}
	.cam-brands-carousel {
		gap: 12px;
	}
	/* Disable hover effects on mobile to prevent layout jumping */
	.cam-brand-card:hover, .cam-brand-card:focus, .cam-brand-card:active {
		transform: none !important;
		box-shadow: 0 2px 5px rgba(0,0,0,0.02) !important;
		border-color: #eee !important;
	}
	.cam-brand-card:hover .cam-brand-img, .cam-brand-card:focus .cam-brand-img {
		filter: grayscale(100%);
		opacity: 0.7;
	}
}

/* =========================================
   FOOTER SOCIAL MEDIA RESTYLING (Forced)
   ========================================= */
.site-footer .site-social ul {
    display: flex !important;
    gap: 12px !important;
    padding: 0 !important;
    margin: 15px 0 0 0 !important;
    list-style: none !important;
}

.site-footer .site-social ul li {
    margin: 0 !important;
    padding: 0 !important;
}

.site-footer .site-social ul li a {
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    width: 44px !important;
    height: 44px !important;
    background-color: #f4f4f4 !important;
    color: #333 !important;
    border-radius: 50% !important;
    font-size: 18px !important;
    line-height: 1 !important;
    text-decoration: none !important;
    transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1) !important;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.05) !important;
}

.site-footer .site-social ul li a:hover {
    background-color: var(--cam-red) !important;
    color: #ffffff !important;
    transform: translateY(-4px) !important;
    box-shadow: 0 10px 20px rgba(160, 0, 0, 0.25) !important;
}

.site-footer .site-social ul li a i {
    transition: transform 0.3s ease;
    color: #222 !important;
    /* FORCE DARK COLOR on non-hover */
}

.site-footer .site-social ul li a:hover i {
    transform: scale(1.15) !important;
    color: #ffffff !important;
    /* Force white on hover */
}

/* =========================================
   SOCIAL CHAT BUTTON MOBILE POSITION FIX
   ========================================= */
@media (max-width: 768px) {
    .qlwapp__container.qlwapp__container--bottom-right {
        bottom: 90px !important;
        /* Raised to clear mobile menu */
    }
}