/* ==========================================================================
   css/guides-page.css - Majida Ameer Textiles Product Guides Hub
   Compact, high-performance responsive layout matching storefront design system
   ========================================================================== */

/* Breadcrumbs Bar (exact match to shop.php & categories.php) */
.breadcrumbs-bar {
    width: 100%;
    padding: 16px 0 0 0;
    border-top: 1px solid #F0F0F0;
    background: #FFFFFF;
    margin-top: 5px;
}

.breadcrumbs-bar-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 12px;
    padding-bottom: 14px;
}

.breadcrumbs-nav {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px;
    list-style: none;
    padding: 0;
    margin: 0;
    font-family: var(--font1);
    font-size: 12px;
    font-weight: 500;
    color: var(--text-secondary-color);
}

.breadcrumbs-nav li {
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.breadcrumbs-nav a {
    color: var(--text-secondary-color);
    text-decoration: none;
    transition: color 0.15s ease;
}

.breadcrumbs-nav a:hover {
    color: var(--sigcolor);
}

.breadcrumb-sep {
    color: #cccccc;
    font-size: 11px;
    user-select: none;
}

.breadcrumb-active {
    color: var(--sigcolor);
    font-weight: 600;
    max-width: 280px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}


/* Page Wrapper */
.guides-page-wrapper {
    padding: 30px 0 70px 0;
    background: #FFFFFF;
}

/* Section Header (exact match to index.php & categories.php .section-intro) */
.guides-page-wrapper .section-intro {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 20px;
    margin-bottom: 30px;
    text-align: center;
}

.guides-page-wrapper .section-title {
    color: var(--sigcolor);
    font-size: 37px;
    font-family: var(--font1);
    font-weight: 700;
    text-transform: uppercase;
    text-align: center;
    letter-spacing: -0.15rem;
    line-height: 1.15;
    margin: 0;
}

.guides-page-wrapper .section-desc {
    font-family: var(--font1);
    font-size: 15px;
    font-weight: 500;
    line-height: 1.6;
    color: var(--text-secondary-color);
    width: 90%;
    max-width: 480px;
    text-align: center;
    margin: 0 auto;
}

/* In-Page Dedicated Search Bar */
.guides-search-row {
    max-width: 580px;
    margin: 0 auto 22px auto;
    width: 100%;
}

.guides-search-form {
    display: flex;
    align-items: center;
    background: #FFFFFF;
    border: 1px solid #D5DCE5;
    border-radius: 50px;
    padding: 3px 4px 3px 14px;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.04);
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.guides-search-form:focus-within {
    border-color: #0F172A;
    box-shadow: 0 2px 8px rgba(15, 23, 42, 0.1);
}

.guides-search-icon {
    width: 16px;
    height: 16px;
    color: #94A3B8;
    flex-shrink: 0;
    margin-right: 8px;
}

.guides-search-input {
    flex: 1;
    min-width: 0;
    height: 36px;
    border: none;
    outline: none;
    background: transparent;
    font-family: var(--font1);
    font-size: 13.5px;
    color: var(--text-primary-color);
}

.guides-search-input::placeholder {
    color: #94A3B8;
    font-size: 13px;
}

.guides-search-clear {
    width: 24px;
    height: 24px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: #94A3B8;
    font-size: 18px;
    line-height: 1;
    text-decoration: none;
    margin-right: 4px;
    border-radius: 50%;
    transition: all 0.15s ease;
}

.guides-search-clear:hover {
    color: #0F172A;
    background: #F1F5F9;
}

.guides-search-btn {
    height: 34px;
    padding: 0 18px;
    border-radius: 50px;
    border: none;
    background: #0F172A;
    color: #FFFFFF;
    font-family: var(--font1);
    font-size: 12.5px;
    font-weight: 600;
    cursor: pointer;
    flex-shrink: 0;
    transition: background-color 0.2s ease, transform 0.15s ease;
}

.guides-search-btn:hover {
    background: #1E293B;
}

/* Compact Low-Profile Toolbar (occupies minimal vertical height) */
.guides-toolbar-compact {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: nowrap;
    gap: 12px;
    padding: 0 0 14px 0;
    margin-bottom: 24px;
    border-bottom: 1px solid #EBEBEB;
    min-height: 36px;
}

.guides-count-text {
    font-family: var(--font1);
    font-size: 13px;
    color: var(--text-secondary-color);
    font-weight: 500;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.guides-count-text strong {
    color: var(--text-primary-color);
    font-weight: 600;
}

.guides-sort-wrap {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    flex-shrink: 0;
}

.guides-sort-label {
    font-family: var(--font1);
    font-size: 12.5px;
    font-weight: 500;
    color: var(--text-secondary-color);
    white-space: nowrap;
}

.guides-sort-select {
    height: 34px;
    padding: 0 28px 0 10px;
    border: 1px solid #D5DCE5;
    border-radius: 6px;
    background: #FFFFFF url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='10' viewBox='0 0 24 24' fill='none' stroke='%23475569' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E") no-repeat right 8px center;
    font-family: var(--font1);
    font-size: 12.5px;
    font-weight: 600;
    color: var(--text-primary-color);
    outline: none;
    cursor: pointer;
    appearance: none;
    -webkit-appearance: none;
    transition: border-color 0.2s ease;
}

.guides-sort-select:focus {
    border-color: #0F172A;
}

/* 3-Column Catalog Grid */
.guides-catalog-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
    margin-bottom: 40px;
}

/* Pagination Bar */
.guides-pagination-wrap {
    display: flex;
    justify-content: center;
    align-items: center;
    margin-top: 36px;
    padding-top: 24px;
    border-top: 1px solid #EFEFEF;
}

.guides-pagination {
    display: flex;
    align-items: center;
    gap: 6px;
    list-style: none;
    padding: 0;
    margin: 0;
}

.guides-page-item {
    display: inline-flex;
}

.guides-page-btn {
    min-width: 38px;
    height: 38px;
    padding: 0 12px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 1px solid #E2E8F0;
    border-radius: 6px;
    background: #FFFFFF;
    font-family: var(--font1);
    font-size: 13px;
    font-weight: 600;
    color: var(--text-primary-color);
    text-decoration: none;
    cursor: pointer;
    transition: all 0.15s ease;
}

.guides-page-btn:hover:not(.disabled):not(.active) {
    border-color: #0F172A;
    color: #0F172A;
    background-color: #F8FAFC;
}

.guides-page-btn.active {
    background-color: #0F172A;
    color: #FFFFFF;
    border-color: #0F172A;
    box-shadow: 0 2px 8px rgba(15, 23, 42, 0.25);
    cursor: default;
}

.guides-page-btn.disabled {
    color: #CBD5E1;
    border-color: #F1F5F9;
    background-color: #F8FAFC;
    cursor: not-allowed;
    pointer-events: none;
}

.guides-page-ellipsis {
    width: 28px;
    height: 38px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: #94A3B8;
    font-weight: 600;
    user-select: none;
}

/* Empty State */
.guides-empty-state {
    text-align: center;
    padding: 50px 20px;
    background: #FAFAFA;
    border-radius: 10px;
    border: 1px dashed #CBD5E1;
    margin: 20px 0;
}

.guides-empty-icon {
    width: 48px;
    height: 48px;
    margin: 0 auto 12px auto;
    color: #94A3B8;
}

.guides-empty-title {
    font-family: var(--font1);
    font-size: 17px;
    font-weight: 600;
    color: var(--text-primary-color);
    margin-bottom: 6px;
}

.guides-empty-desc {
    font-family: var(--font1);
    font-size: 13px;
    color: var(--text-secondary-color);
    margin-bottom: 18px;
}

.guides-reset-btn {
    display: inline-block;
    padding: 8px 20px;
    background: #0F172A;
    color: #FFFFFF;
    font-family: var(--font1);
    font-size: 12.5px;
    font-weight: 500;
    border-radius: 6px;
    text-decoration: none;
    transition: opacity 0.2s ease;
}

.guides-reset-btn:hover {
    opacity: 0.9;
}

/* Responsive Rules - Ultra Tight Vertical Space on Mobile */
@media (max-width: 992px) {
    .guides-catalog-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 16px;
    }

    .guides-page-wrapper .section-title {
        font-size: 30px;
        letter-spacing: -0.1rem;
    }
}

@media (max-width: 600px) {
    .guides-page-wrapper {
        padding: 20px 0 50px 0;
    }

    .guides-page-wrapper .section-intro {
        gap: 12px;
        margin-bottom: 20px;
    }

    .guides-page-wrapper .section-title {
        font-size: 24px;
        letter-spacing: -0.05rem;
    }

    .guides-page-wrapper .section-desc {
        font-size: 13px;
        line-height: 1.5;
    }

    .guides-search-row {
        margin-bottom: 16px;
    }

    .guides-search-form {
        padding: 2px 3px 2px 12px;
    }

    .guides-search-input {
        height: 32px;
        font-size: 12.5px;
    }

    .guides-search-btn {
        height: 30px;
        padding: 0 14px;
        font-size: 11.5px;
    }

    /* Keep Toolbar on a single horizontal row with minimal height */
    .guides-toolbar-compact {
        padding: 0 0 10px 0;
        margin-bottom: 18px;
        gap: 8px;
    }

    .guides-count-text {
        font-size: 11.5px;
    }

    .guides-sort-label {
        font-size: 11px;
    }

    .guides-sort-select {
        height: 30px;
        padding: 0 22px 0 6px;
        font-size: 11.5px;
        background-size: 8px;
        background-position: right 6px center;
    }

    .guides-catalog-grid {
        grid-template-columns: 1fr;
        gap: 12px;
    }

    .guides-page-btn {
        min-width: 34px;
        height: 34px;
        padding: 0 8px;
        font-size: 12px;
    }
}
