/* Altes-specific overrides for Electro HTML theme */

/* Font display swap for faster text rendering */
@font-face {
	font-family: "Font Awesome 5 Free";
	font-display: swap;
}
@font-face {
	font-family: "Font Awesome 5 Brands";
	font-display: swap;
}

body {
	font-size: 14px;
}

/* WooCommerce product grid */
.woocommerce ul.products li.product {
	background: #fff;
	border: 1px solid #eee;
	padding: 16px;
	text-align: center;
	transition: box-shadow 0.3s;
	border-radius: 4px;
}

.woocommerce ul.products li.product:hover {
	box-shadow: 0 4px 16px rgba(0, 0, 0, 0.1);
}

.woocommerce ul.products li.product .woocommerce-loop-product__title {
	font-size: 14px;
	font-weight: 600;
}

.woocommerce ul.products li.product .price {
	font-size: 16px;
	font-weight: 700;
}

.woocommerce ul.products li.product .button,
.woocommerce ul.products li.product .add_to_cart_button {
	background: #fed700;
	color: #333;
	border: none;
	font-weight: 600;
}

.woocommerce ul.products li.product .button:hover,
.woocommerce ul.products li.product .add_to_cart_button:hover {
	background: #e5c200;
}

/* Single product */
.woocommerce div.product .single_add_to_cart_button {
	background: #fed700 !important;
	color: #333 !important;
	font-weight: 600;
}

.woocommerce div.product .single_add_to_cart_button:hover {
	background: #e5c200 !important;
}

/* Sale badge */
.woocommerce span.onsale {
	background: #e74c3c;
	border-radius: 4px;
	min-height: auto;
	min-width: auto;
	padding: 4px 10px;
	line-height: 1.5;
}

/* Notices */
.woocommerce-message {
	border-top-color: #fed700 !important;
}

/* Pagination */
.woocommerce nav.woocommerce-pagination ul li span.current {
	background: #fed700;
	border-color: #fed700;
	color: #333;
}

/* Links - darker yellow for better visibility */
a {
	color: #c8a400;
}

a:hover {
	color: #9a7e00;
}

/* Primary nav - Altes custom dropdown */
.altes-main-nav {
	display: flex;
	align-items: center;
	list-style: none;
	margin: 0;
	padding: 0;
}

.altes-main-nav > .nav-item > .nav-link {
	color: #333e48;
	font-size: 14px;
	font-weight: 600;
	padding: 10px 14px;
	white-space: nowrap;
}

.altes-main-nav > .nav-item > .nav-link:hover {
	color: #c8a400;
}

.altes-dropdown {
	position: relative;
}

.altes-dropdown-menu {
	display: none;
	position: absolute;
	top: 100%;
	left: 0;
	z-index: 9999;
	background: #fff;
	min-width: 240px;
	border: 1px solid #eee;
	box-shadow: 0 6px 20px rgba(0,0,0,0.12);
	padding: 10px 0;
	list-style: none;
	border-radius: 4px;
	margin: 0;
}

.altes-dropdown:hover > .altes-dropdown-menu {
	display: block;
}

.altes-dropdown-menu li a {
	display: block;
	padding: 7px 20px;
	color: #333e48;
	font-size: 13px;
	font-weight: 400;
	white-space: nowrap;
}

.altes-dropdown-menu li a:hover {
	background: #f5f5f5;
	color: #c8a400;
}

.altes-dropdown-divider {
	border-top: 1px solid #eee;
	margin: 6px 0;
}

/* Vertical menu flyout submenus */
.altes-vertical-dropdown {
	position: relative;
}

.altes-has-flyout::after {
	content: '\f105';
	font-family: 'Font Awesome 5 Free';
	font-weight: 900;
	font-size: 11px;
	position: absolute;
	right: 15px;
	top: 50%;
	transform: translateY(-50%);
	color: #999;
}

.altes-vertical-dropdown .nav-link {
	padding-right: 30px !important;
}

.altes-flyout-menu {
	display: none;
	position: absolute;
	left: 100%;
	top: 0;
	z-index: 9999;
	background: #fff;
	min-width: 230px;
	border: 1px solid #eee;
	box-shadow: 0 6px 20px rgba(0,0,0,0.12);
	padding: 10px 0;
	list-style: none;
	margin: 0;
	border-radius: 0 4px 4px 0;
}

.altes-vertical-dropdown:hover > .altes-flyout-menu {
	display: block;
}

.altes-flyout-menu li a {
	display: block;
	padding: 6px 20px;
	color: #333e48;
	font-size: 13px;
	white-space: nowrap;
}

.altes-flyout-menu li a:hover {
	background: #f5f5f5;
	color: #c8a400;
}

/* Product carousel - arrow buttons */
.u-slick__arrow-normal {
	background: #f0f0f0 !important;
	width: 30px !important;
	height: 30px !important;
	display: inline-flex !important;
	align-items: center;
	justify-content: center;
	border-radius: 4px !important;
	font-size: 20px !important;
	color: #333 !important;
	cursor: pointer;
	margin-left: 4px !important;
}

.u-slick__arrow-normal:hover {
	background: #e0e0e0 !important;
}

.u-slick__arrow-normal.right-1 {
	right: 34px !important;
}

/* Space for arrows next to "Pogledajte sve" */
.border-bottom.border-color-1 + .js-slick-carousel .u-slick__arrow-normal.right-0,
.border-color-1 ~ .js-slick-carousel .u-slick__arrow-normal.right-0 {
	right: 0 !important;
}

.d-flex.border-bottom > a.font-size-14 {
	padding-right: 80px;
	line-height: 30px;
}

/* Product card - pagination below hover cards */
.u-slick__pagination {
	z-index: 2 !important;
	margin-top: 40px !important;
}

/* Product card - spacing between rows and prevent collapse on hover */
ul.products-group > li.product-item {
	margin-bottom: 1rem;
	min-height: 350px;
}

/* Product card - ensure full width */
.product-item__outer {
	width: 100%;
}

.product-item__inner {
	width: 100%;
}

/* Product card - category truncate, always 2 lines */
.altes-cat-truncate {
	display: -webkit-box;
	-webkit-line-clamp: 2;
	-webkit-box-orient: vertical;
	overflow: hidden;
	min-height: 2.4em;
	line-height: 1.2em;
	margin-bottom: 4px;
}

/* Product card - title 3 lines */
@media (min-width: 768px) {
	.product-item__title a {
		-webkit-line-clamp: 3 !important;
	}
}

.product-item__title {
	min-height: 54px;
}

/* Product card - fixed image container */
.altes-product-img-wrap {
	height: 150px;
	display: flex !important;
	align-items: center;
	justify-content: center;
	overflow: hidden;
}

.altes-product-img-wrap img {
	max-height: 150px;
	max-width: 100%;
	width: auto;
	object-fit: contain;
}

/* 5-column grid for product listing */
@media (min-width: 1200px) {
	.col-xl-20p {
		flex: 0 0 20%;
		max-width: 20%;
	}
}

/* Shop control bar - sorting dropdown */
.woocommerce-ordering .orderby {
	background: #fff;
	border: 1px solid #e5e5e5;
	border-radius: 4px;
	padding: 6px 12px;
	font-size: 13px;
	font-weight: 400;
	color: #999;
	appearance: auto;
}

.woocommerce-result-count {
	font-size: 13px;
	color: #999;
	margin: 0 !important;
	padding: 0;
}

.woocommerce-ordering {
	margin: 0 !important;
	padding: 0;
}

/* Product price styling */
.prodcut-price ins {
	text-decoration: none !important;
	font-weight: bold;
	color: #e74c3c;
}

.prodcut-price del {
	color: #999;
	font-size: 12px;
	display: block;
	order: -1;
}

.prodcut-price .woocommerce-Price-amount {
	font-size: inherit;
}

/* Single product - image container */
#sliderSyncingNav .js-slide {
	display: flex !important;
	align-items: center;
	justify-content: center;
	height: 400px;
	background: #fff;
}

#sliderSyncingNav .js-slide img {
	max-height: 400px;
	max-width: 100%;
	width: auto;
	object-fit: contain;
}

#sliderSyncingThumb .js-slide {
	display: flex !important;
	align-items: center;
	justify-content: center;
	width: 80px !important;
	height: 80px !important;
	background: #fff;
	border: 1px solid #eee;
	padding: 4px;
}

#sliderSyncingThumb .js-slide img {
	max-height: 72px;
	max-width: 100%;
	width: auto;
	object-fit: contain;
}

/* Out of stock product - grayscale image */
.altes-out-of-stock img {
	filter: grayscale(100%);
	opacity: 0.7;
}

/* Breadcrumb links - no background */
.breadcrumb-item a {
	background: none !important;
	padding: 0 !important;
}

/* Toast notification */
.altes-toast {
	position: fixed;
	bottom: 30px;
	right: 30px;
	background: #333e48;
	color: #fff;
	padding: 14px 24px;
	border-radius: 6px;
	font-size: 14px;
	z-index: 99999;
	box-shadow: 0 4px 20px rgba(0,0,0,0.25);
	opacity: 0;
	transform: translateY(20px);
	transition: opacity 0.3s, transform 0.3s;
}

.altes-toast.show {
	opacity: 1;
	transform: translateY(0);
}

/* Search bar max width */
.bg-primary .col.align-self-center .input-group {
	max-width: 750px;
}

/* Cart page - no scroll on update */
.woocommerce-cart .woocommerce-message,
.woocommerce-cart .woocommerce-info {
	scroll-margin-top: 0 !important;
}

html {
	scroll-behavior: auto !important;
}

/* Cart page - min height */
.altes-cart-row {
	min-height: 450px;
}

/* Cart & Checkout - section titles */
.woocommerce-cart .section-title,
.woocommerce-checkout .section-title,
.cart_totals .section-title {
	font-size: 26px !important;
	font-weight: 700 !important;
	display: inline-block !important;
	margin-bottom: 0 !important;
	padding-bottom: 0.5rem !important;
}

.woocommerce-cart .border-bottom.border-color-1,
.woocommerce-checkout .border-bottom.border-color-1,
.cart_totals .border-bottom.border-color-1 {
	border-bottom-width: 1px !important;
	margin-bottom: 1rem !important;
}

/* Cart page - fix cart totals width */
.woocommerce .cart-collaterals .cart_totals,
.woocommerce-page .cart-collaterals .cart_totals {
	float: none !important;
	width: 100% !important;
}

/* Cart page styling */
.cart-table .product-thumbnail img {
	max-width: 80px;
	border: 1px solid #eee;
	padding: 4px;
	border-radius: 4px;
}

.cart-table .quantity .qty {
	width: 50px;
	text-align: center;
	border: 1px solid #ddd;
	border-radius: 4px;
	padding: 4px;
}

.cart_totals table th,
.cart_totals table td {
	padding: 12px 0;
}

.cart_totals .order-total td {
	font-size: 20px;
}

.wc-proceed-to-checkout .checkout-button {
	display: block;
	width: 100%;
	background: #333e48 !important;
	color: #fff !important;
	border: none;
	padding: 12px 24px;
	font-size: 16px;
	font-weight: 600;
	border-radius: 4px;
	text-align: center;
	text-decoration: none;
}

.wc-proceed-to-checkout .checkout-button:hover {
	background: #fed700 !important;
	color: #333 !important;
}

/* Checkout page styling */
.woocommerce-checkout .col2-set {
	display: flex;
	flex-wrap: wrap;
	width: 100%;
}

.woocommerce-checkout .col2-set .col-1,
.woocommerce-checkout .col2-set .col-2 {
	float: none !important;
	width: 100% !important;
	max-width: 100% !important;
	flex: 0 0 100% !important;
}

.woocommerce-checkout .col2-set .col-1 {
	margin-bottom: 2rem;
}


.woocommerce-checkout .form-row label {
	font-size: 14px;
	font-weight: 600;
	color: #333e48;
	margin-bottom: 4px;
}

.woocommerce-checkout .form-row .input-text,
.woocommerce-checkout .form-row select,
.woocommerce-checkout .form-row textarea,
.woocommerce form .form-row .input-text,
.woocommerce form .form-row select {
	display: block !important;
	width: 100% !important;
	height: calc(1.5em + 1.34rem + 2px) !important;
	padding: 0.67rem 1rem !important;
	font-size: 0.875rem !important;
	font-weight: 400 !important;
	line-height: 1.5 !important;
	color: #818181 !important;
	background-color: #fff !important;
	background-clip: padding-box !important;
	border: 1px solid #dddddd !important;
	border-radius: 1.4rem !important;
	transition: border-color 0.15s ease-in-out, box-shadow 0.15s ease-in-out !important;
}

.woocommerce-checkout .form-row textarea,
.woocommerce form .form-row textarea {
	height: auto !important;
	min-height: 100px !important;
	border-radius: 1.4rem !important;
	resize: vertical;
}

.woocommerce-checkout .woocommerce-additional-fields {
	clear: both;
	padding-top: 1rem;
}

.woocommerce-checkout .form-row .input-text:focus,
.woocommerce-checkout .form-row select:focus,
.woocommerce-checkout .form-row textarea:focus {
	color: #818181;
	background-color: #fff;
	border-color: #fed700;
	outline: 0;
	box-shadow: 0 0 0 0.2rem rgba(254, 215, 0, 0.25);
}

.woocommerce-checkout .select2-container .select2-selection--single {
	height: calc(1.5em + 1.34rem + 2px);
	border: 1px solid #dddddd;
	border-radius: 1.4rem;
}

.woocommerce-checkout .select2-container .select2-selection--single .select2-selection__rendered {
	line-height: calc(1.5em + 1.34rem);
	padding-left: 1rem;
	font-size: 0.875rem;
	color: #818181;
}

.woocommerce-checkout .select2-container .select2-selection--single .select2-selection__arrow {
	height: calc(1.5em + 1.34rem);
	right: 10px;
}

.woocommerce-checkout #order_review {
	background: #f9f9f9;
	padding: 20px;
	border-radius: 6px;
	border: 1px solid #eee;
}

.woocommerce-checkout #place_order {
	background: #333e48 !important;
	color: #fff !important;
	border: none;
	padding: 14px 30px;
	font-size: 16px;
	font-weight: 600;
	border-radius: 4px;
	width: 100%;
	cursor: pointer;
}

.woocommerce-checkout #place_order:hover {
	background: #fed700 !important;
	color: #333 !important;
}

.woocommerce-checkout .select2-container .select2-selection--single {
	height: 42px;
	border: 1px solid #ddd;
	border-radius: 4px;
}

.woocommerce-checkout .select2-container .select2-selection--single .select2-selection__rendered {
	line-height: 42px;
	padding-left: 14px;
	font-size: 14px;
}

.woocommerce-checkout .select2-container .select2-selection--single .select2-selection__arrow {
	height: 42px;
}

/* Coupon button */
.woocommerce-form-coupon .button {
	background: #333e48 !important;
	color: #fff !important;
	border: none !important;
	border-radius: 1.4rem !important;
	padding: 1rem 1.5rem !important;
	font-size: 0.875rem !important;
	font-weight: 600 !important;
	cursor: pointer;
}

.woocommerce-form-coupon .button:hover {
	background: #fed700 !important;
	color: #333 !important;
}

.woocommerce-form-coupon .input-text {
	border-radius: 1.4rem !important;
	padding: 0.67rem 1rem !important;
	border: 1px solid #ddd !important;
	font-size: 0.875rem !important;
}

/* Cart remove icon */
.cart-table .product-remove a.remove {
	color: #999 !important;
	font-size: 16px;
}

.cart-table .product-remove a.remove:hover {
	color: #e74c3c !important;
	background: none !important;
}

/* Auto-update cart on quantity change */

/* Hide WooCommerce "View cart" link after AJAX add to cart */
.added_to_cart.wc-forward {
	display: none !important;
}

/* Fix WP admin bar offset */
body.admin-bar .u-header {
	top: 32px;
}
