body{
    background: #f0f2f5;
}

h1:focus {
    outline: none;
}

.valid.modified:not([type=checkbox]) {
    outline: 1px solid #26b050;
}

.invalid {
    outline: 1px solid #e50000;
}

.validation-message {
    color: #e50000;
}

.blazor-error-boundary {
    background: url(data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iNTYiIGhlaWdodD0iNDkiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIgeG1sbnM6eGxpbms9Imh0dHA6Ly93d3cudzMub3JnLzE5OTkveGxpbmsiIG92ZXJmbG93PSJoaWRkZW4iPjxkZWZzPjxjbGlwUGF0aCBpZD0iY2xpcDAiPjxyZWN0IHg9IjIzNSIgeT0iNTEiIHdpZHRoPSI1NiIgaGVpZ2h0PSI0OSIvPjwvY2xpcFBhdGg+PC9kZWZzPjxnIGNsaXAtcGF0aD0idXJsKCNjbGlwMCkiIHRyYW5zZm9ybT0idHJhbnNsYXRlKC0yMzUgLTUxKSI+PHBhdGggZD0iTTI2My41MDYgNTFDMjY0LjcxNyA1MSAyNjUuODEzIDUxLjQ4MzcgMjY2LjYwNiA1Mi4yNjU4TDI2Ny4wNTIgNTIuNzk4NyAyNjcuNTM5IDUzLjYyODMgMjkwLjE4NSA5Mi4xODMxIDI5MC41NDUgOTIuNzk1IDI5MC42NTYgOTIuOTk2QzI5MC44NzcgOTMuNTEzIDI5MSA5NC4wODE1IDI5MSA5NC42NzgyIDI5MSA5Ny4wNjUxIDI4OS4wMzggOTkgMjg2LjYxNyA5OUwyNDAuMzgzIDk5QzIzNy45NjMgOTkgMjM2IDk3LjA2NTEgMjM2IDk0LjY3ODIgMjM2IDk0LjM3OTkgMjM2LjAzMSA5NC4wODg2IDIzNi4wODkgOTMuODA3MkwyMzYuMzM4IDkzLjAxNjIgMjM2Ljg1OCA5Mi4xMzE0IDI1OS40NzMgNTMuNjI5NCAyNTkuOTYxIDUyLjc5ODUgMjYwLjQwNyA1Mi4yNjU4QzI2MS4yIDUxLjQ4MzcgMjYyLjI5NiA1MSAyNjMuNTA2IDUxWk0yNjMuNTg2IDY2LjAxODNDMjYwLjczNyA2Ni4wMTgzIDI1OS4zMTMgNjcuMTI0NSAyNTkuMzEzIDY5LjMzNyAyNTkuMzEzIDY5LjYxMDIgMjU5LjMzMiA2OS44NjA4IDI1OS4zNzEgNzAuMDg4N0wyNjEuNzk1IDg0LjAxNjEgMjY1LjM4IDg0LjAxNjEgMjY3LjgyMSA2OS43NDc1QzI2Ny44NiA2OS43MzA5IDI2Ny44NzkgNjkuNTg3NyAyNjcuODc5IDY5LjMxNzkgMjY3Ljg3OSA2Ny4xMTgyIDI2Ni40NDggNjYuMDE4MyAyNjMuNTg2IDY2LjAxODNaTTI2My41NzYgODYuMDU0N0MyNjEuMDQ5IDg2LjA1NDcgMjU5Ljc4NiA4Ny4zMDA1IDI1OS43ODYgODkuNzkyMSAyNTkuNzg2IDkyLjI4MzcgMjYxLjA0OSA5My41Mjk1IDI2My41NzYgOTMuNTI5NSAyNjYuMTE2IDkzLjUyOTUgMjY3LjM4NyA5Mi4yODM3IDI2Ny4zODcgODkuNzkyMSAyNjcuMzg3IDg3LjMwMDUgMjY2LjExNiA4Ni4wNTQ3IDI2My41NzYgODYuMDU0N1oiIGZpbGw9IiNGRkU1MDAiIGZpbGwtcnVsZT0iZXZlbm9kZCIvPjwvZz48L3N2Zz4=) no-repeat 1rem/1.8rem, #b32121;
    padding: 1rem 1rem 1rem 3.7rem;
    color: white;
}

.blazor-error-boundary::after {
    content: "An error has occurred."
}

.darker-border-checkbox.form-check-input {
    border-color: #929292;
}

.form-floating > .form-control-plaintext::placeholder, .form-floating > .form-control::placeholder {
    color: var(--bs-secondary-color);
    text-align: end;
}

.form-floating > .form-control-plaintext:focus::placeholder, .form-floating > .form-control:focus::placeholder {
    text-align: start;
}


@media (max-width: 600px) {
    .hide-on-small {
        display: none !important;
    }
}

/* Hide shipping banner on medium and small screens */
@media (max-width: 900px) {
    .shipping-banner-item {
        display: none !important;
    }
}

.cart-div{
    margin-top: 20px;
    margin-right: 30px;
    margin-left: 30px;
    /*width:300px;*/
}

.search {
    margin-top:20px;
    margin-right:10px;
    margin-left:10px;
    width: 40vw;
    max-width: 800px;
    min-width: 250px;
}

.search-centered {
    flex: 1 1 auto;  /* Takes up available space in the middle */
    display: flex;
    justify-content: center;
    align-items: center;
}

.carousel{
    margin-top: 20px;
    margin-bottom: 20px;

}

.card-grid {
    margin-left:auto;
    margin-right: auto;
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 16px;
    flex: 1;
    max-width: calc(9 * 150px + 6 * 16px);
}

.product-grid {
    padding-top: 80px;
    margin-left: auto;
    margin-right: auto;
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    justify-content: center; /* <-- Aligns all rows to the left */
    max-width: 1720px; /* Optional: 7 items × (width + gap) */
}

.subcategory-card-grid {
    margin-left: 20px;
    margin-right: 20px;
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 16px;
    flex: 1;
    max-height: 680px;
    overflow-y: auto;
}

.category-card {
    display: flex;
    align-items: center;
    gap: 1rem;
    background: white;
    color: #111;
    border: 2px solid #80808075;
    border-radius: 8px;
    margin-right: 10px;
    /*padding: 1rem;*/
    /*margin: 0.5rem;*/
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
    cursor: pointer;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    height: 120px;
}

.category-card:hover {
    background: #d2d2d230;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.3);
    transform: translateY(-2px);
}

.card-icon {
    height: 106px;
    margin-left: 10px;
}

.card-content {
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.catIcon{
    margin-right: 20px;
    margin-top: -6px;
}

.breadcrumb-nav {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    font-size: 0.9rem;
    margin-bottom: 0rem;
    gap: 0.25rem;
}

.breadcrumb-segment {
    display: flex;
    align-items: center;
}

.breadcrumb-segment a {
    text-decoration: none;
    color: #007bff;
    cursor: pointer;
    transition: color 0.2s ease;
}

.breadcrumb-segment a:hover {
    color: #0056b3;
    text-decoration: underline;
}

.breadcrumb-separator {
    margin: 0 0.25rem;
    color: #6c757d;
    font-size: 1rem;
}

.product-card {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    background: #ffffff;
    border-radius: 2px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.15);
    padding: 1rem;
    min-height: 250px;
    margin: 1rem;
    transition: box-shadow 0.2s ease, transform 0.2s ease;
    width: calc(20% - 1rem); /* 5 per row */
    min-width: 240px;
    max-width: 240px;
    flex-grow: 1;
}

.product-card:hover {
    box-shadow: 0 6px 16px rgba(0,0,0,0.2);
    transform: translateY(-4px);
}

.product-header {
    font-size: 0.8rem;
    font-weight: 400;
    margin-bottom: 0.3rem;
    color: #3787C7;
}

.product-body p {
    font-size: 0.9rem;
    color: #555;
    flex-grow: 1;
}

.product-footer {
    position: relative;
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: auto;
}

.product-image-wrapper {
    position: relative;
    display: inline-block;
    width: 100%;
}

.low-stock-banner {
    position: absolute;
    bottom: 5px;
    left: 0;
    width: 100%;
    background-color: #ffc107;
    color: #000;
    text-align: center;
    /*font-weight: bold;*/
    font-size: 12px;
    padding: 0.3rem 0;
    border-bottom-left-radius: 0.5rem;
    border-bottom-right-radius: 0.5rem;
    box-shadow: 0 -1px 3px rgba(0, 0, 0, 0.15);
}

.price {
    font-size: 1rem;
    font-weight: bold;
    color: #0070c9;
}

.add-to-cart {
    background-color: #0070c9;
    color: white;
    border: none;
    padding: 0.5rem 1rem;
    border-radius: 6px;
    cursor: pointer;
    transition: background-color 0.2s ease;
}

.add-to-cart:hover {
    background-color: #005fa3;
}

.product-image {
    width: 100%;
    height: 140px;
    object-fit: contain;
    margin-bottom: 0.5rem;
}

.catBanner {
    position: fixed;
    top: 60px;
    background: linear-gradient(to right, #0070c9, #005fa3);
    color: white;
    padding: 1rem 1.5rem;
    margin: 1rem 0 1.5rem 0;
    border-radius: 2px;
    font-size: 1.5rem;
    font-weight: 600;
    text-align: left;
    box-shadow: 0 2px 6px rgba(0,0,0,0.1);
    width: 100%;
    box-sizing: border-box;
    z-index: 999;
}

.catBanner-content {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.catBanner-title {
    flex: 1;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.catBanner-search {
    max-width: 300px;
}

.menu-fixed {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    background-color: white; /* Or your theme background */
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.body-content {
    padding-top: 70px; /* Adjust based on menu height */
    padding-bottom: 70px;
}

.cart-view {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    border: none;
    background: none;
    color: inherit;
    cursor: pointer;
    padding: 0;
    font: inherit;
    text-decoration: none;
    position: relative;
}

.cart-icon {
    width: 24px;
    height: 24px;
}

.cart-label {
    font-size: 1rem;
}

.cart-badge {
    background-color: #ff3b3b;
    color: white;
    font-size: 0.75rem;
    padding: 2px 6px;
    border-radius: 999px;
    margin-left: 4px;
}

.footer-fixed {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: white;
    color: black;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    padding: 12px 24px;
    z-index: 1000;
    box-shadow: 0 -2px 6px rgba(0, 0, 0, 0.2);
}

.footer-content {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
    text-align: center;
}

.footer-left {
    font-size: 0.85rem;
    white-space: nowrap;
}

.footer-phone {
    color: black;
    font-size: 1.2rem;
    font-weight: normal;
    flex-grow: 1;
    text-align: center;
}

.footer-address-link,
.footer-address:visited{
    display: flex;
    color: black;
    text-decoration: none;
}

.footer-pages {
    display: flex;
    align-items: center;
    gap: .5rem;
    flex-wrap: wrap;
    justify-content: center;
    padding: 0 .75rem;
}

.footer-page-link {
    text-decoration: none;
    font-weight: 600;
    opacity: .9;
    white-space: nowrap;
    color: #007bff;
}

.footer-page-link:hover {
    text-decoration: underline;
    opacity: 1;
}

.footer-page-sep {
    opacity: .5;
    user-select: none;
}

.phone-link,
.phone-link:visited {
    color: black;
    text-decoration: none;
}

.phone-link:hover {
    font-weight: bold;
    text-decoration: none;
}

.footer-address-wrapper {
    display: flex;
    align-items: center;
    gap: 10px;
    text-align: right;
    white-space: nowrap;
}

.footer-address {
    font-size: 0.95rem;
    line-height: 1.4;
}

.footer-icon {
    margin-left:10px;
    margin-top:5px;
    width: 35px;
    height: 35px;
    opacity: 0.8;
}

.shipbnr{
    height:60px;
    margin-right:30px;
    margin-top:5px;
}

.gateway-link,
.gateway-link:visited{
    color: black;
    text-decoration: none;
}

.gateway-link:hover {
    font-weight: bold;
    text-decoration: none;
}

.loading-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;

    position: fixed;
    top: 60px; /* if you have a fixed menu, adjust accordingly */
    left: 0;
    right: 0;
    bottom: 0;

    z-index: 999;
    background: #fff; /* optional: match your background */
    text-align: center;
    color: #444;
}


.spinner {
    width: 48px;
    height: 48px;
    border: 5px solid #ccc;
    border-top-color: #0078d4; /* or your accent color */
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
    margin-bottom: 12px;
}

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

.loading-text {
    font-size: 1.2rem;
    font-weight: 500;
    opacity: 0.8;
}

.right-panel {
    position: fixed;
    top: 74px; /* below main menu */
    right: -510px; /* hidden by default */
    width: 500px;
    height: calc(100% - 142px);
    background: white;
    border-left: 1px solid #ccc;
    box-shadow: -2px 0 8px rgba(0, 0, 0, 0.1);
    transition: right 0.3s ease;
    z-index: 1050;
    display: flex;
    flex-direction: column;
}

.right-panel.visible {
    right: 0;
}

.right-panel-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px;
    background: #f4f4f4;
    border-bottom: 1px solid #ddd;
    font-weight: bold;
}

.close-btn {
    background: none;
    border: none;
    font-size: 1.4rem;
    cursor: pointer;
}

.right-panel-content {
    padding: 1rem;
    overflow-y: auto;
    flex: 1;
}

.paymentButton{
    background: #0056b3;
    margin-top: 20px;
    margin-bottom: 10px;
}

.flag-corner{
    position:absolute; top:0; right:0;
    padding:6px 10px 8px 12px;
    font:700 11px/1 ui-sans-serif,system-ui,-apple-system,Segoe UI,Roboto;
    text-transform:uppercase; letter-spacing:.06em;
    background:#ffbf00; color:#1b1400;
    border-bottom-left-radius:8px;
    box-shadow:0 6px 16px rgba(0,0,0,.12);
}
.flag-corner::after{ /* little fold */
    content:""; position:absolute; right:0; top:100%;
    border-width:6px; border-style:solid;
    border-color:#c69500 transparent transparent #c69500;
}
.flag-warning{ background:#ffbf00; color:#1b1400; }
.flag-danger { background:#ff4d4d; color:#fff;      }
.flag-info   { background:#3a6df0; color:#fff;      }

.cart-panel {
    display: flex;
    flex-direction: column;
    height: 100%;
    padding: 0.5rem;
    background-color: white;
    overflow-y: auto;
    justify-content: space-between;
}

.cart-header {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    font-size: 1.2rem;
    font-weight: 500;
    margin-top: 2rem;
    color: #333;
}

.cart-panel-icon {
    width: 24px;
    height: 24px;
}

.cart-empty-text {
    font-size: 1.1rem;
}

.cart-back {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 10px;
    margin-bottom: 20px;
    text-align: left;
}

.back-button {
    background: none;
    border: none;
    color: #0028a5;
    font-weight: 600;
    font-size: 1rem;
    cursor: pointer;
}

.cart-footer {
    border-top: 1px solid #ccc;
    /*padding-top: 1rem;*/
}

.cart-summary {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 1rem;
}

.cart-item-count {
    font-weight: bold;
}

.cart-sub-label {
    font-weight: 700;
    font-size: 1.2rem;
}

.cart-sub-note {
    font-size: 0.8rem;
    color: #666;
}

.cart-total-amount {
    font-weight: bold;
    font-size: 1.4rem;
    color: #0028a5;
}

.checkout-button {
    width: 100%;
    background-color: #007a00;
    color: white;
    border: none;
    padding: 1rem;
    font-size: 1rem;
    font-weight: bold;
    border-radius: 100px;
    cursor: pointer;
}

.checkout-button:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.cart-body-spacer {
    flex-grow: 1;
}

.cart-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    border-bottom: 1px solid #ddd;
    padding: 1rem 0;
    flex-wrap: wrap;
    gap: 1rem;
}

.cart-item-image {
    width: 80px;
    height: auto;
    object-fit: contain;
}

.cart-item-details {
    flex: 1;
    min-width: 160px;
    /*font-size: 0.95rem;*/
}

.cart-item-price {
    font-weight: bold;
    color: #111;
    /*font-size: 1.1rem;*/
    white-space: nowrap;
}

.cart-remove img {
    width: 20px;
    height: 20px;
    cursor: pointer;
}

.cart-qty-controls {
    display: flex;
    align-items: center;
    gap: 8px;
    border: 2px solid #0028a5;
    padding: 2px 6px;
    border-radius: 999px;
    font-weight: 400;
}

.cart-qty-controls button {
    background: none;
    border: none;
    font-size: 1.2rem;
    color: #0028a5;
    cursor: pointer;
}

.cart-content-scrollable {
    flex: 1;
    overflow-y: auto;
    /*padding: 1.5rem;*/
}

.clear-cart-button {
    background-color: #f44336;
    color: white;
    border: none;
    padding: 8px 16px;
    border-radius: 8px;
    cursor: pointer;
}
.clear-cart-button:hover {
    background-color: #d32f2f;
}



.address-rotator {
    display: inline-block;
    transform-style: preserve-3d;
    transform-origin: 50% 50%;
    transition: transform 260ms cubic-bezier(.2,.8,.2,1), opacity 260ms cubic-bezier(.2,.8,.2,1);
    will-change: transform, opacity;
}

.address-rotator.rotate-out {
    transform: rotateY(90deg);
    opacity: 0;
}

.address-rotator.rotate-in {
    transform: rotateY(0deg);
    opacity: 1;
}

/* Respect reduced motion */
@media (prefers-reduced-motion: reduce) {
    .address-rotator {
        transition: none;
    }
}

/* ===== Branch Strip ===== */

.footer-branches {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0;
    font-weight: 600;
    letter-spacing: 0.5px;
    margin-right: 60px;
}

.footer-branch-sep {
    opacity: 0.5;
    margin: 0 8px;
}

.footer-branch {
    position: relative;
    cursor: pointer;
    padding: 4px 6px;
    transition: color 0.2s ease, transform 0.2s ease;
}

.footer-branch-name {
    transition: color 0.2s ease;
}

.footer-branch:hover .footer-branch-name {
    color: #00c8ff; /* adjust to brand colour */
}

.footer-branch:hover {
    transform: translateY(-1px);
}

/* Popup background – match main banner */
.footer-branch-pop {
    background: linear-gradient(90deg, #7f2b2b 0%, #8e3333 100%);
    color: #fff;
    border-radius: 16px;
}

/* Force ALL popup links white */
.footer-branch-pop a,
.footer-branch-pop a:visited,
.footer-branch-pop a:hover {
    color: #fff !important;
    text-decoration: none;
}

/* Centre map link */
.footer-branch-pop-map {
    margin-top: 14px;
    text-align: center;
}

/* Map link layout */
.footer-pop-map-link {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-weight: 600;
}

/* Icon sizing */
.footer-pop-map-icon {
    width: 18px;
    height: 18px;
    filter: brightness(0) invert(1); /* forces white */
}

/* Phone styling (optional consistency) */
.footer-branch-pop-phone {
    margin-top: 10px;
    font-weight: 600;
}

/* ===== Popup Panel (hidden by default) ===== */

.footer-branch-pop {
    position: absolute;
    bottom: 140%;
    left: 50%;
    transform: translateX(-50%) translateY(6px);

    min-width: 260px;
    max-width: 340px;

    background: #1b1f24;
    color: #fff;
    border-radius: 8px;
    padding: 14px 16px;

    box-shadow: 0 12px 28px rgba(0,0,0,0.35);

    opacity: 0;
    visibility: hidden;
    pointer-events: none;

    transition:
            opacity 0.2s ease,
            transform 0.2s ease,
            visibility 0.2s ease;

    z-index: 9999;
}

/* show on hover */
.footer-branch:hover .footer-branch-pop {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
    transform: translateX(-50%) translateY(0);
}

/* show on keyboard focus / touch active */
.footer-branch:focus .footer-branch-pop,
.footer-branch:active .footer-branch-pop {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
    transform: translateX(-50%) translateY(0);
}

/* Popup content styling */
.footer-branch-pop-title {
    margin-bottom: 6px;
    font-size: 0.95rem;
}

.footer-branch-pop-body {
    font-size: 0.85rem;
    line-height: 1.4;
    opacity: 0.92;
}

.footer-branch-pop-phone,
.footer-branch-pop-map {
    margin-top: 8px;
}

.footer-branch-pop a {
    color: #00c8ff; /* tweak to brand */
    text-decoration: none;
    font-weight: 600;
}

.footer-branch-pop a:hover {
    text-decoration: underline;
}

/* Little pointer triangle */
.footer-branch-pop::after {
    content: "";
    position: absolute;
    bottom: -8px;
    left: 50%;
    transform: translateX(-50%);
    border-width: 8px 8px 0 8px;
    border-style: solid;
    border-color: #1b1f24 transparent transparent transparent;
}

/* Keep the branch strip from wrapping into chaos on narrow widths */
.footer-branches {
    flex-wrap: wrap;
    row-gap: 6px;
}