/* =========================================================
   GIFT CARD
   ========================================================= */

.gm-result-card {
    position: relative;
    border: 8px solid rgba(205, 205, 205, 0.34);
    border-radius: 22px;
    background: rgba(255, 253, 249, 0.82);
    overflow: hidden;
    box-shadow:
        0 0 0 1px rgba(255, 255, 255, 0.58) inset,
        0 6px 20px rgba(44, 24, 8, 0.04);
}

.gm-result-card__admin-tip-target {
    position: absolute;
    top: 12px;
    right: 12px;
    z-index: 6;
    width: 34px;
    height: 34px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 1px solid rgba(255, 255, 255, 0.72);
    border-radius: 999px;
    background: rgba(36, 28, 22, 0.62);
    color: #ffffff;
    box-shadow: 0 8px 18px rgba(44, 24, 8, 0.18);
    /*cursor: help;*/
    backdrop-filter: blur(6px);
}

.gm-result-card__admin-tip-target:hover,
.gm-result-card__admin-tip-target:focus-visible {
    background: rgba(36, 28, 22, 0.82);
    outline: none;
}

.gm-result-card__admin-tip {
    max-width: min(360px, calc(100vw - 32px));
    color: var(--gm-text);
    font-size: 0.86rem;
    line-height: 1.35;
}

.gm-result-card__admin-tip-content {
    display: grid;
    gap: 10px;
}

.gm-result-card__admin-tip-header,
.gm-result-card__admin-tip-label {
    color: #6f6257;
    font-size: 0.74rem;
    font-weight: 800;
    letter-spacing: 0;
    text-transform: uppercase;
}

.gm-result-card__admin-tip-meta {
    display: grid;
    gap: 6px;
    margin: 0;
}

.gm-result-card__admin-tip-meta div {
    display: grid;
    grid-template-columns: 104px minmax(0, 1fr);
    gap: 10px;
}

.gm-result-card__admin-tip-meta dt {
    color: #8d7e70;
    font-weight: 700;
}

.gm-result-card__admin-tip-meta dd {
    margin: 0;
    min-width: 0;
    color: var(--gm-text);
    font-weight: 700;
    overflow-wrap: anywhere;
}

.gm-result-card__admin-tip-section {
    display: grid;
    gap: 6px;
}

.gm-result-card__admin-tags {
    display: grid;
    gap: 5px;
    max-height: 260px;
    overflow: auto;
}

.gm-result-card__admin-tag {
    display: grid;
    grid-template-columns: minmax(82px, 0.8fr) minmax(96px, 1.2fr) auto;
    gap: 8px;
    align-items: center;
    padding: 6px 8px;
    border: 1px solid rgba(216, 195, 172, 0.7);
    border-radius: 6px;
    background: #fffdf9;
}

.gm-result-card__admin-tag--ranking-match {
    border-color: rgba(25, 112, 94, 0.56);
    background: #fff3c4;
    box-shadow: 0 0 0 1px rgba(25, 112, 94, 0.12) inset;
}

.gm-result-card__admin-tag--baseline-score {
    border-color: rgba(58, 112, 153, 0.44);
    background: #eaf4ff;
    box-shadow: 0 0 0 1px rgba(58, 112, 153, 0.12) inset;
}

.gm-result-card__admin-tag span,
.gm-result-card__admin-tag strong {
    min-width: 0;
    overflow-wrap: anywhere;
}

.gm-result-card__admin-tag span {
    color: #8d7e70;
}

.gm-result-card__admin-tag strong {
    color: var(--gm-text);
    font-weight: 800;
}

.gm-result-card__admin-empty {
    color: #8d7e70;
    font-style: italic;
}

.gm-result-card__admin-edit-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 34px;
    padding: 0 12px;
    border-radius: 6px;
    background: var(--gm-accent);
    color: #ffffff;
    font-weight: 800;
    text-decoration: none;
}

.gm-result-card__admin-edit-link:hover {
    color: #ffffff;
    text-decoration: none;
    filter: brightness(0.96);
}

/* klikbart område (IKKE footer) */
.gm-result-card__main-link {
    display: block;
    color: inherit;
    text-decoration: none;
}

/* =========================
   IMAGE
   ========================= */

.gm-result-card__image-wrap {
    position: relative;
    aspect-ratio: 1 / 1;
    background: #ffffff;
    overflow: hidden;
    transition: box-shadow 0.18s ease;
}

.gm-result-card__image {
    width: 100%;
    height: 100%;
    object-fit: contain;
    display: block;
    transition: transform 0.22s ease, filter 0.22s ease;
}

.gm-result-card__badge {
    position: absolute;
    top: 12px;
    left: 12px;
    z-index: 2;
    display: inline-flex;
    align-items: center;
    min-height: 28px;
    padding: 0 10px;
    border-radius: 999px;
    background: var(--gm-accent);
    color: #ffffff;
    font-size: 0.8rem;
    font-weight: 700;
}

/* hover kun på billede */
@media (hover: hover) and (pointer: fine) {
    .gm-result-card__main-link:hover .gm-result-card__image {
        transform: scale(1.02);
        filter: saturate(1.03);
    }

    .gm-result-card__main-link:hover .gm-result-card__image-wrap {
        box-shadow: inset 0 0 0 1px rgba(216, 195, 172, 0.35);
    }
}

/* =========================
   BODY
   ========================= */

.gm-result-card__body {
    display: grid;
    gap: 7px;
    padding: 14px 16px 16px;
    min-height: 136px;
}

.gm-result-card__brand {
    display: grid;
    grid-template-columns: minmax(18px, 1fr) auto auto minmax(18px, 1fr);
    align-items: center;
    gap: 6px;
    min-height: 18px;
    max-width: 100%;
    color: #927b55;
    font-size: 0.74rem;
    line-height: 1.2;
}

.gm-result-card__brand-rule {
    height: 1px;
    min-width: 18px;
    background: linear-gradient(
        90deg,
        rgba(203, 171, 104, 0),
        rgba(203, 171, 104, 0.72)
    );
}

.gm-result-card__brand-rule:last-child {
    background: linear-gradient(
        90deg,
        rgba(203, 171, 104, 0.72),
        rgba(203, 171, 104, 0)
    );
}

.gm-result-card__brand-prefix {
    font-size: 0.68rem;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
}

.gm-result-card__brand-logo {
    display: block;
    width: auto;
    max-width: 42px;
    height: 17px;
    object-fit: contain;
    object-position: center;
}

.gm-result-card__brand-name {
    max-width: 120px;
    overflow: hidden;
    color: var(--gm-text);
    font-size: 0.8rem;
    font-weight: 800;
    letter-spacing: 0.01em;
    text-overflow: ellipsis;
    text-transform: uppercase;
    white-space: nowrap;
}

.gm-result-card__title {
    margin: 0;
    color: var(--gm-text);
    font-size: 1.16rem;
    font-weight: 800;
    letter-spacing: -0.025em;
    line-height: 1.18;

    display: -webkit-box;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
    overflow: hidden;
}

.gm-result-card__reason {
    margin: 0;
    color: var(--gf-text-soft);
    font-size: 0.96rem;
    line-height: 1.58;
}

.gm-result-card__meta {
    display: flex;
    flex-wrap: wrap;
    gap: 10px 12px;
    align-items: center;
}

.gm-result-card__price {
    color: var(--gm-text);
    font-size: 1rem;
    font-weight: 800;
}

.gm-result-card__store {
    color: #8d7e70;
    font-size: 0.9rem;
}

/* =========================
   FOOTER
   ========================= */

.gm-result-card__footer {
    display: grid;
    gap: 6px;
    min-width: 0;
    padding: 12px 14px 14px;
    border-top: 1px solid rgba(216, 195, 172, 0.72);
    background: linear-gradient(
        180deg,
        rgba(255, 252, 248, 0.78),
        rgba(252, 246, 240, 0.82)
    );
}

/* header row */
.gm-result-card__footer-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    min-width: 0;
}

/* label */
.gm-result-card__related-label {
    min-width: 0;
    font-size: 0.82rem;
    font-weight: 700;
    color: #8d7e70;
}

/* thumbnails row */
.gm-result-card__related-items {
    display: flex;
    gap: 8px;
    align-items: center;
    max-width: 100%;
    min-width: 0;
    overflow-x: auto;
    overflow-y: hidden;
    padding-bottom: 2px;
    scrollbar-width: none;
}

.gm-result-card__related-items::-webkit-scrollbar {
    display: none;
}

/* thumbnails */
.gm-result-card__related-item {
    width: 56px;
    height: 56px;
    flex: 0 0 56px;

    display: inline-flex;
    align-items: center;
    justify-content: center;

    padding: 0;
    border: 1px solid rgba(216, 195, 172, 0.88);
    border-radius: 12px;
    overflow: hidden;
    background: #fffdf9;

    box-shadow: 0 2px 8px rgba(44, 24, 8, 0.04);

    transition: transform 0.16s ease,
                box-shadow 0.16s ease,
                border-color 0.16s ease;

    cursor: pointer;
}

.gm-result-card__related-item:hover {
    transform: translateY(-1px);
    border-color: var(--gm-border-strong);
    box-shadow: 0 8px 18px rgba(44, 24, 8, 0.10);
}

.gm-result-card__related-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* "Se alle" link */
.gm-result-card__related-link {
    display: inline-flex;
    align-items: center;
    min-height: 24px;
    color: var(--gm-text);
    font-size: 0.82rem;
    font-weight: 700;
    line-height: 1.2;
    text-decoration: none;
    letter-spacing: -0.01em;
    white-space: nowrap;
}

.gm-result-card__related-link:hover {
    text-decoration: underline;
}


/* =========================
   UTILITIES (swap support)
   ========================= */

.gm-result-card__badge[hidden],
.gm-result-card__brand[hidden],
.gm-result-card__brand-logo[hidden],
.gm-result-card__brand-name[hidden],
.gm-result-card__reason[hidden],
.gm-result-card__price[hidden],
.gm-result-card__store[hidden] {
    display: none !important;
}

