﻿@import url('https://fonts.googleapis.com/css2?family=Lato&display=swap');

body {
}

.pagefooter {
    background-color: black;
    color: white;
    padding-top: 20px;
    margin-top: 2rem;
}
    .pagefooter a {
        color: white;
        text-decoration: none;
    }
    .pagefooter a:hover {
        background-color: #a71c1c;
    }
.container-full-width {
    margin-bottom: 1rem;
}
.container-full-width > * {
    max-width: 1200px;
    margin-left: auto;
    margin-right: auto;
}
.mainheading {
    color: black;
    margin-top: 1rem;
}
.mainheading a {
    text-decoration: none;
    color: black;
}
    .mainheading a:hover {
        text-decoration: underline;
        color: blue;
    }

.mainnavbar {
    background-color: black;
    color: white;
    padding-top: 10px;
    padding-bottom: 10px;
}
    .mainnavbar a {
        text-decoration: none;
        color: white;
        padding: 3px 8px;
    }
        .mainnavbar a:hover {
            background-color: #a71c1c;
        }
        .mainnavbar a svg {
            fill: white;
        }
        .mainnavbar a:hover svg {
            background-color: #a71c1c;
        }
.smallheading {
    background-color: lavender;
    padding: 5px;
    text-transform: uppercase;
    font-size: x-small;
}

.altbackgrounds > div:nth-child(odd)  > div {
    background-color: #FFFFFFbf;
    color: black;
}
.altbackgrounds > div:nth-child(even) {
    background-color: #000000bf;
    color: white;
}
.altbackgrounds h1 {
    margin-top: 0;
}
.ScanDropBox {
    border: dashed 5px #333;
    display: flex;
    align-items: center;
    text-align: center;
    justify-content: center;
    padding: 15px 5px;
    margin: 5px;
}
.dragoverclass {
    background-color: #ed2908;
    color: blue;
}
.productlinksbox {
    display: flex;
    justify-content: space-evenly;
    flex-wrap: wrap;
    flex-direction: row;
}
    .productlinksbox a {
        border: solid 1px #333;
        padding: 13px 6px;
        flex-grow: 1;
        display: flex;
        justify-content: center;
    }
.supplierwebbuttonbox{
    display:flex;
}
    .supplierwebbuttonbox a {
        border: solid 1px #333;
        text-align: center;
        flex-grow: 1;
        padding: 6px 0;
    }

.statsline {
    display: grid;
    grid-template-columns: 1fr 8rem 5rem;
}
    .statsline > div {
        padding: 3px;
    }
    .statsline > div:nth-child(2), .statsline > div:nth-child(3) {
        text-align: right;
    }

.jsondata {
    font-size: 12px;
}

    .jsondata .key {
        font-weight: bold;
        color: deeppink;
    }

    .jsondata .string {
        font-weight: bold;
        color: rebeccapurple;
    }

    .jsondata .number {
        font-weight: bold;
        color: forestgreen;
    }

.subcategoriesbox a {
    text-decoration: none;
}
    .subcategoriesbox a:hover {
        text-decoration: underline;
    }
.sidebar > div {
    background-color: #EEE;
    color: #a71c1c;
    margin-bottom: 2px;
    display: grid;
    grid-template-columns: 1rem 1fr;
    padding-left: 3px;
}
.sidebar a {
    display: block;
    margin-bottom: 1px;
    color: black !important;
    padding: 3px;
    text-decoration:none;
}
    .sidebar a:hover {
        text-decoration: underline;
    }
.sidebar .selecteditem {
    background-color: #c5c5c5;
}
.productbox {
    display: grid;
    width: 210px;
    background-color: white;
    color: black;
    border-radius: 4px;
    border: solid 1px #999;
    padding: 4px;
    grid-template-rows: 3rem auto auto;
    align-items: center;
    text-decoration: none;
}
.productbox:hover {
    background-color: #ffc8c8;
}
    .productboxheading {
    font-family: Roboto, sans-serif;
    font-weight: bold
}
.productimage {
    margin: 0 auto;
    background-size: contain;
}
.productbottombox {
    display: grid;
    grid-template-columns: auto auto;
    align-items: center;
}
.departmentsnav {
    background-color: #CCCCCC99;
    color: blue;
    border-radius: 3px;
    padding: 6px;
    margin-bottom: 6px;
}
    .departmentsnav a {
        color: blue !important;
        text-decoration: none;
        padding: 6px;
    }
h1#productTitle {
    color: #ed2908;
    font-family: Lato;
}
.pageinformation {
    background-color: #EEE;
    padding: 3px;
    margin-bottom: 0.5rem;
    display: block;
}
    .pageinformation a {
        border: solid 1px #CCC;
        padding: 3px;
        display: inline-block;
    }
.home-page-listofitems ul {
    columns: 20rem;
}

.management-menu-bar {
    background-color: rebeccapurple;
    color: white;
    padding: 6px
}
.management-menu-bar a {
    background-color: rebeccapurple;
    color: white;
    padding: 6px;
    display: inline-block;
   }
.add-to-cart {
    display: block;
    padding: 6px;
    background-color: #a71c1c;
    color:white;
    border: 0;
    font-size: 1.1rem;
    font-weight: bold;
}
#cart-toast {
    position: fixed;
    left: 50%;
    top: 40%;
    transform: translate(-50%, -50%);
    padding: 1rem 1.5rem;
    background: rgba(0,0,0,0.85);
    color: #fff;
    border-radius: 8px;
    font-size: 1rem;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.25s ease;
    z-index: 99999;
    text-align: center;
    max-width: 80%;
}
/* Cart Container */
#cart-container {
    background: #fff;
    padding: 1rem;
    border-radius: 6px;
    box-shadow: 0 0 10px rgba(0,0,0,0.08);
}

/* Header Row */
.cart-header {
    display: grid;
    grid-template-columns: 96px 1fr 160px 120px 80px;
    font-weight: bold;
    padding: 0.5rem 0;
    border-bottom: 2px solid #ddd;
    color: #222;
    text-transform: uppercase;
    font-size: 0.85rem;
    text-align: center;
}
    .cart-header > div:first-child {
        grid-column: span 2;
    }
    /* Cart Row Layout */
    .cart-row {
    display: grid;
    grid-template-columns: 96px 1fr 160px 120px 80px;
    align-items: center;
    padding: 0.75rem 0;
    border-bottom: 1px solid #eee;
}
    .cart-row:last-child {
        border-bottom: none;
    }

    /* Image */
    .cart-row .item-image img {
        width: 90px;
        height: 90px;
        object-fit: contain;
        border-radius: 4px;
    }

    /* Product Name */
    .cart-row .item-name a {
        font-weight: bold;
        color: #222;
        text-decoration: none;
        font-size: larger;
    }

        .cart-row .item-name a:hover {
            color: #d40000;
        }
        .cart-row > div:nth-child(5) {
            text-align: center;
        }

        .per-unit {
            color: #444;
        }

/* Price + Subtotal */
.item-price,
.item-subtotal {
    font-weight: bold;
    color: #222;
    text-align:right;
}

/* Quantity Controls */
.item-qty {
    display: flex;
    align-items: center;
    justify-content: center;
}

.qty-minus, .qty-plus {
    background: #f7f7f7;
    border: 1px solid #ccc;
    font-size: 1.1rem;
    font-weight: bold;
    width: 32px;
    height: 32px;
    border-radius: 4px;
    cursor: pointer;
    color: #333;
    transition: 0.2s;
}

    .qty-minus:hover, .qty-plus:hover {
        background: #d40000;
        border-color: #d40000;
        color: white;
    }

/* Quantity Input */
.qty-input {
    width: 70px;
    margin: 0 4px;
    padding: 4px;
    text-align: right;
    border: 1px solid #bbb;
    border-radius: 4px;
    font-size: 1rem;
}

/* Remove Button */
.item-remove {
    background: none;
    border: none;
    cursor: pointer;
    font-size: 1.3rem;
    color: #888;
    transition: 0.2s;
    text-align:center;
}

    .item-remove::before {
        content: "❌"; /* Rubbish bin icon */
    }

    .item-remove:hover {
        color: #d40000;
    }

/* Summary Box */
.cart-summary {
    margin-top: 2rem;
    padding-top: 1rem;
    border-top: 2px solid #ddd;
    font-size: 1.1rem;
}

.summary-row {
    display: flex;
    justify-content: space-between;
    padding: 0.4rem 0;
}

.checkout-button {
    display: block;
    margin-top: 1rem;
    background: #d40000;
    color: white;
    padding: 0.8rem;
    text-align: center;
    font-size: 1.2rem;
    font-weight: bold;
    border-radius: 6px;
    text-decoration: none;
    transition: 0.2s;
}

    .checkout-button:hover {
        background: #b00000;
    }

/* Responsive */
@media (max-width: 768px) {
    .cart-header, .cart-row {
        grid-template-columns: 80px 1fr 160px 100px 80px;
        font-size: 0.9rem;
    }

    .qty-input {
        width: 55px;
    }
}
