/* I-Materac: strona glowna. Ladowane tylko tam. */
/* Baner: jedno zdjecie w zaokraglonej ramce, tekst w jasnej karcie na zdjeciu (uklad jak w FDM) */
.im-baner { padding: 20px 24px 0; }
.im-baner__ramka { position: relative; max-width: 1500px; margin: 0 auto; overflow: hidden; border-radius: 18px; aspect-ratio: 1500 / 607; background: #e9e1d6; }
.im-baner__zdjecie, .im-baner__zdjecie img { position: absolute; inset: 0; display: block; width: 100%; height: 100%; }
.im-baner__zdjecie img { object-fit: cover; object-position: 60% 50%; }
.im-baner__karta { position: absolute; top: 50%; left: 4.5%; width: min(480px, 40%); padding: clamp(22px, 2.6vw, 38px) clamp(22px, 2.8vw, 40px); transform: translateY(-50%); border-radius: 16px; background: rgba(255, 255, 255, .88); -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px); box-shadow: 0 18px 50px rgba(60, 40, 15, .14); }
.im-baner h1 { margin: 0 0 14px; font-size: clamp(25px, 2.55vw, 38px); line-height: 1.15; font-weight: 700; letter-spacing: -.01em; color: var(--im-czern); }
.im-baner p { margin: 0 0 24px; font-size: clamp(14.5px, 1.2vw, 17px); line-height: 1.55; color: #4a443d; }
.im-baner__korzysci { display: none; }

.im-sekcja { padding: 56px 0 0; }
.im-sekcja__tytul { margin: 0 0 6px; font-size: 28px; line-height: 1.2; font-weight: 700; color: var(--im-czern); }
.im-sekcja__opis { margin: 0 0 26px; color: var(--im-szary); }
.im-sekcja__gora { display: flex; align-items: flex-end; justify-content: space-between; gap: 20px; margin-bottom: 26px; }
.im-sekcja__gora .im-sekcja__opis { margin-bottom: 0; }
.im-strona .im-sekcja__wiecej { display: inline-flex; align-items: center; gap: 8px; font-weight: 600; color: var(--im-zloto-ciemne); white-space: nowrap; }

.im-opinie .im-sekcja__tytul { margin-bottom: 22px; }
.im-opinie__widzet { min-height: 330px; }

.im-rozmiary__lista { display: grid; grid-template-columns: repeat(8, 1fr); gap: 12px; list-style: none; margin: 0; padding: 0; }
.im-rozmiary__lista a { display: flex; align-items: baseline; justify-content: center; gap: 5px; padding: 18px 6px; border: 1px solid var(--im-linia); border-radius: 10px; font-size: 18px; font-weight: 700; color: var(--im-czern); transition: border-color .15s, box-shadow .15s; }
.im-rozmiary__lista a:hover { border-color: var(--im-zloto); box-shadow: 0 6px 18px rgba(219, 155, 46, .16); }
.im-rozmiary__lista small { font-size: 12px; font-weight: 400; color: var(--im-szary); }

.im-kafle { display: grid; grid-template-columns: repeat(4, 1fr); gap: 24px; list-style: none; margin: 0; padding: 0; }
.im-kafel a { display: flex; flex-direction: column; height: 100%; overflow: hidden; border: 1px solid var(--im-linia); border-radius: 12px; background: #fff; transition: box-shadow .15s, transform .15s; }
.im-kafel a:hover { box-shadow: 0 14px 34px rgba(0, 0, 0, .08); transform: translateY(-2px); }
.im-kafel__zdjecie { position: relative; display: block; aspect-ratio: 4 / 3; overflow: hidden; background: #f4f1ed; }
.im-kafel__zdjecie img { position: absolute; inset: 0; display: block; width: 100%; height: 100%; object-fit: cover; }
.im-kafel__tytul { padding: 18px 20px 4px; font-size: 18px; line-height: 1.3; font-weight: 700; color: var(--im-czern); }
.im-kafel__link { display: inline-flex; align-items: center; gap: 8px; padding: 0 20px 20px; margin-top: auto; font-weight: 600; color: var(--im-zloto-ciemne); }

/* Najczesciej wybierane: lista produktow WooCommerce jako siatka kart */
.im-najczesciej ul.products { display: grid; grid-template-columns: repeat(4, 1fr); gap: 24px; list-style: none; margin: 0; padding: 0; }
.im-najczesciej ul.products::before, .im-najczesciej ul.products::after { display: none !important; }
.im-najczesciej ul.products li.product { position: relative; display: flex; flex-direction: column; float: none !important; width: auto !important; margin: 0 !important; padding: 14px 14px 16px; border: 1px solid var(--im-linia); border-radius: 12px; background: #fff; }
.im-najczesciej li.product a.woocommerce-loop-product__link { display: block; }
.im-najczesciej li.product img { display: block; width: 100%; margin: 0 0 12px !important; border-radius: 8px; }
.im-najczesciej li.product .woocommerce-loop-product__title { margin: 0 0 8px; padding: 0 !important; font-size: 15px !important; line-height: 1.4; font-weight: 600; color: var(--im-czern); }
.im-najczesciej li.product .price { display: block; margin: 0 0 12px !important; font-size: 18px !important; font-weight: 700; color: var(--im-czern) !important; }
.im-najczesciej li.product .price del { margin-right: 6px; font-size: 14px; font-weight: 400; color: var(--im-szary); opacity: 1; }
.im-najczesciej li.product .price ins { text-decoration: none; }
.im-najczesciej li.product .star-rating { margin: 0 0 8px !important; }
.im-najczesciej ul.products li.product .button { display: flex; align-items: center; justify-content: center; margin: auto 0 0 !important; min-height: 44px; padding: 0 12px; line-height: 1.2; text-align: center; border-radius: 8px; background: var(--im-czern); color: #fff; font-size: 13px; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; }
.im-najczesciej ul.products li.product .button:hover { background: var(--im-zloto-ciemne); color: #fff; }
.im-najczesciej ul.products li.product .onsale { position: absolute; top: 22px; left: 22px; right: auto; bottom: auto; z-index: 2; min-width: 0; min-height: 0; margin: 0; padding: 5px 10px; border-radius: 6px; background: var(--im-zloto); color: #fff; font-size: 12px; font-weight: 700; line-height: 1; text-transform: uppercase; }

.im-blog__lista { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; list-style: none; margin: 0; padding: 0; }
.im-blog__lista a { display: flex; flex-direction: column; height: 100%; }
.im-blog__zdjecie { position: relative; display: block; aspect-ratio: 570 / 434; overflow: hidden; border-radius: 12px; background: #f4f1ed; }
.im-blog__zdjecie img { position: absolute; inset: 0; display: block; width: 100%; height: 100%; object-fit: cover; }
.im-blog__tytul { margin: 14px 0 6px; font-size: 17px; line-height: 1.35; font-weight: 700; color: var(--im-czern); }
.im-blog__zajawka { color: var(--im-szary); font-size: 14px; }

.im-osklepie__tekst { position: relative; max-height: 230px; overflow: hidden; }
.im-osklepie__tekst::after { content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 90px; background: linear-gradient(to bottom, rgba(255, 255, 255, 0), #fff); }
.im-osklepie__tekst.im-otwarte { max-height: none; }
.im-osklepie__tekst.im-otwarte::after { display: none; }
.im-osklepie__tekst > :first-child { margin-top: 0; }
.im-osklepie__tekst h1, .im-osklepie__tekst h2 { font-size: clamp(21px, 2.3vw, 30px); line-height: 1.25; }
.im-osklepie__wiecej { margin-top: 12px; padding: 0; border: 0; background: none; font: 600 15px/1.4 "Open Sans", sans-serif; color: var(--im-zloto-ciemne); cursor: pointer; text-decoration: underline; }

@media (max-width: 1199px) {
	.im-kafle, .im-najczesciej ul.products { gap: 16px; }
}
/* Telefon i tablet: zdjecie na gorze, karta z tekstem nachodzi na jego dol */
@media (max-width: 899px) {
	.im-baner { padding: 0; }
	.im-baner__ramka { max-width: none; overflow: visible; border-radius: 0; aspect-ratio: auto; background: none; }
	.im-baner__zdjecie, .im-baner__zdjecie img { position: static; height: auto; }
	.im-baner__karta { position: relative; top: auto; left: auto; width: auto; margin: -34px 16px 0; padding: 24px 20px 22px; transform: none; background: #fff; -webkit-backdrop-filter: none; backdrop-filter: none; box-shadow: 0 12px 36px rgba(60, 40, 15, .12); }
	.im-baner h1 { font-size: 27px; }
	.im-baner p { margin-bottom: 20px; font-size: 15.5px; }
	.im-baner .im-btn { width: 100%; }
	.im-baner__korzysci { display: grid; grid-template-columns: 1fr 1fr; gap: 12px 14px; list-style: none; margin: 20px 0 0; padding: 0; font-size: 13px; line-height: 1.35; color: #3d3833; }
	.im-baner__korzysci li { display: flex; align-items: center; gap: 9px; }
}
@media (max-width: 991px) {
	.im-sekcja { padding-top: 38px; }
	.im-sekcja__tytul { font-size: 23px; }
	.im-sekcja__opis { margin-bottom: 18px; }
	.im-sekcja__gora { display: block; margin-bottom: 18px; }
	.im-sekcja__wiecej { margin-top: 8px; }
	.im-opinie__widzet { min-height: 430px; }
	.im-rozmiary__lista { grid-template-columns: repeat(4, 1fr); gap: 8px; }
	.im-rozmiary__lista a { flex-direction: column; align-items: center; gap: 0; padding: 12px 2px; font-size: 15px; }
	.im-kafle, .im-najczesciej ul.products { grid-template-columns: 1fr 1fr; gap: 12px; }
	.im-kafel__tytul { padding: 12px 12px 2px; font-size: 15px; }
	.im-kafel__link { padding: 0 12px 14px; font-size: 13px; }
	.im-najczesciej ul.products li.product { padding: 10px 10px 12px; }
	.im-najczesciej li.product .woocommerce-loop-product__title { font-size: 13.5px !important; }
	.im-najczesciej li.product .price { font-size: 16px !important; }
	.im-najczesciej li.product .button { min-height: 40px; font-size: 12px; }
	.im-blog__lista { grid-template-columns: 1fr; gap: 20px; }
}

/* Serduszko "obserwuj" na karcie produktu */
.im-serce { position: absolute; top: 22px; right: 22px; z-index: 3; display: flex; align-items: center; justify-content: center; width: 38px; height: 38px; padding: 0; border: 0; border-radius: 50%; background: rgba(255, 255, 255, .94); box-shadow: 0 2px 10px rgba(0, 0, 0, .1); color: var(--im-czern); cursor: pointer; }
.im-serce[aria-pressed="true"] { color: #d23f3f; }
.im-serce[aria-pressed="true"] svg { fill: currentColor; }
@media (max-width: 991px) { .im-serce { top: 16px; right: 16px; width: 34px; height: 34px; } }
