/* ==========================================================
   WC Product Table — no font-family overrides
   ========================================================== */

/* Container: carries width, centering, and margin */
.wcpt-container {
    display: block;
    width: 100%;
    margin: 1em auto;
    box-sizing: border-box;
}

/* Inner wrap: border and scroll */
.wcpt-wrap {
    border: 1px solid #ddd;
    border-radius: 3px;
    overflow-x: auto;
    box-sizing: border-box;
}


.wcpt-title {
    text-align: center;
    margin: 0 0 .25em;
    padding: 0;
}

.wcpt-description {
    text-align: center;
    color: #777;
    font-size: 14pt;
    margin: 0 0 .75em;
    padding: 0;
}

.wcpt-table-scroll {
    width: 100%;
}

.wcpt-table {
    width: 100%;
    border-collapse: collapse;
}

/* Sticky header */
.wcpt-table thead tr {
    position: sticky;
    top: 0;
    z-index: 10;
}

.wcpt-table thead th {
    background: #e5e5e5;
    border-bottom: 2px solid #ccc;
    padding: 9px 10px;
    text-align: left;
    white-space: nowrap;
    vertical-align: bottom;
}

@media ( max-width: 640px ) {
    .wcpt-table thead th {
        white-space: normal;
        word-break: break-word;
    }
}

/* Alternating rows */
.wcpt-table tbody tr.wcpt-row-even { background: #ffffff; }
.wcpt-table tbody tr.wcpt-row-odd  { background: #f0f0f8; }
.wcpt-table tbody tr:hover         { filter: brightness(.97); }

/* Hidden until toggled */
.wcpt-table tbody tr.wcpt-vars-hidden { display: none; }

.wcpt-toggle-vars {
    font-size: .85em;
    color: inherit;
    text-decoration: none;
    white-space: nowrap;
    opacity: .7;
}
.wcpt-toggle-vars:hover { opacity: 1; text-decoration: underline; }

/* Toggle link when variations have qty added */
.wcpt-toggle-vars.wcpt-has-qty {
    color: #4442AD;
    font-weight: bold;
    opacity: 1;
}



/* Cells */
.wcpt-table td {
    padding: 7px 10px;
    vertical-align: middle;
    border-bottom: 1px solid #e8e8e8;
}

/* Variation sub-rows */
.wcpt-td-var .wcpt-var-name {
    padding-left: 1.4em;
    display: block;
    font-weight: normal;
}

.wcpt-var-indent { color: #bbb; }

/* Product name */
/* Name column: minimum width so it always gets reasonable space */
.wcpt-table .wcpt-col-name {
    min-width: 160px;
}

.wcpt-product-name {
    text-decoration: none;
    color: inherit;
}
.wcpt-product-name:hover { text-decoration: underline; }

/* Price */
.wcpt-price del  { display: inline; color: #999; font-size: inherit; }
.wcpt-price ins  { display: inline; text-decoration: none; color: inherit; font-weight: 600; }

/* Mobile price inside qty cell — hidden on desktop, shown on mobile */
.wcpt-qty-cell-price { display: none; }

/* SKU */
.wcpt-sku { font-size: .85em; color: #777; }

/* Stock */
.wcpt-instock    { font-size: .85em; color: #2d6a40; }
.wcpt-outofstock { font-size: .85em; color: #a03030; }
.wcpt-backorder  { font-size: .85em; color: #7a6000; }
.wcpt-unavailable { font-size: .8em; font-style: italic; }

/* Qty stepper */
.wcpt-stepper {
    display: inline-flex;
    align-items: center;
    border: 1px solid #ccc;
    border-radius: 3px;
    overflow: hidden;
    white-space: nowrap;
}

.wcpt-step {
    background: #f0f0f0 !important;
    border: none !important;
    border-radius: 0 !important;
    cursor: pointer;
    font-size: 14px !important;
    line-height: 1 !important;
    padding: 12px !important;
    margin-bottom: 0 !important;
    color: #666 !important;
    flex-shrink: 0;
    transition: background .1s;
    box-shadow: none !important;
}

.wcpt-step:hover  { background: #ddd !important; color: #444 !important; }
.wcpt-step:active { background: #ccc !important; }

.wcpt-qty {
    width: 40px;
    text-align: center;
    padding: 4px 2px;
    border: none;
    border-left: 1px solid #ccc;
    border-right: 1px solid #ccc;
    -moz-appearance: textfield;
    outline: none;
    margin-bottom: 0;
}
.wcpt-qty::-webkit-outer-spin-button,
.wcpt-qty::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }

/* Thumbnail */
.wcpt-thumb {
    display: block;
    width: 40px;
    height: 40px;
    object-fit: cover;
    border-radius: 3px;
}



/* Success banner */
.wcpt-success-banner {
    display: block;
    margin: 0;
    border-radius: 0;
    border-bottom: 1px solid #a3d4ae;
}

/* Inline error */
.wcpt-inline-err {
    font-size: .85em;
    color: #a03030;
    margin-right: 10px;
}



/* Action bar: centered column — show more, totals, button */
.wcpt-action-bar {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 12px 0 4px;
    gap: 8px;
}

.wcpt-load-more-link {
    font-size: 16pt;
    color: #000;
    text-decoration: none;
    cursor: pointer;
    white-space: nowrap;
    margin-bottom: 8px;
    display: inline-block;
}
.wcpt-load-more-link:hover { color: #4442AD; text-decoration: none; }

.wcpt-action-bar-right {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
}

.wcpt-totals-row {
    display: flex;
    gap: 6px;
    font-size: .85em;
    white-space: nowrap;
}

.wcpt-total-qty   { font-weight: 600; }
.wcpt-total-price { font-weight: 700; }

/* Image column — fixed width */
.wcpt-table .wcpt-col-image {
    width: 50px;
    min-width: 50px;
}

/* ==========================================================
   MOBILE
   ========================================================== */
@media ( max-width: 640px ) {

    .wcpt-table-scroll { font-size: .82em; }

    .wcpt-table thead th,
    .wcpt-table td { padding: 6px 6px; }

    .wcpt-table .wcpt-mobile-hide { display: none; }

    .wcpt-table td.wcpt-attr-col { display: none; }

    .wcpt-attr-inline {
        display: block;
        color: #777;
        font-size: .85em;
        margin-top: 2px;
    }

    /* Hide price column on mobile — price shown above stepper in qty cell instead */
    .wcpt-table .wcpt-col-price { display: none; }

    /* Show price above stepper/toggle inside the qty cell on mobile */
    .wcpt-qty-cell-price {
        display: block;
        font-size: .85em;
        margin-bottom: 4px;
    }
    .wcpt-qty-cell-price del { color: #999; }
    .wcpt-qty-cell-price ins { text-decoration: none; font-weight: 600; }
    /* Strip wrapper span from render_price inside qty-cell-price */
    .wcpt-qty-cell-price .wcpt-price { display: inline; }

    .wcpt-qty { width: 32px; }
    .wcpt-step { padding: 4px 6px; font-size: 13px; }

    /* Ensure thumbnail col keeps minimum size on mobile */
    .wcpt-table .wcpt-col-image { width: 50px; min-width: 50px; }

}
