/* Wardeina add-ons popup + buy now — Sanader. Loaded on the home page and WooCommerce pages. */
.wd-am-open { overflow: hidden; }
.wd-am { position: fixed; inset: 0; z-index: 1200; display: grid; place-items: center; padding: 1rem; }
.wd-am[hidden] { display: none; }
.wd-am__overlay { position: absolute; inset: 0; background: rgba(0, 0, 0, .55); }
.wd-am__panel { position: relative; width: min(100%, 720px); max-height: calc(100dvh - 2rem); overflow-y: auto; background: #fff; border-radius: 24px; padding: 1.75rem; box-shadow: 0 24px 70px rgba(0, 0, 0, .35); outline: 0; }
.wd-am__close { all: unset; box-sizing: border-box; position: absolute; top: 14px; inset-inline-end: 14px; width: 38px; height: 38px; display: grid; place-items: center; border-radius: 50%; cursor: pointer; background: var(--wd-soft); }
.wd-am__close:hover { color: var(--wd-primary); }
.wd-am__title { margin: 0 2rem .25rem 0; font-size: 1.5rem; color: var(--wd-primary); line-height: 1.25; }
[dir="rtl"] .wd-am__title { margin: 0 0 .25rem 2rem; }
.wd-am__sub { margin: 0 0 1.25rem; color: var(--wd-muted); }
.wd-am__main { display: flex; align-items: center; gap: .9rem; padding: .75rem; margin-bottom: 1.25rem; border-radius: 16px; background: var(--wd-soft); }
.wd-am__thumb img { width: 56px; height: 56px; object-fit: cover; border-radius: 12px; display: block; }
.wd-am__main-info { display: grid; gap: .15rem; min-width: 0; }
.wd-am__main-info strong { font-weight: 600; }
.wd-am__tabs { display: flex; gap: .5rem 1.25rem; overflow-x: auto; scrollbar-width: none; margin-bottom: 1rem; border-bottom: 1px solid var(--wd-border); }
.wd-am__tabs::-webkit-scrollbar { display: none; }
.wd-am__tab { all: unset; box-sizing: border-box; position: relative; display: inline-flex; align-items: center; gap: .6rem; flex: none; padding: .5rem .25rem .8rem; cursor: pointer; color: var(--wd-muted); white-space: nowrap; }
.wd-am__tabimg { width: 40px; height: 40px; border-radius: 50%; object-fit: cover; }
.wd-am__tab[aria-selected="true"] { color: var(--wd-text); font-weight: 600; }
.wd-am__tab[aria-selected="true"]::after { content: ""; position: absolute; inset-inline: 0; bottom: -1px; height: 3px; border-radius: 3px 3px 0 0; background: var(--wd-primary); }
.wd-am__list { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 1rem; margin-bottom: 1.5rem; }
.wd-am__list[hidden] { display: none; }
.wd-am__item { display: grid; grid-template-rows: auto 1fr auto auto; gap: .35rem; text-align: center; }
.wd-am__pic { display: block; aspect-ratio: 1 / 1; border-radius: 16px; overflow: hidden; background: var(--wd-soft); }
.wd-am__pic img { width: 100%; height: 100%; object-fit: cover; display: block; }
.wd-am__name { font-size: .95rem; line-height: 1.3; min-height: 2.6em; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.wd-am__price { font-weight: 700; font-size: .95rem; }
.wd-am__step { display: inline-flex; align-items: center; justify-content: center; gap: .6rem; margin-top: .2rem; }
.wd-am__step button { all: unset; box-sizing: border-box; width: 34px; height: 34px; display: grid; place-items: center; border: 1px solid var(--wd-text); border-radius: 50%; cursor: pointer; font-size: 13px; background: #fff; }
.wd-am__step button:hover { border-color: var(--wd-primary); color: var(--wd-primary); }
.wd-am__qty { min-width: 1.2ch; font-weight: 600; text-align: center; }
.wd-am__item[data-qty="0"] .wd-am__minus, .wd-am__item[data-qty="0"] .wd-am__qty { display: none; }
.wd-am__item:not([data-qty="0"]) .wd-am__pic { box-shadow: 0 0 0 3px var(--wd-accent); }
.wd-am__foot { display: flex; justify-content: center; gap: 1rem; position: sticky; bottom: -1.75rem; padding-block: .9rem 0; background: linear-gradient(180deg, rgba(255, 255, 255, 0), #fff 40%); }
.wd-am__skip, .wd-am__go { all: unset; box-sizing: border-box; min-width: 140px; height: 48px; padding-inline: 1.5rem; display: inline-flex; align-items: center; justify-content: center; border-radius: var(--wd-radius); font-weight: 600; cursor: pointer; text-align: center; }
.wd-am__skip { border: 1px solid var(--wd-border); color: var(--wd-text); background: #fff; }
.wd-am__go { background: var(--wd-primary); color: #fff; }
.wd-am__skip:hover { border-color: var(--wd-primary); color: var(--wd-primary); }
.wd-am__go:hover { filter: brightness(1.15); }
.wd-am__skel { display: grid; gap: .9rem; }
.wd-am__skelgrid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1rem; margin-top: .5rem; }
.wd-skel__img, .wd-skel__line { background: linear-gradient(90deg, #ececec 25%, #f6f6f6 37%, #ececec 63%); background-size: 400% 100%; animation: wd-shimmer 1.3s ease infinite; border-radius: 14px; }
.wd-skel__img { aspect-ratio: 1 / 1; }
.wd-skel__line { height: 14px; margin-top: .6rem; width: 80%; }
@keyframes wd-shimmer { 0% { background-position: 100% 0; } 100% { background-position: 0 0; } }

/* Buy now button on the product page */
.wd-buy-now { margin-inline-start: .6rem; }

@media (max-width: 600px) {
	.wd-am { place-items: end center; padding: 0; }
	.wd-am__panel { border-radius: 24px 24px 0 0; max-height: 92dvh; padding: 1.25rem; width: 100%; }
	.wd-am__list { grid-template-columns: repeat(2, 1fr); }
	.wd-am__skelgrid { grid-template-columns: repeat(2, 1fr); }
	.wd-am__foot { bottom: -1.25rem; }
	.wd-am__skip, .wd-am__go { flex: 1; min-width: 0; }
}
@media (prefers-reduced-motion: reduce) { .wd-skel__img, .wd-skel__line { animation: none; } }
