/* Extra styles for the PHP build (everything else comes from site.css / admin.css, unchanged from the .NET site) */

.page-loading {
    min-height: 50vh;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 36px;
    color: #999;
}

/* "Keep me logged in" on the login page */
.remember-me .remember-label {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-weight: 600;
    cursor: pointer;
}
.remember-me input[type="checkbox"] {
    width: 18px;
    height: 18px;
    accent-color: #d4f300;
}

/* Forms inside the global modal */
#modalMessage form { margin: 0; }

/* Field errors from AJAX forms */
.form-error:empty,
[data-error-for]:empty { display: none; }
[data-error-for] { display: block; font-size: 13px; margin-top: 4px; color: #b52b27; }
.admin-form input.is-invalid,
.admin-form select.is-invalid,
.form-input.is-invalid { border-color: #b52b27 !important; }

/* Clickable table rows (Admin > Customer > Orders) */
tr.row-link { cursor: pointer; }
tr.row-link:hover td { background: rgba(212, 243, 0, 0.12); }

/* ============================================================
   INFORMATION PAGES – Home, About Us, Contact Us, Gallery
   ============================================================ */
.main-nav a.active { text-decoration: underline; text-underline-offset: 6px; text-decoration-thickness: 2px; }

.btn-lg { padding: 12px 26px; font-size: 1rem; display: inline-flex; align-items: center; justify-content: center; gap: 8px; text-decoration: none; }
.btn-outline-lime {
    border: 2px solid var(--lime); color: var(--lime); border-radius: 4px; font-weight: 700;
    background: transparent; transition: background-color .2s, color .2s;
}
.btn-outline-lime:hover { background: var(--lime); color: var(--black); }
.btn-dark-pill {
    display: inline-flex; align-items: center; gap: 8px; background: var(--black); color: var(--lime);
    padding: 10px 24px; border-radius: 999px; font-weight: 700; text-decoration: none; transition: opacity .2s;
}
.btn-dark-pill:hover { opacity: .85; color: var(--lime); }

/* Home hero */
.home-hero {
    background:
        radial-gradient(circle at 85% 20%, rgba(212, 243, 0, .18), transparent 45%),
        linear-gradient(135deg, #040404 0%, #10202b 60%, #0b3a4d 100%);
    color: var(--white);
    padding: 80px 16px;
    border-bottom: 4px solid var(--lime);
}
.home-hero-inner { max-width: 720px; }
.home-hero-kicker { color: var(--lime); font-weight: 700; letter-spacing: 1px; text-transform: uppercase; font-size: .85rem; margin-bottom: 8px; }
.home-hero h1 .home-hero-kicker { display: block; font-family: 'Barlow', sans-serif; line-height: 1.4; }
.home-hero h1 { font-family: var(--font-display); font-size: clamp(2.6rem, 6vw, 4.2rem); letter-spacing: 2px; line-height: 1; margin-bottom: 16px; }
.home-hero-text { font-size: 1.1rem; color: #d7dde0; margin-bottom: 28px; }
.home-hero-actions { display: flex; flex-wrap: wrap; gap: 12px; }

.home-section { padding: 40px 16px; }
.home-why { background: var(--white); }

/* Category tiles */
.category-tiles { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 16px; }
.category-tile {
    background: var(--white); border-radius: 8px; padding: 24px 12px; text-align: center; color: var(--black);
    box-shadow: 0 2px 8px rgba(0,0,0,.08); display: flex; flex-direction: column; align-items: center; gap: 10px;
    font-weight: 700; text-decoration: none; border-bottom: 3px solid transparent; transition: transform .15s, border-color .15s;
}
.category-tile i { font-size: 1.8rem; }
.category-tile .category-icon { width: 2.6rem; height: 2.6rem; }
.category-tile:hover { transform: translateY(-3px); border-bottom-color: var(--lime); color: var(--black); }

/* Features */
.feature-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.feature-card { text-align: center; padding: 24px 16px; }
.feature-card i { font-size: 2.2rem; background: var(--black); color: var(--lime); width: 72px; height: 72px; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center; margin-bottom: 14px; }
.feature-card h3 { font-family: var(--font-display); font-size: 1.5rem; letter-spacing: 1px; margin-bottom: 6px; }
.feature-card p { color: #555; margin: 0; }
@media (max-width: 768px) { .feature-grid { grid-template-columns: 1fr; } }

/* Contact strip */
.contact-strip { background: var(--black); color: var(--white); padding: 22px 16px; }
.contact-strip a { color: var(--lime); font-weight: 600; text-decoration: none; }
.contact-strip a i { margin-right: 6px; }
.contact-strip-title { font-family: var(--font-display); font-size: 1.6rem; letter-spacing: 1px; }

/* About */
.about-layout { display: grid; grid-template-columns: 1fr 300px; gap: 28px; align-items: start; max-width: 1100px; margin: 0 auto; }
.about-layout .content-card { max-width: none; margin: 0; }
.about-list { list-style: none; padding: 0; margin: 0 0 8px; }
.about-list li { padding: 5px 0; color: #444; }
.about-list i { color: #7a9a00; margin-right: 8px; }
.about-aside { display: flex; flex-direction: column; gap: 16px; }
@media (max-width: 900px) { .about-layout { grid-template-columns: 1fr; } }

/* Info cards (About + Contact) */
.info-card { background: var(--white); border-radius: 8px; padding: 18px 20px; box-shadow: 0 2px 8px rgba(0,0,0,.08); border-left: 4px solid var(--lime); }
.info-card h3 { font-size: 1rem; font-weight: 700; margin: 0 0 4px; }
.info-card h3 i { margin-right: 6px; }
.info-card p { margin: 0; color: #555; word-break: break-word; }
.info-card a { color: var(--black); font-weight: 600; }
.info-card-link { display: flex; align-items: center; gap: 16px; color: var(--black); text-decoration: none; transition: transform .15s; }
.info-card-link > i { font-size: 1.4rem; width: 44px; height: 44px; flex: 0 0 44px; border-radius: 50%; background: var(--black); color: var(--lime); display: inline-flex; align-items: center; justify-content: center; }
.info-card-link:hover { transform: translateX(3px); color: var(--black); }

/* Contact */
.contact-layout { display: grid; grid-template-columns: 340px 1fr; gap: 28px; align-items: start; max-width: 1100px; margin: 0 auto; }
.contact-layout .content-card { max-width: none; margin: 0; }
.contact-details { display: flex; flex-direction: column; gap: 14px; }
.contact-form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.contact-form-card label { font-weight: 600; display: block; margin-bottom: 4px; }
.contact-form-card .form-group { margin-bottom: 16px; }
.contact-form-card .form-input { width: 100%; }
.contact-form-card textarea.form-input { resize: vertical; min-height: 140px; }
.hp-field { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.social-links, .footer-social { display: flex; gap: 10px; }
.social-links a, .footer-social a {
    width: 40px; height: 40px; border-radius: 50%; background: var(--black); color: var(--lime);
    display: inline-flex; align-items: center; justify-content: center; font-size: 1.1rem; transition: opacity .2s;
}
.social-links a:hover, .footer-social a:hover { opacity: .8; }
.map-card { max-width: 1100px; margin: 28px auto 0; border-radius: 8px; overflow: hidden; box-shadow: 0 2px 12px rgba(0,0,0,.08); background: var(--white); }
.map-card iframe { width: 100%; height: 360px; border: 0; display: block; }
@media (max-width: 900px) { .contact-layout { grid-template-columns: 1fr; } }
@media (max-width: 576px) { .contact-form-row { grid-template-columns: 1fr; gap: 0; } .content-card { padding: 24px; } }

/* Gallery */
.gallery-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 12px; }
.gallery-grid-preview { grid-template-columns: repeat(6, 1fr); }
@media (max-width: 992px) { .gallery-grid-preview { grid-template-columns: repeat(3, 1fr); } }
.gallery-item { position: relative; display: block; aspect-ratio: 1 / 1; overflow: hidden; border-radius: 6px; background: #eee; }
.gallery-item img { width: 100%; height: 100%; object-fit: cover; transition: transform .3s; }
.gallery-item:hover img { transform: scale(1.06); }
.gallery-caption {
    position: absolute; left: 0; right: 0; bottom: 0; padding: 24px 10px 8px; color: #fff; font-size: .85rem; font-weight: 600;
    background: linear-gradient(transparent, rgba(0,0,0,.75)); opacity: 0; transition: opacity .2s;
}
.gallery-item:hover .gallery-caption { opacity: 1; }

.lightbox { position: fixed; inset: 0; background: rgba(0,0,0,.92); display: none; align-items: center; justify-content: center; z-index: 2000; padding: 40px 64px; }
.lightbox.open { display: flex; }
.lightbox figure { margin: 0; text-align: center; max-width: 100%; }
.lightbox img { max-width: 100%; max-height: 80vh; border-radius: 4px; }
.lightbox figcaption { color: #eee; margin-top: 12px; font-weight: 600; }
.lightbox-close { position: absolute; top: 12px; right: 20px; background: none; border: 0; color: #fff; font-size: 2.6rem; line-height: 1; cursor: pointer; }
.lightbox-nav { position: absolute; top: 50%; transform: translateY(-50%); background: rgba(255,255,255,.12); border: 0; color: var(--lime); width: 48px; height: 48px; border-radius: 50%; font-size: 1.2rem; cursor: pointer; }
.lightbox-prev { left: 12px; }
.lightbox-next { right: 12px; }
body.lightbox-open { overflow: hidden; }

/* Footer */
.footer-top { border-bottom: 1px solid rgba(255,255,255,.12); padding: 36px 0 24px; }
.footer-grid { display: grid; grid-template-columns: 1.4fr 1fr 1.4fr; gap: 28px; }
.footer-grid h4 { font-family: var(--font-display); font-size: 1.4rem; letter-spacing: 1px; color: var(--white); margin-bottom: 10px; }
.footer-grid a, .footer-grid span { display: block; margin-bottom: 6px; }
.footer-grid i { width: 18px; margin-right: 6px; }
.footer-grid p { color: #bbb; margin: 10px 0 0; max-width: 300px; }
.footer-logo { max-width: 160px; border-radius: 4px; }
.footer-social { margin-top: 10px; }
.footer-social a { display: inline-flex; margin: 0; }
.footer-social a i { width: auto; margin: 0; }
@media (max-width: 768px) { .footer-grid { grid-template-columns: 1fr; } }

/* ============================================================
   PAYFAST – checkout payment box and pay page
   ============================================================ */
.sandbox-banner {
    background: #fff4ce; border: 1px dashed #c99a00; color: #6b5200; border-radius: 6px;
    padding: 8px 12px; font-weight: 700; font-size: .9rem; margin-bottom: 14px; text-align: center;
}
.sandbox-banner i { margin-right: 6px; }
.payfast-option { display: flex; gap: 14px; align-items: flex-start; border: 2px solid var(--lime); border-radius: 8px; padding: 14px 16px; background: #fbffe6; }
.payfast-option > i { font-size: 1.6rem; color: #1a1a1a; margin-top: 2px; }
.payfast-option p { margin: 4px 0 0; color: #555; font-size: .92rem; }
.pay-card { max-width: 560px; }
.pay-icon { font-size: 3rem; color: #7a9a00; margin-bottom: 8px; }
.pay-icon-warn { color: #b52b27; }
.pay-btn { width: 100%; margin-top: 16px; }
.pay-secure-note { color: #888; font-size: .85rem; margin-top: 12px; }

/* ============================================================
   PAGE BANNERS – every page's top banner (.hero) uses the Home page background
   ============================================================ */
:root {
    --banner-bg:
        radial-gradient(circle at 85% 20%, rgba(212, 243, 0, .18), transparent 45%),
        linear-gradient(135deg, #040404 0%, #10202b 60%, #0b3a4d 100%);
}
.hero,
.home-hero {
    background: var(--banner-bg);
    color: var(--white);
    border-bottom: 4px solid var(--lime);
}
.hero { padding: 56px 16px 44px; }
.hero h1 { color: var(--white); }
.hero p { color: #d7dde0; }
.hero p a { color: var(--lime); }

/* ============================================================
   IMAGE CAROUSELS (js/carousel.js) – product page and product cards
   ============================================================ */
.tu-carousel { position: relative; overflow: hidden; border-radius: 8px; outline: none; }
.tu-carousel:focus-visible { box-shadow: 0 0 0 3px var(--lime-dark); }
.tu-carousel-track {
    display: flex;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    overscroll-behavior-x: contain;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
}
.tu-carousel-track::-webkit-scrollbar { display: none; }
.tu-carousel-slide { flex: 0 0 100%; min-width: 0; scroll-snap-align: start; scroll-snap-stop: always; display: block; }
.tu-carousel-slide img { -webkit-user-drag: none; user-select: none; }

.tu-carousel-nav {
    position: absolute; top: 50%; transform: translateY(-50%); z-index: 2;
    width: 40px; height: 40px; border-radius: 50%; border: none; padding: 0;
    display: flex; align-items: center; justify-content: center;
    background: rgba(0, 0, 0, 0.5); color: #fff; font-size: 1.1rem; cursor: pointer;
    transition: background 0.2s, opacity 0.2s;
}
.tu-carousel-nav:hover, .tu-carousel-nav:focus-visible { background: rgba(0, 0, 0, 0.78); }
.tu-carousel-nav.prev { left: 10px; }
.tu-carousel-nav.next { right: 10px; }

.tu-carousel-dots {
    position: absolute; left: 0; right: 0; bottom: 10px; z-index: 2;
    display: flex; justify-content: center; gap: 6px; pointer-events: none;
}
.tu-carousel-dots button {
    pointer-events: auto; width: 9px; height: 9px; padding: 0; border: none; border-radius: 5px;
    background: rgba(255, 255, 255, 0.75); box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.25);
    transition: width 0.2s, background 0.2s; cursor: pointer;
}
.tu-carousel-dots button.active { width: 20px; background: var(--lime); }
.tu-carousel-count {
    position: absolute; top: 10px; right: 10px; z-index: 2;
    background: rgba(0, 0, 0, 0.55); color: #fff; font-size: 0.8rem; padding: 2px 9px; border-radius: 10px;
}

/* Product page */
.product-carousel { border: 1px solid #e2e2e2; background: #fff; margin-bottom: 14px; }
.product-carousel .tu-carousel-slide { aspect-ratio: 1 / 1; }   /* square photo box */
.product-detail-image .product-img-placeholder.large { height: auto; aspect-ratio: 1 / 1; }
.product-detail-image .product-carousel img {
    width: 100%; height: 100%; max-height: none; object-fit: contain; border-radius: 0; background: #fff; display: block;
}
.product-thumbs { position: relative; display: flex; flex-wrap: wrap; gap: 8px; padding: 4px 2px 8px; margin-bottom: 20px; }
.product-detail-image .product-thumb {
    width: 64px; height: 64px; max-height: none; flex-shrink: 0; object-fit: cover; cursor: pointer;
    border: 3px solid #e2e2e2; border-radius: 6px; padding: 2px; background: #fff; transition: border-color 0.2s;
}
.product-detail-image .product-thumb:hover { border-color: #bbb; }
.product-detail-image .product-thumb.active { border-color: var(--lime-dark); }

/* Product cards (shop / home) */
.card-carousel { margin-bottom: 12px; border-radius: 4px; }
.card-carousel .product-img { margin-bottom: 0; display: block; }
.card-carousel .tu-carousel-nav { width: 30px; height: 30px; font-size: 0.8rem; opacity: 0; }
.card-carousel .tu-carousel-nav.prev { left: 6px; }
.card-carousel .tu-carousel-nav.next { right: 6px; }
.product-card:hover .card-carousel .tu-carousel-nav,
.card-carousel:focus-within .tu-carousel-nav { opacity: 1; }
.card-carousel .tu-carousel-dots { bottom: 6px; gap: 4px; }
.card-carousel .tu-carousel-dots button { width: 6px; height: 6px; }
.card-carousel .tu-carousel-dots button.active { width: 14px; }
@media (hover: none) {
    /* Phones and tablets: swipe; the dots show there are more photos */
    .card-carousel .tu-carousel-nav { display: none; }
}

/* ============================================================
   ADMIN > IMAGES
   ============================================================ */
.stock-table .stock-img-link { font-size: 0.8rem; font-weight: 600; width: fit-content; }
.img-admin-thumb {
    width: 56px; height: 56px; border-radius: 6px; overflow: hidden; background: #f1f1f1;
    display: flex; align-items: center; justify-content: center; color: #aaa; font-size: 1.3rem;
}
.img-admin-thumb img { width: 100%; height: 100%; object-fit: cover; }

.img-drop {
    position: relative; display: flex; flex-direction: column; align-items: center; gap: 6px; text-align: center;
    padding: 28px 16px; margin: 0; border: 2px dashed #c4c4c4; border-radius: 10px; background: #fafafa;
    cursor: pointer; transition: border-color 0.2s, background 0.2s;
}
.img-drop:hover, .img-drop.is-over { border-color: var(--lime-dark); background: #f7fbe3; }
.img-drop.is-busy { opacity: 0.6; pointer-events: none; }
.img-drop i { font-size: 2rem; color: #777; }
.img-drop input[type=file] { position: absolute; width: 1px; height: 1px; opacity: 0; pointer-events: none; }
.img-drop:focus-within { box-shadow: 0 0 0 3px rgba(170, 221, 0, 0.45); }
.img-upload-status { display: flex; align-items: center; gap: 12px; margin-top: 12px; font-size: 0.9rem; }
.img-upload-bar { flex: 1; max-width: 320px; height: 8px; border-radius: 4px; background: #e6e6e6; overflow: hidden; }
.img-upload-bar span { display: block; height: 100%; width: 0; background: var(--lime-dark); transition: width 0.3s; }

.img-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 16px; }
#imgGrid.is-busy { opacity: 0.6; pointer-events: none; }
.img-grid-empty { text-align: center; color: #888; padding: 30px 10px; }
.img-grid-empty i { font-size: 2.4rem; margin-bottom: 8px; }
.img-tile { border: 1px solid #e2e2e2; border-radius: 8px; background: #fff; overflow: hidden; display: flex; flex-direction: column; }
.img-tile.is-main { border: 2px solid var(--lime-dark); }
.img-tile.is-dragging { opacity: 0.4; }
.img-tile.is-busy { opacity: 0.5; pointer-events: none; }
.img-tile[draggable=true] .img-tile-pic { cursor: grab; }
.img-tile-pic { position: relative; aspect-ratio: 1 / 1; background: #f4f4f4; }
.img-tile-pic img { width: 100%; height: 100%; object-fit: contain; display: block; }
.img-tile-badge {
    position: absolute; top: 8px; left: 8px; padding: 2px 9px; border-radius: 10px;
    background: rgba(0, 0, 0, 0.65); color: #fff; font-size: 0.75rem; font-weight: 700;
}
.img-tile.is-main .img-tile-badge { background: var(--lime); color: var(--black); }
.img-tile-drag {
    position: absolute; top: 8px; right: 8px; width: 28px; height: 28px; border-radius: 50%;
    display: flex; align-items: center; justify-content: center; background: rgba(255, 255, 255, 0.85); color: #555;
}
.img-tile-meta { padding: 6px 10px 0; font-size: 0.78rem; color: #777; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.img-tile-meta { margin-bottom: auto; }
.img-tile-actions { display: flex; gap: 6px; padding: 8px 10px 0; }
.img-tile-actions:last-child { padding-bottom: 10px; }
.img-tile-actions .img-edit, .img-tile-actions .img-main { flex: 1; white-space: nowrap; }
.img-tile-actions .btn-admin:disabled { opacity: 0.35; cursor: default; }

/* The site's own pop-up styles (site.css .modal-content) limit dialogs to 500px – the editor needs the room */
#imgEditModal .modal-content { max-width: none; width: 100%; max-height: none; overflow: visible; }
#imgEditModal .modal-body { padding: 16px 20px; }

.img-editor-toolbar { display: flex; flex-wrap: wrap; gap: 10px 18px; align-items: center; margin-bottom: 12px; }
.img-editor-group { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.img-editor-group .btn-admin.active { background: var(--black); color: var(--lime); }
.img-editor-group input[type=range] { width: 140px; accent-color: var(--lime-dark); }
.img-editor-stage { position: relative; height: min(62vh, 560px); background: #2b2b2b; border-radius: 6px; overflow: hidden; }
.img-editor-stage img { display: block; max-width: 100%; }
.img-editor-loading {
    position: absolute; inset: 0; z-index: 5; display: flex; align-items: center; justify-content: center;
    color: #fff; font-size: 2rem; background: rgba(0, 0, 0, 0.35);
}
@media (max-width: 576px) {
    .img-grid { grid-template-columns: repeat(2, 1fr); gap: 10px; }
    .img-editor-stage { height: 52vh; }
}

/* ============================================================
   ADMIN > PRODUCTS
   ============================================================ */
.product-editor .admin-form select { width: 100%; }
.product-editor textarea { resize: vertical; }
.product-editor .form-summary ul { padding-left: 18px; }
.option-table th, .option-table td { vertical-align: top; }
.option-table input[type=text] { width: 100%; min-width: 140px; }
.option-table .opt-price-input, .option-table .opt-cost-input { width: 110px !important; text-align: right; }
.option-table .opt-stock-input { width: 90px !important; text-align: right; }
.option-table .opt-profit { white-space: nowrap; font-size: 13px; }
.option-table select { min-width: 130px; padding: 6px 8px; border: 1px solid #ccc; border-radius: 5px; font-family: var(--font-body); }
.option-table select:disabled { background: #f3f3f3; color: #999; }
.option-table .opt-profit { padding-top: 14px; }
.option-table .opt-stock { display: inline-block; padding-top: 7px; font-weight: 700; }
.option-table .opt-stock.is-low { color: #b8860b; }
.option-table .opt-stock.is-out { color: #b52b27; }
.option-table .opt-hide { margin-top: 10px; width: 18px; height: 18px; }
.option-table tr.is-hidden td { opacity: 0.55; }
.option-table tr.is-hidden td:nth-last-child(2) { opacity: 1; }
.option-table tr.is-new td { background: #fbfdf2; }
.option-table .text-danger { display: block; font-size: 0.8rem; }
.check-list { display: flex; flex-direction: column; gap: 4px; max-height: 260px; overflow-y: auto; padding-right: 6px; }
.check-list label { display: flex; align-items: center; gap: 8px; font-weight: 400 !important; margin: 0 !important; cursor: pointer; }
.check-list input { width: 16px; height: 16px; }
.editor-thumbs { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.editor-thumbs .img-admin-thumb.is-main { box-shadow: 0 0 0 2px var(--lime-dark); }
.danger-zone { border: 1px solid #f0c9c7; }
.danger-zone h2 { color: #b52b27; }
.product-editor .sticky-save { z-index: 20; }

/* Option order (drag grip + up / down arrows) */
.option-table .opt-handle { width: 52px; white-space: nowrap; padding-right: 0; }
.option-table td.opt-handle { padding-top: 9px; }
.opt-drag { display: inline-block; vertical-align: middle; cursor: grab; color: #999; padding: 4px 4px 4px 0; font-size: 1rem; }
.opt-drag:hover { color: var(--black); }
.opt-move-btns { display: inline-flex; flex-direction: column; gap: 2px; vertical-align: middle; }
.opt-move { border: 1px solid #ccc; background: #fff; border-radius: 4px; width: 22px; height: 17px; padding: 0; font-size: 0.6rem; line-height: 1; cursor: pointer; }
.opt-move:hover { background: var(--lime); border-color: var(--lime-dark); }
.option-row:first-child .opt-move[data-dir="-1"], .option-row:last-child .opt-move[data-dir="1"] { opacity: 0.3; pointer-events: none; }
.option-table tr.is-dragging td { background: #f3f9d9 !important; opacity: 0.7; }

/* ============================================================
   ADMIN > NEW ORDER (POS): options grouped under their product
   ============================================================ */
.pos-group { border-bottom: 1px solid #e4e4e4; }
.pos-group:last-child { border-bottom: 0; }
.pos-options { list-style: none; margin: 0; padding: 0; }
.pos-group .pos-row { border-bottom: 0; }
.pos-group-head {
    display: grid; grid-template-columns: 48px minmax(0, 1fr) auto; align-items: center; gap: 12px;
    padding: 12px 16px 8px; background: #f6f6f6; border-left: 4px solid var(--lime-dark);
}
.pos-group-info { display: flex; flex-direction: column; align-items: flex-end; gap: 3px; font-size: .85rem; text-align: right; }
.tag.pos-options-tag { background: var(--black); color: var(--lime); }
.pos-group.is-multi .pos-options { border-left: 4px solid var(--lime-dark); background: #fcfcfc; }
.pos-row.is-option { padding-top: 7px; padding-bottom: 7px; border-top: 1px dashed #e6e6e6; }
.pos-row.is-option:first-child { border-top: 0; }
.pos-option-mark { width: 48px; height: 22px; position: relative; }
.pos-option-mark::before {
    content: ''; position: absolute; left: 22px; top: -10px; width: 16px; height: 20px;
    border-left: 2px solid #c9c9c9; border-bottom: 2px solid #c9c9c9; border-bottom-left-radius: 6px;
}
.pos-option-name { font-weight: 600; }
@media (max-width: 900px) {
    .pos-option-mark { grid-area: thumb; width: 44px; }
    .pos-group-head { grid-template-columns: 44px minmax(0, 1fr); grid-template-areas: "thumb name" "info info"; }
    .pos-group-info { grid-area: info; flex-direction: row; flex-wrap: wrap; justify-content: space-between; align-items: center; text-align: left; }
}

/* Low-stock level per item (Stock & Prices, product editor): empty = default, "x" resets */
.low-at { display: inline-flex; align-items: center; gap: 4px; justify-content: flex-end; }
.low-at .low-input, .admin-table .low-at input[type=number] { width: 72px !important; text-align: right; }
.low-at .low-input::placeholder { color: #aaa; font-style: italic; }
.low-at.is-custom .low-input { border-color: var(--lime-dark); background: #f7fbe3; font-weight: 700; }
.low-reset {
    visibility: hidden; width: 22px; height: 22px; padding: 0; border: 1px solid #ccc; border-radius: 50%;
    background: #fff; color: #777; font-size: 0.7rem; line-height: 1; cursor: pointer;
}
.low-at.is-custom .low-reset { visibility: visible; }
.low-reset:hover { background: #b52b27; border-color: #b52b27; color: #fff; }

/* Create Account page (ajax/page_register.php) */
.register-card { max-width: 560px; width: 100%; }
.register-name-row { display: grid; grid-template-columns: 1fr 1fr; gap: 0 16px; }
@media (max-width: 480px) { .register-name-row { grid-template-columns: 1fr; } }
.otp-intro { text-align: center; color: #555; margin-bottom: 20px; overflow-wrap: anywhere; }
.form-input.otp-input {
    width: 100%;
    text-align: center;
    font-size: 28px;
    font-weight: 700;
    letter-spacing: 12px;
    padding-left: 24px;
}
.otp-success {
    background: #eef9d0;
    border: 1px solid #c9e86a;
    color: #3d5200;
    padding: 10px 14px;
    border-radius: 6px;
    margin-bottom: 16px;
    font-size: 14px;
}
#resendLink.disabled { color: #999; pointer-events: none; text-decoration: none; }

/* Basket: lines that can't be ordered as they are (ajax/page_cart.php) */
.cart-row-problem td { background: #fff4f4; }
.cart-line-problem { color: #b52b27; font-size: 13px; font-weight: 600; margin-top: 4px; }
.cart-notices ul { padding-left: 20px; }

/* Show / hide password eye (js/app.js TU.passwordEyes) */
.pw-wrap { position: relative; display: block; }
.pw-wrap > input { width: 100%; padding-right: 46px !important; }
.pw-toggle {
    position: absolute; top: 50%; right: 6px; transform: translateY(-50%);
    width: 36px; height: 36px; border: none; background: transparent; color: #777;
    display: flex; align-items: center; justify-content: center; cursor: pointer; border-radius: 4px;
}
.pw-toggle:hover, .pw-toggle:focus-visible { color: #040404; background: rgba(0, 0, 0, 0.06); outline: none; }

/* Gallery > Instagram section (tiles link to the Instagram account, not the lightbox) */
.gallery-after-instagram { padding-top: 0; }
.instagram-handle { margin-top: -12px; margin-bottom: 24px; font-weight: 600; }
.instagram-handle a { color: var(--black); text-decoration: underline; text-decoration-color: var(--lime-dark); text-decoration-thickness: 2px; text-underline-offset: 3px; }
.instagram-item { position: relative; display: block; aspect-ratio: 1 / 1; overflow: hidden; border-radius: 6px; background: #111; }
.instagram-item img { width: 100%; height: 100%; object-fit: cover; transition: transform .3s; }
.instagram-item:hover img, .instagram-item:focus-visible img { transform: scale(1.06); }
.instagram-overlay {
    position: absolute; inset: 0; display: flex; align-items: center; justify-content: center;
    background: rgba(4, 4, 4, .55); color: var(--lime); font-size: 2.5rem; opacity: 0; transition: opacity .25s;
}
.instagram-item:hover .instagram-overlay, .instagram-item:focus-visible .instagram-overlay { opacity: 1; }
.instagram-item:focus-visible { outline: 3px solid var(--lime-dark); outline-offset: 2px; }
.instagram-reel {
    position: absolute; top: 8px; right: 8px; width: 30px; height: 30px; border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    background: rgba(4, 4, 4, .6); color: #fff; font-size: .8rem;
}

/* Home: Commercial & charter (bulk orders quoted directly) */
.home-trade-section { padding-top: 8px; }
.home-trade {
    display: grid; grid-template-columns: auto 1fr auto; gap: 24px; align-items: center;
    background: linear-gradient(135deg, #040404 0%, #10202b 70%, #0b3a4d 100%);
    color: var(--white); border-radius: 10px; padding: 28px 32px; border-left: 5px solid var(--lime);
}
.home-trade-icon {
    width: 64px; height: 64px; border-radius: 50%; background: rgba(212, 243, 0, .12); color: var(--lime);
    display: flex; align-items: center; justify-content: center; font-size: 1.7rem;
}
.home-trade-kicker { color: var(--lime); font-weight: 700; letter-spacing: 1px; text-transform: uppercase; font-size: .8rem; margin: 0 0 4px; }
.home-trade h2 { font-family: var(--font-display); font-size: 1.9rem; letter-spacing: 1px; line-height: 1.1; margin: 0 0 8px; color: var(--white); }
.home-trade-text p:last-child { color: #d7dde0; margin: 0; max-width: 620px; }
.home-trade-actions { display: flex; flex-direction: column; gap: 10px; align-items: stretch; }
.home-trade-phone { color: var(--lime); font-weight: 600; text-align: center; text-decoration: none; }
.home-trade-phone:hover { color: var(--lime); text-decoration: underline; }
@media (max-width: 900px) {
    .home-trade { grid-template-columns: 1fr; padding: 24px 20px; gap: 16px; }
    .home-trade-actions { flex-direction: row; flex-wrap: wrap; align-items: center; }
}

/* About Us: Tailsup story */
.about-lead { font-size: 1.15rem; font-weight: 600; color: var(--black); }
.about-callout {
    background: var(--black); color: var(--white); border-left: 5px solid var(--lime);
    border-radius: 6px; padding: 14px 18px; font-weight: 700; font-size: 1.05rem;
}
.about-callout i { color: var(--lime); margin-right: 8px; }
.content-card p.about-callout { color: var(--white); }
.about-signoff { margin-top: 24px; padding-top: 18px; border-top: 1px solid #e5e5e5; }
.about-signoff-name { font-family: var(--font-display); font-size: 1.6rem; letter-spacing: 1px; margin-bottom: 4px; color: var(--black); }
.about-tagline { color: #7a9a00; font-weight: 700; font-style: italic; margin: 0; }

.info-card-action { margin-top: 4px !important; font-size: .85rem; font-weight: 700; color: #7a9a00 !important; }
.info-card-action i { font-size: .75rem; margin-left: 2px; }

/* Admin > Images: click a photo to view it bigger (js/admin.js – photo viewer) */
.img-zoom { position: relative; display: block; width: 100%; height: 100%; padding: 0; border: 0; background: none; cursor: zoom-in; }
.img-zoom-icon {
    position: absolute; right: 3px; bottom: 3px; width: 20px; height: 20px; border-radius: 50%; font-size: 0.65rem;
    display: flex; align-items: center; justify-content: center; background: rgba(0, 0, 0, 0.6); color: #fff;
    opacity: 0; transition: opacity 0.15s;
}
.img-zoom:hover .img-zoom-icon, .img-zoom:focus-visible .img-zoom-icon { opacity: 1; }
.img-tile-pic img[data-lightbox] { cursor: zoom-in; }
.img-tile[draggable=true] .img-tile-pic img[data-lightbox] { cursor: zoom-in; }
.img-tile-zoom {
    position: absolute; bottom: 8px; right: 8px; width: 30px; height: 30px; border-radius: 50%; border: 0;
    display: flex; align-items: center; justify-content: center; background: rgba(255, 255, 255, 0.9); color: #333;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.2); cursor: zoom-in;
}
.img-tile-zoom:hover { background: var(--lime); color: var(--black); }

body.admin-lightbox-on { overflow: hidden; }
.admin-lightbox {
    position: fixed; inset: 0; z-index: 2000; display: none; align-items: center; justify-content: center;
    background: rgba(0, 0, 0, 0.88); padding: 48px 64px;
}
.admin-lightbox.open { display: flex; }
.admin-lightbox-figure { position: relative; margin: 0; max-width: 100%; max-height: 100%; display: flex; flex-direction: column; align-items: center; }
.admin-lightbox-img { max-width: 100%; max-height: calc(100vh - 140px); object-fit: contain; border-radius: 4px; background: #fff; box-shadow: 0 6px 30px rgba(0, 0, 0, 0.5); }
.admin-lightbox.is-loading .admin-lightbox-img { opacity: 0.3; }
.admin-lightbox-spinner { display: none; position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%); color: #fff; font-size: 2rem; }
.admin-lightbox.is-loading .admin-lightbox-spinner { display: block; }
.admin-lightbox figcaption { margin-top: 12px; color: #eee; font-size: 0.9rem; text-align: center; word-break: break-word; }
.admin-lightbox-count { color: #aaa; margin-left: 6px; }
.admin-lightbox-open { color: #ccc; margin-left: 8px; }
.admin-lightbox-open:hover { color: var(--lime); }
.admin-lightbox-close, .admin-lightbox-nav {
    position: absolute; border: 0; border-radius: 50%; width: 44px; height: 44px; display: flex; align-items: center; justify-content: center;
    background: rgba(255, 255, 255, 0.15); color: #fff; font-size: 1.2rem; cursor: pointer; transition: background 0.15s;
}
.admin-lightbox-close:hover, .admin-lightbox-nav:hover { background: var(--lime); color: var(--black); }
.admin-lightbox-close { top: 12px; right: 12px; }
.admin-lightbox-nav { top: 50%; transform: translateY(-50%); }
.admin-lightbox-nav.prev { left: 12px; }
.admin-lightbox-nav.next { right: 12px; }
.admin-lightbox.single .admin-lightbox-nav, .admin-lightbox.single .admin-lightbox-count { display: none; }
@media (max-width: 576px) {
    .admin-lightbox { padding: 56px 8px 16px; }
    .admin-lightbox-nav { top: auto; bottom: 12px; transform: none; }
}

/* Shop / home cards: photos as blocks – an inline image leaves a thin gap under it (the white line under the
   photo in the swipeable card carousel). The photos come from ajax/img.php in the size the card needs. */
.product-card .product-img, .tu-carousel-slide img { display: block; }

/* Product page: photo and details always split the card 50 / 50. A plain 1fr column grows to fit its widest content,
   so a product with many photos (a long row of thumbnails) pushed the details into a thin strip on the right. */
.product-detail-card { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
.product-detail-image, .product-detail-info { min-width: 0; }
.product-detail-info { overflow-wrap: anywhere; }
@media (max-width: 768px) {
    .product-detail-card { grid-template-columns: minmax(0, 1fr); }
}

/* ============================================================
   Header cart pill: cart icon with a count badge + the basket total (ajax/header.php, TU.updateCartPill)
   ============================================================ */
.cart-pill { gap: 10px; white-space: nowrap; }
.cart-pill-icon { position: relative; display: inline-flex; }
.cart-pill-icon i { font-size: 1.15rem; }
.cart-pill-count {
    position: absolute; top: -9px; right: -11px; min-width: 18px; height: 18px; padding: 0 5px; border-radius: 9px;
    background: var(--lime); color: var(--black); border: 1.5px solid var(--black);
    font-size: 0.7rem; font-weight: 700; line-height: 15px; text-align: center;
}
.cart-pill-count.is-empty { background: #e2e2e2; }
.cart-pill-total { margin-left: 4px; font-variant-numeric: tabular-nums; }
.btn_header { white-space: nowrap; display: inline-flex; align-items: center; gap: 6px; }

/* ============================================================
   PHONES (≤ 768px): compact header and shop filters
   ============================================================ */
@media (max-width: 768px) {
    /* The header no longer stays stuck to the top – on a phone it took up a third of the screen */
    header { position: static; }

    /* Top bar: logo left, basket + login right; search on its own full-width row underneath */
    .top-bar .container { flex-wrap: wrap; row-gap: 10px; column-gap: 12px; padding-top: 10px; padding-bottom: 12px; }
    .top-bar .container > a:first-child { order: 1; flex: 0 0 auto; }
    .top-bar .container > nav { order: 2; margin-left: auto; gap: 10px !important; }
    .top-bar .search-box { order: 3; flex: 1 1 100%; padding: 2px 4px 2px 12px; }
    .top-bar .search-box input { width: auto; flex: 1; min-width: 0; font-size: 1rem; }   /* 16px: no zoom-in on iPhone */
    .top-bar .search_icon { height: 34px; width: 40px; border: none; background: var(--lime); border-radius: 4px; }
    .brand { width: 120px; max-width: 34vw; height: auto; display: block; }

    .cart-pill { padding: 8px 12px; font-size: 0.85rem; border-radius: 20px; }
    .btn_header { padding: 7px 12px; font-size: 0.85rem; }
    .admin-pill-label, .profile-name { display: none; }
    .btn-profile { padding: 6px 10px; }

    /* Main menu: one line that scrolls sideways instead of wrapping */
    .main-nav { padding: 0; }
    .main-nav .container {
        justify-content: flex-start !important; gap: 22px !important; overflow-x: auto; white-space: nowrap;
        padding: 10px 16px; scrollbar-width: none; -webkit-overflow-scrolling: touch;
    }
    .main-nav .container::-webkit-scrollbar { display: none; }

    /* Shop: the product types are a row of chips above the products (no longer a sticky box that the
       products scrolled underneath) */
    .shop-section { padding: 20px 12px; }
    .shop-layout { gap: 16px; grid-template-columns: minmax(0, 1fr); }   /* minmax: the chip row scrolls instead of widening the page */
    .shop-sidebar, .shop-main { min-width: 0; }
    .shop-sidebar { position: static; top: auto; padding: 14px; }
    .shop-sidebar .sidebar-title { text-align: left; font-size: 1rem; margin-bottom: 8px; }
    .shop-sidebar .sidebar-title.mt-4 { margin-top: 14px !important; }
    .shop-sidebar .category-list {
        display: flex; gap: 8px; overflow-x: auto; padding: 2px 2px 6px; margin: 0 -4px;
        scrollbar-width: none; -webkit-overflow-scrolling: touch; scroll-snap-type: x proximity;
    }
    .shop-sidebar .category-list::-webkit-scrollbar { display: none; }
    .shop-sidebar .category-list li { flex: 0 0 auto; scroll-snap-align: start; }
    .shop-sidebar .category-list li a {
        padding: 8px 14px; border: 1px solid #d6d6d6; border-radius: 20px; white-space: nowrap; font-size: 0.88rem; gap: 6px;
    }
    .shop-sidebar .category-list li a.active { border-color: var(--lime); }
    .shop-sidebar .category-list li a .fa-circle { display: none; }   /* the bullets only make sense in a list */
    .shop-sidebar .category-list li a.clearance-link { border-color: #c62828; }
    .shop-header { gap: 10px; }
    /* The header has a search box, so the sidebar's second one is hidden on phones */
    .shop-sidebar .sidebar-title.mt-4, .shop-sidebar .sidebar-search { display: none; }
}

/* Phones: two products side by side, like most shops, instead of one huge card per screen */
@media (max-width: 576px) {
    .products-grid { grid-template-columns: repeat(2, minmax(0, 1fr)) !important; gap: 10px !important; }
    .products-grid .product-card { padding: 8px 8px 12px; display: flex; flex-direction: column; }
    .products-grid .product-img, .products-grid .product-img-placeholder { height: 140px; margin-bottom: 8px; }
    .products-grid .card-carousel { margin-bottom: 8px; }
    .products-grid .product-name { font-size: 0.82rem; min-height: 34px; margin-bottom: 4px; line-height: 1.25; }
    .products-grid .product-price { font-size: 0.9rem; margin-bottom: 8px; }
    .products-grid .btn-basket { margin-top: auto; width: 100%; padding: 8px 6px; font-size: 0.8rem; }
    .products-grid .add-to-basket-form { margin-top: auto; }
    .products-grid .sale-badge { top: 6px; left: 6px; font-size: 0.68rem; padding: 3px 7px; }
}

/* Shop "Coming soon" page (config app.shop_coming_soon) */
.coming-soon { padding: 90px 16px 80px; }
.coming-soon-badge { display: inline-block; background: var(--lime); color: #111 !important; font-weight: 700; text-transform: uppercase; letter-spacing: .08em; padding: 6px 16px; border-radius: 999px; margin-bottom: 18px; }
.coming-soon-actions { display: flex; flex-wrap: wrap; gap: 12px; justify-content: center; margin-top: 26px; }
