.storefront-autoreg .home-guides {
    margin: 42px 0;
}

@keyframes guides-document-exit {
    from {
        opacity: 1;
        transform: translateY(0);
        filter: blur(0);
    }

    to {
        opacity: 0;
        transform: translateY(-8px);
        filter: blur(3px);
    }
}

html.dm-guides-leave body {
    pointer-events: none;
    animation: guides-document-exit 220ms cubic-bezier(0.22, 1, 0.36, 1) both;
}

.storefront-autoreg .home-guides__head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
    margin-bottom: 24px;
}

.storefront-autoreg .home-guides__head h2 {
    margin: 0;
    font-size: clamp(24px, 3vw, 32px);
    font-weight: 800;
    letter-spacing: -0.02em;
}

.storefront-autoreg .home-guides__head p {
    margin: 7px 0 0;
    color: #64748b;
}

.storefront-autoreg .home-guides__all {
    color: #1f2937;
    font-weight: 700;
    white-space: nowrap;
}

/* Homepage section actions share one visual and motion contract. This keeps
   commerce and editorial destinations equally prominent without coupling the
   Guides entry transition to the product catalogue link. */
.storefront-autoreg .home-section-cta {
    box-sizing: border-box;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    min-height: 42px;
    height: 42px;
    padding: 0 14px;
    border: 1px solid rgba(15, 23, 42, 0.08);
    border-radius: var(--autoreg-radius-m, 10px);
    background: var(--autoreg-surface);
    color: var(--autoreg-text);
    box-shadow: 0 6px 14.4px rgba(0, 0, 0, 0.06);
    font-size: 13px;
    font-weight: 600;
    line-height: 1;
    text-decoration: none;
    white-space: nowrap;
    transition: background-color 0.18s ease, border-color 0.18s ease, box-shadow 0.18s ease, transform 0.18s ease;
}

.storefront-autoreg .home-section-cta i {
    font-size: 12px;
    line-height: 1;
    transition: transform 0.18s ease;
}

.storefront-autoreg .home-section-cta:hover {
    border-color: rgba(15, 23, 42, 0.12);
    background: var(--autoreg-control-hover);
    color: var(--autoreg-text);
    box-shadow: none;
    transform: translateY(-1px);
}

.storefront-autoreg .home-section-cta:hover i {
    transform: translateX(2px);
}

.storefront-autoreg .home-section-cta:active {
    transform: translateY(0) scale(0.985);
}

.storefront-autoreg .home-section-cta:focus-visible {
    outline: 3px solid var(--autoreg-focus-ring);
    outline-offset: 3px;
}

.storefront-autoreg .home-section-cta[aria-busy="true"] {
    pointer-events: none;
}

[data-theme="dark"] .storefront-autoreg .home-section-cta {
    border-color: rgba(255, 255, 255, 0.1);
    background: var(--autoreg-control-bg);
}

[data-theme="dark"] .storefront-autoreg .home-section-cta:hover {
    border-color: rgba(255, 255, 255, 0.16);
    background: var(--autoreg-control-hover);
}

.storefront-autoreg .home-guides__grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    align-items: stretch;
    gap: 18px;
}

.storefront-autoreg .home-guide-card {
    display: flex;
    flex-direction: column;
    height: 100%;
    min-width: 0;
    overflow: hidden;
    border: 1px solid var(--autoreg-border);
    border-radius: 16px;
    background: var(--autoreg-surface);
    color: var(--autoreg-text);
    transition: border-color 0.18s ease, transform 0.18s ease, box-shadow 0.18s ease;
}

.storefront-autoreg .home-guide-card:hover {
    border-color: rgba(143, 244, 81, 0.55);
    color: var(--autoreg-text);
    transform: translateY(-2px);
    box-shadow: 0 14px 30px rgba(15, 23, 42, 0.08);
}

.storefront-autoreg .home-guide-card:focus-visible {
    outline: 3px solid var(--autoreg-focus-ring);
    outline-offset: 3px;
}

.storefront-autoreg .home-guide-card__media {
    position: relative;
    display: grid;
    place-items: center;
    aspect-ratio: 16 / 9;
    overflow: hidden;
    background: linear-gradient(135deg, #f0ffe8, #eef5ff);
    color: #143a07;
}

.storefront-autoreg .home-guide-card__media img {
    width: 100%;
    height: 100%;
    display: block;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.storefront-autoreg .home-guide-card__media img[hidden] {
    display: none !important;
}

.storefront-autoreg .home-guide-card.has-cover:hover .home-guide-card__media img {
    transform: scale(1.035);
}

.storefront-autoreg .home-guide-card__fallback {
    display: none;
    font-size: 42px;
}

.storefront-autoreg .home-guide-card__body {
    display: flex;
    flex: 1 1 auto;
    flex-direction: column;
    min-width: 0;
    padding: 18px;
}

.storefront-autoreg .home-guide-card__meta {
    display: flex;
    align-items: center;
    gap: 8px;
    color: #7b8191;
    font-size: 12px;
    font-weight: 600;
}

.storefront-autoreg .home-guide-card h3 {
    display: -webkit-box;
    overflow: hidden;
    margin: 10px 0 8px;
    font-size: 18px;
    font-weight: 800;
    line-height: 1.3;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 3;
}

.storefront-autoreg .home-guide-card p {
    display: -webkit-box;
    overflow: hidden;
    margin: 0;
    color: #64748b;
    font-size: 14px;
    line-height: 1.55;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
}

/* A missing cover is content state, not a loading state. Keep its icon compact
   so a published guide never looks like a stalled 16:9 image request. */
.storefront-autoreg .home-guide-card.is-placeholder {
    display: grid;
    grid-template-columns: 58px minmax(0, 1fr);
    align-items: start;
    height: 100%;
    gap: 16px;
    padding: 20px;
}

.storefront-autoreg .home-guide-card.is-placeholder .home-guide-card__media {
    width: 58px;
    height: 58px;
    aspect-ratio: auto;
    border-radius: 14px;
}

.storefront-autoreg .home-guide-card.is-placeholder .home-guide-card__fallback {
    display: block;
    font-size: 24px;
}

.storefront-autoreg .home-guide-card.is-placeholder .home-guide-card__body {
    padding: 0;
}

.storefront-autoreg .home-guide-card.is-placeholder h3 {
    margin-top: 8px;
    font-size: 17px;
}

.storefront-autoreg .home-guide-card.is-placeholder p {
    font-size: 13px;
}

.storefront-autoreg .home-guide-card.is-image-error .home-guide-card__media {
    flex: 0 0 58px;
}

[data-theme="dark"] .storefront-autoreg .home-guide-card.is-placeholder .home-guide-card__media {
    background: linear-gradient(135deg, rgba(143, 244, 81, 0.16), rgba(80, 137, 214, 0.14));
    color: #8ff451;
}

@media (max-width: 991px) {
    .storefront-autoreg .home-guides__grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .storefront-autoreg .home-guide-card:nth-child(n + 3) {
        display: none;
    }
}

@media (max-width: 575px) {
    .storefront-autoreg .home-guides {
        margin: 32px 0;
    }

    .storefront-autoreg .home-guides__head {
        align-items: flex-start;
        flex-direction: column;
        gap: 12px;
    }

    .storefront-autoreg .home-guides__all {
        display: inline-flex;
        align-items: center;
        margin-top: 0;
    }

    .storefront-autoreg .home-guides__head p {
        display: none;
    }

    .storefront-autoreg .home-guides__grid {
        grid-template-columns: 1fr;
    }

    .storefront-autoreg .home-guide-card:nth-child(n + 2) {
        display: none;
    }
}

@media (prefers-reduced-motion: reduce) {
    .storefront-autoreg .home-section-cta,
    .storefront-autoreg .home-section-cta i,
    .storefront-autoreg .home-guide-card,
    .storefront-autoreg .home-guide-card__media img,
    html.dm-guides-leave body {
        animation: none !important;
        transition: none !important;
        transform: none !important;
    }
}
