/* ============================================
   NETECS CUSTOM CSS – Bootstrap 5 Override
   Replaces Tailwind's input.css + output.css
   ============================================ */

/* ---------- CSS Variables (Brand Colors) ---------- */
:root {
    --primary-50: #f0f2ff;
    --primary-100: #e1e5ff;
    --primary-200: #bfc8ff;
    --primary-300: #9cabff;
    --primary-400: #7d91ff;
    --primary-500: #5d77ff;
    --primary-600: #4a60e6;
    --primary-700: #384acd;
    --primary-800: #2735b3;
    --primary-900: #17219a;

    --accent: #dd2831;
    --accent-hover: #c0222a;

    --dark: #1b1b1b;
    --dark-muted: #666666;

    --bs-font-sans-serif: "Plus Jakarta Sans", Inter, system-ui, -apple-system, sans-serif;
    --bs-body-font-family: var(--bs-font-sans-serif);
    --bs-body-bg: #f5f5f5;
    --bs-body-color: var(--dark);
    --bs-link-color: var(--primary-500);
    --bs-link-hover-color: var(--primary-600);
}

/* ---------- Base ---------- */
html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--bs-font-sans-serif);
    background-color: var(--bs-body-bg);
    color: var(--dark);
    -webkit-font-smoothing: antialiased;
}

h1 {
    font-size: 32px;
    font-weight: 700;
    color: var(--dark);
}
h2 {
    font-size: 24px;
    font-weight: 700;
    color: var(--dark);
}
h3 {
    font-size: 20px;
    font-weight: 700;
    color: var(--dark);
}
h4 {
    font-size: 18px;
    font-weight: 700;
    color: var(--dark);
}
h5 {
    font-size: 18px;
    font-weight: 700;
    color: var(--dark);
}
h6 {
    font-weight: 700;
    color: var(--dark);
}
p {
    font-size: 18px;
    font-weight: 400;
}

a {
    transition: color 0.2s ease;
}

/* ---------- Container ---------- */
.container-custom {
    max-width: 1280px;
    margin-left: auto;
    margin-right: auto;
    padding-left: 0.5rem;
    padding-right: 0.5rem;
}
@media (min-width: 576px) {
    .container-custom {
        padding-left: 1rem;
        padding-right: 1rem;
    }
}
@media (min-width: 992px) {
    .container-custom {
        padding-left: 1.5rem;
        padding-right: 1.5rem;
    }
}

/* ---------- Section ---------- */
.section {
    padding-top: 4rem;
    padding-bottom: 4rem;
}
@media (min-width: 992px) {
    .section {
        padding-top: 5rem;
        padding-bottom: 5rem;
    }
}

/* ---------- Buttons ---------- */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.75rem 1.5rem;
    font-weight: 700;
    font-size: 0.875rem;
    border-radius: 0.5rem;
    transition: all 0.3s ease;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    text-decoration: none;
    border: none;
    cursor: pointer;
}
.btn-primary {
    background-color: var(--primary-500);
    color: #fff;
    box-shadow: 0 4px 6px rgba(93, 119, 255, 0.25);
}
.btn-primary:hover {
    background-color: var(--primary-600);
    color: #fff;
    box-shadow: 0 6px 12px rgba(93, 119, 255, 0.3);
}
.btn-secondary {
    background-color: var(--dark);
    color: #fff;
}
.btn-secondary:hover {
    background-color: #333;
    color: #fff;
}

.btn-accent {
    background-color: var(--accent);
    color: #fff;
    box-shadow: 0 4px 6px rgba(221, 40, 49, 0.25);
}
.btn-accent:hover {
    background-color: var(--accent-hover);
    color: #fff;
    box-shadow: 0 6px 12px rgba(221, 40, 49, 0.3);
}
.btn-outline {
    border: 2px solid var(--primary-500);
    color: var(--primary-500);
    background: transparent;
}
.btn-outline:hover {
    background-color: var(--primary-500);
    color: #fff;
}
.btn-ghost {
    background: transparent;
    color: var(--dark);
    border: 1px solid #e5e7eb;
}
.btn-ghost:hover {
    background: #f9fafb;
    color: var(--dark);
}

/* ---------- Cards ---------- */
.card {
    background-color: #fff;
    border-radius: 0.75rem;
    box-shadow: 0 0 20px 0 rgba(0, 0, 0, 0.05);
    overflow: hidden;
    transition: all 0.3s ease;
    border: none;
}
.card-hover:hover {
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.12);
    transform: translateY(-4px);
}

/* ---------- Product Card ---------- */
.product-card {
    background-color: #fff;
    border-radius: 2px;
    border: 1px solid transparent;
    transition: all 0.3s ease;
    position: relative;
    display: block;
    text-decoration: none;
}
.product-card:hover {
    border-color: rgba(93, 119, 255, 0.2);
    box-shadow: 0 0 20px 0 rgba(0, 0, 0, 0.05);
}
.product-card-image {
    aspect-ratio: 1 / 1;
    overflow: hidden;
    background-color: #f9fafb;
    padding: 1rem;
}
.product-card-image img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}
.product-card-body {
    padding: 1rem 1rem 0.25rem;
}
.product-card-category {
    font-size: 0.75rem;
    color: var(--dark-muted);
    display: block;
    margin-bottom: 0.25rem;
    text-decoration: none;
    transition: color 0.2s;
}
.product-card-category:hover {
    color: var(--primary-500);
}

.product-card-title {
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--dark);
    margin-bottom: 0.5rem;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    line-height: 1.25;
    height: 2.25rem;
    transition: color 0.2s;
    text-decoration: none;
}
.product-card-title:hover {
    color: var(--primary-500);
}

.product-card-price {
    font-size: 1rem;
    font-weight: 700;
    color: var(--accent);
    margin: 0;
}
.product-card-price-hidden {
    font-size: 1rem;
    font-weight: 700;
    color: var(--dark-muted);
    margin: 0;
}
.product-card-old-price {
    font-size: 0.875rem;
    color: var(--dark-muted);
    text-decoration: line-through;
    margin-left: 0.5rem;
    font-weight: 400;
}

/* ---------- Category Card ---------- */
.category-card {
    background-color: #fff;
    border-radius: 0.5rem;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.07);
    border: 1px solid #f3f4f6;
    transition: all 0.3s ease;
    text-align: center;
    padding: 1rem;
    text-decoration: none;
    display: block;
}
.category-card:hover {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    border-color: var(--primary-500);
}
.category-card-image {
    width: 3rem;
    height: 3rem;
    margin: 0 auto 0.75rem;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--primary-500);
    font-size: 1.5rem;
}
.category-card-title {
    font-size: 0.875rem;
    font-weight: 700;
    color: var(--dark);
    text-transform: uppercase;
    letter-spacing: -0.025em;
}

/* ---------- Article Card ---------- */
.article-card {
    background-color: #fff;
    border-radius: 0.75rem;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.07);
    overflow: hidden;
    transition: all 0.3s ease;
    display: flex;
    flex-direction: column;
    height: 100%;
    text-decoration: none;
}
.article-card:hover {
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.12);
    transform: translateY(-4px);
}
.article-card-image {
    width: 100%;
    object-fit: cover;
    display: block;
}
.article-card-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}
.article-card-body {
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
    flex-grow: 1;
}
.article-card-title {
    font-size: 1.125rem;
    font-weight: 700;
    color: var(--dark);
    margin-bottom: 0.75rem;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    line-height: 1.25;
}
.article-card-excerpt {
    font-size: 0.875rem;
    color: var(--dark-muted);
    line-height: 1.6;
}

/* ---------- Breadcrumb ---------- */
.breadcrumb {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.875rem;
    color: #6b7280;
    list-style: none;
    padding: 0;
    margin: 0;
    flex-wrap: wrap;
}
.breadcrumb-link {
    color: #6b7280;
    text-decoration: none;
    transition: color 0.2s;
}
.breadcrumb-link:hover {
    color: var(--primary-500);
}
.breadcrumb-divider {
    color: #d1d5db;
}
.breadcrumb-current {
    color: var(--dark);
    font-weight: 500;
}

/* ---------- Pagination ---------- */
.pagination {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    flex-wrap: wrap;
}
.pagination-btn {
    width: 2.5rem;
    height: 2.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 0.5rem;
    color: #4b5563;
    background: #fff;
    border: 1px solid #e5e7eb;
    text-decoration: none;
    transition: all 0.2s;
    font-size: 0.875rem;
}
.pagination-btn:hover {
    background: #f3f4f6;
    color: var(--dark);
    border-color: #d1d5db;
}
.pagination-btn-active {
    background-color: var(--primary-500) !important;
    color: #fff !important;
    border-color: var(--primary-500) !important;
}
.pagination-btn-active:hover {
    background-color: var(--primary-600) !important;
}

/* ---------- Badge ---------- */
.badge {
    display: inline-flex;
    align-items: center;
    padding: 0.25rem 0.75rem;
    border-radius: 9999px;
    font-size: 0.75rem;
    font-weight: 500;
}
.badge-primary {
    background-color: var(--primary-100);
    color: var(--primary-700);
}
.badge-success {
    background-color: #dcfce7;
    color: #15803d;
}
.badge-warning {
    background-color: #fef9c3;
    color: #a16207;
}

/* ---------- Nav Link ---------- */
.nav-link {
    color: #4b5563;
    font-weight: 500;
    padding: 0.5rem 1rem;
    transition: color 0.2s;
    text-decoration: none;
}
.nav-link:hover {
    color: var(--primary-500);
}
.nav-link-active {
    color: var(--primary-600);
}

/* ---------- Input ---------- */
.input {
    width: 100%;
    padding: 0.65rem 1rem;
    border: 1px solid #e5e7eb;
    border-radius: 0.5rem;
    font-size: 0.875rem;
    outline: none;
    transition:
        border-color 0.2s,
        box-shadow 0.2s;
    color: var(--dark);
    background: #fff;
}
.input:focus {
    border-color: var(--primary-500);
    box-shadow: 0 0 0 3px rgba(93, 119, 255, 0.15);
}
.input-label {
    display: block;
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--dark);
    margin-bottom: 0.375rem;
}

/* ---------- Spinner ---------- */
.spinner {
    width: 2rem;
    height: 2rem;
    border: 4px solid var(--primary-100);
    border-top-color: var(--primary-500);
    border-radius: 50%;
    animation: spin 0.7s linear infinite;
}
@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

/* ---------- Gradient Text ---------- */
.gradient-text {
    background: linear-gradient(to right, var(--primary-500), var(--primary-700));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* ---------- Tab Button ---------- */
.tab-btn {
    padding: 1rem 0.25rem;
    border: none;
    border-bottom: 2px solid transparent;
    color: #6b7280;
    font-weight: 500;
    background: transparent;
    cursor: pointer;
    transition: all 0.2s;
}
.tab-btn:hover {
    color: #374151;
}
.tab-btn.active {
    border-bottom-color: var(--primary-600);
    color: var(--primary-600);
}

/* ---------- Prose (rich content) ---------- */
.prose {
    max-width: none;
    line-height: 1.75;
    color: var(--dark);
}
.prose h1,
.prose h2,
.prose h3,
.prose h4 {
    margin-top: 1.5em;
    margin-bottom: 0.75em;
}
.prose p {
    margin-bottom: 1em;
    font-size: 1rem;
}
.prose ul,
.prose ol {
    padding-left: 1.5rem;
    margin-bottom: 1em;
}
.prose li {
    margin-bottom: 0.25em;
}
.prose img {
    border-radius: 0.5rem;
    max-width: 100%;
    height: auto;
    margin: 1rem 0;
}
.prose a {
    color: var(--primary-600);
    text-decoration: underline;
}
.prose table {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 1em;
}
.prose th,
.prose td {
    padding: 0.5rem 0.75rem;
    border: 1px solid #e5e7eb;
}
.prose th {
    background: #f9fafb;
    font-weight: 700;
}

/* ---------- Utility Helpers ---------- */
/* Aspect ratios */
.aspect-square {
    aspect-ratio: 1 / 1;
}
.aspect-video {
    aspect-ratio: 16 / 9;
}

/* Line clamp */
.line-clamp-2 {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}
.line-clamp-3 {
    display: -webkit-box;
    -webkit-line-clamp: 3;
    line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* Object fit */
.object-contain {
    object-fit: contain;
}
.object-cover {
    object-fit: cover;
}

/* Min height */
.min-vh-100 {
    min-height: 100vh;
}

/* Text colors */
.text-primary-500 {
    color: var(--primary-500) !important;
}
.text-primary-600 {
    color: var(--primary-600) !important;
}
.text-primary-700 {
    color: var(--primary-700) !important;
}
.text-accent {
    color: var(--accent) !important;
}
.text-dark {
    color: var(--dark) !important;
}
.text-dark-muted {
    color: var(--dark-muted) !important;
}

/* Background colors */
.bg-primary-50 {
    background-color: var(--primary-50) !important;
}
.bg-primary-100 {
    background-color: var(--primary-100) !important;
}
.bg-primary-500 {
    background-color: var(--primary-500) !important;
}
.bg-primary-600 {
    background-color: var(--primary-600) !important;
}
.bg-accent {
    background-color: var(--accent) !important;
}
.bg-dark {
    background-color: var(--dark) !important;
}

/* Border colors */
.border-primary-500 {
    border-color: var(--primary-500) !important;
}
.border-primary-200 {
    border-color: var(--primary-200) !important;
}

/* Hover utilities (used inline via group classes) */
.hover-scale:hover {
    transform: scale(1.05);
}
.hover-translate-up:hover {
    transform: translateY(-4px);
}
.transition-transform {
    transition: transform 0.3s ease;
}
.transition-all {
    transition: all 0.3s ease;
}
.transition-colors {
    transition:
        color 0.2s ease,
        background-color 0.2s ease,
        border-color 0.2s ease;
}
.transition-shadow {
    transition: box-shadow 0.3s ease;
}

/* Grayscale */
.grayscale {
    filter: grayscale(100%);
}

/* Gap utilities (supplement Bootstrap) */
.gap-1 {
    gap: 0.25rem !important;
}
.gap-2 {
    gap: 0.5rem !important;
}
.gap-3 {
    gap: 0.75rem !important;
}
.gap-4 {
    gap: 1rem !important;
}
.gap-6 {
    gap: 1.5rem !important;
}
.gap-8 {
    gap: 2rem !important;
}

/* Whitespace */
.whitespace-nowrap {
    white-space: nowrap;
}

/* Tracking */
.tracking-widest {
    letter-spacing: 0.1em;
}
.tracking-wider {
    letter-spacing: 0.075em;
}
.tracking-tighter {
    letter-spacing: -0.025em;
}

/* Flex shrink */
.flex-shrink-0 {
    flex-shrink: 0 !important;
}

/* Pointer events */
.pointer-events-none {
    pointer-events: none;
}

/* Z-index helpers */
.z-10 {
    z-index: 10;
}
.z-50 {
    z-index: 50;
}
.z-100 {
    z-index: 100;
}

/* Group hover effects (replicated via CSS sibling/parent selectors) */
.group:hover .group-hover\:scale-105 {
    transform: scale(1.05);
}
.group:hover .group-hover\:scale-110 {
    transform: scale(1.1);
}
.group:hover .group-hover\:translate-x-1 {
    transform: translateX(0.25rem);
}
.group:hover .group-hover\:text-primary-500 {
    color: var(--primary-500);
}
.group:hover .group-hover\:text-primary-600 {
    color: var(--primary-600);
}
.group:hover .group-hover\:text-primary-700 {
    color: var(--primary-700);
}
.group:hover .group-hover\:shadow-xl {
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.12);
}
.group:hover .group-hover\:border-primary-500 {
    border-color: var(--primary-500);
}
.group:hover .group-hover\:opacity-90 {
    opacity: 0.9;
}
.group:hover .group-hover\:-translate-y-1 {
    transform: translateY(-0.25rem);
}
.group:hover .group-hover\:-translate-y-2 {
    transform: translateY(-0.5rem);
}
.group:hover .group-hover\:shadow-2xl {
    box-shadow: 0 25px 50px rgba(0, 0, 0, 0.15);
}
/* Scale X */
.group:hover .group-hover\:scale-x-100 {
    transform: scaleX(1) !important;
}

/* Row-cols helpers (supplement Bootstrap) */
@media (min-width: 576px) {
    .row-cols-sm-3 > * {
        flex: 0 0 auto;
        width: 33.3333%;
    }
}

/* Sticky top with custom offset */
.sticky-top-24 {
    position: sticky;
    top: 6rem;
    z-index: 10;
}

/* Rounded custom */
.rounded-2xl {
    border-radius: 1rem !important;
}
.rounded-3xl {
    border-radius: 1.5rem !important;
}
.rounded-xl {
    border-radius: 0.75rem !important;
}

/* Shadow */
.shadow-xl {
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.12) !important;
}
.shadow-2xl {
    box-shadow: 0 25px 50px rgba(0, 0, 0, 0.15) !important;
}
.shadow-ecomall {
    box-shadow: 0 0 20px 0 rgba(0, 0, 0, 0.05) !important;
}
.shadow-sm {
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.07) !important;
}

/* bg-secondary-800 (used in blog CTA) */
.bg-secondary-800 {
    background-color: #1e3a5f;
}
.text-secondary-800 {
    color: #1e3a5f;
}

/* accent-50, accent-100, accent-500 (services) */
.bg-accent-50 {
    background-color: #fff0f0;
}
.bg-accent-100 {
    background-color: #fde0e1;
}
.text-accent-600 {
    color: #c0222a;
}
.border-accent-500 {
    border-color: var(--accent);
}
.bg-accent-600 {
    background-color: #c0222a;
}
.bg-accent-800 {
    background-color: #8b1a20;
}

/* Min width 0 */
.min-w-0 {
    min-width: 0;
}

/* Opacity */
.opacity-10 {
    opacity: 0.1;
}
.opacity-60 {
    opacity: 0.6;
}
.opacity-90 {
    opacity: 0.9;
}

/* Overflow hidden always visible in Bootstrap reset - ensure it works */
.overflow-hidden {
    overflow: hidden !important;
}

/* Scale X 0 (for animated accent lines) */
.scale-x-0 {
    transform: scaleX(0);
    transform-origin: left;
    transition: transform 0.3s ease;
}

/* Leading */
.leading-none {
    line-height: 1;
}
.leading-tight {
    line-height: 1.25;
}
.leading-relaxed {
    line-height: 1.625;
}

/* Gradient gradients used in templates */
.bg-gradient-primary {
    background: linear-gradient(135deg, var(--primary-600) 0%, var(--primary-700) 50%, var(--primary-900) 100%);
}

/* Product section: flex widths */
.w-25-lg {
    width: 25%;
}
.w-75-lg {
    width: 75%;
}
@media (max-width: 991.98px) {
    .w-25-lg,
    .w-75-lg {
        width: 100%;
    }
}

/* Mobile menu overlay */
#mobile-menu {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: 100;
}
#mobile-menu.show {
    display: block;
}

/* ---------- Header Search Bar ---------- */
.header-search-form {
    width: 100%;
}
.header-search-wrap {
    position: relative;
    display: flex;
    align-items: center;
    background: #fff;
    border: 2px solid #e5e7eb;
    border-radius: 9999px;
    overflow: hidden;
    transition: border-color 0.25s ease, box-shadow 0.25s ease;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
}
.header-search-wrap:focus-within {
    border-color: var(--primary-500);
    box-shadow: 0 0 0 4px rgba(93, 119, 255, 0.12), 0 2px 8px rgba(0, 0, 0, 0.08);
}
.header-search-icon {
    position: absolute;
    left: 1.25rem;
    color: #9ca3af;
    font-size: 0.9rem;
    pointer-events: none;
    transition: color 0.2s;
}
.header-search-wrap:focus-within .header-search-icon {
    color: var(--primary-500);
}
.header-search-input {
    flex: 1;
    border: none;
    outline: none;
    background: transparent;
    padding: 0.8rem 1rem 0.8rem 3rem;
    font-size: 0.9rem;
    color: var(--dark);
    min-width: 0;
}
.header-search-input::placeholder {
    color: #9ca3af;
}
.header-search-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    border: none;
    cursor: pointer;
    background: linear-gradient(135deg, var(--primary-500), var(--primary-700));
    color: #fff;
    font-weight: 700;
    font-size: 0.8rem;
    letter-spacing: 0.08em;
    padding: 0.75rem 1.75rem;
    border-radius: 9999px;
    margin: 0.25rem;
    transition: all 0.25s ease;
    white-space: nowrap;
    flex-shrink: 0;
}
.header-search-btn:hover {
    background: linear-gradient(135deg, var(--primary-600), var(--primary-800));
    box-shadow: 0 4px 14px rgba(93, 119, 255, 0.4);
    transform: scale(1.03);
}
