/* ============================================================
   BION Design Catalogue — v2.0.1
   BION Creations Pvt Ltd
   ============================================================ */

@import url('https://fonts.googleapis.com/css2?family=Cormorant+Garamond:wght@300;400;500&display=swap');

/* ── CATALOGUE PAGE ─────────────────────────────────────────────────────────── */

/* Break out of theme container — full width like Shopify */
.bion-catalogue {
    width: 100vw;
    max-width: 100vw;
    position: relative;
    left: 50%;
    margin-left: -50vw;
    padding: 30px 30px 60px;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    box-sizing: border-box;
    overflow-x: hidden;
}

.bion-cat-header {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    margin-bottom: 30px;
}

.bion-cat-title {
    font-family: 'Cormorant Garamond', Georgia, serif;
    font-size: 3.5rem;
    font-weight: 300;
    color: #1a1a1a;
    margin: 0;
    letter-spacing: -1px;
    line-height: 1;
}

.bion-search-trigger {
    background: none;
    border: none;
    cursor: pointer;
    color: #333;
    padding: 8px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s;
}

.bion-search-trigger:hover { background: #f0f0f0; }

/* ── Type Filters ── */
.bion-type-filters {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    margin-bottom: 18px;
    padding-bottom: 18px;
    border-bottom: 1px solid #e8e8e8;
}

.bion-type-btn {
    padding: 6px 18px;
    border: 1px solid #d0d0d0;
    border-radius: 3px;
    font-size: 12px;
    font-weight: 500;
    letter-spacing: 0.5px;
    color: #555;
    text-decoration: none;
    transition: all 0.2s;
    background: #fff;
}

.bion-type-btn:hover { border-color: #333; color: #333; text-decoration: none; }
.bion-type-btn.active { background: #1a1a1a; border-color: #1a1a1a; color: #fff; text-decoration: none; }

.bion-count-bar {
    font-size: 13px;
    color: #aaa;
    margin-bottom: 20px;
    letter-spacing: 0.3px;
}

/* ── Image Grid ── */
.bion-grid {
    display: grid;
    gap: 3px;
}

.bion-cols-5 { grid-template-columns: repeat(5, 1fr); }
.bion-cols-4 { grid-template-columns: repeat(4, 1fr); }

.bion-design-card {
    display: block;
    overflow: hidden;
    aspect-ratio: 3 / 4;
    background: #f0f0f0;
    text-decoration: none;
    position: relative;
}

/* Force images to fill cards — overrides theme height:auto */
.bion-design-card .bion-design-img,
.bion-design-img {
    width: 100% !important;
    height: 100% !important;
    object-fit: cover !important;
    object-position: center center !important;
    display: block !important;
    max-width: 100% !important;
    transition: transform 0.5s ease, opacity 0.3s;
}

.bion-design-card:hover .bion-design-img {
    transform: scale(1.05);
    opacity: 0.88;
}

.bion-no-img {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #ccc;
    font-size: 13px;
    min-height: 200px;
}

/* ── Pagination ── */
.bion-pagination {
    display: flex;
    gap: 6px;
    justify-content: center;
    margin-top: 50px;
    flex-wrap: wrap;
}

.bion-page-btn {
    width: 34px;
    height: 34px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1px solid #ddd;
    border-radius: 3px;
    font-size: 13px;
    color: #555;
    text-decoration: none;
    transition: all 0.2s;
}

.bion-page-btn:hover,
.bion-page-btn.active { background: #1a1a1a; border-color: #1a1a1a; color: #fff; text-decoration: none; }

.bion-no-results {
    text-align: center;
    color: #aaa;
    padding: 60px 20px;
    font-size: 15px;
}

/* ── SEARCH POPUP ───────────────────────────────────────────────────────────── */

.bion-search-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.55);
    z-index: 999999;
    display: none;
    align-items: flex-start;
    justify-content: center;
    padding-top: 80px;
    backdrop-filter: blur(2px);
}

.bion-search-overlay.active { display: flex; }

.bion-search-modal {
    background: #fff;
    border-radius: 14px;
    width: 92%;
    max-width: 740px;
    max-height: 78vh;
    overflow-y: auto;
    box-shadow: 0 25px 60px rgba(0, 0, 0, 0.25);
}

.bion-search-bar {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 18px 22px;
    border-bottom: 1px solid #f0f0f0;
    position: sticky;
    top: 0;
    background: #fff;
    border-radius: 14px 14px 0 0;
    z-index: 2;
}

#bionSearchInput {
    flex: 1;
    border: none;
    outline: none;
    font-size: 17px;
    color: #1a1a1a;
    background: none;
    font-family: inherit;
}

#bionSearchInput::placeholder { color: #bbb; }

#bionSearchClose {
    background: none;
    border: 1px solid #e8e8e8;
    cursor: pointer;
    color: #888;
    padding: 5px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    transition: all 0.2s;
    flex-shrink: 0;
}

#bionSearchClose:hover { border-color: #333; color: #333; }

.bion-search-results { padding: 22px; }

.bion-search-hint {
    color: #bbb;
    text-align: center;
    font-size: 14px;
    padding: 16px 0;
    margin: 0;
}

.bion-search-section-title {
    font-size: 10px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    color: #aaa;
    margin: 0 0 12px 0;
}

.bion-search-collections { display: grid; gap: 6px; margin-bottom: 24px; }

.bion-collection-item {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 10px 12px;
    border-radius: 8px;
    text-decoration: none;
    transition: background 0.15s;
}

.bion-collection-item:hover { background: #f8f8f8; text-decoration: none; }

.bion-collection-imgs {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 2px;
    width: 60px;
    height: 60px;
    border-radius: 8px;
    overflow: hidden;
    flex-shrink: 0;
}

.bion-collection-imgs img {
    width: 100% !important;
    height: 100% !important;
    object-fit: cover !important;
    display: block !important;
}

.bion-collection-name { font-size: 14px; font-weight: 500; color: #1a1a1a; margin: 0 0 2px; }
.bion-collection-count { font-size: 12px; color: #aaa; margin: 0; }

.bion-search-products {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 12px;
    margin-bottom: 16px;
}

.bion-search-product { text-decoration: none; display: block; }
.bion-search-product:hover { text-decoration: none; }

.bion-search-product img {
    width: 100% !important;
    height: auto !important;
    aspect-ratio: 1;
    object-fit: cover !important;
    border-radius: 6px;
    display: block !important;
    margin-bottom: 6px;
}

.bion-search-product-title {
    font-size: 12px;
    color: #333;
    line-height: 1.4;
    overflow: hidden;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

.bion-search-view-all {
    display: block;
    text-align: center;
    padding: 11px 24px;
    background: #1a1a1a;
    color: #fff;
    border-radius: 6px;
    font-size: 13px;
    font-weight: 500;
    text-decoration: none;
    transition: background 0.2s;
    margin-top: 8px;
}

.bion-search-view-all:hover { background: #333; color: #fff; text-decoration: none; }

/* ── SINGLE DESIGN PAGE ─────────────────────────────────────────────────────── */

/* Break out of theme container for single page */
body.single-spc_design .site-main,
body.single-spc_design #primary,
body.single-spc_design .content-area,
body.single-spc_design .entry-content,
body.single-spc_design article,
body.single-spc_design .post,
body.single-spc_design .container,
body.single-spc_design .site-content,
body.single-spc_design #content {
    max-width: 100% !important;
    width: 100% !important;
    padding: 0 !important;
    margin: 0 !important;
    float: none !important;
}

.bion-single-wrap {
    display: grid;
    grid-template-columns: 55% 45%;
    min-height: calc(100vh - 80px);
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

/* Left: sticky image */
.bion-single-image {
    position: sticky;
    top: 0;
    height: 100vh;
    overflow: hidden;
    background: #f0f0f0;
}

.bion-single-img {
    width: 100% !important;
    height: 100% !important;
    object-fit: cover !important;
    display: block !important;
}

.bion-single-no-img {
    width: 100%;
    height: 100%;
    min-height: 400px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #ccc;
    font-size: 15px;
}

/* Right: info panel */
.bion-single-info {
    padding: 55px 50px 60px;
    overflow-y: auto;
}

.bion-single-type {
    font-size: 11px;
    letter-spacing: 2.5px;
    text-transform: uppercase;
    color: #aaa;
    margin: 0 0 14px 0;
}

.bion-single-title {
    font-family: 'Cormorant Garamond', Georgia, serif;
    font-size: 2.6rem;
    font-weight: 300;
    color: #1a1a1a;
    line-height: 1.25;
    margin: 0 0 22px 0;
    letter-spacing: -0.5px;
}

.bion-divider {
    border: none;
    border-top: 1px solid #ebebeb;
    margin: 22px 0;
}

/* Places */
.bion-places-label {
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    color: #aaa;
    margin: 0 0 10px 0;
}

.bion-places-label small { text-transform: none; letter-spacing: 0; font-size: 11px; }
.bion-places-tags { display: flex; flex-wrap: wrap; gap: 8px; }

.bion-place-tag {
    padding: 5px 14px;
    border: 1px solid #ddd;
    border-radius: 3px;
    font-size: 13px;
    color: #555;
    text-decoration: none;
    transition: all 0.2s;
}

.bion-place-tag:hover { background: #1a1a1a; border-color: #1a1a1a; color: #fff; text-decoration: none; }

/* Share button */
.bion-share-wrap { position: relative; margin-bottom: 14px; }

.bion-share-btn {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 12px 22px;
    background: #f0f0f0;
    border: none;
    border-radius: 4px;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 1.5px;
    color: #333;
    cursor: pointer;
    transition: background 0.2s;
    font-family: inherit;
}

.bion-share-btn:hover { background: #e0e0e0; }

.bion-share-dropdown {
    position: absolute;
    top: calc(100% + 8px);
    left: 0;
    background: #fff;
    border-radius: 10px;
    box-shadow: 0 10px 40px rgba(0,0,0,0.15);
    min-width: 210px;
    display: none;
    z-index: 999;
    overflow: hidden;
    border: 1px solid #f0f0f0;
}

.bion-share-dropdown.open { display: block; }

.bion-share-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 13px 18px;
    font-size: 14px;
    color: #333;
    text-decoration: none;
    transition: background 0.15s;
    background: none;
    border: none;
    width: 100%;
    cursor: pointer;
    font-family: inherit;
    text-align: left;
}

.bion-share-item:hover { background: #f8f8f8; text-decoration: none; color: #333; }
.bion-share-item:not(:last-child) { border-bottom: 1px solid #f5f5f5; }

/* Call button */
.bion-call-btn {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 13px 26px;
    border: 1.5px solid #1a1a1a;
    border-radius: 4px;
    font-size: 13px;
    font-weight: 600;
    letter-spacing: 0.5px;
    color: #1a1a1a;
    text-decoration: none;
    margin-bottom: 28px;
    transition: all 0.2s;
}

.bion-call-btn:hover { background: #1a1a1a; color: #fff; text-decoration: none; }

/* Accordion */
.bion-accordion { margin-top: 8px; }
.bion-acc-item { border-top: 1px solid #ebebeb; }
.bion-acc-item:last-child { border-bottom: 1px solid #ebebeb; }

.bion-acc-header {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 18px 0;
    background: none;
    border: none;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 2px;
    text-transform: uppercase;
    color: #333;
    cursor: pointer;
    text-align: left;
    font-family: inherit;
}

.bion-acc-icon { transition: transform 0.3s ease; flex-shrink: 0; }
.bion-acc-item.open .bion-acc-icon { transform: rotate(180deg); }

.bion-acc-body {
    display: none;
    padding: 0 0 22px 0;
    font-size: 14px;
    color: #555;
    line-height: 1.8;
}

.bion-acc-body ul { padding-left: 18px; margin: 0; }
.bion-acc-body li { margin-bottom: 5px; }
.bion-acc-body p { margin: 0 0 8px; }
.bion-acc-item.open .bion-acc-body { display: block; }

/* ── RESPONSIVE ─────────────────────────────────────────────────────────────── */

@media (max-width: 1200px) {
    .bion-cols-5 { grid-template-columns: repeat(4, 1fr); }
}

@media (max-width: 960px) {
    .bion-cols-5,
    .bion-cols-4 { grid-template-columns: repeat(3, 1fr); }

    .bion-single-wrap { grid-template-columns: 1fr; min-height: auto; }
    .bion-single-image { position: relative; height: 65vw; }
    .bion-single-info { padding: 35px 28px 50px; }
    .bion-single-title { font-size: 2rem; }
}

@media (max-width: 600px) {
    .bion-cols-5,
    .bion-cols-4,
    .bion-cols-3 { grid-template-columns: repeat(2, 1fr); }

    .bion-cat-title { font-size: 2.2rem; }
    .bion-search-products { grid-template-columns: repeat(2, 1fr); }
    .bion-single-image { height: 80vw; }
    .bion-single-info { padding: 25px 18px 40px; }
    .bion-single-title { font-size: 1.7rem; }
}

/* ── Infinite Scroll ─────────────────────────────────────────────────────── */
#bionSentinel {
    width: 100%;
    padding: 20px 0;
    text-align: center;
}

.bion-end-msg {
    text-align: center;
    color: #bbb;
    font-size: 13px;
    padding: 30px 0 10px;
    letter-spacing: 0.5px;
}

@keyframes bion-spin {
    from { transform: rotate(0deg); }
    to   { transform: rotate(360deg); }
}
