/* ==========================================================================
   GLOBAL HEADER TABS & TOPBAR STYLES
   Used across Cutlist, CNC Machining, and future service pages.
   ========================================================================== */
:root {
    --primary-color: #15803d;
}

.container {
    padding: 0 88px 0 33px;
    box-sizing: border-box;
}

@media (max-width: 860px) {
    .container {
        padding: 0 16px;
    }
}

.is-layout-constrained> :where(:not(.alignleft):not(.alignright):not(.alignfull)) {
    max-width: 100% !important;
}

/* TOP SECTION TABS — horizontal white bar with icons, numbers, and basket CTA */
.header {
    background: #f4f5f7;
    padding: 12px 24px;
    width: 100%;
    box-sizing: border-box;
}

.tabs {
    display: flex;
    align-items: stretch;
    gap: 0;
    width: 100%;
    max-width: 100%;
    margin: 0 auto;
    box-sizing: border-box;
}

.tab {
    flex: 1 1 0;
    min-width: 0;
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: flex-start;
    gap: 10px;
    padding: 18px 14px;
    border: 1.5px solid #e0e3e7;
    border-right: none;
    background: #fff;
    color: #555;
    font-size: 13px;
    line-height: 1.25;
    text-align: left;
    text-decoration: none;
    cursor: pointer;
    transition: border-color 0.18s ease, background 0.18s ease, color 0.18s ease;
    box-sizing: border-box;
    overflow: hidden;
}

.tab:first-child {
    border-radius: 8px 0 0 8px;
}

.tab:nth-of-type(5),
.tabs>.tab:last-of-type {
    border-right: 1.5px solid #e0e3e7;
    border-radius: 0;
}

.tab-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    color: #999;
    background-color: #eee;
    border-radius: 50%;
    width: 36px;
    height: 36px;
    min-width: 36px;
}

.tab-content {
    display: flex;
    flex-direction: column;
    gap: 3px;
    min-width: 0;
    flex: 1 1 auto;
    overflow: hidden;
}

.tab-number {
    font-size: 10px;
    font-weight: 500;
    color: #aaa;
    line-height: 1;
}

.tab-label {
    font-size: 14px;
    font-weight: 600;
    color: #333;
    line-height: 1.25;
    white-space: normal;
    word-break: normal;
    overflow-wrap: break-word;
}


.tab:hover {
    background: #f9faf9;
    border-color: #c5c9ce;
}

.tab:hover .tab-icon {
    color: var(--primary-color, #15803d);
}

.tab:focus-visible {
    outline: 2px solid var(--primary-color, #15803d);
    outline-offset: -2px;
}

.tab.active {
    border: 2px solid var(--primary-color, #15803d);
    border-right: 2px solid var(--primary-color, #15803d);
    background: #fff;
    cursor: default;
    z-index: 2;
    position: relative;
}

.tab.active+.tab {
    border-left: none;
}

.tab.active .tab-icon {
    color: var(--primary-color, #15803d);
}

.tab.active .tab-label {
    color: var(--primary-color, #15803d);
}

.tab.active .tab-number {
    color: var(--primary-color, #15803d);
}


.tab.disabled {
    background: #fff;
    color: #aaa;
    cursor: default;
    pointer-events: none;
}

.tab.disabled .tab-icon {
    color: #6a6a6a;
}

.tab.disabled .tab-label {
    color: #888;
}

.tab.disabled .tab-number {
    color: #bbb;
}


/* View Basket button — dark green CTA pinned to the right of the tab bar */
.tab-basket-btn {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 12px 18px;
    background: var(--primary-color, #15803d);
    color: #fff;
    border-radius: 0 8px 8px 0;
    text-decoration: none;
    cursor: pointer;
    white-space: nowrap;
    flex-shrink: 0;
    transition: background 0.18s ease;
    box-sizing: border-box;
}

.tab-basket-btn:hover {
    background: #15301f;
}

.tab-basket-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    color: #fff;
}

.tab-basket-text {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.tab-basket-label {
    font-size: 13px;
    font-weight: 600;
    color: #fff;
    line-height: 1.2;
}

.tab-basket-price {
    font-size: 14px;
    font-weight: 700;
    color: #fff;
    line-height: 1.2;
}

.tab-basket-arrow {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    color: #fff;
    margin-left: 2px;
}

@media (max-width: 1200px) {
    .tab {
        padding: 14px 10px;
        gap: 8px;
    }

    .tab-icon {
        width: 32px;
        height: 32px;
        min-width: 32px;
    }

    .tab-label {
        font-size: 13px;
    }
}

@media (max-width: 980px) {
    .header {
        padding: 10px 14px;
    }

    .tabs {
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: none;
        -ms-overflow-style: none;
    }

    .tabs::-webkit-scrollbar {
        display: none;
    }

    .tab {
        min-width: 155px;
        flex: 0 0 auto;
        padding: 14px 12px;
    }

    .tab-basket-btn {
        flex-shrink: 0;
        padding: 10px 14px;
        gap: 10px;
    }
}

@media (max-width: 600px) {
    .tab {
        min-width: 140px;
        padding: 12px 10px;
    }

    .tab-label {
        font-size: 12px;
    }

}

@media (prefers-reduced-motion: reduce) {

    .tab,
    .tab-basket-btn {
        transition: none;
    }
}

/* Persistent "View basket / Checkout" bar — only shown once something's in the basket */
.cb-topbar {
    background: #fff;
    display: flex;
    justify-content: flex-end;
    align-items: center;
    gap: 10px;
    padding: 10px 24px;
    border-bottom: 1px solid #e5e8ec;
    position: sticky;
    top: 0;
    z-index: 500;
}

.cb-topbar-btn {
    height: 36px;
    padding: 0 20px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    text-decoration: none;
    cursor: pointer;
    white-space: nowrap;
}

.cb-topbar-view {
    background: #fff;
    border: 1px solid var(--primary-color, #15803d);
    color: var(--primary-color, #15803d);
}

.cb-topbar-view:hover {
    background: #f3faf1;
}

.cb-topbar-checkout {
    background: var(--primary-color, #15803d);
    border: 1px solid var(--primary-color, #15803d);
    color: #fff;
}

.cb-topbar-checkout:hover {
    opacity: 0.92;
}