/* ============================================================
   STEP ROUTINE WRAPPER
   overflow:hidden clips the slider; the slider itself is a
   normal block element so its width equals this wrapper.
   Percentages on flex children resolve against THIS width.
   ============================================================ */
.step-routine-wrapper {
    width: 100%;
    position: relative;
    overflow: hidden;
}

/* ============================================================
   SLIDER TRACK
   No explicit width → stretches to 100% of wrapper (block-level
   flex container), so 25% on children = 25% of wrapper width.
   ============================================================ */
.step-routine-slider {
    display: flex;
    gap: 20px;
    transition: transform 0.45s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    will-change: transform;
    align-items: flex-start;
}

/* ============================================================
   STEP CARD — 4 visible at once on desktop
   total_gap = 3 × 20px = 60px  →  per-item deduction = 15px
   item_width = 25% of wrapper − 15px
   ============================================================ */
.step-item {
    flex: 0 0 calc(25% - 15px);
    max-width: calc(25% - 15px);
    box-sizing: border-box;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
}

/* ============================================================
   STEP BADGE  (pill above the product)
   ============================================================ */
.step-item h3 {
    background-color: #851625;
    color: #fff !important;
    font-size: 15px;
    font-weight: 600;
    padding: 5px 24px;
    border-radius: 30px;
    margin: 0 0 6px 0;
    display: inline-block;
    white-space: nowrap;
    line-height: 1.4;
}

/* ============================================================
   SHORT DESCRIPTION  (below badge, above product)
   ============================================================ */
.step-description {
    margin: 0 0 10px 0;
    color: #444 !important;
    font-size: 13px;
    line-height: 1.5;
    text-align: center;
}

/* ============================================================
   WOO PRODUCT CONTAINER
   ============================================================ */
.woo-product {
    width: 100%;
}

/* ============================================================
   WOOCOMMERCE OVERRIDES
   WooCommerce uses floats/percentages that break inside a flex
   column. Force everything to stack full-width.
   ============================================================ */
.woo-product ul.products {
    display: block !important;
    float: none !important;
    width: 100% !important;
    margin: 0 !important;
    padding: 0 !important;
    list-style: none !important;
    columns: 1 !important;
    column-count: 1 !important;
    -webkit-columns: 1 !important;
}

.woo-product ul.products li.product,
.woo-product ul.products li.type-product {
    float: none !important;
    clear: both !important;
    width: 100% !important;
    max-width: 100% !important;
    margin: 0 0 12px 0 !important;
    padding: 0 !important;
    box-sizing: border-box !important;
}

/* WooCommerce Blocks (newer WC versions) */
.woo-product .wc-block-grid__products {
    grid-template-columns: 1fr !important;
    column-gap: 0 !important;
}
.woo-product .wc-block-grid__product {
    width: 100% !important;
}

/* ============================================================
   NAVIGATION
   ============================================================ */
.step-nav {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 20px;
    margin-top: 24px;
}

.step-arrow {
    border: 0;
    background: transparent;
    padding: 8px 14px;
    cursor: pointer;
    font-size: 18px;
    line-height: 1;
    transition: opacity 0.2s;
}

.step-arrow:disabled {
    opacity: 0.3;
    cursor: default;
}

.step-counter {
    font-size: 14px;
    font-weight: 500;
    min-width: 80px;
    text-align: center;
}

/* ============================================================
   RESPONSIVE
   ============================================================ */

/* Tablet — 2 items: gap=1×20px → per-item deduction=10px */
@media (max-width: 1024px) and (min-width: 601px) {
    .step-item {
        flex: 0 0 calc(50% - 10px);
        max-width: calc(50% - 10px);
    }
}

/* Mobile — 1 item (slightly peeked) */
@media (max-width: 600px) {
    .step-routine-slider {
        gap: 12px;
    }
    .step-item {
        flex: 0 0 85%;
        max-width: 85%;
    }
    .step-item h3 {
        font-size: 14px;
    }
}

/* ============================================================
   TABS
   ============================================================ */
.tabs-wrapper{
    display: flex;
    align-items: center;
    justify-content: center;
}

.steps-routine-tabs {
    margin-bottom: 20px;
}

.steps-routine-tab-buttons {
    display: flex;
    gap: 0;
    flex-wrap: nowrap;
    margin-bottom: 20px;
    background: #f0ede8;
    border-radius: 999px;
    padding: 4px;
    width: fit-content;
}

.steps-routine-tab-btn {
    padding: 8px 24px;
    border-radius: 999px;
    border: none;
    background: transparent;
    color: #8A7F78;
    cursor: pointer;
    font-family: 'Geologica', sans-serif;
    font-size: 14px;
    font-weight: 400;
    transition: all 0.2s ease;
    line-height: 1.4;
}

.steps-routine-tab-btn.active {
    background: #fff;
    color: #851625;
    font-weight: 600;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.12);
}

.steps-routine-tab-btn:not(.active):hover {
    color: #E8A9B8;
    background: transparent;
}

/* ============================================================
   HIDDEN ROUTINE (inactive tab)
   ============================================================ */
.hidden-routine {
    display: none !important;
}