/* Product Catalog — list.blade.php */
/* Breadcrumb modernizado */
        .catalog-breadcrumb {
            background: linear-gradient(135deg, #0d1b2a 0%, #1b2838 100%);
            padding: 40px 0;
            position: relative;
            overflow: hidden;
        }
        .catalog-breadcrumb::after {
            content: '';
            position: absolute;
            top: 0; left: 0; right: 0; bottom: 0;
            background: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23ffffff' fill-opacity='0.03'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
            opacity: 0.5;
        }
        .catalog-breadcrumb h1 {
            color: #fff;
            font-size: 1.75rem;
            font-weight: 700;
            margin: 0;
            position: relative;
            z-index: 1;
        }
        .catalog-breadcrumb .breadcrumb-nav {
            position: relative;
            z-index: 1;
        }
        .catalog-breadcrumb .breadcrumb-nav a,
        .catalog-breadcrumb .breadcrumb-nav span {
            color: rgba(255,255,255,0.7);
            font-size: 0.9rem;
            text-decoration: none;
        }
        .catalog-breadcrumb .breadcrumb-nav a:hover {
            color: #fff;
        }
        .catalog-breadcrumb .breadcrumb-nav .separator {
            margin: 0 8px;
            color: rgba(255,255,255,0.4);
        }
        .catalog-breadcrumb .product-count-badge {
            display: inline-flex;
            align-items: center;
            gap: 6px;
            background: rgba(255,255,255,0.1);
            border: 1px solid rgba(255,255,255,0.15);
            border-radius: 20px;
            padding: 6px 14px;
            color: rgba(255,255,255,0.85);
            font-size: 0.85rem;
            position: relative;
            z-index: 1;
        }

        /* Sidebar moderna */
        .catalog-sidebar .sidebar-card {
            background: #fff;
            border-radius: 12px;
            border: 1px solid #e8ecf1;
            padding: 20px;
            margin-bottom: 20px;
            transition: box-shadow 0.3s ease;
        }
        .catalog-sidebar .sidebar-card:hover {
            box-shadow: 0 4px 20px rgba(0,0,0,0.06);
        }
        /* h3 kept for legacy/non-collapsible cards — see filter-card overrides below */

        /* Search input moderno */
        .catalog-search-form {
            position: relative;
        }
        .catalog-search-form input {
            width: 100%;
            padding: 10px 44px 10px 14px;
            border: 2px solid #e8ecf1;
            border-radius: 8px;
            font-size: 0.9rem;
            transition: border-color 0.3s;
            outline: none;
        }
        .catalog-search-form input:focus {
            border-color: #0167F3;
        }
        .catalog-search-form input::placeholder {
            color: #a0aec0;
        }
        .catalog-search-form button {
            position: absolute;
            right: 4px;
            top: 50%;
            transform: translateY(-50%);
            background: #0167F3;
            border: none;
            color: #fff;
            width: 34px;
            height: 34px;
            border-radius: 6px;
            display: flex;
            align-items: center;
            justify-content: center;
            cursor: pointer;
            transition: background 0.3s;
        }
        .catalog-search-form button:hover {
            background: #0050c7;
        }

        /* Collapsible filter card */
        .filter-card .filter-card-header {
            display: flex;
            align-items: center;
            justify-content: space-between;
            cursor: pointer;
            user-select: none;
            padding: 0 0 10px 0;
            border-bottom: 2px solid #f0f2f5;
            margin-bottom: 0;
            font-size: 1rem;
            font-weight: 700;
            color: #1b2838;
            gap: 8px;
        }
        .filter-card .filter-card-header span {
            display: flex;
            align-items: center;
            gap: 8px;
        }
        .filter-card .filter-card-header i { color: #0167F3; font-size: 1.1rem; }
        .filter-card .filter-arrow {
            font-size: 0.85rem;
            color: #718096;
            transition: transform 0.3s;
            flex-shrink: 0;
        }
        .filter-card .filter-card-body {
            max-height: 0;
            overflow: hidden;
            transition: max-height 0.35s ease;
        }
        .filter-card .filter-card-body > * {
            padding-top: 12px;
        }
        /* sidebar-card h3 only for non-collapsible cards (busca) */
        .catalog-sidebar .sidebar-card:not(.filter-card) h3 {
            font-size: 1rem;
            font-weight: 700;
            color: #1b2838;
            margin-bottom: 15px;
            padding-bottom: 10px;
            border-bottom: 2px solid #f0f2f5;
            display: flex;
            align-items: center;
            gap: 8px;
        }
        .catalog-sidebar .sidebar-card:not(.filter-card) h3 i {
            font-size: 1.1rem;
            color: #0167F3;
        }

        /* Brand logo grid */
        .brand-logo-grid {
            display: grid;
            grid-template-columns: repeat(3, 1fr);
            gap: 8px;
            max-height: 300px;
            overflow-y: auto;
            padding-right: 2px;
        }
        .brand-logo-btn {
            display: flex;
            align-items: center;
            justify-content: center;
            background: #f7fafc;
            border: 2px solid #e8ecf1;
            border-radius: 8px;
            padding: 6px 4px;
            cursor: pointer;
            transition: all 0.2s;
            min-height: 52px;
        }
        .brand-logo-btn img {
            width: 100%;
            max-width: 64px;
            height: 36px;
            object-fit: contain;
        }
        .brand-logo-btn .brand-all-label {
            font-size: 0.75rem;
            font-weight: 700;
            color: #718096;
        }
        .brand-logo-btn:hover,
        .brand-logo-btn.active {
            border-color: #0167F3;
            background: #f0f5ff;
        }
        .brand-logo-btn.active .brand-all-label { color: #0167F3; }

        /* Category list */
        .category-list {
            list-style: none;
            padding: 0;
            margin: 0;
            max-height: 340px;
            overflow-y: auto;
            padding-right: 4px;
        }
        .category-list .cat-item {
            margin-bottom: 2px;
        }
        .category-list .cat-link {
            display: flex;
            align-items: center;
            justify-content: space-between;
            padding: 8px 12px;
            border-radius: 6px;
            color: #4a5568;
            text-decoration: none;
            font-size: 0.9rem;
            text-transform: capitalize;
            transition: all 0.2s;
        }
        .category-list .cat-link:hover,
        .category-list .cat-link.active {
            background: #f0f5ff;
            color: #0167F3;
            font-weight: 600;
        }
        .category-list .cat-link .cat-arrow {
            font-size: 0.7rem;
            transition: transform 0.3s;
        }
        .category-list .cat-link[aria-expanded="true"] .cat-arrow {
            transform: rotate(90deg);
        }
        .subcategory-list {
            list-style: none;
            padding: 0 0 0 12px;
            margin: 0;
        }
        .subcategory-list .subcat-link {
            display: block;
            padding: 6px 12px;
            border-radius: 4px;
            color: #718096;
            text-decoration: none;
            font-size: 0.85rem;
            text-transform: capitalize;
            transition: all 0.2s;
            border-left: 2px solid transparent;
        }
        .subcategory-list .subcat-link:hover,
        .subcategory-list .subcat-link.active {
            color: #0167F3;
            background: #f7fafc;
            border-left-color: #0167F3;
        }

        /* Skeleton loader */
        .product-card-skeleton {
            background: #e8ecf1;
            border-radius: 12px;
            height: 280px;
            margin-bottom: 24px;
            background: linear-gradient(90deg,#f0f2f5 25%,#e8ecf1 50%,#f0f2f5 75%);
            background-size: 200% 100%;
            animation: shimmer 1.3s infinite;
        }
        @keyframes shimmer { 0%{background-position:200% 0} 100%{background-position:-200% 0} }

        /* Topbar do catálogo */
        .catalog-topbar {
            background: #fff;
            border-radius: 12px;
            border: 1px solid #e8ecf1;
            padding: 14px 20px;
            margin-bottom: 24px;
            display: flex;
            align-items: center;
            justify-content: space-between;
            flex-wrap: wrap;
            gap: 12px;
        }
        .catalog-topbar .results-info {
            color: #718096;
            font-size: 0.9rem;
        }
        .catalog-topbar .results-info strong {
            color: #1b2838;
        }
        .catalog-topbar .view-controls {
            display: flex;
            align-items: center;
            gap: 6px;
        }
        .catalog-topbar .view-btn {
            width: 38px;
            height: 38px;
            display: flex;
            align-items: center;
            justify-content: center;
            border: 2px solid #e8ecf1;
            border-radius: 8px;
            background: #fff;
            color: #a0aec0;
            cursor: pointer;
            transition: all 0.2s;
            font-size: 1.1rem;
        }
        .catalog-topbar .view-btn:hover {
            border-color: #cbd5e0;
            color: #4a5568;
        }
        .catalog-topbar .view-btn.active {
            background: #0167F3;
            border-color: #0167F3;
            color: #fff;
        }

        /* Per-page selector */
        .per-page-wrap {
            display: flex;
            align-items: center;
            gap: 8px;
        }
        .per-page-wrap label {
            color: #718096;
            font-size: 0.85rem;
            white-space: nowrap;
            margin: 0;
        }
        .per-page-wrap select {
            border: 2px solid #e8ecf1;
            border-radius: 8px;
            padding: 6px 28px 6px 10px;
            font-size: 0.85rem;
            color: #1b2838;
            background: #fff;
            cursor: pointer;
            outline: none;
            transition: border-color 0.2s;
            -webkit-appearance: none;
            -moz-appearance: none;
            appearance: none;
            background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3e%3cpath fill='none' stroke='%23718096' stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='M2 5l6 6 6-6'/%3e%3c/svg%3e");
            background-repeat: no-repeat;
            background-position: right 8px center;
            background-size: 12px;
        }
        .per-page-wrap select:focus {
            border-color: #0167F3;
        }

        /* Cards de produto - Grid */
        .product-card {
            background: #fff;
            border-radius: 12px;
            border: 1px solid #e8ecf1;
            overflow: hidden;
            transition: all 0.3s ease;
            margin-bottom: 24px;
            height: 100%;
            display: flex;
            flex-direction: column;
        }
        .product-card:hover {
            border-color: #cbd5e0;
            box-shadow: 0 8px 30px rgba(0,0,0,0.08);
            transform: translateY(-2px);
        }
        .product-card .card-img-wrapper {
            position: relative;
            overflow: hidden;
            aspect-ratio: 4/3;
            background: #fff;
        }
        .product-card .card-img-wrapper img {
            width: 100%;
            height: 100%;
            object-fit: contain;
            padding: 10px;
            transition: transform 0.4s ease;
        }
        .product-card:hover .card-img-wrapper img {
            transform: scale(1.05);
        }

        .product-card .card-body {
            padding: 16px;
            flex: 1;
            display: flex;
            flex-direction: column;
        }
        .product-card .card-category {
            font-size: 0.75rem;
            text-transform: uppercase;
            letter-spacing: 0.5px;
            color: #0167F3;
            font-weight: 600;
            margin-bottom: 6px;
        }
        .product-card .card-title {
            font-size: 0.95rem;
            font-weight: 600;
            color: #1b2838;
            line-height: 1.4;
            margin-bottom: 10px;
            display: -webkit-box;
            -webkit-line-clamp: 2;
            -webkit-box-orient: vertical;
            overflow: hidden;
        }
        .product-card .card-title a {
            color: inherit;
            text-decoration: none;
        }
        .product-card .card-title a:hover {
            color: #0167F3;
        }
        .product-card .card-footer-custom {
            margin-top: auto;
            padding-top: 12px;
            border-top: 1px solid #f0f2f5;
        }
        .product-card .card-add-row {
            display: flex;
            align-items: center;
            gap: 6px;
            min-width: 0;
        }
        .product-card .card-qty-wrap {
            display: inline-flex;
            align-items: center;
            border: 2px solid #e8ecf1;
            border-radius: 8px;
            overflow: hidden;
            flex-shrink: 0;
        }
        .product-card .card-qty-wrap button {
            width: 30px; height: 32px;
            border: none; background: transparent;
            font-size: 15px; font-weight: 700;
            color: #6b7280; cursor: pointer;
            display: flex; align-items: center; justify-content: center;
            transition: all 0.15s;
        }
        .product-card .card-qty-wrap button:hover { background: #0167F3; color: #fff; }
        .product-card .card-qty-wrap input {
            width: 36px; height: 32px; text-align: center;
            border: none; border-left: 2px solid #e8ecf1; border-right: 2px solid #e8ecf1;
            font-size: 13px; font-weight: 700; color: #1a1a2e; background: transparent;
            -moz-appearance: textfield; padding: 0;
        }
        .product-card .card-qty-wrap input::-webkit-outer-spin-button,
        .product-card .card-qty-wrap input::-webkit-inner-spin-button { -webkit-appearance: none; }
        .product-card .btn-add-cart {
            display: flex;
            align-items: center;
            justify-content: center;
            gap: 4px;
            flex: 1;
            min-width: 0;
            padding: 7px 8px;
            background: #0167F3;
            border: none;
            color: #fff;
            font-size: 0.75rem;
            font-weight: 600;
            border-radius: 8px;
            cursor: pointer;
            transition: all 0.25s;
            white-space: nowrap;
            overflow: hidden;
            text-overflow: ellipsis;
        }
        .product-card .btn-add-cart:hover {
            background: #0050c7;
        }

        /* Cards de produto - List View */
        .product-card-list {
            background: #fff;
            border-radius: 12px;
            border: 1px solid #e8ecf1;
            overflow: hidden;
            transition: all 0.3s ease;
            margin-bottom: 16px;
        }
        .product-card-list:hover {
            border-color: #cbd5e0;
            box-shadow: 0 4px 20px rgba(0,0,0,0.06);
        }
        .product-card-list .list-img-wrapper {
            height: 100%;
            min-height: 160px;
            overflow: hidden;
            background: #f0f2f5;
        }
        .product-card-list .list-img-wrapper img {
            width: 100%;
            height: 100%;
            object-fit: cover;
            transition: transform 0.4s ease;
        }
        .product-card-list:hover .list-img-wrapper img {
            transform: scale(1.03);
        }
        .product-card-list .list-body {
            padding: 20px;
            display: flex;
            flex-direction: column;
            justify-content: center;
        }
        .product-card-list .list-category {
            font-size: 0.75rem;
            text-transform: uppercase;
            letter-spacing: 0.5px;
            color: #0167F3;
            font-weight: 600;
            margin-bottom: 6px;
        }
        .product-card-list .list-title {
            font-size: 1.05rem;
            font-weight: 600;
            color: #1b2838;
            margin-bottom: 8px;
            line-height: 1.4;
        }
        .product-card-list .list-title a {
            color: inherit;
            text-decoration: none;
        }
        .product-card-list .list-title a:hover {
            color: #0167F3;
        }
        .product-card-list .list-desc {
            color: #718096;
            font-size: 0.875rem;
            line-height: 1.5;
            display: -webkit-box;
            -webkit-line-clamp: 2;
            -webkit-box-orient: vertical;
            overflow: hidden;
            margin-bottom: 0;
        }
        .product-card-list .list-actions {
            display: flex;
            flex-direction: column;
            align-items: center;
            justify-content: center;
            gap: 8px;
            padding: 20px;
        }
        .product-card-list .btn-list-add {
            display: flex;
            align-items: center;
            justify-content: center;
            gap: 6px;
            padding: 10px 20px;
            background: #0167F3;
            border: none;
            color: #fff;
            font-size: 0.85rem;
            font-weight: 600;
            border-radius: 8px;
            cursor: pointer;
            transition: all 0.25s;
            white-space: nowrap;
        }
        .product-card-list .btn-list-add:hover {
            background: #0050c7;
        }
        .product-card-list .list-actions .card-qty-wrap {
            border-color: #e8ecf1;
        }

        /* Paginação moderna */
        .catalog-pagination {
            display: flex;
            justify-content: center;
            padding: 30px 0 10px;
        }
        .catalog-pagination .pagination {
            display: flex;
            flex-direction: row;
            flex-wrap: wrap;
            gap: 4px;
            list-style: none;
            padding: 0;
            margin: 0;
        }
        .catalog-pagination .page-item {
            display: inline-block;
        }
        .catalog-pagination .page-link {
            display: inline-block;
            border-radius: 8px !important;
            border: 2px solid #e8ecf1;
            color: #4a5568;
            font-weight: 500;
            padding: 8px 14px;
            transition: all 0.2s;
        }
        .catalog-pagination .page-link:hover {
            background: #f0f5ff;
            border-color: #0167F3;
            color: #0167F3;
        }
        .catalog-pagination .page-item.active .page-link {
            background: #0167F3;
            border-color: #0167F3;
            color: #fff;
        }

        /* Empty state */
        .catalog-empty {
            text-align: center;
            padding: 60px 20px;
        }
        .catalog-empty i {
            font-size: 3rem;
            color: #cbd5e0;
            margin-bottom: 16px;
        }
        .catalog-empty h4 {
            color: #4a5568;
            font-weight: 600;
            margin-bottom: 8px;
        }
        .catalog-empty p {
            color: #a0aec0;
        }

        /* Mobile sidebar toggle */
        .sidebar-toggle-btn {
            display: none;
            width: 100%;
            padding: 12px;
            background: #fff;
            border: 2px solid #e8ecf1;
            border-radius: 10px;
            color: #1b2838;
            font-weight: 600;
            font-size: 0.9rem;
            cursor: pointer;
            margin-bottom: 16px;
            transition: all 0.2s;
        }
        .sidebar-toggle-btn:hover {
            border-color: #0167F3;
            color: #0167F3;
        }
        .sidebar-toggle-btn i {
            margin-right: 6px;
        }

        @media (max-width: 991.98px) {
            .sidebar-toggle-btn {
                display: flex;
                align-items: center;
                justify-content: center;
                gap: 6px;
                width: 100%;
                margin-bottom: 16px;
            }
            .catalog-sidebar-col {
                display: none;
            }
            .catalog-sidebar-col.show {
                display: block;
            }
            .product-card-list .list-actions {
                flex-direction: row;
                padding: 0 20px 20px;
            }
            /* Topbar responsivo */
            .catalog-topbar {
                padding: 10px 14px;
                gap: 8px;
            }
            .catalog-topbar .results-info {
                font-size: 0.82rem;
            }
            .per-page-wrap label {
                display: none;
            }
        }

        @media (max-width: 575.98px) {
            /* Grid: reduzir gutter lateral */
            #grid-view .row {
                margin-left: -5px;
                margin-right: -5px;
            }
            #grid-view .row > [class*="col-"] {
                padding-left: 5px;
                padding-right: 5px;
            }

            /* Breadcrumb mobile */
            .catalog-breadcrumb .container {
                padding-left: 12px;
                padding-right: 12px;
            }
            .catalog-breadcrumb h1 {
                font-size: 1.3rem;
                text-align: center;
            }
            .catalog-breadcrumb .product-count-badge {
                justify-content: center;
            }

            /* Topbar compacto */
            .catalog-topbar {
                flex-wrap: nowrap;
                padding: 8px 12px;
                border-radius: 8px;
            }
            .catalog-topbar .results-info {
                display: none;   /* libera espaço, quantidade já está no badge */
            }
            .catalog-topbar .view-controls {
                gap: 4px;
            }
            .catalog-topbar .view-btn {
                width: 34px;
                height: 34px;
                font-size: 1rem;
            }

            /* Cards de produto */
            .product-card {
                margin-bottom: 10px;
                border-radius: 10px;
            }
            .product-card .card-img-wrapper {
                aspect-ratio: 1 / 1;   /* quadrado no mobile */
            }
            .product-card .card-img-wrapper img {
                object-fit: contain;
                object-position: center;
                padding: 6px;
            }
            .product-card .card-body {
                padding: 8px;
            }
            .product-card .card-title {
                font-size: 0.78rem;
                line-height: 1.3;
                margin-bottom: 5px;
                -webkit-line-clamp: 2;
            }
            .product-card .card-category {
                font-size: 0.62rem;
                margin-bottom: 3px;
                letter-spacing: 0;
            }
            .product-card .card-footer-custom {
                padding-top: 6px;
            }

            /* No mobile ocultar qty e mostrar só o botão "Adicionar" centralizado */
            .product-card .card-qty-wrap {
                display: none;
            }
            .product-card .btn-add-cart {
                width: 100%;
                font-size: 0.7rem;
                padding: 6px 4px;
                gap: 3px;
                justify-content: center;
                border-radius: 7px;
            }
            .product-card .btn-add-cart i {
                font-size: 12px;
            }

            /* Lista view mobile */
            .product-card-list .list-body h4 {
                font-size: 0.85rem;
            }
            .product-card-list .list-desc {
                display: none;   /* esconder descrição no mobile list-view */
            }
        }

        @media (max-width: 400px) {
            /* Telefones muito pequenos — 1 coluna */
            #grid-view .row > [class*="col-6"] {
                flex: 0 0 100%;
                max-width: 100%;
            }
            .product-card .card-img-wrapper {
                aspect-ratio: 4/3;
            }
            .product-card .card-title {
                font-size: 0.88rem;
                -webkit-line-clamp: 3;
            }
        }

