/* ============================================================
   Bynect Case Studies — Frontend Styles
   Author: BYNECT TECHNOLOGIES
   Primary: #3A7AD9
   ============================================================ */

:root {
    --bynect-primary:       #3A7AD9;
    --bynect-primary-dark:  #2d63b8;
    --bynect-primary-light: #eef4ff;
    --bynect-primary-rgb:   58, 122, 217;
}

*, *::before, *::after { box-sizing: border-box; }

/* ════════════════════════════════════════════════════════════
   LISTING PAGE  [bynect_case_studies]
   ════════════════════════════════════════════════════════════ */

.bynect-cs-listing {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    max-width: 1100px;
    margin: 0 auto;
    padding: 0 16px 60px;
}

/* ════════════════════════════════════════════════════════════
   SEARCH BAR
   ════════════════════════════════════════════════════════════ */

.bynect-cs-searchbar-wrap {
    margin-bottom: 40px;
}

.bynect-cs-searchbar {
    display: flex;
    align-items: center;
    width: 100%;
    background: #fff;
    border: 1.5px solid #e2e8f0;
    border-radius: 16px;
    padding: 6px 6px 6px 18px;
    gap: 0;
    box-shadow: 0 2px 16px rgba(0,0,0,.06);
    transition: border-color .2s, box-shadow .2s;
}
.bynect-cs-searchbar:focus-within {
    border-color: var(--bynect-primary);
    box-shadow: 0 2px 20px rgba(var(--bynect-primary-rgb), .14);
}

/* Search icon */
.bynect-cs-search-icon {
    color: #94a3b8;
    display: flex;
    align-items: center;
    flex-shrink: 0;
    margin-right: 10px;
    transition: color .2s;
}
.bynect-cs-searchbar:focus-within .bynect-cs-search-icon {
    color: var(--bynect-primary);
}

/* Input */
.bynect-cs-search-input {
    flex: 1;
    border: none;
    outline: none;
    font-size: 15px;
    color: #1e293b;
    background: transparent;
    padding: 10px 0;
    min-width: 0;
    font-family: inherit;
}
.bynect-cs-search-input::placeholder { color: #94a3b8; }

/* Clear button */
.bynect-cs-search-clear {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    border: none;
    background: #f1f5f9;
    color: #64748b;
    cursor: pointer;
    flex-shrink: 0;
    margin: 0 6px;
    transition: background .15s, color .15s;
}
.bynect-cs-search-clear:hover {
    background: #e2e8f0;
    color: #1e293b;
}

/* Divider */
.bynect-cs-bar-divider {
    width: 1px;
    height: 28px;
    background: #e2e8f0;
    flex-shrink: 0;
    margin: 0 4px;
}

/* ── Category Dropdown ───────────────────────────────────── */
.bynect-cs-dropdown-wrap {
    position: relative;
    flex-shrink: 0;
}

.bynect-cs-dropdown-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: var(--bynect-primary-light);
    color: var(--bynect-primary);
    border: none;
    border-radius: 12px;
    padding: 10px 16px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    white-space: nowrap;
    transition: background .15s;
    font-family: inherit;
}
.bynect-cs-dropdown-btn:hover,
.bynect-cs-dropdown-btn.active {
    background: rgba(var(--bynect-primary-rgb), .15);
}

.bynect-cs-dropdown-arrow {
    transition: transform .2s;
    flex-shrink: 0;
}
.bynect-cs-dropdown-btn.active .bynect-cs-dropdown-arrow {
    transform: rotate(180deg);
}

/* Dropdown menu */
.bynect-cs-dropdown-menu {
    display: none;
    position: absolute;
    top: calc(100% + 8px);
    right: 0;
    min-width: 200px;
    background: #fff;
    border: 1.5px solid #e2e8f0;
    border-radius: 14px;
    box-shadow: 0 8px 32px rgba(0,0,0,.12);
    z-index: 999;
    overflow: hidden;
    padding: 6px;
}
.bynect-cs-dropdown-menu.open { display: block; }

.bynect-cs-dropdown-item {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 12px;
    border-radius: 10px;
    font-size: 14px;
    color: #374151;
    cursor: pointer;
    transition: background .15s;
    font-weight: 500;
}
.bynect-cs-dropdown-item:hover {
    background: var(--bynect-primary-light);
    color: var(--bynect-primary);
}
.bynect-cs-dropdown-item.selected {
    color: var(--bynect-primary);
    font-weight: 700;
}

.bynect-cs-dropdown-check {
    width: 18px;
    height: 18px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    color: var(--bynect-primary);
}

.bynect-cs-dropdown-count {
    margin-left: auto;
    font-size: 12px;
    color: #94a3b8;
    font-weight: 500;
}

/* Results info */
.bynect-cs-results-info {
    margin-top: 12px;
    font-size: 13px;
    color: #64748b;
    padding-left: 4px;
    min-height: 20px;
}
.bynect-cs-results-info strong { color: #1e293b; }

/* ── Skeleton loader ─────────────────────────────────────── */
.bynect-cs-skeleton-wrap {
    display: contents;
}
.bynect-cs-skeleton {
    border-radius: 20px;
    aspect-ratio: 1 / 1;
    background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
    background-size: 200% 100%;
    animation: bynect-shimmer 1.4s infinite;
}
@keyframes bynect-shimmer {
    0%   { background-position: 200% 0; }
    100% { background-position: -200% 0; }
}

/* ── Cards Grid ──────────────────────────────────────────── */
.bynect-cs-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
    margin-bottom: 48px;
}

@media (max-width: 900px) {
    .bynect-cs-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 560px) {
    .bynect-cs-grid { grid-template-columns: 1fr; }
}

/* ── Single Card ─────────────────────────────────────────── */
.bynect-cs-card {
    position: relative;
    border-radius: 20px;
    overflow: hidden;
    cursor: pointer;
    aspect-ratio: 1 / 1;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    padding: 18px;
    transition: transform .28s ease, box-shadow .28s ease;

    /* Thumbnail as background image */
    background-size: cover;
    background-position: center center;
    background-repeat: no-repeat;
}
.bynect-cs-card:hover {
    transform: translateY(-6px) scale(1.01);
    box-shadow: 0 24px 56px rgba(0,0,0,.22);
}

/* Doodle pattern overlay */
.bynect-cs-card-pattern {
    position: absolute;
    inset: 0;
    pointer-events: none;
    z-index: 1;
    background-image: url("data:image/svg+xml,%3Csvg width='200' height='200' viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' stroke='%23ffffff' stroke-width='1.2' opacity='0.10'%3E%3Ccircle cx='30' cy='30' r='18'/%3E%3Ccircle cx='170' cy='30' r='14'/%3E%3Ccircle cx='30' cy='170' r='14'/%3E%3Ccircle cx='170' cy='170' r='18'/%3E%3Cpath d='M60 20 Q80 5 100 20 Q120 35 140 20'/%3E%3Cpath d='M20 80 Q35 60 50 80 Q65 100 80 80'/%3E%3Crect x='140' y='130' width='30' height='30' rx='4' transform='rotate(15 155 145)'/%3E%3Cpath d='M10 140 L30 120 L50 140 L30 160 Z'/%3E%3Ccircle cx='100' cy='100' r='8'/%3E%3Cpath d='M85 60 Q100 45 115 60'/%3E%3Cpath d='M150 80 Q165 65 180 80'/%3E%3Cpath d='M20 110 L40 90'/%3E%3Cpath d='M160 150 L180 130'/%3E%3C/g%3E%3C/svg%3E");
    background-size: 200px 200px;
    background-repeat: repeat;
    /* More visible when no thumb, subtle when thumb present */
}
.bynect-cs-card.has-thumb .bynect-cs-card-pattern {
    opacity: .35;
}
.bynect-cs-card.no-thumb .bynect-cs-card-pattern {
    opacity: .8;
}

/* Top gradient shadow — ensures title is readable over any image */
.bynect-cs-card-shadow-top {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 45%;
    background: linear-gradient(
        to bottom,
        rgba(0,0,0,.62) 0%,
        rgba(0,0,0,.28) 60%,
        rgba(0,0,0,0)   100%
    );
    pointer-events: none;
    z-index: 2;
    border-radius: 20px 20px 0 0;
}

/* Bottom gradient shadow — ensures pills are readable */
.bynect-cs-card-shadow-bottom {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 45%;
    background: linear-gradient(
        to top,
        rgba(0,0,0,.65) 0%,
        rgba(0,0,0,.25) 60%,
        rgba(0,0,0,0)   100%
    );
    pointer-events: none;
    z-index: 2;
    border-radius: 0 0 20px 20px;
}

/* Top: Project Name */
.bynect-cs-card-top {
    position: relative;
    z-index: 3;
}
.bynect-cs-card-name {
    font-size: 15px;
    font-weight: 800;
    color: #fff;
    text-shadow: 0 1px 6px rgba(0,0,0,.4);
    letter-spacing: .2px;
    line-height: 1.3;
    display: block;
}

/* Bottom: Category Pills */
.bynect-cs-card-bottom {
    position: relative;
    z-index: 3;
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}
.bynect-cs-card-tag {
    display: inline-block;
    background: rgba(255,255,255,.92);
    color: #222;
    font-size: 11px;
    font-weight: 700;
    padding: 5px 13px;
    border-radius: 50px;
    backdrop-filter: blur(6px);
    letter-spacing: .3px;
    text-transform: capitalize;
    box-shadow: 0 1px 4px rgba(0,0,0,.12);
    transition: background .15s;
}
.bynect-cs-card:hover .bynect-cs-card-tag {
    background: rgba(255,255,255,1);
}

/* ── Load More ───────────────────────────────────────────── */
.bynect-cs-loadmore-wrap {
    display: flex;
    justify-content: center;
    margin-top: 8px;
}
.bynect-cs-loadmore-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: var(--bynect-primary, #3A7AD9);
    color: #fff;
    border: none;
    padding: 14px 44px;
    border-radius: 50px;
    font-size: 13px;
    font-weight: 700;
    letter-spacing: 1.5px;
    text-transform: uppercase;
    cursor: pointer;
    transition: background .2s, transform .2s, box-shadow .2s;
    box-shadow: 0 4px 16px rgba(var(--bynect-primary-rgb, 58,122,217), .35);
}
.bynect-cs-loadmore-btn:hover {
    background: var(--bynect-primary-dark, #2d63b8);
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(var(--bynect-primary-rgb, 58,122,217), .4);
}
.bynect-cs-loadmore-btn:disabled {
    opacity: .6;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}
.bynect-cs-loadmore-spinner svg {
    animation: bynect-spin 1s linear infinite;
    display: block;
}
@keyframes bynect-spin {
    from { transform: rotate(0deg); }
    to   { transform: rotate(360deg); }
}

/* ── Empty State ─────────────────────────────────────────── */
.bynect-cs-empty {
    grid-column: 1 / -1;
    text-align: center;
    padding: 80px 20px;
    color: #aaa;
    font-size: 16px;
}


/* ════════════════════════════════════════════════════════════
   DETAILS PAGE  [bynect_case_study_details]
   ════════════════════════════════════════════════════════════ */

.bynect-csd-wrap {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    color: #1a1a1a;
}

/* ── Hero Section ────────────────────────────────────────── */
.bynect-csd-hero {
    background: #f0f0f8;   /* light lavender — matches reference */
    position: relative;
    padding: 60px 0 0;
    overflow: hidden;
}

.bynect-csd-hero-inner {
    max-width: 1100px;
    margin: 0 auto;
    padding: 0 40px 60px;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 60px;
    align-items: center;
}

@media (max-width: 768px) {
    .bynect-csd-hero-inner {
        grid-template-columns: 1fr;
        gap: 36px;
        padding: 0 20px 50px;
    }
}

/* Back link */
.bynect-csd-back {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    color: #888;
    text-decoration: none;
    font-size: 13px;
    font-weight: 500;
    margin-bottom: 20px;
    transition: color .2s;
}
.bynect-csd-back:hover { color: #333; }

/* Client label */
.bynect-csd-client-label {
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 1.5px;
    text-transform: uppercase;
    color: #888;
    margin: 0 0 8px;
}

/* Big heading */
.bynect-csd-heading {
    font-size: clamp(36px, 6vw, 64px);
    font-weight: 800;
    color: #111;
    margin: 0 0 20px;
    line-height: 1.1;
    letter-spacing: -1px;
}

/* Short description */
.bynect-csd-short-desc {
    font-size: 15px;
    line-height: 1.75;
    color: #555;
    margin: 0 0 28px;
    max-width: 420px;
}

/* Preview button */
.bynect-csd-preview-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: var(--bynect-primary, #3A7AD9);
    color: #fff;
    text-decoration: none;
    padding: 12px 26px;
    border-radius: 50px;
    font-size: 14px;
    font-weight: 600;
    transition: background .2s, transform .2s, box-shadow .2s;
    box-shadow: 0 4px 16px rgba(58,122,217,.3);
}
.bynect-csd-preview-btn:hover {
    background: #2d63b8;
    color: #fff;
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(58,122,217,.4);
}

/* ── Thumbnail Card (right side) ─────────────────────────── */
.bynect-csd-thumb-card {
    position: relative;
    border-radius: 24px;
    overflow: hidden;
    aspect-ratio: 1 / 1;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 16px 48px rgba(0,0,0,.12);
}

.bynect-csd-thumb-pattern {
    position: absolute;
    inset: 0;
    pointer-events: none;
    z-index: 0;
    background-image: url("data:image/svg+xml,%3Csvg width='200' height='200' viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' stroke='%23ffffff' stroke-width='1.2' opacity='0.12'%3E%3Ccircle cx='30' cy='30' r='18'/%3E%3Ccircle cx='170' cy='30' r='14'/%3E%3Ccircle cx='30' cy='170' r='14'/%3E%3Ccircle cx='170' cy='170' r='18'/%3E%3Cpath d='M60 20 Q80 5 100 20 Q120 35 140 20'/%3E%3Cpath d='M20 80 Q35 60 50 80 Q65 100 80 80'/%3E%3Crect x='140' y='130' width='30' height='30' rx='4' transform='rotate(15 155 145)'/%3E%3Cpath d='M10 140 L30 120 L50 140 L30 160 Z'/%3E%3Ccircle cx='100' cy='100' r='8'/%3E%3Cpath d='M85 60 Q100 45 115 60'/%3E%3Cpath d='M150 80 Q165 65 180 80'/%3E%3Cpath d='M20 110 L40 90'/%3E%3Cpath d='M160 150 L180 130'/%3E%3C/g%3E%3C/svg%3E");
    background-size: 200px 200px;
    background-repeat: repeat;
    opacity: .7;
}

.bynect-csd-thumb-img {
    position: relative;
    z-index: 1;
    max-width: 72%;
    max-height: 72%;
    width: auto;
    height: auto;
    object-fit: contain;
    display: block;
    filter: drop-shadow(0 6px 20px rgba(0,0,0,.2));
}

.bynect-csd-thumb-empty {
    position: relative;
    z-index: 1;
    opacity: .4;
}

/* ── Wave Divider ────────────────────────────────────────── */
.bynect-csd-wave {
    line-height: 0;
    margin-top: -2px;
}
.bynect-csd-wave svg {
    display: block;
    width: 100%;
    height: 60px;
}

/* ── About Section ───────────────────────────────────────── */
.bynect-csd-about {
    background: #fff;
    padding: 60px 0 50px;
}
.bynect-csd-about-inner {
    max-width: 760px;
    margin: 0 auto;
    padding: 0 40px;
}

@media (max-width: 768px) {
    .bynect-csd-about-inner { padding: 0 20px; }
}

.bynect-csd-about-label {
    font-size: 11px;
    font-weight: 800;
    letter-spacing: 2px;
    text-transform: uppercase;
    color: #aaa;
    margin: 0 0 20px;
}

.bynect-csd-about-text {
    font-size: 18px;
    line-height: 1.85;
    color: #222;
    font-weight: 500;
}
.bynect-csd-about-text p {
    margin: 0 0 20px;
}
.bynect-csd-about-text p:last-child { margin-bottom: 0; }
.bynect-csd-about-text strong { font-weight: 800; }

/* ── Gallery Section ─────────────────────────────────────── */
.bynect-csd-gallery-section {
    background: #f8f8fb;
    padding: 60px 0;
}
.bynect-csd-gallery-inner {
    max-width: 1100px;
    margin: 0 auto;
    padding: 0 40px;
}

@media (max-width: 768px) {
    .bynect-csd-gallery-inner { padding: 0 20px; }
}

.bynect-csd-gallery-title {
    font-size: 22px;
    font-weight: 800;
    color: #111;
    margin: 0 0 28px;
    letter-spacing: -.3px;
}

.bynect-csd-gallery-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 16px;
}

@media (max-width: 768px) {
    .bynect-csd-gallery-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 480px) {
    .bynect-csd-gallery-grid { grid-template-columns: 1fr; }
}

.bynect-csd-gallery-item {
    display: block;
    border-radius: 16px;
    overflow: hidden;
    position: relative;
    aspect-ratio: 4 / 3;
    background: #eee;
    cursor: pointer;
}
.bynect-csd-gallery-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform .35s;
}
.bynect-csd-gallery-item:hover img { transform: scale(1.06); }

.bynect-csd-gallery-hover {
    position: absolute;
    inset: 0;
    background: rgba(0,0,0,.45);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity .25s;
    border-radius: 16px;
}
.bynect-csd-gallery-item:hover .bynect-csd-gallery-hover { opacity: 1; }

/* ── Services Used ───────────────────────────────────────── */
.bynect-csd-services {
    background: #fff;
    padding: 36px 0 48px;
    border-top: 1px solid #f0f0f0;
}
.bynect-csd-services-inner {
    max-width: 1100px;
    margin: 0 auto;
    padding: 0 40px;
    display: flex;
    align-items: center;
    gap: 16px;
    flex-wrap: wrap;
    justify-content: center;
}

@media (max-width: 768px) {
    .bynect-csd-services-inner { padding: 0 20px; }
}

.bynect-csd-services-label {
    font-size: 14px;
    font-weight: 700;
    color: #333;
    letter-spacing: .3px;
}
.bynect-csd-services-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}
.bynect-csd-service-tag {
    display: inline-block;
    background: #f3f3f8;
    color: #555;
    font-size: 13px;
    font-weight: 500;
    padding: 6px 16px;
    border-radius: 50px;
    border: 1px solid #e5e5ee;
    transition: background .2s;
}
.bynect-csd-service-tag:hover {
    background: var(--bynect-primary-light, #eef4ff);
    color: var(--bynect-primary, #3A7AD9);
    border-color: rgba(58,122,217,.3);
}

/* ── Error ───────────────────────────────────────────────── */
.bynect-csd-error {
    text-align: center;
    padding: 80px 20px;
    color: #aaa;
    font-size: 16px;
}

/* ════════════════════════════════════════════════════════════
   SHARED SECTION TITLE
   ════════════════════════════════════════════════════════════ */
.bynect-csd-section-title {
    font-size: 20px;
    font-weight: 800;
    color: #111;
    margin: 0 0 28px;
    letter-spacing: -.3px;
    display: flex;
    align-items: center;
    gap: 10px;
}
.bynect-csd-section-title::after {
    content: '';
    flex: 1;
    height: 2px;
    background: #f0f0f0;
    border-radius: 2px;
}

/* ════════════════════════════════════════════════════════════
   BRAND COLORS SECTION
   ════════════════════════════════════════════════════════════ */
.bynect-csd-colors-section {
    background: #fff;
    padding: 56px 0 48px;
    border-top: 1px solid #f0f0f0;
}
.bynect-csd-colors-inner {
    max-width: 1100px;
    margin: 0 auto;
    padding: 0 40px;
}
@media (max-width: 768px) {
    .bynect-csd-colors-inner { padding: 0 20px; }
}

/* Color Cards Row */
.bynect-csd-color-cards {
    display: flex;
    gap: 24px;
    flex-wrap: wrap;
}

/* Single Color Card — matches reference exactly */
.bynect-csd-color-card {
    background: #fff;
    border-radius: 20px;
    overflow: hidden;
    box-shadow: 0 4px 24px rgba(0,0,0,.09);
    width: 200px;
    flex-shrink: 0;
    transition: transform .25s, box-shadow .25s;
}
.bynect-csd-color-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 36px rgba(0,0,0,.14);
}

/* Big color swatch — top 65% of card */
.bynect-csd-color-swatch {
    position: relative;
    height: 160px;
    border-radius: 16px 16px 0 0;
    display: flex;
    align-items: flex-end;
    justify-content: flex-end;
    padding: 12px;
}

/* Contrast badge — bottom-right of swatch */
.bynect-csd-contrast-badge {
    display: inline-block;
    font-size: 11px;
    font-weight: 700;
    padding: 4px 10px;
    border-radius: 20px;
    letter-spacing: .3px;
    /* color + background set inline per card */
}

/* Color info — white bottom section */
.bynect-csd-color-info {
    padding: 14px 16px 16px;
    display: flex;
    flex-direction: column;
    gap: 3px;
}
.bynect-csd-color-name {
    font-size: 16px;
    font-weight: 800;
    /* color set inline */
}
.bynect-csd-color-hex {
    font-size: 12px;
    font-weight: 600;
    font-family: 'SF Mono', 'Fira Code', monospace;
    opacity: .75;
    /* color set inline */
}

/* ════════════════════════════════════════════════════════════
   GALLERY SECTION
   ════════════════════════════════════════════════════════════ */
.bynect-csd-gallery-section {
    background: #f8f8fb;
    padding: 56px 0 60px;
    border-top: 1px solid #f0f0f0;
}
.bynect-csd-gallery-inner {
    max-width: 1100px;
    margin: 0 auto;
    padding: 0 40px;
}
@media (max-width: 768px) {
    .bynect-csd-gallery-inner { padding: 0 20px; }
}

/* Gallery Grid — CSS grid with featured first item */
.bynect-csd-gallery-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    grid-auto-rows: 220px;
    gap: 14px;
}
@media (max-width: 768px) {
    .bynect-csd-gallery-grid {
        grid-template-columns: repeat(2, 1fr);
        grid-auto-rows: 180px;
    }
}
@media (max-width: 480px) {
    .bynect-csd-gallery-grid {
        grid-template-columns: 1fr;
        grid-auto-rows: 220px;
    }
}

/* Gallery item */
.bynect-csd-gallery-item {
    display: block;
    border-radius: 16px;
    overflow: hidden;
    position: relative;
    cursor: pointer;
    background: #e5e7eb;
}
.bynect-csd-gallery-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform .4s ease;
}
.bynect-csd-gallery-item:hover img { transform: scale(1.06); }

/* Featured item — spans 2 columns + 2 rows */
.bynect-csd-gallery-featured {
    grid-column: span 2;
    grid-row: span 2;
    border-radius: 20px;
}
@media (max-width: 480px) {
    .bynect-csd-gallery-featured {
        grid-column: span 1;
        grid-row: span 1;
    }
}

/* Hover overlay */
.bynect-csd-gallery-hover {
    position: absolute;
    inset: 0;
    background: rgba(0,0,0,.42);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity .25s;
    border-radius: inherit;
}
.bynect-csd-gallery-item:hover .bynect-csd-gallery-hover { opacity: 1; }
#bynect-csd-lb {
    position: fixed;
    inset: 0;
    z-index: 99999;
    display: flex;
    align-items: center;
    justify-content: center;
}
#bynect-csd-lb-bg {
    position: absolute;
    inset: 0;
    background: rgba(0,0,0,.9);
    backdrop-filter: blur(6px);
}
#bynect-csd-lb-content {
    position: relative;
    z-index: 1;
    display: flex;
    align-items: center;
    gap: 16px;
    max-width: 92vw;
}
#bynect-csd-lb-img {
    max-width: 80vw;
    max-height: 88vh;
    border-radius: 14px;
    box-shadow: 0 24px 80px rgba(0,0,0,.6);
    display: block;
    object-fit: contain;
}
#bynect-csd-lb-close,
#bynect-csd-lb-prev,
#bynect-csd-lb-next {
    background: rgba(255,255,255,.1);
    border: 1.5px solid rgba(255,255,255,.2);
    color: #fff;
    border-radius: 50%;
    width: 46px;
    height: 46px;
    font-size: 24px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background .2s;
    flex-shrink: 0;
    line-height: 1;
    padding: 0;
}
#bynect-csd-lb-close:hover,
#bynect-csd-lb-prev:hover,
#bynect-csd-lb-next:hover { background: rgba(255,255,255,.22); }
#bynect-csd-lb-close {
    position: absolute;
    top: -56px;
    right: 0;
}

@media (max-width: 600px) {
    #bynect-csd-lb-prev,
    #bynect-csd-lb-next { display: none; }
    #bynect-csd-lb-img  { max-width: 96vw; }
}

/* ════════════════════════════════════════════════════════════
   SEARCH BAR — RESPONSIVE
   ════════════════════════════════════════════════════════════ */
@media (max-width: 640px) {
    .bynect-cs-searchbar {
        flex-wrap: wrap;
        border-radius: 14px;
        padding: 10px 14px;
        gap: 8px;
    }
    .bynect-cs-search-icon { display: none; }
    .bynect-cs-search-input { font-size: 14px; padding: 6px 0; }
    .bynect-cs-bar-divider { display: none; }
    .bynect-cs-dropdown-wrap { width: 100%; }
    .bynect-cs-dropdown-btn  { width: 100%; justify-content: space-between; }
    .bynect-cs-dropdown-menu { right: auto; left: 0; width: 100%; }
}

/* ════════════════════════════════════════════════════════════
   LIGHTBOX
   ════════════════════════════════════════════════════════════ */
#bynect-csd-lb {
    position: fixed;
    inset: 0;
    z-index: 99999;
    display: flex;
    align-items: center;
    justify-content: center;
}
#bynect-csd-lb-bg {
    position: absolute;
    inset: 0;
    background: rgba(0,0,0,.9);
    backdrop-filter: blur(6px);
}
#bynect-csd-lb-content {
    position: relative;
    z-index: 1;
    display: flex;
    align-items: center;
    gap: 16px;
    max-width: 92vw;
}
#bynect-csd-lb-img {
    max-width: 80vw;
    max-height: 88vh;
    border-radius: 14px;
    box-shadow: 0 24px 80px rgba(0,0,0,.6);
    display: block;
    object-fit: contain;
}
#bynect-csd-lb-counter {
    position: absolute;
    bottom: -36px;
    left: 50%;
    transform: translateX(-50%);
    color: rgba(255,255,255,.6);
    font-size: 13px;
    font-weight: 600;
    white-space: nowrap;
}
#bynect-csd-lb-close,
#bynect-csd-lb-prev,
#bynect-csd-lb-next {
    background: rgba(255,255,255,.1);
    border: 1.5px solid rgba(255,255,255,.2);
    color: #fff;
    border-radius: 50%;
    width: 46px;
    height: 46px;
    font-size: 24px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background .2s;
    flex-shrink: 0;
    line-height: 1;
    padding: 0;
}
#bynect-csd-lb-close:hover,
#bynect-csd-lb-prev:hover,
#bynect-csd-lb-next:hover { background: rgba(255,255,255,.22); }
#bynect-csd-lb-close {
    position: absolute;
    top: -56px;
    right: 0;
}
@media (max-width: 600px) {
    #bynect-csd-lb-prev,
    #bynect-csd-lb-next { display: none; }
    #bynect-csd-lb-img  { max-width: 96vw; }
}
