/**
 * Rigel — global mobile fixes (Elementor home, header, Woo, custom widgets).
 */

/* Spriječi horizontalni scroll */
html,
body {
	overflow-x: clip;
}

img,
video,
iframe,
.elementor-widget-image img {
	max-width: 100%;
	height: auto;
}

/* —— OceanWP header / top bar —— */
@media (max-width: 959px) {
	#site-header-inner {
		padding-left: 14px !important;
		padding-right: 14px !important;
	}

	#top-bar-wrap .container {
		padding-left: 10px;
		padding-right: 10px;
	}

	#top-bar-content {
		font-size: 11px !important;
		line-height: 1.45 !important;
		text-align: center;
		white-space: normal !important;
		word-break: break-word;
	}

	.oceanwp-mobile-menu-icon,
	.woocommerce .oceanwp-mobile-menu-icon {
		margin-left: 4px;
	}
}

@media (max-width: 480px) {
	#top-bar-wrap {
		padding-top: 6px;
		padding-bottom: 6px;
	}

	#site-logo #site-logo-inner a img {
		max-width: 120px !important;
		height: auto;
	}
}

/* —— Elementor početna (page 18) —— */
@media (max-width: 767px) {
	.elementor-18 .elementor-element-3a21bc0 {
		--min-height: auto;
		min-height: auto !important;
		padding-top: 72px;
		padding-bottom: 32px;
		background-size: cover !important;
		background-position: center top !important;
	}

	.elementor-18 .elementor-element-52d4259,
	.elementor-18 .elementor-element-2087627,
	.elementor-18 .elementor-element-ab08cc4 {
		padding-left: 16px !important;
		padding-right: 16px !important;
	}

	.elementor-18 .elementor-element-52d4259 {
		padding-top: 28px !important;
	}

	.elementor-18 .elementor-element-52d4259 .elementor-heading-title {
		font-size: clamp(1.85rem, 8.5vw, 2.65rem) !important;
		line-height: 1.12 !important;
		word-wrap: break-word;
	}

	.elementor-18 .elementor-element-2087627 .elementor-heading-title {
		font-size: clamp(1rem, 4.2vw, 1.35rem) !important;
		line-height: 1.35 !important;
	}

	.elementor-18 .elementor-element-ab08cc4 {
		padding-top: 20px !important;
		padding-bottom: 8px !important;
	}

	/* 4 kolone proizvoda → jedna ispod druge */
	.elementor-18 .elementor-element-9071896 > .e-con-inner {
		flex-direction: column !important;
		gap: 1.25rem !important;
	}

	.elementor-18 .elementor-element-b56ac64,
	.elementor-18 .elementor-element-451f89b,
	.elementor-18 .elementor-element-c3f0745,
	.elementor-18 .elementor-element-1dd35fc {
		width: 100% !important;
		max-width: 100% !important;
		--width: 100% !important;
		flex: 0 0 100% !important;
	}

	.elementor-18 .elementor-element-30e46b0,
	.elementor-18 .elementor-element-6f0f37d,
	.elementor-18 .elementor-element-bfc39b1,
	.elementor-18 .elementor-element-0f965ee {
		width: 100% !important;
		max-width: 100% !important;
	}

	.elementor-18 .elementor-element-d3778f6 .elementor-heading-title,
	.elementor-18 .elementor-element-47c22c0 .elementor-heading-title,
	.elementor-18 .elementor-element-48ceca0 .elementor-heading-title,
	.elementor-18 .elementor-element-9c86748 .elementor-heading-title {
		font-size: clamp(1.35rem, 5vw, 1.75rem) !important;
	}

	/* Split sekcije (slika + tekst) */
	.elementor-18 .elementor-element-0f57a50 > .e-con-inner,
	.elementor-18 .elementor-element-87cd89c > .e-con-inner,
	.elementor-18 .elementor-element-4afc0ef > .e-con-inner,
	.elementor-18 .elementor-element-e6e9805 > .e-con-inner {
		flex-direction: column !important;
	}

	.elementor-18 .elementor-element-ec0c50f,
	.elementor-18 .elementor-element-70d224a,
	.elementor-18 .elementor-element-7606cf3,
	.elementor-18 .elementor-element-3bc0979,
	.elementor-18 .elementor-element-50c44d9,
	.elementor-18 .elementor-element-73212d5,
	.elementor-18 .elementor-element-a609392,
	.elementor-18 .elementor-element-ff2c7ac {
		width: 100% !important;
		max-width: 100% !important;
		--width: 100% !important;
	}

	.elementor-18 .elementor-element-70d224a,
	.elementor-18 .elementor-element-73212d5,
	.elementor-18 .elementor-element-ff2c7ac {
		border-radius: 0 0 10px 10px !important;
	}

	.elementor-18 .elementor-element-ec0c50f img,
	.elementor-18 .elementor-element-3bc0979 img,
	.elementor-18 .elementor-element-50c44d9 img,
	.elementor-18 .elementor-element-a609392 img {
		width: 100%;
	}

	/* Tabele / forme u widgetima */
	.elementor-widget-table,
	.elementor-widget-text-editor table {
		display: block;
		width: 100%;
		overflow-x: auto;
		-webkit-overflow-scrolling: touch;
	}

	.elementor-18 .elementor-widget-text-editor {
		font-size: 16px !important;
		line-height: 1.55 !important;
		word-break: break-word;
	}

	.elementor-18 .elementor-button {
		width: 100%;
		max-width: 100%;
		justify-content: center;
	}
}

@media (max-width: 480px) {
	.elementor-18 .elementor-element-2f746de,
	.elementor-18 .elementor-element-8abf73e,
	.elementor-18 .elementor-element-bdf1db3,
	.elementor-18 .elementor-element-6906168 {
		gap: 0.5rem;
	}

	.elementor-18 .elementor-element-45115c1 .elementor-heading-title,
	.elementor-18 .elementor-element-fdf7509 .elementor-heading-title {
		font-size: 1rem !important;
	}
}

/* —— Product composer (RPC) —— */
@media (max-width: 767px) {
	.rpc-product {
		padding: 12px !important;
	}

	.rpc-form,
	.rpc-main,
	.rpc-content {
		gap: 12px !important;
	}

	.rpc-product select,
	.rpc-product input[type="number"],
	.rpc-product input[type="file"],
	.rpc-lrc input[type="number"] {
		width: 100% !important;
		max-width: 100% !important;
		box-sizing: border-box;
	}

	.rpc-add-to-cart,
	.rpc-product .button {
		width: 100%;
		text-align: center;
	}
}

/* —— PDF modal —— */
@media (max-width: 767px) {
	.rgmp-modal__dialog {
		width: calc(100vw - 24px);
		margin: 4vh auto;
		padding: 16px;
		max-height: 88vh;
		overflow-y: auto;
	}

	.rgmp-modal__preview-frame,
	.rgmp-modal__preview-frame img {
		max-height: 160px;
	}

	.rgmp-trigger {
		width: 100%;
		justify-content: center;
	}
}

/* —— WooCommerce općenito —— */
@media (max-width: 767px) {
	.woocommerce table.shop_table {
		font-size: 14px;
	}

	.woocommerce table.shop_table_responsive tr {
		padding: 12px 0;
	}

	.woocommerce .col2-set .col-1,
	.woocommerce .col2-set .col-2,
	.woocommerce-page .col2-set .col-1,
	.woocommerce-page .col2-set .col-2 {
		width: 100% !important;
		float: none !important;
		margin-bottom: 1rem;
	}

	.woocommerce-message,
	.woocommerce-info,
	.woocommerce-error {
		font-size: 14px;
	}
}

/* —— Social login header icon (ne preklapa meni/korpu) —— */
@media (max-width: 767px) {
	.rigel-sl-header-account {
		top: max(8px, env(safe-area-inset-top, 0px));
		right: 52px;
	}

	.rigel-sl-header-account__link {
		width: 38px;
		height: 38px;
	}
}

@media (max-width: 380px) {
	.rigel-sl-header-account {
		right: 46px;
	}
}
