﻿
@import url('https://fonts.googleapis.com/css2?family=Space+Grotesk:wght@500;600;700&family=Inter:wght@400;500;600&family=JetBrains+Mono:wght@400;500;600&display=swap');

:root {
    --ink: #12151C;
    --paper: #F4F6F8;
    --paper-raised: #FFFFFF;
    --circuit: #0E7C7B;
    --circuit-dark: #0A5F5E;
    --signal: #F2A93B;
    --wire: #8B93A7;
    --wire-light: #DDE1E8;
    --success: #2FAE66;
    --danger: #D64545;
    --font-display: 'Space Grotesk', sans-serif;
    --font-body: 'Inter', sans-serif;
    --font-mono: 'JetBrains Mono', monospace;
    --radius-sm: 4px;
    --radius-md: 8px;
    --shadow-card: 0 1px 2px rgba(18,21,28,0.06), 0 4px 12px rgba(18,21,28,0.04);
    --shadow-card-hover: 0 2px 4px rgba(18,21,28,0.08), 0 12px 24px rgba(18,21,28,0.08);
}

body {
    background: var(--paper);
    color: var(--ink);
    font-family: var(--font-body);
}


.order-status-created {
    background: rgba(47, 174, 102, 0.15);
    color: #2fae66;
}

.order-status-updated {
    background: rgba(45, 109, 168, 0.15);
    color: #2d6da8;
}

.order-status-deleted {
    background: rgba(214, 69, 69, 0.15);
    color: #d64545;
}


/*Pending,
Authorized,
Paid,
Failed,
Refunded,
PartiallyRefunded*/

.order-status-paid {
    background: rgba(27, 174, 102, 0.15);
    color: #2fae66;
}

.order-status-authorized {
    background: rgba(55, 109, 168, 0.15);
    color: #2d6da8;
}

.order-status-failed {
    background: rgba(314, 69, 69, 0.19);
    color: #d64545;
}

.order-status-refunded {
    background: rgba(200, 61, 69, 0.25);
    color: #d64545;
}

.order-status-partiallyrefunded {
    background: rgba(214, 69, 69, 0.35);
    color: #d64545;
}



/* Pin the "Filters" header (title + close button) to the top of the mobile
   drawer so it stays visible while the filter list scrolls underneath it,
   instead of scrolling away with the rest of the panel. */
#filterOffcanvas.offcanvas {
    z-index: 1060; /* stays above the sticky navbar's z-index: 1050 */
}

#filterOffcanvas .offcanvas-header {
    position: sticky;
    top: 0;
    z-index: 2;
    background: var(--paper-raised);
    border-bottom: 1px solid var(--wire-light);
    padding: 1rem 1.25rem;
}

#filterOffcanvas .offcanvas-body {
    padding: 0;
    overflow-y: auto; /* only the filter list scrolls, header stays put */
}

/* Fixed floating "Filters" tab — pinned to the left edge, vertically centered
   on the viewport, stays in place regardless of scroll position (mobile/tablet only). */
.filter-fab {
    position: fixed;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    z-index: 1030; /* below the offcanvas (1060) so the drawer's backdrop covers it once open */
    background: var(--circuit);
    color: #fff;
    border: none;
    border-radius: 0 999px 999px 0; /* rounded only on the outward-facing side */
    padding: 0.65rem 1rem 0.65rem 0.75rem;
    display: flex;
    align-items: center;
    gap: 0.4rem;
    box-shadow: var(--shadow-card-hover);
    cursor: pointer;
    font-weight: 600;
    font-size: 0.85rem;
    transition: background 0.2s ease, padding 0.2s ease;
}

    .filter-fab:hover {
        background: var(--circuit-dark);
    }

.filter-fab-badge {
    background: var(--signal);
    color: var(--ink);
    font-size: 0.7rem;
    font-weight: 700;
    border-radius: 50%;
    min-width: 18px;
    height: 18px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0 4px;
}

@media (max-width: 400px) {
    /* On very narrow phones, shrink to icon + badge only — full label wastes
       precious horizontal space at that width. */
    .filter-fab span:not(.filter-fab-badge) {
        display: none;
    }

    .filter-fab {
        padding: 0.65rem 0.6rem;
    }
}

.ts-h1, .ts-h2, .ts-h3, h1.ts, h2.ts, h3.ts {
    font-family: var(--font-display);
    font-weight: 700;
    letter-spacing: -0.01em;
}

a {
    color: var(--circuit);
}

    a:hover {
        color: var(--circuit-dark);
    }

/* ---------- Skip link / focus ring (accessibility floor) ---------- */
.skip-link {
    position: absolute;
    left: -999px;
    top: 0;
    background: var(--ink);
    color: #fff;
    padding: 0.5rem 1rem;
    z-index: 1000;
}

    .skip-link:focus {
        left: 0;
    }

:focus-visible {
    outline: 2px solid var(--circuit);
    outline-offset: 2px;
}

@media (prefers-reduced-motion: reduce) {
    * {
        animation-duration: 0.001ms !important;
        transition-duration: 0.001ms !important;
    }
}

/* ---------- Catalog layout ---------- */
/*.ts-catalog-header {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 0.75rem;
    margin-bottom: 1.5rem;
}*/
.ts-catalog-header {
    display: flex;
    align-items: center; /* was: baseline */
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 0.75rem;
    margin-bottom: 1.5rem;
}
    .ts-catalog-header h1 {
        font-family: var(--font-display);
        font-size: 1.75rem;
        margin: 0;
    }

.ts-result-count {
    font-family: var(--font-mono);
    font-size: 0.85rem;
    color: var(--wire);
}

.ts-search {
    position: relative;
    max-width: 420px;
}

    .ts-search input {
        border-radius: var(--radius-md);
        border: 1px solid var(--wire-light);
        padding: 0.55rem 0.9rem 0.55rem 2.25rem;
        width: 100%;
        background: var(--paper-raised);
    }

        .ts-search input:focus {
            border-color: var(--circuit);
            box-shadow: 0 0 0 3px rgba(14,124,123,0.15);
        }

    .ts-search svg {
        position: absolute;
        left: 0.7rem;
        top: 50%;
        transform: translateY(-50%);
        color: var(--wire);
    }

/* ---------- Filter sidebar ---------- */
.ts-filters {
    background: var(--paper-raised);
    border: 1px solid var(--wire-light);
    border-radius: var(--radius-md);
    padding: 1.25rem;
}

    .ts-filters h2 {
        font-family: var(--font-display);
        font-size: 0.75rem;
        text-transform: uppercase;
        letter-spacing: 0.08em;
        color: var(--wire);
        margin-bottom: 0.75rem;
    }

.ts-filter-group {
    margin-bottom: 1.25rem;
}

    .ts-filter-group:last-child {
        margin-bottom: 0;
    }

    .ts-filter-group label {
        display: flex;
        justify-content: space-between;
        font-size: 0.9rem;
        padding: 0.3rem 0;
        cursor: pointer;
        color: var(--ink);
    }

        .ts-filter-group label:hover {
            color: var(--circuit);
        }

.ts-filter-count {
    font-family: var(--font-mono);
    font-size: 0.75rem;
    color: var(--wire);
}

.ts-filter-active {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    background: rgba(14,124,123,0.1);
    color: var(--circuit-dark);
    border-radius: 999px;
    padding: 0.25rem 0.65rem;
    font-size: 0.8rem;
    margin: 0.15rem;
    text-decoration: none;
}

    .ts-filter-active:hover {
        background: rgba(14,124,123,0.18);
    }

/* ---------- Product grid & card ---------- */
.ts-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
    gap: 1.25rem;
}

.ts-card {
    background: var(--paper-raised);
    border: 1px solid var(--wire-light);
    border-radius: var(--radius-md);
    overflow: hidden;
    box-shadow: var(--shadow-card);
    transition: box-shadow 0.15s ease, transform 0.15s ease;
    display: flex;
    flex-direction: column;
    height: 100%;
}

    .ts-card:hover {
        box-shadow: var(--shadow-card-hover);
        transform: translateY(-2px);
    }

.ts-card-media {
    aspect-ratio: 4 / 3;
    background: var(--paper);
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

    .ts-card-media img {
        width: 100%;
        height: 100%;
        object-fit: contain;
        padding: 1rem;
    }

.ts-card-body {
    padding: 0.9rem 1rem 1rem;
    display: flex;
    flex-direction: column;
    flex-grow: 1;
}

.ts-card-brand {
    font-family: var(--font-mono);
    font-size: 0.7rem;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--wire);
    margin-bottom: 0.15rem;
}

.ts-card-name {
    font-weight: 600;
    font-size: 0.95rem;
    color: var(--ink);
    text-decoration: none;
    line-height: 1.3;
}

    .ts-card-name:hover {
        color: var(--circuit);
    }

.ts-card-footer {
    margin-top: auto;
    padding-top: 0.75rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.ts-price {
    font-family: var(--font-mono);
    font-weight: 600;
    font-size: 1.05rem;
    color: var(--ink);
}

.ts-price-was {
    font-family: var(--font-mono);
    font-size: 0.8rem;
    color: var(--wire);
    text-decoration: line-through;
    margin-right: 0.35rem;
}

.ts-badge-stock {
    font-size: 0.7rem;
    font-weight: 600;
    padding: 0.2rem 0.5rem;
    border-radius: 999px;
}

.ts-badge-in {
    background: rgba(47,174,102,0.12);
    color: var(--success);
}

.ts-badge-out {
    background: rgba(214,69,69,0.1);
    color: var(--danger);
}

.ts-rating {
    font-size: 0.75rem;
    color: var(--signal);
}

.ts-empty {
    text-align: center;
    padding: 4rem 1rem;
    color: var(--wire);
}

    .ts-empty h3 {
        font-family: var(--font-display);
        color: var(--ink);
    }

/* ---------- Pagination ---------- */
.ts-pagination {
    display: flex;
    justify-content: center;
    gap: 0.35rem;
    margin-top: 2rem;
    font-family: var(--font-mono);
}

    .ts-pagination a, .ts-pagination span {
        min-width: 2.25rem;
        text-align: center;
        padding: 0.4rem 0.5rem;
        border-radius: var(--radius-sm);
        text-decoration: none;
        color: var(--ink);
        border: 1px solid transparent;
    }

        .ts-pagination a:hover {
            border-color: var(--wire-light);
        }

    .ts-pagination .active {
        background: var(--ink);
        color: #fff;
    }

    .ts-pagination .disabled {
        color: var(--wire-light);
        pointer-events: none;
    }

/* ---------- Product details page ---------- */
.ts-gallery-main {
    border: 1px solid var(--wire-light);
    border-radius: var(--radius-md);
    background: var(--paper-raised);
    aspect-ratio: 1 / 1;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

    .ts-gallery-main img {
        max-width: 100%;
        max-height: 100%;
        object-fit: contain;
    }

.ts-thumb-strip {
    display: flex;
    gap: 0.5rem;
    margin-top: 0.75rem;
}

.ts-thumb {
    width: 64px;
    height: 64px;
    border: 1px solid var(--wire-light);
    border-radius: var(--radius-sm);
    overflow: hidden;
    cursor: pointer;
    background: var(--paper-raised);
}

    .ts-thumb img {
        width: 100%;
        height: 100%;
        object-fit: contain;
        padding: 0.3rem;
    }

    .ts-thumb.active {
        border-color: var(--circuit);
        box-shadow: 0 0 0 2px rgba(14,124,123,0.15);
    }

.ts-detail-brand {
    font-family: var(--font-mono);
    text-transform: uppercase;
    letter-spacing: 0.08em;
    font-size: 0.8rem;
    color: var(--circuit);
}

.ts-detail-name {
    font-family: var(--font-display);
    font-size: 1.85rem;
    margin: 0.25rem 0 0.5rem;
}

.ts-detail-price {
    font-family: var(--font-mono);
    font-size: 1.75rem;
    font-weight: 600;
}

.ts-variant-option {
    border: 1px solid var(--wire-light);
    border-radius: var(--radius-sm);
    padding: 0.55rem 0.9rem;
    cursor: pointer;
    font-size: 0.85rem;
}

    .ts-variant-option.active {
        border-color: var(--circuit);
        background: rgba(14,124,123,0.06);
    }

    .ts-variant-option[aria-disabled="true"] {
        opacity: 0.45;
        cursor: not-allowed;
        text-decoration: line-through;
    }

.ts-btn-primary {
    background: var(--circuit);
    border-color: var(--circuit);
    color: #fff;
    font-weight: 600;
    border-radius: var(--radius-sm);
}

    .ts-btn-primary:hover {
        background: var(--circuit-dark);
        border-color: var(--circuit-dark);
        color: #fff;
    }

    .ts-btn-primary:disabled {
        background: var(--wire-light);
        border-color: var(--wire-light);
        color: var(--wire);
    }

/* Signature element: spec sheet with dotted leaders, like a datasheet printout */
.ts-spec-sheet {
    font-family: var(--font-mono);
    font-size: 0.88rem;
}

.ts-spec-row {
    display: flex;
    align-items: baseline;
    gap: 0.5rem;
    padding: 0.5rem 0;
    border-bottom: 1px dashed var(--wire-light);
}

    .ts-spec-row:last-child {
        border-bottom: none;
    }

.ts-spec-key {
    color: var(--wire);
    white-space: nowrap;
}

.ts-spec-leader {
    flex-grow: 1;
    border-bottom: 1px dotted var(--wire-light);
    transform: translateY(-4px);
}

.ts-spec-value {
    color: var(--ink);
    font-weight: 500;
    white-space: nowrap;
}

.ts-review-card {
    border-bottom: 1px solid var(--wire-light);
    padding: 1rem 0;
}

.ts-review-verified {
    font-size: 0.7rem;
    color: var(--success);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}
.ts-dropzone {
    border: 2px dashed var(--wire-light);
    border-radius: var(--radius-md);
    background: var(--paper);
    transition: border-color 0.15s ease, background 0.15s ease;
}

.ts-dropzone-active {
    border-color: var(--circuit);
    background: rgba(14,124,123,0.05);
}

.ts-dropzone-label {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.25rem;
    padding: 1.75rem 1rem;
    cursor: pointer;
    color: var(--wire);
    margin: 0;
    text-align: center;
}

    .ts-dropzone-label svg {
        color: var(--circuit);
        margin-bottom: 0.25rem;
    }

    .ts-dropzone-label span:first-of-type {
        color: var(--ink);
        font-weight: 500;
        font-size: 0.9rem;
    }

.ts-new-image, .ts-existing-image {
    width: 96px;
    border: 1px solid var(--wire-light);
    border-radius: var(--radius-sm);
    background: var(--paper-raised);
    padding: 0.4rem;
    position: relative;
    text-align: center;
}

    .ts-new-image img, .ts-existing-image img {
        width: 100%;
        height: 64px;
        object-fit: contain;
        display: block;
    }

.ts-new-image-name {
    display: block;
    font-size: 0.65rem;
    color: var(--wire);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    margin-top: 0.25rem;
}

.ts-new-image-remove {
    position: absolute;
    top: -8px;
    right: -8px;
    width: 22px;
    height: 22px;
    border-radius: 50%;
    border: 1px solid var(--danger);
    background: #fff;
    color: var(--danger);
    font-size: 0.7rem;
    line-height: 1;
    padding: 0;
    cursor: pointer;
}

.ts-existing-image-remove {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.3rem;
    font-size: 0.7rem;
    color: var(--danger);
    margin-top: 0.3rem;
    cursor: pointer;
}

.ts-existing-image-badge {
    position: absolute;
    top: -8px;
    left: -8px;
    background: var(--circuit);
    color: #fff;
    font-size: 0.6rem;
    font-weight: 600;
    padding: 0.1rem 0.4rem;
    border-radius: 999px;
}