﻿/* ============================================================
   HavocTech Armory — Vendor Storefront & Directory Styles
   Uses vs-* prefix to avoid collisions
   Inherits design tokens from site-futuristic.css (--htf-*)
   ============================================================ */

/* ============================================================
   VENDOR THEME CUSTOM PROPERTIES
   Vendors can override --vs-primary, --vs-accent, --vs-font
   via inline style on .vs-storefront.
   ============================================================ */

.vs-storefront {
    --vs-primary: var(--htf-primary, #0a0f1a);
    --vs-accent: var(--htf-accent, #00d4ff);
    --vs-font: var(--htf-font, 'Inter', sans-serif);
    min-height: 100vh;
    font-family: var(--vs-font);
}

.vs-hero {
    position: relative;
    padding: clamp(4rem, 8vw, 7rem) 0 clamp(3rem, 5vw, 5rem);
    background: var(--htf-primary-light);
    overflow: hidden;
}

.vs-hero--has-banner {
    min-height: 340px;
}

.vs-hero-banner {
    position: absolute;
    inset: 0;
    background-size: cover;
    background-position: center;
    filter: brightness(0.35);
    z-index: 0;
}

.vs-hero-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, rgba(10, 15, 26, 0.5) 0%, var(--vs-primary) 100%);
    z-index: 1;
}

.vs-hero .container {
    position: relative;
    z-index: 2;
}

.vs-hero-content {
    display: flex;
    align-items: center;
    gap: 2rem;
}

.vs-hero-logo-wrap {
    flex-shrink: 0;
    width: 100px;
    height: 100px;
    border-radius: 1rem;
    background: var(--htf-glass-bg);
    border: 1px solid var(--htf-glass-border);
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    backdrop-filter: blur(10px);
}

.vs-hero-logo {
    width: 80%;
    height: 80%;
    object-fit: contain;
}

.vs-hero-logo-placeholder {
    font-size: 2.5rem;
    color: var(--vs-accent);
}

.vs-hero-text {
    flex: 1;
}

.vs-hero-title {
    font-size: clamp(1.75rem, 4vw, 2.5rem);
    font-weight: 700;
    color: var(--htf-text-primary);
    margin: 0 0 0.35rem;
}

.vs-hero-tagline {
    font-size: 1.1rem;
    color: var(--htf-text-secondary);
    margin: 0 0 1rem;
}

.vs-hero-stats {
    display: flex;
    flex-wrap: wrap;
    gap: 1.25rem;
}

.vs-hero-stat {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    font-size: 0.9rem;
    color: var(--htf-text-secondary);
}

.vs-hero-link {
    color: var(--vs-accent);
    text-decoration: none;
    transition: color var(--htf-transition-fast, 0.2s);
}

.vs-hero-link:hover {
    color: var(--htf-accent-secondary);
}

/* ============================================================
   ABOUT SECTION
   ============================================================ */

.vs-about {
    padding: 2.5rem 0 1.5rem;
}

.vs-about-content {
    background: var(--htf-glass-bg);
    border: 1px solid var(--htf-glass-border);
    border-radius: 1rem;
    padding: 2rem;
    color: var(--htf-text-secondary);
    line-height: 1.7;
    font-size: 0.95rem;
}

.vs-about-content h2,
.vs-about-content h3 {
    color: var(--htf-text-primary);
    margin-top: 1.5rem;
}

.vs-about-content p:last-child {
    margin-bottom: 0;
}

/* ============================================================
   CONTACT SECTION
   ============================================================ */

.vs-contact {
    padding: 1.5rem 0;
}

.vs-contact-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
}

.vs-contact-item {
    display: inline-flex;
    align-items: center;
    gap: 0.6rem;
    padding: 0.6rem 1.1rem;
    background: var(--htf-glass-bg);
    border: 1px solid var(--htf-glass-border);
    border-radius: 0.75rem;
    color: var(--htf-text-secondary);
    font-size: 0.88rem;
    text-decoration: none;
    transition: all var(--htf-transition-fast, 0.2s);
}

a.vs-contact-item:hover {
    border-color: var(--vs-accent);
    color: var(--vs-accent);
    background: rgba(0, 212, 255, 0.05);
}

.vs-contact-item i {
    color: var(--vs-accent);
    font-size: 1rem;
}

/* ============================================================
   TOOLBAR (Sort + Count + Search)
   ============================================================ */

.vs-toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 1rem;
    padding: 1.5rem 0;
    border-bottom: 1px solid var(--htf-glass-border);
    margin-bottom: 2rem;
}

.vs-toolbar-info {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.vs-result-count {
    color: var(--htf-text-muted);
    font-size: 0.88rem;
}

.vs-toolbar-actions {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.vs-search-form {
    display: flex;
    gap: 0;
}

.vs-search-input {
    background: var(--htf-glass-bg);
    border: 1px solid var(--htf-glass-border);
    border-right: 0;
    border-radius: 0.5rem 0 0 0.5rem;
    color: var(--htf-text-primary);
    padding: 0.35rem 0.75rem;
    font-size: 0.85rem;
    outline: none;
    width: 180px;
    transition: border-color var(--htf-transition-fast, 0.2s);
}

.vs-search-input:focus {
    border-color: var(--vs-accent);
}

.vs-search-input::placeholder {
    color: var(--htf-text-muted);
}

.vs-search-btn {
    background: var(--htf-glass-bg);
    border: 1px solid var(--htf-glass-border);
    border-left: 0;
    border-radius: 0 0.5rem 0.5rem 0;
    color: var(--htf-text-secondary);
    padding: 0.35rem 0.65rem;
    cursor: pointer;
    transition: color var(--htf-transition-fast, 0.2s);
}

.vs-search-btn:hover {
    color: var(--vs-accent);
}

/* ============================================================
   CONTENT LAYOUT (Sidebar + Products)
   ============================================================ */

.vs-content-layout {
    display: grid;
    grid-template-columns: 240px 1fr;
    gap: 2rem;
    align-items: start;
}

.vs-sidebar {
    position: sticky;
    top: 5rem;
}

.vs-sidebar-section {
    background: var(--htf-glass-bg);
    border: 1px solid var(--htf-glass-border);
    border-radius: 1rem;
    padding: 1.25rem;
    margin-bottom: 1.25rem;
}

.vs-sidebar-title {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--htf-text-primary);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 0.75rem;
}

.vs-category-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.vs-category-item {
    margin-bottom: 0.15rem;
}

.vs-category-link {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.45rem 0.65rem;
    border-radius: 0.5rem;
    color: var(--htf-text-secondary);
    text-decoration: none;
    font-size: 0.88rem;
    transition: all var(--htf-transition-fast, 0.2s);
}

.vs-category-link:hover {
    background: rgba(0, 212, 255, 0.06);
    color: var(--vs-accent);
}

.vs-category-link.active {
    background: rgba(0, 212, 255, 0.1);
    color: var(--vs-accent);
    font-weight: 600;
}

.vs-category-count {
    font-size: 0.75rem;
    background: var(--htf-glass-bg);
    border: 1px solid var(--htf-glass-border);
    padding: 0.1rem 0.45rem;
    border-radius: 999px;
    color: var(--htf-text-muted);
}

.vs-category-link.active .vs-category-count {
    background: rgba(0, 212, 255, 0.15);
    border-color: rgba(0, 212, 255, 0.3);
    color: var(--vs-accent);
}

.vs-main-content {
    min-width: 0;
}

/* ============================================================
   PRODUCT GRID
   ============================================================ */

.vs-products {
    margin-bottom: 2rem;
}

.vs-empty {
    padding: 3rem 0;
}

/* ============================================================
   PAGINATION
   ============================================================ */

.vs-pagination {
    padding: 2rem 0 3rem;
}

.vs-pagination .page-link {
    background: var(--htf-glass-bg);
    border-color: var(--htf-glass-border);
    color: var(--htf-text-secondary);
}

.vs-pagination .page-item.active .page-link {
    background: var(--vs-accent);
    border-color: var(--vs-accent);
    color: #000;
}

.vs-pagination .page-item.disabled .page-link {
    background: transparent;
    border-color: var(--htf-glass-border);
    color: var(--htf-text-muted);
}

/* ============================================================
   VENDOR DIRECTORY PAGE
   ============================================================ */

.vs-directory {
    padding: clamp(3rem, 6vw, 5rem) 0;
}

.vs-directory-header {
    text-align: center;
    margin-bottom: 2.5rem;
}

.vs-directory-header h1 {
    font-size: clamp(1.75rem, 4vw, 2.5rem);
    font-weight: 700;
    color: var(--htf-text-primary);
    margin-bottom: 0.5rem;
}

.vs-directory-header p {
    color: var(--htf-text-secondary);
    font-size: 1.05rem;
    max-width: 600px;
    margin: 0 auto;
}

.vs-directory-search {
    display: flex;
    justify-content: center;
    margin-bottom: 2.5rem;
}

.vs-directory-search-form {
    display: flex;
    gap: 0;
    width: 100%;
    max-width: 480px;
}

.vs-directory-search-input {
    flex: 1;
    background: var(--htf-glass-bg);
    border: 1px solid var(--htf-glass-border);
    border-right: 0;
    border-radius: 0.75rem 0 0 0.75rem;
    color: var(--htf-text-primary);
    padding: 0.65rem 1rem;
    font-size: 0.95rem;
    outline: none;
    transition: border-color var(--htf-transition-fast, 0.2s);
}

.vs-directory-search-input:focus {
    border-color: var(--vs-accent);
}

.vs-directory-search-input::placeholder {
    color: var(--htf-text-muted);
}

.vs-directory-search-btn {
    background: var(--vs-accent);
    border: 1px solid var(--vs-accent);
    border-radius: 0 0.75rem 0.75rem 0;
    color: #000;
    padding: 0.65rem 1.25rem;
    font-weight: 600;
    cursor: pointer;
    transition: opacity var(--htf-transition-fast, 0.2s);
}

.vs-directory-search-btn:hover {
    opacity: 0.85;
}

.vs-directory-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 1.5rem;
}

.vs-directory-card {
    display: flex;
    flex-direction: column;
    background: var(--htf-glass-bg);
    border: 1px solid var(--htf-glass-border);
    border-radius: 1rem;
    padding: 1.5rem;
    text-decoration: none;
    color: inherit;
    transition: all var(--htf-transition-medium, 0.3s);
}

.vs-directory-card:hover {
    border-color: var(--vs-accent);
    transform: translateY(-4px);
    box-shadow: 0 8px 32px rgba(0, 212, 255, 0.08);
}

.vs-directory-card-logo {
    width: 64px;
    height: 64px;
    border-radius: 0.75rem;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--htf-glass-border);
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    margin-bottom: 1rem;
}

.vs-directory-card-logo img {
    width: 80%;
    height: 80%;
    object-fit: contain;
}

.vs-directory-card-logo i {
    font-size: 1.5rem;
    color: var(--vs-accent);
}

.vs-directory-card-name {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--htf-text-primary);
    margin-bottom: 0.35rem;
}

.vs-directory-card-tagline {
    font-size: 0.85rem;
    color: var(--htf-text-secondary);
    margin-bottom: 0.75rem;
    line-height: 1.4;
    flex: 1;
}

.vs-directory-card-meta {
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-size: 0.8rem;
    color: var(--htf-text-muted);
    padding-top: 0.75rem;
    border-top: 1px solid var(--htf-glass-border);
}

.vs-directory-card-meta i {
    margin-right: 0.3rem;
}

.vs-directory-card-products {
    color: var(--vs-accent);
    font-weight: 600;
}

.vs-directory-empty {
    text-align: center;
    padding: 4rem 0;
    color: var(--htf-text-muted);
}

.vs-directory-empty i {
    font-size: 3rem;
    margin-bottom: 1rem;
    display: block;
}

.vs-directory-count {
    text-align: center;
    color: var(--htf-text-muted);
    font-size: 0.88rem;
    margin-bottom: 1.5rem;
}

/* ============================================================
   RESPONSIVE
   ============================================================ */

@media (max-width: 991.98px) {
    .vs-content-layout {
        grid-template-columns: 1fr;
    }

    .vs-sidebar {
        position: static;
    }
}

@media (max-width: 767.98px) {
    .vs-hero-content {
        flex-direction: column;
        text-align: center;
    }

    .vs-hero-stats {
        justify-content: center;
    }

    .vs-toolbar {
        flex-direction: column;
        align-items: stretch;
    }

    .vs-toolbar-actions {
        justify-content: space-between;
    }

    .vs-search-input {
        width: 100%;
        flex: 1;
    }

    .vs-contact-grid {
        flex-direction: column;
    }
}

/* ============================================================
   LIGHT THEME OVERRIDES
   ============================================================ */

[data-theme="light"] .vs-hero {
    background: #f1f5f9;
}

[data-theme="light"] .vs-hero-overlay {
    background: linear-gradient(180deg, rgba(241, 245, 249, 0.3) 0%, #f8fafc 100%);
}

[data-theme="light"] .vs-hero-title {
    color: #1e293b;
}

[data-theme="light"] .vs-hero-tagline {
    color: #64748b;
}

[data-theme="light"] .vs-hero-stat {
    color: #64748b;
}

[data-theme="light"] .vs-about-content {
    background: #ffffff;
    border-color: #e2e8f0;
    color: #475569;
}

[data-theme="light"] .vs-about-content h2,
[data-theme="light"] .vs-about-content h3 {
    color: #1e293b;
}

[data-theme="light"] .vs-sidebar-section {
    background: #ffffff;
    border-color: #e2e8f0;
}

[data-theme="light"] .vs-sidebar-title {
    color: #1e293b;
}

[data-theme="light"] .vs-category-link {
    color: #475569;
}

[data-theme="light"] .vs-category-count {
    background: #f1f5f9;
    border-color: #e2e8f0;
    color: #64748b;
}

[data-theme="light"] .vs-contact-item {
    background: #ffffff;
    border-color: #e2e8f0;
    color: #475569;
}

[data-theme="light"] .vs-directory-card {
    background: #ffffff;
    border-color: #e2e8f0;
}

[data-theme="light"] .vs-directory-card-name {
    color: #1e293b;
}

[data-theme="light"] .vs-directory-card-tagline {
    color: #64748b;
}

[data-theme="light"] .vs-directory-search-input {
    background: #ffffff;
    border-color: #e2e8f0;
    color: #1e293b;
}

[data-theme="light"] .vs-pagination .page-link {
    background: #ffffff;
    border-color: #e2e8f0;
    color: #475569;
}

[data-theme="light"] .vs-toolbar {
    border-bottom-color: #e2e8f0;
}
