/* ============================================
   styles/styleListView.css
   FINAL IMPROVED MODERN LAYOUT
   - Clean modern design (soft cards, better pills, premium quantity)
   - Full set of media queries for every screen size
   - Your color combination preserved
   ============================================ */

/* ---------- Base ---------- */
body {
    background-color: #f4f7f4;
    font-family: 'Poppins', system-ui, -apple-system, sans-serif;
    margin: 0;
    padding: 0;
    color: #1D1616;
    line-height: 1.45;
}

header {
    position: sticky;
    top: 0;
    z-index: 9999;
}

.container {
    max-width: 1100px;
    margin: 0 auto;
    padding: 10px 12px 100px;
}

/* ---------- Category Heading ---------- */
.category-heading {
    font-size: 1.25rem;
    font-weight: 700;
    color: #1A312C;
    margin: 22px 0 12px;
    display: flex;
    align-items: center;
    gap: 10px;
    text-transform: capitalize;
}

.category-heading::before {
    content: '';
    width: 4px;
    height: 20px;
    background: linear-gradient(180deg, #2E7D32, #1A312C);
    border-radius: 3px;
    flex-shrink: 0;
}

/* ---------- Price ---------- */
.price-strike {
    font-size: 0.85rem;
    text-decoration: line-through;
    color: #999;
    margin-right: 5px;
    font-weight: 500;
}

.price-current {
    font-size: 1.15rem;
    font-weight: 800;
    color: #1A312C;
}

.product-unit {
    font-size: 0.8rem;
    color: #666;
    font-weight: 500;
}

/* ---------- Buttons Base ---------- */
button {
    background-color: #2E7D32;
    color: #FFFFFF;
    border: none;
    border-radius: 10px;
    font-size: 0.95rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.25s ease;
    padding: 10px 16px;
    display: inline-flex;
    justify-content: center;
    align-items: center;
    gap: 6px;
}

button:hover {
    background-color: #1A312C;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(26, 49, 44, 0.25);
}

button:active {
    transform: translateY(0);
}

button:focus {
    outline: none;
}

/* ---------- Add to Cart Button ---------- */
.add-to-cart-btn {
    width: 42px;
    height: 42px;
    padding: 0;
    border-radius: 12px;
    background: #2E7D32;
    color: white;
    font-size: 1.1rem;
    box-shadow: 0 3px 10px rgba(46, 125, 50, 0.3);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: all 0.22s ease;
}

.add-to-cart-btn:hover {
    background: #1A312C;
    transform: translateY(-2px);
    box-shadow: 0 5px 14px rgba(26, 49, 44, 0.35);
}

/* ---------- Quantity Control (Modern) ---------- */
.quantity-control {
    display: flex;
    align-items: center;
    justify-content: center;
    background: #ffffff;
    border: 1.5px solid #1A312C;
    border-radius: 12px;
    overflow: hidden;
    height: 42px;
    width: 110px;
    box-shadow: 0 2px 8px rgba(26, 49, 44, 0.08);
    margin: 0 auto;
}

.quantity-control button {
    flex: 1;
    height: 100%;
    background: #1A312C;
    color: #fff;
    border: none;
    border-radius: 0;
    font-size: 1.15rem;
    font-weight: 600;
    padding: 0;
    transition: background 0.2s;
}

.quantity-control button:hover {
    background: #2E7D32;
    transform: none;
    box-shadow: none;
}

.quantity-control button:first-child {
    border-radius: 10px 0 0 10px;
}

.quantity-control button:last-child {
    border-radius: 0 10px 10px 0;
}

.quantity-control span {
    flex: 1.2;
    background: #f8faf8;
    color: #1A312C;
    text-align: center;
    font-size: 1rem;
    font-weight: 700;
    display: flex;
    justify-content: center;
    align-items: center;
    height: 100%;
}

.quantity {
    font-size: 1rem;
    font-weight: 700;
    color: #1A312C;
}

/* ---------- Table (Modern Card) ---------- */
.table-responsive {
    background: #ffffff;
    border-radius: 16px;
    padding: 0;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.06);
    overflow: hidden;
    border: 1px solid #eef2ee;
}

table {
    width: 100%;
    margin-bottom: 0;
    background: transparent;
    border-radius: 0;
    box-shadow: none;
    border-collapse: collapse;
}

.table th,
.table td {
    font-size: 0.92rem;
    color: #1D1616;
    padding: 14px 12px;
    border-bottom: 1px solid #f0f4f0;
    vertical-align: middle;
    font-weight: 500;
}

.table th {
    text-transform: uppercase;
    letter-spacing: 0.5px;
    font-weight: 700;
    font-size: 0.78rem;
    background: linear-gradient(180deg, #f8faf8, #f1f5f1);
    color: #1A312C;
    text-align: center;
    border-bottom: 2px solid #e0e8e0;
}

.table tbody tr {
    transition: background 0.2s ease;
}

.table tbody tr:hover {
    background-color: #f9fcf9;
}

.table tbody tr:last-child td {
    border-bottom: none;
}

.table td:last-child {
    text-align: center;
    width: 140px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 6px;
    min-height: 80px;
}

.table td:nth-child(2) {
    width: 42%;
    font-weight: 600;
    color: #1A312C;
}

/* Product Image */
td img {
    width: 56px;
    height: 56px;
    object-fit: cover;
    border-radius: 12px;
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.1);
    transition: transform 0.25s ease, box-shadow 0.25s ease;
    border: 2px solid #fff;
}

td img:hover {
    transform: scale(1.08);
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.15);
}

/* ---------- Category Buttons (Modern Pills) ---------- */
.category-buttons {
    display: flex;
    flex-wrap: nowrap;
    gap: 10px;
    margin: 8px 0 18px;
    padding: 6px 4px 12px;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    position: sticky;
    top: 60px;
    z-index: 100;
    background: linear-gradient(180deg, #f4f7f4 85%, transparent);
}

.category-buttons::-webkit-scrollbar {
    display: none;
}

.category-buttons button {
    flex-shrink: 0;
    border-radius: 50px;
    padding: 9px 18px;
    background-color: #ffffff;
    color: #1A312C;
    border: 1.5px solid #d0ddd0;
    font-weight: 600;
    font-size: 0.9rem;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.04);
    transition: all 0.25s ease;
}

.category-buttons button:hover {
    background-color: #e8f5e9;
    border-color: #2E7D32;
    color: #1A312C;
    transform: translateY(-1px);
    box-shadow: 0 4px 10px rgba(46, 125, 50, 0.15);
}

/* Active Category Button - Modern Gradient */
.category-buttons button.active,
.category-buttons button.active:hover {
    background: linear-gradient(135deg, #1A312C, #2E7D32) !important;
    color: #ffffff !important;
    border-color: transparent !important;
    box-shadow: 0 4px 14px rgba(26, 49, 44, 0.3) !important;
    transform: translateY(-1px);
}

/* ---------- Variant Select ---------- */
.variant-select {
    width: 100%;
    max-width: 180px;
    padding: 7px 10px;
    margin-top: 6px;
    border: 1.5px solid #d0ddd0;
    border-radius: 10px;
    font-size: 0.85rem;
    font-weight: 500;
    color: #1A312C;
    background: #f8faf8;
    cursor: pointer;
    transition: border-color 0.2s, box-shadow 0.2s;
}

.variant-select:focus {
    outline: none;
    border-color: #2E7D32;
    box-shadow: 0 0 0 3px rgba(46, 125, 50, 0.15);
}

/* ---------- Countdown ---------- */
.countdown {
    color: #b45309;
    font-weight: 700;
    font-size: 0.78rem;
    text-align: center;
    padding: 6px 10px;
    background: linear-gradient(135deg, #fff7ed, #ffedd5);
    border-radius: 8px;
    border: 1px solid #fed7aa;
    margin-top: 4px;
    white-space: nowrap;
}

/* ---------- Other ---------- */
.hidden {
    display: none !important;
}

.discount-text {
    font-size: 0.9rem;
    font-weight: 700;
    color: #b45309;
}

.remove-button {
    color: #dc2626;
    font-size: 1.3rem;
    cursor: pointer;
    transition: 0.2s;
}

.remove-button:hover {
    color: #991b1b;
    transform: scale(1.1);
}

/* ============================================
   FULL MEDIA QUERIES - All Screen Sizes
   ============================================ */

/* ---------- max-width: 600px ---------- */
@media (max-width: 600px) {
    .container {
        padding: 8px 8px 90px;
    }

    .category-heading {
        font-size: 1.15rem;
        margin: 20px 0 12px;
    }

    .add-to-cart-btn {
        width: 38px;
        height: 38px;
        font-size: 1rem;
        border-radius: 11px;
    }

    .quantity-control {
        width: 100px;
        height: 38px;
    }

    .quantity-control button {
        font-size: 1.05rem;
    }

    .quantity-control span {
        font-size: 0.95rem;
    }

    .table td:nth-child(2) {
        width: 48%;
    }

    .table td:last-child {
        width: 105px;
        min-height: 70px;
    }

    .table th,
    .table td {
        font-size: 0.82rem;
        padding: 11px 8px;
    }

    td img {
        width: 48px;
        height: 48px;
        border-radius: 10px;
    }

    .category-buttons {
        gap: 8px;
        top: 55px;
    }

    .category-buttons button {
        padding: 8px 14px;
        font-size: 0.82rem;
    }

    .variant-select {
        max-width: 150px;
        font-size: 0.8rem;
        padding: 6px 8px;
    }

    .price-current {
        font-size: 1.05rem;
    }

    .price-strike {
        font-size: 0.78rem;
    }
}

/* ---------- max-width: 360px ---------- */
@media (max-width: 360px) {
    td img {
        width: 40px;
        height: 40px;
        border-radius: 8px;
    }

    .table th,
    .table td {
        font-size: 0.72rem;
        padding: 9px 5px;
    }

    .category-heading {
        font-size: 0.98rem;
        margin: 16px 0 10px;
    }

    .add-to-cart-btn {
        width: 34px;
        height: 34px;
        font-size: 0.9rem;
        border-radius: 10px;
    }

    .quantity-control {
        width: 86px;
        height: 34px;
    }

    .quantity-control button {
        font-size: 0.95rem;
    }

    .quantity-control span {
        font-size: 0.85rem;
    }

    .price-strike {
        font-size: 0.68rem;
    }

    .price-current {
        font-size: 0.9rem;
    }

    .quantity {
        font-size: 0.85rem;
    }

    .category-buttons button {
        padding: 6px 11px;
        font-size: 0.74rem;
    }

    .category-buttons {
        gap: 6px;
        top: 52px;
    }

    .variant-select {
        font-size: 0.75rem;
        max-width: 130px;
        padding: 5px 7px;
    }

    .countdown {
        font-size: 0.68rem;
        padding: 4px 7px;
    }

    .table td:last-child {
        width: 95px;
        min-height: 65px;
    }
}

/* ---------- 361px - 414px ---------- */
@media (min-width: 361px) and (max-width: 414px) {
    td img {
        width: 44px;
        height: 44px;
        border-radius: 9px;
    }

    .table th,
    .table td {
        font-size: 0.78rem;
        padding: 10px 6px;
    }

    .category-heading {
        font-size: 1.05rem;
    }

    .add-to-cart-btn {
        width: 36px;
        height: 36px;
        font-size: 0.95rem;
    }

    .quantity-control {
        width: 92px;
        height: 36px;
    }

    .quantity-control button {
        font-size: 1rem;
    }

    .quantity-control span {
        font-size: 0.9rem;
    }

    .price-strike {
        font-size: 0.72rem;
    }

    .price-current {
        font-size: 0.98rem;
    }

    .quantity {
        font-size: 0.9rem;
    }

    .category-buttons button {
        padding: 7px 12px;
        font-size: 0.78rem;
    }

    .table td:last-child {
        width: 100px;
    }

    .variant-select {
        max-width: 140px;
        font-size: 0.78rem;
    }
}

/* ---------- 415px - 480px ---------- */
@media (min-width: 415px) and (max-width: 480px) {
    td img {
        width: 48px;
        height: 48px;
        border-radius: 10px;
    }

    .table th,
    .table td {
        font-size: 0.82rem;
        padding: 11px 7px;
    }

    .category-heading {
        font-size: 1.1rem;
    }

    .add-to-cart-btn {
        width: 38px;
        height: 38px;
        font-size: 1rem;
    }

    .quantity-control {
        width: 98px;
        height: 38px;
    }

    .quantity-control button {
        font-size: 1.05rem;
    }

    .quantity-control span {
        font-size: 0.95rem;
    }

    .price-strike {
        font-size: 0.78rem;
    }

    .price-current {
        font-size: 1.02rem;
    }

    .quantity {
        font-size: 0.95rem;
    }

    .category-buttons button {
        padding: 8px 13px;
        font-size: 0.8rem;
    }

    .table td:last-child {
        width: 105px;
    }

    .variant-select {
        max-width: 150px;
        font-size: 0.8rem;
    }
}

/* ---------- 481px - 600px ---------- */
@media (min-width: 481px) and (max-width: 600px) {
    td img {
        width: 50px;
        height: 50px;
    }

    .table th,
    .table td {
        font-size: 0.85rem;
        padding: 12px 8px;
    }

    .category-heading {
        font-size: 1.15rem;
    }

    .add-to-cart-btn {
        width: 40px;
        height: 40px;
    }

    .quantity-control {
        width: 104px;
        height: 40px;
    }

    .quantity-control button {
        font-size: 1.1rem;
    }

    .quantity-control span {
        font-size: 0.98rem;
    }

    .price-strike {
        font-size: 0.8rem;
    }

    .price-current {
        font-size: 1.08rem;
    }

    .category-buttons button {
        padding: 8px 15px;
        font-size: 0.84rem;
    }

    .table td:last-child {
        width: 115px;
    }
}

/* ---------- 601px - 768px ---------- */
@media (min-width: 601px) and (max-width: 768px) {
    .container {
        padding: 12px 14px 95px;
    }

    td img {
        width: 52px;
        height: 52px;
        border-radius: 11px;
    }

    .table th,
    .table td {
        font-size: 0.88rem;
        padding: 13px 10px;
    }

    .category-heading {
        font-size: 1.2rem;
    }

    .add-to-cart-btn {
        width: 42px;
        height: 42px;
    }

    .quantity-control {
        width: 108px;
        height: 42px;
    }

    .quantity-control button {
        font-size: 1.12rem;
    }

    .quantity-control span {
        font-size: 1rem;
    }

    .price-strike {
        font-size: 0.82rem;
    }

    .price-current {
        font-size: 1.12rem;
    }

    .category-buttons {
        top: 62px;
        gap: 9px;
    }

    .category-buttons button {
        padding: 9px 16px;
        font-size: 0.86rem;
    }

    .table td:last-child {
        width: 125px;
    }

    .variant-select {
        max-width: 165px;
    }
}

/* ---------- 769px - 1024px ---------- */
@media (min-width: 769px) and (max-width: 1024px) {
    .container {
        padding: 14px 16px 100px;
    }

    td img {
        width: 56px;
        height: 56px;
        border-radius: 12px;
    }

    .table th,
    .table td {
        font-size: 0.92rem;
        padding: 14px 12px;
    }

    .category-heading {
        font-size: 1.25rem;
    }

    .add-to-cart-btn {
        width: 44px;
        height: 44px;
        font-size: 1.1rem;
    }

    .quantity-control {
        width: 112px;
        height: 44px;
    }

    .quantity-control button {
        font-size: 1.15rem;
    }

    .quantity-control span {
        font-size: 1.02rem;
    }

    .price-strike {
        font-size: 0.85rem;
    }

    .price-current {
        font-size: 1.15rem;
    }

    .category-buttons {
        top: 68px;
        gap: 10px;
    }

    .category-buttons button {
        padding: 9px 18px;
        font-size: 0.9rem;
    }

    .table td:last-child {
        width: 135px;
    }

    .variant-select {
        max-width: 175px;
        font-size: 0.85rem;
    }
}

/* ---------- min-width: 1025px ---------- */
@media (min-width: 1025px) {
    .container {
        padding: 16px 20px 110px;
    }

    td img {
        width: 60px;
        height: 60px;
        border-radius: 14px;
    }

    .table th,
    .table td {
        font-size: 0.95rem;
        padding: 15px 14px;
    }

    .category-heading {
        font-size: 1.3rem;
        margin: 26px 0 14px;
    }

    .add-to-cart-btn {
        width: 46px;
        height: 46px;
        font-size: 1.15rem;
        border-radius: 13px;
    }

    .quantity-control {
        width: 118px;
        height: 46px;
    }

    .quantity-control button {
        font-size: 1.2rem;
    }

    .quantity-control span {
        font-size: 1.05rem;
    }

    .price-strike {
        font-size: 0.88rem;
    }

    .price-current {
        font-size: 1.2rem;
    }

    .category-buttons {
        top: 72px;
        gap: 12px;
    }

    .category-buttons button {
        padding: 10px 20px;
        font-size: 0.92rem;
    }

    .table td:last-child {
        width: 145px;
        min-height: 85px;
    }

    .variant-select {
        max-width: 185px;
        font-size: 0.88rem;
        padding: 8px 11px;
    }

    .countdown {
        font-size: 0.8rem;
        padding: 6px 11px;
    }
}