/**
* tableproduct — front office styles
* Clean, airy table + card layout on mobile
*/

/* ==========================================================================
   Panel & Title
   ========================================================================== */
.tableproduct-panel {
    background: #fff;
    border-radius: 16px;
    box-shadow: 0 2px 16px rgba(15, 23, 42, 0.08);
    margin-bottom: 110px;
    overflow: hidden;
    padding-bottom: 8px;
}

.panel-title {
    position: relative;
    margin: 0;
    padding: 28px 24px 20px;
    text-align: center;
    font-family: 'Roboto', 'Open Sans', sans-serif;
    font-size: 22px;
    font-weight: 700;
    letter-spacing: 2px;
    text-transform: uppercase;
    color: #1e293b;
    border-bottom: 1px solid #eef2f7;
}

.panel-title i {
    font-size: 22px;
    color: #2fb5d2;
    margin-right: 10px;
    vertical-align: -2px;
}

.title-label {
    display: inline-block;
}

.title-underline {
    display: block;
    width: 64px;
    height: 4px;
    background: linear-gradient(to right, #2fb5d2, #1e88e5);
    margin: 14px auto 0;
    border-radius: 4px;
}

/* ==========================================================================
   Tabs
   ========================================================================== */
.filter-tabs-container {
    padding: 16px 20px 0;
    border-bottom: none;
    background: transparent;
}

.filter-tabs {
    max-width: 480px;
    margin: 0 auto;
    background: #f1f5f9;
    border-radius: 12px;
    padding: 4px;
}

.nav-tabs {
    display: flex;
    list-style: none;
    padding: 0;
    margin: 0;
    border-bottom: none;
    gap: 4px;
}

.tab-item {
    position: relative;
    flex: 1;
    padding: 10px 16px;
    cursor: pointer;
    border: none;
    border-radius: 9px;
    transition: all 0.2s ease;
    font-weight: 600;
    font-size: 14px;
    color: #64748b;
    text-align: center;
}

.tab-item:hover {
    color: #0f172a;
}

.tab-item.active {
    color: #fff;
    background: linear-gradient(135deg, #2fb5d2 0%, #1f94b8 100%);
    box-shadow: 0 2px 8px rgba(47, 181, 210, 0.35);
}

.tab-item.active i {
    color: #fff;
}

.tab-item.active::after {
    display: none;
}

.tab-item i {
    margin-right: 6px;
    font-size: 14px;
    color: #2fb5d2;
}

.tab-content {
    padding: 14px 24px 6px;
    background: transparent;
}

.tab-pane {
    display: none;
    animation: fadeIn 0.3s;
}

.tab-pane.active {
    display: block;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

/* ==========================================================================
   Filter chips
   ========================================================================== */
.brand-filter-container,
.category-filter-container {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    padding: 6px 0 10px;
    max-height: 180px;
    overflow-y: auto;
    scrollbar-width: thin;
}

.brand-filter-container::-webkit-scrollbar,
.category-filter-container::-webkit-scrollbar {
    width: 6px;
}

.brand-filter-container::-webkit-scrollbar-thumb,
.category-filter-container::-webkit-scrollbar-thumb {
    background-color: #cbd5e1;
    border-radius: 3px;
}

.brand-filter-label,
.category-filter-label {
    position: relative;
    display: inline-flex;
    align-items: center;
    gap: 7px;
    padding: 9px 18px;
    background: #fff;
    border: 1.5px solid #dbe3ec;
    border-radius: 999px;
    cursor: pointer;
    transition: all 0.18s ease;
    font-size: 13px;
    font-weight: 600;
    color: #475569;
    user-select: none;
    box-shadow: 0 1px 2px rgba(15, 23, 42, 0.05);
}

.brand-filter-label:hover,
.category-filter-label:hover {
    border-color: #2fb5d2;
    color: #0e7490;
    transform: translateY(-1px);
    box-shadow: 0 3px 8px rgba(47, 181, 210, 0.22);
}

.brand-filter-label:active,
.category-filter-label:active {
    transform: translateY(0);
    box-shadow: 0 1px 3px rgba(47, 181, 210, 0.18);
}

.brand-filter-label input,
.category-filter-label input {
    position: absolute;
    opacity: 0;
    width: 0;
    height: 0;
    margin: 0;
    pointer-events: none;
}

/* Checkmark dot — hidden until selected */
.brand-filter-label::before,
.category-filter-label::before {
    content: '\2713';
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 0;
    height: 16px;
    font-size: 11px;
    font-weight: 800;
    color: #fff;
    background: rgba(255, 255, 255, 0.28);
    border-radius: 50%;
    overflow: hidden;
    transition: width 0.18s ease;
}

.brand-filter-label:has(input:checked),
.category-filter-label:has(input:checked) {
    background: linear-gradient(135deg, #2fb5d2 0%, #1f94b8 100%);
    border-color: transparent;
    color: #fff;
    box-shadow: 0 3px 10px rgba(47, 181, 210, 0.4);
}

.brand-filter-label:has(input:checked)::before,
.category-filter-label:has(input:checked)::before {
    width: 16px;
}

.brand-filter-label:has(input:checked):hover,
.category-filter-label:has(input:checked):hover {
    color: #fff;
    transform: translateY(-1px);
    box-shadow: 0 5px 14px rgba(47, 181, 210, 0.5);
}

.select-all-container {
    width: 100%;
    text-align: center;
    padding-bottom: 10px;
}

.select-all-btn {
    padding: 9px 22px;
    border-radius: 999px;
    background: linear-gradient(135deg, #1e293b 0%, #334155 100%);
    color: #fff;
    border: none;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.18s ease;
    box-shadow: 0 2px 6px rgba(15, 23, 42, 0.2);
}

.select-all-btn:hover {
    background: linear-gradient(135deg, #2fb5d2 0%, #1f94b8 100%);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(47, 181, 210, 0.4);
}

.select-all-btn:active {
    transform: translateY(0);
}

.select-all-btn i {
    margin-right: 6px;
}

/* ==========================================================================
   Search
   ========================================================================== */
.search-container {
    padding: 6px 24px 16px;
}

.search-input-wrapper {
    position: relative;
    display: flex;
    align-items: center;
    max-width: 420px;
    margin: 0 auto;
    border-radius: 999px;
    border: 1.5px solid #9fd8e7;
    background: #f8fafc;
    box-shadow: 0 0 0 2px rgba(47, 181, 210, 0.08), 0 1px 3px rgba(15, 23, 42, 0.06);
    transition: all 0.2s;
}

.search-input-wrapper:focus-within {
    border-color: #2fb5d2;
    background: #fff;
    box-shadow: 0 0 0 3px rgba(47, 181, 210, 0.18),
                0 0 18px rgba(47, 181, 210, 0.35);
    animation: tpSearchGlow 1.8s ease-in-out infinite;
}

@keyframes tpSearchGlow {
    0%, 100% {
        box-shadow: 0 0 0 3px rgba(47, 181, 210, 0.18),
                    0 0 14px rgba(47, 181, 210, 0.3);
    }
    50% {
        box-shadow: 0 0 0 4px rgba(47, 181, 210, 0.28),
                    0 0 26px rgba(47, 181, 210, 0.5);
    }
}

/* Row reveal animation when the search filters the table */
@keyframes tpRowReveal {
    from {
        opacity: 0;
        transform: translateY(-6px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

#product-table tbody tr.tp-row-reveal {
    animation: tpRowReveal 0.28s cubic-bezier(0.4, 0, 0.2, 1) both;
}

/* Brand logo inside the brand column */
.tp-brand-cell {
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.tp-brand-logo {
    height: 22px;
    max-width: 70px;
    width: auto;
    object-fit: contain;
    border-radius: 4px;
}

/* Brand logo inside the group header row */
.tp-brand-logo.group-brand-logo {
    height: 30px;
    max-width: 110px;
    background: #fff;
    padding: 3px 8px;
    border-radius: 6px;
    box-shadow: 0 1px 3px rgba(15, 23, 42, 0.1);
    vertical-align: middle;
    margin-right: 8px;
}

.search-icon {
    position: absolute;
    left: 16px;
    color: #94a3b8;
    font-size: 15px;
}

#product-search {
    padding: 12px 44px 12px 42px;
    border: none;
    border-radius: 999px;
    font-size: 14px;
    width: 100%;
    background: transparent;
    color: #1e293b;
}

#product-search::placeholder {
    color: #94a3b8;
}

#product-search:focus {
    outline: none;
}

.clear-search-btn {
    position: absolute;
    right: 8px;
    width: 30px;
    height: 30px;
    padding: 0;
    border: none;
    border-radius: 50%;
    background: #e2e8f0;
    color: #64748b;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
}

.clear-search-btn:hover {
    background: #cbd5e1;
    color: #1e293b;
}

/* ==========================================================================
   Table — desktop
   ========================================================================== */
.table-responsive-wrapper {
    width: 100%;
    margin: 0;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

#product-table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
    min-width: 960px;
}

#product-table thead th {
    position: sticky;
    top: 0;
    z-index: 10;
    background: #1e293b;
    color: #e2e8f0;
    border: none;
    padding: 14px 12px;
    font-weight: 600;
    font-size: 12px;
    text-align: left;
    text-transform: uppercase;
    letter-spacing: 0.6px;
    white-space: nowrap;
}

#product-table thead th.image-column,
#product-table td.product-image-cell {
    width: 72px;
    min-width: 72px;
    text-align: center;
}

/* column sizing hints — Nome & FORMAT get the room they need */
#product-table th:nth-child(3), #product-table td:nth-child(3) { width: 24%; } /* Nome */
#product-table th:nth-child(5), #product-table td:nth-child(5) { width: 15%; } /* FORMAT */
#product-table th:nth-child(6), #product-table td:nth-child(6) { width: 80px; }  /* Stock */
#product-table th:nth-child(7), #product-table td:nth-child(7) { width: 90px; }  /* Price */
#product-table th:nth-child(8), #product-table td:nth-child(8) { width: 110px; } /* Quantity */
#product-table th:nth-child(9), #product-table td:nth-child(9) { width: 90px; }  /* PVP */
#product-table th:nth-child(n+6), #product-table td:nth-child(n+6) { text-align: right; }
#product-table td:nth-child(8) { text-align: center; }

#product-table tbody td {
    padding: 16px 12px;
    border-bottom: 1px solid #e8edf3;
    vertical-align: middle;
    font-size: 14px;
    color: #334155;
    word-wrap: break-word;
    transition: background-color 0.2s;
}

#product-table tbody tr:nth-child(odd) {
    background-color: #f7fafc;
}

#product-table tbody tr:hover td {
    background-color: #eef7fb;
}

#product-table tbody tr:last-child td {
    border-bottom: none;
}

/* Group headers */
tr.group-header td.group-title {
    background: #e8f6fb;
    color: #0e7490;
    font-weight: 700;
    text-transform: uppercase;
    font-size: 13px;
    padding: 10px 16px;
    letter-spacing: 1px;
    border-bottom: 2px solid #bae6f0;
    border-left: 4px solid #2fb5d2;
    text-align: left;
}

tr.group-header i {
    margin-right: 8px;
}

/* ==========================================================================
   Cells: image, stock, price, quantity
   ========================================================================== */
.product-thumb {
    width: 56px;
    height: 56px;
    object-fit: cover;
    border-radius: 8px;
    cursor: zoom-in;
    border: 1px solid #eef2f7;
    transition: transform 0.2s, box-shadow 0.2s;
}

.product-thumb:hover {
    transform: scale(1.15);
    box-shadow: 0 4px 12px rgba(15, 23, 42, 0.18);
    z-index: 5;
    position: relative;
}

.default-thumb {
    background-color: #f5f5f5;
    opacity: 0.8;
}

.stock-status {
    display: inline-block;
    padding: 4px 10px;
    border-radius: 999px;
    font-weight: 600;
    font-size: 12px;
    white-space: nowrap;
}

.stock-status.no-stock {
    color: #b91c1c;
    background-color: #fee2e2;
}

.stock-status.in-stock,
.stock-status.normal-stock {
    color: #15803d;
    background-color: #dcfce7;
}

.stock-status.low-stock {
    color: #b45309;
    background-color: #fef3c7;
}

.stock-status.high-stock {
    color: #1d4ed8;
    background-color: #dbeafe;
}

.price-column {
    font-weight: 700;
    color: #0f172a;
    white-space: nowrap;
}

.clean-price {
    color: #0f172a;
    font-weight: 700;
}

.original-price {
    text-decoration: line-through;
    color: #94a3b8;
    font-size: 0.85em;
    display: block;
    font-weight: 400;
}

.discounted-price {
    color: #dc2626;
    font-weight: 700;
    display: inline-block;
}

.discount-badge {
    background: #dc2626;
    color: #fff;
    font-size: 11px;
    padding: 2px 6px;
    border-radius: 999px;
    margin-left: 6px;
    display: inline-block;
    font-weight: 700;
}

.quantity-container {
    position: relative;
}

.product-quantity {
    width: 76px;
    padding: 9px 8px;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    text-align: center;
    font-weight: 600;
    font-size: 14px;
    color: #1e293b;
    transition: all 0.2s;
    background: #f8fafc;
}

.product-quantity:focus {
    border-color: #2fb5d2;
    background: #fff;
    outline: none;
    box-shadow: 0 0 0 3px rgba(47, 181, 210, 0.15);
}

.product-quantity:hover:not(:disabled) {
    border-color: #2fb5d2;
}

.product-quantity:disabled {
    background-color: #f1f5f9;
    cursor: not-allowed;
    opacity: 0.6;
}

.product-quantity.quantity-invalid {
    border-color: #dc2626;
    background-color: #fef2f2;
}

.quantity-error {
    position: absolute;
    top: 100%;
    left: 0;
    margin-top: 4px;
    color: #dc2626;
    font-size: 11px;
    white-space: nowrap;
    font-weight: 600;
    z-index: 6;
}

/* ==========================================================================
   Floating cart dock
   ========================================================================== */
#tableproduct-cart-buttons {
    position: fixed;
    bottom: 16px;
    left: 50%;
    transform: translateX(-50%);
    width: auto;
    padding: 0;
    z-index: 1000;
    margin: 0;
    background: transparent;
}

.cart-buttons-container {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 12px;
    margin: 0 auto;
    padding: 10px 12px;
    background: rgba(255, 255, 255, 0.92);
    backdrop-filter: blur(10px);
    border-radius: 999px;
    border: 1px solid rgba(226, 232, 240, 0.9);
    box-shadow: 0 8px 30px rgba(15, 23, 42, 0.18);
}

.action-btn {
    padding: 12px 26px !important;
    font-size: 14px !important;
    font-weight: 700 !important;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    border-radius: 999px !important;
    border: none;
    box-shadow: none;
    transition: all 0.2s;
    min-width: 170px;
    cursor: pointer;
}

.action-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(15, 23, 42, 0.2);
}

#add-to-cart-btn,
#clear-cart-btn {
    display: inline-flex !important;
    align-items: center;
    justify-content: center;
    gap: 8px;
    color: #fff;
}

#add-to-cart-btn {
    background: #16a34a;
}

#add-to-cart-btn:hover {
    background: #15803d;
}

#clear-cart-btn {
    background: #dc2626;
}

#clear-cart-btn:hover {
    background: #b91c1c;
}

/* ==========================================================================
   Image modal
   ========================================================================== */
.product-image-modal {
    display: none;
    position: fixed;
    z-index: 9999;
    padding-top: 30px;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: rgba(0, 0, 0, 0.9);
    backdrop-filter: blur(5px);
}

.modal-content {
    margin: 0 auto 20px;
    display: block;
    max-width: 80%;
    max-height: 60%;
    object-fit: contain;
    animation: zoom-in 0.3s ease;
}

@keyframes zoom-in {
    from { transform: scale(0.85); opacity: 0; }
    to { transform: scale(1); opacity: 1; }
}

.modal-product-title {
    color: #fff;
    text-align: center;
    margin: 0 0 15px;
    font-size: 24px;
    font-weight: 600;
    padding: 0 50px;
}

#modal-caption {
    display: block;
    color: #fff;
    padding: 10px 0;
    font-size: 16px;
    text-align: center;
    margin: 10px auto;
}

.modal-simple-controls {
    display: flex;
    flex-direction: column;
    justify-content: center;
    margin: 15px auto;
    max-width: 220px;
}

.modal-quantity-simple {
    display: flex;
    align-items: center;
    gap: 10px;
    background: rgba(255, 255, 255, 0.1);
    padding: 10px 15px;
    border-radius: 6px;
}

#modal-quantity-input {
    width: 60px;
    padding: 6px;
    text-align: center;
    border: 1px solid rgba(255, 255, 255, 0.3);
    background: rgba(0, 0, 0, 0.2);
    color: #fff;
    border-radius: 4px;
}

#modal-add-btn {
    background: #2fb5d2;
    border: none;
    color: #fff;
    border-radius: 4px;
    padding: 6px 12px;
    cursor: pointer;
}

#modal-add-btn:hover {
    background: #1e88e5;
}

.modal-close {
    position: absolute;
    top: 15px;
    right: 25px;
    font-size: 40px;
    font-weight: bold;
    color: #f1f1f1;
    cursor: pointer;
    transition: color 0.3s;
    z-index: 10000;
}

.modal-close:hover {
    color: #fff;
}

/* ==========================================================================
   Loading & misc
   ========================================================================== */
.loading-overlay {
    display: none;
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(255, 255, 255, 0.7);
    z-index: 1000;
    justify-content: center;
    align-items: center;
}

.loading-overlay.active {
    display: flex;
}

.loading-spinner {
    width: 50px;
    height: 50px;
    border: 5px solid #f3f3f3;
    border-top: 5px solid #3498db;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

.mobile-scroll-hint {
    text-align: center;
    margin: 10px 16px;
    color: #64748b;
    font-style: italic;
    display: none;
    padding: 10px;
    background-color: #f8fafc;
    border-radius: 8px;
    font-size: 13px;
}

.no-results {
    padding: 30px !important;
}

.no-results .alert {
    margin: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 15px;
}

.no-results .icon {
    margin-right: 8px;
    font-size: 18px;
}

/* ==========================================================================
   Responsive — tablet & mobile: rows become cards
   ========================================================================== */
@media (max-width: 992px) {
    .tab-content,
    .search-container {
        padding-left: 16px;
        padding-right: 16px;
    }

    .filter-tabs {
        max-width: 100%;
    }

    .brand-filter-container,
    .category-filter-container {
        gap: 8px;
        max-height: 220px;
    }

    .brand-filter-label,
    .category-filter-label {
        padding: 11px 18px;
        font-size: 14px;
    }

    .tableproduct-panel {
        border-radius: 12px;
        margin-bottom: 100px;
    }

    .panel-title {
        font-size: 17px;
        padding: 20px 16px 16px;
    }

    .mobile-scroll-hint {
        display: none !important;
    }

    /* --- table -> stacked cards --- */
    .table-responsive-wrapper {
        overflow: visible;
        padding: 4px 12px 12px;
    }

    #product-table {
        min-width: 0 !important;
        table-layout: auto !important;
    }

    #product-table thead {
        display: none;
    }

    #product-table,
    #product-table tbody,
    #product-table tbody.group-section {
        display: block;
        width: 100%;
    }

    #product-table tbody tr {
        display: block;
        background: #fff !important;
        border: 2px solid #cbd5e1;
        border-top: 3px solid #2fb5d2;
        border-radius: 12px;
        margin: 0 0 14px;
        padding: 14px;
        box-shadow: 0 3px 10px rgba(15, 23, 42, 0.1);
    }

    #product-table tbody tr:hover td {
        background-color: transparent;
    }

    /* group header = banner card */
    #product-table tbody tr.group-header {
        padding: 0;
        overflow: hidden;
        margin-bottom: 8px;
        border: none;
        box-shadow: none;
    }

    #product-table tbody tr.group-header td.group-title {
        display: block;
        border-radius: 10px;
        font-size: 13px;
    }

    #product-table tbody td {
        display: flex;
        align-items: center;
        justify-content: space-between;
        gap: 12px;
        padding: 9px 4px;
        border-bottom: 1px solid #e2e8f0;
        font-size: 14px;
        overflow: visible;
        width: auto !important;
        min-width: 0 !important;
        text-align: left;
    }

    #product-table tbody td:last-child {
        border-bottom: none;
    }

    /* label from data-label */
    #product-table tbody td[data-label]::before {
        content: attr(data-label);
        flex-shrink: 0;
        font-size: 11px;
        font-weight: 700;
        text-transform: uppercase;
        letter-spacing: 0.5px;
        color: #94a3b8;
    }

    /* image cell: big centered thumb, no label */
    #product-table td.product-image-cell {
        display: block;
        text-align: center;
        padding: 4px 0 12px;
    }

    #product-table td.product-image-cell .product-thumb {
        width: 84px;
        height: 84px;
    }

    /* name + format: wrap naturally, right aligned value */
    #product-table tbody td[data-label="Name"],
    #product-table tbody td[data-label="Nome"],
    #product-table tbody td[data-label="FORMAT"] {
        align-items: flex-start;
    }

    /* quantity: bigger input */
    .product-quantity {
        width: 90px;
        padding: 10px;
        font-size: 15px;
    }

    .quantity-error {
        position: static;
        white-space: normal;
    }

    td .quantity-container {
        display: flex;
        flex-direction: column;
        align-items: flex-end;
        gap: 4px;
    }

    /* search full width */
    .search-input-wrapper {
        max-width: 100%;
    }

    /* cart dock: stack nicely */
    #tableproduct-cart-buttons {
        bottom: 10px;
        left: 8px;
        right: 8px;
        transform: none;
    }

    .cart-buttons-container {
        width: 100%;
        gap: 8px;
        padding: 8px;
    }

    .action-btn {
        flex: 1;
        min-width: 0;
        padding: 12px 10px !important;
        font-size: 12px !important;
    }

    /* modal */
    .product-image-modal {
        padding-top: 70px;
    }

    .modal-content {
        max-width: 92%;
    }
}

@media (max-width: 400px) {
    .action-btn {
        font-size: 11px !important;
        padding: 12px 6px !important;
    }
}

/* ==========================================================================
   Reduced motion
   ========================================================================== */
@media (prefers-reduced-motion: reduce) {
    .product-thumb,
    .tab-pane,
    .modal-content,
    .action-btn,
    #product-table tbody tr.tp-row-reveal,
    .search-input-wrapper:focus-within {
        animation: none !important;
        transition: none !important;
    }
}

/* ==========================================================================
   Quantity stepper (- / +)
   ========================================================================== */
input.product-quantity::-webkit-outer-spin-button,
input.product-quantity::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}
input.product-quantity {
    -moz-appearance: textfield;
    appearance: textfield;
}

.qty-stepper {
    display: inline-flex;
    align-items: stretch;
    border: 2px solid #cbd5e1;
    border-radius: 12px;
    overflow: hidden;
    background: #fff;
    transition: border-color 0.2s, box-shadow 0.2s;
}

.qty-stepper:focus-within,
.qty-stepper:hover {
    border-color: #2fb5d2;
}

.qty-stepper:focus-within {
    box-shadow: 0 0 0 3px rgba(47, 181, 210, 0.18);
}

.qty-btn {
    width: 36px;
    min-height: 40px;
    border: none;
    background: #f1f5f9;
    color: #334155;
    font-size: 20px;
    font-weight: 700;
    line-height: 1;
    cursor: pointer;
    transition: background 0.15s, color 0.15s, transform 0.1s;
    user-select: none;
    -webkit-tap-highlight-color: transparent;
}

.qty-btn:hover {
    background: #2fb5d2;
    color: #fff;
}

.qty-btn:active {
    transform: scale(0.88);
}

.qty-stepper .product-quantity {
    width: 54px;
    min-width: 54px;
    border: none;
    border-radius: 0;
    background: #fff;
    padding: 9px 4px;
    font-size: 15px;
    font-weight: 700;
    color: #0f172a;
}

.qty-stepper .product-quantity:focus {
    box-shadow: none;
    border: none;
}

.qty-stepper .product-quantity:disabled {
    background: #f1f5f9;
}

.qty-stepper:has(.product-quantity:disabled) {
    opacity: 0.55;
}

/* ==========================================================================
   Selected row state
   ========================================================================== */
#product-table tbody tr.qty-selected td {
    background-color: #f0f9fc;
}

#product-table tbody tr.qty-selected {
    box-shadow: inset 4px 0 0 #2fb5d2;
    animation: rowPulse 0.45s ease;
}

@keyframes rowPulse {
    0% { box-shadow: inset 4px 0 0 #2fb5d2, 0 0 0 0 rgba(47, 181, 210, 0.4); }
    100% { box-shadow: inset 4px 0 0 #2fb5d2, 0 0 0 14px rgba(47, 181, 210, 0); }
}

/* ==========================================================================
   Dock badge + header cart bump
   ========================================================================== */
.tp-qty-badge {
    display: none;
    min-width: 24px;
    height: 24px;
    padding: 0 7px;
    margin-left: 8px;
    align-items: center;
    justify-content: center;
    background: #fff;
    color: #15803d;
    border-radius: 999px;
    font-size: 13px;
    font-weight: 800;
    line-height: 1;
}

.tp-qty-badge.tp-badge-pop {
    animation: badgePop 0.3s ease;
}

@keyframes badgePop {
    0% { transform: scale(0.6); }
    60% { transform: scale(1.25); }
    100% { transform: scale(1); }
}

.tp-cart-bump {
    animation: badgePop 0.5s ease;
    display: inline-block;
}

/* ==========================================================================
   Mobile card mode adjustments
   ========================================================================== */
@media (max-width: 992px) {
    #product-table tbody tr.qty-selected {
        border-color: #2fb5d2;
        box-shadow: 0 3px 12px rgba(47, 181, 210, 0.25);
    }

    .qty-btn {
        width: 46px;
        min-height: 48px;
        font-size: 22px;
    }

    .qty-stepper .product-quantity {
        width: 64px;
        font-size: 17px;
    }

    td .quantity-container {
        display: flex;
        flex-direction: column;
        align-items: flex-end;
        gap: 4px;
    }
}
