/**
 * RB Jewellers Catalog - Base Styles
 *
 * @package    RB_Jewellers_Catalog
 * @since      2.0.0
 */

/* ==========================================================================
   CSS Variables
   ========================================================================== */

/*
 * Design system variables are defined in variables.css
 * This file uses those variables and adds catalog-specific overrides only
 */

:root {
    /* Catalog-specific variables that don't conflict with design system */
    --rb-whatsapp: #25D366;

    /* Legacy variable aliases for backward compatibility */
    /* These map old variable names to the new design system */
    --rb-primary: var(--rb-color-secondary);      /* Gold - maps to secondary color */
    --rb-primary-dark: var(--rb-color-secondary-700);
    --rb-primary-light: var(--rb-color-secondary-200);
    --rb-secondary: var(--rb-color-primary);      /* Dark blue - maps to primary color */
    --rb-accent: var(--rb-color-primary-800);
    --rb-success: var(--rb-color-success);
    --rb-danger: var(--rb-color-error);
    --rb-text: var(--rb-color-text-primary);
    --rb-text-light: var(--rb-color-text-secondary);
    --rb-text-muted: var(--rb-color-text-tertiary);
    --rb-border: var(--rb-color-border);
    --rb-bg: var(--rb-color-bg-primary);
    --rb-bg-light: var(--rb-color-bg-secondary);
    --rb-bg-dark: var(--rb-color-bg-tertiary);
    --rb-shadow: var(--rb-shadow-sm);
    --rb-shadow-lg: var(--rb-shadow-lg);
    --rb-radius: var(--rb-radius-lg);
    --rb-radius-sm: var(--rb-radius-base);
    --rb-radius-lg: var(--rb-radius-xl);
    --rb-transition: var(--rb-transition-base);
    --rb-font-family: var(--rb-font-family-sans);
}


/* ==========================================================================
   Base Styles
   ========================================================================== */

.rb-catalog {
    font-family: var(--rb-font-family);
    color: var(--rb-text);
    line-height: 1.5;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

.rb-catalog *,
.rb-catalog *::before,
.rb-catalog *::after {
    box-sizing: border-box;
}

.rb-catalog button {
    font-family: inherit;
    cursor: pointer;
}


/* ==========================================================================
   Layout
   ========================================================================== */

/* Container centers content and provides padding */
.rb-catalog-container {
    display: block;
    max-width: 1400px;
    margin: 0 auto;
    padding: 20px;
}

/* Layout is the flex container for sidebar + main */
.rb-catalog-layout {
    display: flex;
    flex-direction: row;
    gap: 30px;
}

.rb-catalog-sidebar {
    width: 280px;
    flex-shrink: 0;
}

.rb-catalog-main {
    flex: 1;
    min-width: 0;
}

@media (max-width: 1024px) {
    .rb-catalog-sidebar {
        position: fixed;
        top: 0;
        left: -300px;
        width: 300px;
        height: 100vh;
        background: var(--rb-bg);
        z-index: 1000;
        transition: left var(--rb-transition);
        overflow-y: auto;
        box-shadow: var(--rb-shadow-lg);
    }

    .rb-catalog-sidebar.open {
        left: 0;
    }

    .rb-sidebar-overlay {
        display: none;
        position: fixed;
        top: 0;
        left: 0;
        right: 0;
        bottom: 0;
        background: var(--rb-overlay);
        z-index: 999;
    }

    .rb-catalog-sidebar.open + .rb-sidebar-overlay {
        display: block;
    }
}

@media (max-width: 768px) {
    .rb-catalog-container {
        padding: 15px;
    }
}


/* ==========================================================================
   Template Wrapper (for full page templates)
   ========================================================================== */

.rb-catalog-wrapper {
    font-family: var(--rb-font-family);
    color: var(--rb-text);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    padding: 30px 0;
    min-height: 60vh;
}

.rb-catalog-wrapper *,
.rb-catalog-wrapper *::before,
.rb-catalog-wrapper *::after {
    box-sizing: border-box;
}

.rb-catalog-wrapper .rb-catalog-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 20px;
}

.rb-catalog-wrapper a {
    text-decoration: none;
    color: inherit;
}

.rb-catalog-wrapper a:hover {
    color: var(--rb-primary);
}


/* ==========================================================================
   Catalog Layout
   ========================================================================== */

.rb-catalog-layout {
    display: flex;
    gap: 30px;
}

.rb-catalog-layout .rb-catalog-sidebar {
    width: 280px;
    flex-shrink: 0;
}

.rb-catalog-layout .rb-catalog-main {
    flex: 1;
    min-width: 0;
}

@media (max-width: 1024px) {
    .rb-catalog-layout .rb-catalog-sidebar {
        position: fixed;
        top: 0;
        left: -320px;
        width: 300px;
        height: 100vh;
        background: var(--rb-bg);
        z-index: 1000;
        transition: left var(--rb-transition);
        overflow-y: auto;
        box-shadow: var(--rb-shadow-lg);
    }

    .rb-catalog-layout .rb-catalog-sidebar.open {
        left: 0;
    }
}

/* Category Filter Links */
.rb-filter-link {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    padding: 10px 12px;
    background: none;
    border-radius: var(--rb-radius-sm);
    font-size: 14px;
    color: var(--rb-text);
    transition: background var(--rb-transition);
}

.rb-filter-link:hover {
    background: var(--rb-bg-light);
    color: var(--rb-text);
}

.rb-filter-link.active {
    background: var(--rb-primary);
    color: #fff;
    font-weight: 500;
}

.rb-filter-link.active .rb-filter-count {
    background: rgba(255,255,255,0.2);
    color: #fff;
}



