﻿/* ================================================================
   AI Chat — Product Cards
   ================================================================ */
/* === RESET === */
.ai-assistant__msg--bot .ai-card,
.ai-assistant__msg--bot .ai-card *,
.ai-assistant__msg--bot .ai-product-swiper * { box-sizing: border-box; }
.ai-assistant__msg--bot .ai-card p,
.ai-assistant__msg--bot .ai-card span,
.ai-assistant__msg--bot .ai-card a,
.ai-assistant__msg--bot .ai-card div,
.ai-assistant__msg--bot .ai-card button,
.ai-assistant__msg--bot .ai-card input { font-family: ProximaNovaRegular,Arial,sans-serif;}
.ai-assistant__msg--bot .ai-card p { padding: 0; }

/* === SWIPER === */
.ai-assistant__msg--bot .ai-product-swiper { position: relative; margin: 8px 0; overflow: hidden; }
.ai-assistant__msg--bot .ai-product-swiper .swiper-slide { height: auto; display: flex; }
.ai-assistant__msg--bot .ai-product-swiper .swiper-slide .ai-card { width: 100%; }

/* Nav arrows */
.ai-assistant__msg--bot .ai-swiper-prev,
.ai-assistant__msg--bot .ai-swiper-next { position: absolute; top: 42%; z-index: 10; width: 30px; height: 30px; border: none; padding: 0; cursor: pointer; transform: translateY(-50%); transition: transform .2s,opacity .2s; background: no-repeat center / contain; }
.ai-assistant__msg--bot .ai-swiper-prev { left: 0; background-image: url('/local/templates/public2016/images/svg/arrow-banner-swiper-left_new.svg'); }
.ai-assistant__msg--bot .ai-swiper-next { right: 0; background-image: url('/local/templates/public2016/images/svg/arrow-banner-swiper-right_new.svg'); }
.ai-assistant__msg--bot .ai-swiper-prev:hover,
.ai-assistant__msg--bot .ai-swiper-next:hover { transform: translateY(-50%) scale(1.2); }
.ai-assistant__msg--bot .swiper-button-disabled { opacity: .3; cursor: default; }
.ai-assistant__msg--bot .swiper-button-disabled:hover { transform: translateY(-50%); }
.ai-assistant__msg--bot .ai-swiper-prev::after,
.ai-assistant__msg--bot .ai-swiper-next::after { display: none; }

/* Pagination */
.ai-assistant__msg--bot .ai-swiper-pagination { display: flex; justify-content: center; gap: 4px; margin-top: 6px; }
.ai-assistant__msg--bot .swiper-pagination-bullet { width: 5px; height: 5px; border-radius: 50%; background: #ccc; cursor: pointer; opacity: .4; }
.ai-assistant__msg--bot .swiper-pagination-bullet-active { background: #003c23; opacity: 1; }

/* === CARD === */
.ai-assistant__msg--bot .ai-card { border: 1px solid #E5E5E5; border-radius: 24px; background: #fff; padding: 15px; position: relative; }
.ai-assistant__msg--bot .ai-card-wrap { padding-top: 30px; }
.ai-assistant__msg--bot .ai-card-inner { display: flex; flex-direction: column; height: 100%; }

/* Badges container */
.ai-assistant__msg--bot .ai-badges { position: absolute; top: 0; left: 0; z-index: 2; display: flex; align-items: center; }
/* Prikaz badge */
.ai-assistant__msg--bot .ai-badge { background: #ffeaad; color: #333; font-size: 14px; padding: 3px 17px; border-radius: 0; white-space: nowrap; }
/* First badge — top-left rounded */
.ai-assistant__msg--bot .ai-badge:first-child { border-radius: 24px 0 0 0; }
/* Only one badge — top-left AND bottom-right */
.ai-assistant__msg--bot .ai-badge:only-child { border-radius: 24px 0 24px 0; }
/* Last of 2+ badges — bottom-right rounded */
.ai-assistant__msg--bot .ai-badge:last-child:not(:only-child) { border-radius: 0 0 24px 0; }
/* MPT badge */
.ai-assistant__msg--bot .ai-badge--mpt { color: #212b4f; background-color: #e8eff5; padding: 3px 12px 3px 8px; border-radius: 0 0 24px 0; display: flex; align-items: center; }
.ai-assistant__msg--bot .ai-badge--mpt::before { content: ''; display: flex; width: 14px; height: 14px; margin-right: 4px; flex-shrink: 0; background-image: url(data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iNjgiIGhlaWdodD0iNTciIHZpZXdCb3g9IjAgMCA2OCA1NyIgZmlsbD0ibm9uZSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj4KPHBhdGggZD0iTTIyLjkxNzYgMTdMMCA1Ni45NzI2SDE1QzE4LjY1MzUgNTAuOTAwOCAyNi4wMDcyIDM4LjIzODMgMjggMzVDMzAuMjc5MiAzMS4yOTY1IDI5LjMzMDMgMjcuODQ5MyAyOC41IDI2LjVMMjIuOTE3NiAxN1oiIGZpbGw9IiM0NzU1OUQiLz4KPHBhdGggZD0iTTU1Ljg2OTUgMzkuODMzNUwzMi43MTEgLTQuNzUyMDNlLTA3TDI1LjIxMSAxMi45OTA0QzI4LjY0MjYgMTkuMTkwMyAzNS45MzE4IDMxLjg5IDM3LjczOTggMzUuMjM1QzM5LjgwNzYgMzkuMDYwNiA0My4yNjczIDM5Ljk2MjUgNDQuODUxIDM5LjkxOEw1NS44Njk1IDM5LjgzMzVaIiBmaWxsPSIjNDc1NTlEIi8+CjxwYXRoIGQ9Ik0xOS42NDMxIDU2Ljk3MjZMNjUuNzU2MSA1Ni45NzI2TDU4LjAyODUgNDMuNzEwMkM1MC45NDM0IDQzLjU4MiAzNi41Mjk2IDQzLjcxMDIgMzIuNzI3MyA0My43MTAyQzI4LjQ1ODMgNDMuNzEwMiAyNS44Njk0IDQ2LjEzMzQgMjUuMTE2MSA0Ny41MjcyTDE5LjY0MzEgNTYuOTcyNloiIGZpbGw9IiM0NzU1OUQiLz4KPC9zdmc+Cg==); background-size: contain; background-repeat: no-repeat; background-position: center; }

/* Image 1:1 */
.ai-assistant__msg--bot .ai-card-pics { margin: 0 0 10px; touch-action: pan-y; }
.ai-assistant__msg--bot .ai-card-pic-link { display: block; width: 85%; aspect-ratio: 1/1; position: relative; overflow: hidden; border-radius: 12px; background: transparent; margin: 0 auto; }
.ai-assistant__msg--bot .ai-card-img { width: 100%; height: 100%; object-fit: contain; position: absolute; top: 0; left: 0; opacity: 0; transition: opacity .25s; }
.ai-assistant__msg--bot .ai-card-img.ai-active { opacity: 1; position: relative; }
.ai-assistant__msg--bot .ai-card-dots { display: flex; gap: 4px; margin-top: 4px; }
.ai-assistant__msg--bot .ai-card-dot { flex: 1; min-width: 0; height: 16px; cursor: pointer; position: relative; }
.ai-assistant__msg--bot .ai-card-dot::after { content: ''; position: absolute; inset: 4px 0 auto; height: 8px; border-radius: 4px; background: #D9D9D9; }
.ai-assistant__msg--bot .ai-card-dot.ai-active::after,
.ai-assistant__msg--bot .ai-card-dot:hover::after { background: #235E45; }

/* Code + copy */
.ai-assistant__msg--bot .ai-card-code { display: flex; align-items: center; gap: 5px; color: #666; font-size: 14px; margin-block: 5px; }
.ai-assistant__msg--bot .ai-copy { width: 16px; height: 16px; border: none; flex-shrink: 0; cursor: pointer; background: url('/local/images/svg/id_copy_green.svg') center / contain no-repeat; }

/* Name + desc */
.ai-assistant__msg--bot .ai-card-name a { font-size: 18px; font-weight: bold; color: #333; text-decoration: none; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; line-height: normal;}
.ai-assistant__msg--bot .ai-card-name a:hover { text-decoration: none; }
.ai-assistant__msg--bot .ai-card-desc { font-size: 15px; color: #555; margin: 10px 0 10px; display: -webkit-box; -webkit-line-clamp: 4; -webkit-box-orient: vertical; overflow: hidden; }

/* === BOTTOM: price + actions === */
.ai-assistant__msg--bot .ai-card-bottom { margin: auto 0 0; }
.ai-assistant__msg--bot .ai-card-price-row { display: flex; flex-wrap: wrap; align-items: center; gap: 0 8px; }
.ai-assistant__msg--bot .ai-card-price { font-size: 20px; font-weight: bold; color: #000; white-space: nowrap; line-height: normal; }
.ai-assistant__msg--bot .ai-card-total { font-size: 16px; color: #666; width: 100%; min-height: 32px; }
.ai-assistant__msg--bot .ai-card-total .ai-card-total-val { color: #295e45; font-weight: bold; }
.ai-assistant__msg--bot .ai-card-total--hide { visibility: hidden; }

/* Actions */
.ai-assistant__msg--bot .ai-actions { display: flex; align-items: center; justify-content: center; gap: 8px; flex-wrap: wrap; width: 100%; min-height: 40px;}

/* Cart btn */
.ai-assistant__msg--bot .ai-cart { display: inline-flex !important; align-items: center; justify-content: center; gap: 6px; height: 40px; padding: 0 20px; background: #235E45; color: #fff; border: none; border-radius: 24px; font-size: 16px; cursor: pointer; white-space: nowrap; text-decoration: none; }
.ai-assistant__msg--bot .ai-cart::before { content: ""; display: inline-block; width: 22px; height: 22px; flex-shrink: 0; background: url('/local/images/svg/basket_icon.svg') center / contain no-repeat; filter: brightness(0) invert(1); }
.ai-assistant__msg--bot .ai-cart:hover { background: #2d7758; }

/* In-cart state */
.ai-assistant__msg--bot .ai-cart-inner { display: none; align-items: center; gap: 8px; }
.ai-assistant__msg--bot .ai-card--in-cart .ai-cart-inner { display: flex; }
.ai-assistant__msg--bot .ai-card--in-cart .ai-cart { display: none !important; }

/* Remove btn */
.ai-assistant__msg--bot .ai-remove { width: 40px; height: 40px; border: 1px solid #C0392B; border-radius: 50%; background: transparent; cursor: pointer; flex-shrink: 0; }
.ai-assistant__msg--bot .ai-remove::before { content: ""; display: block; width: 20px; height: 22px; margin: auto; background: url('/local/images/svg/to-trash.svg') center / contain no-repeat; }
.ai-assistant__msg--bot .ai-remove:hover { background: #ffe8e6; }

/* Counter */
.ai-assistant__msg--bot .ai-counter { display: flex; align-items: center; gap: 2px; border: 1px solid #d1d1d1; border-radius: 24px; height: 40px; padding: 0 2px; background: #fff; }
.ai-assistant__msg--bot .ai-qty { width: 32px; height: 32px; min-width: 32px; display: flex; align-items: center; justify-content: center; border: none; border-radius: 50%; background: transparent; cursor: pointer; position: relative; flex: none; }
.ai-assistant__msg--bot .ai-qty--plus::before,
.ai-assistant__msg--bot .ai-qty--plus::after { content: ''; position: absolute; background: #235E45; border-radius: 2px; }
.ai-assistant__msg--bot .ai-qty--plus::before { width: 12px; height: 2px; }
.ai-assistant__msg--bot .ai-qty--plus::after { width: 2px; height: 12px; }
.ai-assistant__msg--bot .ai-qty--minus::after { content: ''; position: absolute; width: 12px; height: 2px; background: #235E45; border-radius: 2px; }
.ai-assistant__msg--bot .ai-qty-val { width: 40px; text-align: center; border: none; outline: none; font-size: 18px; color: #000; background: transparent; -moz-appearance: textfield; }
.ai-assistant__msg--bot .ai-qty-val::-webkit-outer-spin-button,
.ai-assistant__msg--bot .ai-qty-val::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }

/* Fav */
.ai-assistant__msg--bot .ai-fav { width: 40px; height: 40px; border: 1px solid #d1d1d1; border-radius: 50%; display: flex; align-items: center; justify-content: center; cursor: pointer; flex-shrink: 0; background: transparent; }
.ai-assistant__msg--bot .ai-fav svg { position: relative; top: 2px; pointer-events: none; }
.ai-assistant__msg--bot .ai-fav--active svg { fill: #235E45; }
.ai-assistant__msg--bot .ai-fav:hover { background: #E9EFEC; }

/* Loading */
.ai-assistant__msg--bot .ai-loading { display: none; gap: 4px; align-items: center; padding: 0 4px; }
.ai-assistant__msg--bot .ai-loading span { width: 6px; height: 6px; border-radius: 50%; background: #235E45; animation: ai-dot-bounce 1.2s infinite ease-in-out both; }
.ai-assistant__msg--bot .ai-loading span:nth-child(1) { animation-delay: -.32s; }
.ai-assistant__msg--bot .ai-loading span:nth-child(2) { animation-delay: -.16s; }
.ai-assistant__msg--bot .ai-loading span:nth-child(3) { animation-delay: 0s; }
@keyframes ai-dot-bounce { 0%,80%,100% { transform: scale(.6); opacity: .4; } 40% { transform: scale(1); opacity: 1; } }
.ai-assistant__msg--bot .ai-loading--active .ai-loading { display: flex; }
.ai-assistant__msg--bot .ai-loading--active .ai-cart,
.ai-assistant__msg--bot .ai-loading--active .ai-cart-inner,
.ai-assistant__msg--bot .ai-loading--active .ai-fav { display: none !important; }

/* === ADAPTIVE === */
@media (max-width: 480px) {
    .ai-assistant__msg--bot .ai-swiper-prev,
    .ai-assistant__msg--bot .ai-swiper-next { display: none; }
    .ai-assistant__msg--bot .ai-product-swiper { padding: 0; }
    .ai-assistant__msg--bot .ai-card-name a { font-size: 14px; }
    .ai-assistant__msg--bot .ai-card-price { font-size: 16px; }
}
