/* ============================================
   shopTableCommon.css
   Shared table / price / qty / buttons
   Warm palette: #643805 | #E67E22 | #c75b12 | #fffef5
   ============================================ */

body {
    margin: 0;
    padding: 0;
    font-family: 'Poppins', sans-serif;
    color: #1D1616;
    background-color: #f8f5f0;
}

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(100, 56, 5, 0.08);
    border: 1px solid #f0e6d8;
}

/* ----- Headings ----- */
.category-heading {
    font-size: 1.15rem;
    color: #E67E22;
    font-weight: 700;
    margin: 22px 0 12px;
    text-transform: capitalize;
    border-left: 4px solid #E67E22;
    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: #8B0000;
    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: #0D3E10;
    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(230, 126, 34, 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: #c75b12;
    color: #fff;
    font-size: 0.9rem;
    box-shadow: 0 2px 6px rgba(199, 91, 18, 0.25);
}

.add-to-cart-btn:hover,
.add-to-cart:hover {
    background: #b71c1c;
    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: #fffef5;
    border: 1.5px solid #654321;
    border-radius: 7px;
    box-shadow: 0 1px 4px rgba(101, 67, 33, 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, #654321, #8b5a2b);
    color: #fffef5;
    font-size: 14px;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
}

.quantity-control button:hover {
    background: linear-gradient(135deg, #4a2f15, #654321);
    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: #fffef5;
    color: #654321;
    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 #f0f0f0;
}

.table th {
    background: #F8F9FA;
    text-transform: uppercase;
    letter-spacing: 0.4px;
    font-size: 0.72rem;
    font-weight: 700;
    color: #643805;
    border-bottom: 2px solid #e8e0d5;
    white-space: nowrap;
}

.table tbody tr:hover td {
    background: #fffef5;
}

.col-product {
    text-align: left !important;
}

.product-name {
    font-weight: 700;
    color: #1d1616;
    font-size: 0.9rem;
    line-height: 1.25;
}

.col-variant {
    color: #643805;
    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: #D4A017;
    font-size: 0.72rem;
    font-weight: 600;
    text-align: center;
    background: #fff8e1;
    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;
    }
}