/* Torpedoplus — small additions on top of the original theme CSS (public/theme/<page>.css). */

/* Home slider (replaces Revolution Slider) */
.tp-slider { position: relative; aspect-ratio: 880 / 389; overflow: hidden; background: #fff; }
.tp-slide { position: absolute; inset: 0; opacity: 0; transition: opacity .8s ease; }
.tp-slide.is-active { opacity: 1; z-index: 1; }
.tp-slide img { width: 100%; height: 100%; object-fit: contain; display: block; }
/* Revolution Slider kept a fixed height on phones (image "contain"-ed inside) */
@media (max-width: 767px) { .tp-slider { aspect-ratio: auto; height: 282px; } }

/* "Možda vas zanima" ticker (replaces Swiper) */
.eael-ticker .swiper-wrapper { position: relative; display: block; height: 100%; min-height: 20px; }
.eael-ticker .swiper-slide { position: absolute; inset: 0; opacity: 0; transform: translateY(8px); transition: opacity .35s, transform .35s; }
.eael-ticker .swiper-slide.is-active { opacity: 1; transform: none; position: relative; }

/* Bottom product carousel */
.eael-woo-product-carousel .swiper-wrapper { display: flex !important; gap: 10px; margin: 0 !important; transition: transform .4s ease; }
.eael-woo-product-carousel .swiper-wrapper > .swiper-slide { flex: 0 0 auto; width: calc((100% - 20px) / 3) !important; }
.eael-woo-product-carousel { overflow: hidden; }
@media (max-width: 1023px) { .eael-woo-product-carousel .swiper-wrapper > .swiper-slide { width: calc((100% - 10px) / 2) !important; } }
@media (max-width: 767px) { .eael-woo-product-carousel .swiper-wrapper > .swiper-slide { width: 100% !important; } }
.swiper-pagination-bullet { cursor: pointer; }

/* Header cart toast */
.tp-toast { position: fixed; left: 50%; bottom: 24px; z-index: 1000; transform: translate(-50%, 20px); opacity: 0; pointer-events: none;
    max-width: calc(100% - 32px); padding: 14px 20px; border-radius: 4px; background: #222; color: #fff; font-size: 14px;
    box-shadow: 0 6px 24px rgb(0 0 0 / .25); transition: opacity .25s, transform .25s; }
.tp-toast.show { opacity: 1; transform: translate(-50%, 0); pointer-events: auto; }
.tp-toast a { color: #8fc0ff; font-weight: 600; margin-left: 6px; text-decoration: underline; }
.ajax_add_to_cart.loading { opacity: .6; pointer-events: none; }

/* Mini cart remove button is a form button here */
.tp-inline { display: inline; margin: 0; }
.mini_cart_item .remove_from_cart_button { border: 0; background: none; cursor: pointer; font-size: 18px; line-height: 1; padding: 0; }
.cart_item .product-remove .remove { border: 0; background: none; cursor: pointer; font-size: 20px; }
.tp-link-button { border: 0; background: none; padding: 0; cursor: pointer; font: inherit; color: inherit; }

/* Product gallery (replaces FlexSlider/PhotoSwipe) */
.tp-gallery { opacity: 1 !important; }
.tp-gallery .woocommerce-product-gallery__image { display: none; }
.tp-gallery .woocommerce-product-gallery__image.is-active { display: block; }
.tp-gallery .flex-control-thumbs { display: flex; gap: 10px; flex-wrap: wrap; list-style: none; margin: 10px 0 0; padding: 0; }
.tp-gallery .flex-control-thumbs li { width: 80px; }
.tp-gallery .flex-control-thumbs img { cursor: pointer; border: 1px solid #e6e6e6; opacity: .6; }
.tp-gallery .flex-control-thumbs img.flex-active { opacity: 1; border-color: var(--main-color, #266dbe); }

/* Related products: one swipeable row like the old Slick slider (4 / 3 / 2 visible) */
.tp-row-scroll { display: grid !important; grid-auto-flow: column; grid-template-columns: none !important; grid-auto-columns: 25%; gap: 0;
    overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none; margin: 0 !important; }
.tp-row-scroll::-webkit-scrollbar { display: none; }
.tp-row-scroll > li { scroll-snap-align: start; width: auto !important; }
@media (max-width: 991px) { .tp-row-scroll { grid-auto-columns: 33.333%; } }
@media (max-width: 479px) { .tp-row-scroll { grid-auto-columns: 50%; } }

/* Order received: IPS QR + payment data */
.tp-payment { display: grid; grid-template-columns: 240px 1fr; gap: 30px; margin: 30px 0; padding: 30px; border: 1px solid #e6e6e6; border-top: 3px solid var(--main-color, #266dbe); background: #fafafa; }
.tp-payment__qr { text-align: center; }
.tp-payment__qr img { width: 200px; height: 200px; background: #fff; padding: 8px; border: 1px solid #e6e6e6; }
.tp-payment__qr p { margin-top: 12px; font-size: 13px; line-height: 1.5; }
.tp-payment__data h2 { margin: 0 0 15px; font-size: 18px; text-transform: uppercase; }
.tp-payment__data table { margin-bottom: 20px; background: #fff; }
.tp-payment__data th { width: 40%; font-weight: 400; }
.tp-payment__note { margin-top: 15px; font-size: 13px; }
@media (max-width: 767px) { .tp-payment { grid-template-columns: 1fr; padding: 20px; } }

/* Mobile menu: tapping the panel title goes back to the main list */
.ovic-menu-current-panel-title.active { cursor: pointer; }
.ovic-menu-current-panel-title.active::before { content: '\2039'; margin-inline-end: 8px; }

/* Home: the always-open category menu covers the top of the left sidebar (as on the old site) */
@media (min-width: 1200px) {
    .home #secondary .sidebar-inner { padding-top: 473px; }
    .home #secondary #search-2 { display: none; }
}

/* Descriptions saved from the admin editor wrap list items in <p>; keep the original spacing */
.woocommerce-product-details__short-description li > p,
.woocommerce-Tabs-panel li > p,
.entry-content li > p { margin: 0; }

/* Sort / per-page selects: the old theme used jQuery "Chosen", which sized them to their content */
.shop-before-control .display-sort-by,
.shop-before-control .display-per-page { width: auto !important; flex: 0 0 auto; }
.shop-before-control select.orderby,
.shop-before-control select.option-perpage { width: auto !important; min-width: 0; padding-inline-end: 28px; }

/* Review form honeypot (hidden from people, filled by spam bots) */
.tp-hp { position: absolute !important; left: -9999px !important; width: 1px; height: 1px; overflow: hidden; }

/* "Pozovite za cenu" for products without a price */
.tp-call-price { color: var(--main-color, #266dbe); font-weight: 600; }
p.price.tp-call-price { font-size: 22px; margin-bottom: 10px; }
.tp-call-box { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 16px; margin: 0 0 20px; }
.tp-call-box .tp-call-button { display: inline-flex; align-items: center; gap: 8px; }
.tp-call-box span:last-child { font-size: 13px; color: #666; flex: 1 1 220px; }

/* "Obavesti me kad stigne" on out-of-stock products */
.tp-stock-alert { margin: 0 0 20px; padding: 16px; background: #f6f6f6; border-left: 3px solid var(--main-color, #266dbe); max-width: 440px; }
.tp-stock-alert__title { margin: 0 0 10px; font-weight: 600; }
.tp-stock-alert__form { display: flex; gap: 8px; }
.tp-stock-alert__form input[type="email"] { flex: 1 1 auto; min-width: 0; height: 42px; padding: 0 12px; border: 1px solid #ddd; background: #fff; }
.tp-stock-alert__form .button { height: 42px; white-space: nowrap; }
.tp-stock-alert__done { margin: 0; color: #2e7d32; font-weight: 600; }
.tp-stock-alert__error { margin: 8px 0 0; color: #c62828; font-size: 13px; }

/* Kupovina na rate (instalment calculator under the price) */
.tp-installments { margin: 12px 0 16px; padding: 10px 14px; border: 1px dashed #c9d9ee; background: #f5f9fe; border-radius: 4px; max-width: 440px; }
.tp-installments__plans { margin: 0; font-size: 15px; }
.tp-installments__plan { white-space: nowrap; color: var(--main-color, #266dbe); font-weight: 600; }
.tp-installments__note { margin: 4px 0 0; font-size: 12px; color: #666; line-height: 1.4; }
