.pulse-shop { max-width: 1200px; margin: 0 auto; padding-bottom: 80px; }

/* Hero cards — responsive top margin that adapts to viewport height.
 * clamp(min, preferred, max): floor at 32px (tiny mobile, prevents
 * cramped feel) - preferred is 14% of viewport height (scales smoothly
 * with screen size) - ceiling at 220px so it doesn't look absurd on
 * ultra-tall displays. Build/Browse paths replace the hero and have
 * their own layout, so this only affects the landing view. */
.pulse-hero {
    display: flex; gap: 24px;
    margin: clamp(32px, 14vh, 220px) auto 48px;
    justify-content: center;
    flex-wrap: wrap;
}
.pulse-hero-card {
    flex: 1; min-width: 280px; max-width: 450px; padding: 40px 30px;
    text-align: center; border-radius: 10px; cursor: pointer;
    color: inherit; transition: transform 0.2s, box-shadow 0.2s;
    border: 2px solid #ddd; background: #fafafa;
}
.pulse-hero-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 24px rgba(0,0,0,0.12);
}
.pulse-hero-card h2 { margin: 0 0 12px; font-size: 24px; }
.pulse-hero-card p { margin: 0; color: #666; font-size: 15px; }
.pulse-hero-build:hover, .pulse-hero-build.active {
    background: #f3f5f6; border-color: #16435F;
}
.pulse-hero-build h2 { color: #16435F; }
.pulse-hero-packages:hover, .pulse-hero-packages.active {
    background: #f3f5f6; border-color: #555;
}
.pulse-hero-packages h2 { color: #555; }

/* Path visibility */
.pulse-path { display: none; }
.pulse-path.visible { display: block; }

/* Sticky header */
.pulse-sticky-header {
    position: sticky; top: 0; z-index: 100;
    background: #fff; padding: 16px 0 12px;
    border-bottom: 2px solid #eee;
    margin-bottom: 24px;
}
.pulse-sticky-header .pulse-step-row {
    display: flex; align-items: center; gap: 16px; flex-wrap: wrap;
}
.pulse-step-number {
    width: 36px; height: 36px; border-radius: 50%;
    background: #16435F; color: #fff; display: flex;
    align-items: center; justify-content: center;
    font-size: 16px; font-weight: 700; flex-shrink: 0;
}
.pulse-step-title { font-size: 22px; font-weight: 700; margin: 0; }
.pulse-step-subtitle { color: #666; font-size: 13px; margin: 4px 0 0 52px; }

/* Tabs */
.pulse-tabs { display: flex; gap: 0; margin-left: auto; }
.pulse-tab {
    padding: 8px 20px; font-size: 14px; font-weight: 600;
    cursor: pointer; border: 2px solid #ddd; background: #f9f9f9;
    color: #666; transition: all 0.2s;
}
.pulse-tab:first-child { border-radius: 6px 0 0 6px; }
.pulse-tab:last-child { border-radius: 0 6px 6px 0; border-left: none; }
.pulse-tab.active { background: #16435F; color: #fff; border-color: #16435F; }
.pulse-tab-content { display: none; }
.pulse-tab-content.visible { display: block; }

/* Sticky footer */
.pulse-sticky-footer {
    position: fixed; bottom: 0; left: 0; right: 0; z-index: 100;
    background: #fff; border-top: 2px solid #eee;
    padding: 12px 24px;
    display: none; /* shown by JS */
}
.pulse-sticky-footer.visible { display: block; }
.pulse-footer-inner {
    max-width: 1200px; margin: 0 auto;
    display: flex; justify-content: space-between; align-items: center;
}
.pulse-nav-btn {
    padding: 12px 32px; font-size: 16px; font-weight: 600;
    border: none; border-radius: 6px; cursor: pointer;
    transition: opacity 0.2s; text-decoration: none; display: inline-block;
}
.pulse-nav-btn:hover { opacity: 0.85; }
.pulse-nav-btn.primary { background: #16435F; color: #fff; }
.pulse-nav-btn.secondary { background: #f0f0f0; color: #333; }
.pulse-nav-btn.checkout { background: #16435F; color: #fff; }
.pulse-cart-summary {
    font-size: 14px; color: #666;
}
.pulse-cart-summary strong { color: #333; }

/* Back link */
.pulse-back-link {
    display: inline-block; margin-bottom: 16px; color: #16435F;
    text-decoration: none; font-size: 14px; cursor: pointer;
}
.pulse-back-link:hover { text-decoration: underline; }

/* Product card buttons */
.pulse-products .products .product {
    position: relative;
}
.pulse-products ul.products li.product a.button,
.pulse-products ul.products li.product a.add_to_cart_button,
.pulse-products ul.products li.product a.product_type_variable,
.pulse-products ul.products li.product a.product_type_simple,
.pulse-products ul.products li.product a.product_type_grouped {
    display: inline-block !important;
    visibility: visible !important;
    opacity: 1 !important;
    background: #16435F !important;
    color: #fff !important;
    border-radius: 6px !important;
    padding: 10px 20px !important;
    font-size: 14px !important;
    font-weight: 600 !important;
    margin-top: 10px !important;
    text-decoration: none !important;
    text-align: center !important;
}
.pulse-products ul.products li.product a.button:hover,
.pulse-products ul.products li.product a.add_to_cart_button:hover,
.pulse-products ul.products li.product a.product_type_variable:hover,
.pulse-products ul.products li.product a.product_type_grouped:hover {
    background: #1F5C7F !important;
}
.pulse-products ul.products li.product a.product_type_grouped {
    background: #1e8e3e !important;
}
.pulse-products ul.products li.product a.product_type_grouped:hover {
    background: #166d2f !important;
}

/* Section */
.pulse-section { margin-bottom: 48px; }
.pulse-section-title {
    font-size: 22px; font-weight: 700; margin-bottom: 8px;
    padding-bottom: 12px; border-bottom: 2px solid #eee;
}
.pulse-section-subtitle { color: #666; font-size: 14px; margin-bottom: 24px; }

/* Mobile responsive */
@media (max-width: 600px) {
    .pulse-sticky-footer {
        padding: 10px 12px;
    }
    .pulse-footer-inner {
        flex-wrap: wrap;
        gap: 10px;
        justify-content: center;
    }
    .pulse-nav-btn {
        padding: 10px 16px;
        font-size: 14px;
        flex: 1;
        text-align: center;
        min-width: 0;
    }
    .pulse-cart-summary {
        order: -1;
        width: 100%;
        text-align: center;
        padding-bottom: 6px;
        border-bottom: 1px solid #eee;
    }
    .pulse-sticky-header .pulse-step-row {
        flex-direction: column;
        align-items: flex-start;
    }
    .pulse-tabs {
        margin-left: 0;
        margin-top: 8px;
    }
}

/* ==========================================================================
 * Sticky footer — anchor Astra's footer to the viewport bottom on the
 * landing view, where content is otherwise too short to fill the viewport.
 *
 * Astra (free + Pro) has no native "footer sticks to bottom of viewport"
 * setting; verified by inspecting all 238 sticky-* settings in astra-settings
 * — every one is header-related. The :has() selector below scopes this rule
 * to pages that render .pulse-shop (the package builder), so other Astra
 * pages keep their normal layout.
 *
 * 100dvh ("dynamic viewport height") is the modern unit that correctly
 * excludes mobile Safari's URL bar from the viewport calculation. We list
 * 100vh first as a fallback for browsers that don't understand dvh — the
 * second declaration silently overrides where supported.
 *
 * DOM hierarchy this targets (from Astra footer.php):
 *   #page > #content + .site-footer
 * ========================================================================== */
body:has(.pulse-shop) #page {
    min-height: 100vh;
    min-height: 100dvh;
    display: flex;
    flex-direction: column;
}
body:has(.pulse-shop) #page > #content {
    flex: 1 0 auto;
}
body:has(.pulse-shop) #page > .site-footer {
    flex-shrink: 0;
}
