/* ============================================
   shopTableCommon.css
   Shared table / price / qty / buttons
   TVV palette: #1A312C | #2E7D32 | #f4f7f4 | #e8f5e9
   ============================================ */
body {
    margin: 0;
    padding: 0;
    font-family: 'Poppins', sans-serif;
    color: #1D1616;
    background-color: #f4f7f4;
}
header {
    position: sticky;
    top: 0;
    z-index: 9999;
}
.container {
    margin: 10px auto;
    padding: 12px;
    max-width: 1100px;
    background: #ffffff;
    border-radius: 12px;
    box-shadow: 0 2px 10px rgba(26, 49, 44, 0.08);
    border: 1px solid #eef2ee;
}
/* ----- Headings ----- */
.category-heading {
    font-size: 1.15rem;
    color: #1A312C;
    font-weight: 700;
    margin: 22px 0 12px;
    text-transform: capitalize;
    border-left: 4px solid #2E7D32;
    padding-left: 10px;
}
/* ----- Prices ----- */
.price-display {
    display: inline-flex;
    flex-direction: row;
    align-items: center;
    justify-content: center;
    flex-wrap: nowrap;
    white-space: nowrap;
    gap: 3px;
    font-size: 0.85rem;
    line-height: 1.2;
}
.price-strike {
    font-size: 0.8rem;
    text-decoration: line-through;
    color: #999;
    font-weight: 600;
    white-space: nowrap;
}
.price-sep {
    color: #bbb;
    font-weight: 400;
    margin: 0 1px;
}
.price-current {
    font-size: 0.95rem;
    font-weight: 800;
    color: #1A312C;
    white-space: nowrap;
}
/* ----- Generic button base (category etc.) ----- */
button {
    font-family: inherit;
    cursor: pointer;
    transition: background-color 0.25s ease, transform 0.2s ease, color 0.25s ease;
}
button:focus {
    outline: none;
    box-shadow: 0 0 0 3px rgba(46, 125, 50, 0.28);
}
button:active {
    transform: scale(0.97);
}
/* ----- Add / Buy buttons (both class names) ----- */
.add-to-cart-btn,
.add-to-cart {
    display: none;
    align-items: center;
    justify-content: center;
    margin: 0 auto;
    width: 36px;
    height: 36px;
    padding: 0;
    border: none;
    border-radius: 8px;
    background: #2E7D32;
    color: #fff;
    font-size: 0.9rem;
    box-shadow: 0 2px 6px rgba(46, 125, 50, 0.25);
}
.add-to-cart-btn:hover,
.add-to-cart:hover {
    background: #1A312C;
    transform: scale(1.04);
}
/* ----- Quantity control ----- */
.quantity-control {
    display: none;
    align-items: center;
    justify-content: center;
    margin: 0 auto;
    height: 32px;
    min-width: 78px;
    padding: 0;
    overflow: hidden;
    background: #ffffff;
    border: 1.5px solid #1A312C;
    border-radius: 7px;
    box-shadow: 0 1px 4px rgba(26, 49, 44, 0.08);
    vertical-align: middle;
    line-height: 1;
}
.quantity-control button {
    flex: 0 0 26px;
    width: 26px;
    min-width: 26px;
    height: 100%;
    margin: 0;
    padding: 0;
    border: none;
    border-radius: 0;
    background: linear-gradient(135deg, #1A312C, #2E7D32);
    color: #FFFFFF;
    font-size: 14px;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
}
.quantity-control button:hover {
    background: linear-gradient(135deg, #2E7D32, #1A312C);
    transform: none;
}
.quantity-control span,
.quantity-control span.quantity,
.quantity {
    flex: 1;
    min-width: 24px;
    height: 100%;
    margin: 0;
    padding: 0 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #f8faf8;
    color: #1A312C;
    font-size: 13px;
    font-weight: 700;
    text-align: center;
    line-height: 1;
}
/* ----- Table shell ----- */
.table-wrapper {
    width: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
    margin-bottom: 14px;
}
table,
.table {
    width: 100%;
    margin: 0;
    border-collapse: collapse;
    background: #fff;
}
.table th,
.table td {
    padding: 10px 6px;
    vertical-align: middle;
    text-align: center;
    font-weight: 600;
    font-size: 0.88rem;
    color: #1D1616;
    border-bottom: 1px solid #f0f4f0;
}
.table th {
    background: #f8faf8;
    text-transform: uppercase;
    letter-spacing: 0.4px;
    font-size: 0.72rem;
    font-weight: 700;
    color: #1A312C;
    border-bottom: 2px solid #e0e8e0;
    white-space: nowrap;
}
.table tbody tr:hover td {
    background: #f9fcf9;
}
.col-product {
    text-align: left !important;
}
.product-name {
    font-weight: 700;
    color: #1D1616;
    font-size: 0.9rem;
    line-height: 1.25;
}
.col-variant {
    color: #1A312C;
    font-weight: 600;
    font-size: 0.85rem;
}
.col-shop {
    vertical-align: middle;
}
td img {
    width: 48px;
    height: 48px;
    object-fit: cover;
    border-radius: 8px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.12);
    transition: transform 0.25s ease;
}
td img:hover {
    transform: scale(1.05);
}
/* ----- Stock / time ----- */
tr.out-of-stock {
    opacity: 0.72;
}
.out-of-stock-label {
    display: inline-block;
    background: #c62828;
    color: #fff;
    font-size: 0.68rem;
    font-weight: 800;
    letter-spacing: 0.3px;
    padding: 3px 7px;
    border-radius: 6px;
    text-decoration: line-through;
    text-decoration-thickness: 1.5px;
    white-space: nowrap;
    line-height: 1.2;
}
.countdown,
.restriction-message {
    display: none;
    margin: 2px auto 0;
    padding: 3px 6px;
    max-width: 110px;
    color: #b45309;
    font-size: 0.72rem;
    font-weight: 600;
    text-align: center;
    background: #fff7ed;
    border-radius: 5px;
    line-height: 1.2;
}
.hidden {
    display: none !important;
}
.col-stock {
    text-align: center;
    vertical-align: middle;
    min-width: 90px;
    width: 100px;
}
.stock-urgency {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    height: 28px;
    min-width: 72px;
    padding: 0 10px;
    font-size: 0.78rem;
    font-weight: 700;
    color: #FFFFFF !important;
    border-radius: 6px;
    white-space: nowrap;
    letter-spacing: 0.3px;
    margin: 0 auto;
}
/* ----- Shared mobile tightening ----- */
@media (max-width: 768px) {
    .container {
        margin: 6px auto;
        padding: 8px;
        border-radius: 10px;
    }
    .category-heading {
        font-size: 0.95rem;
        margin: 14px 0 8px;
    }
    .table th,
    .table td {
        padding: 6px 3px !important;
        font-size: 0.72rem !important;
    }
    .table th {
        font-size: 0.62rem !important;
        letter-spacing: 0;
    }
    .product-name {
        font-size: 0.75rem !important;
    }
    .col-variant {
        font-size: 0.7rem !important;
    }
    .price-display {
        font-size: 0.68rem !important;
        gap: 2px !important;
    }
    .price-strike {
        font-size: 0.65rem !important;
    }
    .price-current {
        font-size: 0.70rem !important;
    }
    .add-to-cart-btn,
    .add-to-cart {
        width: 28px !important;
        height: 28px !important;
        font-size: 0.72rem !important;
    }
    .quantity-control {
        height: 26px !important;
        min-width: 66px !important;
        border-radius: 5px !important;
    }
    .quantity-control button {
        width: 22px !important;
        min-width: 22px !important;
        flex: 0 0 22px !important;
        font-size: 12px !important;
    }
    .quantity-control span,
    .quantity-control span.quantity {
        min-width: 20px !important;
        font-size: 12px !important;
        padding: 0 2px !important;
    }
    td img {
        width: 40px;
        height: 40px;
    }
    .out-of-stock-label {
        font-size: 0.62rem;
        padding: 2px 5px;
        border-radius: 5px;
    }
}
@media (max-width: 380px) {
    .table th,
    .table td {
        padding: 3px 1px !important;
        font-size: 0.68rem !important;
    }
    .price-display {
        font-size: 0.64rem !important;
    }
    .add-to-cart-btn,
    .add-to-cart {
        width: 24px !important;
        height: 24px !important;
    }
    .quantity-control {
        height: 24px !important;
        min-width: 60px !important;
    }
    .quantity-control button {
        width: 20px !important;
        min-width: 20px !important;
        flex: 0 0 20px !important;
        font-size: 11px !important;
    }
    .quantity-control span,
    .quantity-control span.quantity {
        font-size: 11px !important;
    }
}
@media (min-width: 1025px) {
    .table th,
    .table td {
        font-size: 0.95rem;
        padding: 12px 10px;
    }
    .table th {
        font-size: 0.8rem;
    }
    .price-strike {
        font-size: 0.9rem;
    }
    .price-current {
        font-size: 1.05rem;
    }
    .add-to-cart-btn,
    .add-to-cart {
        width: 40px;
        height: 40px;
        font-size: 1rem;
    }
    .quantity-control {
        height: 40px;
        min-width: 100px;
    }
    .quantity-control button {
        width: 30px;
        min-width: 30px;
        flex: 0 0 30px;
        font-size: 16px;
    }
    .quantity-control span,
    .quantity-control span.quantity {
        font-size: 15px;
    }
    td img {
        width: 52px;
        height: 52px;
    }
    .category-heading {
        font-size: 1.25rem;
    }
}
/* Stock — tablet */
@media (min-width: 769px) and (max-width: 1024px) {
    .col-stock {
        min-width: 80px;
        width: 90px;
    }
    .stock-urgency {
        min-width: 64px;
        height: 26px;
        font-size: 0.72rem;
        padding: 0 6px;
    }
}
/* Stock — mobile */
@media (max-width: 768px) {
    .col-stock {
        min-width: 0;
        width: auto;
    }
    .stock-urgency {
        min-width: 0;
        max-width: 62px;
        width: 100%;
        height: 22px;
        font-size: 0.60rem;
        padding: 0 3px;
        letter-spacing: 0;
        border-radius: 5px;
    }
}
/* Stock — very small (360px) */
@media (max-width: 400px) {
    .stock-urgency {
        max-width: 56px;
        height: 20px;
        font-size: 0.55rem;
        padding: 0 2px;
        border-radius: 4px;
    }
}
/* Stock — large desktop */
@media (min-width: 1025px) {
    .col-stock {
        min-width: 100px;
        width: 110px;
    }
    .stock-urgency {
        min-width: 78px;
        height: 30px;
        font-size: 0.82rem;
    }
}