/*
Theme Name: TitanCart Market
Theme URI: https://market.titancart.io
Author: TitanCart
Author URI: https://titancart.io
Description: Extensions marketplace theme for TitanCart premium plugins and add-ons. Based on dpmarket HTML template design patterns with WooCommerce integration.
Version: 1.0.0
Requires at least: 6.0
Requires PHP: 8.0
Text Domain: titancart-market
License: GNU General Public License v2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
WC requires at least: 8.0
WC tested up to: 9.5
*/

/* Theme-level overrides go here. Main styling comes from dpmarket's main.css */

/* TitanCart Market custom overrides */
.tc-market-badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 2px 10px;
    border-radius: 100px;
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
}
.tc-market-badge--annual { background: #EEF4FE; color: #1F6AE1; }
.tc-market-badge--lifetime { background: #EBF5F1; color: #1F8A70; }

/* WooCommerce notice styling to match dpmarket */
.woocommerce-message,
.woocommerce-info,
.woocommerce-error {
    border-radius: 8px;
    padding: 16px 20px;
    margin-bottom: 20px;
}

/* ═══ Archive / Shop Page Overrides ═══ */

/* Hide TitanCart's default banner + offcanvas when inside dpmarket layout */
.all-product .tc-shop__banner,
.all-product .tc-shop__filter-toggle[style*="display:none"] {
    display: none !important;
}

/* Reset TC shop container inside dpmarket layout */
.all-product .tc-shop {
    max-width: none;
    padding: 0;
    margin: 0;
}

/* TC product grid inside dpmarket — disable TC grid, use Bootstrap row */
.all-product #tc-product-grid {
    display: flex;
    flex-wrap: wrap;
}

/* Category sidebar active link */
.filter-sidebar-list__text.active {
    color: var(--main) !important;
    font-weight: 600 !important;
}

/* TC loading overlay inside dpmarket */
.all-product .tc-shop__loading {
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(255,255,255,0.7);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 999;
}

/* Toolbar styling to match dpmarket */
.all-product .tc-shop__found {
    margin: 0;
}

/* Sort select styling */
.all-product #tc-sort {
    border-radius: 8px;
    border: 1px solid #e5e7eb;
    height: auto;
    min-height: 38px;
}

/* Mobile sidebar overlay */
@media (max-width: 991.98px) {
    .filter-sidebar.active {
        transform: translateX(0) !important;
        visibility: visible !important;
        opacity: 1 !important;
    }
}

/* When TC JS re-renders cards — it replaces innerHTML of #tc-product-grid
   so cards inserted by JS won't have the col-xl-4 wrapper. Handle that: */
.all-product #tc-product-grid > .product-card {
    width: calc(33.333% - 16px);
    margin: 0 8px 16px;
}
@media (max-width: 1199.98px) {
    .all-product #tc-product-grid > .product-card {
        width: calc(50% - 16px);
    }
}
@media (max-width: 575.98px) {
    .all-product #tc-product-grid > .product-card {
        width: 100%;
        margin: 0 0 16px;
    }
}

/* TC pagination inside dpmarket — use dpmarket's common-pagination styling */
.all-product #tc-pagination {
    margin-top: 40px;
}
.all-product .tc-pagination {
    display: flex;
    justify-content: center;
    gap: 4px;
}
.all-product .tc-pagination__item {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 40px;
    height: 40px;
    border-radius: 50%;
    border: 1px solid #e5e7eb;
    color: #333;
    text-decoration: none;
    font-size: 14px;
    font-weight: 500;
    transition: all 0.2s;
}
.all-product .tc-pagination__item:hover,
.all-product .tc-pagination__item--active {
    background: var(--main, #6c5ce7);
    color: #fff;
    border-color: var(--main, #6c5ce7);
}
