/* ---- Dashboard ------------------------------------------------------ */

.kma-dashboard__inner {
	background-color: var(--kma-beige);
	padding: 28px 20px 44px;
}
.kma-intro {
    display: flex;
    flex-direction: column;
    gap: 6px;
    padding: 8px 0 20px;
}
.kma-intro__top {
	padding-bottom: 32px;
	display: flex;
	justify-content: space-between;
	align-items: center;
}

.kma-intro__text {
    color: var(--kma-ink);
	padding-top: 6px;
}

/* Ongoing order card */
.kma-ongoing {
    display: flex;
    flex-direction: column;
    gap: 14px;
    padding: 18px;
    background: var(--kma-beige-light);
	border: 1px solid var(--kma-line-strong);
	max-width: 750px;
	margin: 0 0 20px;
	position: relative;
}

.kma-ongoing__top {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
	padding-bottom: 20px;
}
.kma-ongoing__status {
	display: flex;
	align-items: center;
	gap: 10px;
}

.kma-ongoing__top .kma-link--arrow {
	display: flex;
	align-items: center;
	gap: 4px;
}
.kma-ongoing__top .kma-link__arrow {
	width: 26px;
	height: auto;
    position: relative;
    top: 1px;
	transition: all 0.25s;
}
.kma-ongoing__carrier {
    font-size: 12px;
    color: var(--kma-ink);
}

.kma-progress {
    display: grid;
    grid-template-columns: repeat(var(--kma-steps, 3), 1fr);
    gap: 4px;
}

.kma-progress__bar {
    height: 3px;
    background: var(--kma-line-strong);
}

.kma-progress__bar.is-done {
    background: var(--kma-ink);
}

.kma-progress__label {
    padding-top: 2px;
    font-family: var(--kma-mono);
    font-size: 10px;
    text-transform: uppercase;
    color: var(--kma-ink);
	text-align: center;
}

.kma-progress__label.is-current {
    color: var(--kma-ink);
}

.kma-ongoing__tracking { padding-top:12px; }

@media (max-width: 768px) {
	.kma-ongoing { padding: 10px; }
	.kma-ongoing__top .kma-link__arrow { top: 0; }
	.kma-ongoing__top .kma-chip { display: none;}
}

/* Shortcut tiles */
.kma-shortcuts {
    display: flex;
    flex-direction: column;
    gap: 16px;
    margin-top: 12px;
}

.kma-shortcuts__list {
    display: grid !important;
    gap: 20px;
    margin: 0 !important;
    padding: 0;
    list-style: none;
}

.kma-shortcuts__list--primary { grid-template-columns: repeat(3, 1fr); }
.kma-shortcuts__list--secondary { grid-template-columns: repeat(2, 1fr); column-gap: 20px; row-gap: 0; }

.kma-shortcuts__item { 
	background: #fff; 
	transition: all .25s;
}
.kma-shortcuts__item:hover { 
	transform: translatey(-4px);
	box-shadow: rgba(0, 0, 0, 0.1) 0px 4px 12px;
}

.kma-shortcuts__item a {
    display: grid;
    grid-template-columns: 1fr auto;
    align-items: end;
    gap: 8px 16px;
    height: 100%;
	width: 100% !important;
    padding: 24px;
    text-decoration: none;
}

.kma-shortcuts .kma-label {
    grid-column: 1 / -1;
}

.kma-shortcuts__arrow {
    width: 30px;
    height: 24px;
    transition: transform .25s;
}

.kma-shortcuts__item a:hover .kma-shortcuts__arrow {
    transform: translateX(4px);
}

/* Primary: big tiles, meta at top, title + arrow at the bottom */
.kma-shortcuts__list--primary a { 
	min-height: 172px; 
	grid-template-rows: 1fr auto; 
}
.kma-shortcuts__list--primary .kma-label { align-self: start; }

/* Secondary: rows with fine dividers, title on top, meta below, arrow centred */
.kma-shortcuts__list--secondary .kma-shortcuts__item { border-top: 1px solid var(--kma-line-strong); }
.kma-shortcuts__list--secondary a { align-items: center; }
.kma-shortcuts__list--secondary .kma-shortcuts__label { order: 1; font-size: 25px; }
.kma-shortcuts__list--secondary .kma-label { order: 2; grid-column: 1; }
.kma-shortcuts__list--secondary .kma-shortcuts__arrow { order: 1; grid-row: 1 / span 2; grid-column: 2; }

@media (max-width: 767px) {
	.kma-shortcuts { gap: 10px; }
	.kma-dashboard__inner {
		padding: 20px 10px 32px;
	}
    .kma-shortcuts__list--primary,
    .kma-shortcuts__list--secondary { grid-template-columns: 1fr; row-gap: 10px;}
    .kma-shortcuts__list--primary a { min-height: 105px; }
}

/* Product cards: the theme's loop markup and k-loop-grid.css */

/* "Köp igen" / "Skriv en recension": always visible, styled like the store button. */
.kma .kew-product-grid ul.products li.product a.kma-card-button {
    display: block;
    width: 100%;
    margin-top: 0.625rem;
    padding: 0.618em 1em;
    background: #000;
    border: 1px solid #000;
    border-radius: 0;
    color: #fff;
    font-size: 14px;
    font-weight: 400;
    letter-spacing: 1.5px;
    line-height: 1;
    text-align: center;
    text-transform: uppercase;
}

.kma .kew-product-grid ul.products li.product a.kma-card-button:hover {
    color: #fff;
    opacity: 0.8;
}

.kma .kew-product-grid ul.products li.product a.kma-card-button.is-added {
    background: var(--kma-beige);
    border-color: var(--kma-beige);
    color: var(--kma-ink);
}

.kma .kma-js-add.is-busy {
    opacity: 0.6;
    pointer-events: none;
}

.kma .kew-product-grid ul.products li.product a.kma-js-add.is-error {
    background: #fff;
    color: #a00;
    border-color: #a00;
}

/*
 * Guides: Expertis archive cards (.kew-expertis-card, styled by the theme's
 * k-archive-page.css). The theme only lays the card out inside
 * .kew-expertis-grid, so the card's own flex layout is repeated here.
 */
.kma-guides {
    display: flex !important;
    gap: 0.625rem;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    scroll-padding-inline: 20px;
    scrollbar-width: none;
}

.kma-guides::-webkit-scrollbar {
    display: none;
}

.kma-guides__item {
    flex: 0 0 min(80vw, 320px);
    scroll-snap-align: start;
}

.kma .kew-expertis-card {
    display: flex;
    flex-direction: column;
    gap: 0.325rem;
    width: 100%;
    text-decoration: none;
}

.kma .kew-expertis-card__image {
    background: var(--kma-beige-light);
}

.kma .kew-expertis-card__img {
    display: block;
}
.kma .kew-expertis-card__title.heading-small {
	margin-top: 4px !important;
}

/* CTA */
.kma-cta__inner {
	display: flex !important ;
	justify-content: space-between;
	align-items: center;
}
.kma-cta__content {
	display: flex;
	flex-direction: column;
	gap: 8px;
}
.kma-cta__label {
	padding-bottom: 20px;
}

.kma-cta .kma-btn {
    margin-top: 4px;
}

@media (max-width: 767px) {
	.kma-cta__inner {
		flex-direction: column;
		gap: 10px;
	}
	.kma-cta .kma-btn { margin-right: auto; margin-top: 10px; }
}
/* ---- Wider screens -------------------------------------------------- */
@media (min-width: 768px) {
    .kma-shortcuts {
        grid-template-columns: repeat(3, 1fr);
    }

    .kma-guides {
        display: grid !important;
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 2.25rem 1.25rem;
        overflow: visible;
    }

    .kma-guides__item {
        flex: none;
    }
}

/* Same breakpoint as the Expertis grid. */
@media (min-width: 1025px) {
    .kma-guides {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }
}