/* AGG · Каса и количка 1.0.0 (agrogradina.bg, 01.11.2026) — пренесено от sortovisemenabg.com (вълна 6), с цветовете на агроградина:
   зелено #62AD2D / #58982B (theme_6 на NewStore), линкове #58982B, шрифт Roboto (касата на Tanko) и Roboto Condensed (бутоните на темата),
   кехлибар #FCF3E3 / #C98211 / #7A4E06 (одобрената палитра за съобщения). Всичко е под #tk_checkout или с префикс agg-. */

/* ---- Артикулите: компактен ред — снимка 48 px | име до 2 реда + „цена/бр. · Код“ | − бр. + | сума | кошче */
#tk_checkout #tk_cart .tk_panel_body { font-size: 13px; }
#tk_checkout #agg-cart { display: flex; flex-direction: column; margin: 0 0 6px; }
#tk_checkout .agg-ci { display: grid; grid-template-columns: 48px minmax(0, 1fr) auto 78px 30px; grid-template-areas: "img name qty total rm" "img meta qty total rm"; column-gap: 10px; row-gap: 1px; align-items: center; padding: 6px 0; border-bottom: 1px solid #eee; }
#tk_checkout .agg-ci:first-child { padding-top: 2px; }
#tk_checkout .agg-ci__img { grid-area: img; width: 48px; height: 48px; border: 1px solid #e5e5e5; border-radius: 3px; overflow: hidden; background: #fff; display: flex; align-items: center; justify-content: center; color: #999; }
#tk_checkout .agg-ci__img img { width: 100%; height: 100%; object-fit: contain; display: block; }
#tk_checkout .agg-ci__name { grid-area: name; align-self: end; min-width: 0; font-size: 13.5px; font-weight: 500; line-height: 1.25; color: #58982b; text-decoration: none; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; overflow-wrap: anywhere; }
#tk_checkout a.agg-ci__name:hover, #tk_checkout a.agg-ci__name:focus { color: #3f7a1a; text-decoration: underline; }
#tk_checkout .agg-ci__meta { grid-area: meta; align-self: start; min-width: 0; font-size: 12px; line-height: 1.4; color: #777; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
#tk_checkout .agg-ci__meta > span + span::before { content: "·"; margin: 0 5px; color: #bbb; }
#tk_checkout .agg-ci__unit { color: #333; }
#tk_checkout .agg-ci__opt { color: #7a4e06; }
#tk_checkout .agg-ci__warn { color: #c9302c; font-weight: 600; }
#tk_checkout .agg-ci--nostock .agg-ci__img { border-color: #f0b4ae; }
#tk_checkout .agg-qty { grid-area: qty; display: inline-flex; align-items: stretch; height: 32px; border: 1px solid #ccc; border-radius: 3px; overflow: hidden; background: #fff; }
#tk_checkout .agg-qty__btn { width: 30px; border: 0; padding: 0; background: #f5f5f5; color: #333; font-size: 18px; font-weight: 600; line-height: 1; cursor: pointer; touch-action: manipulation; }
#tk_checkout .agg-qty__btn:hover:not(:disabled) { background: #e8f2df; color: #3f7a1a; }
#tk_checkout .agg-qty__btn:focus-visible { outline: 2px solid #58982b; outline-offset: -2px; }
#tk_checkout .agg-qty__btn:disabled { color: #bbb; cursor: default; }
#tk_checkout #agg-cart input.agg-qty__input { width: 40px !important; height: 30px !important; margin: 0 !important; padding: 0 !important; display: block; border-width: 0 1px !important; border-style: solid !important; border-color: #e5e5e5 !important; border-radius: 0; background: #fff !important; box-shadow: none; text-align: center; font-size: 14px; font-weight: 700; color: #333; -moz-appearance: textfield; appearance: textfield; }
#tk_checkout #agg-cart input.agg-qty__input::-webkit-outer-spin-button, #tk_checkout #agg-cart input.agg-qty__input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
#tk_checkout .agg-ci__total { grid-area: total; text-align: right; font-size: 14.5px; font-weight: 700; color: #333; white-space: nowrap; }
#tk_checkout .agg-ci__remove { grid-area: rm; justify-self: end; width: 30px; height: 30px; display: flex; align-items: center; justify-content: center; padding: 0; border: 0; border-radius: 3px; background: none; color: #c9302c; font-size: 15px; cursor: pointer; }
#tk_checkout .agg-ci__remove:hover, #tk_checkout .agg-ci__remove:focus-visible { background: #fbeaea; color: #a52521; }
#tk_checkout .agg-ci--voucher .agg-ci__name { grid-row: 1 / span 2; align-self: center; }

/* ---- Сумите: етикет вляво, сума вдясно; „Общо за плащане“ — едро, с линия отгоре */
#tk_checkout #tk_cart_table { margin-top: 4px; }
#tk_checkout #tk_cart .tk_totals_price { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; margin: 0; padding: 6px 0; font-size: 14px; color: #333; }
#tk_checkout #tk_cart .tk_totals_price .tk_totals_left, #tk_checkout #tk_cart .tk_totals_price .tk_totals_right { float: none; width: auto; padding: 0; }
#tk_checkout #tk_cart .tk_totals_price .tk_totals_left { text-align: left !important; flex: 1 1 auto; min-width: 0; }
#tk_checkout #tk_cart .tk_totals_price .tk_totals_left strong { font-weight: 400; }
#tk_checkout #tk_cart .tk_totals_price .tk_totals_right { text-align: right; white-space: nowrap; font-weight: 600; }
#tk_checkout #tk_cart .tk_totals_price .tk_clear { display: none; }
#tk_checkout #tk_cart .tk_totals_price.c-total { margin-top: 6px; padding-top: 12px; border-top: 2px solid #333; font-size: 18px; color: #222; }
#tk_checkout #tk_cart .tk_totals_price.c-total .tk_totals_left strong { font-weight: 700; }
#tk_checkout #tk_cart .tk_totals_price.c-total .tk_totals_right { font-weight: 800; }

/* ---- Лентата „до безплатна доставка“ и минималната сума (касата и мини количката) */
.agg-cx { display: flex; flex-direction: column; gap: 8px; margin: 10px 0 8px; font-family: Roboto, "Roboto Condensed", sans-serif; font-size: 13px; line-height: 1.4; text-align: left; }
.agg-cx__min { display: flex; gap: 8px; align-items: flex-start; padding: 9px 12px; border-radius: 4px; background: #fcf3e3; border: 1px solid #e3c48c; border-left: 4px solid #c98211; color: #7a4e06; }
.agg-cx__min .fa { margin-top: 2px; color: #c98211; }
.agg-fs { padding: 9px 12px 10px; border-radius: 4px; background: #f3f9ee; border: 1px solid #d5e9c5; color: #2e4f17; }
.agg-fs__txt .fa { color: #58982b; margin-right: 3px; }
.agg-fs__txt b { color: #3f7a1a; }
.agg-fs__txt small { color: #557040; font-size: 12px; }
.agg-fs__bar { height: 8px; margin-top: 8px; border-radius: 99px; background: #dfeed3; overflow: hidden; }
.agg-fs__bar i { display: block; height: 100%; border-radius: 99px; background: linear-gradient(90deg, #7cc144, #58982b); transition: width .4s ease; }
.agg-fs--free { background: #e9f5df; border-color: #bfe0a6; }
.agg-fs--free .agg-fs__txt { font-weight: 600; }
.agg-fs__sub { margin-top: 6px; font-size: 12px; color: #456b2c; }
/* алтернатива (избран е друг начин) — неутрално сиво */
.agg-fs--alt { background: #f5f5f5; border: 1px dashed #ccc; color: #555; }
.agg-fs--alt .agg-fs__txt .fa { color: #888; }
.agg-fs--alt .agg-fs__txt b { color: #333; }
.agg-fs--alt .agg-fs__bar { background: #e5e5e5; }
.agg-fs--alt .agg-fs__bar i { background: #a5a5a5; }
/* теглото е над лимита на избрания начин — червено, но кротко */
.agg-fsw { padding: 8px 12px; border-left: 4px solid #d9302c; border-radius: 4px; background: #fdf0ef; color: #a52521; font-size: 13px; font-weight: 600; line-height: 1.4; }
.agg-fsw .fa { margin-right: 4px; color: #d9302c; }

/* мини количката на NewStore: отделен <li> преди сумите */
#cart .dropdown-menu li.agg-cx-li { padding: 0 10px; list-style: none; }
#cart .dropdown-menu li.agg-cx-li .agg-cx { margin: 6px 0 8px; white-space: normal; }

/* ---- Кратък ред под куриерите (вместо червения на Tanko) — на телефон, където количката е долу */
#tk_checkout .agg-fsl-wrap { display: flex; flex-direction: column; gap: 6px; margin: 4px 0 6px; }
#tk_checkout .agg-fsl { padding: 8px 10px; border-radius: 4px; background: #f3f9ee; color: #2e4f17; font-size: 13px; line-height: 1.4; }
#tk_checkout .agg-fsl .fa { color: #58982b; }
#tk_checkout .agg-fsl--ok { font-weight: 600; }
#tk_checkout .agg-fsl--alt { background: #f5f5f5; border: 1px dashed #ccc; color: #555; }
#tk_checkout .agg-fsl--alt .fa { color: #888; }
@media (min-width: 769px) { #tk_checkout #tk_text_free_shipping_table .agg-fsl-wrap { display: none; } }

/* ---- Бутонът „ПОРЪЧАЙ СЕГА“ + „със задължение за плащане“ в самия бутон (ЗЗП / Директива 2011/83, чл. 8(2)); отблясък и кротък пулс на 7 s */
#tk_checkout #tk_button_confirm { position: relative; overflow: hidden; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; width: 100%; min-height: 60px; padding: 9px 16px 8px; border: 0; border-radius: 3px; background: linear-gradient(180deg, #6cb935 0%, #58982b 100%); color: #fff; text-transform: none; white-space: normal; line-height: 1.15; box-shadow: 0 3px 12px rgba(88, 152, 43, .32); animation: agg-cta-pulse 7s ease-in-out infinite; }
#tk_checkout #tk_button_confirm:hover, #tk_checkout #tk_button_confirm:focus-visible { background: linear-gradient(180deg, #62ad2d 0%, #4b8524 100%); color: #fff; }
#tk_checkout #tk_button_confirm .agg-cta__main { font-family: "Roboto Condensed", Roboto, sans-serif; font-size: 22px; font-weight: 700; letter-spacing: .03em; text-transform: uppercase; }
#tk_checkout #tk_button_confirm .agg-cta__sub { font-family: Roboto, sans-serif; font-size: 13px; font-weight: 400; opacity: .93; }
#tk_checkout #tk_button_confirm::after { content: ""; position: absolute; top: 0; left: -60%; width: 40%; height: 100%; background: linear-gradient(100deg, rgba(255, 255, 255, 0) 0%, rgba(255, 255, 255, .42) 50%, rgba(255, 255, 255, 0) 100%); transform: skewX(-20deg); animation: agg-cta-shine 7s ease-in-out infinite; pointer-events: none; }
#tk_checkout #tk_button_confirm:disabled { opacity: .75; animation: none; }
#tk_checkout #tk_button_confirm:disabled::after { animation: none; display: none; }
@keyframes agg-cta-shine { 0%, 68% { left: -60%; } 82%, 100% { left: 130%; } }
@keyframes agg-cta-pulse { 0%, 60%, 100% { transform: scale(1); box-shadow: 0 3px 12px rgba(88, 152, 43, .32); } 66% { transform: scale(1.025); box-shadow: 0 6px 20px rgba(88, 152, 43, .48); } 72% { transform: scale(1); } }
@media (prefers-reduced-motion: reduce) {
	#tk_checkout #tk_button_confirm, #tk_checkout #tk_button_confirm::after { animation: none !important; }
	#tk_checkout #tk_button_confirm::after { display: none; }
}

/* ---- Кодът за отстъпка: полето „Код за отстъпка (не е задължително)“ и бутонът на един ред; празното място за „×“ не заема ширина */
#tk_checkout #tk_coupon { display: flex; flex-wrap: wrap; align-items: stretch; margin-top: 12px; }
#tk_checkout #tk_coupon #tk_input_coupon { order: 1; flex: 1 1 160px; min-width: 0; width: auto !important; float: none; margin-top: 0 !important; height: 40px !important; font-size: 14px; }
#tk_checkout #tk_coupon #tk_confirm_coupon { order: 2; flex: 0 0 auto; width: auto !important; float: none; margin-top: 0 !important; height: 40px !important; padding: 0 16px; }
#tk_checkout #tk_coupon #tk_remove_coupon_box { order: 3; display: flex; align-items: center; flex: 0 0 auto; width: auto; float: none; }
#tk_checkout #tk_coupon #tk_remove_coupon_box .tk_remove { float: none; display: flex; align-items: center; justify-content: center; width: 40px; height: 40px !important; margin: 0 0 0 6px !important; padding: 0; }
#tk_checkout #tk_coupon .tk_clear, #tk_checkout #tk_coupon .tk_checkout_coupon { order: 4; flex: 0 0 100%; }

/* ---- Телефон: два етажа на ред — снимка 44 px | име … сума / „цена/бр. · Код“ − бр. + кошче */
@media (max-width: 480px) {
	#tk_checkout .agg-ci { grid-template-columns: 44px minmax(0, 1fr) auto auto; grid-template-areas: "img name name total" "img meta qty rm"; column-gap: 8px; row-gap: 3px; padding: 6px 0; }
	#tk_checkout .agg-ci__img { width: 44px; height: 44px; align-self: start; }
	#tk_checkout .agg-ci__name { align-self: start; font-size: 13px; line-height: 1.25; }
	#tk_checkout .agg-ci__meta { align-self: center; font-size: 11.5px; }
	#tk_checkout .agg-ci__total { align-self: start; font-size: 14px; }
	#tk_checkout .agg-qty { height: 28px; }
	#tk_checkout .agg-qty__btn { width: 28px; }
	#tk_checkout #agg-cart input.agg-qty__input { width: 32px !important; height: 26px !important; }
	#tk_checkout .agg-ci__remove { width: 28px; height: 28px; }
	#tk_checkout #tk_cart .tk_totals_price.c-total { font-size: 17px; }
	#tk_checkout #tk_button_confirm { min-height: 58px; }
	#tk_checkout #tk_button_confirm .agg-cta__main { font-size: 20px; }
	/* „Код за отстъпка (не е задължително)“ да се побира целият от 360 px нагоре (мерено с canvas по шрифта) */
	#tk_checkout #tk_coupon #tk_confirm_coupon { padding: 0 9px !important; min-width: 0 !important; }
	#tk_checkout #tk_coupon #tk_input_coupon { padding-left: 6px !important; padding-right: 6px !important; text-overflow: ellipsis; }
	#tk_checkout #tk_coupon #tk_input_coupon, #tk_checkout #tk_coupon #tk_input_coupon::placeholder { font-size: 12px; }
}

/* ---- 1.2.0: залепена лента „Поръчай сега · сума“ на телефон, когато клиентът е подминал истинския бутон (само скролва до #tk_button_confirm и го натиска).
   Агроградина на телефон няма залепена шапка и долна навигация → лентата е на дъното; „нагоре“ (#back-top) се вдига над нея. */
.agg-scta { display: none; }
@media (max-width: 767px) {
	.agg-scta { display: block; position: fixed; left: 0; right: 0; bottom: 0; z-index: 1005; padding: 8px 12px; padding-bottom: calc(8px + env(safe-area-inset-bottom, 0px)); background: rgba(255, 255, 255, .97); border-top: 1px solid #e5e5e5; box-shadow: 0 -6px 18px rgba(0, 0, 0, .12); opacity: 0; transform: translateY(110%); visibility: hidden; transition: transform .25s ease, opacity .25s ease, visibility 0s linear .25s; }
	.agg-scta.is-on { opacity: 1; transform: none; visibility: visible; transition: transform .25s ease, opacity .25s ease, visibility 0s; }
	.agg-scta__btn { position: relative; overflow: hidden; display: flex; align-items: center; justify-content: center; gap: 8px; width: 100%; min-height: 50px; padding: 8px 14px; border: 0; border-radius: 3px; background: linear-gradient(180deg, #6cb935 0%, #58982b 100%); color: #fff; font-family: "Roboto Condensed", Roboto, sans-serif; font-size: 19px; font-weight: 700; line-height: 1.15; letter-spacing: .03em; box-shadow: 0 3px 12px rgba(88, 152, 43, .32); cursor: pointer; touch-action: manipulation; animation: agg-cta-pulse 7s ease-in-out infinite; }
	.agg-scta__main { text-transform: uppercase; }
	.agg-scta__btn::after { content: ""; position: absolute; top: 0; left: -60%; width: 40%; height: 100%; background: linear-gradient(100deg, rgba(255, 255, 255, 0) 0%, rgba(255, 255, 255, .42) 50%, rgba(255, 255, 255, 0) 100%); transform: skewX(-20deg); animation: agg-cta-shine 7s ease-in-out infinite; pointer-events: none; }
	.agg-scta__btn:active { background: linear-gradient(180deg, #62ad2d 0%, #4b8524 100%); }
	.agg-scta__btn:focus-visible { outline: 3px solid #2e4f17; outline-offset: 2px; }
	.agg-scta__sum { font-family: Roboto, sans-serif; font-size: 17px; font-weight: 700; white-space: nowrap; letter-spacing: 0; }
	.agg-scta__sum::before { content: "·"; margin-right: 8px; opacity: .85; }
	#back-top { transition: bottom .3s ease-out, transform .25s ease; }
	body.agg-scta-on #back-top { transform: translateY(calc(-1 * var(--agg-scta-h, 66px))); }
}
@media (max-width: 767px) and (prefers-reduced-motion: reduce) {
	.agg-scta, .agg-scta.is-on, .agg-scta__btn, .agg-scta__btn::after { animation: none !important; transition: none !important; }
	.agg-scta__btn::after { display: none; }
}
