/* ===================================================
   Quinlan Safes - Products Catalog & Showcase Styles
   =================================================== */

.catalog-header {
    background: linear-gradient(135deg, rgba(0,0,0,0.85), rgba(20,20,20,0.92)), url('../img/carousel-1.jpg') center/cover no-repeat;
    padding: 70px 0 50px 0;
    margin-bottom: 40px;
    border-bottom: 3px solid #f5a623;
}

.catalog-header h1 {
    font-size: 2.75rem;
    font-weight: 700;
    color: #ffffff;
    margin-bottom: 12px;
}

.catalog-header p {
    color: #e0e0e0;
    font-size: 1.1rem;
    max-width: 750px;
    margin: 0 auto;
}

/* --- Search & Filter Bar --- */
.filter-card {
    background: #ffffff;
    border-radius: 12px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.07);
    padding: 24px 28px;
    margin-bottom: 35px;
    border: 1px solid #eaeaea;
}

.search-input-group {
    position: relative;
}

.search-input-group .form-control {
    height: 52px;
    padding-left: 48px;
    padding-right: 40px;
    font-size: 1rem;
    border-radius: 30px;
    border: 2px solid #e2e8f0;
    transition: all 0.25s ease;
}

.search-input-group .form-control:focus {
    border-color: #f5a623;
    box-shadow: 0 0 0 4px rgba(245, 166, 35, 0.15);
}

.search-input-group .search-icon {
    position: absolute;
    left: 18px;
    top: 50%;
    transform: translateY(-50%);
    color: #888888;
    font-size: 1.15rem;
    pointer-events: none;
}

.search-clear-btn {
    position: absolute;
    right: 14px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    color: #999;
    font-size: 1.1rem;
    cursor: pointer;
    display: none;
}

.search-clear-btn:hover {
    color: #333;
}

/* Category Filter Pills */
.category-pills {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 18px;
    padding-top: 16px;
    border-top: 1px solid #f0f0f0;
}

.cat-pill {
    padding: 7px 16px;
    border-radius: 20px;
    font-size: 0.88rem;
    font-weight: 500;
    background: #f4f6f8;
    color: #333333;
    border: 1px solid transparent;
    cursor: pointer;
    transition: all 0.2s ease;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.cat-pill:hover {
    background: #e9ecef;
    color: #000;
}

.cat-pill.active {
    background: #111111;
    color: #f5a623;
    border-color: #f5a623;
    box-shadow: 0 4px 10px rgba(0,0,0,0.15);
}

/* Secondary Filters (Ratings, Lock Type, Sort) */
.filter-select {
    height: 44px;
    border-radius: 8px;
    border: 1px solid #cbd5e1;
    font-size: 0.92rem;
    color: #334155;
    background-color: #f8fafc;
    padding: 0 14px;
}

.filter-select:focus {
    border-color: #f5a623;
    box-shadow: 0 0 0 3px rgba(245, 166, 35, 0.15);
}

/* --- Catalog Stats & Results Bar --- */
.results-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 25px;
    padding-bottom: 12px;
    border-bottom: 1px solid #e2e8f0;
}

.results-count {
    font-size: 0.95rem;
    color: #64748b;
    font-weight: 500;
}

.results-count strong {
    color: #0f172a;
}

/* --- Product Cards Grid --- */
.product-card {
    background: #ffffff;
    border-radius: 12px;
    border: 1px solid #e5e7eb;
    overflow: hidden;
    transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
    height: 100%;
    display: flex;
    flex-direction: column;
    position: relative;
}

.product-card:hover {
    transform: translateY(-6px);
    box-shadow: 0 16px 30px rgba(0, 0, 0, 0.1);
    border-color: #f5a623;
}

.product-card-img-wrapper {
    position: relative;
    width: 100%;
    height: 240px;
    background: #fafafa;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    padding: 16px;
    cursor: pointer;
}

.product-card-img {
    max-height: 100%;
    max-width: 100%;
    object-fit: contain;
    transition: transform 0.4s ease;
}

.product-card:hover .product-card-img {
    transform: scale(1.06);
}

.product-card-body {
    padding: 20px;
    display: flex;
    flex-direction: column;
    flex-grow: 1;
}

.product-card-category {
    font-size: 0.8rem;
    color: #94a3b8;
    text-transform: uppercase;
    font-weight: 700;
    letter-spacing: 0.8px;
    margin-bottom: 6px;
}

.product-card-title {
    font-size: 1.12rem;
    font-weight: 700;
    color: #1e293b;
    margin-bottom: 18px;
    line-height: 1.4;
    cursor: pointer;
    transition: color 0.2s ease;
}

.product-card-title:hover {
    color: #f5a623;
}

.product-card-footer {
    margin-top: auto;
    padding-top: 14px;
    border-top: 1px solid #f1f5f9;
    display: flex;
    gap: 8px;
}

.btn-view-spec {
    background: #111111;
    color: #ffffff;
    font-weight: 600;
    font-size: 0.92rem;
    border-radius: 8px;
    padding: 11px 16px;
    width: 100%;
    text-align: center;
    border: 1px solid #111111;
    transition: all 0.25s ease;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.btn-view-spec:hover {
    background: #f5a623;
    color: #111111;
    border-color: #f5a623;
    box-shadow: 0 4px 12px rgba(245, 166, 35, 0.3);
}

.cursor-pointer {
    cursor: pointer;
}

/* --- Pagination / Load More --- */
.pagination-wrapper {
    display: flex;
    justify-content: center;
    align-items: center;
    margin-top: 45px;
    gap: 6px;
}

.page-btn {
    padding: 8px 16px;
    border-radius: 6px;
    border: 1px solid #cbd5e1;
    background: #ffffff;
    color: #334155;
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
}

.page-btn:hover:not(:disabled) {
    background: #f5a623;
    color: #111;
    border-color: #f5a623;
}

.page-btn.active {
    background: #111111;
    color: #f5a623;
    border-color: #111111;
}

.page-btn:disabled {
    opacity: 0.4;
    cursor: not-allowed;
}

/* --- Product Detail Modal --- */
.modal-content.product-modal-content {
    border-radius: 16px;
    border: none;
    overflow: hidden;
    box-shadow: 0 25px 60px rgba(0, 0, 0, 0.35);
}

.modal-header.product-modal-header {
    background: #111111;
    color: #ffffff;
    border-bottom: 2px solid #f5a623;
    padding: 18px 24px;
}

.modal-header.product-modal-header .btn-close {
    filter: invert(1);
    opacity: 0.8;
}

.modal-header.product-modal-header .btn-close:hover {
    opacity: 1;
}

.modal-main-img-wrap {
    height: 380px;
    background: #f8fafc;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    border: 1px solid #e2e8f0;
    margin-bottom: 12px;
}

.modal-main-img {
    max-height: 100%;
    max-width: 100%;
    object-fit: contain;
    transition: transform 0.25s ease;
}

/* Main Image Navigation Arrows */
.main-img-nav-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: rgba(17, 17, 17, 0.75);
    color: #ffffff;
    border: 2px solid rgba(255, 255, 255, 0.2);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
    z-index: 10;
    backdrop-filter: blur(6px);
    font-size: 1rem;
}

.main-img-nav-btn.prev-img-btn {
    left: 14px;
}

.main-img-nav-btn.next-img-btn {
    right: 14px;
}

.main-img-nav-btn:hover {
    background: #f5a623;
    color: #111111;
    border-color: #f5a623;
    transform: translateY(-50%) scale(1.1);
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.25);
}

/* Thumbnail Carousel Wrap (No scrollbar, smooth carousel) */
.thumbnail-carousel-wrap {
    position: relative;
    display: flex;
    align-items: center;
    gap: 8px;
    width: 100%;
    padding: 4px 0;
}

.modal-thumbs {
    display: flex;
    gap: 10px;
    overflow-x: auto;
    scroll-behavior: smooth;
    padding: 6px 2px;
    width: 100%;
    /* Hide scrollbars completely across all browsers */
    scrollbar-width: none;
    -ms-overflow-style: none;
}

.modal-thumbs::-webkit-scrollbar {
    display: none;
    width: 0;
    height: 0;
}

.thumb-carousel-btn {
    flex-shrink: 0;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: #111111;
    color: #ffffff;
    border: 1px solid #333333;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s ease;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
    z-index: 5;
    font-size: 0.85rem;
}

.thumb-carousel-btn:hover:not(:disabled) {
    background: #f5a623;
    color: #111111;
    border-color: #f5a623;
    transform: scale(1.08);
}

.thumb-carousel-btn:disabled {
    opacity: 0.3;
    cursor: default;
}

.modal-thumb {
    flex-shrink: 0;
    width: 70px;
    height: 70px;
    border-radius: 8px;
    border: 2px solid #e2e8f0;
    padding: 4px;
    background: #ffffff;
    cursor: pointer;
    object-fit: contain;
    transition: all 0.2s ease;
}

.modal-thumb:hover {
    border-color: #cbd5e1;
    transform: translateY(-2px);
}

.modal-thumb.active {
    border-color: #f5a623;
    border-width: 2.5px;
    box-shadow: 0 4px 12px rgba(245, 166, 35, 0.35);
    transform: translateY(-2px) scale(1.04);
}

.modal-cta-buttons {
    display: flex;
    gap: 14px;
}

.btn-modal-inquire {
    background: #111111;
    color: #ffffff;
    font-weight: 700;
    padding: 14px 24px;
    border-radius: 8px;
    flex-grow: 1;
    text-align: center;
    border: 1px solid #111111;
    text-decoration: none;
    transition: all 0.2s ease;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.btn-modal-inquire:hover {
    background: #222222;
    color: #f5a623;
}

.btn-modal-pdf {
    background: #ef4444;
    color: #ffffff;
    font-weight: 700;
    padding: 14px 24px;
    border-radius: 8px;
    flex-grow: 1;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    text-decoration: none;
    transition: all 0.2s ease;
}

.btn-modal-pdf:hover {
    background: #dc2626;
    color: #ffffff;
    box-shadow: 0 4px 12px rgba(239, 68, 68, 0.35);
}

/* Empty State */
.empty-state {
    text-align: center;
    padding: 60px 20px;
    background: #f8fafc;
    border-radius: 12px;
    border: 2px dashed #cbd5e1;
}

.empty-state i {
    font-size: 3.5rem;
    color: #94a3b8;
    margin-bottom: 16px;
}

.empty-state h4 {
    color: #1e293b;
    font-weight: 700;
    margin-bottom: 8px;
}

.empty-state p {
    color: #64748b;
    margin-bottom: 20px;
}

/* Mobile responsive fixes */
@media (max-width: 768px) {
    .catalog-header {
        padding: 40px 0 30px 0;
    }
    .catalog-header h1 {
        font-size: 2rem;
    }
    .filter-card {
        padding: 18px 16px;
    }
    .modal-main-img-wrap {
        height: 240px;
    }
    .modal-cta-buttons {
        flex-direction: column;
    }
}
