/* Eurorennen Shop Designer — shop cards, rows, search bar. Selectors start with "body" so they win over older plugin CSS. */

:root{
	--eursd-ink:#14161a;
	--eursd-soft:#5b6068;
	--eursd-mute:#8a8f98;
	--eursd-line:#e6e8eb;
	--eursd-surface:#f5f6f7;
	--eursd-accent:var(--amp-accent,#c8102e);
	--eursd-radius:16px;
	--eursd-ratio:4 / 3;
	--eursd-cols:3;
}

[hidden]{display:none!important}
.eursd-ic{width:16px;height:16px;flex:0 0 auto;display:block}

/* ================= Homepage row heading ================= */
body.eursd-on .eursd-home{margin-top:64px!important;margin-bottom:56px!important}
body.eursd-on .eursd-home .eursd-head{display:flex;justify-content:space-between;align-items:flex-end;gap:16px;margin-bottom:24px!important}
body.eursd-on .eursd-home .amp-section-title{font-size:clamp(26px,2.5vw,36px);line-height:1.1;font-weight:800;letter-spacing:-.025em;color:var(--eursd-ink)}
body.eursd-on .eursd-home .amp-section-sub{font-size:15px;color:var(--eursd-soft)}
body.eursd-on .eursd-link{
	display:inline-flex;align-items:center;gap:6px;padding:9px 16px;border:1px solid var(--eursd-line);border-radius:999px;background:#fff;
	font-size:13px;font-weight:700;color:var(--eursd-ink);text-decoration:none;white-space:nowrap;transition:border-color .15s ease,color .15s ease,background .15s ease;
}
body.eursd-on .eursd-link:hover{border-color:var(--eursd-ink);background:var(--eursd-ink);color:#fff}

/* Find a Shop page heading: give it room under the header */
body.eursd-on .amp-section:has(~ .eurs-marketplace){padding-top:36px}

/* ================= Grids ================= */
body.eursd-on .eursd-row{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:30px 22px}
body.eursd-on .eursd-row[data-count="1"]{grid-template-columns:minmax(0,420px)}
body.eursd-on .eursd-row[data-count="2"]{grid-template-columns:repeat(2,minmax(0,1fr))}
body.eursd-on .eursd-row[data-count="4"]{grid-template-columns:repeat(4,minmax(0,1fr))}
body.eursd-on .eursd-row[data-count="5"],
body.eursd-on .eursd-row[data-count="6"]{grid-template-columns:repeat(5,minmax(0,1fr))}
body.eursd-on .eursd-row--related[data-count]{grid-template-columns:repeat(3,minmax(0,1fr))}
body.eursd-on .eursd-row--related[data-count="1"]{grid-template-columns:minmax(0,1fr) 1fr 1fr}
body.eursd-on .eursd-row--related[data-count="2"]{grid-template-columns:repeat(3,minmax(0,1fr))}

/* Find a Shop results (the container comes from the Shops plugin) */
body.eursd-on .eurs-grid{
	display:grid!important;grid-template-columns:repeat(var(--eursd-cols,3),minmax(0,1fr))!important;gap:36px 22px!important;
}
body.eursd-on .eurs-grid .amp-loading,
body.eursd-on .eurs-grid .amp-empty{
	grid-column:1 / -1;display:flex;align-items:center;justify-content:center;gap:12px;margin:0;padding:64px 20px;
	border-radius:var(--eursd-radius);background:var(--eursd-surface);color:var(--eursd-soft);font-size:15px;text-align:center;
}
body.eursd-on .eurs-grid .amp-loading::before{
	content:"";width:18px;height:18px;border:2px solid #cfd3d8;border-top-color:var(--eursd-ink);border-radius:50%;animation:eursdSpin .7s linear infinite;
}
@keyframes eursdSpin{to{transform:rotate(360deg)}}
body.eursd-on .eurs-marketplace .amp-results-meta{margin:2px 2px 18px;font-size:14px;font-weight:600;color:var(--eursd-soft)}

/* ================= Card ================= */
body.eursd-on .eursd-card{
	display:flex;flex-direction:column;min-width:0;color:inherit;text-decoration:none!important;background:transparent;border:0;box-shadow:none;
	-webkit-tap-highlight-color:transparent;
}
body.eursd-on .eursd-photo{
	position:relative;display:block;width:100%;aspect-ratio:var(--eursd-ratio);border-radius:var(--eursd-radius);overflow:hidden;background:#eceef0;
	transition:box-shadow .25s ease,transform .25s ease;
}
body.eursd-on .eursd-photo::after{content:"";position:absolute;inset:0;border-radius:inherit;box-shadow:inset 0 0 0 1px rgba(20,22,26,.06);pointer-events:none}
body.eursd-on .eursd-img{display:block;width:100%!important;height:100%!important;max-width:none!important;object-fit:cover;margin:0!important;border-radius:0!important}
body.eursd-on .eursd-ph{
	position:absolute;inset:0;display:flex;align-items:center;justify-content:center;color:#a8adb5;
	background:linear-gradient(135deg,#eef0f2,#e3e6ea);
}
body.eursd-on .eursd-ph .eursd-ic{width:40px;height:40px}
body.eursd-on .eursd-card:hover .eursd-photo,
body.eursd-on .eursd-card:focus-visible .eursd-photo{transform:translateY(-4px);box-shadow:0 16px 32px rgba(20,22,26,.18)}
body.eursd-on .eursd-card:focus-visible{outline:2px solid var(--eursd-ink);outline-offset:4px;border-radius:var(--eursd-radius)}

body.eursd-on .eursd-verified{
	position:absolute;top:12px;left:12px;z-index:1;display:inline-flex;align-items:center;gap:5px;padding:6px 11px 6px 8px;border-radius:999px;
	background:rgba(255,255,255,.95);color:var(--eursd-ink);font-size:11px;line-height:1;font-weight:700;letter-spacing:.05em;text-transform:uppercase;
	box-shadow:0 2px 8px rgba(20,22,26,.12);-webkit-backdrop-filter:blur(6px);backdrop-filter:blur(6px);
}
body.eursd-on .eursd-verified .eursd-ic{width:15px;height:15px;color:var(--eursd-accent)}
body.eursd-hide-verified .eursd-verified{display:none!important}

body.eursd-on .eursd-body{display:flex;flex-direction:column;gap:4px;padding:14px 2px 0}
body.eursd-on .eursd-name{
	display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden;color:var(--eursd-ink);
	font-size:16.5px;line-height:1.3;font-weight:650;letter-spacing:-.01em;transition:color .15s ease;
}
body.eursd-on .eursd-card:hover .eursd-name{color:var(--eursd-accent)}
body.eursd-on .eursd-sub{display:flex;align-items:center;gap:8px;min-width:0;font-size:13.5px;line-height:1.4;color:var(--eursd-soft)}
body.eursd-on .eursd-rate{display:inline-flex;align-items:center;gap:4px;flex:0 0 auto;font-weight:700;color:var(--eursd-ink);font-variant-numeric:tabular-nums}
body.eursd-on .eursd-rate svg{width:13px;height:13px;fill:var(--eursd-accent)}
body.eursd-hide-rating .eursd-rate{display:none!important}
body.eursd-on .eursd-spec{min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
body.eursd-on .eursd-rate + .eursd-spec::before{content:"\00b7";margin-right:8px;color:#b4b8be}
body.eursd-hide-rating .eursd-rate + .eursd-spec::before{content:none}
body.eursd-hide-spec .eursd-spec{display:none!important}
body.eursd-hide-spec.eursd-hide-rating .eursd-sub{display:none!important}
body.eursd-on .eursd-loc{display:flex;align-items:center;gap:5px;font-size:13px;line-height:1.35;color:var(--eursd-mute)}
body.eursd-on .eursd-loc .eursd-ic{width:13px;height:13px}
body.eursd-on .eursd-loc > span{min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
body.eursd-on .eursd-tags{display:flex;flex-wrap:wrap;gap:6px;margin-top:6px;max-height:26px;overflow:hidden}
body.eursd-on .eursd-tag{padding:4px 10px;border-radius:999px;background:var(--eursd-surface);color:var(--eursd-soft);font-size:11.5px;line-height:1.2;font-weight:600}
body.eursd-hide-brands .eursd-tags{display:none!important}

/* ================= Search bar (looks only) ================= */
body.eursd-on .eurs-marketplace > .eurs-filters{
	background:var(--eursd-surface)!important;border:0!important;border-radius:20px!important;padding:20px!important;margin:20px 0 24px!important;gap:14px!important;box-shadow:none!important;
}
body.eursd-on .eurs-filters .amp-filter-group label{font-size:11px;letter-spacing:.08em;text-transform:uppercase;font-weight:700;color:var(--eursd-mute)}
body.eursd-on .eurs-filters .amp-filter-group select,
body.eursd-on .eurs-filters .amp-filter-group input{
	height:46px;padding:0 14px;border:0!important;border-radius:12px;background-color:#fff;font-size:14px;color:var(--eursd-ink);
	box-shadow:0 0 0 1px var(--eursd-line);transition:box-shadow .15s ease;
}
body.eursd-on .eurs-filters .amp-filter-group select{
	-webkit-appearance:none;appearance:none;padding-right:36px;cursor:pointer;
	background-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1.5l5 5 5-5' fill='none' stroke='%235b6068' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
	background-repeat:no-repeat;background-position:right 14px center;
}
body.eursd-on .eurs-filters .amp-filter-group select:focus,
body.eursd-on .eurs-filters .amp-filter-group input:focus{outline:0;box-shadow:0 0 0 2px var(--eursd-ink)}
body.eursd-on .eurs-filters .amp-filter-group input::placeholder{color:#a0a5ad}
body.eursd-on .eurs-filters .amp-btn-primary{height:46px;padding:0 26px;border-radius:12px;font-size:14px;font-weight:700;box-shadow:none}
body.eursd-on .eurs-filters .amp-btn-outline{height:46px;padding:0 14px;border:0;background:transparent;color:var(--eursd-soft);font-size:14px;font-weight:600;text-decoration:underline;text-underline-offset:3px}
body.eursd-on .eurs-filters .amp-btn-outline:hover{color:var(--eursd-ink);transform:none}

/* ================= Responsive ================= */
@media (max-width:1100px){
	body.eursd-on .eurs-grid{grid-template-columns:repeat(min(var(--eursd-cols,3),3),minmax(0,1fr))!important}
	body.eursd-on .eursd-row[data-count="5"],
	body.eursd-on .eursd-row[data-count="6"]{grid-template-columns:repeat(4,minmax(0,1fr))}
	/* homepage: 5 across is for wide screens; below that show a clean row of 4 */
	body.eursd-on .eursd-home .eursd-row[data-count="5"] > :nth-child(5){display:none}
}
@media (max-width:900px){
	body.eursd-on .eurs-grid{grid-template-columns:repeat(3,minmax(0,1fr))!important;gap:30px 16px!important}
	body.eursd-on .eursd-row,
	body.eursd-on .eursd-row[data-count="6"]{grid-template-columns:repeat(3,minmax(0,1fr));gap:24px 14px}
	body.eursd-on .eursd-row[data-count="4"],
	body.eursd-on .eursd-row[data-count="5"]{grid-template-columns:repeat(4,minmax(0,1fr));gap:24px 14px}
	body.eursd-on .eursd-row[data-count="2"]{grid-template-columns:repeat(2,minmax(0,1fr))}
}
@media (max-width:700px){
	body.eursd-on .eurs-grid{grid-template-columns:repeat(2,minmax(0,1fr))!important;gap:26px 12px!important}
	body.eursd-on .eursd-row,
	body.eursd-on .eursd-row[data-count="3"],
	body.eursd-on .eursd-row[data-count="4"],
	body.eursd-on .eursd-row[data-count="5"],
	body.eursd-on .eursd-row[data-count="6"],
	body.eursd-on .eursd-row--related[data-count]{grid-template-columns:repeat(2,minmax(0,1fr));gap:24px 12px}
	/* keep the homepage row an even 2-by-N: drop the odd one out */
	body.eursd-on .eursd-home .eursd-row[data-count="3"] > :nth-child(3),
	body.eursd-on .eursd-home .eursd-row[data-count="5"] > :nth-child(5){display:none}
	body.eursd-on .eursd-row--related > :nth-child(3){display:none}
	body.eursd-on .eursd-home{margin-top:44px!important;margin-bottom:40px!important}
	body.eursd-on .eursd-home .eursd-head{flex-direction:column;align-items:flex-start;gap:12px;margin-bottom:18px!important}
	body.eursd-on .eursd-photo{border-radius:14px}
	body.eursd-on .eursd-body{padding:11px 1px 0}
	body.eursd-on .eursd-name{font-size:14.5px}
	body.eursd-on .eursd-sub{font-size:12.5px}
	body.eursd-on .eursd-loc{font-size:12px}
	body.eursd-on .eursd-tag{padding:3px 8px;font-size:10.5px}
	body.eursd-on .eursd-verified{top:8px;left:8px;padding:5px 8px 5px 6px;font-size:9.5px}
	body.eursd-on .eursd-link{padding:7px 13px;font-size:12px}
	body.eursd-on .eurs-filters .amp-filter-group select,
	body.eursd-on .eurs-filters .amp-filter-group input{height:42px!important;padding:0 12px!important;font-size:14px!important}
	body.eursd-on .eurs-marketplace > .eurs-filters{padding:16px!important;border-radius:16px!important}
}
@media (hover:none){
	body.eursd-on .eursd-card:hover .eursd-photo{transform:none;box-shadow:none}
}
@media (prefers-reduced-motion:reduce){
	body.eursd-on .eursd-photo{transition:none}
	body.eursd-on .eursd-card:hover .eursd-photo{transform:none}
	body.eursd-on .eurs-grid .amp-loading::before{animation:none}
}
