/*
Theme Name: Blocksy Child
Theme URI: https://creativethemes.com/blocksy/
Description: Child theme for Blocksy theme
Author: Your Name
Author URI: https://yoursite.com
Template: blocksy
Version: 1.0.2
License: GNU General Public License v2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
Text Domain: blocksy-child
*/

/* 
   Add your custom CSS below this line
*/

/* Newsletter Subscription Form Styles */
.autohjul-newsletter-wrapper {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

.autohjul-newsletter-content {
    display: flex;
    flex-direction: column;
}

.autohjul-newsletter-heading {
    color: #0066cc;
    font-size: 18px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin: 0 0 12px 0;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

.autohjul-newsletter-description {
    color: #ffffff;
    font-size: 14px;
    line-height: 1.5;
    margin: 0 0 20px 0;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

.autohjul-newsletter-form {
    display: flex;
    gap: 0;
    align-items: stretch;
    flex-wrap: wrap;
}

.autohjul-newsletter-input-wrapper {
    position: relative;
    flex: 1;
    min-width: 250px;
}

.autohjul-newsletter-icon {
    position: absolute;
    left: 12px;
    top: 50%;
    transform: translateY(-50%);
    width: 20px;
    height: 20px;
    color: #0066cc;
    pointer-events: none;
    z-index: 1;
}

.autohjul-newsletter-input {
    width: 100%;
    padding: 12px 12px 12px 40px;
    background-color: #000000;
    border: 1px solid #ffffff;
    color: #ffffff;
    font-size: 14px;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    outline: none;
    transition: border-color 0.3s ease;
    box-sizing: border-box;
    border-radius: 4px 0 0 4px;
    -webkit-appearance: none;
    appearance: none;
}

.autohjul-newsletter-input::placeholder {
    color: #a0a0a0;
    opacity: 1;
}

.autohjul-newsletter-input:focus {
    border-color: #0066cc;
}

.autohjul-newsletter-input:invalid:not(:placeholder-shown) {
    border-color: #ff0000;
}

.autohjul-newsletter-button {
    background-color: #0066cc;
    color: #ffffff;
    border: none;
    font-size: 13px !important;
    font-weight: 600 !important; 
    text-transform: uppercase !important;
    letter-spacing: 0.5px !important; 
    cursor: pointer !important;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif !important;
    transition: background-color 0.3s ease !important;
    white-space: nowrap;
    border-radius: 0 6px 6px 0 !important;
    -webkit-appearance: none !important;
    appearance: none !important;
}

input.autohjul-newsletter-input {
    padding-left: 40px !important;
    border-radius: 4px 0 0 4px !important;
    border: 1px solid #ffffff !important;
    color: #ffffff !important;
    font-size: 14px !important;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif !important;
    outline: none !important;
    transition: border-color 0.3s ease !important;
    box-sizing: border-box !important;
    -webkit-appearance: none !important;
    appearance: none !important;
    width: 100% !important;
    padding: 12px 12px 12px 40px !important;
    background-color: #000000 !important;
    border: 1px solid #ffffff !important;
    color: #ffffff !important;
    font-size: 14px !important;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif !important;
}

.autohjul-newsletter-button:hover {
    background-color: #0052a3;
}

.autohjul-newsletter-button:active {
    background-color: #003d7a;
}

.autohjul-newsletter-button:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .autohjul-newsletter-form {
        flex-direction: column;
    }
    
    .autohjul-newsletter-input-wrapper {
        min-width: 100%;
    }
    
    .autohjul-newsletter-input {
        border-radius: 4px;
    }
    
    .autohjul-newsletter-button {
        width: 100% !important;
    }
}

.woocommerce-shop main div.hero-section {
    display: none !important;
}


.archive.tax-product_cat div.hero-section {
    display: none !important;
}

/* Product grids: 2 columns on mobile (shop, category, related, tab products) */
@media (max-width: 690px) {
	[data-products] {
		--shop-columns: repeat(2, minmax(0, 1fr)) !important;
	}
}

/* Price color by product age: 3+ years (by pa_year-of-manufacture-dot) = red; otherwise black. Not on cart/checkout. */
.autohjul-product-card__price,
.autohjul-single-price-value,
.bcc-card-unit-price,
.autohjul-quick-view-price,
.woocommerce-mini-cart .quantity {
	color: #000 !important;
}
.autohjul-price-old,
.autohjul-price-old *,
.autohjul-product-card__price.autohjul-price-old,
.autohjul-product-card__price.autohjul-price-old *,
.bcc-card-unit-price.autohjul-price-old,
.bcc-card-unit-price.autohjul-price-old * {
	color: #c00 !important;
}


@media (max-width: 768px) {        
    [data-widget_type="theme-site-logo.default"] img {
        width: 100% !important;
    }
}

/*
 * Horizontal overflow (mobile “white strip” / side-scroll)
 * Blocksy: #main-container wraps header + main + Elementor footer.
 * Common causes: Elementor Text Editor pasted HTML (inline width:500px), plugin modals, min-width chains.
 */
html {
	overflow-x: clip;
}
#main-container {
	overflow-x: clip;
	max-width: 100%;
	box-sizing: border-box;
}
body .site-main,
body #main.site-main {
	max-width: 100%;
	overflow-x: clip;
	box-sizing: border-box;
}

/* Elementor footer: neutralize pasted inline widths on divs/forms */
footer.elementor-location-footer .elementor-widget-text-editor [style*="width"],
footer.elementor-location-footer .elementor-widget-text-editor form,
footer.elementor-location-footer .elementor-widget-text-editor > div {
	max-width: 100% !important;
	box-sizing: border-box !important;
}
footer.elementor-location-footer .elementor-widget-text-editor table {
	display: block;
	width: 100% !important;
	max-width: 100%;
	overflow-x: auto;
	-webkit-overflow-scrolling: touch;
}
footer.elementor-location-footer img,
footer.elementor-location-footer svg {
	max-width: 100%;
	height: auto;
}

/* Wordfence lightbox: internal div uses width:9999px for measurement — cap if it affects layout */
#wordfenceBox div[style*="9999"] {
	max-width: 100% !important;
	width: auto !important;
}

/* Elementor footer containers: clip any remaining horizontal bleed */
footer.elementor-location-footer .e-con,
footer.elementor-location-footer .e-con-inner {
	max-width: 100%;
	box-sizing: border-box;
}

/* Checkout: rim vehicle fields — one block per article; avoid woocommerce-billing-fields__field-wrapper (grid flattens nested rows) */
.woocommerce-checkout .autohjul-rim-vehicle-fields {
	display: block;
	clear: both;
	width: 100%;
	max-width: 100%;
	margin: 1.25em 0 0;
	padding: 1em 0 0;
	border-top: 1px solid rgba(0, 0, 0, 0.08);
	box-sizing: border-box;
}
.woocommerce-checkout .autohjul-rim-vehicle-fields .autohjul-rim-vehicle-title {
	margin: 0 0 0.35em;
	font-size: 1.05em;
	font-weight: 600;
	line-height: 1.3;
}
.woocommerce-checkout .autohjul-rim-vehicle-fields .autohjul-rim-vehicle-intro {
	margin: 0 0 1em;
	font-size: 0.92em;
	color: #444;
	line-height: 1.5;
}
/* Each rim: title line, then its own 2-field row (never merge with other items) */
.woocommerce-checkout .autohjul-rim-vehicle-item {
	display: block;
	width: 100%;
	max-width: 100%;
	margin: 0 0 1.5em;
	padding: 0;
	box-sizing: border-box;
}
.woocommerce-checkout .autohjul-rim-vehicle-item:last-child {
	margin-bottom: 0;
}
.woocommerce-checkout .autohjul-rim-vehicle-product-title {
	margin: 0 0 0.75em;
	padding: 0;
	font-weight: 600;
	font-size: 0.95em;
	line-height: 1.4;
}
/* Mobile: stack Bilmodell then Registreringsnummer full width */
.woocommerce-checkout .autohjul-rim-vehicle-fields-row {
	display: flex;
	flex-direction: column;
	flex-wrap: nowrap;
	align-items: stretch;
	gap: 0;
	width: 100%;
	max-width: 100%;
	box-sizing: border-box;
}
.woocommerce-checkout .autohjul-rim-vehicle-fields-row .autohjul-rim-vehicle-field {
	float: none !important;
	width: 100%;
	max-width: 100%;
	margin: 0 0 1em;
	padding: 0;
	clear: none;
	box-sizing: border-box;
}
.woocommerce-checkout .autohjul-rim-vehicle-fields-row .autohjul-rim-vehicle-field:last-child {
	margin-bottom: 0;
}
.woocommerce-checkout .autohjul-rim-vehicle-fields-row .autohjul-rim-vehicle-field label {
	display: block;
	margin-bottom: 0.35em;
	word-break: break-word;
	hyphens: auto;
}
.woocommerce-checkout .autohjul-rim-vehicle-fields-row .woocommerce-input-wrapper {
	display: block;
	width: 100%;
	max-width: 100%;
}
.woocommerce-checkout .autohjul-rim-vehicle-fields-row .woocommerce-input-wrapper .input-text {
	width: 100%;
	max-width: 100%;
	box-sizing: border-box;
}
/* Desktop: side-by-side for this rim only */
@media screen and (min-width: 768px) {
	.woocommerce-checkout .autohjul-rim-vehicle-fields-row {
		flex-direction: row;
		align-items: flex-start;
		gap: 0 1.25em;
	}
	.woocommerce-checkout .autohjul-rim-vehicle-fields-row .autohjul-rim-vehicle-field {
		flex: 1 1 0;
		min-width: 0;
		margin-bottom: 0;
	}
}
