/* ==========================================================================
   Ecommerce — Tech Product Directory
   Design aligné avec le thème Osmova : fond blanc, accent violet #6646ff
   ========================================================================== */

:root {
    --ecom-accent:       #6646ff;
    --ecom-accent-dark:  #5035d4;
    --ecom-accent-light: #f0edff;
    --ecom-text:         #111827;
    --ecom-text-muted:   #6b7280;
    --ecom-border:       #e5e7eb;
    --ecom-bg:           #f9fafb;
    --ecom-white:        #ffffff;
    --ecom-radius:       12px;
    --ecom-radius-sm:    8px;
    --ecom-shadow:       0 1px 3px rgba(0,0,0,0.07), 0 4px 16px rgba(0,0,0,0.05);
    --ecom-shadow-hover: 0 4px 8px rgba(0,0,0,0.06), 0 12px 32px rgba(0,0,0,0.10);
    --ecom-max:          1100px;
}

/* ── Boutons partagés ── */
.ecom-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px 24px;
    border-radius: 9999px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    border: none;
    text-decoration: none;
    transition: background 0.2s, transform 0.15s, box-shadow 0.2s;
    font-family: inherit;
    letter-spacing: 0.01em;
}

.ecom-btn--primary {
    background: var(--ecom-accent);
    color: #fff;
    box-shadow: 0 2px 10px rgba(102,70,255,0.28);
}

.ecom-btn--primary:hover {
    background: var(--ecom-accent-dark);
    transform: translateY(-1px);
    box-shadow: 0 4px 18px rgba(102,70,255,0.35);
    color: #fff;
    text-decoration: none;
}

.ecom-btn--outline {
    background: transparent;
    color: var(--ecom-accent);
    border: 1.5px solid var(--ecom-accent);
}

.ecom-btn--outline:hover {
    background: var(--ecom-accent-light);
    text-decoration: none;
    color: var(--ecom-accent);
}

/* ── Tags partagés ── */
.ecom-tag {
    display: inline-block;
    padding: 3px 10px;
    background: var(--ecom-accent-light);
    color: var(--ecom-accent);
    border-radius: 100px;
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 0.01em;
}

/* ─────────────────────────────────────────────
   ARCHIVE — page principale /tech-products/
───────────────────────────────────────────── */

.ecom-directory-page {
    background: var(--ecom-white);
}

/* Wrapper de largeur cohérent avec le reste du site */
.ecom-wrap {
    width: 100%;
    max-width: var(--ecom-max);
    margin: 0 auto;
    padding: 0 1.5rem;
}

/* ── Header ── */
.ecom-dir-header {
    border-bottom: 1px solid var(--ecom-border);
    padding: 64px 0 48px;
    background: var(--ecom-white);
}

.ecom-dir-header-inner {
    max-width: var(--ecom-max);
    margin: 0 auto;
    padding: 0 1.5rem;
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 2rem;
    align-items: end;
}

.ecom-dir-header-left {}

.ecom-eyebrow {
    display: inline-block;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--ecom-accent);
    margin-bottom: 14px;
}

.ecom-eyebrow--link {
    color: var(--ecom-text-muted);
    text-decoration: none;
    font-size: 13px;
    letter-spacing: 0;
    text-transform: none;
    font-weight: 500;
}

.ecom-eyebrow--link:hover {
    color: var(--ecom-accent);
}

.ecom-dir-title {
    font-size: clamp(28px, 4vw, 44px);
    font-weight: 900;
    color: var(--ecom-text);
    line-height: 1.1;
    margin: 0 0 12px;
    letter-spacing: -0.02em;
}

.ecom-dir-subtitle {
    font-size: 16px;
    color: var(--ecom-text-muted);
    margin: 0;
    line-height: 1.6;
    max-width: 480px;
}

.ecom-dir-header-right {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 16px;
    flex-shrink: 0;
}

.ecom-dir-stats {
    display: flex;
    gap: 32px;
    text-align: right;
}

.ecom-dir-stat {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.ecom-dir-stat-num {
    font-size: 28px;
    font-weight: 800;
    color: var(--ecom-accent);
    line-height: 1;
    letter-spacing: -0.02em;
}

.ecom-dir-stat-label {
    font-size: 12px;
    color: var(--ecom-text-muted);
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

/* ── Filtres ── */
.ecom-dir-filters {
    background: var(--ecom-white);
    border-bottom: 1px solid var(--ecom-border);
    position: sticky;
    top: 0;
    z-index: 100;
}

.ecom-dir-filters-inner {
    max-width: var(--ecom-max);
    margin: 0 auto;
    padding: 0 1.5rem;
    display: flex;
    gap: 0;
    overflow-x: auto;
    scrollbar-width: none;
    -ms-overflow-style: none;
}

.ecom-dir-filters-inner::-webkit-scrollbar { display: none; }

.ecom-filter-pill {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 14px 16px;
    font-size: 14px;
    font-weight: 500;
    color: var(--ecom-text-muted);
    text-decoration: none;
    white-space: nowrap;
    border-bottom: 2px solid transparent;
    margin-bottom: -1px;
    transition: color 0.2s, border-color 0.2s;
}

.ecom-filter-pill:hover {
    color: var(--ecom-text);
    text-decoration: none;
}

.ecom-filter-pill.active {
    color: var(--ecom-accent);
    border-bottom-color: var(--ecom-accent);
    font-weight: 600;
}

.ecom-filter-count {
    background: var(--ecom-bg);
    color: var(--ecom-text-muted);
    border-radius: 10px;
    padding: 1px 6px;
    font-size: 11px;
    font-weight: 600;
}

.ecom-filter-pill.active .ecom-filter-count {
    background: var(--ecom-accent-light);
    color: var(--ecom-accent);
}

/* ── Contenu ── */
.ecom-dir-content {
    max-width: var(--ecom-max);
    margin: 0 auto;
    padding: 40px 1.5rem 80px;
}

/* ── Liste produits (rows) ── */
.ecom-products-grid {
    display: flex;
    flex-direction: column;
    border: 1px solid var(--ecom-border);
    border-radius: var(--ecom-radius);
    overflow: hidden;
}

.ecom-product-card {
    background: var(--ecom-white);
    border-bottom: 1px solid var(--ecom-border);
    transition: background 0.2s;
}

.ecom-product-card:last-child {
    border-bottom: none;
}

.ecom-product-card:hover {
    background: var(--ecom-bg);
}

.ecom-card-link {
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 16px;
    padding: 18px 20px;
    text-decoration: none;
    color: inherit;
}

.ecom-card-link:hover {
    text-decoration: none;
    color: inherit;
}

/* Logo/image carré compact */
.ecom-card-image-wrap {
    position: relative;
    width: 56px;
    height: 56px;
    flex-shrink: 0;
    border-radius: 12px;
    border: 1px solid var(--ecom-border);
    overflow: hidden;
    background: var(--ecom-bg);
}

.ecom-card-image {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: contain;
    display: block;
    padding: 4px;
    background: var(--ecom-white);
}

.ecom-card-image-placeholder {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, var(--ecom-accent) 0%, var(--ecom-accent-dark) 100%);
}

.ecom-card-image-placeholder span {
    font-size: 18px;
    font-weight: 900;
    color: #fff;
    letter-spacing: -1px;
}

.ecom-badge-new {
    display: inline-flex;
    align-items: center;
    background: #16a34a;
    color: #fff;
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    padding: 2px 8px;
    border-radius: 9999px;
    flex-shrink: 0;
}

/* Corps de la carte */
.ecom-card-body {
    flex: 1;
    min-width: 0;
}

.ecom-card-cat {
    display: inline-block;
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 0.07em;
    text-transform: uppercase;
    color: var(--ecom-accent);
    margin-bottom: 4px;
}

.ecom-card-title {
    font-size: 15px;
    font-weight: 700;
    color: var(--ecom-text);
    margin: 0 0 4px;
    line-height: 1.3;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.ecom-card-desc {
    font-size: 13px;
    color: var(--ecom-text-muted);
    line-height: 1.5;
    margin: 0;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.ecom-card-tags { display: none; } /* masqué dans ce layout compact */

/* Pied de carte */
.ecom-card-footer {
    flex-shrink: 0;
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 4px;
}

.ecom-card-date {
    font-size: 11px;
    color: var(--ecom-text-muted);
    white-space: nowrap;
}

.ecom-card-visit {
    font-size: 13px;
    font-weight: 600;
    color: var(--ecom-accent);
}

/* ── Pagination ── */
.ecom-pagination {
    margin-top: 48px;
    display: flex;
    justify-content: center;
    gap: 8px;
    flex-wrap: wrap;
}

.ecom-pagination .page-numbers {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border-radius: var(--ecom-radius-sm);
    border: 1.5px solid var(--ecom-border);
    font-size: 14px;
    font-weight: 600;
    color: var(--ecom-text-muted);
    text-decoration: none;
    transition: all 0.2s;
}

.ecom-pagination .page-numbers:hover,
.ecom-pagination .page-numbers.current {
    background: var(--ecom-accent);
    border-color: var(--ecom-accent);
    color: #fff;
}

.ecom-pagination .prev,
.ecom-pagination .next {
    width: auto;
    padding: 0 16px;
}

/* ── État vide ── */
.ecom-no-results {
    text-align: center;
    padding: 80px 40px;
    color: var(--ecom-text-muted);
}

.ecom-no-results-icon svg {
    width: 48px;
    height: 48px;
    margin: 0 auto 20px;
    display: block;
    color: var(--ecom-border);
}

.ecom-no-results h2 {
    font-size: 20px;
    font-weight: 700;
    color: var(--ecom-text);
    margin: 0 0 10px;
}

.ecom-no-results p { margin: 0 0 24px; }

/* ─────────────────────────────────────────────
   SINGLE — /tech-products/product-name/
───────────────────────────────────────────── */

.ecom-single-page {
    background: var(--ecom-white);
}

/* Breadcrumb */
.ecom-breadcrumb {
    max-width: var(--ecom-max);
    margin: 0 auto;
    padding: 20px 1.5rem 0;
    font-size: 13px;
    color: var(--ecom-text-muted);
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

.ecom-breadcrumb a {
    color: var(--ecom-text-muted);
    text-decoration: none;
    transition: color 0.2s;
}

.ecom-breadcrumb a:hover { color: var(--ecom-accent); }
.ecom-breadcrumb [aria-current="page"] { color: var(--ecom-text); font-weight: 500; }

/* Layout single */
.ecom-single-layout {
    max-width: var(--ecom-max);
    margin: 0 auto;
    padding: 32px 1.5rem 80px;
    display: grid;
    grid-template-columns: 1fr 300px;
    gap: 40px;
    align-items: start;
}

/* Colonne principale */
.ecom-single-main { min-width: 0; }

/* Hero produit : logo + titre côte-à-côte */
.ecom-single-hero {
    display: flex;
    align-items: flex-start;
    gap: 24px;
    padding-bottom: 32px;
    border-bottom: 1px solid var(--ecom-border);
    margin-bottom: 32px;
}

.ecom-single-logo-wrap {
    position: relative;
    width: 80px;
    height: 80px;
    flex-shrink: 0;
    border-radius: 18px;
    border: 1px solid var(--ecom-border);
    overflow: hidden;
    background: var(--ecom-bg);
    display: flex;
    align-items: center;
    justify-content: center;
}

.ecom-single-logo {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: contain;
    padding: 8px;
    background: var(--ecom-white);
}

.ecom-single-logo-placeholder {
    font-size: 28px;
    font-weight: 900;
    color: var(--ecom-accent);
    letter-spacing: -1px;
}

.ecom-single-header { flex: 1; min-width: 0; }

.ecom-single-cat {
    display: inline-block;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.07em;
    text-transform: uppercase;
    color: var(--ecom-accent);
    text-decoration: none;
    margin-bottom: 8px;
}

.ecom-single-cat:hover { text-decoration: underline; }

.ecom-single-title {
    font-size: clamp(24px, 3.5vw, 36px);
    font-weight: 900;
    color: var(--ecom-text);
    line-height: 1.15;
    margin: 0 0 10px;
    letter-spacing: -0.02em;
}

.ecom-single-tagline {
    font-size: 16px;
    color: var(--ecom-text-muted);
    line-height: 1.55;
    margin: 0 0 20px;
}

.ecom-btn--visit {
    font-size: 14px;
    padding: 10px 20px;
}

/* Description */
.ecom-single-desc {
    background: var(--ecom-bg);
    border-radius: var(--ecom-radius);
    padding: 28px;
    border: 1px solid var(--ecom-border);
}

.ecom-single-desc-title {
    font-size: 16px;
    font-weight: 700;
    color: var(--ecom-text);
    margin: 0 0 14px;
}

.ecom-single-desc-content {
    font-size: 15px;
    color: var(--ecom-text-muted);
    line-height: 1.7;
}

.ecom-single-desc-content p { margin: 0 0 14px; }
.ecom-single-desc-content p:last-child { margin-bottom: 0; }

/* Sidebar */
.ecom-single-sidebar {
    display: flex;
    flex-direction: column;
    gap: 16px;
    position: sticky;
    top: 24px;
    align-self: start;
}

.ecom-sidebar-card {
    background: var(--ecom-white);
    border-radius: var(--ecom-radius);
    padding: 20px;
    border: 1px solid var(--ecom-border);
}

.ecom-sidebar-card--cta {
    background: var(--ecom-accent-light);
    border-color: rgba(102,70,255,0.2);
}

.ecom-sidebar-title {
    font-size: 14px;
    font-weight: 700;
    color: var(--ecom-text);
    margin: 0 0 14px;
}

.ecom-sidebar-cta-title {
    font-size: 15px;
    font-weight: 700;
    color: var(--ecom-text);
    margin: 0 0 6px;
}

.ecom-sidebar-card--cta p {
    font-size: 13px;
    color: var(--ecom-text-muted);
    margin: 0 0 14px;
    line-height: 1.5;
}

.ecom-sidebar-row {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 12px;
    padding: 9px 0;
    border-bottom: 1px solid var(--ecom-border);
}

.ecom-sidebar-row:first-of-type { border-top: 1px solid var(--ecom-border); }

.ecom-sidebar-key {
    font-size: 13px;
    font-weight: 500;
    color: var(--ecom-text-muted);
    flex-shrink: 0;
}

.ecom-sidebar-val {
    font-size: 13px;
    color: var(--ecom-text);
    font-weight: 500;
    text-align: right;
}

.ecom-sidebar-val--link {
    color: var(--ecom-accent);
    text-decoration: none;
}

.ecom-sidebar-val--link:hover {
    text-decoration: underline;
    color: var(--ecom-accent-dark);
}

.ecom-sidebar-val--truncate {
    max-width: 140px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.ecom-sidebar-tags { padding: 10px 0; }

.ecom-sidebar-tags .ecom-sidebar-key {
    display: block;
    margin-bottom: 10px;
}

.ecom-tags-list {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.ecom-btn--sidebar-visit {
    width: 100%;
    margin-top: 14px;
    justify-content: center;
}

/* Produits similaires */
.ecom-similar-section {
    border-top: 1px solid var(--ecom-border);
    padding: 48px 1.5rem;
    background: var(--ecom-bg);
}

.ecom-similar-inner {
    max-width: var(--ecom-max);
    margin: 0 auto;
}

.ecom-similar-title {
    font-size: 22px;
    font-weight: 800;
    color: var(--ecom-text);
    margin: 0 0 28px;
    letter-spacing: -0.01em;
}

/* ─────────────────────────────────────────────
   Badges tier
───────────────────────────────────────────── */

.ecom-badge-featured {
    display: inline-flex;
    align-items: center;
    background: linear-gradient(135deg, #f59e0b, #d97706);
    color: #fff;
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    padding: 2px 8px;
    border-radius: 9999px;
    flex-shrink: 0;
}

.ecom-badge-pro {
    display: inline-flex;
    align-items: center;
    background: var(--ecom-accent);
    color: #fff;
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    padding: 2px 8px;
    border-radius: 9999px;
    flex-shrink: 0;
}

.ecom-card-meta {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 4px;
}


/* ─────────────────────────────────────────────
   Featured section (archive)
───────────────────────────────────────────── */

.ecom-featured-section {
    background: linear-gradient(135deg, #fffbeb 0%, #fef3c7 100%);
    border-top: 1px solid #fde68a;
    border-bottom: 1px solid #fde68a;
    padding: 40px 0;
    margin-bottom: 8px;
}

.ecom-featured-section-inner {
    max-width: var(--ecom-max);
    margin: 0 auto;
    padding: 0 1.5rem;
}

.ecom-featured-section-header {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 24px;
}

.ecom-featured-section-icon {
    font-size: 20px;
    color: #d97706;
}

.ecom-featured-section-title {
    font-size: 18px;
    font-weight: 800;
    color: #92400e;
    margin: 0;
    letter-spacing: -0.01em;
}

.ecom-product-card--featured {
    border-color: #fde68a;
    background: linear-gradient(135deg, #fffdf5 0%, #fffbeb 100%);
}

.ecom-product-card--featured:hover {
    border-color: #f59e0b;
    box-shadow: 0 4px 8px rgba(245,158,11,0.08), 0 12px 32px rgba(245,158,11,0.12);
}

/* ─────────────────────────────────────────────
   Key features (single)
───────────────────────────────────────────── */

.ecom-single-features {
    background: var(--ecom-bg);
    border-radius: var(--ecom-radius);
    padding: 28px;
    border: 1px solid var(--ecom-border);
    margin-top: 20px;
}

.ecom-single-features-title {
    font-size: 16px;
    font-weight: 700;
    color: var(--ecom-text);
    margin: 0 0 16px;
}

.ecom-features-list {
    list-style: none;
    padding: 0;
    margin: 0;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
}

.ecom-features-item {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    font-size: 14px;
    color: var(--ecom-text-muted);
    line-height: 1.45;
}

.ecom-features-check {
    color: var(--ecom-accent);
    font-weight: 700;
    flex-shrink: 0;
    font-size: 14px;
}

/* ─────────────────────────────────────────────
   Video embed (single)
───────────────────────────────────────────── */

.ecom-single-video {
    background: var(--ecom-bg);
    border-radius: var(--ecom-radius);
    padding: 28px;
    border: 1px solid var(--ecom-border);
    margin-top: 20px;
}

.ecom-single-video-title {
    font-size: 16px;
    font-weight: 700;
    color: var(--ecom-text);
    margin: 0 0 16px;
}

.ecom-video-embed {
    position: relative;
    padding-bottom: 56.25%;
    height: 0;
    overflow: hidden;
    border-radius: var(--ecom-radius-sm);
}

.ecom-video-embed iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border: 0;
}

/* ─────────────────────────────────────────────
   Tier badge (single header)
───────────────────────────────────────────── */

.ecom-single-tier-badges {
    margin-bottom: 8px;
}

.ecom-single-tier-badges .ecom-badge-featured,
.ecom-single-tier-badges .ecom-badge-pro {
    position: static;
    display: inline-block;
}

/* ─────────────────────────────────────────────
   Responsive
───────────────────────────────────────────── */

@media (max-width: 900px) {
    .ecom-dir-header-inner {
        grid-template-columns: 1fr;
        gap: 24px;
    }

    .ecom-dir-header-right {
        align-items: flex-start;
        flex-direction: row;
        flex-wrap: wrap;
        gap: 16px;
    }

    .ecom-dir-stats { text-align: left; }

    .ecom-single-layout {
        grid-template-columns: 1fr;
    }

    .ecom-single-sidebar { position: static; }
}

@media (max-width: 640px) {
    .ecom-dir-header { padding: 40px 0 32px; }

    .ecom-products-grid {
        grid-template-columns: 1fr;
    }

    .ecom-single-hero {
        flex-direction: column;
        gap: 16px;
    }

    .ecom-single-layout { padding: 20px 1rem 60px; }

    .ecom-features-list {
        grid-template-columns: 1fr;
    }
}
