/* Braai-o-sourus — shared first, breakpoints only override what changes */

:root {
    --bg: #000;
    --fg: #fff;
    --muted: #d6ddd6;
    --muted-2: #a9b3ab;
    --green: #aaff64;
    --green-hover: #c0f496;
    --header-bg: #333;
    --sidebar-bg: #111;
    --surface: #1a1d1b;
    --surface-2: #232825;
    --line: #2f3532;
    --field-border: #5a655d;
    --danger: #ff8b8b;
    --font: Roboto, "Source Sans 3", Arial, Helvetica, sans-serif;
    --font-display: "Barlow Semi Condensed", Roboto, "Source Sans 3", sans-serif;
    --step: 16px;
    --header-pad-x: 20px;
    --header-img: 70px;
    --soc: 40px;
    --menu: 40px;
    --arrow: 30px;
    --sidebar-pad: 8px 8px 8px 32px;
    --page-width: 768px;
    --img-cen: 400px;
    --thumb: 450px;
    --thumb-stk: 360px;
    --story-title: 480px;
    --story-blurb: 520px;
    --blurb-table: 560px;
    --blurb-title: 650px;
    --story-vid: 360px;
    --promo: 250px;
    --promo-sm: 150px;
    --promo-xs: 115px;
    --stock: 300px;
    --pay-method: 25px;
    --pay-proc: 90px;
    --table-gap: 5px;
    --link-gap: 6px;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    font-size: var(--step);
}

body {
    margin: 0;
    padding: 0;
    background-color: var(--bg);
    color: var(--fg);
    font-family: var(--font);
    font-size: 1rem;
    line-height: 1.5;
}

h1,
h2,
h3 {
    font-family: var(--font);
    text-align: center;
}

p { text-align: justify; }
p.cen { text-align: center; }
p.normal { font-size: 0.95rem; }

a { color: var(--green); }

p a,
.intext_green {
    text-decoration: none;
    color: var(--green);
    font-weight: bold;
    position: relative;
    border-bottom: 4px solid transparent;
    transition: color 0.2s ease, border-bottom-color 0.3s ease-in-out;
}

p a:hover,
.intext_green:hover {
    color: var(--green-hover);
    border-bottom-color: var(--green-hover);
}

/* Text greens. Do not also add a filter class. */
.bosgreen,
.simplegreen { color: var(--green); }
.bosgreen:hover { color: var(--green-hover); }
.greenbackround,
.green-background { background-color: var(--green); }

.small { font-size: 0.8rem; }
.editor { font-size: 0.85rem; }
.story,
.list_blurb,
.story_preview { font-size: 0.95rem; }
.story_title {
    font-size: 1.35rem;
    font-weight: bold;
    text-align: left;
    width: min(var(--story-title), 100%);
}
.story_blurb {
    font-size: 0.9rem;
    font-style: italic;
    width: min(var(--story-blurb), 100%);
}
.blurb_table { width: min(var(--blurb-table), 100%); margin: 0 auto; }
.blurb_title { width: min(var(--blurb-title), 100%); margin: 0 auto; }
.story_vid { width: min(var(--story-vid), 100%); height: auto; }
.story_space { margin: 2px 10px; }
.promo_text {
    color: #ff7754;
    text-align: center;
    font-size: 0.8rem;
}

/* Icon recolor only. Source must be black. Never nest these. */
.linkgreen,
.filter-green,
.greenonly {
    color: #000;
    text-decoration: none;
    filter: invert(99%) sepia(63%) saturate(1387%) hue-rotate(31deg) brightness(100%) contrast(101%);
}

.linkgreen:hover,
.filter-green:hover {
    filter: invert(87%) sepia(29%) saturate(528%) hue-rotate(40deg) brightness(103%) contrast(91%);
    background-color: #efefef;
}

.linkbright {
    color: #000;
    text-decoration: none;
    filter: invert(85%) sepia(96%) saturate(746%) hue-rotate(3deg) brightness(105%) contrast(107%);
}

.linkbright:hover {
    filter: invert(78%) sepia(98%) saturate(1045%) hue-rotate(358deg) brightness(112%) contrast(98%);
    background-color: #efefef;
}

.linkgreen-line {
    margin: 0 var(--link-gap);
    padding: 8px 0;
    color: var(--green);
    text-decoration: none;
    background-image: linear-gradient(var(--green-hover), var(--green-hover));
    background-position: 0 100%;
    background-size: 0% 4px;
    background-repeat: no-repeat;
    transition: background-size 0.3s ease-in-out, color 0.2s ease;
}

.linkgreen-line:hover {
    background-size: 100% 4px;
    color: var(--green-hover);
}

ul { list-style: none; padding: 0; }
li { margin: 10px 0; }

.tree ul,
.tree li { list-style: none; padding: 0; }
.tree li { position: relative; }
.tree .nested { display: none; }
.tree .nested.show { display: block; }

hr.nav {
    height: 3px;
    width: min(768px, 100%);
    max-width: 100%;
    background-color: var(--green);
    border: none;
}

.max_width {
    width: 100%;
    max-width: 100%;
    max-height: 100vh;
    margin: 0 auto;
}

.min table { border-collapse: collapse; }
.min td,
.min th,
.min tr {
    padding: 0;
    border: none;
}

table { border-collapse: separate; border-spacing: var(--table-gap); }
table,
th,
td { border: none; }
table.page { width: min(var(--page-width), 100%); margin: 0 auto; }

img.cen {
    display: block;
    width: min(var(--img-cen), 95%);
    margin: 0 auto;
}

.gallery {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    align-items: center;
    padding: 20px;
}

.thumbnail {
    display: flex;
    justify-content: center;
    align-items: center;
    margin: 10px;
    padding: 20px;
    border: 1px solid #555;
    border-radius: 8px;
    cursor: pointer;
}

.thumbnail img {
    width: min(var(--thumb), 90%);
    height: auto;
}

.thumbnail_stk img {
    display: block;
    width: min(var(--thumb-stk), 100%);
    height: auto;
    margin-right: 10px;
    padding: 0;
    border: 0;
    cursor: pointer;
}

#fullImage {
    display: none;
    position: fixed;
    inset: 0;
    background-color: rgba(0, 0, 0, 0.7);
}

#fullImage img {
    position: absolute;
    top: 50%;
    left: 50%;
    max-width: 90%;
    max-height: 90%;
    transform: translate(-50%, -50%);
}

.container { display: flex; min-height: 100vh; }

.sidebar {
    position: fixed;
    z-index: 1;
    top: 0;
    left: 0;
    width: 0;
    height: 100%;
    padding-top: 0;
    overflow-x: hidden;
    background-color: var(--sidebar-bg);
    transition: width 0.5s;
}

.sidebar a {
    display: block;
    padding: var(--sidebar-pad);
    text-decoration: none;
    transition: 0.3s;
}

.content { flex-grow: 1; padding: 20px; }

.menu-btn {
    font-size: var(--menu);
    color: var(--green-hover);
    cursor: pointer;
}

.close-btn {
    padding: 20px;
    text-align: right;
    cursor: pointer;
}

.arrow {
    float: right;
    padding: 0 20px;
    font-size: var(--arrow);
    color: var(--green-hover);
    cursor: pointer;
}

.arrow:hover { transform: rotate(270deg); }

.submenu {
    display: none;
    padding-left: 20px;
    list-style: none;
}

.submenu li { margin: 5px 0; }

header,
.foot {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 var(--header-pad-x);
    background-color: var(--header-bg);
}

.foot { font-size: 0.9rem; }

header p {
    color: var(--green);
    font-size: 1.2rem;
}

header a.image,
header a.image:hover {
    margin: 0;
    background-size: 0% 4px;
    transition: none;
}

.header_img { height: var(--header-img); width: auto; }
.header_social,
.soc_img { height: var(--soc); width: auto; }

.reg-intro {
    box-sizing: border-box;
    width: 100%;
    max-width: 42rem;
    margin: 0 auto 1.5rem;
    padding: 1rem 1.15rem;
    color: #e8f6dc;
    line-height: 1.55;
    background: rgba(170, 255, 100, 0.06);
    border: 1px solid var(--green);
    border-left: 4px solid var(--green);
    border-radius: 6px;
    box-shadow: 0 0 0 1px rgba(170, 255, 100, 0.15), 0 0 18px rgba(170, 255, 100, 0.08);
}

.center-video { display: block; margin: 0 auto; }
.right { float: right; margin-left: 1em; }
.left { float: left; margin-right: 1em; }

.payment-method { height: var(--pay-method); width: auto; }
.payment-proc { height: var(--pay-proc); width: auto; }
.stock_img { width: min(var(--stock), 100%); }
.promo_image { width: min(var(--promo), 100%); }
.promo_image_small { width: var(--promo-sm); }
.promo_image_tiny { width: (var(--promo-xs), 100%); }

form {
    max-width: 90%;
    margin: 0 auto;
    padding: 20px;
    text-align: left;
    background-color: var(--header-bg);
    border-radius: 8px;
}

label {
    display: block;
    margin-top: 10px;
    color: var(--fg);
}

input[type="text"],
input[type="url"],
input[type="email"],
input[type="date"],
textarea {
    width: 95%;
    margin-top: 5px;
    padding: 10px;
    color: var(--fg);
    font-size: 1rem;
    background-color: #444;
    border: 1px solid #555;
    border-radius: 4px;
}

input[type="date"] { color-scheme: dark; }
input[type="date"]::-webkit-calendar-picker-indicator { filter: invert(1); }

input[type="file"],
input[type="submit"] {
    padding: 10px 20px;
    color: #fff;
    font-size: 1rem;
    background-color: #007bff;
    border: none;
    border-radius: 4px;
    cursor: pointer;
}

input[type="submit"]:hover { background-color: #0056b3; }

#submitBtn:disabled {
    color: #fff;
    background-color: gray;
    cursor: not-allowed;
}

/* Checkout. Scoped so shop-page .payment-proc sizes do not apply. */
.cart-nav,
.checkout-container {
    max-width: 720px;
    margin: 0 auto;
    padding: 16px 12px 0;
}

.checkout-container { padding-bottom: 40px; }

.cart-nav {
    display: flex;
    gap: 16px;
    align-items: center;
}

.sb-flag {
    margin-left: auto;
    padding: 4px 10px;
    color: #0b1a00;
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    background: var(--green);
    border-radius: 999px;
}

.shipping,
select.shipping,
.qty {
    box-sizing: border-box;
    width: 100%;
    color: #f2f5f0;
    font-family: inherit;
    font-size: 1rem;
    background: var(--surface-2);
    border: 1px solid var(--field-border);
    border-radius: 8px;
}

.shipping,
select.shipping { height: 48px; padding: 0 14px; }
.qty { width: 64px; height: 36px; }

.shipping:focus {
    border-color: var(--green);
    outline: none;
    box-shadow: 0 0 0 3px rgba(170, 255, 100, 0.15);
}

.shipping[readonly] { background: #2a302c; cursor: default; }

.section-card,
.how-it-works {
    margin-bottom: 16px;
    padding: 16px;
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: 12px;
}

.section-card {
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.section-card h2,
.subhead {
    margin: 0;
    color: #f2f5f0;
    font-family: var(--font-display);
    font-size: 1.25rem;
    font-weight: 700;
    text-align: left;
}

.subhead { font-size: 1rem; }

.checkout-container .label {
    display: block;
    margin-bottom: 4px;
    color: var(--muted);
    font-size: 0.875rem;
    font-weight: 600;
}

.hint,
.sa-note,
.guest,
.opt { color: var(--muted-2); font-size: 0.8125rem; }
.opt { font-weight: 400; }
.adres { margin: 0; color: var(--muted); line-height: 1.55; text-align: left; }
.guest { text-align: center; }

.split { display: flex; gap: 12px; }
.grow { flex: 1; min-width: 0; }
.code { width: 112px; flex-shrink: 0; }
#address-form { display: flex; flex-direction: column; gap: 14px; }

.cart-table { width: 100%; border-collapse: collapse; border-spacing: 0; }
.cart-table th,
.cart-table td {
    padding: 10px 8px;
    text-align: left;
    vertical-align: top;
}
.cart-table tr {
	border-bottom: 1px solid var(--line);
}

.cart-thumb {
    float: left;
    width: 80px;
    height: 80px;
    margin-right: 8px;
    padding: 5px;
    object-fit: contain;
    background: #2a302c;
    border-radius: 8px;
}

.qty-form { display: flex; gap: 6px; align-items: center; }

.mini-btn {
    padding: 8px 12px;
    color: #f2f5f0;
    background: #2a302c;
    border: 1px solid var(--field-border);
    border-radius: 8px;
    cursor: pointer;
}

.remove { color: var(--danger); text-decoration: none; }
.cart-total { font-size: 1.3rem; font-weight: 700; text-align: right; }

.free-box {
    display: flex;
    gap: 12px;
    align-items: flex-start;
    padding: 14px;
    background: #1f251f;
    border: 2px solid var(--green);
    border-radius: 10px;
}

.free-title { font-size: 1rem; font-weight: 700; }
.free-price { margin-left: auto; color: var(--green); font-weight: 700; }
.pay-intro { width: 100%; }
.logo-cell { width: 1px; padding: 5px; background: #fff; border-radius: 15px; }

.checkout-container .payment-proc {
    display: block;
    height: 36px;
    width: auto;
}

.pay-button {
    width: 100%;
    height: 56px;
    color: #0b1a00;
    font-size: 1.125rem;
    font-weight: 700;
    padding-left: 15px;
    padding-right: 15px;
    background: var(--green);
    border: none;
    border-radius: 10px;
    cursor: pointer;
}

.pay-button:hover { background: var(--green-hover); }

.payment-badges { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }
.payment-badge {
    display: inline-flex;
    align-items: center;
    padding: 6px 10px;
    background: #fff;
    border-radius: 999px;
}
.payment-badge img { height: 18px; width: auto; }

.methods summary,
.how-it-works summary { color: var(--muted); font-weight: 600; cursor: pointer; }
.how-it-works summary h3 {
    display: inline;
    margin: 0;
    color: #f2f5f0;
    font-size: 1.125rem;
}
.how-body { margin-top: 12px; color: #c3ccc4; font-size: 0.875rem; line-height: 1.5; }
.cart-links { margin-top: 8px; }

.text-image-container {
    float: left;
    width: 360px;
    max-width: 100%;
    margin: 0 12px 12px 0;
}

.text-image-container .story_vid {
    display: block;
    width: 100%;
    height: auto;
}
.story_vid {
    display: block;
    width: 360px;
    max-width: 100%;
    height: auto;
}

.add-to-cart-btn-dark {
	background-color: #1b1b1b;        /* or #252220 / #111 for even darker */
}

.add-to-cart-btn {    
    cursor: pointer;
}

.add-to-cart-btn:hover {
}

.add-to-cart-btn img {
    display: block;           /* removes any extra space under the image */
    vertical-align: middle;
    width: 120px;
}

@media (min-width: 768px) {
    :root { --step: 18px; }
}

@media (min-width: 600px) and (max-width: 767px) {
    :root {
        --step: 17px;
        --page-width: 600px;
        --link-gap: 2px;
        --table-gap: 2px;
        --promo: 210px;
        --promo-sm: 130px;
        --promo-xs: 100px;
    }
}

@media (max-width: 599px) {
    :root {
        --step: 16px;
        --header-pad-x: 5px;
        --header-img: 25px;
        --soc: 20px;
        --menu: 25px;
        --arrow: 20px;
        --sidebar-pad: 4px 4px 4px 32px;
        --page-width: 100%;
        --img-cen: 360px;
        --thumb: 100%;
        --thumb-stk: 99%;
        --story-title: 90%;
        --story-blurb: 90%;
        --blurb-table: 100%;
        --blurb-title: 100%;
        --story-vid: 92%;
        --promo: 150px;
        --promo-sm: 90px;
        --promo-xs: 60px;
        --stock: 150px;
        --pay-method: 15px;
        --pay-proc: 40px;
        --table-gap: 2px;
        --link-gap: 2px;
    }

	body {
		font-size: 0.9rem;
	}

    li,
    .submenu li { margin: 4px 0; padding: 2px 0; }
    .submenu { padding-top: 4px; padding-bottom: 4px; }
    .story_space { float: left; margin-right: 0; }
    .thumbnail_stk img { margin-right: 0; }
    #fullImage img { max-width: 95%; max-height: 95%; }
    .reg-intro { max-width: none; }
    
    /* Cart table responsiveness */
    .cart-table {
        display: block;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        width: 100%;
    }
    .cart-table th,
    .cart-table td {
        padding: 8px 6px;
        font-size: 0.9rem;
        white-space: normal; /* allow wrapping */
    }
    .cart-table tr {
        border-bottom: 1px solid var(--line);
    }

    /* Image + qty row handling */
    .cart-thumb {
        float: none;
        display: block;
        width: 60px;
        height: 60px;
        margin: 0 0 8px 0;
    }

    .qty-form {
        flex-wrap: wrap;
        gap: 4px;
    }
    .qty {
        width: 56px;
        height: 32px;
        font-size: 0.9rem;
    }
    .mini-btn {
        padding: 6px 10px;
        font-size: 0.85rem;
    }

    /* Remove link and stock message */
    .remove {
        font-size: 0.85rem;
    }

    /* Totals and cards */
    .cart-total {
        font-size: 1.15rem;
        text-align: left;
    }

    .section-card {
        padding: 12px;
        gap: 10px;
    }

    /* Address / pay sections on small screens */
    #address-form,
    .payfast {
        gap: 10px;
    }
    .shipping,
    select.shipping {
        height: 44px;
        font-size: 0.95rem;
    }

    .free-box {
        flex-direction: column;
        gap: 8px;
    }
    .free-price {
        margin-left: 0;
    }

    .pay-button {
        height: 50px;
        font-size: 1rem;
    }

    /* Payment badges wrap better */
    .payment-badges {
        gap: 6px;
    }
    .payment-badge img {
        height: 16px;
    }    
}

@media (max-width: 480px) {
    .split { flex-direction: column; }
    .code { width: 100%; }
    .cart-thumb { float: none; display: block; margin-bottom: 6px; }
    .cart-table th,
    .cart-table td {
        padding: 6px 4px;
        font-size: 0.85rem;
    }
    .cart-thumb {
        width: 50px;
        height: 50px;
    }
    .qty {
        width: 50px;
    }    
}
