/* Catalog-specific styles below; breadcrumbs + title in tokens.css */

/* === Catalog Layout (sidebar + grid) === */
.catalog-layout {
    display: flex;
    gap: 32px;
    padding-bottom: 24px;
}

/* === Sidebar === */
.catalog-sidebar {
    width: 280px;
    flex-shrink: 0;
}

.catalog-sidebar-inner {
    background-color: var(--bs-secondary-bg);
    padding: 24px;
}

.catalog-sidebar-title {
    font-size: 20px;
    font-weight: 700;
    margin-bottom: 20px;
}

.catalog-sidebar-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.catalog-sidebar-list li {
    margin-bottom: 0;
}

.catalog-sidebar-list a {
    display: block;
    padding: 12px 0;
    font-size: 16px;
    color: var(--bs-body-color);
    text-decoration: none;
    border-bottom: 1px solid var(--bs-border-color);
    transition: color 0.2s;
}

.catalog-sidebar-list li:last-child a {
    border-bottom: none;
}

.catalog-sidebar-list a:hover {
    color: var(--bs-primary);
}

.catalog-sidebar-list a.active {
    color: var(--bs-primary);
    font-weight: 600;
    border-left: 3px solid var(--bs-primary);
    padding-left: 12px;
}

/* === Mobile Categories Toggle === */
.catalog-mobile-cats {
    margin-bottom: 16px;
}

.catalog-mobile-toggle {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    padding: 14px 16px;
    background-color: var(--bs-secondary-bg);
    border: none;
    font-size: 16px;
    font-weight: 600;
    color: var(--bs-body-color);
    cursor: pointer;
    transition: background-color 0.2s;
}

.catalog-mobile-toggle:hover {
    background-color: #dde2ee;
}

.catalog-mobile-chevron {
    transition: transform 0.25s ease;
}

.catalog-mobile-toggle[aria-expanded="true"]
    .catalog-mobile-chevron {
    transform: rotate(180deg);
}

.catalog-mobile-list {
    background-color: var(--bs-secondary-bg);
    padding: 0 16px 12px;
}

/* === Product Grid / List === */
.catalog-grid {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

/* === Product Card (mobile: vertical card, desktop: horizontal row) === */
.catalog-card {
    display: flex;
    flex-direction: column;
    background: #fff;
    border: 1px solid var(--bs-border-color);
    transition: background-color 0.15s;
}

.catalog-card:hover {
    background-color: var(--bs-tertiary-bg);
}


.catalog-card-info {
    padding: 16px;
    border-left: 4px solid var(--card-accent, var(--bs-secondary));
    display: flex;
    flex-direction: column;
    flex: 1;
}

.catalog-card-article {
    font-family: 'SFMono-Regular', Consolas, 'Liberation Mono', monospace;
    font-size: 0.9rem;
    font-weight: 700;
    letter-spacing: 0.05em;
    color: var(--bs-primary);
    margin-bottom: 8px;
}

.catalog-card-unit {
    font-family: inherit;
    font-size: 0.75rem;
    font-weight: 400;
    color: var(--bs-secondary-color);
    letter-spacing: 0;
}

.catalog-card-name {
    font-size: 18px;
    font-weight: 300;
    color: #000;
    line-height: 1.2;
    margin-bottom: 12px;
    flex: 1;
    word-break: break-word;
}

.catalog-card-price {
    font-size: 22px;
    font-weight: 400;
    color: var(--bs-primary);
    margin: 0 0 12px;
}

.catalog-card-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 36px;
    border: 1px solid var(--konpal-navy);
    color: var(--konpal-navy);
    background: transparent;
    font-size: 13px;
    font-weight: 600;
    transition: background-color 0.2s, color 0.2s;
}

.catalog-card:hover .catalog-card-btn {
    background-color: var(--konpal-navy);
    color: #fff;
}

/* === Pagination === */
.catalog-pagination {
    display: flex;
    justify-content: center;
    gap: 8px;
    margin-top: 24px;
    padding-bottom: 24px;
}

.catalog-pagination .page-link {
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    border: 1px solid var(--bs-border-color);
    border-radius: 2px;
    font-size: 14px;
    color: var(--bs-body-color);
    background: #fff;
    transition: border-color 0.2s, color 0.2s;
}

.catalog-pagination .page-link:hover {
    border-color: var(--bs-primary);
    color: var(--bs-primary);
}

.catalog-pagination .active .page-link {
    border-color: var(--bs-primary);
    color: var(--bs-primary);
    background: #fff;
    font-weight: 700;
}

.catalog-pagination .disabled .page-link {
    color: var(--konpal-gray);
    border-color: var(--bs-border-color);
}

/* === Empty state === */
.catalog-empty {
    text-align: center;
    padding: 60px 0;
    color: var(--bs-secondary-color);
    font-size: 18px;
}

/* === Catalog content wrapper === */
.catalog-content {
    flex: 1;
    min-width: 0;
}

/* === Product Detail === */
.product-title {
    font-size: 44px;
    margin-top: 16px;
    margin-bottom: 32px;
    max-width: 900px;
}

.product-layout {
    max-width: 600px;
    margin-bottom: 48px;
}

.product-badges {
    margin-bottom: 24px;
}

.product-badge-stock {
    font-size: 16px;
    color: var(--konpal-green);
}

.product-section-title {
    font-size: 24px;
    font-weight: 400;
    margin-bottom: 16px;
}

.product-specs {
    width: 100%;
    margin-bottom: 32px;
}

.product-specs tr {
    border-bottom: 1px solid var(--bs-border-color);
}

.product-specs td {
    padding: 12px 0;
    font-size: 16px;
}

.product-spec-label {
    color: var(--bs-secondary-color);
    width: 160px;
    padding-right: 24px;
}

.product-spec-value a {
    color: var(--bs-primary);
    text-decoration: none;
}

.product-spec-value a:hover {
    text-decoration: underline;
}

.product-price-block {
    margin-bottom: 24px;
}

.product-price {
    font-family: 'Fira Sans', sans-serif;
    font-size: 32px;
    font-weight: 400;
    color: var(--bs-primary);
}

.product-cta {
    width: 304px;
    justify-content: center;
}

.product-description {
    max-width: 900px;
    padding-top: 32px;
    border-top: 1px solid var(--bs-border-color);
}

.product-description-text {
    font-size: 16px;
    color: var(--bs-secondary-color);
    line-height: 1.6;
}

/* === Desktop: horizontal rows === */
@media (min-width: 768px) {
    .catalog-grid {
        gap: 0;
    }

    .catalog-card {
        border: none;
        border-bottom: 1px solid var(--bs-border-color);
    }

    .catalog-card:first-child {
        border-top: 1px solid var(--bs-border-color);
    }

    .catalog-card-info {
        flex-direction: row;
        align-items: center;
        gap: 16px;
        padding: 12px 16px;
    }

    .catalog-card-article {
        min-width: 160px;
        margin-bottom: 0;
    }

    .catalog-card-name {
        flex: 1;
        font-size: 16px;
        margin-bottom: 0;
    }

    .catalog-card-btn {
        width: auto;
        min-width: 120px;
        padding: 0 16px;
    }
}

/* === Responsive: product detail === */
@media (max-width: 991.98px) {
    /* section-title responsive is in tokens.css */

    .product-title {
        font-size: 30px;
    }

    .product-cta {
        width: 100%;
    }
}

/* === Responsive: mobile cards === */
@media (max-width: 575.98px) {
    .catalog-card-info {
        padding: 12px;
    }

    .catalog-card-name {
        font-size: 15px;
        margin-bottom: 8px;
    }

    .catalog-card-btn {
        height: 42px;
        font-size: 13px;
    }

    .product-price {
        font-size: 24px;
    }

    .product-section-title {
        font-size: 20px;
    }
}
