/* RW Subscriptions – pilnas pirkimo blokas */
.rws-sec { margin: 0 0 28px; }
.rws-buybox .rws-autoship { margin-bottom: 20px; }
.rws-buybox .rws-autoship .rws-h { margin-bottom: 12px; }
.rws-tagline {
	margin: -4px 0 14px;
	font-size: 14px;
	line-height: 1.35;
	color: #6b6b66;
}
.rws-tagline[hidden] { display: none; }

/* ---------- Skonių kortelės ---------- */
.rws-buybox .rws-tiles {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(110px, 1fr));
	gap: 12px;
	margin-top: 16px;
}
.rws-tagline:not([hidden]) + .rws-tiles { margin-top: 0; }

form.rws-buybox button.rws-tile {
	display: block;
	position: relative;
	width: 100%;
	height: auto;
	min-height: 0;
	margin: 0;
	padding: 0;
	border: 0;
	border-radius: 0;
	background: none;
	box-shadow: none;
	color: #1d1d1b;
	font: inherit;
	font-size: 14px;
	line-height: 1.2;
	text-align: center;
	text-transform: none;
	letter-spacing: normal;
	cursor: pointer;
	appearance: none;
	-webkit-appearance: none;
}
.rws-tile__box {
	display: block;
	width: 100%;
	overflow: hidden;
	border: 1.5px solid #e4e5df;
	border-radius: 12px;
	background: #fff;
	transition: border-color .15s, box-shadow .15s;
}
.rws-tile:hover .rws-tile__box { border-color: #bfc7b0; }
.rws-tile__img {
	display: flex;
	align-items: flex-end;           /* paveikslėlis stovi ant teksto juostos */
	justify-content: center;
	width: 100%;
	height: 120px;
	padding: 14px 8px 0;
	background: #f3f3f1;             /* nepasirinkta – pilka */
	transition: background .15s;
}
.rws-tile.is-selected .rws-tile__img { background: var(--rws-tile-bg, #eaf2dc); }
.rws-tile__img img {
	display: block;
	width: auto;
	height: auto;
	max-width: 100%;
	max-height: 100%;
	margin: 0;
	object-fit: contain;
	object-position: center bottom;
}
.rws-tile__label {
	display: block;
	width: 100%;                     /* visas apatinis blokas, ne tik tekstas */
	padding: 11px 6px;
	background: #fff;
	color: #1d1d1b;
	font-size: 14px;
	line-height: 1.2;
	font-weight: 500;
	transition: background .15s, color .15s;
}
.rws-tile.is-selected .rws-tile__box {
	border-color: var(--rws-green);
	box-shadow: 0 3px 12px rgba(0, 0, 0, 0.14);
}
.rws-tile.is-selected .rws-tile__label {
	background: var(--rws-green);
	color: #fff;
	font-weight: 600;
}
.rws-tile__badge {
	position: absolute;
	top: -8px;
	left: 50%;
	transform: translateX(-50%);
	z-index: 2;
	padding: 3px 9px;
	border-radius: 999px;
	background: #1d1d1b;
	color: #fff;
	font-size: 9px;
	line-height: 1.2;
	font-weight: 700;
	letter-spacing: .04em !important;
	text-transform: uppercase !important;
	white-space: nowrap;
}

/* ---------- Pakuočių mygtukai ---------- */
.rws-buybox .rws-pills {
	display: flex;
	gap: 4px;
	padding: 6px;
	border: 1.5px solid #dcdfd3;
	border-radius: 999px;
	background: #fff;
}
form.rws-buybox button.rws-pill {
	flex: 1 1 0;
	width: auto;
	height: auto;
	min-height: 0;
	margin: 0;
	padding: 11px 8px;
	border: 0;
	border-radius: 999px;
	background: transparent;
	box-shadow: none;
	color: #1d1d1b;
	font: inherit;
	font-size: 18px;
	line-height: 1.2;
	font-weight: 500;
	text-transform: none;
	letter-spacing: normal;
	cursor: pointer;
	appearance: none;
	-webkit-appearance: none;
	transition: background .15s, color .15s;
}
form.rws-buybox button.rws-pill:hover:not(.is-selected):not(:disabled) { background: #f1f4ec; color: #1d1d1b; }
form.rws-buybox button.rws-pill.is-selected {
	background: var(--rws-green);
	color: #fff;
	font-weight: 600;
}
form.rws-buybox button.rws-pill.is-disabled,
form.rws-buybox button.rws-pill:disabled {
	opacity: .35;
	cursor: not-allowed;
	text-decoration: line-through;
}

/* ---------- Kiti atributai ---------- */
.rws-buybox .rws-other {
	width: 100%;
	padding: 12px 14px;
	border: 1.5px solid #dcdfd3;
	border-radius: 10px;
	background: #fff;
	font-size: 16px;
	color: #1d1d1b;
}

/* ---------- Mygtukas ---------- */
form.rws-buybox button.rws-atc {
	display: block;
	width: 100%;
	height: auto;
	min-height: 0;
	margin: 0;
	padding: 17px 24px;
	border: 0;
	border-radius: 999px;
	background: var(--rws-green);
	box-shadow: none;
	color: #fff;
	font: inherit;
	font-size: 20px;
	line-height: 1.2;
	font-weight: 600;
	letter-spacing: .02em;
	text-transform: uppercase;
	text-align: center;
	cursor: pointer;
	appearance: none;
	-webkit-appearance: none;
	transition: filter .15s, transform .05s;
}
form.rws-buybox button.rws-atc:hover:not(:disabled) { filter: brightness(1.08); background: var(--rws-green); color: #fff; }
form.rws-buybox button.rws-atc:active:not(:disabled) { transform: translateY(1px); }
form.rws-buybox button.rws-atc:disabled { opacity: .5; cursor: not-allowed; }
.rws-foot {
	margin: 14px 0 0;
	text-align: center;
	font-size: 15px;
	line-height: 1.4;
	color: #3a3a37;
}

@media (max-width: 520px) {
	.rws-h { font-size: 18px; }
	.rws-buybox .rws-tiles { gap: 8px; }
	.rws-tile__img { height: 96px; padding: 12px 6px 0; }
	.rws-tile__label { font-size: 13px; }
	form.rws-buybox button.rws-pill { font-size: 15px; padding: 10px 4px; }
	form.rws-buybox button.rws-atc { font-size: 17px; padding: 15px 20px; }
}

/* ---------- AJAX: sukasi ratukas mygtuke ---------- */
form.rws-buybox button.rws-atc { position: relative; }
form.rws-buybox button.rws-atc.is-loading {
	color: transparent !important;
	pointer-events: none;
	cursor: progress;
}
form.rws-buybox button.rws-atc.is-loading::after {
	content: "";
	position: absolute;
	top: 50%;
	left: 50%;
	width: 24px;
	height: 24px;
	margin: -12px 0 0 -12px;
	border: 3px solid rgba(255, 255, 255, .35);
	border-top-color: #fff;
	border-radius: 50%;
	animation: rws-spin .7s linear infinite;
}
@keyframes rws-spin { to { transform: rotate(360deg); } }
.rws-msg {
	margin: 12px 0 0;
	padding: 10px 14px;
	border-radius: 10px;
	background: #fdecea;
	color: #a02c20;
	font-size: 14px;
	line-height: 1.4;
	text-align: center;
}
.rws-msg[hidden] { display: none; }

/* ---------- Prilipdomas apatinis „Į krepšelį“ blokas ---------- */
.rws-sticky {
	position: fixed;
	left: 0; right: 0; bottom: 0;
	z-index: 9990;
	padding: 32px 20px;
	background: #fff;
	border-top: 1px solid #e7e5e4;
	box-shadow: 0 -4px 64px rgba(0, 0, 0, .05);
	font-family: inherit;
}
.rws-sticky[hidden] { display: none; }
.rws-sticky__in {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 32px;
	max-width: 1300px;
	margin: 0 auto;
}
.rws-sticky__prod { display: flex; align-items: center; gap: 32px; min-width: 0; }
.rws-sticky__img {
	flex: none;
	display: block;
	width: 80px; height: 80px;
	border-radius: 8px;
	background: #f5f5f4;
	overflow: hidden;
}
.rws-sticky__img img { display: block; width: 100%; height: 100%; margin: 0; object-fit: contain; }
.rws-sticky__txt { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.rws-sticky__name { font-size: 20px; line-height: 30px; font-weight: 600; color: #1c1917; }
.rws-sticky__meta { font-size: 16px; line-height: 24px; color: #1c1917; }
.rws-sticky__meta strong { font-weight: 600; }
.rws-sticky__act { display: flex; align-items: flex-end; gap: 16px; flex: none; }
.rws-sticky__qty { display: flex; flex-direction: column; align-items: center; gap: 4px; }
.rws-sticky__qty[hidden] { display: none; }
.rws-sticky__qlabel { font-size: 14px; line-height: 20px; color: #57534e; }
.rws-sticky__qrow { display: flex; gap: 8px; align-items: center; }
.rws-sticky .rws-sticky__step {
	display: flex; align-items: center; justify-content: center;
	width: 56px; height: 56px; min-width: 56px; min-height: 56px;
	margin: 0; padding: 0;
	border: 0; border-radius: 999px;
	box-shadow: none;
	cursor: pointer;
	transition: filter .15s, opacity .15s;
}
.rws-sticky .rws-sticky__step--minus { background: #e2e2e2; color: #1c1917; }
.rws-sticky .rws-sticky__step--plus { background: #423738; color: #fff; }
.rws-sticky .rws-sticky__step:hover:not(:disabled) { filter: brightness(1.1); }
.rws-sticky .rws-sticky__step:disabled { opacity: .4; cursor: not-allowed; }
.rws-sticky__val {
	display: flex; align-items: center; justify-content: center;
	width: 150px; height: 56px;
	border-radius: 999px;
	box-shadow: inset 0 0 0 1px #e2e2e2;
	background: #fff;
	font-size: 18px; font-weight: 500; color: #1c1917;
}
.rws-sticky .rws-sticky__btn {
	position: relative;
	height: auto; min-height: 0;
	margin: 0; padding: 13px 26px;
	border: 0; border-radius: 999px;
	background: var(--rws-green);
	box-shadow: none;
	color: #fff;
	font: inherit; font-size: 20px; line-height: 30px; font-weight: 600;
	letter-spacing: normal; text-transform: none; white-space: nowrap;
	cursor: pointer;
	appearance: none; -webkit-appearance: none;
	transition: filter .15s;
}
.rws-sticky .rws-sticky__btn:hover:not(:disabled) { filter: brightness(1.08); background: var(--rws-green); color: #fff; }
.rws-sticky .rws-sticky__btn:disabled { opacity: .5; cursor: not-allowed; }
.rws-sticky .rws-sticky__btn.is-loading { color: transparent !important; pointer-events: none; cursor: progress; }
.rws-sticky .rws-sticky__btn.is-loading::after {
	content: "";
	position: absolute; top: 50%; left: 50%;
	width: 24px; height: 24px; margin: -12px 0 0 -12px;
	border: 3px solid rgba(255, 255, 255, .35);
	border-top-color: #fff;
	border-radius: 50%;
	animation: rws-spin .7s linear infinite;
}
@media (max-width: 900px) {
	/* Mobilus variantas: be nuotraukos ir pavadinimo – tik kiekis ir mygtukas (40px). */
	.rws-sticky { padding: 12px 16px calc(12px + env(safe-area-inset-bottom, 0px)); }
	.rws-sticky__in { gap: 0; }
	.rws-sticky__prod { display: none; }
	.rws-sticky__act { flex: 1 1 100%; align-items: flex-end; justify-content: space-between; gap: 12px; }
	.rws-sticky__qty { gap: 2px; }
	.rws-sticky__qlabel { display: block; font-size: 12px; line-height: 16px; }
	.rws-sticky__qrow { gap: 6px; }
	.rws-sticky .rws-sticky__step { width: 40px; height: 40px; min-width: 40px; min-height: 40px; }
	.rws-sticky .rws-sticky__step svg { width: 20px; height: 20px; }
	.rws-sticky__val { width: 64px; height: 40px; font-size: 16px; }
	.rws-sticky .rws-sticky__btn { flex: 1; min-width: 0; padding: 8px 12px; font-size: 16px; line-height: 24px; }
}
.rws-old[hidden]{display:none!important}
